/* ============================================
   GALLERY PAGE — shared styles for all five
   section pages (Dolomites, Wildlife, etc.)
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400&display=swap');

/* Nav is always visible on gallery pages — no video-driven animation */
.nav--static {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   PAGE HEADER
   ============================================ */
.gallery-header {
    padding: 160px 52px 60px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gallery-back {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 0.7rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--white-dim);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s ease;
    width: fit-content;
}

.gallery-back:hover {
    color: var(--white);
}

.gallery-title {
    font-family: var(--font-title);
    font-weight: lighter;
    font-size: clamp(52px, 9vw, 120px);
    letter-spacing: 0.04em;
    line-height: 1;
    color: var(--white);
}

/* ============================================
   MASONRY GRID
   CSS columns — no JS needed, natural
   masonry packing for mixed aspect ratios
   ============================================ */
.gallery-masonry {
    columns: 3;
    column-gap: 6px;
    padding: 0 52px 120px;
}

.gallery-item {
    break-inside: avoid;
    display: block;
    width: 100%;
    margin-bottom: 6px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: #111;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1),
                filter 0.5s ease;
    filter: brightness(0.92);
}

.gallery-item:hover img {
    transform: scale(1.04);
    filter: brightness(1);
}

/* Placeholder items (shown until real photos are added) */
.gallery-item--ph {
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    align-items: flex-end;
    padding: 16px;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.gallery-item--ph:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: #161616;
}

.gallery-item--ph .ph-label {
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.12);
    pointer-events: none;
}

/* ============================================
   LIGHTBOX
   ============================================ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.96);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox[hidden] {
    display: none;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    display: block;
    user-select: none;
}

/* Close button */
.lightbox-close {
    position: fixed;
    top: 28px;
    right: 36px;
    background: none;
    border: none;
    color: var(--white-dim);
    font-size: 1.4rem;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    transition: color 0.2s ease;
    z-index: 2001;
}

.lightbox-close:hover { color: var(--white); }

/* Prev / Next arrows */
.lightbox-prev,
.lightbox-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--white-dim);
    font-size: 1.6rem;
    cursor: pointer;
    padding: 16px 20px;
    line-height: 1;
    transition: color 0.2s ease;
    z-index: 2001;
    user-select: none;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-prev:hover,
.lightbox-next:hover { color: var(--white); }

/* Counter */
.lightbox-counter {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 0.65rem;
    letter-spacing: 0.22em;
    color: var(--white-dim);
    z-index: 2001;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .gallery-header {
        padding: 120px 28px 40px;
    }

    .gallery-masonry {
        columns: 2;
        padding: 0 28px 80px;
    }
}

@media (max-width: 480px) {
    .gallery-masonry {
        columns: 1;
    }
}
