/* Gallery Page Specific Styles */

/* Hero Section */
.gallery-hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 120px 0 80px;
    text-align: center;
}

.gallery-hero h1 {
    font-size: 3rem;
    color: #2C5F41;
    margin-bottom: 20px;
    font-weight: 700;
}

.gallery-hero p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Filters Section */
.gallery-filters {
    background: white;
    padding: 40px 0;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 70px;
    z-index: 100;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    border: 2px solid #e9ecef;
    color: #666;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.filter-btn:hover {
    border-color: #4F9A94;
    color: #4F9A94;
}

.filter-btn.active {
    background: linear-gradient(45deg, #2C5F41, #4F9A94);
    border-color: transparent;
    color: white;
}

/* Gallery Grid Section */
.gallery-grid-section {
    padding: 60px 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    aspect-ratio: 3/4;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.gallery-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-image svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-image svg {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 30px 25px 25px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

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

.gallery-overlay h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
    font-weight: 600;
}

.gallery-overlay p {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.4;
}

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

.gallery-item.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gallery CTA Section */
.gallery-cta {
    background: linear-gradient(135deg, #2C5F41 0%, #4F9A94 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.gallery-cta h2 {
    color: white;
    margin-bottom: 20px;
    font-size: 2.5rem;
}

.gallery-cta p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-buttons .cta-button {
    background: white;
    color: #2C5F41;
}

.cta-buttons .cta-button:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

.cta-buttons .secondary-button {
    background: transparent;
    color: white;
    border-color: white;
}

.cta-buttons .secondary-button:hover {
    background: white;
    color: #2C5F41;
}

/* Loading Animation */
.gallery-loading {
    display: none;
    text-align: center;
    padding: 40px 0;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e9ecef;
    border-left: 4px solid #4F9A94;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #666;
    font-size: 1.1rem;
}

/* Active Navigation Link */
.nav-menu a.active {
    color: #2C5F41;
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .gallery-hero {
        padding: 100px 0 60px;
    }
    
    .gallery-hero h1 {
        font-size: 2.5rem;
    }
    
    .gallery-filters {
        position: static;
        padding: 30px 0;
    }
    
    .filter-buttons {
        gap: 15px;
    }
    
    .filter-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .gallery-overlay {
        padding: 20px;
    }
    
    .gallery-overlay h3 {
        font-size: 1.2rem;
    }
    
    .gallery-overlay p {
        font-size: 0.9rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .cta-button,
    .cta-buttons .secondary-button {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .gallery-hero h1 {
        font-size: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .filter-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .gallery-cta h2 {
        font-size: 2rem;
    }
    
    .gallery-item {
        aspect-ratio: 4/5;
    }
}

/* Dark mode friendly styles for better contrast */
@media (prefers-color-scheme: dark) {
    .gallery-hero {
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    }
    
    .gallery-filters {
        background: #1a1a1a;
        border-bottom-color: #333;
    }
    
    .filter-btn {
        border-color: #333;
        color: #ccc;
    }
    
    .filter-btn:hover {
        border-color: #4F9A94;
        color: #4F9A94;
    }
}

/* Accessibility improvements */
.gallery-item:focus {
    outline: 3px solid #4F9A94;
    outline-offset: 2px;
}

.filter-btn:focus {
    outline: 2px solid #4F9A94;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .gallery-filters,
    .gallery-cta {
        display: none;
    }
    
    .gallery-grid {
        display: block;
    }
    
    .gallery-item {
        break-inside: avoid;
        margin-bottom: 20px;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .gallery-overlay {
        position: static;
        transform: none;
        background: #f8f9fa;
        color: #333;
        padding: 15px;
    }
}