/* KTTC Gallery Page */
:root {
    --gallery-navy: #101d35;
    --gallery-blue: #1e3a63;
    --gallery-red: #e84b3c;
    --gallery-ink: #172238;
    --gallery-muted: #687386;
    --gallery-light: #f4f6f9;
}

.kttc-gallery-page {
    overflow: hidden;
    color: var(--gallery-ink);
}

.gallery-container {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.gallery-hero {
    min-height: 430px;
    position: relative;
    display: flex;
    align-items: center;
    background: linear-gradient(110deg, rgba(9, 20, 39, .97), rgba(18, 43, 75, .86)),
        url('../images/gallery/kttc%20(19).webp') center/cover no-repeat;
    color: #fff;
    isolation: isolate;
}

.gallery-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 82% 35%, rgba(232, 75, 60, .22), transparent 34%);
}

.gallery-hero__content {
    position: relative;
    z-index: 1;
    padding-block: 85px;
}

.gallery-kicker {
    display: inline-block;
    margin-bottom: 15px;
    color: #ff8578;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 2.4px;
}

.gallery-hero h1 {
    max-width: 760px;
    margin: 0;
    color: #fff;
    font-size: clamp(42px, 6vw, 68px);
    line-height: 1.06;
    font-weight: 800;
    letter-spacing: -1.8px;
}

.gallery-hero h1 span,
.gallery-intro h2 span,
.gallery-section__heading h2 span {
    color: var(--gallery-red);
}

.gallery-hero p {
    margin: 20px 0 28px;
    color: rgba(255, 255, 255, .82);
    font-size: 17px;
}

.gallery-hero__btn,
.gallery-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 18px;
    padding: 14px 21px;
    border-radius: 6px;
    background: var(--gallery-red);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    transition: .25s ease;
}

.gallery-hero__btn:hover,
.gallery-cta__btn:hover {
    background: #cf382c;
    color: #fff;
    transform: translateY(-3px);
}

.gallery-hero__shape {
    position: absolute;
    right: -90px;
    bottom: -180px;
    width: 430px;
    height: 430px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 50%;
}

.gallery-intro {
    padding: 76px 0 62px;
    background: #fff;
}

.gallery-intro__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: 50px;
}

.gallery-kicker--dark {
    color: var(--gallery-red);
}

.gallery-intro h2,
.gallery-section__heading h2 {
    margin: 0;
    color: var(--gallery-navy);
    font-size: clamp(30px, 4vw, 43px);
    line-height: 1.15;
    font-weight: 600;
    letter-spacing: -1px;
}

.gallery-intro__inner>p {
    max-width: 520px;
    margin: 0 0 3px;
    color: var(--gallery-muted);
    font-size: 16px;
    line-height: 1.8;
}

.gallery-section {
    padding: 66px 0 86px;
    background: var(--gallery-light);
}

.gallery-section__heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 25px;
    margin-bottom: 32px;
}

.gallery-section__heading>p {
    margin: 0 0 5px;
    color: var(--gallery-muted);
    font-size: 14px;
}

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

.gallery-card {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1.18 / 1;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 10px;
    background: #dce2e9;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 8px 24px rgba(16, 29, 53, .08);
}

.gallery-card:nth-child(3n + 1) {
    aspect-ratio: 1 / 1.08;
}

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

.gallery-card::after {
    content: "";
    position: absolute;
    inset: 30% 0 0;
    background: linear-gradient(transparent, rgba(8, 18, 34, .82));
    opacity: .9;
}

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

.gallery-card:focus-visible {
    outline: 3px solid var(--gallery-red);
    outline-offset: 3px;
}

.gallery-card__number {
    position: absolute;
    z-index: 1;
    top: 13px;
    left: 14px;
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, .4);
    border-radius: 4px;
    color: #fff;
    background: rgba(10, 20, 38, .35);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
}

.gallery-card__caption {
    position: absolute;
    z-index: 1;
    right: 15px;
    bottom: 15px;
    left: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.gallery-card__zoom {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    place-items: center;
    border-radius: 50%;
    background: var(--gallery-red);
    font-size: 17px;
}

.gallery-note {
    margin: 25px 0 0;
    color: var(--gallery-muted);
    text-align: center;
    font-size: 13px;
}

.gallery-cta {
    padding: 58px 0;
    color: #fff;
    background: linear-gradient(115deg, #101d35, #1d3a62);
}

.gallery-cta__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.gallery-cta h2 {
    margin: 0 0 10px;
    color: #fff;
    font-size: clamp(25px, 3vw, 35px);
    font-weight: 600;
}

.gallery-cta p {
    margin: 0;
    color: rgba(255, 255, 255, .72);
    line-height: 1.7;
}

.gallery-lightbox {
    position: fixed;
    z-index: 99999;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 55px 5vw;
    background: rgba(4, 9, 18, .94);
    opacity: 0;
    visibility: hidden;
    transition: .25s ease;
}

.gallery-lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

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

.gallery-lightbox figure img {
    display: block;
    max-width: 100%;
    max-height: 78vh;
    margin: auto;
    object-fit: contain;
    border-radius: 5px;
}

.gallery-lightbox figcaption {
    padding-top: 12px;
    color: #fff;
    font-size: 14px;
}

.gallery-lightbox button {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    font-size: 28px;
    cursor: pointer;
    transition: .2s;
}

.gallery-lightbox button:hover {
    background: var(--gallery-red);
    border-color: var(--gallery-red);
}

.gallery-lightbox .gallery-lightbox__close {
    position: absolute;
    top: 20px;
    right: 24px;
    font-size: 30px;
}

@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .gallery-intro__inner {
        gap: 28px;
    }
}

@media (max-width: 640px) {
    .gallery-container {
        width: min(100% - 30px, 520px);
    }

    .gallery-hero {
        min-height: 370px;
    }

    .gallery-hero__content {
        padding-block: 70px;
    }

    .gallery-hero p {
        font-size: 15px;
        line-height: 1.7;
    }

    .gallery-intro {
        padding: 55px 0 45px;
    }

    .gallery-intro__inner {
        grid-template-columns: 1fr;
        gap: 17px;
    }

    .gallery-section {
        padding: 48px 0 60px;
    }

    .gallery-section__heading {
        display: block;
    }

    .gallery-section__heading>p {
        margin-top: 12px;
    }

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

    .gallery-card,
    .gallery-card:nth-child(3n + 1) {
        aspect-ratio: .92 / 1;
    }

    .gallery-card__caption {
        right: 10px;
        bottom: 10px;
        left: 10px;
        font-size: 12px;
    }

    .gallery-card__zoom {
        width: 26px;
        height: 26px;
        flex-basis: 26px;
    }

    .gallery-cta__inner {
        display: block;
    }

    .gallery-cta__btn {
        margin-top: 22px;
    }

    .gallery-lightbox {
        gap: 8px;
        padding: 60px 10px 25px;
    }

    .gallery-lightbox figure {
        max-width: calc(100vw - 100px);
    }

    .gallery-lightbox button {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        font-size: 22px;
    }
}