/* ═══════════════════════════════════════════════════════════════
   Andrea B. Denney — Galleries Page
   Two gallery sections with lightbox modal
   ═══════════════════════════════════════════════════════════════ */

/* ── PAGE HEADER ───────────────────────────────────────────── */
.galleries-header {
    padding: calc(var(--nav-h) + 4rem) clamp(1.5rem, 4vw, 4rem) 3rem;
    text-align: center;
    background: var(--black);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.galleries-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 1rem;
}

.galleries-subtitle {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.3rem);
    font-weight: 300;
    font-style: italic;
    color: var(--gold);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── MAIN GALLERIES CONTAINER ──────────────────────────────── */
.galleries-main {
    background: var(--black);
    padding: 4rem clamp(1.5rem, 4vw, 4rem);
}

/* ── GALLERY SECTIONS ──────────────────────────────────────── */
.gallery-section {
    margin-bottom: 6rem;
}

.gallery-section:last-child {
    margin-bottom: 2rem;
}

.gallery-header {
    text-align: center;
    margin-bottom: 3rem;
}

.gallery-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 0.75rem;
}

.gallery-description {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    font-weight: 300;
    color: var(--gray-lt);
    max-width: 600px;
    margin: 0 auto;
}

/* ── GALLERY GRID ──────────────────────────────────────────── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--charcoal);
    cursor: pointer;
    border: 3px solid var(--gold);
    border-radius: 4px;
    transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s ease;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(212, 175, 55, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out-expo), filter 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.08);
    filter: brightness(1.1);
}

/* Gallery item overlay */
.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.85) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.btn-view {
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--black);
    background: var(--white);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-view:hover {
    background: var(--teal);
    transform: scale(1.05);
}

/* ── LIGHTBOX MODAL ────────────────────────────────────────── */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.lightbox-image {
    max-width: 100%;
    max-height: calc(90vh - 120px);
    width: auto;
    height: auto;
    object-fit: contain;
    border: 4px solid var(--gold);
    border-radius: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    animation: zoomIn 0.4s var(--ease-out-expo);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.lightbox-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-buy-now {
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--black);
    background: var(--teal);
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-buy-now:hover {
    background: var(--gold);
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(29, 209, 161, 0.4);
}

/* Lightbox navigation buttons */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    font-size: 2rem;
    font-weight: 300;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10001;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

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

.lightbox-prev {
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-prev:hover {
    transform: translateY(-50%) scale(1.1);
}

.lightbox-next {
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next:hover {
    transform: translateY(-50%) scale(1.1);
}

/* Active nav link highlight */
.nav-link.active {
    color: var(--teal);
}

/* ── RESPONSIVE ────────────────────────────────────────────── */

/* Tablets */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .galleries-header {
        padding: calc(var(--nav-h) + 3rem) 2rem 2rem;
    }

    .galleries-main {
        padding: 3rem 2rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .galleries-header {
        padding: calc(var(--nav-h) + 2rem) 1.5rem 1.5rem;
    }

    .galleries-title {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }

    .galleries-subtitle {
        font-size: 0.95rem;
    }

    .galleries-main {
        padding: 2rem 1rem;
    }

    .gallery-section {
        margin-bottom: 4rem;
    }

    .gallery-header {
        margin-bottom: 2rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gallery-item {
        border-width: 2px;
    }

    /* Lightbox adjustments for mobile */
    .lightbox {
        padding: 1rem;
    }

    .lightbox-content {
        max-width: 95vw;
        max-height: 95vh;
    }

    .lightbox-image {
        max-height: calc(95vh - 100px);
        border-width: 2px;
    }

    .lightbox-close {
        top: 1rem;
        right: 1rem;
        width: 44px;
        height: 44px;
        font-size: 2rem;
    }

    .lightbox-prev,
    .lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 1.5rem;
    }

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }

    .btn-buy-now {
        font-size: 0.75rem;
        padding: 0.8rem 1.5rem;
        letter-spacing: 1.5px;
    }

    /* Always show overlay on mobile (no hover) */
    .gallery-item-overlay {
        opacity: 1;
        background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.7) 100%);
    }

    .btn-view {
        font-size: 0.75rem;
        padding: 0.6rem 1.5rem;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .galleries-header {
        padding: calc(var(--nav-h) + 1.5rem) 1rem 1rem;
    }

    .gallery-grid {
        gap: 1rem;
    }

    .btn-buy-now {
        font-size: 0.7rem;
        padding: 0.7rem 1.2rem;
    }
}

/* Keyboard navigation highlight */
.lightbox-close:focus,
.lightbox-prev:focus,
.lightbox-next:focus {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
}

/* Prevent body scroll when lightbox is open */
body.lightbox-open {
    overflow: hidden;
}
