/* Gallery Page Specific Styles - gallery-style.css */

/* Page Title */
.page-title {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    position: relative;
    overflow: hidden;
}

.page-title::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 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/><circle cx="25" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
}

/* Gallery Filters */
.gallery-filters {
    border-bottom: 1px solid #e5e7eb;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.btn-filter {
    background: white;
    color: #6b7280;
    border: 2px solid #e5e7eb;
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0.25rem;
}

.btn-filter:hover,
.btn-filter.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Gallery Grid */
.gallery-grid {
    background: #f9fafb;
}

.gallery-item {
    opacity: 1;
    transform: scale(1);
    transition: all 0.5s ease;
}

.gallery-item.hide {
    opacity: 0;
    transform: scale(0.8);
    position: absolute;
    pointer-events: none;
}

.gallery-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background: white;
    height: 100%;
    aspect-ratio: 1/1;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-card:hover img {
    transform: scale(1.1);
}

/* Gallery Overlay */
.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(30, 58, 138, 0.9) 0%, rgba(59, 130, 246, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-card:hover .gallery-overlay {
    opacity: 1;
}

.gallery-content {
    text-align: center;
    color: white;
    padding: 1rem;
}

.gallery-content h5 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.gallery-content p {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

/* Lightbox Modal */
#lightboxModal .modal-dialog {
    max-width: 90vw;
    margin: 1rem auto;
}

#lightboxModal .modal-content {
    background: rgba(0,0,0,0.9) !important;
    border: none !important;
}

#lightboxModal .modal-header {
    border: none !important;
    padding-bottom: 0;
}

#lightboxModal .modal-body {
    padding: 0 1rem 1rem;
}

#lightboxImage {
    max-height: 80vh;
    width: auto;
    max-width: 100%;
}

/* Load More Button */
#loadMoreBtn {
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

#loadMoreBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}


/* Fade In Animation */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Filter Animation */
.filter-animation {
    animation: filterPop 0.3s ease;
}

@keyframes filterPop {
    0% { transform: scale(0.95); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-buttons {
        padding: 0 1rem;
    }
    
    .btn-filter {
        font-size: 0.875rem;
        padding: 0.375rem 1rem;
    }
    
    .gallery-content h5 {
        font-size: 0.875rem;
    }
    
    .gallery-content p {
        font-size: 0.75rem;
    }
    
    .gallery-content .btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.75rem;
    }
    
    #lightboxModal .modal-dialog {
        margin: 0.5rem;
        max-width: 95vw;
    }
    
    #lightboxImage {
        max-height: 70vh;
    }
}

@media (max-width: 576px) {
    .gallery-card {
        aspect-ratio: 1/1;
    }
    
    .btn-filter {
        font-size: 0.8rem;
        padding: 0.3rem 0.8rem;
        margin: 0.2rem;
    }
    
    .page-title h1 {
        font-size: 2rem !important;
    }
    
    .page-title .lead {
        font-size: 1rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f4f6;
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Masonry Layout for larger screens */
@media (min-width: 992px) {
    .gallery-item:nth-child(7n+1) {
        grid-row-end: span 1;
    }
    
    .gallery-item:nth-child(7n+3) {
        grid-row-end: span 1;
    }
}

/* Hover Effects */
.gallery-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover {
    z-index: 10;
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.no-results i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.no-results h4 {
    margin-bottom: 0.5rem;
    color: #374151;
}

/* Gallery Stats */
.gallery-stats {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-item .number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3b82f6;
    display: block;
}

.stat-item .label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}