/* Gallery Styles */

.gallery-filters {
    margin-bottom: 2rem;
}

.gallery-filters .btn {
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.gallery-filters .btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.gallery-grid {
    margin-top: 2rem;
}

.gallery-item {
    transition: all 0.3s ease;
}

.gallery-item.hidden {
    display: none;
}

.gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 280px;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

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

.gallery-card:hover .gallery-image {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-info h5 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.gallery-info p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Modal Styles */
#imageModal .modal-dialog {
    max-width: 90vw;
}

#imageModal .modal-content {
    border: none;
    border-radius: var(--border-radius);
}

#imageModal .modal-header {
    background-color: var(--primary-color);
    color: white;
    border-bottom: none;
}

#imageModal .modal-header .btn-close {
    filter: invert(1);
}

#modalImage {
    max-height: 70vh;
    width: auto;
    border-radius: var(--border-radius);
}

#modalDescription {
    font-size: 1rem;
    line-height: 1.6;
}

/* Loading Animation */
.gallery-loading {
    text-align: center;
    padding: 2rem;
}

.gallery-loading .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .gallery-card {
        height: 250px;
    }
    
    .gallery-filters .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    #imageModal .modal-dialog {
        margin: 0.5rem;
    }
    
    #modalImage {
        max-height: 60vh;
    }
}

@media (max-width: 576px) {
    .gallery-card {
        height: 220px;
    }
    
    .gallery-filters {
        text-align: left;
    }
    
    .gallery-filters .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
        margin-bottom: 0.5rem;
    }
}

/* Animation Classes */
.gallery-item {
    animation: fadeInUp 0.6s ease-out;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}