/* Gallery Page Styles */

/* Gallery Hero */
.gallery-hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    padding: 4rem 0 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gallery-hero:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><circle cx="20" cy="10" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="10" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.gallery-hero h1 {
    font-size: 3.5rem;
    color: white;
    margin-bottom: 1.5rem;
    font-weight: 300;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
}

.gallery-hero p {
    font-size: 1.3rem;
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

/* Gallery Filters */
.gallery-filters {
    padding: 3rem 0 2rem;
    background: linear-gradient(135deg, var(--color-light) 0%, var(--bg-primary) 100%);
    border-bottom: 1px solid var(--color-light);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-btn {
    background: transparent;
    border: 2px solid var(--color-accent);
    color: var(--color-primary);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(106, 156, 137, 0.3);
}

/* Gallery Grid Section */
.gallery-grid-section {
    padding: 3rem 0 5rem;
    background: var(--bg-primary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.gallery-item {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(106, 156, 137, 0.1);
    transition: all 0.3s ease;
    background: white;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(106, 156, 137, 0.2);
}

.gallery-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.gallery-image {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(106, 156, 137, 0.9), rgba(35, 93, 71, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: white;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.gallery-item:hover .overlay-content {
    transform: translateY(0);
}

.overlay-content i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.9;
}

.overlay-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.overlay-content p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

/* Load More Section */
.load-more-section {
    text-align: center;
    margin-top: 3rem;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    gap: 1.2rem;
    transform: translateY(-2px);
}

/* Gallery CTA */
.gallery-cta {
    background: linear-gradient(135deg, var(--color-light) 0%, var(--color-accent) 100%);
    padding: 4rem 0;
    text-align: center;
}

.gallery-cta h2 {
    color: var(--color-secondary);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

.gallery-cta p {
    color: var(--text-primary);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Filter Animation */
.gallery-item {
    transition: all 0.5s ease;
}

.gallery-item.fade-out {
    opacity: 0;
    transform: scale(0.8);
}

.gallery-item.fade-in {
    opacity: 1;
    transform: scale(1);
}

/* GLightbox Custom Styling */
.glightbox-clean .gslide-description {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
}

.glightbox-clean .gslide-title {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.glightbox-clean .gdesc-inner {
    font-size: 1rem;
    line-height: 1.5;
    opacity: 0.9;
}

/* Masonry-style layout for varied heights */
@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        grid-auto-rows: 250px;
    }
    
    .gallery-item:nth-child(3n+1) {
        grid-row: span 1;
    }
    
    .gallery-item:nth-child(3n+2) {
        grid-row: span 1;
    }
    
    .gallery-item:nth-child(3n+3) {
        grid-row: span 1;
    }
    
    /* Some items span more rows for visual interest */
    .gallery-item:nth-child(7n+1) {
        grid-row: span 2;
    }
    
    .gallery-item:nth-child(11n+3) {
        grid-row: span 2;
    }
    
    /* Make portrait items fill entire height */
    .gallery-item:nth-child(7n+1) .gallery-image,
    .gallery-item:nth-child(11n+3) .gallery-image {
        aspect-ratio: unset;
        height: 100%;
    }
}

/* Loading Animation */
.gallery-item.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-hero h1 {
        font-size: 2.5rem;
    }
    
    .gallery-hero p {
        font-size: 1.1rem;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }
    
    .filter-btn {
        min-width: 200px;
        text-align: center;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gallery-item {
        max-width: 100%;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .overlay-content i {
        font-size: 2rem;
    }
    
    .overlay-content h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .gallery-hero {
        padding: 3rem 0 2rem;
    }
    
    .gallery-hero h1 {
        font-size: 2rem;
    }
    
    .gallery-filters {
        padding: 2rem 0 1rem;
    }
    
    .gallery-grid-section {
        padding: 2rem 0 3rem;
    }
    
    .load-more-btn {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .gallery-cta h2 {
        font-size: 2rem;
    }
}

/* Hover effects for different categories */
.gallery-item[data-category="poses"] .gallery-overlay {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.9), rgba(45, 80, 22, 0.9));
}

.gallery-item[data-category="classes"] .gallery-overlay {
    background: linear-gradient(135deg, rgba(33, 150, 243, 0.9), rgba(13, 71, 161, 0.9));
}

.gallery-item[data-category="studio"] .gallery-overlay {
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.9), rgba(74, 20, 140, 0.9));
}

.gallery-item[data-category="retreats"] .gallery-overlay {
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.9), rgba(230, 81, 0, 0.9));
}

.gallery-item[data-category="nature"] .gallery-overlay {
    background: linear-gradient(135deg, rgba(0, 150, 136, 0.9), rgba(0, 77, 64, 0.9));
}

/* Photo loading placeholder */
.gallery-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--color-light), var(--color-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.gallery-image.loading::before {
    opacity: 1;
}

/* Smooth reveal animation */
.gallery-item {
    opacity: 0;
    transform: translateY(30px);
    animation: revealGalleryItem 0.6s ease forwards;
}

@keyframes revealGalleryItem {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }
.gallery-item:nth-child(n+7) { animation-delay: 0.7s; }