/* Estilos generales */

/* Contenedor principal */
.contact-container {
    display: flex;
    flex-direction: row;
    max-width: 1200px;
    width: 90%;
    background-color: transparent;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    overflow: hidden;
    margin: auto;
    position: relative;
    min-height: 500px;

}

/* Animaciones de entrada */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Lado del mapa */
.contact-map-container {
    flex: 1.5;
    min-height: 500px;
    animation: slideInUp 0.8s ease-out;
    /* Animación de abajo hacia arriba */
    order: 1;
    width: 50%;
}

/* Lado del formulario */
.contact-form-container {
    flex: 1;
    padding: 30px;
    box-sizing: border-box;
    background-color: #f5f6f8;
    animation: slideInRight 0.8s ease-out;
    /* Animación desde la derecha */
    order: 2;
    width: 50%;

}



.form-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
}

/* Estilos de los grupos de campos */
.form-group,
.form-group-inline {
    margin-bottom: 15px;
}

.form-group-inline {
    display: flex;
    gap: 15px;
}

.form-input-container {
    flex: 1;
}

label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}

input,
select,
textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #007bff;
}

select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%22292.4%22 height%3D%22292.4%22%3E%3Cpath fill%3D%22%23007bff%22 d%3D%22M287 69.4a17.6 17.6 0 0 0-13.8-6.3h-258c-5.9 0-11.2 2-15.4 5.4-4.1 3.5-6.5 8.3-6.5 13.9 0 5.6 2.3 10.4 6.5 13.9l127.9 127.8a17.6 17.6 0 0 0 13.8 6.3 17.6 17.6 0 0 0 13.8-6.3l127.8-127.8c4.2-3.5 6.5-8.3 6.5-13.9a17.6 17.6 0 0 0-6.5-13.9z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
}

textarea {
    resize: none;
}

.boton-submit {
    background-image: linear-gradient(to top, rgb(3, 49, 123)40%, rgb(0, 111, 241)90%);
    /* background-color: #4CAF50;*/
    /* Verde */
    color: white;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    width: 100%;
    margin-top: 1%;
}

.boton-submit:hover {
    transform: scale(1.1);
    background-image: rgb(224, 172, 15);
    /* Escala el botón al 110% de su tamaño */
}


.send-button {
    width: 100%;
    padding: 10px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.send-button:hover {
    background-color: #0056b3;
}

/* Estilo para campos inválidos */
input.invalid {
    border-color: #ff0000;
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

/* Estilo para mensajes de error */
.error-message {
    color: #ff0000;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* Media Query para pantallas pequeñas (móviles) */
@media (max-width: 768px) {
    .contact-container {
        flex-direction: column;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
    }

    .contact-form-container {
        padding: 20px;
        animation: none;
        /* Desactivamos la animación en móviles */
        order: 1;
        width: 100%;
        margin-bottom: 4%;
    }

    .contact-map-container {
        display: block;
        /* Aseguramos que el mapa se muestre en móviles */
        /*  min-height: 300px;*/
        /* Ajustamos la altura para móviles */
        animation: none;
        /* Desactivamos la animación en móviles para evitar problemas de rendimiento */
        /* max-width: 100%;*/
        order: 2;
        width: 100%;
        height: 100%;
        margin-bottom: -100%;
    }

    .form-group-inline {
        flex-direction: column;
    }

    .carousel-img {
        display: none;

    }

    .carousel-images {
        display: none;
    }

}

/* Contenedor de la barra */
#progressBarContainer {
    width: 100%;
    background-color: #f3f3f3;
    /* Color de fondo del contenedor */
    border-radius: 5px;
    margin: 15px 0;
    /* La barra se oculta al inicio con display: none; y se muestra con JavaScript */
    display: none;
    display: block !important;
    /*  border: 1px solid rgb(27, 19, 134);*/

    height: 30px !important;
    /* border: 1px solid red;*/
    /* para visualizarlo claramente */
    overflow: visible;

}

/* La barra de progreso en sí */
#progressBar {
    width: 0%;
    height: 30px;
    /* <-- Asegúrate de que este valor esté presente y sea suficiente */
    background-image: linear-gradient(to right, #4CAF50, rgb(8, 87, 27));
    /* background-color: #4CAF50;*/
    /* Color de la barra, por ejemplo, verde */
    border-radius: 5px;
    /*   transition: width 0.5s ease-in-out;*/
    /* Animación para un efecto suave */
    background-color: green !important;

}

/* El texto de "Enviando..." */
#progressText {
    display: block;
    text-align: center;
    font-size: 1.1em;
    color: #555;
    margin-top: 5px;
}

/*validacion de los campos input */

.valid {
    border: 2px solid green;
}

.error {
    border: 2px solid red;
}

.error-msg {
    color: red;
    font-size: 0.9em;
    margin-top: 4px;
    display: block;
}

button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}