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

/* Page Header */
.page-header {
    position: relative;
    padding: 12rem 0 4rem;
    text-align: center;
    overflow: hidden;
}

.header-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #9DB4A0 0%, #C4B49A 50%, #D4A5A5 100%);
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/web_IMG_3319.jpg') center/cover no-repeat;
    opacity: 0.2;
}

.header-content {
    position: relative;
    z-index: 10;
    max-width: 700px;
    margin: 0 auto;
}

.header-content h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.header-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
}

/* Gallery Filter */
.gallery-filter {
    padding: 2rem 0;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-light);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    font-family: var(--font-secondary);
    font-weight: 600;
    color: var(--text-medium);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.filter-btn.active {
    background: #9DB4A0;
    border-color: #9DB4A0;
    color: white;
}

/* Gallery Section */
.gallery-section {
    padding: 4rem 0 6rem;
    background: white;
}

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

.gallery-item {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-item.large {
    grid-column: span 2;
    aspect-ratio: 16/9;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}

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

.overlay-content {
    color: white;
    transform: translateY(20px);
    transition: transform var(--transition-normal);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    width: 100%;
}

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

.category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    backdrop-filter: blur(4px);
}

.overlay-content h3 {
    color: white;
    font-size: 1.125rem;
    margin-bottom: 0;
}

.view-btn {
    width: 44px;
    height: 44px;
    background: white;
    border: none;
    border-radius: 50%;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.view-btn:hover {
    background: #9DB4A0;
    color: white;
    transform: scale(1.1);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lightbox-prev {
    left: 2rem;
}

.lightbox-next {
    right: 2rem;
}

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

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    text-align: center;
    color: white;
    padding: 1rem;
    font-size: 1.125rem;
}

/* Gallery Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gallery-item.hidden {
    display: none;
}

.gallery-item.show {
    animation: fadeIn 0.4s ease forwards;
}

/* Responsive */
@media (max-width: 1024px) {
    .gallery-item.large {
        grid-column: span 1;
        aspect-ratio: 4/3;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 10rem 0 3rem;
    }
    
    .header-content h1 {
        font-size: 2.25rem;
    }
    
    .filter-buttons {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
    
    .lightbox-prev {
        left: 1rem;
    }
    
    .lightbox-next {
        right: 1rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-btn {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 0;
    }
}