/* Loading spinner styles */
.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    width: 100%;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

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

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

/* Gallery Page Styles */
#gallery {
    padding: 1.5rem 0.5rem;
    background-color: #f8f9fa;
    scroll-behavior: smooth;
    padding-bottom: 0 !important;
}

#gallery .container, .gallery-grid {
    max-width: none !important;
    width: 100% !important;
}

#gallery h1 {
    text-align: center;
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

/* Events List */
.events-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.event-item {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    display: block;
}

.event-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

.event-item h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin: 0 0 0.5rem 0;
}

.event-item p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

/* Event Photos */
.event-photos {
    margin-top: 2rem;
    scroll-margin-top: 2rem;
}

.event-photos h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

/* Condense event gallery layout */
.event-gallery {
    margin-top: 1.5rem !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
.event-gallery h2,
.event-gallery h3 {
    margin-top: 0.5rem !important;
    margin-bottom: 0.5rem !important;
}
.gallery-grid {
    margin-top: 0.5rem !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Remove extra space from body or parent containers if present */
body, .gallery-section, #gallery-events {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    position: relative;
    width: 100%;
}

.gallery-item {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    cursor: pointer;
    box-sizing: border-box;
    margin: 0;
    background: transparent;
    display: block;
}

.gallery-item img {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: contain;
    transition: transform 0.3s ease;
    display: block;
    background: transparent;
    border: none;
    box-shadow: none;
}

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

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    background: #fff;
    border-radius: 8px;
    padding: 1rem;
}

.modal .close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.modal-gallery {
    max-height: 80vh;
    overflow: hidden;
}

.modal-gallery img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
}

#modal-title {
    color: #2c3e50;
    text-align: center;
    margin: 1rem 0 0;
    font-size: 1.5rem;
}

/* Go Top Button */
.go-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #3498db;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.go-top.visible {
    opacity: 1;
    visibility: visible;
}

.go-top:hover {
    background: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .gallery-grid {
        gap: 1rem;
    }
    .gallery-item {
        flex-basis: 160px;
    }
    .event-gallery {
        padding-bottom: 1rem;
    }
}
@media (max-width: 600px) {
    #gallery {
        padding: 2rem 0.5rem;
    }
    .gallery-grid {
        gap: 0.7rem;
    }
    .gallery-item {
        flex-basis: 100%;
        flex-grow: 0;
        flex-shrink: 0;
    }
    .event-gallery h2, .event-gallery h3 {
        font-size: 1rem;
    }
    .go-top {
        bottom: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
    }
} 