/* ============================
   Gallery Page Styles
   ============================ */

/* Header */
.gallery-header {
    text-align: center;
    padding-top: 8rem;
    padding-bottom: 2rem;
}

.gallery-header h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    margin-bottom: 0.75rem;
}

.gallery-header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.gallery-photo-count {
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

/* Nav Active */
.nav-active {
    color: var(--accent-color) !important;
}

/* Grid */
.gallery-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* Gallery Item */
.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 16 / 9;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 1rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

/* Empty State */
.gallery-empty {
    text-align: center;
    padding: 6rem 2rem;
    color: var(--text-secondary);
}

.gallery-empty svg {
    color: var(--border-color);
    margin-bottom: 1.5rem;
}

.gallery-empty p {
    font-size: 1rem;
}

/* ============================
   Lightbox
   ============================ */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background-color: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    animation: lightboxFadeIn 0.3s ease;
}

@keyframes lightboxFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.lightbox-content {
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 2.5rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
    z-index: 10001;
}

.lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #ffffff;
    font-size: 3rem;
    cursor: pointer;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
    z-index: 10001;
}

.lightbox-nav:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

.lightbox-caption {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-top: 1rem;
    text-align: center;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar .nav-links {
        position: static;
        width: auto;
        height: auto;
        background-color: transparent;
        flex-direction: row;
        align-items: center;
        padding: 0;
        gap: 1.5rem;
        box-shadow: none;
        border-left: none;
    }

    .gallery-header h1 {
        font-size: 2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.5rem;
        padding: 0 1rem 3rem;
    }

    .gallery-item {
        border-radius: 8px;
    }

    .gallery-item-overlay {
        opacity: 1;
        font-size: 0.7rem;
        padding: 0.5rem;
    }

    .lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }

    .lightbox-prev {
        left: 0.5rem;
    }

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