/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 2rem;
    border: 1px solid #888;
    width: 95%;
    max-width: 900px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideIn 0.3s;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

@media (max-width: 768px) {
    .modal-content {
        margin: 0 auto;
        border-radius: var(--border-radius-md) var(--border-radius-md) 0 0;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-height: 85vh;
    }
}

/* Ensure modal photo bar has some height if it's meant to be a color bar, or it will disappear without text */
.modal-photo {
    height: 10px;
    width: 100%;
    border-radius: 5px;
    margin-bottom: 1rem;
    display: block;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--color-orange);
    text-decoration: none;
    cursor: pointer;
}

.modal h3 {
    margin-top: 0;
    color: var(--color-text-dark);
    margin-bottom: 1rem;
    padding-right: 20px;
}

.modal p {
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-whatsapp {
    background-color: #25D366;
    border: none;
}

.btn-whatsapp:hover {
    background-color: #128C7E;
}

.btn-mail {
    background-color: var(--color-orange);
    border: none;
}

.btn-mail:hover {
    background-color: #e65100;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}