/* HVN Gallery v1.2.0 */

.hvn-gallery-wrap { margin: 20px 0; }
.hvn-gallery-grid { display: grid; gap: 12px; }
.hvn-cols-4 { grid-template-columns: repeat(4, 1fr); }
.hvn-cols-3 { grid-template-columns: repeat(3, 1fr); }
.hvn-cols-2 { grid-template-columns: repeat(2, 1fr); }
.hvn-cols-1 { grid-template-columns: 1fr; }
@media (max-width: 700px) { .hvn-cols-4 { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 480px) { .hvn-cols-4,.hvn-cols-3 { grid-template-columns: repeat(2,1fr); } }

.hvn-gal-thumb {
    display: block;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 6px;
    border: 2px solid #3c6645;
    cursor: zoom-in;
    background: #1a3324;
    position: relative;
}
.hvn-gal-thumb img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform 0.4s ease, filter 0.3s ease;
}
.hvn-gal-thumb:hover img {
    transform: scale(1.07);
    filter: brightness(1.08);
}

/* ── Overlay ───────────────────────────────── */
.hvn-lb-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0);
    transition: background 0.38s ease;
}
.hvn-lb-overlay.hvn-lb-visible { display: flex; }
.hvn-lb-overlay.hvn-lb-open    { background: rgba(0,0,0,0.88); }

/* ── White expanding box ───────────────────── */
.hvn-lb-box {
    position: fixed;
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    /* Animate position and size */
    transition:
        top    0.4s cubic-bezier(0.4,0,0.2,1),
        left   0.4s cubic-bezier(0.4,0,0.2,1),
        width  0.4s cubic-bezier(0.4,0,0.2,1),
        height 0.4s cubic-bezier(0.4,0,0.2,1),
        box-shadow 0.4s ease,
        border-radius 0.4s ease;
}
.hvn-lb-box.hvn-lb-expanded {
    box-shadow: 0 40px 100px rgba(0,0,0,0.65);
    border-radius: 6px;
}

/* ── Image inside box ──────────────────────── */
.hvn-lb-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* ── Buttons ───────────────────────────────── */
.hvn-lb-prev,
.hvn-lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    font-size: 2.6rem;
    padding: 14px 20px;
    cursor: pointer;
    border-radius: 6px;
    line-height: 1;
    z-index: 100001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease 0.32s, background 0.2s ease;
}
.hvn-lb-prev { left: 14px; }
.hvn-lb-next { right: 14px; }
.hvn-lb-overlay.hvn-lb-open .hvn-lb-prev,
.hvn-lb-overlay.hvn-lb-open .hvn-lb-next {
    opacity: 1;
    pointer-events: auto;
}
.hvn-lb-prev:hover,.hvn-lb-next:hover {
    background: rgba(184,154,104,0.5);
}

.hvn-lb-close {
    position: fixed;
    top: 14px; right: 18px;
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    width: 40px; height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease 0.32s, background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hvn-lb-overlay.hvn-lb-open .hvn-lb-close {
    opacity: 1;
    pointer-events: auto;
}
.hvn-lb-close:hover { background: rgba(192,57,43,0.75); }

.hvn-lb-counter {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.5);
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: .8rem;
    letter-spacing: .06em;
    z-index: 100001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease 0.32s;
    white-space: nowrap;
}
.hvn-lb-overlay.hvn-lb-open .hvn-lb-counter { opacity: 1; }
