/* ==========================================================================
   lesiones-rodilla.css — Page-specific overrides for knee injuries hub page
   ========================================================================== */

/* Prevent horizontal scroll from layout overflow */
.hero-b {
    background-image: none !important;
    background-color: #0c121b !important; /* Dark fallback background */
    position: relative;
    overflow: hidden;
    width: 100% !important;
    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;
}

/* Background dark gradient overlay for text readability over the video and covering watermark evenly */
.hero-overlay {
    z-index: 2 !important;
    background: linear-gradient(to bottom, rgba(12, 18, 27, 0.2) 0%, rgba(12, 18, 27, 0.45) 50%, rgba(12, 18, 27, 0.9) 75%, #0c121b 92%, #0c121b 100%) !important;
}

/* Neon overlay gradient matching the rest of the site's premium style */
.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;
    text-decoration: none;
    transition: color 0.2s ease;
}
.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;
}

/* Custom design aesthetics for the knee page hero title */
.hero-b-title span {
    display: block;
}

/* Responsiveness adjustments for mobile viewports */
@media (max-width: 768px) {
    .hero-video-bg {
        /* Optimize object position on mobile to focus on the joint illustration/video content if needed */
        object-position: center;
    }
}

/* ==================== LESIONES GRID SECTION ==================== */
.lesiones-section {
    position: relative;
    padding: 8rem 4rem;
    background-color: #0c121b; /* Dark backdrop to match hero transition */
    overflow: hidden;
}

.lesiones-container {
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

.lesiones-section .section-label {
    display: inline-block;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #52a0ff;
    margin-bottom: 1rem;
}

.lesiones-section .section-title {
    font-family: 'Syne', sans-serif;
    font-size: 2.75rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin: 0 0 1.5rem 0;
}

.lesiones-section .section-desc {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.65);
    max-width: 800px;
    margin: 0 0 4rem 0;
}

/* 3x2 Grid for Desktop, collapsing to 1-column on mobile */
.lesiones-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
}

.lesion-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border-radius: 24px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    isolation: isolate; /* Force stacking context clip */
    -webkit-mask-image: -webkit-radial-gradient(white, black); /* Fix border-radius rounding loss */
    will-change: transform;
}

.lesion-card:hover {
    transform: translate3d(0, -6px, 0);
    border-color: rgba(82, 160, 255, 0.3); /* Subtle blue glow on border */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.lesion-card-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #0c121b;
}

.lesion-card-image img {
    display: block;
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: filter 0.35s ease;
}

.lesion-card:hover .lesion-card-image img {
    filter: brightness(1.04);
}

.lesion-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: -2px; /* Extend slightly below the image container to cover subpixel rounding errors */
    background: linear-gradient(to bottom, transparent 40%, #0c121b 90%, #0c121b 100%); /* Force solid dark color at bottom to prevent GPU texture bleed */
    z-index: 2;
    pointer-events: none;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.lesion-card-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    z-index: 3; /* Draw on top of image wrapper to cover subpixel gap lines */
    position: relative;
    margin-top: -2px;
    background-color: #0c121b; /* Solid dark background matching section to hide bleed */
}

.lesion-card-body::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #0c121b;
    pointer-events: none;
}

.lesion-card-tag {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #52a0ff;
    margin-bottom: 0.75rem;
}

.lesion-card-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 1rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.lesion-card-title svg {
    width: 20px;
    height: 20px;
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.3s ease, color 0.3s ease;
}

.lesion-card:hover .lesion-card-title {
    color: #52a0ff;
}

.lesion-card:hover .lesion-card-title svg {
    transform: translate(4px, -4px);
    color: #52a0ff;
}

.lesion-card-desc {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.92rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
}

/* Responsive queries */
@media (max-width: 1024px) {
    .lesiones-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    .lesiones-section {
        padding: 6rem 2rem;
    }
}

@media (max-width: 768px) {
    .lesiones-section .section-title {
        font-size: 2.25rem;
    }
    
    /* Turn grid into a horizontal slider on mobile */
    .lesiones-grid {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 1.25rem;
        padding-bottom: 2rem;
        width: calc(100% + 4rem); /* Bleed to screen edges */
        margin-left: -2rem; /* Offset section padding */
        padding-left: 2rem;
        padding-right: 2rem;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Hide scrollbar for Firefox */
    }
    
    .lesiones-grid::-webkit-scrollbar {
        display: none; /* Hide scrollbar for Chrome/Safari */
    }
    
    .lesion-card {
        flex: 0 0 80%; /* Card covers 80% peeking the next one */
        scroll-snap-align: start;
        max-width: 320px;
    }
    
    .lesion-card-image {
        height: 180px;
    }
}

