/* ==========================================================================
   Navera Gallery
   Homepage showcase + full gallery page + lightbox
   ========================================================================== */

:root {
    --gallery-gold: #d4a843;
    --gallery-teal: #2dd4bf;
    --gallery-teal-deep: #0d7c70;
    --gallery-ink: #070d18;
    --gallery-ink-soft: #0f172a;
    --gallery-sand: #f4a261;
}

/* ==========================================================================
   1. Homepage showcase
   ========================================================================== */

.gallery-showcase {
    position: relative;
    width: 100vw;
    max-width: 100vw;
    margin-inline: calc(50% - 50vw);
    height: 100vh;
    height: 100svh;
    min-height: 620px;
    max-height: 1100px;
    background: var(--gallery-ink);
    color: #fff;
    overflow: hidden;
    isolation: isolate;
    touch-action: pan-y;
    border-top: 1px solid rgba(212, 168, 67, 0.18);
    border-bottom: 1px solid rgba(212, 168, 67, 0.18);
}

/* --- Slides ------------------------------------------------------------- */

.gallery-stage {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.gallery-slide {
    position: absolute;
    inset: 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.1s ease, visibility 1.1s ease;
}

.gallery-slide.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.02);
}

.gallery-slide.is-active img {
    animation: galleryKenBurns 10s ease-out both;
}

@keyframes galleryKenBurns {
    from {
        transform: scale(1.09);
    }

    to {
        transform: scale(1.01);
    }
}

/* --- Shade and decorative grid ----------------------------------------- */

.gallery-shade {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(180deg,
            rgba(7, 13, 24, 0.92) 0%,
            rgba(7, 13, 24, 0.45) 26%,
            rgba(7, 13, 24, 0.08) 52%,
            rgba(7, 13, 24, 0.72) 82%,
            rgba(7, 13, 24, 0.96) 100%),
        radial-gradient(120% 80% at 85% 20%, rgba(13, 124, 112, 0.25) 0%, transparent 55%);
}

.gallery-grid-lines {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: calc(100% / 6) 100%;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
}

/* --- Content ------------------------------------------------------------ */

.gallery-content {
    position: relative;
    z-index: 4;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    padding: clamp(1.5rem, 3.5vw, 3.25rem);
    padding-inline-start: clamp(1.5rem, 4.5vw, 4.5rem);
    padding-inline-end: clamp(1.5rem, 6.5vw, 6.5rem);
}

.gallery-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.gallery-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gallery-gold);
}

.gallery-eyebrow::before {
    content: "";
    width: 42px;
    height: 1px;
    background: currentColor;
    opacity: 0.7;
}

.gallery-eyebrow i {
    font-size: 0.85rem;
}

.gallery-title {
    margin: 0.85rem 0 0;
    font-size: clamp(2.2rem, 4.6vw, 4.2rem);
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
}

.gallery-title span {
    background: linear-gradient(100deg, var(--gallery-teal) 0%, #7dd3fc 55%, var(--gallery-gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.gallery-intro-wrap {
    max-width: 360px;
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    padding-top: 0.75rem;
}

.gallery-intro {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.68);
}

.gallery-cta {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.7rem 0.75rem 0.7rem 1.4rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: linear-gradient(120deg, rgba(45, 212, 191, 0.16), rgba(212, 168, 67, 0.16));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    align-self: flex-start;
    transition: transform 0.35s ease, border-color 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
}

.gallery-cta i {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.82rem;
    background: linear-gradient(135deg, var(--gallery-teal) 0%, var(--gallery-teal-deep) 100%);
    color: #04121a;
    transition: transform 0.35s ease, background 0.35s ease, color 0.35s ease;
}

.gallery-cta:hover {
    color: #fff;
    transform: translateY(-3px);
    border-color: rgba(212, 168, 67, 0.65);
    background: linear-gradient(120deg, rgba(45, 212, 191, 0.26), rgba(212, 168, 67, 0.26));
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.gallery-cta:hover i {
    transform: translateX(-4px);
    background: var(--gallery-gold);
    color: #1a1204;
}

/* --- Bottom caption and controls --------------------------------------- */

.gallery-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
}

