/* Framework Section Styles */
.framework-section {
    padding: 120px 0;
    /* background: var(--bg-white); removed to allow bg-light to work */
    color: var(--text-primary);
    overflow: hidden;
}

/* Framework Main Wrapper - Hub and Spokes */
.framework-main-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Side Items Column */
.wheel-side-items {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    height: 600px;
    /* Match wheel height */
    flex: 1;
    z-index: 5;
}

/* Cluster groups for row alignment */
.spoke-cluster {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.wheel-side-items.left {
    align-items: flex-end;
}

.wheel-side-items.right {
    align-items: flex-start;
}

/* Individual Question Item (Spoke) */
.q-spoke {
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    cursor: default;
    max-width: 280px;
    position: relative;
}

.wheel-side-items.left .q-spoke {
    flex-direction: row;
    text-align: right;
}

.wheel-side-items.right .q-spoke {
    flex-direction: row-reverse;
    text-align: left;
}

.spoke-icon {
    width: 48px;
    height: 48px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.q-spoke:hover .spoke-icon {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 210, 190, 0.3);
}

.spoke-content h5 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 4px;
    letter-spacing: 0.1em;
    font-weight: 700;
    transition: color 0.3s ease;
}

/* Category Color Coding for Spokes */
.q-physiology .spoke-icon {
    color: #E94E5D;
}

.q-physiology:hover h5 {
    color: #E94E5D;
}

.q-physiology:hover .spoke-icon {
    border-color: #E94E5D;
    box-shadow: 0 0 15px rgba(233, 78, 93, 0.2);
}

.q-operations .spoke-icon {
    color: #F49D37;
}

.q-operations:hover h5 {
    color: #F49D37;
}

.q-operations:hover .spoke-icon {
    border-color: #F49D37;
    box-shadow: 0 0 15px rgba(244, 157, 55, 0.2);
}

.q-governance .spoke-icon {
    color: #7566F0;
}

.q-governance:hover h5 {
    color: #7566F0;
}

.q-governance:hover .spoke-icon {
    border-color: #7566F0;
    box-shadow: 0 0 15px rgba(117, 102, 240, 0.2);
}

.q-economics .spoke-icon {
    color: #4DA1A9;
}

.q-economics:hover h5 {
    color: #4DA1A9;
}

.q-economics:hover .spoke-icon {
    border-color: #4DA1A9;
    box-shadow: 0 0 15px rgba(77, 161, 169, 0.2);
}

.spoke-content p {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.2;
}

/* Framework Circular Diagram Adjustments */
.framework-wheel-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    perspective: 1000px;
    flex: 0 1 600px;
    max-width: 100%;
}

.framework-wheel {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
    padding: 12px;
    background: transparent;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.05), inset 0 0 50px rgba(0, 0, 0, 0.02);
}

/* Outer ring decoration */
.framework-wheel::after {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    border: 2px solid var(--border-light);
    border-radius: 50%;
    pointer-events: none;
}

.framework-wheel::before {
    content: '';
    position: absolute;
    top: -40px;
    left: -40px;
    right: -40px;
    bottom: -40px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    pointer-events: none;
}

.quadrant {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: default;
    padding: 0;
    width: 100%;
}

