﻿/* ==========================================================
   PHOTO GALLERY SECTION
   PoliticalLeaderPortal
========================================================== */

.image-gallery-section {
    padding: 0px 0;
    background: #f8fafc;
    position: relative;
    overflow: hidden;
}

/* ==========================================================
   FEATURED GALLERY CARD
========================================================== */

.featured-gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    transition: all .4s ease;
    background: #ffffff;
}

    .featured-gallery-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 20px 45px rgba(0,0,0,.18);
    }

    .featured-gallery-card img {
        width: 100%;
        height: 550px;
        object-fit: cover;
        transition: all .6s ease;
    }

    .featured-gallery-card:hover img {
        transform: scale(1.05);
    }

.featured-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 40px;
    background: linear-gradient( to top, rgba(0,0,0,.92), rgba(0,0,0,.55), transparent );
}

.gallery-badge {
    display: inline-block;
    background: #ff9933;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .3px;
    margin-bottom: 15px;
}

.featured-overlay h3 {
    color: #ffffff;
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.4;
}

.featured-overlay p {
    color: rgba(255,255,255,.9);
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 15px;
}

/* ==========================================================
   SMALL GALLERY CARDS
========================================================== */

.gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    cursor: pointer;
    background: #ffffff;
    box-shadow: 0 5px 20px rgba(0,0,0,.08);
    transition: all .35s ease;
}

    .gallery-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 35px rgba(0,0,0,.15);
    }

    .gallery-card img {
        width: 100%;
        height: 260px;
        object-fit: cover;
        transition: all .45s ease;
    }

    .gallery-card:hover img {
        transform: scale(1.08);
        filter: brightness(1.05);
    }

.category-tag {
    position: absolute;
    left: 15px;
    bottom: 15px;
    background: rgba(255,153,51,.95);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .3px;
    box-shadow: 0 4px 10px rgba(0,0,0,.15);
}

.gallery-card::after,
.featured-gallery-card::after {
    content: "\F52A";
    font-family: "bootstrap-icons";
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    background: rgba(15, 23, 42, .72);
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .2s ease, transform .2s ease;
}

.gallery-card:hover::after,
.featured-gallery-card:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.gallery-lightbox.is-open {
    display: flex;
}

.gallery-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(3, 7, 18, .78);
    backdrop-filter: blur(8px);
}

.gallery-lightbox-dialog {
    position: relative;
    z-index: 1;
    width: min(1040px, 100%);
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .36);
}

.gallery-lightbox-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(15, 23, 42, .78);
}

.gallery-lightbox-media {
    background: #020617;
}

.gallery-lightbox-media img {
    display: block;
    width: 100%;
    max-height: min(72vh, 720px);
    object-fit: contain;
}

.gallery-lightbox-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
}

.gallery-lightbox-footer h3 {
    margin: 0;
    color: #0f172a;
    font-size: 16px;
    font-weight: 800;
}

.gallery-lightbox-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.gallery-lightbox-actions button,
.gallery-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    border: 1px solid #dbe4f0;
    border-radius: 999px;
    padding: 0 14px;
    color: #22304a;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .07);
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.gallery-lightbox-actions button:hover,
.gallery-lightbox-actions button.is-liked,
.gallery-download-btn:hover {
    color: #fff;
    border-color: #ff9933;
    background: linear-gradient(135deg, #ff9933 0%, #ff7a1a 100%);
    transform: translateY(-1px);
}

.gallery-lightbox-open {
    overflow: hidden;
}

.media-action-notice {
    position: fixed;
    left: 50%;
    bottom: 26px;
    z-index: 5100;
    padding: 11px 16px;
    border-radius: 999px;
    color: #fff;
    background: #0f172a;
    box-shadow: 0 16px 42px rgba(15, 23, 42, .28);
    font-size: 13px;
    font-weight: 700;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 12px);
    transition: opacity .2s ease, transform .2s ease;
}

.media-action-notice.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.media-comment-modal {
    position: fixed;
    inset: 0;
    z-index: 5200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.media-comment-modal.is-open {
    display: flex;
}

.media-comment-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .48);
    backdrop-filter: blur(6px);
}

.media-comment-dialog {
    position: relative;
    z-index: 1;
    width: min(460px, 100%);
    border-radius: 14px;
    padding: 22px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.media-comment-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    color: #475569;
    background: #f1f5f9;
}

.media-comment-kicker {
    display: inline-flex;
    margin-bottom: 8px;
    color: #ff7a1a;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.media-comment-dialog h3 {
    margin: 0 42px 14px 0;
    color: #0f172a;
    font-size: 20px;
    font-weight: 900;
}

.media-comment-dialog textarea {
    width: 100%;
    min-height: 132px;
    resize: vertical;
    border: 1px solid #dbe4f0;
    border-radius: 10px;
    padding: 12px;
    color: #0f172a;
    outline: 0;
}

.media-comment-dialog textarea:focus {
    border-color: #ff9933;
    box-shadow: 0 0 0 3px rgba(255, 153, 51, .16);
}