/* ==================== LESIONES BOTTOM CTA ==================== */
.lesiones-bottom-cta {
    margin-top: 5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0.01) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.lesiones-bottom-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(82, 160, 255, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.lesiones-bottom-cta-title {
    font-family: 'Syne', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.lesiones-bottom-cta-desc {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.05rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.65);
    max-width: 640px;
    margin-bottom: 2.25rem;
}

@media (max-width: 768px) {
    .lesiones-bottom-cta {
        margin-top: 3.5rem;
        padding: 3rem 1.5rem;
    }
    .lesiones-bottom-cta-title {
        font-size: 1.65rem;
    }
}

/* ==================== PROCEDIMIENTOS SECTION (LIGHT MODE) ==================== */
.procedimientos-section {
    position: relative;
    padding: 8rem 4rem;
    background-color: #f4f6f9; /* Premium light slate-blue background */
    border-top: 1px solid rgba(22, 32, 48, 0.05);
    overflow: hidden;
}

.procedimientos-container {
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

.procedimientos-section .section-label {
    display: inline-block;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #53667d; /* Slate blue */
    margin-bottom: 1rem;
}

.procedimientos-section .section-title {
    font-family: 'Syne', sans-serif;
    font-size: 2.75rem;
    font-weight: 700;
    color: #162030; /* Dark Navy */
    line-height: 1.2;
    margin: 0 0 1.5rem 0;
}

.procedimientos-section .section-title .text-gradient {
    background: linear-gradient(135deg, #162030 0%, #1e6ffd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.procedimientos-section .section-desc {
    font-family: 'DM Sans', sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    color: #53667d; /* Slate blue */
    max-width: 800px;
    margin: 0 0 4rem 0;
}

/* 2-Column Grid for Procedures */
.procedimientos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    width: 100%;
    margin-bottom: 4rem;
}

.procedimiento-card {
    display: flex;
    flex-direction: column;
    background: #ffffff; /* Clean white card */
    border: 1px solid rgba(83, 102, 125, 0.08); /* Soft slate border */
    border-radius: 24px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    box-shadow: 0 10px 30px rgba(22, 32, 48, 0.02);
    isolation: isolate; /* Force stacking context clip */
    -webkit-mask-image: -webkit-radial-gradient(white, black); /* Fix border-radius rounding loss */
    will-change: transform;
}

.procedimiento-card:hover {
    transform: translate3d(0, -6px, 0);
    border-color: rgba(82, 160, 255, 0.35); /* Subtle blue glow on hover */
    box-shadow: 0 20px 40px rgba(22, 32, 48, 0.06);
}

.procedimiento-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #ffffff;
}

.procedimiento-image img {
    display: block;
    width: 100%;
    height: 320px;
    object-fit: cover;
    transition: filter 0.35s ease;
}

.procedimiento-card:hover .procedimiento-image img {
    filter: brightness(1.03);
}

.procedimiento-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: -2px; /* Extend slightly below the image container to cover subpixel rounding errors */
    background: linear-gradient(to bottom, transparent 30%, #ffffff 90%, #ffffff 100%); /* Force solid white at bottom to prevent GPU texture bleed */
    z-index: 2;
    pointer-events: none;
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
}

.procedimiento-body {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    z-index: 3; /* Draw on top of image wrapper to cover subpixel gap lines */
    position: relative;
    margin-top: -2px;
    background-color: #ffffff; /* Solid white background matching card body to hide bleed */
}

.procedimiento-body::before {
    content: '';
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #ffffff;
    pointer-events: none;
}

.procedimiento-card-title {
    font-family: 'Syne', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #162030; /* Dark Navy */
    margin: 0 0 1.25rem 0;
}

.procedimiento-card-title-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.procedimiento-card-title-link i {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.procedimiento-card:hover .procedimiento-card-title-link {
    color: #1e6ffd;
}

.procedimiento-card:hover .procedimiento-card-title-link i {
    transform: translateX(4px);
}

.procedimiento-card-desc {
    font-family: 'DM Sans', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #53667d; /* Slate blue */
    margin: 0;
    flex-grow: 1;
}

.procedimiento-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    color: #1e6ffd; /* Vibrant blue link */
    text-decoration: none;
    transition: color 0.3s ease;
}

.procedimiento-link svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.procedimiento-link:hover {
    color: #162030; /* Hover color */
}

.procedimiento-link:hover svg {
    transform: translateX(4px);
}

.procedimientos-footer {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Light button override for procedures footer button */
.procedimientos-section .btn-fitflow {
    background-color: #162030; /* Dark Navy background */
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(22, 32, 48, 0.08);
}

.procedimientos-section .btn-fitflow:hover {
    background-color: #2c3e50;
    box-shadow: 0 15px 35px rgba(22, 32, 48, 0.16);
}

.procedimientos-section .btn-fitflow-circle {
    background-color: #52a0ff;
    color: #ffffff;
}

.procedimientos-section .btn-fitflow:hover .btn-fitflow-circle {
    background-color: #1e6ffd;
}

@media (max-width: 1024px) {
    .procedimientos-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .procedimientos-section {
        padding: 6rem 2rem;
    }
    .procedimiento-image {
        height: 260px;
    }
    .procedimiento-body {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .procedimientos-section .section-title {
        font-size: 2rem;
    }
}


