/* =====================================================
   Piero Aero — Gallery
   Load after responsive.css
   ===================================================== */

:root {
    --gallery-dark: #080b0f;
    --gallery-dark-soft: #ffffff;
    --gallery-warm: #faf6ec;
    --gallery-gold: #9a711d;
    --gallery-champagne: #e1c98e;
    --gallery-border: rgba(154, 113, 29, 0.22);
}

body.gallery-open {
    overflow: hidden;
}

.gallery-page {
    background: #ffffff;
}

/* Intro */
.gallery-intro {
    position: relative;
    padding: clamp(9rem, 14vw, 13rem) var(--container-padding) clamp(4rem, 7vw, 7rem);
    overflow: hidden;
    color: #ffffff;

    background:
      /*  linear-gradient(
            rgba(3, 5, 6, 0.38),
            rgba(3, 5, 6, 0.55)
        ),*/
        url("/assets/img/back_gen.jpg");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.gallery-intro::after {
    content: "";
    position: absolute;
    left: var(--container-padding);
    right: var(--container-padding);
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(225, 201, 142, 0.65), transparent);
}

.gallery-intro-inner {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 1.1rem;
}

.gallery-intro .eyebrow,
.gallery-lightbox .eyebrow {
    color: var(--gallery-champagne);
}

.gallery-intro h1 {
    max-width: 11ch;
    color: #ffffff;
}

.gallery-intro p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.68);
    font-size: clamp(1rem, 1.4vw, 1.2rem);
}

/* Aircraft section */
.gallery-aircraft {
    padding: clamp(4.5rem, 8vw, 8rem) var(--container-padding);
    background: #ffffff;
}

.gallery-aircraft-heading {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: clamp(1rem, 2vw, 1.6rem);
    align-items: end;
    padding-bottom: clamp(2rem, 4vw, 3.5rem);
    border-bottom: 1px solid var(--gallery-border);
}

.gallery-aircraft-number {
    display: grid;
    place-items: center;
    width: clamp(48px, 5vw, 64px);
    aspect-ratio: 1;
    border: 1px solid rgba(154, 113, 29, 0.48);
    color: #8a6417;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
}

.gallery-aircraft-heading h2 {
    margin: 0;
}

.gallery-category {
    padding-top: clamp(3rem, 6vw, 5rem);
}

.gallery-category + .gallery-category {
    margin-top: clamp(4rem, 7vw, 7rem);
    padding-top: clamp(3rem, 5vw, 4.5rem);
    border-top: 1px solid var(--gallery-border);
}

.gallery-category-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: clamp(1.4rem, 2.5vw, 2.2rem);
}

.gallery-category-heading h3 {
    color: #1b1d20;
    font-size: clamp(1.55rem, 2.6vw, 2.35rem);
}

.gallery-category-count {
    flex: 0 0 auto;
    color: #8a6417;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* Explorer-like overview */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.9rem, 1.5vw, 1.35rem);
}

.gallery-thumb {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    padding: 0;
    overflow: hidden;
    background: var(--gallery-dark-soft);
    border: 1px solid rgba(154, 113, 29, 0.17);
    cursor: zoom-in;
    isolation: isolate;
}

.gallery-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    border: 1px solid transparent;
    background: linear-gradient(180deg, transparent 56%, rgba(0, 0, 0, 0.22));
    transition: border-color 260ms ease, background 260ms ease;
    pointer-events: none;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.001);
    transition: transform 650ms cubic-bezier(0.22, 1, 0.36, 1), filter 350ms ease;
}

.gallery-thumb:hover img,
.gallery-thumb:focus-visible img {
    transform: scale(1.035);
}

.gallery-thumb:hover::after,
.gallery-thumb:focus-visible::after {
    border-color: rgba(225, 201, 142, 0.75);
    background: linear-gradient(180deg, transparent 52%, rgba(0, 0, 0, 0.34));
}

.gallery-empty-state {
    min-height: 180px;
    display: grid;
    place-items: center;
    padding: 2rem;
    border: 1px dashed rgba(154, 113, 29, 0.32);
    background: var(--gallery-warm);
    color: #7a7469;
    text-align: center;
}

/* =====================================================
   Lightbox / slideshow
   ===================================================== */
.gallery-lightbox[hidden] {
    display: none;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 0.5rem;
}

