/* ==========================================================================
   medicina-deportiva-v13.css — Page-specific overrides for sports medicine page
   ========================================================================== */

/* Prevent horizontal scroll from marquee and wide elements */
.artr-hub-section,
.reviews-section,
.contact-section,
.faq-section {
    overflow-x: hidden;
}

/* Hero container reset & base setting to contain full-screen elements */
.hero-b {
    background-image: none !important;
    background-color: #0c121b !important; /* Dark fallback background */
    position: relative;
    overflow: hidden;
    width: 100% !important; /* Fix horizontal layout overflow by preventing 100vw scrollbar offset */
    max-width: 100% !important;
}

/* Video background wrapper to scale and center the media */
.hero-video-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.hero-video-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Position standard overlays and neon gradient above the video layer */
.hero-overlay {
    z-index: 2 !important;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.2) 0%, rgba(15, 23, 42, 0.35) 60%, rgba(12, 18, 27, 0.8) 100%) !important;
}

.hero-b::before {
    z-index: 2 !important;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.08) 0%, rgba(30, 111, 253, 0.05) 50%, rgba(20, 184, 166, 0.08) 100%) !important;
}

/* Place hero contents firmly in the foreground */
.hero-b-container {
    z-index: 3 !important;
}

/* Force light colors for breadcrumbs inside the dark hero section */
.hero-b .breadcrumbs a {
    color: rgba(255, 255, 255, 0.6) !important;
}
.hero-b .breadcrumbs a:hover {
    color: #ffffff !important;
}
.hero-b .breadcrumbs .breadcrumb-separator {
    color: rgba(255, 255, 255, 0.35) !important;
}
.hero-b .breadcrumbs .breadcrumb-current {
    color: #ffffff !important;
}

/* Combined Details Section (Location & Gallery Grid with glassmorphic blobs) */
.sports-details-section {
    position: relative;
    width: 100%;
    padding: 5rem 2rem 4rem 2rem; /* Reduced bottom padding from 8rem to 4rem to pull reinforce section upward */
    overflow: hidden;
    background-color: #ffffff; /* Fallback */
}

.details-bg-base {
    position: absolute;
    inset: 0;
    background: #ffffff;
    z-index: 1;
}

.sports-details-section .hero-bg-blobs {
    z-index: 2;
}

.sports-details-section .hero-light-blob {
    position: absolute;
    opacity: 0.42; /* Soft but visible opacity */
    animation: lightBlobPulse 10s infinite alternate ease-in-out;
    filter: none !important; /* Disable heavy CSS blur filter to completely eliminate GPU lag */
    border-radius: 0 !important;
    will-change: transform;
}

/* Positioned to frame the layout beautifully. Using native CSS radial gradients to create smooth, soft edges with zero performance overhead. */
.sports-blob-teal {
    top: 5%;
    left: -10%; /* Moved inward to be clearly visible */
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, #a5f3fc 0%, transparent 70%) !important; /* Native gradient blur */
}
.sports-blob-blue {
    bottom: 10%;
    right: -10%; /* Moved inward to be clearly visible */
    width: 1000px;
    height: 1000px;
    background: radial-gradient(circle, #bfdbfe 0%, transparent 70%) !important; /* Native gradient blur */
    animation-delay: -3s;
}
.sports-blob-cyan {
    bottom: -15%;
    left: 20%; /* Centered slightly off-left to frame the lower card section */
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, #cffafe 0%, transparent 70%) !important; /* Native gradient blur */
    animation-delay: -7s;
}

.sports-details-container {
    width: 100%; /* Force the flex container to respect parent constraints instead of expanding to max-content */
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3.5rem; /* Reduced gap - brings cards and location banner close together */
    position: relative;
    z-index: 5;
}

/* Location Card (Glassmorphic & Vertically Centered) */
.sports-details-section .location-card {
    background: rgba(255, 255, 255, 0.55) !important; /* Optimal transparency to let blobs show through while keeping text legible */
    backdrop-filter: blur(24px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.6) !important;
    border-radius: 28px;
    padding: 35px 48px;
    max-width: 680px;
    width: 100%;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.sports-details-section .location-card-logo {
    height: 90px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) !important; /* Force white SVG logo to render black in light mode */
    opacity: 0.95;
}

.sports-details-section .location-card-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sports-details-section .location-card-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #162030 !important;
    line-height: 1.3;
    margin: 0;
}