.gallery-caption {
    max-width: 560px;
}

.gallery-caption-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
    padding: 0.42rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
}

.gallery-caption-badge i {
    color: var(--gallery-gold);
}

.gallery-caption-title {
    margin: 0 0 0.45rem;
    font-size: clamp(1.45rem, 2.8vw, 2.25rem);
    font-weight: 800;
    line-height: 1.3;
    color: #fff;
}

.gallery-caption-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.6);
}

.gallery-controls {
    width: min(400px, 42%);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.gallery-controls-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.gallery-count {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
}

.gallery-count b {
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.gallery-nav {
    display: flex;
    gap: 0.6rem;
}

.gallery-arrow {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    font-size: 0.95rem;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.gallery-arrow:hover,
.gallery-arrow:focus-visible {
    background: var(--gallery-gold);
    border-color: var(--gallery-gold);
    color: #161003;
    transform: translateY(-2px);
}

.gallery-progress {
    position: relative;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    overflow: hidden;
}

.gallery-progress i {
    display: block;
    width: 100%;
    height: 100%;
    transform: scaleX(0);
    transform-origin: right center;
    background: linear-gradient(90deg, var(--gallery-gold), var(--gallery-teal));
    animation: galleryProgress var(--gallery-speed, 6s) linear forwards;
}

.gallery-showcase.is-paused .gallery-progress i {
    animation-play-state: paused;
}

@keyframes galleryProgress {
    to {
        transform: scaleX(1);
    }
}

.gallery-controls-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.76rem;
    color: rgba(255, 255, 255, 0.45);
}

.gallery-hint i {
    color: var(--gallery-teal);
    margin-inline-end: 0.35rem;
}

.gallery-live {
    color: rgba(255, 255, 255, 0.65);
    font-weight: 600;
}

/* --- Side index rail ---------------------------------------------------- */

.gallery-rail {
    position: absolute;
    z-index: 5;
    top: 50%;
    inset-inline-end: clamp(0.75rem, 2vw, 1.6rem);
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.gallery-index {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0;
    border: 0;
    background: none;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    transition: color 0.3s ease;
}

.gallery-index-line {
    display: block;
    width: 14px;
    height: 1px;
    background: currentColor;
    transition: width 0.35s ease, background 0.35s ease;
}

.gallery-index:hover {
    color: rgba(255, 255, 255, 0.75);
}

.gallery-index.is-active {
    color: var(--gallery-gold);
}

.gallery-index.is-active .gallery-index-line {
    width: 30px;
    background: var(--gallery-gold);
}

/* ==========================================================================
   2. Gallery page
   ========================================================================== */

.gallery-page {
    background:
        radial-gradient(1100px 600px at 90% -10%, rgba(45, 212, 191, 0.07), transparent 60%),
        #f6f8fb;
}

/* --- Hero --------------------------------------------------------------- */

.gallery-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(3rem, 6vw, 5rem);
    background: var(--gallery-ink);
    color: #fff;
}

.gallery-hero-mosaic {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    opacity: 0.55;
}

.gallery-hero-mosaic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.7) contrast(1.05);
}

.gallery-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(7, 13, 24, 0.98) 0%, rgba(7, 13, 24, 0.82) 48%, rgba(7, 13, 24, 0.55) 100%),
        linear-gradient(0deg, var(--gallery-ink) 0%, rgba(7, 13, 24, 0.25) 45%, rgba(7, 13, 24, 0.55) 100%);
}

.gallery-breadcrumb {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 2.25rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.55);
}

.gallery-breadcrumb a {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
    transition: color 0.3s ease;
}

.gallery-breadcrumb a:hover {
    color: var(--gallery-teal);
}

.gallery-breadcrumb i {
    font-size: 0.6rem;
    opacity: 0.6;
}

.gallery-page-title {
    margin: 1rem 0 1.1rem;
    font-size: clamp(2.4rem, 5.5vw, 4.6rem);
    font-weight: 800;
    line-height: 1.12;
    color: #fff;
}