.media-comment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
}

.media-comment-actions button {
    min-height: 38px;
    border: 0;
    border-radius: 999px;
    padding: 0 16px;
    font-size: 13px;
    font-weight: 800;
}

.media-comment-actions .btn-cancel {
    color: #475569;
    background: #f1f5f9;
}

.media-comment-actions .btn-save {
    color: #fff;
    background: linear-gradient(135deg, #ff9933 0%, #ff7a1a 100%);
}

/* ==========================================================
   VIEW GALLERY BUTTON
========================================================== */

.btn-view-gallery {
    display: inline-block;
    background: linear-gradient(135deg,#ff9933,#ff7b00);
    color: #ffffff;
    text-decoration: none;
    padding: 14px 30px;
    border-radius: 10px;
    font-weight: 600;
    transition: all .3s ease;
    box-shadow: 0 6px 18px rgba(255,153,51,.25);
}

    .btn-view-gallery:hover {
        color: #ffffff;
        text-decoration: none;
        transform: translateY(-2px);
        box-shadow: 0 12px 28px rgba(255,153,51,.40);
    }

/* ==========================================================
   SECTION TITLE SUPPORT
========================================================== */

.gallery-section-title {
    margin-bottom: 15px;
    font-size: 2.2rem;
    font-weight: 700;
    color: #0f172a;
}

.gallery-section-subtitle {
    color: #64748b;
    font-size: 16px;
    max-width: 700px;
    margin: 0 auto;
}

/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 991px) {

    .image-gallery-section {
        padding: 70px 0;
    }

    .featured-gallery-card img {
        height: 400px;
    }

    .featured-overlay {
        padding: 30px;
    }

        .featured-overlay h3 {
            font-size: 1.6rem;
        }

    .gallery-card img {
        height: 220px;
    }
}

/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 767px) {

    .image-gallery-section {
        padding: 60px 0;
    }

    .featured-gallery-card img {
        height: 250px;
    }

    .featured-overlay {
        padding: 20px;
    }

        .featured-overlay h3 {
            font-size: 1.2rem;
        }

        .featured-overlay p {
            font-size: 13px;
        }

    .gallery-card img {
        height: 180px;
    }

    .category-tag {
        font-size: 11px;
        padding: 5px 10px;
    }

    .gallery-section-title {
        font-size: 1.6rem;
    }

    .btn-view-gallery {
        width: 100%;
        text-align: center;
    }
}

/* Compact black gallery header and single-line captions. */
.gallery-index-page {
    color: #fff;
    background: #050706;
}

.gallery-index-hero {
    min-height: 0;
    padding: 20px 0 18px;
    color: #fff;
    background: #050706;
}

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

.gallery-index-eyebrow,
.gallery-index-explore {
    margin: 0;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .18em;
    text-decoration: none;
    text-transform: uppercase;
}

.gallery-index-explore {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 18px;
    border-bottom: 1px solid rgba(255,255,255,.5);
    padding-bottom: 7px;
    transition: color .22s ease, border-color .22s ease, transform .22s ease;
}

.gallery-index-explore:hover,
.gallery-index-explore:focus-visible {
    color: #ef6b45;
    border-color: #ef6b45;
    transform: translateY(-2px);
}

.gallery-index-intro {
    margin: 12px 0 0;
}

.gallery-index-intro p {
    max-width: 680px;
    color: #8e9995;
    font-size: 12px;
    line-height: 1.45;
}