.quad-icon {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.quad-content {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
}

.quadrant:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Quadrant Specifics - Radii for the circle effect & Inward Position */
.q-diag-1 {
    border-radius: 300px 0 0 0;
    padding-top: 60px;
    padding-left: 60px;
}

.q-diag-2 {
    border-radius: 0 300px 0 0;
    padding-top: 60px;
    padding-right: 60px;
}

.q-diag-3 {
    border-radius: 0 0 0 300px;
    padding-bottom: 60px;
    padding-left: 60px;
}

.q-diag-4 {
    border-radius: 0 0 300px 0;
    padding-bottom: 60px;
    padding-right: 60px;
}

/* Colors & Accents - High-Contrast Boundary-to-Center Gradients */
.q-diag-1 {
    background: linear-gradient(135deg, rgba(233, 78, 93, 0.95) 0%, rgba(233, 78, 93, 0.4) 100%);
}

.q-diag-2 {
    background: linear-gradient(225deg, rgba(244, 157, 55, 0.95) 0%, rgba(244, 157, 55, 0.4) 100%);
}

.q-diag-3 {
    background: linear-gradient(45deg, rgba(117, 102, 240, 0.95) 0%, rgba(117, 102, 240, 0.4) 100%);
}

.q-diag-4 {
    background: linear-gradient(315deg, rgba(77, 161, 169, 0.95) 0%, rgba(77, 161, 169, 0.4) 100%);
}

/* Hover states - Pure Brand Dominance */
.q-diag-1:hover {
    background: linear-gradient(135deg, rgba(233, 78, 93, 1) 0%, rgba(233, 78, 93, 0.4) 100%);
}

.q-diag-2:hover {
    background: linear-gradient(225deg, rgba(244, 157, 55, 1) 0%, rgba(244, 157, 55, 0.4) 100%);
}

.q-diag-3:hover {
    background: linear-gradient(45deg, rgba(117, 102, 240, 1) 0%, rgba(117, 102, 240, 0.4) 100%);
}

.q-diag-4:hover {
    background: linear-gradient(315deg, rgba(77, 161, 169, 1) 0%, rgba(77, 161, 169, 0.4) 100%);
}

.quad-icon {
    margin-bottom: 20px;
    opacity: 0.8;
    transition: transform 0.3s ease;
}

.quadrant:hover .quad-icon {
    transform: scale(1.1);
    opacity: 1;
}

.quad-icon svg {
    color: #FFFFFF;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.quad-content h4 {
    color: #FFFFFF;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.quad-content p {
    color: #FFFFFF;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
    max-width: 160px;
    margin-left: auto;
    margin-right: auto;
}

/* Central Hub */
.wheel-hub {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    background: var(--gradient-brand);
    border-radius: 50%;
    padding: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    z-index: 20;
}

.hub-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--gradient-brand);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
}

.hub-inner::before {
    content: '✦';
    color: #FFD700;
    font-size: 1.2rem;
    position: absolute;
    top: 25px;
    animation: hub-sparkle 2s infinite ease-in-out;
}

@keyframes hub-sparkle {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

.hub-inner span {
    color: #FFFFFF;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Tablet Responsive (Landscape/Large Tablets) - Keep Ring Layout, Scale Down */
@media (max-width: 1200px) {
    .framework-main-wrapper {
        gap: 0;
        justify-content: center;
    }

    .wheel-side-items {
        display: none !important;
    }

    .framework-wheel {
        width: 100%;
        max-width: 450px;
        height: auto;
        aspect-ratio: 1 / 1;
        flex: 0 1 450px;
        margin: 0 auto;
        /* Force size constraints rather than fixed sizes */
    }

    .q-spoke {
        max-width: 220px;
    }

    .spoke-content h5 {
        font-size: 0.7rem;
    }

    .spoke-content p {
        font-size: 0.9rem;
    }
}

/* Mobile/Vertical Tablet Responsive - Stack Layout */
@media (max-width: 900px) {
    .framework-main-wrapper {
        flex-direction: column;
        gap: 40px;
    }

    .wheel-side-items {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        height: auto;
        gap: 20px;
        /* Consistent inner gap */
        padding: 0 20px;
    }

    .wheel-side-items.left {
        align-items: center;
        order: 1;
        /* Wheel in middle is default order 0? No, standard flow left-wheel-right. 
                   If col, left is top. */
    }

    .wheel-side-items.right {
        align-items: center;
    }

    /* Ensure Wheel is in middle visually if needed, but in DOM it is 2nd child. */
    /* Wrapper is col: 1(left), 2(wheel), 3(right). Correct. */

    .wheel-side-items.left .q-spoke,
    .wheel-side-items.right .q-spoke {
        /* Keep them row-oriented for better density */
        text-align: left;
        flex-direction: row;
        width: auto;
        max-width: 100%;
        flex: 1 1 300px;
        /* Grow to fill line */
        justify-content: flex-start;
        background: rgba(255, 255, 255, 0.5);
        /* subtle backdrop */
        padding: 12px;
        border-radius: 12px;
    }

    /* Accessing specific adjustments for RTL if needed, but we force LTR now */
    .wheel-side-items.right .q-spoke {
        flex-direction: row;
        /* reset reversal */
        text-align: left;
    }

    .framework-wheel-container {
        padding: 0;
        flex: 0 0 auto;
        margin: 20px 0;
    }
}

@media (max-width: 1200px) {
    .framework-wheel {
        width: 100%;
        max-width: 450px;
        height: auto;
        aspect-ratio: 1 / 1;
        grid-template-columns: 1fr 1fr;
    }

    .quad-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 0 10px;
    }

    .quad-content h4 {
        font-size: 1rem;
        margin-bottom: 4px;
        width: 100%;
    }

    .quad-content p {
        font-size: 0.8rem;
        line-height: 1.3;
        max-width: 140px;
        /* Constrain width to prevent awkward wrapping */
        margin: 0 auto;
    }

    .wheel-hub {
        width: 100px;
        height: 100px;
    }

    .hub-inner span {
        font-size: 1.8rem;
    }

    .quad-icon {
        margin-bottom: 8px;
    }

    .quad-icon svg {
        width: 28px;
        height: 28px;
    }

    /* Move text closer to outside edge by reducing inward padding */
    .q-diag-1 {
        padding-top: 30px;
        padding-left: 30px;
    }

    .q-diag-2 {
        padding-top: 30px;
        padding-right: 30px;
    }

    .q-diag-3 {
        padding-bottom: 30px;
        padding-left: 30px;
    }

    .q-diag-4 {
        padding-bottom: 30px;
        padding-right: 30px;
    }
}

@media (max-width: 480px) {
    .framework-main-wrapper {
        display: block;
        padding: 12px;
    }

    .framework-wheel {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, auto);
        width: 100%;
        max-width: 100%;
        height: auto;
        aspect-ratio: auto;
        border-radius: 0;
        padding: 0;
        gap: 12px;
        box-shadow: none;
    }

    .q-diag-1,
    .q-diag-2,
    .q-diag-3,
    .q-diag-4 {
        border-radius: 16px;
        padding: 32px 24px;
    }

    .wheel-hub {
        display: none;
    }

    /* Remove ring border artifacts on mobile stack */
    .framework-wheel::before,
    .framework-wheel::after {
        display: none;
    }
}

