/* Gallery Page Styles */

.gallery-section {
    padding: 80px 0 100px;
    background: var(--bg-white);
}

.gallery-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
}

.gallery-grid {
    column-count: 4;
    column-gap: 15px;
    margin-top: 60px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f5f5f5;
    break-inside: avoid;
    margin-bottom: 15px;
    display: inline-block;
    width: 100%;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

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

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

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

/* Gallery overlay info (optional enhancement) */
.gallery-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    color: white;
    z-index: 2;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

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

.gallery-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.gallery-item-category {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Lightbox/Modal styles for full-size view */
.gallery-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    padding: 40px;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox.active {
    display: flex;
}

.gallery-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.gallery-lightbox-close {
    position: absolute;
    top: 18px;
    right: 18px;
    font-size: 40px;
    color: white;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px 20px;
    transition: transform 0.3s ease;
    z-index: 10001;
}

.gallery-lightbox-close:hover {
    transform: scale(1.1);
}

/* Loading state */
.gallery-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

/* Speaker-style loader */
.loader {
    width: 56px;
    height: 56px;
    display: inline-block;
    position: relative;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(26, 26, 26, 0.1) 0 45%, transparent 46%);
}

.loader::before {
    content: '';
    position: absolute;
    inset: 8px;
    border-radius: 50%;
    border: 3px solid var(--accent-gold);
    box-shadow: 0 0 0 6px rgba(212, 175, 55, 0.18), 0 0 0 14px rgba(212, 175, 55, 0.08);
    animation: pulse 1.6s ease-out infinite;
}

.loader::after {
    content: '';
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    border: 2px solid rgba(26, 26, 26, 0.4);
}

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

@keyframes pulse {
    0% {
        transform: scale(0.9);
        opacity: 0.9;
    }
    70% {
        transform: scale(1.1);
        opacity: 0.3;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

/* Empty state */
.gallery-empty {
    text-align: center;
    padding: 100px 40px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 2px dashed #ddd;
    grid-column: 1 / -1;
}

.gallery-empty-icon {
    color: var(--accent-gold);
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.gallery-empty h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
    font-size: 1.8rem;
}

.gallery-empty p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto 30px;
    line-height: 1.7;
}

.gallery-pagination {
    margin-top: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.gallery-page {
    font-weight: 600;
    color: var(--text-secondary);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .gallery-grid {
        column-count: 3;
        column-gap: 12px;
    }
    
    .gallery-item {
        margin-bottom: 12px;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        column-count: 2;
        column-gap: 10px;
    }
    
    .gallery-item {
        margin-bottom: 10px;
    }
    
    .gallery-empty {
        padding: 60px 20px;
    }
    
    .gallery-empty h3 {
        font-size: 1.5rem;
    }
    
    .gallery-lightbox {
        padding: 20px;
    }
    
    .gallery-lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        column-count: 1;
        column-gap: 0;
    }
    
    .gallery-item {
        margin-bottom: 10px;
    }
}
