/* Gallery Hero Section */
.gallery-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('../images/gallery-banner.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
    padding: 8rem 0;
    position: relative;
    text-align: center;
}

.gallery-hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.gallery-hero h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

/* Gallery Section */
.gallery-section {
    padding: 6rem 0;
}

.gallery-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    background: var(--background-light);
    color: var(--text-dark);
    font-size: 1rem;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding:  1rem;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: none;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

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

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

.gallery-overlay h3 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.gallery-overlay p {
    color: var(--white);
    margin-bottom: 1rem;
    text-align: center;
    padding: 0 1rem;
}

/* Title overlay on image */
.gallery-title-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 0.5rem 1rem;
    font-size: 1.1rem;
    font-weight: 500;
    text-align: left;
    z-index: 2;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* 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-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    margin: 2rem auto;
    background: var(--white);
    border-radius: 10px;
    padding: 2rem;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    color: var(--text-dark);
    cursor: pointer;
    z-index: 1001;
}

.modal-body {
    margin-top: 2rem;
    text-align: center;
}

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

.image-details {
    margin-top: 1.5rem;
}

.image-details h3 {
    margin-bottom: 1rem;
}

.image-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.image-meta p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.image-meta i {
    color: var(--primary-color);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .gallery-grid,
    .stories-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .gallery-filter,
    .filter-buttons {
        flex-wrap: wrap;
    }

    .filter-btn {
        width: calc(50% - 0.5rem);
        text-align: center;
    }

    .modal-content {
        width: 95%;
        padding: 1rem;
    }

    .image-meta {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid,
    .stories-grid {
        grid-template-columns: 1fr;
    }

    .event-card img {
        height: 180px;
    }
}