/* ==========================================================================
   OVLINK Consult Ltd — gallery.css
   Gallery page only. Requires base.css to be loaded first.
   ========================================================================== */

/* ============================= ALBUM ============================= */

.album { background: #fff; }

.album-head {
    max-width: var(--container);
    margin: 0 auto clamp(1.75rem, 3.5vw, 2.5rem);
}

.album-head h2 {
    font-size: clamp(1.25rem, 2.6vw, 1.65rem);
    color: var(--primary);
    line-height: 1.3;
    max-width: 34ch;
    margin-bottom: 1rem;
}

.album-meta {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.75rem;
    padding-bottom: 1.1rem;
    margin-bottom: 1.1rem;
    border-bottom: 1px solid var(--line);
}

.album-meta li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--muted);
    font-weight: 500;
}

.album-meta i { color: var(--accent); }

.album-intro {
    color: var(--text);
    font-size: 0.97rem;
    line-height: 1.75;
    max-width: 72ch;
}

/* ============================= GRID ============================= */

.grid {
    max-width: var(--container);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: clamp(1rem, 2vw, 1.5rem);
}

.shot { margin: 0; }

.shot-btn {
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--light);
    cursor: zoom-in;
    overflow: hidden;
    position: relative;
    line-height: 0;
}

.shot-btn img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.shot-btn:hover img,
.shot-btn:focus-visible img { transform: scale(1.04); }

.zoom {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background: rgba(26, 58, 95, 0.85);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 0.8rem;
    opacity: 0;
    transition: opacity 0.25s ease;
    line-height: 1;
}

.shot-btn:hover .zoom,
.shot-btn:focus-visible .zoom { opacity: 1; }

.shot figcaption {
    margin-top: 0.6rem;
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--muted);
}

.album-note {
    max-width: var(--container);
    margin: clamp(1.5rem, 3vw, 2rem) auto 0;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line);
    font-size: 0.89rem;
    color: var(--muted);
    max-width: 70ch;
}

/* =========================== LIGHTBOX =========================== */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(12, 20, 32, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1rem, 4vw, 3rem);
}

.lightbox[hidden] { display: none; }

.lb-figure {
    margin: 0;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
}

.lb-figure img {
    max-width: min(1100px, 90vw);
    max-height: 76vh;
    width: auto;
    height: auto;
    border-radius: 6px;
    object-fit: contain;
}

.lb-figure figcaption {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: center;
    max-width: 62ch;
}

.lb-close,
.lb-nav {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    cursor: pointer;
    border-radius: 8px;
    line-height: 1;
    transition: var(--transition);
}

.lb-close {
    top: clamp(0.75rem, 2vw, 1.5rem);
    right: clamp(0.75rem, 2vw, 1.5rem);
    width: 44px;
    height: 44px;
    font-size: 1.6rem;
}

.lb-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 62px;
    font-size: 2rem;
}

.lb-prev { left: clamp(0.5rem, 2vw, 1.5rem); }
.lb-next { right: clamp(0.5rem, 2vw, 1.5rem); }

.lb-close:hover, .lb-close:focus-visible,
.lb-nav:hover, .lb-nav:focus-visible {
    background: var(--accent);
    border-color: var(--accent);
    outline: none;
}

@media (max-width: 620px) {
    .lb-nav { width: 40px; height: 52px; font-size: 1.6rem; }
    .lb-figure img { max-height: 66vh; }
}