/* Fullscreen Image Modal */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.image-modal.active {
    display: flex;
    opacity: 1;
}

.modal-close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    backdrop-filter: blur(10px);
    padding: 0;
    margin: 0;
    outline: none;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 170, 170, 0.6);
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(255, 170, 170, 0.4);
}

.modal-close-btn:active {
    transform: scale(0.95);
}

.modal-close-btn svg {
    width: 24px;
    height: 24px;
    stroke: #ffffff;
}

/* Modal Navigation Buttons */
.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    backdrop-filter: blur(10px);
    padding: 0;
    margin: 0;
    outline: none;
}

.modal-nav-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 170, 170, 0.6);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px rgba(255, 170, 170, 0.4);
}

.modal-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.modal-prev-btn {
    left: 30px;
}

.modal-next-btn {
    right: 30px;
}

.modal-nav-btn svg {
    width: 24px;
    height: 24px;
    stroke: #ffffff;
    stroke-width: 2;
}

.modal-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    animation: modalImageFadeIn 0.4s ease-out, imagePulse 2.5s ease-in-out infinite;
    animation-delay: 0s, 0.4s;
}

@keyframes modalImageFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes imagePulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 170, 170, 0.3), 0 0 80px rgba(255, 200, 200, 0.2);
    }
    
    50% {
        transform: scale(1.05);
        box-shadow: 0 20px 80px rgba(0, 0, 0, 0.7), 0 0 80px rgba(255, 170, 170, 0.6), 0 0 120px rgba(255, 200, 200, 0.4);
    }
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .modal-close-btn {
        top: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }

    .modal-close-btn svg {
        width: 20px;
        height: 20px;
    }

    .modal-nav-btn {
        width: 50px;
        height: 50px;
    }

    .modal-prev-btn {
        left: 15px;
    }

    .modal-next-btn {
        right: 15px;
    }

    .modal-nav-btn svg {
        width: 20px;
        height: 20px;
    }

    .modal-image {
        max-width: 95%;
        max-height: 95%;
    }
}

@media (max-width: 480px) {
    .modal-close-btn {
        top: 15px;
        right: 15px;
        width: 35px;
        height: 35px;
    }

    .modal-close-btn svg {
        width: 18px;
        height: 18px;
    }

    .modal-nav-btn {
        width: 45px;
        height: 45px;
    }

    .modal-prev-btn {
        left: 10px;
    }

    .modal-next-btn {
        right: 10px;
    }

    .modal-nav-btn svg {
        width: 18px;
        height: 18px;
    }
}

