/* OGCF Services Cards – Scroll-driven pinning */

/* Tall wrapper – sits in normal page flow, creates scroll distance */
.ogcf-services {
    /* min-height set via inline style based on card count */
    background-color: #181818;
    position: relative;
}

/* Sticky inner – pins while user scrolls through the tall wrapper */
.ogcf-services__sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 40px 64px;
}

/* Cards stack area */
.ogcf-services__stack {
    position: relative;
    flex: 1;
    counter-reset: ogcf-card;
}

.ogcf-services__card {
    position: absolute;
    top: 0;
    will-change: transform;
    counter-increment: ogcf-card;
}

.ogcf-services__card-inner {
    border: 4px solid #181817;
    border-radius: 16px;
    padding: 40px;
    display: flex;
    gap: 24px;
    height: 511px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
}

/* Blurred background image */
.ogcf-services__card-bg {
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background-size: cover;
    background-position: center;
    filter: blur(19px);
    z-index: 0;
}

.ogcf-services__card-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
}

.ogcf-services__card-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.ogcf-services__card-title {
    color: #1e1e1d;
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
    max-width: 596px;
}

.ogcf-services__card-bottom {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ogcf-services__card-desc {
    color: #1e1e1d;
    font-size: 32px;
    font-weight: 500;
    line-height: 1.2;
    max-width: 755px;
}

.ogcf-services__card-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 16px 20px;
    background-color: #474747;
    border-radius: 16px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    align-self: flex-start;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.ogcf-services__btn-icon {
    width: 24px;
    height: 24px;
}

/* Card image area */
.ogcf-services__card-image {
    position: relative;
    width: 447px;
    flex-shrink: 0;
    border-radius: 30px;
    overflow: hidden;
    z-index: 1;
}

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

.ogcf-services__card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.26);
}

/* Glassmorphism number badge — auto-numbered via CSS counter */
.ogcf-services__card-number {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 72px;
    font-weight: 700;
    color: #181817;
    letter-spacing: -0.01em;
    line-height: 1.2;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.63);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-left-radius: 30px;
    border-top-right-radius: 30px;
    z-index: 2;
}

.ogcf-services__card-number::before {
    content: counter(ogcf-card, decimal-leading-zero);
}

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

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

/* Responsive */
@media (max-width: 1024px) {
    .ogcf-services__sticky {
        padding: 40px;
    }
    .ogcf-services__card-inner {
        padding: 24px;
    }
    .ogcf-services__card-title {
        font-size: 36px;
    }
    .ogcf-services__card-desc {
        font-size: 24px;
    }
    .ogcf-services__card-image {
        width: 350px;
    }
    .ogcf-services__card-number {
        font-size: 54px;
    }
}

@media (max-width: 768px) {
    .ogcf-services__sticky {
        padding: 24px 20px;
    }

    /* Stack card vertically: title → image → desc → button */
    .ogcf-services__card-inner {
        flex-direction: column;
        height: auto;
        padding: 20px;
        gap: 16px;
    }

    /* Flatten card-content so its children participate in card-inner flex */
    .ogcf-services__card-content {
        display: contents;
    }

    /* When card-content is display:contents, children lose z-index/position.
       Re-apply so they render above the blurred background overlay. */
    .ogcf-services__card-title,
    .ogcf-services__card-bottom {
        position: relative;
        z-index: 1;
    }

    /* Order: title first */
    .ogcf-services__card-title {
        order: 1;
        font-size: 24px;
        max-width: none;
    }

    /* Image second, full width */
    .ogcf-services__card-image {
        order: 2;
        width: 100%;
        aspect-ratio: 16 / 9;
        border-radius: 16px;
    }

    /* Desc + button third */
    .ogcf-services__card-bottom {
        order: 3;
        gap: 16px;
    }

    .ogcf-services__card-desc {
        font-size: 16px;
        max-width: none;
    }

    /* Button full width */
    .ogcf-services__card-btn {
        font-size: 12px;
        padding: 10px 16px;
        align-self: stretch;
        justify-content: center;
    }

    .ogcf-services__card-number {
        font-size: 36px;
        padding: 8px 12px;
        border-bottom-left-radius: 16px;
        border-top-right-radius: 16px;
    }
}
