/* Gallery specific styles */
.gallery-hero {
    padding: 140px 0 60px;
    /* background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(102, 126, 234, 0.3) 100%), url('../images/home1.jpg') no-repeat center center; */
    background: url('../images/31.png') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    color: #fff;
    text-align: center;
    position: relative;
}

.gallery-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    z-index: 1;
    animation: heroGlow 4s ease-in-out infinite;
}

.gallery-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.gallery-section {
    padding: 5rem 0;
    background: #f8fafc;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.gallery-item {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    animation: fadeInUp 0.6s ease-out;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-content {
    padding: 1.5rem;
}

.gallery-item-category {
    display: inline-block;
    background: linear-gradient(135deg, #4c4c4d 0%, #151515 100%);
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.8rem;
}

.gallery-item-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.gallery-item-date {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.gallery-item-description {
    color: #374151;
    line-height: 1.6;
}

/* Add a visual indicator that gallery items are clickable */

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: #fff;
    border: 2px solid #e2e8f0;
    color: #64748b;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, #4c4c4d 0%, #151515 100%);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
}

.pagination-btn {
    background: #fff;
    border: 2px solid #e2e8f0;
    color: #64748b;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
}

.pagination-btn:hover,
.pagination-btn.active {
    background: linear-gradient(135deg, #4c4c4d 0%, #151515 100%);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 0;
    width: 90%;
    max-width: 900px;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
}

.modal-image {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
}

.modal-caption {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 0 0 10px 10px;
    text-align: center;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 10px;
}

.modal-date {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 10px;
}

.modal-description {
    color: #374151;
    line-height: 1.6;
    font-size: 1rem;
    margin-bottom: 0;
}

.close {
    position: absolute;
    top: -40px;
    right: 10px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.close:hover,
.close:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.3);
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroGlow {
    0% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        opacity: 0.3;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .gallery-hero {
        padding: 120px 0 40px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gallery-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .modal-title {
        font-size: 1.2rem;
    }
    
    .close {
        top: 10px;
        right: 10px;
        background: rgba(0, 0, 0, 0.5);
    }
    
    /* Hide the eye icon on mobile */
    .gallery-item::after {
        display: none;
    }
}