﻿/* ── HERO ── */
.gallery-hero {
    min-height: 55vh;
    padding: 90px 5vw 80px;
    background: var(--green-900);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

    .gallery-hero::before {
        content: '';
        position: absolute;
        inset: 0;
        background: url("data:image/svg+xml,%3Csvg width='80' height='80' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='40' cy='40' r='1' fill='rgba(255,255,255,0.04)'/%3E%3C/svg%3E") repeat;
    }

.gallery-hero-inner {
    max-width: 640px;
    position: relative;
    z-index: 1;
}

.gallery-hero .page-tag {
    background: rgba(255,255,255,0.1);
    color: var(--green-300);
    border-color: rgba(255,255,255,0.15);
}

.gallery-hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 3.8rem);
    font-weight: 800;
    color: white;
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    animation: fadeUp .7s .1s ease both;
}

    .gallery-hero h1 em {
        font-style: normal;
        color: var(--green-400);
    }

.gallery-hero p {
    font-size: 1rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.75;
    font-weight: 300;
    max-width: 500px;
    animation: fadeUp .7s .2s ease both;
}

/* ── GALLERY TABS ── */
.gallery-tabs {
    padding: 28px 5vw;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.gallery-tab {
    padding: 8px 20px;
    border-radius: 40px;
    border: 1.5px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

    .gallery-tab:hover {
        border-color: var(--green-300);
        color: var(--green-600);
        background: var(--green-50);
    }

    .gallery-tab.active {
        background: var(--green-600);
        color: white;
        border-color: var(--green-600);
    }

/* ── MASONRY GRID ── */
.gallery-section {
    padding: 60px 5vw 100px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 200px;
    gap: 16px;
}

.gallery-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform var(--transition);
    background: var(--green-800);
}

    .gallery-item:hover {
        transform: scale(1.02);
        z-index: 2;
    }

    .gallery-item.tall {
        grid-row: span 2;
    }

    .gallery-item.wide {
        grid-column: span 2;
    }

.gallery-item-bg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition);
}

.gallery-item:hover .gallery-item-bg {
    transform: scale(1.08);
}

.gallery-item-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
    display: block;
}

.gallery-item:hover .gallery-item-img {
    transform: scale(1.08);
}

.gallery-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
}

.gallery-empty i {
    font-size: 3rem;
    color: var(--green-300);
    margin-bottom: 16px;
    display: block;
}

.gallery-empty p {
    font-size: 1rem;
}

