/* ===== GALLERY STYLES ===== */

/* Gallery Section */
.gallery {
    padding: 2rem 0 2rem;
}

.gallery__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery__item {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 8px 24px hsla(var(--hue), 100%, 60%, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery__item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px hsla(var(--hue), 100%, 60%, 0.25);
}

.gallery__img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.gallery__item:hover .gallery__img {
    transform: scale(1.05);
}

.gallery__item:hover {
    opacity: 1;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: var(--z-modal);
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.modal__content {
    position: relative;
    margin: auto;
    padding: 0;
    width: 90%;
    max-width: 800px;
    top: 50%;
    transform: translateY(-50%);
}

.modal__img {
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
}

.modal__close {
    position: absolute;
    top: -40px;
    right: 0;
    color: var(--white-color);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.modal__close:hover {
    color: var(--first-color);
}

/* Modal Navigation Arrows */
.modal__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    z-index: 1001;
}

.modal__nav:hover {
    background: rgba(0, 0, 0, 0.8);
}

.modal__nav--prev {
    left: -60px;
}

.modal__nav--next {
    right: -60px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .gallery__container {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .gallery__img {
        height: 200px;
    }
    
    .modal__content {
        width: 95%;
    }
    
    .modal__nav--prev {
        left: 10px;
    }
    
    .modal__nav--next {
        right: 10px;
    }
    
    .modal__nav {
        padding: 0.75rem;
        font-size: 1.25rem;
    }
}

@media screen and (max-width: 480px) {
    .gallery {
        padding: 4rem 0 2rem;
    }
    
    .gallery__container {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 0.75rem;
    }
    
    .gallery__img {
        height: 180px;
    }
    
    .modal__close {
        top: -30px;
        font-size: 1.5rem;
    }
}