.sports-details-section .location-card-sub {
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #4a5568 !important;
    line-height: 1.4;
    margin: 0;
}

.sports-details-section .location-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #162030 !important;
    text-decoration: none;
    padding: 10px 22px;
    border-radius: 100px;
    border: 1px solid rgba(22, 32, 48, 0.15) !important;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.sports-details-section .location-card-cta svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.sports-details-section .location-card-cta:hover {
    background-color: rgba(22, 32, 48, 0.05);
    border-color: rgba(22, 32, 48, 0.3) !important;
}

.sports-details-section .location-card-cta:hover svg {
    transform: translateX(3px);
}

/* Sports Gallery Container */
.sports-gallery-container {
    width: 100%;
}

.sports-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: 100%; /* Force grid container to respect parent constraints */
    background-color: rgba(22, 32, 48, 0.08); /* Faint neutral dark gray lines for clean dividers */
    gap: 1px;
    border: 1px solid rgba(22, 32, 48, 0.12); /* Subtle neutral border */
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.03);
}

/* Individual Column Link Card */
.sports-gallery-col {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background-color: transparent;
    color: inherit;
    transition: transform 0.3s ease;
}

/* Top Card Text Container (Glassmorphic) */
.sports-gallery-card {
    background: rgba(255, 255, 255, 0.55) !important; /* Premium glass transparency showing blobs at edges */
    backdrop-filter: blur(24px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(160%) !important;
    padding: 4.5rem 3rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 320px;
    transition: background-color 0.3s ease;
}

.sports-gallery-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.sports-gallery-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary); /* Slate Blue matching rest of website */
}

.sports-gallery-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(83, 102, 125, 0.25);
    color: var(--primary); /* Slate Blue matching rest of website */
    transition: all 0.3s ease;
}

.sports-gallery-arrow svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.sports-gallery-heading {
    font-family: 'Syne', sans-serif;
    font-size: 2.3rem;
    font-weight: 600;
    color: #162030;
    line-height: 1.15;
    margin-bottom: 0;
    letter-spacing: -0.02em;
}

/* Bottom Image container */
.sports-gallery-image-wrap {
    height: 560px;
    width: 100%;
    overflow: hidden;
    background-color: #f1f5f9; /* Cool light slate placeholder background matching global light-theme */
}

.sports-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hover Interactive Effects */
.sports-gallery-col:hover .sports-gallery-card {
    background: rgba(255, 255, 255, 0.7) !important; /* Brighter glass on hover */
}

.sports-gallery-col:hover .sports-gallery-arrow {
    background-color: #162030;
    border-color: #162030;
    color: #ffffff;
}

.sports-gallery-col:hover .sports-gallery-arrow svg {
    transform: translate(1px, -1px);
}

.sports-gallery-col:hover .sports-gallery-img {
    transform: scale(1.05);
}

/* Ensure smooth layout and alignment on mobile viewports */
@media (max-width: 1024px) {
    .hero-b {
        height: auto;
        min-height: 100dvh;
        display: flex;
        align-items: flex-end;
        padding-top: 90px;
        box-sizing: border-box;
    }

    .sports-details-section {
        padding: 4rem 1.5rem 3rem 1.5rem; /* Reduced bottom padding on tablet */
    }
    
    .sports-details-container {
        gap: 2.5rem;
    }

    .sports-details-section .location-card {
        padding: 28px 24px;
        border-radius: 20px;
    }
    
    .sports-gallery-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        background-color: transparent;
        border: none;
        border-radius: 0;
        overflow: visible;
        box-shadow: none;
    }
    
    .sports-gallery-col {
        border-radius: 24px;
        overflow: hidden;
        border: 1px solid rgba(22, 32, 48, 0.1); /* Subtle neutral border */
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.02);
    }
    
    .sports-gallery-card {
        background-color: #ffffff !important;
        padding: 2.5rem 2rem;
        min-height: auto;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    
    .sports-gallery-image-wrap {
        height: 380px;
    }
}

