.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .9);
    z-index: 1000;
}

.modal-content {
    position: relative;
    margin: 5% auto;
    max-width: 90%;
    max-height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.modal img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        max-width: 95%;
        min-height: 70vh;
        align-items: center;
        justify-content: center;
    }
    
    .modal img {
        max-height: 60vh;
    }
    
    .modal-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }
    
    .modal-close::after {
        font-size: 2rem;
        transform: translateY(1px);
    }
    
    .modal-nav {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        padding: 10px 15px;
    }
    
    .modal-prev {
        left: 10px;
    }
    
    .modal-next {
        right: 10px;
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 2.5rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0;
    margin: 0;
    text-indent: -9999px;
    overflow: hidden;
}

.modal-close::after {
    content: 'X';
    display: block;
    line-height: 0;
    text-indent: 0;
    transform: translateY(1px);
    font-size: 2.5rem;
    font-weight: 300;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.modal-close:hover::after {
    transform: translateY(1px);
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-size: 1.5rem;
    font-weight: 300;
    padding: 15px 20px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-50%) scale(1.1);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}
