/* ==========================================================
   Double H Danes — Gallery page
   ========================================================== */

/* ---------- Header / nav ---------- */
.gallery-header {
    position: sticky;
    top: 0;
    z-index: 100;
    /* override the full-screen hero <header> styles from style.css */
    height: auto;
    background: #fff;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.gallery-header .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}

.gallery-logo {
    height: 50px;
    width: auto;
    display: block;
}

.gallery-nav {
    list-style: none;
    margin: 0;
    display: flex;
    align-items: center;
}

.gallery-nav li {
    margin-left: 30px;
}

.gallery-nav li a {
    text-decoration: none;
    color: #555;
    text-transform: uppercase;
    font-size: 88%;
    letter-spacing: 1px;
    padding-bottom: 6px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.gallery-nav li a:hover,
.gallery-nav li a.current {
    color: #e67e22;
    border-bottom: 2px solid #e67e22;
}

.gallery-nav-icon {
    display: none;
    cursor: pointer;
    font-size: 200%;
    color: #333;
}

/* ---------- Section + intro ---------- */
.section-gallery {
    padding: 45px 0 70px;
}

.section-gallery h1 {
    text-align: center;
    font-size: 220%;
    margin-bottom: 10px;
}

.gallery-intro {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 28px;
    color: #777;
    line-height: 145%;
}

/* ---------- Filter buttons ---------- */
.gallery-filters {
    text-align: center;
    margin-bottom: 32px;
}

.gfilter {
    background: none;
    border: 1px solid #ddd;
    padding: 8px 22px;
    margin: 4px;
    border-radius: 30px;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 78%;
    letter-spacing: 1px;
    color: #555;
    font-family: inherit;
    transition: all 0.2s;
}

.gfilter:hover {
    border-color: #e67e22;
    color: #e67e22;
}

.gfilter.active {
    background: #e67e22;
    border-color: #e67e22;
    color: #fff;
}

.gcount {
    font-size: 90%;
    opacity: 0.7;
    margin-left: 4px;
}

/* ---------- Masonry grid (CSS columns) ---------- */
.gallery-grid {
    column-count: 4;
    column-gap: 12px;
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 15px;
}

@media (max-width: 1100px) { .gallery-grid { column-count: 3; } }
@media (max-width: 760px)  { .gallery-grid { column-count: 2; } }
@media (max-width: 460px)  { .gallery-grid { column-count: 1; } }

.gallery-item {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    margin: 0 0 12px;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 6px;
    background: #ececec;
    display: block;
}

.gallery-item img {
    width: 100%;
    display: block;
    transition: transform 0.45s ease, opacity 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.06);
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.25s;
}

.gallery-item:hover::after {
    background: rgba(0, 0, 0, 0.12);
}

.gallery-item.hidden {
    display: none;
}

/* ---------- Video tiles (no frame grab available) ---------- */
.gallery-video {
    min-height: 230px;
    background: linear-gradient(135deg, #2c2c2c, #4a4a4a);
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 66px;
    height: 66px;
    border-radius: 50%;
    background: rgba(230, 126, 34, 0.92);
    transition: transform 0.25s, background 0.25s;
    z-index: 2;
}

.play-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 13px 0 13px 21px;
    border-color: transparent transparent transparent #fff;
}

.gallery-video:hover .play-btn {
    transform: translate(-50%, -50%) scale(1.1);
    background: #e67e22;
}

.vlabel {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-size: 74%;
    letter-spacing: 2px;
    text-transform: uppercase;
    z-index: 2;
}

/* ---------- Lightbox ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.93);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox.open {
    display: flex;
}

.lb-stage {
    max-width: 92vw;
    max-height: 86vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lb-stage img,
.lb-stage video {
    max-width: 92vw;
    max-height: 86vh;
    box-shadow: 0 6px 40px rgba(0, 0, 0, 0.6);
    border-radius: 4px;
}

.lb-close,
.lb-prev,
.lb-next {
    position: absolute;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    opacity: 0.85;
    transition: opacity 0.2s, transform 0.2s;
    line-height: 1;
    font-family: inherit;
}

.lb-close:hover,
.lb-prev:hover,
.lb-next:hover {
    opacity: 1;
}

.lb-close {
    top: 18px;
    right: 28px;
    font-size: 44px;
}

.lb-prev,
.lb-next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 46px;
    padding: 12px 22px;
}

.lb-prev { left: 8px; }
.lb-next { right: 8px; }

.lb-prev:hover { transform: translateY(-50%) scale(1.15); }
.lb-next:hover { transform: translateY(-50%) scale(1.15); }

.lb-counter {
    position: absolute;
    bottom: 18px;
    left: 0;
    right: 0;
    text-align: center;
    color: #fff;
    font-size: 88%;
    letter-spacing: 2px;
    opacity: 0.8;
}

.lb-spinner {
    width: 46px;
    height: 46px;
    border: 4px solid rgba(255, 255, 255, 0.25);
    border-top-color: #e67e22;
    border-radius: 50%;
    animation: lb-spin 0.8s linear infinite;
}

@keyframes lb-spin {
    to { transform: rotate(360deg); }
}

/* ---------- Mobile nav ---------- */
@media (max-width: 767px) {
    .gallery-nav-icon {
        display: block;
    }

    .gallery-nav {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid #eee;
        box-shadow: 0 8px 14px rgba(0, 0, 0, 0.08);
        padding: 10px 24px 18px;
    }

    .gallery-nav.open {
        display: flex;
    }

    .gallery-nav li {
        margin: 10px 0 0;
    }

    .lb-close { font-size: 36px; top: 12px; right: 16px; }
    .lb-prev, .lb-next { font-size: 32px; padding: 8px 12px; }
}