.gallery-item-bg.g1 {
    background: linear-gradient(135deg, #0d2618, #2a7a4a);
}

.gallery-item-bg.g2 {
    background: linear-gradient(135deg, #4a3520, #8b6644);
}

.gallery-item-bg.g3 {
    background: linear-gradient(135deg, #1a3a4a, #3a7a6a);
}

.gallery-item-bg.g4 {
    background: linear-gradient(135deg, #2a3a0a, #5a8a1a);
}

.gallery-item-bg.g5 {
    background: linear-gradient(135deg, #0d2618, #1e5535);
}

.gallery-item-bg.g6 {
    background: linear-gradient(135deg, #3a2a0a, #7a5a20);
}

.gallery-item-bg.g7 {
    background: linear-gradient(135deg, #1a1a3a, #3a3a7a);
}

.gallery-item-bg.g8 {
    background: linear-gradient(135deg, #2a0a0a, #6a2a2a);
}

.gallery-item-bg.g9 {
    background: linear-gradient(135deg, #0a2a1a, #1a6a3a);
}

.gallery-item-bg i {
    font-size: 3.5rem;
    color: rgba(255,255,255,0.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13,38,24,0.85) 0%, transparent 50%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay-content h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: white;
}

.gallery-overlay-content span {
    font-size: 0.75rem;
    color: var(--green-300);
}

.gallery-zoom-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition);
    transform: scale(0.8);
}

.gallery-item:hover .gallery-zoom-btn {
    opacity: 1;
    transform: scale(1);
}

/* ── LIGHTBOX ── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

    .lightbox.open {
        opacity: 1;
        pointer-events: all;
    }

.lightbox-inner {
    max-width: 900px;
    width: 90%;
    position: relative;
}

.lightbox-img {
    width: 100%;
    max-height: 80vh;
    border-radius: var(--radius-lg);
    background: var(--green-800);
    object-fit: contain;
    display: block;
}

.lightbox-close {
    position: absolute;
    top: -48px;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
}

    .lightbox-close:hover {
        background: rgba(255,255,255,0.3);
    }

.lightbox-caption {
    margin-top: 16px;
    text-align: center;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

/* ── VIDEO SECTION ── */
.video-section {
    padding: 0 5vw 80px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 20px;
    margin-top: 40px;
}

.video-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--green-900);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
}

    .video-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
    }

.video-thumb {
    aspect-ratio: 16/9;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

    .video-thumb.vt1 {
        background: linear-gradient(140deg, var(--green-700), var(--green-900));
    }

    .video-thumb.vt2 {
        background: linear-gradient(140deg, var(--earth-500), var(--earth-900, #1a1208));
    }

    .video-thumb.vt3 {
        background: linear-gradient(140deg, #1a3a4a, #0a1e28);
    }

.video-play {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255,255,255,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: all var(--transition);
    padding-left: 4px;
}

.video-card:hover .video-play {
    background: var(--green-500);
    border-color: var(--green-400);
    transform: scale(1.1);
}

.video-info {
    padding: 16px 18px;
}

    .video-info h4 {
        font-family: var(--font-display);
        font-size: 0.95rem;
        font-weight: 700;
        color: white;
        margin-bottom: 4px;
    }

    .video-info span {
        font-size: 0.78rem;
        color: var(--green-400);
    }

.video-card--dynamic {
    cursor: pointer;
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-item.wide {
        grid-column: span 1;
    }

    .video-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 560px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item.tall, .gallery-item.wide {
        grid-row: span 1;
        grid-column: span 1;
    }

    .video-grid {
        grid-template-columns: 1fr;
    }
}

/* ── TOP STRIP (vitrin: foto + video) ── */
.gallery-top-strip {
    padding: 32px 5vw 8px;
    background: var(--white);
}

.gallery-top-strip-inner {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.gallery-hero-card {
    position: relative;
    flex: 0 0 min(320px, 85vw);
    scroll-snap-align: start;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--green-900);
    min-height: 200px;
}

.gallery-hero-card--video {
    cursor: pointer;
}

.gallery-hero-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.gallery-hero-card-placeholder {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(140deg, var(--green-700), var(--green-900));
    color: rgba(255,255,255,0.35);
    font-size: 3rem;
}

.gallery-hero-card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    pointer-events: none;
}

.gallery-hero-card-meta {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 16px;
    background: linear-gradient(to top, rgba(13,38,24,0.9), transparent);
    color: white;
    pointer-events: none;
}

.gallery-hero-card-meta strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.gallery-hero-card-meta span {
    font-size: 0.78rem;
    color: var(--green-300);
}

.gallery-hero-zoom {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.35);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.gallery-hero-card--video .gallery-hero-zoom {
    display: none;
}

/* ── VIDEO THUMB (dynamic) ── */
.video-thumb--poster {
    position: relative;
}

.video-thumb--poster img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumb--poster .video-play {
    position: relative;
    z-index: 1;
}

/* ── VIDEO MODAL ── */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
}

.video-modal.open {
    opacity: 1;
    pointer-events: all;
}

.video-modal-inner {
    width: min(960px, 94vw);
    position: relative;
}

.video-modal-player {
    width: 100%;
    max-height: 85vh;
    border-radius: var(--radius-lg);
    background: black;
}

.video-modal-close {
    position: absolute;
    top: -44px;
    right: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-close:hover {
    background: rgba(255,255,255,0.22);
}
