/**
 * Gallery page (slug: gallery / gallery-my) — image grid + lightbox slider.
 * Loaded after ytaa-pages.css so it can reuse the shared page tokens.
 */

.ytaa-gallery-hero { padding: 10px 0 40px; text-align: center; }
.ytaa-gallery-hero h1 { font-size: clamp(2.3rem, 4.5vw, 3.2rem); font-weight: 800; margin: 0; color: var(--ytaa-dark); }
.ytaa-gallery-hero__eyebrow { font-size: clamp(1.05rem, 1.6vw, 1.25rem); font-weight: 700; color: var(--ytaa-orange); margin: 8px 0 0; }
.ytaa-gallery-hero__desc { color: var(--ytaa-text); line-height: 1.75; margin: 16px auto 0; max-width: 720px; }
.ytaa-gallery-hero__count { display: inline-block; margin-top: 18px; padding: 8px 18px; border-radius: 999px; background: var(--ytaa-peach-light); border: 1px solid var(--ytaa-border); color: var(--ytaa-dark); font-weight: 600; font-size: 0.9rem; }

.ytaa-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
    padding-bottom: 70px;
}

.ytaa-gallery-item {
    display: block;
    position: relative;
    padding: 0;
    border: 0;
    margin: 0;
    cursor: zoom-in;
    background: var(--ytaa-peach-light);
    border-radius: var(--ytaa-radius-md);
    overflow: hidden;
    box-shadow: var(--ytaa-shadow);
    aspect-ratio: 4 / 3;
}

.ytaa-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s ease;
}

.ytaa-gallery-item:hover img,
.ytaa-gallery-item:focus-visible img { transform: scale(1.06); }

.ytaa-gallery-item:focus-visible { outline: 3px solid var(--ytaa-orange); outline-offset: 3px; }

.ytaa-gallery-item__caption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 26px 14px 12px;
    background: linear-gradient(to top, rgba(13, 13, 13, .78), rgba(13, 13, 13, 0));
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: left;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .3s ease, transform .3s ease;
}

.ytaa-gallery-item:hover .ytaa-gallery-item__caption,
.ytaa-gallery-item:focus-visible .ytaa-gallery-item__caption { opacity: 1; transform: none; }

.ytaa-gallery-empty { padding: 40px 0 90px; text-align: center; color: var(--ytaa-text); }

/* ---------- lightbox ---------- */

.ytaa-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    background: rgba(16, 10, 4, .92);
    align-items: center;
    justify-content: center;
}

.ytaa-lightbox.is-open { display: flex; }

.ytaa-lightbox__stage {
    position: relative;
    width: min(1100px, 92vw);
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.ytaa-lightbox__img {
    max-width: 100%;
    max-height: 74vh;
    object-fit: contain;
    border-radius: var(--ytaa-radius-md);
    background: #100a04;
    box-shadow: 0 30px 60px -25px rgba(0, 0, 0, .8);
}

.ytaa-lightbox__img.is-loading { opacity: .35; }

.ytaa-lightbox__meta { color: #f7e9d8; text-align: center; font-size: 0.92rem; line-height: 1.5; }
.ytaa-lightbox__meta strong { display: block; font-size: 1.02rem; font-weight: 700; color: #fff; }
.ytaa-lightbox__counter { display: block; margin-top: 4px; color: var(--ytaa-peach); font-weight: 600; font-size: 0.85rem; }

.ytaa-lightbox__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .25s ease;
}

.ytaa-lightbox__btn:hover { background: var(--ytaa-orange); }
.ytaa-lightbox__btn:focus-visible { outline: 3px solid var(--ytaa-orange); outline-offset: 3px; }
.ytaa-lightbox__btn--prev { left: -68px; }
.ytaa-lightbox__btn--next { right: -68px; }

.ytaa-lightbox__close {
    position: fixed;
    top: 22px;
    right: 24px;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.ytaa-lightbox__close:hover { background: var(--ytaa-orange); }

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

@media (max-width: 900px) {
    .ytaa-lightbox__btn--prev { left: 6px; }
    .ytaa-lightbox__btn--next { right: 6px; }
    .ytaa-lightbox__btn { width: 44px; height: 44px; background: rgba(0, 0, 0, .5); }
}

@media (max-width: 600px) {
    .ytaa-gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .ytaa-lightbox__img { max-height: 66vh; }
}