.gallery-page-title span {
    position: relative;
    background: linear-gradient(100deg, var(--gallery-teal) 0%, #7dd3fc 55%, var(--gallery-gold) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.gallery-page-subtitle {
    max-width: 640px;
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.68);
}

.gallery-stats {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(1.5rem, 4vw, 3.5rem);
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    max-width: 640px;
}

.gallery-stat {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.gallery-stat strong {
    font-size: clamp(1.5rem, 2.6vw, 2.1rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

.gallery-stat span {
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.5);
}

/* --- Toolbar ------------------------------------------------------------ */

.gallery-body {
    padding: clamp(2.25rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem);
}

.gallery-toolbar {
    position: sticky;
    top: 80px;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    margin-bottom: 2rem;
    padding: 1rem 1.25rem;
    border: 1px solid #e3eaf2;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07);
}

.gallery-toolbar-heading h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--gallery-ink-soft);
}

.gallery-toolbar-heading p {
    margin: 0.15rem 0 0;
    font-size: 0.78rem;
    color: #8a97a8;
}

.gallery-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.gallery-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.95rem;
    border: 1px solid #e1e8f0;
    border-radius: 999px;
    background: #fff;
    color: #55637a;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.gallery-filter i {
    font-size: 0.8rem;
    color: #94a3b8;
    transition: color 0.3s ease;
}

.gallery-filter-count {
    min-width: 22px;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    background: #f1f5f9;
    font-size: 0.68rem;
    font-weight: 700;
    color: #64748b;
    text-align: center;
    transition: all 0.3s ease;
}

.gallery-filter:hover {
    border-color: rgba(13, 124, 112, 0.45);
    color: var(--gallery-teal-deep);
    transform: translateY(-1px);
}

.gallery-filter.is-active {
    border-color: transparent;
    background: linear-gradient(120deg, var(--gallery-teal-deep) 0%, #0f9486 100%);
    color: #fff;
    box-shadow: 0 10px 24px rgba(13, 124, 112, 0.28);
}

.gallery-filter.is-active i,
.gallery-filter.is-active .gallery-filter-count {
    color: #fff;
}

.gallery-filter.is-active .gallery-filter-count {
    background: rgba(255, 255, 255, 0.22);
}

/* --- Mosaic grid -------------------------------------------------------- */

.gallery-mosaic {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: 210px;
    grid-auto-flow: dense;
    gap: 16px;
}

.gallery-tile {
    position: relative;
    display: block;
    padding: 0;
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    background: #dbe4ee;
    cursor: zoom-in;
    text-align: start;
    isolation: isolate;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.45s ease;
}

.gallery-tile[hidden] {
    display: none !important;
}

.gallery-tile.is-wide {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
}

.gallery-tile-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(7, 13, 24, 0.05) 0%, rgba(7, 13, 24, 0.02) 45%, rgba(7, 13, 24, 0.85) 100%);
    opacity: 0.85;
    transition: opacity 0.4s ease;
}

.gallery-tile-shade::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: inherit;
    transition: border-color 0.4s ease;
}

