/* Gallery Modal Styles */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease-in-out;
}

.gallery-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.gallery-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.3s ease;
}

.gallery-modal-close:hover,
.gallery-modal-close:focus {
    color: #ccc;
}

.gallery-modal-image-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#gallery-modal-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.gallery-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.gallery-modal-prev,
.gallery-modal-next {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 24px;
    font-weight: bold;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    pointer-events: all;
    user-select: none;
    backdrop-filter: blur(10px);
}

.gallery-modal-prev:hover,
.gallery-modal-next:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.gallery-modal-prev {
    margin-left: -50px;
}

.gallery-modal-next {
    margin-right: -50px;
}

.gallery-modal-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 16px;
    backdrop-filter: blur(10px);
}

/* Fade in animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .gallery-modal-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }

    .gallery-modal-prev,
    .gallery-modal-next {
        font-size: 20px;
        padding: 12px 16px;
        margin-left: -30px;
        margin-right: -30px;
    }

    .gallery-modal-prev {
        margin-left: -30px;
    }

    .gallery-modal-next {
        margin-right: -30px;
    }

    .gallery-modal-counter {
        bottom: 20px;
        font-size: 14px;
        padding: 8px 16px;
    }

    .gallery-modal-image-container {
        max-width: 95%;
        max-height: 85%;
    }
}

/* Touch devices - larger touch targets */
@media (hover: none) and (pointer: coarse) {
    .gallery-modal-prev,
    .gallery-modal-next {
        padding: 20px 25px;
        font-size: 28px;
    }
}