/* Image Gallery Styles */
.gallery-main {
    width: 100%;
}

.gallery-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
}

.gallery-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

.gallery-image-container:hover img {
    opacity: 0.9;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    z-index: 2;
}

.gallery-nav:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.6);
}

.gallery-prev {
    left: 10px;
}

.gallery-next {
    right: 10px;
}

/* Modal Styles */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 100002;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.gallery-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    margin-bottom: 1rem;
}

.modal-counter {
    font-size: 1.2rem;
    font-weight: bold;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-image-container {
    position: relative;
    max-width: 100%;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    z-index: 2;
}

.modal-nav:hover {
    background: rgba(0, 0, 0, 0.9);
}

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

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .gallery-nav {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .gallery-prev {
        left: 5px;
    }
    
    .gallery-next {
        right: 5px;
    }
    
    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .modal-prev {
        left: -50px;
    }
    
    .modal-next {
        right: -50px;
    }
    
    .modal-content {
        max-width: 95vw;
        max-height: 95vh;
    }
}

@media (max-width: 480px) {
    .modal-nav {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .modal-prev {
        left: -40px;
    }
    
    .modal-next {
        right: -40px;
    }
    
    .modal-counter {
        font-size: 1rem;
    }
    
    .modal-close {
        font-size: 1.5rem;
        width: 35px;
        height: 35px;
    }
}
