/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: modalFadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    margin: auto;
    animation: modalSlideIn 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal-image {
    max-width: 90vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    cursor: zoom-in;
    display: block;
    margin: auto;
}

.modal-image.zoomed {
    cursor: zoom-out;
}

/* Modal navigation arrows */
.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    font-size: 24px;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.modal-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #d2a6a6;
}

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

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

.modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px 10px;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #d2a6a6;
}

/* Zoom controls */
.modal-zoom-controls {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.zoom-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.zoom-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #d2a6a6;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideIn {
    from { 
        transform: scale(0.8);
        opacity: 0;
    }
    to { 
        transform: scale(1);
        opacity: 1;
    }
}

/* Mobile adjustments for modal */
@media (max-width: 768px) {
    .modal-content {
        max-width: 90%;
        max-height: 75%;
    }

    .modal-close {
        top: -35px;
        font-size: 28px;
    }

    .modal-nav {
        font-size: 20px;
        padding: 8px 12px;
    }

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

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

    .modal-zoom-controls {
        bottom: -40px;
        padding: 6px 12px;
    }

    .zoom-btn {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        max-width: 95%;
        max-height: 70%;
    }

    .modal-prev {
        left: 10px;
        top: 10px;
        transform: none;
    }

    .modal-next {
        right: 10px;
        top: 10px;
        transform: none;
    }

    .modal-close {
        top: 10px;
        right: 50%;
        transform: translateX(50%);
    }

    .modal-zoom-controls {
        bottom: -35px;
        padding: 4px 8px;
    }
}