/* Shoulder Draft - Framework Section (DISABLED) */
.framework-section.bg-sketch-vitruvian::before {
    display: none;
    /* Temporarily hidden */
    background-image: url('../assets/images/shoulder_draft.png');
    background-position: center center;
    background-size: 85%;
    opacity: 0.08;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* =========================================
   Vertical Timeline — Editorial Showcase
   ========================================= */

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 80px auto 60px;
    padding: 40px 0;
}

/* Faint dashed track behind the growing line */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: repeating-linear-gradient(
        to bottom,
        rgba(15, 118, 110, 0.1) 0px,
        rgba(15, 118, 110, 0.1) 6px,
        transparent 6px,
        transparent 14px
    );
    transform: translateX(-50%);
    border-radius: 2px;
    z-index: 0;
}

/* Central vertical line — grows on scroll via JS */
.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 0;
    background: linear-gradient(to bottom, #0F766E, #3B82F6);
    transform: translateX(-50%);
    z-index: 0;
    border-radius: 2px;
    box-shadow: 0 0 6px rgba(15, 118, 110, 0.3),
                0 0 16px rgba(15, 118, 110, 0.1);
}

/* Glowing tip at the leading edge */
.timeline-line::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle, #2DD4BF 0%, rgba(0, 210, 190, 0) 70%);
    box-shadow: 0 0 8px rgba(0, 210, 190, 0.7),
                0 0 24px rgba(0, 210, 190, 0.3);
    animation: tip-pulse 1.5s ease-in-out infinite;
}

@keyframes tip-pulse {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.7; }
    50% { transform: translateX(-50%) scale(1.5); opacity: 1; }
}

/* ---- Each timeline row: full-width 3-column grid ---- */
.timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    align-items: center;
    gap: 0;
    margin-bottom: 64px;
    opacity: 0;
    width: 100%;
    z-index: 2;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-item:last-child {
    margin-bottom: 0;
}

/* Left items: image on left, text on right — enter from left */
.timeline-item.timeline-left {
    transform: translateX(-40px);
}

.timeline-item.timeline-left .timeline-visual {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
}

.timeline-item.timeline-left .timeline-dot {
    grid-column: 2;
    grid-row: 1;
}

.timeline-item.timeline-left .timeline-content {
    grid-column: 3;
    grid-row: 1;
    justify-self: start;
    text-align: left;
    padding-left: 24px;
}

