/* Modal styles */
.modal-image {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
}

/* Close button */
.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2001;
    font-size: 1.5rem;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

/* Mobile-specific close instruction */
.modal-close-instruction {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    z-index: 2001;
    animation: fadeInUp 0.5s ease-out 1s both;
}

@media (max-width: 768px) {
    .modal-close-instruction {
        display: block;
    }
    
    .modal-close-btn {
        width: 50px;
        height: 50px;
        top: 15px;
        right: 15px;
    }
}

@media (min-width: 769px) {
    .modal-close-instruction {
        display: none;
    }
}

/* Holiday Notice Modal Styles */
#holidayNoticeModal .modal-content {
    max-width: 500px;
    margin: 0 auto;
    animation: fadeIn 0.3s ease-out;
}

#holidayNoticeModal .box {
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

#holidayNoticeModal .button {
    min-width: 150px;
    font-weight: 500;
    transition: all 0.2s ease;
}

#holidayNoticeModal .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.modal-image.loading::before {
    content: 'Loading...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    z-index: 1;
}

.modal-image img {
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Prevent clicking on image itself */
}

/* Image grid styles */
.image-grid figure {
    cursor: pointer;
    margin: 0;
    padding: 0;
}

.image-grid .image {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    margin-bottom: 1rem;
}

.image-grid .image.portrait {
    padding-top: 140%;
}

.image-grid .image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.image-grid .image:hover img {
    transform: scale(1.05);
    opacity: 0.8;
}

/* Animation keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}


