/* =====================================================
   PAST SPEAKERS — CORRECTED ALIGNMENT
   ===================================================== */

.split-scroll-section {
    position: relative;
    background-color: #000;
    width: 100%;
}

.sticky-wrapper {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* FIX 1: Header no longer has position:relative + top:0 duplication.
   flex-shrink:0 ensures it never compresses, and z-index keeps it above cards. */
.sticky-wrapper .app-section-header {
    flex-shrink: 0;
    padding: 48px 16px 16px;
    text-align: center;
    z-index: 100;
    position: relative;
}

/* FIX 2: Use flex:1 1 0 + min-height:0 instead of flex-grow + height:100%.
   This makes the container fill ONLY the remaining space after the header,
   not the full 100vh — which was causing cards to bleed behind the header. */
.split-pages-container {
    flex: 1 1 0;
    min-height: 0;
    /* critical for nested flex scroll */
    position: relative;
    width: 100%;
}

/* FIX 3: Use inset:0 so cards are constrained to the container, not the full page.
   Add padding so card doesn't touch container edges. */
.split-page {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px 20px;
    pointer-events: none;
    z-index: 1;
}

.speaker-card {
    display: flex;
    width: 90%;
    max-width: 1100px;
    height: 100%;
    max-height: 420px;
    /* FIX 4: max-height instead of fixed height — responsive */
    background: rgba(15, 15, 15, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 32px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.8);
}

.speaker-card-image {
    width: 42%;
    flex-shrink: 0;
    height: 100%;
    overflow: hidden;
}

.speaker-image-frame {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
}

/* FIX 5: min-width:0 prevents flex children from overflowing their container */
.speaker-card-content {
    flex: 1;
    min-width: 0;
    padding: clamp(1.2rem, 3vw, 2.5rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    background: linear-gradient(135deg, rgba(25, 25, 25, 0.4) 0%, rgba(10, 10, 10, 0.8) 100%);
}

.speaker-tag {
    display: block;
    font-size: 0.85rem;
    color: #eb0028;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    margin-bottom: 0.75rem;
}

.speaker-name {
    font-size: clamp(1.4rem, 3vw, 2.6rem);
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.05;
    margin-bottom: 0.5rem;
    color: #fff;
    letter-spacing: -0.02em;
}

.speaker-title {
    font-size: clamp(0.8rem, 1.1vw, 1rem);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.speaker-bio {
    font-size: clamp(0.78rem, 0.9vw, 0.92rem);
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.7;
    border-left: 3px solid #eb0028;
    border-radius: 0;
    /* FIX 6: no border-radius on a single-side border */
    padding-left: 1.2rem;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    /* prevents bio from overflowing card */
    -webkit-box-orient: vertical;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .sticky-wrapper .app-section-header {
        padding: 20px 16px 10px;
    }

    .speaker-card {
        flex-direction: column;
        max-width: 420px;
        max-height: none;
        height: 100%;
    }

    .speaker-card-image {
        width: 100%;
        height: 200px;
        flex-shrink: 0;
    }

    /* FIX 7: On mobile, content area scrolls internally if bio is long */
    .speaker-card-content {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        padding: 1.2rem;
        justify-content: flex-start;
    }

    .speaker-bio {
        -webkit-line-clamp: 4;
    }
}

@media (max-width: 480px) {
    .speaker-bio {
        font-size: 0.78rem;
        padding-left: 1rem;
    }
}