/* Gallery-specific styles */

/* Gallery Hero Section */
.gallery-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 8rem 0 4rem;
    text-align: center;
    margin-top: 80px;
}

.gallery-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.gallery-hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    color: #f8f9fa;
}

/* Gallery Filter */
.gallery-filter {
    background: #f8f9fa;
    padding: 2rem 0;
    border-bottom: 1px solid #e9ecef;
}

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* Gallery Section */
.gallery-section {
    padding: 3rem 0;
    background: #fff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    background: white;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    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: 2rem 1.5rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: white;
}

.gallery-info p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

/* Gallery Modal */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
}

.modal-content-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.modal-content {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.modal-caption {
    color: white;
    text-align: center;
    margin-top: 1rem;
    font-size: 1.2rem;
    max-width: 600px;
    padding: 0 1rem;
}

.modal-navigation {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 2rem;
    transform: translateY(-50%);
}

.modal-prev,
.modal-next {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 1rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-prev:hover,
.modal-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s ease;
}

.close:hover {
    color: #667eea;
}

/* Gallery CTA Section */
.gallery-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.gallery-cta h2 {
    color: white;
    margin-bottom: 1rem;
    font-size: 2.2rem;
}

.gallery-cta p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: #f8f9fa;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Filter Animation */
.gallery-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.gallery-item.visible {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

/* 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: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }
    
    .modal-navigation {
        padding: 0 1rem;
    }
    
    .modal-prev,
    .modal-next {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .gallery-hero {
        padding: 6rem 0 3rem;
    }
    
    .gallery-hero h1 {
        font-size: 2.2rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .filter-buttons {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .gallery-overlay {
        padding: 1.5rem 1rem 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .modal-content {
        max-width: 95%;
        max-height: 70%;
    }
    
    .close {
        top: 15px;
        right: 25px;
        font-size: 35px;
    }
}

@media (max-width: 480px) {
    .gallery-hero {
        padding: 5rem 0 2rem;
    }
    
    .gallery-hero h1 {
        font-size: 1.8rem;
    }
    
    .gallery-hero p {
        font-size: 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .filter-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .gallery-item img {
        height: 180px;
    }
    
    .gallery-cta h2 {
        font-size: 1.8rem;
    }
    
    .modal-navigation {
        display: none;
    }
}

/* Print Styles */
@media print {
    .gallery-filter,
    .gallery-cta,
    .gallery-modal {
        display: none;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    .gallery-item {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .gallery-overlay {
        position: static;
        background: white;
        color: black;
        transform: none;
        padding: 0.5rem;
        border-top: 1px solid #ddd;
    }
    
    .gallery-info h3 {
        color: black;
        font-size: 1rem;
    }
    
    .gallery-info p {
        color: #666;
        font-size: 0.8rem;
    }
}

/* Accessibility */
.gallery-item:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.filter-btn:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

.modal-prev:focus,
.modal-next:focus,
.close:focus {
    outline: 3px solid #667eea;
    outline-offset: 2px;
}

/* Smooth scrolling for gallery navigation */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
.gallery-section::-webkit-scrollbar {
    width: 8px;
}

.gallery-section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.gallery-section::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.gallery-section::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

/* Gallery item numbering */
.gallery-item::before {
    content: counter(gallery-counter);
    counter-increment: gallery-counter;
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-grid {
    counter-reset: gallery-counter;
}

.gallery-item:hover::before {
    opacity: 1;
}

/* Enhanced hover effects */
.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 40%, rgba(102, 126, 234, 0.1) 50%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Active navigation link */
.nav-link.active {
    color: #667eea;
    font-weight: 600;
}

.nav-link.active::after {
    width: 100%;
}
