/* Tu CSS existente */
* {
    box-sizing: border-box;
}

*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}






.h2titulo{
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}



.h2 {
    text-align: center;
    text-transform: uppercase;
    margin-top: 30px;
    background-color: #ffffff;
  
    border-top: 1px solid burlywood;
    border-left: 6px solid burlywood;
    border-right: 6px solid burlywood;
    border-bottom: 6px solid burlywood;
    border-radius: 30px;
    width: 70%;
    font-size: 23px;
    position: relative; /* Necesario para la animación de 'left' */


  
}


/* Media query para tabletas (ej. ancho máximo de 768px) */
@media (max-width: 768px) {
    .h2 {
        width: 90%; /* Aumenta el ancho para tabletas */
        font-size: 20px; /* Reduce ligeramente el tamaño de fuente */
        margin-top: 20px; /* Ajusta el margen superior */
    }
}

/* Media query para móviles (ej. ancho máximo de 480px) */
@media (max-width: 480px) {
    .h2 {
        width: 95%; /* Aumenta aún más el ancho para móviles */
        font-size: 12px; /* Reduce el tamaño de fuente para mejor lectura */
        border-width: 3px; /* Podrías reducir el grosor de los bordes */
        border-radius: 20px; /* Podrías ajustar el radio del borde */
    }
}


/* Para pantallas de tablet y móviles (768px y menos) */




section{
    width: 100%;
    
   
    display: flex;
    justify-content: center;
    align-items: center;
   
}



.container {
    width: 400px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 22px 50px rgba(0,0,0,0.1);
    /* Animación para escalar el contenedor al cargar */
    animation: scaleIn 1s forwards; /* Nombre de la animación, duración, y forwards para que se quede al final */
    transform: scale(0); /* Estado inicial: invisible o muy pequeño */
}

.mensaje {
    padding: 10px 20px;
    background-color: #e0e0e0;
    color: #333;
    text-align: center;
    word-wrap: break-word;
    
}

.buttons {
    display: flex;
}
.buttons button {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}
.buttons button:hover {
    background: #f4f4f4;
}

.forms {
    display: flex;
    width: 1200px;
    transition: transform 0.5s ease;
}
.form-slide {
    width: 400px;
    padding: 20px;
}

h2 {
    text-align: center;
    margin-bottom: 15px;
}

form {
    display: flex;
    flex-direction: column;
}

input {
    margin-bottom: 15px;
    padding: 10px;
    font-size: 1em;
    border-radius: 4px;
    border: 1px solid #ccc;
}

button[type='submit'] {
    padding: 12px;
    background:  goldenrod;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
}

button[type='submit']:hover {
    background:  goldenrod;
}
.link {
    text-align: right;
    margin-top: -10px;
    margin-bottom: 15px;
    font-size: 0.9em;
    cursor: pointer;
    color: #007BFF;
}
.link:hover {
    text-decoration: underline;
}

/* --- Media Queries --- */

/* Para pantallas con un ancho máximo de 768px (tablets y móviles) */
@media (max-width: 768px) {
    .container {
         margin-bottom: 60px;
        width: 95%; /* El contenedor ocupa el 95% del ancho de la pantalla */
        max-width: 400px; /* Pero no excede 400px */
    }

    .form-slide {
        padding: 15px; /* Reduce el padding en pantallas más pequeñas */
    }

    h2 {
        font-size: 1.3em; /* Reduce un poco el tamaño del título */
    }

    input,
    button[type='submit'],
    .buttons button {
        font-size: 0.9em; /* Ajusta el tamaño de fuente general */
        padding: 10px; /* Reduce el padding de inputs y botones */
    }

    .link {
       
        font-size: 0.8em; /* Reduce el tamaño de fuente del enlace */
        margin-top: -5px; /* Ajusta el margen superior */
    }
}

/* Para pantallas con un ancho máximo de 480px (principalmente móviles) */
@media (max-width: 480px) {
    section {
        height: auto; /* Permite que la sección se ajuste a la altura del contenido */
        padding: 5px;
    }

    .container {
        margin-bottom: 60px;
        border-radius: 5px; /* Ligeramente menos redondeado */
        box-shadow: 0 10px 20px rgba(0,0,0,0.1); /* Sombra más sutil */
    }

    .form-slide {
        padding: 10px; /* Padding mínimo */
        
    }

    .container h2 {
        font-size: 1.2em;
        margin-bottom: 10px;
        margin-right: 45px;
        
        
    }

    input {
        margin-bottom: 10px;
        padding: 8px;
        width: 88%;
    }

    button[type='submit'] {
        padding: 10px;
        font-size: 0.95em;
        width: 88%;
    }

    .link {
        font-size: 0.75em;
        margin-bottom: -10px;
        transform: translateY(-10px);
        transform: translateX(95%);
        margin-right: 40px;
       
    }

    form{
        display: flex;
        justify-content: center;
        align-items: center;
    }
}






@media (max-width: 394px) {
   
    form{
        width: 100%;
        background-color: #ffffff;
        padding: 0px;
        margin: 0px;
        align-items: center;

    }
.container{
    padding: 0px;
    margin: 0px;
   
}
    /* Contenedor para los formularios deslizables */
.forms {
    display: flex;
    width: 600px;
    transition: transform 0.5s ease;
    padding: 0px;
   
}


/* Estilos para cada formulario individual dentro del deslizador */
.form-slide {
    width: 400px;
    padding: 20px;
    flex-shrink: 0;
}
 input {
        width: 310px;
        background-color: #d7d7d7;
        border-radius: 6px;
        margin-right: 30px;
        height: 40px;
      

    }

 button[type='submit'] {
        padding: 1px;
        font-size: 0.95em;
   

           width: 310px;
      
        border-radius: 6px;
        margin-right: 30px;
        height: 40px;
    }

    .link{
         transform: translateX(70%);

    }

    }

    @media (max-width: 370px) {
   
    form{
        width: 100%;
        background-color: #ffffff;
        padding: 0px;
        margin: 0px;
        align-items: center;

    }

    .forms input {
        width: 310px;
        background-color: #f2f2f2;
        border-radius: 6px;
        margin-right: 30px;
        height: 40px;
      margin-right: 15%;

    }

 input,
    button[type='submit'],
    .buttons button {
      
        font-size: 0.9em; /* Ajusta el tamaño de fuente general */
        padding: 10px; /* Reduce el padding de inputs y botones */
    }



 button[type='submit'] {
        padding: 1px;
        font-size: 0.95em;
   
transform: translateX(-4%);
           width: 310px;
      
        border-radius: 6px;
        margin-right: 30px;
        height: 40px;
    }
}
