/* Reset y fuentes */
* {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
}

/* Estilización de h2 */
h2 {
    padding-bottom: 1.4em;
    font-family: 'Roboto', sans-serif;
    font-size: 24px;
    text-align: center;
}

/* Body and html */
body, html {
    height: 100%;
    width: 100%;
    margin: 0;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Contenedor del formulario */
.form-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    transition: background-color 0.6s ease-in-out;
}

/* Clases para los colores de fondo */
.bg-blue {
    background-color: #374462;
}

.bg-green {
    background-color: #7ca497;
}

/* Formulario */
form {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    padding: 30px 40px;
    border-radius: 10px;
    /* Eliminado box-shadow */
    z-index: 10;
    color: inherit; /* Hereda el color del contenedor */
    transition: background-color 0.6s ease-in-out, color 0.6s ease-in-out;
}

/* Clases para el color del texto y fondo del form */
.text-white {
    color: #ffffff;
    background-color: rgba(55, 68, 98, 0.8); /* Azul oscuro con opacidad */
}

.text-black {
    color: #000000;
    background-color: rgba(124, 164, 151, 0.8); /* Verde con opacidad */
}

/* Estilo de cada paso */
.form-step {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease-in-out;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    padding: 20px;
}

.form-step.active {
    display: flex;
    opacity: 1;
    z-index: 1;
}

/* Estilo del campo de entrada */
.input-group {
    margin-bottom: 25px;
    width: 100%;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: none;
    border-bottom: 2px solid #374462; /* Color por defecto */
    background-color: transparent;
    color: inherit; /* Hereda el color del formulario */
    font-size: 16px;
    outline: none;
    transition: border-bottom 0.3s ease, background-color 0.3s ease;
}

.input-group textarea {
    resize: vertical;
    height: 80px;
}

.input-group input::placeholder,
.input-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.7); /* Color por defecto del placeholder */
}

/* Actualizar color del placeholder según el color del texto */
.text-white .input-group input::placeholder,
.text-white .input-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.text-black .input-group input::placeholder,
.text-black .input-group textarea::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

/* Actualizar color de la línea inferior según el color del texto */
.text-white .input-group input,
.text-white .input-group textarea {
    border-bottom-color: #7ca497;
}

.text-black .input-group input,
.text-black .input-group textarea {
    border-bottom-color: #374462;
}

/* Actualizar estilos al enfocar según el color del texto */
.text-white .input-group input:focus,
.text-white .input-group textarea:focus {
    border-bottom: 2px solid #7ca497;
    background-color: rgba(124, 164, 151, 0.1);
}

.text-black .input-group input:focus,
.text-black .input-group textarea:focus {
    border-bottom: 2px solid #374462;
    background-color: rgba(55, 68, 98, 0.1);
}

/* Botones */
button {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #374462;
    color: #ffffff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    color: inherit; /* Hereda el color del formulario */
}

button:hover {
    background-color: #7ca497;
    transform: scale(1.05);
}

/* Botón de envío con color diferente */
.submit-btn {
    background-color: #34a853;
    color: #ffffff;
}

.submit-btn:hover {
    background-color: #2c8e46;
    color: #ffffff;
}

/* Página de éxito */
.success-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    flex-direction: column;
    text-align: center;
    background-color: #7ca497;
    color: #ffffff;
}

.success-container h2 {
    margin-bottom: 20px;
    font-size: 28px;
}

.success-container p {
    margin-bottom: 30px;
    font-size: 18px;
}

.success-container button {
    padding: 12px 25px;
    background-color: #ffffff;
    color: #374462;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.success-container button:hover {
    background-color: #374462;
    color: #ffffff;
}

/* Responsividad */
@media (max-width: 600px) {
    form {
        padding: 20px 25px;
    }

    .form-step h2 {
        font-size: 20px;
    }

    .input-group input,
    .input-group textarea {
        font-size: 14px;
        padding: 8px 12px;
    }

    button {
        font-size: 14px;
        padding: 8px 16px;
    }

    .submit-btn {
        padding: 8px 16px;
    }

    .success-container h2 {
        font-size: 24px;
    }

    .success-container p {
        font-size: 16px;
    }

    .success-container button {
        padding: 10px 20px;
        font-size: 14px;
    }
}