.gallery-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 4, 6, 0.93);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.gallery-lightbox-dialog {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: calc(100vw - 1rem);
    height: calc(100vh - 1rem);
	max-width: none;
    max-height: none;
    min-height: 0;
    overflow: hidden;
    background: #080b0f;
    border: 1px solid rgba(225, 201, 142, 0.34);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
}

.gallery-lightbox-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 72px;
    padding: 0.85rem 1rem 0.85rem clamp(1rem, 2vw, 1.5rem);
    border-bottom: 1px solid rgba(225, 201, 142, 0.2);
}

.gallery-lightbox-heading {
    display: flex;
    align-items: baseline;
    gap: 1rem;
    min-width: 0;
}

.gallery-lightbox-heading h2 {
    overflow: hidden;
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.1rem, 2vw, 1.55rem);
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-lightbox-close {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
    transition: background 200ms ease, border-color 200ms ease;
}

.gallery-lightbox-close:hover,
.gallery-lightbox-close:focus-visible {
    background: rgba(154, 113, 29, 0.72);
    border-color: rgba(255, 255, 255, 0.6);
}

.gallery-stage {
    position: relative;
    min-height: 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 45%, #20242b 0%, #111419 52%, #06080b 100%);
    cursor: pointer;
}

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

.gallery-stage-image {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    object-fit: contain;
    object-position: center;
    opacity: 0;
    transform: scale(1.006);
    transition: opacity 1.4s ease-in-out, transform 5.8s ease-out;
    pointer-events: none;
}

.gallery-stage-image.is-active {
    z-index: 1;
    opacity: 1;
    transform: scale(1.025);
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    color: #ffffff;
    background: rgba(8, 10, 13, 0.56);
    font-size: 2.2rem;
    line-height: 1;
    transform: translateY(-50%);
    transition: background 200ms ease, border-color 200ms ease, opacity 200ms ease;
}

.gallery-arrow:hover,
.gallery-arrow:focus-visible {
    background: rgba(122, 90, 29, 0.88);
    border-color: rgba(255, 255, 255, 0.72);
}

.gallery-prev {
    left: clamp(0.65rem, 2vw, 1.5rem);
}

.gallery-next {
    right: clamp(0.65rem, 2vw, 1.5rem);
}

