/* OGCF Approach V2 – Row-based timeline with scroll-driven pinning */

/* Tall wrapper – sits in normal page flow */
.ogcf-approach-v2 {
    /* min-height set dynamically by JS based on row heights */
    position: relative;
}

.ogcf-approach-v2__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.ogcf-approach-v2__inner {
    height: 100%;
    position: relative;
    overflow: hidden;
    padding: 0;
}

/* ----------------------------------------------------------------
 *  Timeline line – positioned behind the rows,
 *  runs through the center of the dot column
 * ---------------------------------------------------------------- */
.ogcf-approach-v2__line {
    position: absolute;
    /* Align with the dot column center: image (45%) + half of dot-cell (5%) = 50% roughly */
    left: calc(40% + 6%);
    top: 0;
    bottom: 0;
    width: 3px;
    transform: translateX(-50%);
    z-index: -1;
    /* Taper: fade out at top and bottom */
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #fff 10%, #fff 90%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #fff 10%, #fff 90%, transparent 100%);
}

.ogcf-approach-v2__line-bg {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #dadad9;
}

.ogcf-approach-v2__line-fill {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #c8af6a;
    transform-origin: top;
    transform: scaleY(0);
}

/* ----------------------------------------------------------------
 *  Rows container – scrolls vertically inside sticky
 * ---------------------------------------------------------------- */
.ogcf-approach-v2__rows {
    display: flex;
    flex-direction: column;
    width: 100%;
    will-change: transform;
    position: relative;
    z-index: 1;
}

/* Each row: image | dot | description */
.ogcf-approach-v2__row {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 24px 0;
}

.ogcf-approach-v2__row .ogcf-approach-v2__image-card,
.ogcf-approach-v2__row .ogcf-approach-v2__desc {
    opacity: 0.4;
    transition: opacity 0.6s ease;
}

/* Image card – left side */
.ogcf-approach-v2__image-card {
    width: 40%;
    flex-shrink: 0;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.ogcf-approach-v2__image-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ogcf-approach-v2__image-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), rgba(0,0,0,0.3) 60%, transparent);
    padding: 16px;
}

.ogcf-approach-v2__step-title {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #fff;
}

/* Dot cell – center column */
.ogcf-approach-v2__dot-cell {
    width: 12%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.ogcf-approach-v2__dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 16px solid #1E1E1D;
    box-sizing: content-box;
    background-color: #B6B5B3;
    transition: all 0.5s ease;
    flex-shrink: 0;
    position: relative;
    z-index: 3;
}

/* Description – right side */
.ogcf-approach-v2__desc {
    flex: 1;
    padding-left: 16px;
}

.ogcf-approach-v2__desc-text {
    font-size: 32px;
    font-weight: 600;
    line-height: 120%;
    letter-spacing: 0;
    text-transform: uppercase;
    color: #fff;
    text-align: left;
}

/* ----------------------------------------------------------------
 *  Admin bar offset
 * ---------------------------------------------------------------- */
.admin-bar .ogcf-approach-v2__sticky {
    top: 32px;
    height: calc(100vh - 32px);
}

@media (max-width: 782px) {
    .admin-bar .ogcf-approach-v2__sticky {
        top: 46px;
        height: calc(100vh - 46px);
    }
}

/* ----------------------------------------------------------------
 *  Responsive
 * ---------------------------------------------------------------- */
@media (max-width: 1024px) {
    .ogcf-approach-v2__image-card {
        width: 40%;
    }
    .ogcf-approach-v2__dot-cell {
        width: 60px;
    }
    .ogcf-approach-v2__step-title {
        font-size: 28px;
    }
    .ogcf-approach-v2__desc-text {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    /* Switch to 2-column grid: dot on left, desc+image stacked on right */
    .ogcf-approach-v2__row {
        display: grid;
        grid-template-columns: 40px 1fr;
        grid-template-rows: auto auto;
        gap: 0 12px;
        padding: 16px 0;
    }

    /* Dot cell spans both rows on the left */
    .ogcf-approach-v2__dot-cell {
        grid-column: 1;
        grid-row: 1 / 3;
        width: auto;
        align-self: start;
        padding-top: 4px;
    }

    /* Description on top-right */
    .ogcf-approach-v2__desc {
        grid-column: 2;
        grid-row: 1;
        padding-left: 0;
    }

    /* Image on bottom-right */
    .ogcf-approach-v2__image-card {
        grid-column: 2;
        grid-row: 2;
        width: 100%;
        margin-top: 12px;
    }

    /* Timeline line moves to left column center */
    .ogcf-approach-v2__line {
        left: 20px;
    }

    .ogcf-approach-v2__step-title {
        font-size: 20px;
    }
    .ogcf-approach-v2__desc-text {
        font-size: 14px;
    }
}
