/* Gallery Page Styles */

.gallery-hero {
    background: linear-gradient(135deg, #4A9FF5 0%, #2B7FE3 100%);
    color: var(--bg-white);
    padding: 8rem 0 4rem;
    text-align: center;
    margin-top: 89px;
}

.gallery-hero .page-hero-logo {
    height: 100px;
    margin-bottom: 2rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.gallery-title {
    font-family: 'Alegreya', 'Quicksand', Arial, Helvetica, sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -1px;
    line-height: 1.2;
}

.gallery-subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
}

.gallery-section {
    padding: 80px 0;
    background: var(--bg-light);
}

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

.filter-btn {
    padding: 12px 24px;
    background: var(--bg-white);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-medium);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.filter-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--primary-blue);
    color: var(--bg-white);
    border-color: var(--primary-blue);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 4/3;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    background: var(--bg-white);
}

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

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

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

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--bg-white);
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay p {
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.lightbox-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: var(--bg-white);
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 10000;
    line-height: 1;
}

.lightbox-close:hover {
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bg-white);
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    padding: 20px;
    transition: all 0.3s ease;
    user-select: none;
    z-index: 10000;
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--bg-white);
    font-size: 1.1rem;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 10px 20px;
    border-radius: 6px;
}

/* Gallery Item Hidden State */
.gallery-item.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 968px) {
    .gallery-hero .page-hero-logo {
        height: 85px;
    }
    
    .gallery-title {
        font-size: 2.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
        padding: 15px;
    }

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

@media (max-width: 600px) {
    .gallery-hero .page-hero-logo {
        height: 70px;
        margin-bottom: 1.5rem;
    }
    
    .gallery-title {
        font-size: 2rem;
    }

    .gallery-subtitle {
        font-size: 1rem;
    }

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

    .gallery-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}