.gallery-play-toggle {
    position: absolute;
    right: clamp(0.75rem, 2vw, 1.4rem);
    bottom: clamp(0.75rem, 2vw, 1.4rem);
    z-index: 6;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 42px;
    padding: 0.65rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    color: #ffffff;
    background: rgba(8, 10, 13, 0.64);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.gallery-play-toggle:hover,
.gallery-play-toggle:focus-visible {
    background: rgba(8, 10, 13, 0.88);
}

.gallery-play-icon {
    display: inline-flex;
    min-width: 1rem;
    justify-content: center;
    color: var(--gallery-champagne);
    font-weight: 700;
}

.gallery-image-meta {
    position: absolute;
    left: clamp(0.75rem, 2vw, 1.4rem);
    bottom: clamp(0.75rem, 2vw, 1.4rem);
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    max-width: min(65%, 700px);
    padding: 0.6rem 0.8rem;
    color: rgba(255, 255, 255, 0.86);
    background: rgba(8, 10, 13, 0.52);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 0.82rem;
}

.gallery-image-meta [data-gallery-position] {
    flex: 0 0 auto;
    color: var(--gallery-champagne);
    font-weight: 700;
}

.gallery-filmstrip-wrap {
    position: relative;
    min-width: 0;
    padding: 0.8rem;
    background: #07090c;
    border-top: 1px solid rgba(225, 201, 142, 0.2);
}

.gallery-filmstrip {
    display: flex;
    gap: 0.55rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    scrollbar-color: #6e6553 #15181d;
}

.gallery-filmstrip-button {
    position: relative;
    flex: 0 0 clamp(94px, 10vw, 150px);
    aspect-ratio: 16 / 10;
    padding: 0;
    overflow: hidden;
    scroll-snap-align: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: #15181d;
    opacity: 0.58;
    transition: opacity 180ms ease, border-color 180ms ease, transform 180ms ease;
}

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

.gallery-filmstrip-button:hover,
.gallery-filmstrip-button:focus-visible,
.gallery-filmstrip-button.is-active {
    opacity: 1;
    border-color: var(--gallery-champagne);
}

.gallery-filmstrip-button.is-active {
    transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 980px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gallery-lightbox {
        padding: 0;
    }

    .gallery-lightbox-dialog {
        width: 100%;
        height: 100dvh;
        max-height: none;
        border: 0;
    }
}

@media (max-width: 640px) {
    .gallery-intro {
        padding-top: clamp(7.5rem, 28vw, 9rem);
    }

    .gallery-aircraft-heading {
        align-items: center;
    }

    .gallery-category-heading {
        align-items: flex-end;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .gallery-thumb {
        aspect-ratio: 16 / 11;
    }

    .gallery-lightbox-header {
        min-height: 64px;
    }

    .gallery-lightbox-heading .eyebrow {
        display: none;
    }

    .gallery-arrow {
        width: 44px;
        height: 44px;
        font-size: 1.8rem;
    }

    .gallery-image-meta {
        right: auto;
        bottom: 0.75rem;
        max-width: calc(100% - 8.5rem);
    }

    .gallery-image-meta [data-gallery-caption] {
        display: none;
    }

    .gallery-play-toggle {
        right: 0.75rem;
        bottom: 0.75rem;
    }

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

@media (prefers-reduced-motion: reduce) {
    .gallery-thumb img,
    .gallery-stage-image,
    .gallery-filmstrip-button {
        transition-duration: 0.001ms !important;
        transform: none !important;
    }
}

.gallery-grid > .gallery-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
}

.gallery-grid > .gallery-thumb > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.gallery-thumb {
    background: #ffffff;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: none;
}

.gallery-thumb:hover img,
.gallery-thumb:focus-visible img {
    transform: none;
}

.gallery-thumb::after,
.gallery-thumb:hover::after,
.gallery-thumb:focus-visible::after {
    background: transparent;
}

/* Let the page underneath remain visible around the lightbox */
.gallery-lightbox-backdrop {
    background: rgba(2, 4, 6, 0.55);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Main slideshow images: no zoom / pan, only a soft crossfade */
.gallery-stage-image {
    transform: none !important;
    transition: opacity 1.4s ease-in-out !important;
    object-fit: contain;
    object-position: center;
}

.gallery-stage-image.is-active {
    transform: none !important;
}


/* =====================================================
   2026 Gallery restructuring: Overview + separate PJ I / III
   Scope is limited to the gallery pages.
   ===================================================== */

.page-gallery .gallery-intro h1 {
    max-width: none;
    color: #f7e3aa;
}

.gallery-overview {
    background: linear-gradient(180deg, #faf6ec, #f8f4e9);
    padding: clamp(3.25rem, 6vw, 6rem) var(--container-padding) clamp(5rem, 8vw, 8rem);
}

.gallery-overview-heading {
    max-width: 930px;
    margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.gallery-overview-heading .eyebrow {
    color: #8a6417;
    margin-bottom: 0.8rem;
}

.gallery-overview-heading h2 {
    color: #7a5a1d;
    font-size: clamp(2.2rem, 4vw, 4rem);
}

.gallery-overview-heading p {
    margin-top: 1rem;
    max-width: 700px;
    color: #4c4942;
    font-size: clamp(1rem, 1.2vw, 1.2rem);
}

.gallery-product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1rem, 2.8vw, 2.25rem);
}

.gallery-product-card {
    min-width: 0;
    display: block;
    color: #f7e3aa;
    background: #17191b;
    border: 1px solid rgba(165, 123, 44, 0.5);
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(14, 16, 19, 0.15);
    transition: transform 320ms ease, box-shadow 320ms ease, border-color 320ms ease;
}

.gallery-product-media {
    position: relative;
    width: 100%;
    aspect-ratio: 1.6 / 1;
    overflow: hidden;
    background: radial-gradient(circle at 50% 35%, #373b3f, #141617 70%);
}

.gallery-product-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 700ms ease;
}

/* PJ I: aircraft photo is now a real <img> in gallery.html. */
.gallery-product-media-pji {
    background: radial-gradient(circle at 42% 38%, #4c4940, #181a1b 74%);
}

.gallery-product-watermark {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: clamp(7rem, 24vw, 18rem);
    line-height: 1;
    color: rgba(235, 202, 124, 0.10);
    font-weight: 200;
    pointer-events: none;
}

.gallery-product-copy {
    padding: clamp(1.4rem, 2.5vw, 2.2rem);
    background: linear-gradient(140deg, #232526, #131516);
}

.gallery-product-kicker {
    display: block;
    color: #d4b56d;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

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

.gallery-product-title h3 {
    color: #f7e3aa;
    font-size: clamp(1.75rem, 2.5vw, 2.55rem);
}

.gallery-product-title > span {
    color: #e1c98e;
    font-size: 1.55rem;
    font-weight: 300;
}

.gallery-product-copy p {
    margin-top: 0.9rem;
    color: rgba(244, 238, 220, 0.78);
    font-size: clamp(0.93rem, 1.1vw, 1.07rem);
    line-height: 1.6;
}

@media (hover: hover) {
    .gallery-product-card:hover {
        transform: translateY(-6px);
        border-color: rgba(225, 201, 142, 0.8);
        box-shadow: 0 26px 60px rgba(14, 16, 19, 0.25);
    }
    .gallery-product-card:hover .gallery-product-media img {
        transform: scale(1.035);
    }
}

.gallery-breadcrumb {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    padding: clamp(1.3rem, 2.5vw, 2rem) 0 0;
    color: #686159;
    font-size: 0.9rem;
}

.gallery-breadcrumb a {
    color: #7a5a1d;
    text-decoration: none;
}
.gallery-breadcrumb a:hover,
.gallery-breadcrumb a:focus-visible { text-decoration: underline; }

.page-gallery .gallery-aircraft {
    padding-top: clamp(2rem, 3.5vw, 3rem);
}

.page-gallery .gallery-aircraft-number {
    width: auto;
    min-width: 68px;
    height: 60px;
    aspect-ratio: auto;
    padding: 0.5rem 0.85rem;
    white-space: nowrap;
}

.page-gallery .gallery-empty-state {
    margin-top: 1.25rem;
}

.page-gallery .gallery-empty-state[hidden] { display: none; }

.page-gallery .gallery-empty-state p {
    margin: 0;
    color: #7a7469;
}

@media (max-width: 800px) {
    .gallery-product-grid { grid-template-columns: 1fr; }
    .gallery-product-media { aspect-ratio: 16 / 9; }
}

@media (max-width: 520px) {
    .gallery-breadcrumb { flex-wrap: wrap; }
    .gallery-product-title h3 { font-size: 1.75rem; }
    .gallery-overview { padding-bottom: 4rem; }
}

/* Align the breadcrumb with the padded gallery section on all viewports. */
.page-gallery .gallery-breadcrumb {
    width: calc(100% - (2 * var(--container-padding)));
    max-width: var(--container-max);
    margin-inline: auto;
}


/* ============================================================
   PIERO MOBILE LIGHTBOX — maximum image area
   Applies ONLY to the fullscreen slideshow on small screens.
   Desktop gallery, overview, thumbnails and other pages unchanged.
   ============================================================ */

/* Controls/labels generated by gallery.js. Hidden on desktop. */
.gallery-mobile-title,
.gallery-mobile-position,
.gallery-info-toggle {
    display: none;
}

@media (max-width: 900px),
       (orientation: landscape) and (max-height: 600px) and (max-width: 1180px) {

    .gallery-lightbox {
        position: fixed;
        inset: 0;
        display: block;
        width: 100%;
        height: 100%;
        height: 100dvh;
        padding: 0;
        margin: 0;
        background: #080b0f;
    }

    .gallery-lightbox-dialog {
        display: grid;
        grid-template-rows: 36px minmax(0, 1fr);
        width: 100%;
        height: 100%;
        height: 100dvh;
        min-height: 0;
        margin: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        max-width: none;
        max-height: none;
        box-shadow: none;
        background: #080b0f;
    }

    .gallery-lightbox-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        height: 36px;
        min-height: 0;
        max-height: none;
        padding: 0 6px 0 10px;
        gap: 6px;
        background: #090c10;
        border-bottom: 0;
        overflow: hidden;
    }

    .gallery-lightbox-heading {
        display: flex;
        flex: 1 1 auto;
        align-items: center;
        gap: 10px;
        min-width: 0;
        overflow: hidden;
    }

    .gallery-lightbox-heading > .eyebrow,
    .gallery-lightbox-heading > [data-gallery-lightbox-title] {
        display: none;
    }

    .gallery-lightbox-heading .gallery-mobile-title {
        display: block;
        flex: 0 1 auto;
        overflow: hidden;
        margin: 0;
        color: #e1c98e;
        font-size: 12px;
        font-weight: 600;
        line-height: 1.1;
        letter-spacing: 0;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .gallery-lightbox-heading .gallery-mobile-position {
        display: inline;
        flex: 0 0 auto;
        margin-left: auto;
        color: rgba(255,255,255,.65);
        font-size: 11px;
        font-weight: 500;
        line-height: 1;
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
    }

    .gallery-lightbox-close {
        flex: 0 0 32px;
        display: grid;
        place-items: center;
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: transparent;
        color: #fff;
        font-size: 27px;
        line-height: 1;
    }

    /* Fill the entire area below the tiny header. */
    .gallery-stage {
        display: block;
        position: relative;
        height: 100%;
        min-height: 0;
        width: 100%;
        padding: 0;
        overflow: hidden;
        background: #080b0f;
        touch-action: pan-y;
    }

    .gallery-stage-images {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }

    .gallery-stage-image,
    .gallery-stage-image.is-active {
        display: block;
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        margin: 0;
        padding: 0 !important;
        object-fit: contain;
        object-position: 50% 50%;
        transform: none !important;
    }

    /* The thumbnail filmstrip steals ~80px in landscape: remove it. */
    .gallery-filmstrip-wrap,
    .gallery-filmstrip {
        display: none !important;
    }

    /* Small overlay arrows, without taking any image height. */
    .gallery-arrow {
        position: absolute;
        top: 50%;
        display: grid;
        place-items: center;
        width: 32px;
        height: 38px;
        min-width: 0;
        min-height: 0;
        padding: 0;
        border: 0;
        border-radius: 6px;
        background: rgba(5,8,12,.28);
        color: #fff;
        font-size: 30px;
        line-height: 1;
        transform: translateY(-50%);
    }

    .gallery-prev { left: 2px; }
    .gallery-next { right: 2px; }

    /* Controls are overlaid in the lower corners, never below image. */
    .gallery-play-toggle {
        position: absolute;
        right: 6px;
        bottom: 6px;
        display: grid;
        place-items: center;
        width: 32px;
        height: 32px;
        min-width: 0;
        min-height: 0;
        padding: 0;
        gap: 0;
        border: 1px solid rgba(255,255,255,.20);
        border-radius: 50%;
        background: rgba(6,8,10,.55);
        font-size: 12px;
    }
    .gallery-play-text { display: none !important; }
    .gallery-play-icon { min-width: 0; font-size: 12px; line-height: 1; }

    .gallery-info-toggle {
        position: absolute;
        z-index: 7;
        left: 6px;
        bottom: 6px;
        display: grid;
        place-items: center;
        width: 32px;
        height: 32px;
        padding: 0;
        border: 1px solid rgba(255,255,255,.24);
        border-radius: 50%;
        background: rgba(6,8,10,.55);
        color: #e1c98e;
        font-family: Georgia,serif;
        font-size: 18px;
        font-weight: 600;
        font-style: italic;
        line-height: 1;
    }

    /* Caption is optional: tap the i control to show it. */
    .gallery-image-meta {
        display: none !important;
    }
    .gallery-lightbox.show-caption .gallery-image-meta {
        position: absolute;
        z-index: 6;
        left: 6px;
        right: 6px;
        bottom: 44px;
        display: block !important;
        width: auto;
        max-width: none;
        max-height: min(45dvh, 190px);
        overflow-y: auto;
        margin: 0;
        padding: 7px 9px;
        background: rgba(5,8,12,.90);
        border: 1px solid rgba(225,201,142,.30);
        color: #fff;
        font-size: 12px;
        line-height: 1.35;
        text-align: left;
    }
    .gallery-lightbox.show-caption [data-gallery-position] {
        display: none;
    }
    .gallery-lightbox.show-caption [data-gallery-caption] {
        display: inline !important;
        color: #fff;
    }
}

/* Landscape phones: even smaller header (~28px) for max image height. */
@media (orientation: landscape) and (max-height: 600px) and (max-width: 1180px) {
    .gallery-lightbox-dialog {
        grid-template-rows: 28px minmax(0, 1fr);
    }
    .gallery-lightbox-header { height: 28px; padding: 0 4px 0 8px; }
    .gallery-lightbox-heading .gallery-mobile-title { font-size: 11px; }
    .gallery-lightbox-heading .gallery-mobile-position { font-size: 10px; }
    .gallery-lightbox-close {
        width: 28px;
        height: 28px;
        min-width: 28px;
        min-height: 28px;
        flex-basis: 28px;
        font-size: 24px;
    }
}