/* Right items: image on right, text on left — enter from right */
.timeline-item.timeline-right {
    transform: translateX(40px);
}

.timeline-item.timeline-right .timeline-visual {
    grid-column: 3;
    grid-row: 1;
    justify-self: start;
}

.timeline-item.timeline-right .timeline-dot {
    grid-column: 2;
    grid-row: 1;
}

.timeline-item.timeline-right .timeline-content {
    grid-column: 1;
    grid-row: 1;
    justify-self: end;
    text-align: right;
    padding-right: 24px;
}

/* Visible state (triggered by scroll) */
.timeline-item.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* ---- The image panel — the hero ---- */
.timeline-visual {
    position: relative;
    max-width: 520px;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    background: #FFFFFF;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.06),
                0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(226, 232, 240, 0.6);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-visual img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-item:hover .timeline-visual {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1),
                0 4px 12px rgba(0, 0, 0, 0.06);
}

.timeline-item:hover .timeline-visual img {
    transform: scale(1.02);
}

/* Colored accent line at the bottom of each image */
.timeline-visual::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.timeline-item:hover .timeline-visual::after {
    opacity: 1;
}

.step-1 .timeline-visual::after,
.step-2 .timeline-visual::after {
    background: linear-gradient(90deg, #E94E5D, #f0828c);
}

.step-3 .timeline-visual::after,
.step-4 .timeline-visual::after {
    background: linear-gradient(90deg, #F49D37, #f7be72);
}

.step-5 .timeline-visual::after {
    background: linear-gradient(90deg, #4DA1A9, #7cc0c6);
}

.step-6 .timeline-visual::after,
.step-7 .timeline-visual::after {
    background: linear-gradient(90deg, #7566F0, #a094f5);
}

/* ---- The dot on the center line ---- */
.timeline-dot {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 2px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    justify-self: center;
    z-index: 3;
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.4s ease,
                transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 0 0 5px var(--bg-light, #f8fafc),
                0 2px 8px rgba(0, 0, 0, 0.06);
}

.timeline-item.is-visible .timeline-dot {
    opacity: 1;
    transform: scale(1);
    animation: dot-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes dot-pop {
    0% { transform: scale(0); }
    60% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.12);
}

/* ---- The text content panel ---- */
.timeline-content {
    position: relative;
    padding: 20px 0;
    max-width: 380px;
    width: 100%;
}

.timeline-number {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.04em;
    color: #FFFFFF;
    padding: 8px 16px;
    border-radius: 10px;
    margin-bottom: 12px;
    position: relative;
}

.timeline-content strong {
    display: block;
    font-size: 1.15rem;
    line-height: 1.35;
    color: var(--text-primary);
    margin-bottom: 10px;
    font-weight: 700;
    position: relative;
}

.timeline-label {
    display: inline-block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 100px;
    position: relative;
}

.timeline-desc {
    margin-top: 14px;
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--text-secondary);
    position: relative;
}

/* Category colors for dots, labels, and accents */
.step-1 .timeline-dot,
.step-2 .timeline-dot {
    color: #E94E5D;
}
.step-1:hover .timeline-dot,
.step-2:hover .timeline-dot {
    border-color: #E94E5D;
    box-shadow: 0 0 0 5px rgba(233, 78, 93, 0.08),
                0 0 20px rgba(233, 78, 93, 0.15);
}
.step-1 .timeline-label,
.step-2 .timeline-label {
    color: #E94E5D;
    background: rgba(233, 78, 93, 0.08);
}
.step-1 .timeline-number,
.step-2 .timeline-number {
    background: #E94E5D;
}

.step-3 .timeline-dot,
.step-4 .timeline-dot {
    color: #F49D37;
}
.step-3:hover .timeline-dot,
.step-4:hover .timeline-dot {
    border-color: #F49D37;
    box-shadow: 0 0 0 5px rgba(244, 157, 55, 0.08),
                0 0 20px rgba(244, 157, 55, 0.15);
}
.step-3 .timeline-label,
.step-4 .timeline-label {
    color: #F49D37;
    background: rgba(244, 157, 55, 0.08);
}
.step-3 .timeline-number,
.step-4 .timeline-number {
    background: #F49D37;
}

.step-5 .timeline-dot {
    color: #4DA1A9;
}
.step-5:hover .timeline-dot {
    border-color: #4DA1A9;
    box-shadow: 0 0 0 5px rgba(77, 161, 169, 0.08),
                0 0 20px rgba(77, 161, 169, 0.15);
}
.step-5 .timeline-label {
    color: #4DA1A9;
    background: rgba(77, 161, 169, 0.08);
}
.step-5 .timeline-number {
    background: #4DA1A9;
}

.step-6 .timeline-dot,
.step-7 .timeline-dot {
    color: #7566F0;
}
.step-6:hover .timeline-dot,
.step-7:hover .timeline-dot {
    border-color: #7566F0;
    box-shadow: 0 0 0 5px rgba(117, 102, 240, 0.08),
                0 0 20px rgba(117, 102, 240, 0.15);
}
.step-6 .timeline-label,
.step-7 .timeline-label {
    color: #7566F0;
    background: rgba(117, 102, 240, 0.08);
}
.step-6 .timeline-number,
.step-7 .timeline-number {
    background: #7566F0;
}

/* ---- Tablet: narrower grid, smaller images ---- */
@media (max-width: 1024px) {
    .timeline {
        max-width: 100%;
        padding: 30px 8px;
    }

    .timeline-item {
        grid-template-columns: 1fr 60px 1fr;
        margin-bottom: 48px;
    }

    .timeline-visual {
        max-width: 400px;
        border-radius: 16px;
    }

    .timeline-number {
        font-size: 1rem;
    }

    .timeline-content strong {
        font-size: 1rem;
    }
}

/* ---- Mobile: single column, stacked layout ---- */
@media (max-width: 768px) {
    .timeline {
        padding: 20px 0;
        margin: 40px auto 30px;
    }

    .timeline::before,
    .timeline-line {
        display: none;
    }

    .timeline-item,
    .timeline-item.timeline-left,
    .timeline-item.timeline-right {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 0;
        margin-bottom: 40px;
    }

    .timeline-item.timeline-left,
    .timeline-item.timeline-right {
        transform: translateY(30px);
    }

    .timeline-item.is-visible {
        transform: translateY(0);
    }

    /* Reorder: dot first, then image, then text */
    .timeline-item.timeline-left .timeline-dot,
    .timeline-item.timeline-right .timeline-dot {
        grid-column: unset;
        grid-row: unset;
        order: 1;
        margin-bottom: 20px;
    }

    .timeline-item.timeline-left .timeline-visual,
    .timeline-item.timeline-right .timeline-visual {
        grid-column: unset;
        grid-row: unset;
        order: 2;
        max-width: 100%;
        justify-self: center;
        border-radius: 16px;
        position: relative;
        z-index: 2;
    }

    .timeline-item.timeline-left .timeline-content,
    .timeline-item.timeline-right .timeline-content {
        grid-column: unset;
        grid-row: unset;
        order: 3;
        text-align: center;
        justify-self: center;
        padding: 20px 16px 0;
        max-width: 100%;
    }

    .timeline-item.timeline-right .timeline-content {
        text-align: center;
        padding-right: 16px;
    }

    .timeline-number {
        font-size: 1rem;
    }

    .timeline-content strong {
        font-size: 1.05rem;
    }
}

/* =========================================
   Image Lightbox
   ========================================= */

/* Zoom hint overlay on timeline images */
.timeline-visual {
    cursor: zoom-in;
}

.timeline-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    border-radius: 20px;
    transition: background 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.timeline-visual .zoom-hint {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.timeline-visual .zoom-hint svg {
    width: 18px;
    height: 18px;
    color: var(--text-primary, #1a1a1a);
}

.timeline-visual:hover::before {
    background: rgba(0, 0, 0, 0.06);
}

.timeline-visual:hover .zoom-hint {
    opacity: 1;
    transform: scale(1);
}

/* On mobile/touch: always show a subtle hint */
@media (max-width: 768px) {
    .timeline-visual .zoom-hint {
        opacity: 0.6;
        transform: scale(0.85);
        width: 30px;
        height: 30px;
    }

    .timeline-visual .zoom-hint svg {
        width: 15px;
        height: 15px;
    }
}

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    cursor: zoom-out;
}

.image-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.image-lightbox img {
    max-width: 85vw;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transform: scale(0.92);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 28px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    z-index: 1;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-close:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