.gallery-index-section {
    padding-top: 18px;
    color: #fff;
    background:
        radial-gradient(ellipse at 50% 8%, rgba(50,58,55,.5), transparent 46%),
        linear-gradient(180deg, #080b0a 0%, #020303 100%);
}

.gallery-index-section::before {
    background: linear-gradient(90deg, rgba(67,77,73,.4), transparent);
}

.gallery-index-section::after {
    background: linear-gradient(-90deg, rgba(67,77,73,.4), transparent);
}

.gallery-index-grid {
    margin-top: 8px;
}

.gallery-index-copy {
    display: block;
    min-width: 0;
    padding: 9px 3px 0;
}

.gallery-index-copy h2 {
    display: block;
    overflow: hidden;
    margin: 0;
    color: #f5f7f6;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-index-copy p,
.gallery-index-copy > span {
    display: none;
}

.gallery-load-more {
    border-color: rgba(255,255,255,.76);
    color: #050706;
    background: #fff;
}

.gallery-load-more small {
    color: #65706c;
}

.gallery-load-more:hover {
    color: #fff;
    background: transparent;
}

.gallery-index-empty {
    color: #fff;
    border-color: rgba(255,255,255,.28);
}

.gallery-index-empty p {
    color: #929d99;
}

@media (max-width: 620px) {
    .gallery-index-hero {
        min-height: 0;
        padding: 16px 0 14px;
    }

    .gallery-index-topline {
        align-items: flex-start;
        gap: 16px;
    }

    .gallery-index-eyebrow,
    .gallery-index-explore {
        font-size: 8px;
        letter-spacing: .11em;
    }

    .gallery-index-eyebrow span {
        width: 16px;
        margin-right: 5px;
        margin-left: 5px;
    }

    .gallery-index-explore {
        gap: 7px;
        padding-bottom: 5px;
        white-space: nowrap;
    }

    .gallery-index-intro {
        margin-top: 9px;
    }

    .gallery-index-intro p {
        font-size: 10px;
        line-height: 1.4;
    }

    .gallery-index-section {
        padding-top: 12px;
    }

    .gallery-index-grid {
        margin-top: 4px;
    }

    .gallery-index-copy h2 {
        font-size: 9px;
    }
}

/* Full-image lightbox and final gallery typography. */
.gallery-index-eyebrow {
    color: #ff7a1a;
    font-size: 16px;
}

.gallery-index-eyebrow span {
    background: #ff7a1a;
}

.gallery-index-explore,
.gallery-index-intro p,
.gallery-index-copy h2 {
    color: #fff;
}

.gallery-index-copy h2 {
    overflow: hidden;
    font-size: 9px;
    line-height: 1.2;
    letter-spacing: .035em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.gallery-index-lightbox {
    padding: 24px 74px;
}

.gallery-index-lightbox .gallery-lightbox-dialog {
    display: flex;
    width: max-content;
    max-width: calc(100vw - 148px);
    max-height: calc(100vh - 48px);
    flex-direction: column;
    overflow: visible;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.gallery-index-lightbox .gallery-lightbox-media {
    display: flex;
    min-height: 0;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.gallery-index-lightbox .gallery-lightbox-media img {
    display: block;
    width: auto;
    height: auto;
    max-width: calc(100vw - 148px);
    max-height: calc(100vh - 156px);
    object-fit: contain;
    box-shadow: 0 24px 80px rgba(0,0,0,.55);
}

.gallery-index-lightbox .gallery-lightbox-footer {
    display: flex;
    min-height: 84px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 16px 0;
    color: #fff;
    background: transparent;
    text-align: center;
}

.gallery-index-lightbox .gallery-lightbox-footer h3 {
    overflow: hidden;
    max-width: min(720px, 80vw);
    margin: 0;
    color: #fff;
    font-size: 12px;
    letter-spacing: .06em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.gallery-index-lightbox .gallery-lightbox-actions {
    width: 100%;
    justify-content: center;
}

.gallery-index-lightbox .gallery-lightbox-actions button,
.gallery-index-lightbox .gallery-download-btn {
    border-color: rgba(255,255,255,.38);
    color: #fff;
    background: rgba(255,255,255,.1);
    box-shadow: none;
}

.gallery-index-lightbox .gallery-lightbox-actions button:hover,
.gallery-index-lightbox .gallery-lightbox-actions button.is-liked,
.gallery-index-lightbox .gallery-download-btn:hover {
    border-color: #ff7a1a;
    color: #fff;
    background: #ff7a1a;
}

@media (max-width: 620px) {
    .gallery-index-eyebrow {
        font-size: 11px;
    }

    .gallery-index-copy h2 {
        font-size: 8px;
    }

    .gallery-index-lightbox {
        padding: 12px;
    }

    .gallery-index-lightbox .gallery-lightbox-dialog {
        width: max-content;
        max-width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
    }

    .gallery-index-lightbox .gallery-lightbox-media img {
        max-width: calc(100vw - 24px);
        max-height: calc(100vh - 156px);
    }

    .gallery-index-lightbox .gallery-lightbox-actions {
        gap: 5px;
    }

    .gallery-index-lightbox .gallery-lightbox-actions button,
    .gallery-index-lightbox .gallery-download-btn {
        min-height: 32px;
        padding: 0 9px;
        font-size: 10px;
    }
}

/* ==========================================================
   PUBLIC GALLERY INDEX — PERSPECTIVE COLLECTION
========================================================== */

.gallery-index-page {
    --gallery-ink: #13231f;
    --gallery-paper: #f5f1e8;
    --gallery-sage: #dfe6e1;
    --gallery-accent: #e5633f;
    color: var(--gallery-ink);
    background: var(--gallery-paper);
    overflow: hidden;
}

.gallery-index-shell {
    width: min(1380px, calc(100% - 48px));
    margin: 0 auto;
}

.gallery-index-hero {
    min-height: 620px;
    display: flex;
    align-items: center;
    padding: 92px 0 72px;
    background:
        radial-gradient(circle at 82% 12%, rgba(255,255,255,.96), transparent 29%),
        linear-gradient(135deg, #f8f5ed 0%, #eee9dd 100%);
}

.gallery-index-eyebrow {
    margin: 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.gallery-index-eyebrow span {
    display: inline-block;
    width: 34px;
    height: 1px;
    margin: 0 10px 3px;
    background: currentColor;
}

.gallery-index-hero h1 {
    max-width: 1080px;
    margin: 32px 0 56px;
    color: var(--gallery-ink);
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(58px, 8vw, 118px);
    font-weight: 500;
    line-height: .9;
    letter-spacing: -.055em;
}

.gallery-index-hero h1 em,
.gallery-index-closing h2 em {
    color: var(--gallery-accent);
    font-weight: 500;
}

.gallery-index-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
    margin-left: 20%;
}

.gallery-index-intro p {
    max-width: 480px;
    margin: 0;
    color: #596763;
    font-size: 15px;
    line-height: 1.75;
}

.gallery-index-intro a {
    display: inline-flex;
    align-items: center;
    gap: 34px;
    border-bottom: 1px solid var(--gallery-ink);
    padding-bottom: 8px;
    color: var(--gallery-ink);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.gallery-index-section {
    padding: 96px 0 126px;
    background: var(--gallery-sage);
}

.gallery-index-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    border-bottom: 1px solid rgba(19,35,31,.24);
    padding-bottom: 22px;
}

.gallery-index-heading > div {
    display: flex;
    align-items: baseline;
    gap: 20px;
}

.gallery-index-heading span,
.gallery-index-heading > p {
    margin: 0;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .16em;
}

.gallery-index-heading h2 {
    margin: 0;
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(36px, 4vw, 54px);
    font-weight: 500;
    letter-spacing: -.03em;
}

.gallery-index-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 76px 36px;
    margin-top: 68px;
    perspective: 1400px;
}

.gallery-index-card {
    min-width: 0;
    cursor: pointer;
    transform-style: preserve-3d;
    transition: transform .35s ease, filter .35s ease;
}

.gallery-index-card.is-pending {
    display: none;
}

.gallery-index-card-1 { transform: rotateY(6deg) rotateZ(-.7deg); }
.gallery-index-card-2 { transform: translateY(28px); }
.gallery-index-card-3 { transform: rotateY(-6deg) rotateZ(.7deg); }
.gallery-index-card-4 { transform: translateY(-10px) rotateY(3deg); }

.gallery-index-card:hover,
.gallery-index-card:focus-visible {
    z-index: 2;
    outline: 0;
    filter: drop-shadow(0 22px 18px rgba(19,35,31,.18));
    transform: translateY(-12px) rotate(0);
}

.gallery-index-image {
    position: relative;
    aspect-ratio: 1.28;
    overflow: hidden;
    border: 9px solid #fff;
    background: #cad2ce;
    box-shadow: 0 18px 38px rgba(19,35,31,.18), 0 2px 5px rgba(19,35,31,.16);
}

.gallery-index-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 52%, rgba(8,17,15,.48));
    opacity: .45;
    transition: opacity .3s ease;
}

.gallery-index-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}

.gallery-index-card:hover .gallery-index-image img,
.gallery-index-card:focus-visible .gallery-index-image img {
    transform: scale(1.055);
}

.gallery-index-card:hover .gallery-index-image::after,
.gallery-index-card:focus-visible .gallery-index-image::after {
    opacity: .72;
}

.gallery-index-image > span {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    color: var(--gallery-ink);
    background: rgba(255,255,255,.94);
    opacity: 0;
    transform: translate(-50%, -40%);
    transition: opacity .25s ease, transform .25s ease;
}

.gallery-index-card:hover .gallery-index-image > span,
.gallery-index-card:focus-visible .gallery-index-image > span {
    opacity: 1;
    transform: translate(-50%, -50%);
}

.gallery-index-image > small {
    position: absolute;
    right: 16px;
    bottom: 12px;
    z-index: 2;
    color: #fff;
    font-family: Fraunces, Georgia, serif;
    font-size: 20px;
}

.gallery-index-copy {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 7px 20px;
    align-items: start;
    padding: 18px 5px 0;
}

.gallery-index-copy h2 {
    margin: 0;
    font-family: Fraunces, Georgia, serif;
    font-size: 23px;
    font-weight: 600;
    line-height: 1.2;
}

.gallery-index-copy p {
    grid-column: 1;
    margin: 0;
    color: #697571;
    font-size: 12px;
    line-height: 1.55;
}

.gallery-index-copy > span {
    grid-column: 2;
    grid-row: 1 / span 2;
    color: #5e6b67;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.gallery-load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 82px;
}

.gallery-load-more {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    min-height: 52px;
    border: 1px solid var(--gallery-ink);
    border-radius: 999px;
    padding: 0 22px;
    color: #fff;
    background: var(--gallery-ink);
    font-size: 12px;
    font-weight: 800;
    transition: color .2s ease, background .2s ease, transform .2s ease;
}

.gallery-load-more small { color: #b9c4c0; }
.gallery-load-more:hover { color: var(--gallery-ink); background: transparent; transform: translateY(-2px); }
.gallery-load-more:hover small { color: inherit; }
.gallery-load-more.is-complete { opacity: .62; cursor: default; transform: none; }

.gallery-index-empty {
    margin-top: 60px;
    border: 1px dashed rgba(19,35,31,.3);
    padding: 80px 24px;
    text-align: center;
}

.gallery-index-empty > i { color: var(--gallery-accent); font-size: 46px; }
.gallery-index-empty h2 { margin: 16px 0 8px; font-family: Fraunces, Georgia, serif; }
.gallery-index-empty p { margin: 0; color: #63706c; }

.gallery-index-closing {
    padding: 130px 0 145px;
    color: #f6f2e9;
    background: var(--gallery-ink);
}

.gallery-index-closing h2 {
    margin: 35px 0 52px;
    font-family: Fraunces, Georgia, serif;
    font-size: clamp(46px, 6.5vw, 92px);
    font-weight: 500;
    line-height: .94;
    letter-spacing: -.045em;
}

.gallery-index-closing .gallery-index-shell > p:last-child {
    max-width: 480px;
    margin: 0 0 0 auto;
    color: #afbbb7;
    font-size: 15px;
    line-height: 1.7;
}

.gallery-index-lightbox {
    display: flex !important;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s ease, visibility 0s linear .28s;
}

.gallery-index-lightbox.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition: opacity .28s ease;
}

.gallery-index-lightbox .gallery-lightbox-backdrop {
    background: rgba(5,10,9,.91);
}

.gallery-index-lightbox .gallery-lightbox-dialog {
    width: min(1180px, calc(100% - 180px));
    border-radius: 4px;
}

.gallery-index-lightbox .gallery-lightbox-media img {
    max-height: 78vh;
}

.gallery-index-nav {
    position: absolute;
    top: 50%;
    z-index: 4;
    display: grid;
    place-items: center;
    width: 56px;
    height: 72px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 7px;
    color: #fff;
    background: rgba(0,0,0,.34);
    font-size: 28px;
    transform: translateY(-50%);
}

.gallery-index-prev { left: 38px; }
.gallery-index-next { right: 38px; }
.gallery-index-nav:hover { color: var(--gallery-ink); background: #fff; }

@media (max-width: 991px) {
    .gallery-index-hero { min-height: 540px; }
    .gallery-index-intro { margin-left: 0; }
    .gallery-index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .gallery-index-card { transform: none; }
    .gallery-index-lightbox .gallery-lightbox-dialog { width: calc(100% - 120px); }
    .gallery-index-prev { left: 18px; }
    .gallery-index-next { right: 18px; }
}

@media (max-width: 620px) {
    .gallery-index-shell { width: min(100% - 32px, 1380px); }
    .gallery-index-hero { min-height: 560px; padding: 68px 0 58px; }
    .gallery-index-hero h1 { margin: 28px 0 42px; font-size: 54px; line-height: .94; }
    .gallery-index-intro { align-items: flex-start; flex-direction: column; gap: 28px; }
    .gallery-index-section { padding: 72px 0 90px; }
    .gallery-index-heading { align-items: flex-start; flex-direction: column; }
    .gallery-index-heading > div { gap: 12px; }
    .gallery-index-grid { grid-template-columns: 1fr; gap: 52px; margin-top: 46px; }
    .gallery-index-copy { grid-template-columns: 1fr; }
    .gallery-index-copy > span { grid-column: 1; grid-row: auto; }
    .gallery-index-closing { padding: 96px 0 105px; }
    .gallery-index-lightbox { padding: 10px; }
    .gallery-index-lightbox .gallery-lightbox-dialog { width: 100%; }
    .gallery-index-nav { top: auto; bottom: 18px; width: 46px; height: 46px; transform: none; }
    .gallery-index-prev { left: 18px; }
    .gallery-index-next { right: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-index-card,
    .gallery-index-image img,
    .gallery-index-image > span { transition: none; }
}

/* Reference-inspired floating photo wall */
.gallery-index-page {
    --gallery-paper: #f7f8f7;
    --gallery-sage: #f2f4f3;
}

.gallery-index-hero {
    min-height: 410px;
    padding: 72px 0 62px;
    background:
        radial-gradient(circle at 50% 12%, #fff 0, rgba(255,255,255,.96) 23%, transparent 54%),
        linear-gradient(180deg, #fdfdfc 0%, #f0f3f2 100%);
}

.gallery-index-hero h1 {
    margin: 24px 0 34px;
    font-size: clamp(52px, 6.8vw, 94px);
}

.gallery-index-section {
    position: relative;
    isolation: isolate;
    padding: 74px 0 150px;
    background:
        radial-gradient(ellipse at 50% 12%, rgba(255,255,255,1) 0%, rgba(255,255,255,.82) 32%, transparent 66%),
        linear-gradient(180deg, #eef1f0 0%, #fafbfa 62%, #edf0ef 100%);
}

.gallery-index-section::before,
.gallery-index-section::after {
    content: "";
    position: absolute;
    z-index: -1;
    top: 110px;
    bottom: 80px;
    width: 18%;
    pointer-events: none;
    filter: blur(2px);
}

.gallery-index-section::before { left: 0; background: linear-gradient(90deg, rgba(193,202,199,.42), transparent); }
.gallery-index-section::after { right: 0; background: linear-gradient(-90deg, rgba(193,202,199,.42), transparent); }

.gallery-index-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 56px 24px;
    margin-top: 58px;
    padding: 18px 0 75px;
    perspective: 1600px;
    perspective-origin: 50% 35%;
}

.gallery-index-card {
    position: relative;
    opacity: 0;
    transform-origin: center center;
    animation: galleryPanelReveal .72s cubic-bezier(.2,.7,.2,1) forwards;
    will-change: transform, opacity;
    -webkit-box-reflect: below 11px linear-gradient(transparent 68%, rgba(25,40,36,.14));
}

.gallery-index-card:nth-child(2n) { animation-delay: .07s; }
.gallery-index-card:nth-child(3n) { animation-delay: .14s; }
.gallery-index-card:nth-child(4n) { animation-delay: .21s; }
.gallery-index-card-1 { transform: rotateY(12deg) rotateZ(-.8deg) translateZ(-14px); }
.gallery-index-card-2 { transform: translateY(18px) rotateY(4deg); }
.gallery-index-card-3 { transform: translateY(18px) rotateY(-4deg); }
.gallery-index-card-4 { transform: rotateY(-12deg) rotateZ(.8deg) translateZ(-14px); }
.gallery-index-card:nth-child(8n + 5) { transform: rotateY(9deg) translateY(10px); }
.gallery-index-card:nth-child(8n + 8) { transform: rotateY(-9deg) translateY(10px); }

.gallery-index-card:hover,
.gallery-index-card:focus-visible {
    filter: drop-shadow(0 28px 22px rgba(22,34,31,.22));
    transform: translateY(-16px) translateZ(48px) rotateY(0) rotateZ(0) scale(1.025);
}

.gallery-index-image {
    aspect-ratio: 1.12;
    border: 6px solid #fff;
    border-radius: 2px;
    box-shadow: 0 22px 38px rgba(20,34,30,.18), 0 3px 7px rgba(20,34,30,.22), inset 0 0 0 1px rgba(19,35,31,.08);
    transition: box-shadow .35s ease;
}

.gallery-index-card:hover .gallery-index-image,
.gallery-index-card:focus-visible .gallery-index-image {
    box-shadow: 0 32px 58px rgba(20,34,30,.24), 0 4px 9px rgba(20,34,30,.2), inset 0 0 0 1px rgba(19,35,31,.08);
}

.gallery-index-image::after {
    background: linear-gradient(125deg, rgba(255,255,255,.18), transparent 35%), linear-gradient(180deg, transparent 55%, rgba(8,17,15,.44));
    opacity: .36;
}

.gallery-index-copy { padding: 14px 6px 0; }
.gallery-index-copy h2 { font-size: 18px; }
.gallery-index-copy p { font-size: 11px; }

.gallery-index-copy > span {
    opacity: 0;
    transform: translateX(-7px);
    transition: opacity .25s ease, transform .25s ease;
}

.gallery-index-card:hover .gallery-index-copy > span,
.gallery-index-card:focus-visible .gallery-index-copy > span { opacity: 1; transform: translateX(0); }
.gallery-load-more-wrap { margin-top: 34px; }
.gallery-load-more { box-shadow: 0 14px 32px rgba(19,35,31,.18); }

@keyframes galleryPanelReveal {
    from { opacity: 0; translate: 0 32px; scale: .96; }
    to { opacity: 1; translate: 0 0; scale: 1; }
}

@media (max-width: 1199px) {
    .gallery-index-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .gallery-index-card-1, .gallery-index-card-2, .gallery-index-card-3, .gallery-index-card-4 { transform: none; }
}

@media (max-width: 991px) {
    .gallery-index-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 52px 22px; }
    .gallery-index-card:nth-child(odd) { transform: rotateY(4deg); }
    .gallery-index-card:nth-child(even) { transform: rotateY(-4deg) translateY(14px); }
}

@media (max-width: 620px) {
    .gallery-index-hero { min-height: 430px; padding: 58px 0 48px; }
    .gallery-index-hero h1 { font-size: 50px; }
    .gallery-index-section { padding: 60px 0 100px; }
    .gallery-index-grid { grid-template-columns: 1fr; gap: 48px; padding-bottom: 38px; }
    .gallery-index-card, .gallery-index-card:nth-child(odd), .gallery-index-card:nth-child(even) {
        transform: none;
        -webkit-box-reflect: below 7px linear-gradient(transparent 78%, rgba(25,40,36,.1));
    }
    .gallery-index-card:hover, .gallery-index-card:focus-visible { transform: translateY(-8px) scale(1.01); }
    .gallery-index-image { aspect-ratio: 1.2; }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-index-card { opacity: 1; animation: none; }
}

/* Keep the reference-style curved wall on every viewport. */
.gallery-index-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 62px 18px;
    max-width: 1320px;
    margin-right: auto;
    margin-left: auto;
    perspective: 1250px;
    perspective-origin: 50% 42%;
}

.gallery-index-image {
    aspect-ratio: .82;
}

.gallery-index-card:nth-child(5n + 1) {
    transform: translateY(42px) rotateY(17deg) rotateZ(-1.5deg);
    transform-origin: right center;
}

.gallery-index-card:nth-child(5n + 2) {
    transform: translateY(13px) rotateY(8deg) rotateZ(-.5deg);
    transform-origin: right center;
}

.gallery-index-card:nth-child(5n + 3) {
    z-index: 1;
    transform: translateY(0) translateZ(24px);
}

.gallery-index-card:nth-child(5n + 4) {
    transform: translateY(13px) rotateY(-8deg) rotateZ(.5deg);
    transform-origin: left center;
}

.gallery-index-card:nth-child(5n + 5) {
    transform: translateY(42px) rotateY(-17deg) rotateZ(1.5deg);
    transform-origin: left center;
}

.gallery-index-card:hover,
.gallery-index-card:focus-visible,
.gallery-index-card:nth-child(5n + 1):hover,
.gallery-index-card:nth-child(5n + 2):hover,
.gallery-index-card:nth-child(5n + 3):hover,
.gallery-index-card:nth-child(5n + 4):hover,
.gallery-index-card:nth-child(5n + 5):hover {
    z-index: 5;
    transform: translateY(-18px) translateZ(70px) rotateY(0) rotateZ(0) scale(1.055);
}

@media (max-width: 1199px) {
    .gallery-index-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 56px 16px;
    }

    .gallery-index-card:nth-child(4n + 1) { transform: translateY(28px) rotateY(13deg) rotateZ(-1deg); }
    .gallery-index-card:nth-child(4n + 2) { transform: translateY(4px) rotateY(4deg); }
    .gallery-index-card:nth-child(4n + 3) { transform: translateY(4px) rotateY(-4deg); }
    .gallery-index-card:nth-child(4n + 4) { transform: translateY(28px) rotateY(-13deg) rotateZ(1deg); }
}

@media (max-width: 767px) {
    .gallery-index-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 48px 10px;
        width: calc(100% + 18px);
        margin-left: -9px;
        perspective: 800px;
    }

    .gallery-index-card,
    .gallery-index-card:nth-child(n) {
        -webkit-box-reflect: below 5px linear-gradient(transparent 80%, rgba(25,40,36,.1));
    }

    .gallery-index-card:nth-child(3n + 1) { transform: translateY(24px) rotateY(13deg); transform-origin: right center; }
    .gallery-index-card:nth-child(3n + 2) { transform: translateY(0) translateZ(12px); }
    .gallery-index-card:nth-child(3n + 3) { transform: translateY(24px) rotateY(-13deg); transform-origin: left center; }

    .gallery-index-copy {
        display: block;
        padding: 9px 2px 0;
    }

    .gallery-index-copy h2 {
        overflow: hidden;
        font-size: 12px;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .gallery-index-copy p,
    .gallery-index-copy > span {
        display: none;
    }
}

@media (max-width: 420px) {
    .gallery-index-shell {
        width: calc(100% - 20px);
    }

    .gallery-index-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 42px 6px;
        width: calc(100% + 10px);
        margin-top: 36px;
        margin-left: -5px;
    }

    .gallery-index-image {
        aspect-ratio: .72;
        border-width: 3px;
    }

    .gallery-index-card:nth-child(3n + 1) { transform: translateY(18px) rotateY(15deg); }
    .gallery-index-card:nth-child(3n + 2) { transform: translateY(0) translateZ(8px); }
    .gallery-index-card:nth-child(3n + 3) { transform: translateY(18px) rotateY(-15deg); }

    .gallery-index-card:hover,
    .gallery-index-card:focus-visible {
        transform: translateY(-7px) translateZ(30px) rotateY(0) scale(1.04);
    }
}

/* Compact gallery introduction: keep content together and remove dead space. */
.gallery-index-hero {
    min-height: 0;
    padding: 38px 0 34px;
}

.gallery-index-hero h1 {
    margin: 16px 0 22px;
    font-size: clamp(48px, 5.2vw, 76px);
    line-height: .92;
}

.gallery-index-intro {
    align-items: center;
    margin-left: 0;
}

.gallery-index-intro p {
    max-width: 680px;
}

.gallery-index-section {
    padding-top: 34px;
}

.gallery-index-grid {
    margin-top: 34px;
}

@media (max-width: 767px) {
    .gallery-index-hero {
        min-height: 0;
        padding: 30px 0 28px;
    }

    .gallery-index-hero h1 {
        margin: 14px 0 20px;
        font-size: clamp(42px, 12vw, 58px);
    }

    .gallery-index-intro {
        gap: 18px;
    }

    .gallery-index-section {
        padding-top: 26px;
    }

    .gallery-index-grid {
        margin-top: 26px;
    }
}

/* Final black-theme overrides — kept last to win every responsive layer. */
.gallery-index-page { color: #fff; background: #050706; }
.gallery-index-hero { min-height: 0; padding: 20px 0 18px; color: #fff; background: #050706; }
.gallery-index-topline { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.gallery-index-eyebrow,
.gallery-index-explore { margin: 0; color: #fff; font-size: 11px; font-weight: 800; line-height: 1; letter-spacing: .18em; text-decoration: none; text-transform: uppercase; }
.gallery-index-explore { display: inline-flex; align-items: center; flex: 0 0 auto; gap: 18px; border-bottom: 1px solid rgba(255,255,255,.5); padding-bottom: 7px; }
.gallery-index-intro { align-items: center; margin: 12px 0 0; }
.gallery-index-intro p { max-width: 680px; color: #8e9995; font-size: 12px; line-height: 1.45; }
.gallery-index-section { padding-top: 18px; color: #fff; background: radial-gradient(ellipse at 50% 8%, rgba(50,58,55,.5), transparent 46%), linear-gradient(180deg, #080b0a 0%, #020303 100%); }
.gallery-index-grid { margin-top: 8px; }
.gallery-index-copy { display: block; min-width: 0; padding: 9px 3px 0; }
.gallery-index-copy h2 { display: block; overflow: hidden; margin: 0; color: #f5f7f6; font-family: Arial, Helvetica, sans-serif; font-size: 11px; font-weight: 700; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.gallery-index-copy p,
.gallery-index-copy > span { display: none; }
.gallery-load-more { border-color: rgba(255,255,255,.76); color: #050706; background: #fff; }
.gallery-load-more small { color: #65706c; }
.gallery-load-more:hover { color: #fff; background: transparent; }

@media (max-width: 620px) {
    .gallery-index-hero { min-height: 0; padding: 16px 0 14px; }
    .gallery-index-topline { align-items: flex-start; gap: 16px; }
    .gallery-index-eyebrow,
    .gallery-index-explore { font-size: 8px; letter-spacing: .11em; }
    .gallery-index-explore { gap: 7px; padding-bottom: 5px; white-space: nowrap; }
    .gallery-index-intro { margin-top: 9px; }
    .gallery-index-intro p { font-size: 10px; line-height: 1.4; }
    .gallery-index-section { padding-top: 12px; }
    .gallery-index-grid { margin-top: 4px; }
    .gallery-index-copy h2 { font-size: 9px; }
}

/* Gallery header emphasis and high-contrast text. */
.gallery-index-eyebrow {
    color: #ff7a1a;
    font-size: 14px;
}

.gallery-index-eyebrow span {
    background: #ff7a1a;
}

.gallery-index-explore,
.gallery-index-intro p,
.gallery-index-copy h2,
.gallery-index-empty h2,
.gallery-index-empty p {
    color: #fff;
}

@media (max-width: 620px) {
    .gallery-index-eyebrow {
        font-size: 10px;
    }

    .gallery-index-explore {
        color: #fff;
        font-size: 8px;
    }
}

/* Authoritative lightbox and caption rules. */
.gallery-index-eyebrow { color: #ff7a1a; font-size: 16px; }
.gallery-index-copy h2 { color: #fff; font-size: 9px; letter-spacing: .035em; text-transform: uppercase; white-space: nowrap; }
.gallery-index-lightbox { padding: 24px 74px; }
.gallery-index-lightbox .gallery-lightbox-dialog { display: flex; width: max-content; max-width: calc(100vw - 148px); max-height: calc(100vh - 48px); flex-direction: column; overflow: visible; border-radius: 0; background: transparent; box-shadow: none; }
.gallery-index-lightbox .gallery-lightbox-media { display: flex; min-height: 0; align-items: center; justify-content: center; background: transparent; }
.gallery-index-lightbox .gallery-lightbox-media img { display: block; width: auto; height: auto; max-width: calc(100vw - 148px); max-height: calc(100vh - 156px); object-fit: contain; box-shadow: 0 24px 80px rgba(0,0,0,.55); }
.gallery-index-lightbox .gallery-lightbox-footer { display: flex; min-height: 84px; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 12px 16px 0; color: #fff; background: transparent; text-align: center; }
.gallery-index-lightbox .gallery-lightbox-footer h3 { overflow: hidden; max-width: min(720px,80vw); margin: 0; color: #fff; font-size: 12px; letter-spacing: .06em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.gallery-index-lightbox .gallery-lightbox-actions { width: 100%; justify-content: center; }
.gallery-index-lightbox .gallery-lightbox-actions button,
.gallery-index-lightbox .gallery-download-btn { border-color: rgba(255,255,255,.38); color: #fff; background: rgba(255,255,255,.1); box-shadow: none; }

@media (max-width: 620px) {
    .gallery-index-eyebrow { font-size: 11px; }
    .gallery-index-copy h2 { font-size: 8px; }
    .gallery-index-lightbox { padding: 12px; }
    .gallery-index-lightbox .gallery-lightbox-dialog { width: max-content; max-width: calc(100vw - 24px); max-height: calc(100vh - 24px); }
    .gallery-index-lightbox .gallery-lightbox-media img { max-width: calc(100vw - 24px); max-height: calc(100vh - 156px); }
}
