/* --- Life At Gallery Grid --- */
.life-at {
    padding: 80px 0;
}

.life-at-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(260px, 1fr));
    gap: 21px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.life-at-grid .gallery-item:nth-child(1) {
    grid-row: span 2;
}

.life-at-grid .gallery-item:nth-child(2) {
    grid-row: span 1.5;
}

.life-at-grid .gallery-item:nth-child(6) {
    grid-column: span 3;
    grid-row: span 2;
}

.gallery-item {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-content {
    position: absolute;
    bottom: 0;
    padding: 24px 32px;
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}

.gallery-text {
    text-align: left;
    color: var(--ibdic-white);
}

.gallery-text h2 {
    font-weight: 600;
    font-size: 20px;
}

.gallery-text large h2 {
    font-weight: 600;
    font-size: 32px;
}

.gallery-text p {
    font-weight: 400;
    font-size: 16px;
}

.life-at-swiper {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.life-at-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.swiper-slide {
    background: none;
}

.life-at-swiper .gallery-content {
    z-index: 5;
    pointer-events: none;
}

/* --- Job Openings --- */
.job {
    margin-top: 100px;
}

.openings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
}

.openings-header h2 {
    font-weight: 500;
    font-size: 44px;
    color: var(--ibdic-blue-1);
}

.search-container {
    position: relative;
    width: 300px;
}

.search-container input {
    width: 100%;
    padding: 15px 26px;
    border-radius: 25px;
    border: 1px solid #ddd;
    background-color: #f5f5f5;
}

.search-container img {
    position: absolute;
    right: 26px;
    top: 13px;
    background: #f5f5f5;
    padding-left: 8px;
}

/* Updated Job Item Styles */
.job-item {
    padding: 32px 0;
    border-top: 1px solid #e0e0e0;
}

.job-item:first-child {
    border-top: none;
}

.job-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Top Row - Title and Button side by side */
.job-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

/* Title section (left side) */
.job-title-section {
    flex: 1;
}

.job-title-section h3 {
    color: var(--ibdic-blue-1);
    font-weight: 700;
    font-size: 24px;
    margin-bottom: 6px;
}

.job-meta {
    font-size: 14px;
    color: rgba(43, 43, 43, 1);
    margin-bottom: 0;
    font-weight: 400;
}

/* Button section (right side) */
.job-button-section {
    flex-shrink: 0;
    margin-top: 0;
}

.know-more-btn {
    background-color: #1d6dd0;
    color: white;
    padding: 12px 32px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s;
    white-space: nowrap;
    display: inline-block;
}

.know-more-btn:hover {
    background-color: #155bb5;
}

/* Bottom Row - Description */
.job-bottom-row {
    width: 100%;
}

.job-desc {
    color: rgba(112, 111, 110, 1);
    font-weight: 400;
    font-size: 14px;
    line-height: 1.6;
}

.short-desc,
.full-desc {
    display: inline;
}

.read-more-btn {
    background: none;
    border: none;
    color: #1d6dd0;
    cursor: pointer;
    font-weight: 600;
    margin-left: 5px;
    padding: 0;
}

.read-more-btn:hover {
    text-decoration: underline;
}

/* --- Podcast Section --- */
.podcast {
    padding: 80px 0;
}

.podcast-slide-wrapper {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.podcast-content {
    display: flex;
    color: var(--ibdic-blue-1);
}

.podcast-content .left {
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    width: 100%;
    max-width: 500px;
}

.podcast-content .top p {
    font-weight: 400;
    font-size: 16px;
    line-height: 28px;
}


.podcast-swiper {
    overflow: visible !important;
}

.podcast-slide {
    position: relative;
    max-height: 412px;
    ;
    overflow: hidden;
    border-radius: 20px;

}

.podcast-slide img {
    border-radius: 20px;
    width: 100%;
    object-fit: cover;
    object-position: center;
}

.value-card__gif lottie-player {
    mix-blend-mode: soft-light;
}

.seven-last {
    width: 100%;
}

.second-value-grid {
    margin-top: 10px;
}

.value-card--medium.seven-last .value-card__content {
    max-width: 60%;
}

.digital-section {
    background: #fff;
    padding: 100px 0 60px;
}

.digital-cards-stack {
    position: relative;
    max-width: 100%;
    margin: 0 auto;

}

/* THE STACKING TRICK */
.d-scene {
    /* position: sticky;
    top: calc(80px + var(--index) * 64px); */
    margin-bottom: 16px;
}

.d-card {
    background: #1A3A9C;
    border-radius: 16px;
    padding: 28px 32px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 32px;
    transition: padding 0.3s ease;
}

.d-letter {
    font-size: 90px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.12);
    line-height: 1;
    flex-shrink: 0;
    width: 120px;
    text-align: center;
    margin-top: -10px;
    user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.d-letter img {
    mix-blend-mode: luminosity;
    width: 100%;
}

.d-body {
    max-width: 900px;
}

.d-body h3 {
    font-size: 20px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 10px;
}

.d-desc {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.7;
    overflow: hidden;
    margin-top: 0;
}

/* collapsed state when stacked */
/* .d-scene.collapsed .d-desc {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.d-scene.collapsed .d-card {
    padding: 18px 32px;
} */



.digital-section{
    overflow: clip;
}

.stack {
    /* enough padding so first card starts with space */
    padding: 80px 1.5rem 0px;
    /* stacking context so z-index works across siblings */
    isolation: isolate;
}

.card {
    position: sticky;
    max-width: 780px;
    width: 100%;
    margin: 0 auto;
    margin-top: 40px;
    height: 190px;
    border-radius: 22px;
    overflow: hidden;
    border: 1.5px solid rgba(255, 255, 255, 0.13);
    background: #0e26a0;

    will-change: transform;
}

/* first card needs no top margin */
.card:first-child {
    margin-top: 0;
}

/* individual indices and colors */
.card:nth-child(1) {
   top: 6.5rem;
   margin-bottom: 24rem; 
   background: #0A40A1;
}

.card:nth-child(2) {
   top: 10.5rem;
   margin-bottom: 20rem; 
   background: #093D99;
}

.card:nth-child(3) {
    top: 14.5rem;
   margin-bottom: 16rem; 
   background: #093A91;
}

.card:nth-child(4) {
   top: 18.5rem;
   margin-bottom: 12rem; 
   background: #083689;
}

.card:nth-child(5) {
   top: 22.5rem;
   margin-bottom: 8rem; 
   background: #083381;
}

.card:nth-child(6) {
    top: 26.5rem;
    margin-bottom: 4rem; 
    background: #072F79;
}

.card:nth-child(7) {
    top: 30.5rem;
    background: #072C71;
}

/* scroll-driven: scale down as card exits upward */
@supports (animation-timeline: scroll()) {
    .card {
        animation: shrink linear both;
        animation-timeline: view();
        animation-range: exit-crossing 0% exit-crossing 100%;
    }

    @keyframes shrink {
        to {
            transform: scale(calc(1 - 0.022 * var(--i)));
            filter: brightness(calc(1 - 0.08 * var(--i)));
        }
    }
}

/* shimmer */
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* CARD LAYOUT */
.card-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    padding: 1.5rem 2.5rem 1.75rem;
    display: flex;
    flex-direction: column;
}

/* header row — exactly --peek tall so it always peeks above the stacked card */
.card-header {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    height: var(--peek);
    flex-shrink: 0;
}

.card-letter {
    font-size: 1.9rem;
    font-weight: 900;
    line-height: 1;
    color: rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    width: 28px;
    letter-spacing: -0.03em;
    text-align: center;
}

.card-title {
    font-size: clamp(1.15rem, 2.5vw, 1.5rem);
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

.card-body {
    flex: 1;
    padding-top: 1rem;
    padding-left: calc(28px + 0.9rem);
    position: relative;
    overflow: hidden;
}

/* giant ghost letter */
.card-body::after {
    /* content: attr(data-l); */
    position: absolute;
    right: -1rem;
    bottom: -1.5rem;
    font-size: 180px;
    font-weight: 900;
    line-height: 1;
    color: rgba(255, 255, 255, 0.05);
    letter-spacing: -0.05em;
    pointer-events: none;
    user-select: none;
}

.card-desc {
    font-size: 14.5px;
    line-height: 1.72;
    color: rgba(255, 255, 255, 0.65);
    max-width: 480px;
    position: relative;
    z-index: 1;
}

/* OUTRO */
.outro {
    background: #0d1f6e;
    text-align: center;
    padding: 5rem 2rem;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
}

.outro strong {
    display: block;
    font-size: 26px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.2em;
    margin-bottom: 0.4rem;
}

@media (prefers-reduced-motion: reduce) {
    .card {
        animation: none !important;
    }

    .scroll-hint {
        animation: none;
    }
}

@media (max-width: 600px) {
    .stack {
        padding: 48px 1rem 160px;
    }

    .card {
        height: 260px;
        margin-top: 28px;
        --peek: 52px;
    }

    .card-inner {
        padding: 1.2rem 1.4rem 1.5rem;
    }

    .card-title {
        font-size: 1.05rem;
    }

    .card-desc {
        font-size: 13px;
    }

    .card-letter {
        font-size: 1.5rem;
        width: 24px;
    }

    .card-body {
        padding-left: calc(24px + 0.75rem);
    }

    .card-body::after {
        font-size: 120px;
    }
}



@media (max-width: 768px) {
    section {
        padding: 40px 0;
    }

    /* Podcast Mobile */
    .podcast-slide {
        display: flex;
        gap: 28px;
        position: relative;
        min-height: 512px;
        border-radius: 10px;
        overflow: hidden;
    }

    .podcast-slide img {
        height: auto;
    }

    .podcast-content .left {
        gap: 20px;
    }

    .podcast-content .right {
        margin-left: -34px;
    }

    .podcast-content .right img {
        width: 40px;
    }

    .d-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 20px;
    }

    .d-letter {
        font-size: 60px;
        width: 100%;
        margin-top: -5px;
    }

    .d-body h3 {
        font-size: 18px;
    }

    .d-desc {
        font-size: 14px;
    }

    /* Jobs Mobile - UPDATED with new structure */
    .openings-header {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        gap: 24px;
        align-items: flex-start;
    }

    .openings-header h2 {
        font-size: 28px;
    }

    .search-container {
        width: 100%;
    }

    .job-item {
        padding: 24px 0;
    }

    .job-top-row {
        flex-direction: column;
        gap: 16px;
    }

    .job-button-section {
        align-self: flex-start;
    }

    .know-more-btn {
        padding: 10px 24px;
        white-space: normal;
        text-align: center;
        font-size: 12px;
    }

    .job-title-section h3 {
        font-size: 20px;
        font-weight: 600;
    }

    .job-meta {
        font-size: 12px;
        margin-bottom: 0;
    }

    .life-at-grid .gallery-item:nth-child(4) {
        grid-column: span 2;
    }

    .life-at-grid .gallery-item:nth-child(6) {
        grid-column: span 2;
        grid-row: span 1;
    }

    .life-at-grid {
        grid-auto-rows: 220px;
        gap: 16px;
        margin: 0px -24px;
        padding: 0px 24px
    }

    .gallery-content {
        height: 100%;
    }

    .gallery-text {
        align-self: flex-end;
    }

    .second-value-grid {
        display: flex;
    }

    .value-card {
        flex: calc(50% - 8px);
    }

    .playbutton {
        align-self: flex-start;
    }

    .gallery-text h2 {
        font-weight: 600;
        font-size: 16px;
    }

    .gallery-text p {
        font-weight: 400;
        font-size: 14px;
        letter-spacing: 0%;
    }

    .gallery-content {
        padding: 16px;
    }

    .playbutton img {
        width: 54px;
        height: 54px;
    }
}