/* Gallery Modal Styles */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.gallery-modal.active {
    opacity: 1;
    visibility: visible;
}

.gallery-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.gallery-modal__content {
    position: relative;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.gallery-modal__close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.gallery-modal__close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.gallery-modal__close svg {
    width: 24px;
    height: 24px;
}

.gallery-modal__header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 80px;
}

.gallery-modal__title {
    font-family: 'Syne', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: #FF6B35;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.gallery-modal__subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 300;
}

.gallery-modal__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 40px;
}

.gallery-modal__item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
}

.gallery-modal__item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.gallery-modal__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-modal__item:hover img {
    transform: scale(1.05);
}

.gallery-modal__item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 30px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-modal__item:hover .gallery-modal__item-overlay {
    transform: translateY(0);
}

.gallery-modal__item-title {
    color: white;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .gallery-modal__content {
        padding: 15px;
    }
    
    .gallery-modal__close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    .gallery-modal__close svg {
        width: 20px;
        height: 20px;
    }
    
    .gallery-modal__header {
        padding-top: 60px;
        margin-bottom: 30px;
    }
    
    .gallery-modal__title {
        font-size: 32px;
    }
    
    .gallery-modal__subtitle {
        font-size: 16px;
    }
    
    .gallery-modal__grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .gallery-modal__item {
        border-radius: 12px;
    }
    
    .gallery-modal__item-overlay {
        padding: 20px 15px 15px;
    }
    
    .gallery-modal__item-title {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .gallery-modal__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .gallery-modal__title {
        font-size: 28px;
    }
    
    .gallery-modal__subtitle {
        font-size: 14px;
    }
}

/* Animation for modal items */
.gallery-modal.active .gallery-modal__item {
    animation: fadeInUp 0.6s ease forwards;
}

.gallery-modal__item:nth-child(1) { animation-delay: 0.1s; }
.gallery-modal__item:nth-child(2) { animation-delay: 0.2s; }
.gallery-modal__item:nth-child(3) { animation-delay: 0.3s; }
.gallery-modal__item:nth-child(4) { animation-delay: 0.4s; }
.gallery-modal__item:nth-child(5) { animation-delay: 0.5s; }
.gallery-modal__item:nth-child(6) { animation-delay: 0.6s; }
.gallery-modal__item:nth-child(7) { animation-delay: 0.7s; }
.gallery-modal__item:nth-child(8) { animation-delay: 0.8s; }
.gallery-modal__item:nth-child(9) { animation-delay: 0.9s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar styling for modal */
.gallery-modal__content::-webkit-scrollbar {
    width: 8px;
}

.gallery-modal__content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.gallery-modal__content::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 53, 0.6);
    border-radius: 4px;
}

.gallery-modal__content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 53, 0.8);
}