* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.modal {
    display: none; 
    position: fixed;
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-contenido {
    background-color: #ffffff;
    margin: 1% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%; 
    max-width: 600px; /* Ancho máximo para el formulario */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s;
}

/* Animación simple para cuando se abre el modal */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}


.modal-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #5a189a;
    margin-bottom: 20px;
}

.modal-logo {
    width: 80px;
    height: auto;
    margin-bottom: 10px;
}

.modal-header h2 {
    color: #5a189a;
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 5px;
}

.modal-header p {
    color: #7b2cbf;
    margin: 0;
}


.formulario-contacto label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.required {
    color: #e5383b;
}

.grupo-campos {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.campo {
    flex: 1;
}

.campo-full {
    flex: none;
    width: 100%;
    margin-bottom: 15px;
}

.formulario-contacto input[type="text"],
.formulario-contacto input[type="email"],
.formulario-contacto input[type="tel"],
.formulario-contacto textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.3s;
}

.formulario-contacto input:focus,
.formulario-contacto textarea:focus {
    border-color: #5a189a;
    outline: none;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    margin-top: 10px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.3s;
}

.btn-enviar {
    background-color: #7b2cbf;
    color: white;
}

.btn-enviar:hover {
    background-color: #5a189a;
}

.btn-cancelar {
    background-color: #ccc;
    color: #333;
}

.btn-cancelar:hover {
    background-color: #b0b0b0;
}

@media (max-width: 500px) {
    .grupo-campos {
        flex-direction: column;
        gap: 0;
    }
}