.gallery-tile-meta {
    position: absolute;
    inset-inline: 0.9rem;
    bottom: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    transform: translateY(4px);
    opacity: 0.92;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.gallery-tile-album {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem 0.7rem;
    border-radius: 999px;
    background: rgba(7, 13, 24, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.gallery-tile-album i {
    color: var(--gallery-gold);
    flex-shrink: 0;
}

.gallery-tile-zoom {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    font-size: 0.78rem;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s ease;
}

.gallery-tile-index {
    position: absolute;
    top: 0.85rem;
    inset-inline-end: 0.9rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.gallery-tile:hover,
.gallery-tile:focus-visible {
    transform: translateY(-4px);
    box-shadow: 0 24px 48px -18px rgba(7, 13, 24, 0.55);
    outline: none;
}

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

.gallery-tile:hover .gallery-tile-shade::after,
.gallery-tile:focus-visible .gallery-tile-shade::after {
    border-color: rgba(212, 168, 67, 0.85);
}

.gallery-tile:hover .gallery-tile-zoom,
.gallery-tile:focus-visible .gallery-tile-zoom {
    opacity: 1;
    transform: scale(1);
}

.gallery-tile:hover .gallery-tile-meta,
.gallery-tile:focus-visible .gallery-tile-meta {
    transform: translateY(0);
    opacity: 1;
}

/* Scroll reveal (added by JS only) */
.gallery-tile--reveal {
    opacity: 0;
    transform: translateY(26px);
}

.gallery-tile--reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.gallery-empty {
    padding: 4rem 1rem;
    text-align: center;
    color: #7b8798;
}

/* --- Outro CTA ---------------------------------------------------------- */

.gallery-outro {
    padding: 0 0 clamp(3.5rem, 7vw, 6rem);
}

.gallery-outro-box {
    position: relative;
    overflow: hidden;
    padding: clamp(2rem, 5vw, 3.5rem);
    border-radius: 26px;
    background:
        radial-gradient(700px 320px at 90% 0%, rgba(45, 212, 191, 0.28), transparent 65%),
        linear-gradient(120deg, #0b1220 0%, #0f172a 55%, #0d3f3a 100%);
    color: #fff;
    text-align: center;
}

.gallery-outro-box::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 80px 100%;
    pointer-events: none;
}

.gallery-outro-box h2 {
    position: relative;
    margin: 1rem 0 0.6rem;
    font-size: clamp(1.6rem, 3.4vw, 2.5rem);
    font-weight: 800;
}

.gallery-outro-box p {
    position: relative;
    margin: 0 auto 1.75rem;
    max-width: 520px;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.8;
}

.gallery-outro-box .gallery-eyebrow {
    position: relative;
}

.gallery-outro-box .gallery-cta {
    position: relative;
    align-self: center;
}

/* ==========================================================================
   3. Lightbox
   ========================================================================== */

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 4vw, 3rem);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

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

.gallery-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 8, 16, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.gallery-lightbox-figure {
    position: relative;
    z-index: 2;
    margin: 0;
    max-width: min(1100px, 88vw);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
}

.gallery-lightbox-figure img {
    max-width: 100%;
    max-height: 76vh;
    width: auto;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
    object-fit: contain;
    background: #0b1220;
}

.gallery-lightbox-caption {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.66);
}

.gallery-lightbox-album {
    color: var(--gallery-gold);
    font-weight: 700;
}

.gallery-lightbox-counter {
    padding-inline-start: 0.75rem;
    border-inline-start: 1px solid rgba(255, 255, 255, 0.2);
    letter-spacing: 0.08em;
}

.gallery-lightbox-close,
.gallery-lightbox-arrow {
    position: absolute;
    z-index: 3;
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.gallery-lightbox-close:hover,
.gallery-lightbox-arrow:hover {
    background: var(--gallery-gold);
    border-color: var(--gallery-gold);
    color: #161003;
    transform: scale(1.06);
}

.gallery-lightbox-close {
    top: clamp(1rem, 3vw, 2rem);
    inset-inline-end: clamp(1rem, 3vw, 2rem);
}

.gallery-lightbox-arrow.is-prev {
    inset-inline-start: clamp(0.75rem, 3vw, 2rem);
    top: 50%;
    transform: translateY(-50%);
}

.gallery-lightbox-arrow.is-next {
    inset-inline-end: clamp(0.75rem, 3vw, 2rem);
    top: 50%;
    transform: translateY(-50%);
}

.gallery-lightbox-arrow.is-prev:hover {
    transform: translateY(-50%) scale(1.06);
}

.gallery-lightbox-arrow.is-next:hover {
    transform: translateY(-50%) scale(1.06);
}

body.gallery-lightbox-open {
    overflow: hidden;
}

/* ==========================================================================
   4. Responsive
   ========================================================================== */

@media (max-width: 1199.98px) {
    .gallery-mosaic {
        grid-auto-rows: 190px;
    }

    .gallery-content {
        padding-inline-end: clamp(1.5rem, 5vw, 5rem);
    }
}

@media (max-width: 991.98px) {
    .gallery-showcase {
        min-height: 580px;
    }

    .gallery-rail {
        display: none;
    }

    .gallery-content {
        padding: 1.75rem;
    }

    .gallery-head {
        gap: 1.25rem;
    }

    .gallery-intro-wrap {
        max-width: 320px;
    }

    .gallery-controls {
        width: min(340px, 46%);
    }

    .gallery-mosaic {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-auto-rows: 180px;
    }

    .gallery-toolbar {
        top: 76px;
    }
}

@media (max-width: 767.98px) {
    .gallery-showcase {
        height: auto;
        min-height: 100svh;
        max-height: none;
    }

    .gallery-content {
        min-height: 100svh;
        gap: 1.5rem;
        padding: 1.5rem;
        justify-content: space-between;
    }

    .gallery-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .gallery-intro-wrap {
        max-width: 100%;
        padding-top: 0;
        gap: 0.9rem;
    }

    .gallery-intro {
        display: none;
    }

    .gallery-title {
        margin-top: 0.6rem;
    }

    .gallery-bottom {
        flex-direction: column;
        align-items: stretch;
        gap: 1.4rem;
    }

    .gallery-caption {
        max-width: 100%;
    }

    .gallery-caption-title {
        font-size: 1.4rem;
    }

    .gallery-caption-text {
        display: none;
    }

    .gallery-controls {
        width: 100%;
    }

    .gallery-count b {
        font-size: 1.5rem;
    }

    .gallery-arrow {
        width: 44px;
        height: 44px;
    }

    .gallery-hint {
        display: none;
    }

    .gallery-hero {
        padding-top: 3rem;
    }

    .gallery-hero-mosaic {
        grid-template-columns: 1fr;
    }

    .gallery-hero-mosaic img:not(:first-child) {
        display: none;
    }

    .gallery-toolbar {
        position: relative;
        top: 0;
        padding: 1rem;
        border-radius: 16px;
    }

    .gallery-toolbar-heading {
        display: none;
    }

    .gallery-filters {
        flex-wrap: nowrap;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.25rem;
        scrollbar-width: none;
    }

    .gallery-filters::-webkit-scrollbar {
        display: none;
    }

    .gallery-mosaic {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: 160px;
        gap: 10px;
    }

    .gallery-tile {
        border-radius: 14px;
    }

    .gallery-tile.is-wide {
        grid-column: span 2;
        grid-row: span 1;
    }

    .gallery-tile-album {
        font-size: 0.66rem;
        padding: 0.3rem 0.55rem;
    }

    .gallery-lightbox-figure {
        max-width: 92vw;
    }

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

    .gallery-lightbox-caption {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }

    .gallery-lightbox-counter {
        padding-inline-start: 0;
        border-inline-start: 0;
    }

    .gallery-lightbox-arrow {
        width: 42px;
        height: 42px;
        bottom: 1.25rem;
        top: auto;
        transform: none;
    }

    .gallery-lightbox-arrow.is-prev {
        top: auto;
        transform: none;
        inset-inline-start: calc(50% - 52px);
    }

    .gallery-lightbox-arrow.is-next {
        top: auto;
        transform: none;
        inset-inline-end: calc(50% - 52px);
    }

    .gallery-lightbox-arrow.is-prev:hover,
    .gallery-lightbox-arrow.is-next:hover {
        transform: scale(1.06);
    }

    .gallery-lightbox-close {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 575.98px) {
    .gallery-stats {
        gap: 1.25rem;
    }

    .gallery-mosaic {
        grid-auto-rows: 138px;
    }

    .gallery-tile-index {
        top: 0.6rem;
        inset-inline-end: 0.65rem;
    }

    .gallery-tile-meta {
        inset-inline: 0.6rem;
        bottom: 0.6rem;
    }

    .gallery-tile-zoom {
        display: none;
    }

    .gallery-tile-album {
        max-width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gallery-slide.is-active img {
        animation: none;
        transform: none;
    }

    .gallery-progress i {
        animation-duration: var(--gallery-speed, 6s);
    }
}
