/* BII Learning programme gallery — follows the existing editorial visual system */
.gallery-hero {
    position: relative;
    min-height: 570px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #242923;
    color: #F7F3EC
}

.gallery-hero-image,
.gallery-hero-overlay {
    position: absolute;
    inset: 0
}

.gallery-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    opacity: .72
}

.gallery-hero-overlay {
    background: linear-gradient(90deg, rgba(25, 31, 27, .88) 0%, rgba(25, 31, 27, .58) 54%, rgba(25, 31, 27, .25) 100%);
    z-index: 1
}

.gallery-hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    padding-top: 150px;
    padding-bottom: 82px
}

.gallery-hero-content {
    max-width: 760px
}

.gallery-breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    letter-spacing: .16em;
    margin-bottom: 25px;
    color: rgba(247, 243, 236, .8)
}

.gallery-breadcrumb i {
    font-style: normal;
    color: #C96B5C
}

.gallery-hero-line {
    width: 62px;
    height: 2px;
    background: #C96B5C;
    margin-bottom: 24px
}

.gallery-eyebrow {
    font-size: 11px;
    letter-spacing: .17em;
    text-transform: uppercase;
    color: #C96B5C;
    font-weight: 600;
    margin: 0 0 15px
}

.gallery-hero h1 {
    font-size: clamp(48px, 7.3vw, 96px);
    line-height: .94;
    letter-spacing: -.055em;
    font-weight: 500;
    margin: 0 0 25px;
    color: #fcf9f9;
}

.gallery-hero h1 span {
    color: #C96B5C
}

.gallery-hero-content>p:last-child {
    max-width: 490px;
    line-height: 1.75;
    font-size: 16px;
    color: rgba(247, 243, 236, .82);
    margin: 0
}

.gallery-hero-side {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 10px;
    letter-spacing: .2em;
    color: rgba(247, 243, 236, .72);
    padding-bottom: 8px;
    white-space: nowrap
}

.programme-gallery-section {
    padding: 100px 0 115px;
    background: #F7F3EC;
    color: #2F2F2F
}

.gallery-heading {
    display: grid;
    grid-template-columns: 70px 1fr minmax(220px, 360px);
    align-items: end;
    gap: 24px;
    margin-bottom: 52px
}

.gallery-section-number {
    display: flex;
    align-items: center;
    gap: 12px;
    align-self: start;
    font-size: 12px;
    color: #C96B5C
}

.gallery-section-number i {
    display: block;
    width: 34px;
    height: 1px;
    background: #C96B5C
}

.gallery-heading h2 {
    font-size: clamp(34px, 4.2vw, 56px);
    line-height: 1.06;
    letter-spacing: -.045em;
    font-weight: 500;
    margin: 0
}

.gallery-heading h2 span {
    color: #C96B5C
}

.gallery-intro {
    font-size: 14px;
    line-height: 1.8;
    color: #686861;
    margin: 0;
    max-width: 350px
}

.programme-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px
}

.programme-gallery-card {
    position: relative;
    display: block;
    padding: 0;
    border: 0;
    background: #e5ded3;
    overflow: hidden;
    cursor: zoom-in;
    text-align: left;
    aspect-ratio: 1.22/1;
    border-radius: 2px
}

.programme-gallery-card:nth-child(4n+2),
.programme-gallery-card:nth-child(4n+3) {
    aspect-ratio: 1/1.05
}

.programme-gallery-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s cubic-bezier(.2, .7, .2, 1), filter .5s
}

.programme-gallery-card:hover img,
.programme-gallery-card:focus-visible img {
    transform: scale(1.055);
    filter: saturate(.88)
}

.gallery-card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    padding: 22px;
    color: #fff;
    background: linear-gradient(180deg, transparent 35%, rgba(20, 25, 21, .78) 100%);
    opacity: .94;
    transition: opacity .3s
}

.gallery-card-overlay span {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: .01em
}

.gallery-card-overlay b {
    font-size: 22px;
    font-weight: 400;
    color: #C96B5C;
    transition: transform .3s
}

.programme-gallery-card:hover .gallery-card-overlay b {
    transform: translate(3px, -3px)
}

.programme-gallery-card:focus-visible {
    outline: 2px solid #C96B5C;
    outline-offset: 4px
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 60px 70px;
    background: rgba(24, 27, 24, .94);
    backdrop-filter: blur(8px)
}

.gallery-lightbox.is-open {
    display: flex
}

.gallery-lightbox figure {
    margin: 0;
    max-width: min(1100px, 86vw);
    max-height: 82vh;
    text-align: center
}

.gallery-lightbox figure img {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: auto;
    box-shadow: 0 20px 70px rgba(0, 0, 0, .3)
}

.gallery-lightbox figcaption {
    color: #F7F3EC;
    font-size: 13px;
    letter-spacing: .03em;
    margin-top: 16px
}

.gallery-lightbox button {
    position: absolute;
    border: 0;
    background: transparent;
    color: #F7F3EC;
    cursor: pointer;
    line-height: 1;
    transition: color .2s
}

.gallery-lightbox button:hover {
    color: #E6A294
}

.gallery-lightbox-close {
    right: 28px;
    top: 22px;
    font-size: 42px
}

.gallery-lightbox-prev,
.gallery-lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 58px;
    padding: 10px
}

.gallery-lightbox-prev {
    left: 20px
}

.gallery-lightbox-next {
    right: 20px
}

body.gallery-modal-open {
    overflow: hidden
}

@media(max-width:900px) {
    .gallery-heading {
        grid-template-columns: 48px 1fr;
        gap: 18px
    }

    .gallery-intro {
        grid-column: 2;
        max-width: 550px
    }

    .programme-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px
    }

    .gallery-hero {
        min-height: 510px
    }

    .gallery-hero-side {
        display: none
    }
}

@media(max-width:600px) {
    .gallery-hero-inner {
        padding-top: 130px;
        padding-bottom: 62px
    }

    .gallery-hero h1 {
        font-size: clamp(43px, 13vw, 66px)
    }

    .gallery-hero-content>p:last-child {
        font-size: 14px
    }

    .programme-gallery-section {
        padding: 68px 0 78px
    }

    .gallery-heading {
        grid-template-columns: 1fr;
        gap: 14px;
        margin-bottom: 30px
    }

    .gallery-intro {
        grid-column: auto
    }

    .gallery-section-number {
        margin-bottom: 5px
    }

    .programme-gallery-grid {
        grid-template-columns: 1fr;
        gap: 13px
    }

    .programme-gallery-card,
    .programme-gallery-card:nth-child(4n+2),
    .programme-gallery-card:nth-child(4n+3) {
        aspect-ratio: 1.18/1
    }

    .gallery-card-overlay {
        padding: 17px
    }

    .gallery-lightbox {
        padding: 54px 18px
    }

    .gallery-lightbox figure {
        max-width: 100%;
        max-height: 80vh
    }

    .gallery-lightbox figure img {
        max-height: 70vh
    }

    .gallery-lightbox-prev {
        left: 0
    }

    .gallery-lightbox-next {
        right: 0
    }

    .gallery-lightbox-prev,
    .gallery-lightbox-next {
        font-size: 42px
    }

    .gallery-lightbox-close {
        right: 15px;
        top: 12px
    }
}