/* 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;
}

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

.modal-close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    padding: 0;
    margin: 0;
    outline: none;
}

.modal-close-btn:hover {
    transform: scale(1.2);
    opacity: 0.8;
}

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

.modal-close-btn iconify-icon {
    width: 32px;
    height: 32px;
    color: #ffffff;
}

/* Modal Navigation Buttons */
.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    height: auto;
    background: transparent;
    border: none;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    padding: 0;
    margin: 0;
    outline: none;
}

.modal-nav-btn:hover {
    transform: translateY(-50%) scale(1.2);
    opacity: 0.8;
}

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

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

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

.modal-nav-btn iconify-icon {
    width: 2rem;
    height: 2rem;
    font-size: 2rem;
    color: #ffffff;
}

.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;
    }

    .modal-close-btn iconify-icon {
        width: 28px;
        height: 28px;
    }

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

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

    .modal-nav-btn iconify-icon {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 1.5rem;
    }

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

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

    .modal-close-btn iconify-icon {
        width: 24px;
        height: 24px;
    }

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

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

    .modal-nav-btn iconify-icon {
        width: 1.25rem;
        height: 1.25rem;
        font-size: 1.25rem;
    }

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