@media (max-width: 576px) {
    .sports-gallery-heading {
        font-size: 1.6rem;
    }
    .sports-gallery-image-wrap {
        height: 280px;
    }
}

/* Mobile performance overrides for background blobs (<= 768px) */
@media (max-width: 768px) {
    .sports-details-section .hero-bg-blobs,
    .sports-details-section .hero-light-blob {
        display: none !important;
    }
}

/* ==========================================================================
   4. REINFORCE & CUSTOM ABOUT DOCTOR SECTIONS (v13.0)
   ========================================================================== */

/* Reinforce Section (Pulled upward closely below the 3 columns) */
.sports-reinforce-section {
    background-color: #ffffff;
    padding: 1rem 2rem 4rem 2rem; /* Tightened padding to pull content closely below the grid */
    width: 100%;
    position: relative;
    z-index: 5;
}
.sports-reinforce-container {
    max-width: 1100px; /* Wider for premium Syne display */
    margin: 0 auto;
    text-align: center;
}
.sports-reinforce-text {
    font-family: 'Syne', sans-serif; /* Changed to Syne font */
    font-size: 1.8rem; /* Bolder, high-impact size */
    font-weight: 500;
    line-height: 1.45;
    color: #162030;
    letter-spacing: -0.02em;
    margin: 0;
}

/* CTA Button in reinforcing section */
.sports-reinforce-cta-wrap {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.sports-reinforce-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #162030 !important;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 100px;
    border: 1px solid rgba(22, 32, 48, 0.15) !important;
    background-color: transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sports-reinforce-cta svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.sports-reinforce-cta:hover {
    background-color: rgba(22, 32, 48, 0.05);
    border-color: rgba(22, 32, 48, 0.3) !important;
    transform: translateY(2px);
}

.sports-reinforce-cta:hover svg {
    transform: translateY(3px);
}

/* About Doctor Section with full-screen background image */
.sports-about-doctor-section {
    position: relative;
    width: 100%;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 6rem 10%;
    background-image: url('medicina deportiva en tijuana.webp');
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    background-attachment: fixed !important; /* Parallax sticky background effect */
    overflow: hidden;
}

/* Dark gradient overlay on the left to guarantee high text contrast without needing a card background */
.sports-about-doctor-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(12, 18, 27, 0.72) 0%, rgba(12, 18, 27, 0.45) 45%, rgba(12, 18, 27, 0.1) 100%);
    z-index: 1;
}

.sports-about-doctor-container {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-start;
}

/* Clean transparent typography container on the left */
.sports-dr-headline-container {
    max-width: 650px;
    width: 100%;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.sports-dr-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #a5f3fc; /* Cyan brand accent */
}

.sports-dr-headline {
    font-family: 'Syne', sans-serif;
    font-size: 3.8rem;
    font-weight: 600;
    line-height: 1.1;
    margin: 0;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.sports-dr-lead {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin: 0;
    max-width: 500px;
}

.sports-dr-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: #162030 !important;
    background-color: #ffffff;
    text-decoration: none;
    padding: 16px 32px;
    border-radius: 100px;
    transition: all 0.3s ease;
    margin-top: 1rem;
    border: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: fit-content;
}

.sports-dr-cta svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

/* Bullet list inside sticky condition cards */
.sticky-card-bullets {
    list-style: none;
    margin: 16px 0 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sticky-card-bullets li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.4;
}

.sticky-card-bullets li::before {
    content: '';
    flex-shrink: 0;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary-light);
}

.sports-dr-cta:hover {
    background-color: #a5f3fc;
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(165, 243, 252, 0.25);
}

.sports-dr-cta:hover svg {
    transform: translateX(4px);
}

/* ==========================================================================
   LESIONES COMUNES — Mobile horizontal snap carousel
   ========================================================================== */
