/* ============================================================
   GALLERY PAGE STYLES
   ============================================================ */

/* ---- HERO SECTION ---- */
.gallery-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #1a1a1a;
}

.gallery-hero-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.gallery-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
}

.gallery-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    padding: 0 1rem;
}

.gallery-hero-label {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--accent-soft);
    margin-bottom: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    backdrop-filter: blur(4px);
}

.gallery-hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-family: var(--font-head);
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.1;
    color: var(--primary);
}

.gallery-hero-title em {
    color: var(--primary);
    font-style: normal;
}

.gallery-hero-subtitle {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

/* ---- FILTERS ---- */
.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 3rem;
}

.gallery-filter-btn {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
    padding: 0.6rem 1.4rem;
    border-radius: var(--r-full);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--ease);
}

.gallery-filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.gallery-filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(153, 30, 91, 0.3);
}

/* ---- GRID ---- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-card {
    position: relative;
    border-radius: var(--r-md);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    background: var(--border);
    transition: var(--ease);
    opacity: 0;
    transform: translateY(20px);
}

.gallery-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.gallery-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px) !important;
}

.gallery-media-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-media-thumb {
    transform: scale(1.08);
    /* Zoom effect */
}

.gallery-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    padding-left: 4px;
    /* optical center */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 2;
    transition: var(--ease);
}

.gallery-card:hover .gallery-play-icon {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--primary);
    color: #fff;
}

.gallery-hover-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 3;
}

.gallery-card:hover .gallery-hover-overlay {
    opacity: 1;
}

.gallery-view-text {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-soft);
    margin-bottom: 0.3rem;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.gallery-item-title {
    color: #fff;
    font-family: var(--font-head);
    font-size: 1.25rem;
    margin: 0;
    transform: translateY(10px);
    transition: transform 0.3s ease 0.05s;
}

.gallery-card:hover .gallery-view-text,
.gallery-card:hover .gallery-item-title {
    transform: translateY(0);
}

/* ---- LIGHTBOX MODAL ---- */
.lightbox-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox-modal.show {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 3rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2010;
    transition: color 0.2s ease;
}

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

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2010;
    transition: all 0.2s ease;
}

.lightbox-nav:hover {
    background: #fff;
    color: #000;
}

.lightbox-nav.prev {
    left: 2rem;
}

.lightbox-nav.next {
    right: 2rem;
}

.lightbox-content-wrapper {
    position: relative;
    width: 90%;
    max-width: 1100px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-media-container {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.lightbox-hero-media {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--r-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.lightbox-caption {
    margin-top: 1.5rem;
    color: #fff;
    font-family: var(--font-head);
    font-size: 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

/* Mobile Adjustments for Lightbox */
@media (max-width: 768px) {
    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }

    .lightbox-nav.prev {
        left: 0.5rem;
    }

    .lightbox-nav.next {
        right: 0.5rem;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        font-size: 2.5rem;
    }

    .lightbox-content-wrapper {
        width: 100%;
        height: 90vh;
        padding: 0 0.5rem;
    }

    .gallery-hero {
        height: 50vh;
    }

    .gallery-hero-title {
        font-size: 2.5rem;
    }
}