@media (max-width: 768px) {
    .sticky-cards-stack {
        flex-direction: row !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 1.5rem;
        gap: 16px !important;
        padding: 0 1.5rem 1rem !important;
        scrollbar-width: none;
        /* un-do the column layout from styles.css */
        height: auto !important;
    }

    .sticky-cards-stack::-webkit-scrollbar {
        display: none;
    }

    .sticky-desc-card {
        flex-shrink: 0 !important;
        width: min(78vw, 320px) !important;
        scroll-snap-align: start;
    }

    /* Restore left nav header (title + support text) but hide the nav list */
    .sticky-left-nav {
        padding: 0 1.5rem;
    }

    .sticky-content-grid {
        gap: 1.5rem !important;
    }

    .sticky-content-container {
        padding: 0 !important;
    }
}

@media (max-width: 992px) {
    .sports-reinforce-section {
        padding: 1rem 1.5rem 3rem 1.5rem;
    }
    .sports-reinforce-text {
        font-size: 1.5rem;
        line-height: 1.4;
    }
    .sports-about-doctor-section {
        background-position: 65% center;
        padding: 5rem 6%;
        justify-content: center;
        min-height: auto;
        background-attachment: scroll !important; /* Fallback on smaller devices for smooth scrolling */
    }
    .sports-about-doctor-container {
        justify-content: center;
    }
    .sports-dr-headline-container {
        max-width: 550px;
        text-align: center;
        align-items: center;
    }
    .sports-dr-headline {
        font-size: 2.8rem;
    }
    .sports-dr-cta {
        margin-top: 0.5rem;
    }
}

@media (max-width: 576px) {
    .sports-reinforce-text {
        font-size: 1.25rem;
        line-height: 1.4;
    }
    .sports-about-doctor-section {
        background-position: 75% center;
        padding: 4rem 1.25rem;
    }
    .sports-dr-headline-container {
        gap: 1rem;
    }
    .sports-dr-headline {
        font-size: 2.2rem;
    }
    .sports-dr-lead {
        font-size: 1.1rem;
        line-height: 1.4;
    }
}

/* ==========================================================================
   ARTROSCOPIA HUB SECTION
   ========================================================================== */
.artr-hub-section {
    background-color: var(--bg-darker);
    padding: 100px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.artr-hub-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 40px;
}

.artr-hub-header {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 56px;
}

.artr-hub-eyebrow {
    font-size: 13px;
    font-weight: 500;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 14px;
}

.artr-hub-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(28px, 3vw, 42px);
    font-weight: 600;
    color: #ffffff;
    line-height: 1.15;
    margin-bottom: 16px;
}

.artr-hub-desc {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.7;
}

.artr-hub-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.artr-hub-card {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    background: #1a2840;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

.artr-hub-card-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-dark);
}

.artr-hub-card-body {
    display: flex;
    flex-direction: column;
    padding: 28px 28px 24px;
    flex: 1;
}

.artr-hub-card-tag {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary-light);
    margin-bottom: 10px;
}

.artr-hub-card-title {
    font-family: 'Syne', sans-serif;
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 10px;
}

.artr-hub-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.artr-hub-card-title a:hover {
    color: var(--primary-light);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.artr-hub-card-text {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.65;
    flex: 1;
    margin-bottom: 20px;
}

.artr-hub-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-light);
    transition: color 0.2s ease, gap 0.2s ease;
}

.artr-hub-card-cta svg {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.artr-hub-card:hover .artr-hub-card-cta {
    color: #ffffff;
}

.artr-hub-card:hover .artr-hub-card-cta svg {
    transform: translateX(4px);
}

.artr-hub-footer {
    text-align: center;
    margin-top: 40px;
}

.artr-hub-view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 32px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.artr-hub-view-all:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 900px) {
    .artr-hub-section {
        padding: 70px 0;
    }
    .artr-hub-inner {
        padding: 0 24px;
    }
    .artr-hub-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .artr-hub-card-img {
        height: 180px;
    }
}
