@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap");

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI";
}

html,
body {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

/* ============================================================
   VARIABLES DE ENTORNO
============================================================ */
:root {
    /* COLORES PRINCIPALES */
    --color-primary: #a68160;
    --color-secondary: #ffffff;
    --color-tertiary: #000000;

}

/* ============================================================
   CUERPO
============================================================ */
body {
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ============================================================
   CONTENEDOR PRINCIPAL
============================================================ */
.contenedor {
    background-color: var(--color-secondary);
    border-radius: 3vh;
    box-shadow: 1px 1px 8px 1px var(--color-primary);
    position: relative;
    overflow: hidden;
    width: 75vw;
    height: 80vh;
    max-width: 100%;
    min-height: 480px;
}

/* Activador de animación del panel derecho */
.contenedor.panel-derecho-activo .panel-izquierdo {
    transform: translateX(0);
    padding: 2em;
}

/* ============================================================
   FORMULARIOS: CONTENEDORES
============================================================ */
.contenedor-formulario {
    position: absolute;
    height: 100%;
    transition: all 0.7s ease-in-out;
}

/* Inicio de sesión */
.contenedor-inicio-sesion {
    left: 0;
    width: 40%;
    z-index: 2;
}

.contenedor.panel-derecho-activo .contenedor-inicio-sesion {
    transform: translateX(100%);
}

/* Registro */
.contenedor-registro {
    left: 0;
    width: 40%;
    opacity: 0;
    z-index: 1;
    animation: mostrar 0.1s;
}

.contenedor.panel-derecho-activo .contenedor-registro {
    transform: translateX(150%);
    opacity: 1;
    z-index: 5;
}

/* Animación de transición */
@keyframes mostrar {

    0%,
    70% {
        opacity: 0;
        z-index: 1;
    }

    50%,
    100% {
        opacity: 1;
        z-index: 5;
    }
}

@keyframes aparecerSuave {
    from {
        opacity: 0;
        transform: translateY(20px);
        /* o X si es lateral */
    }

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

/* ============================================================
   FORMULARIO
============================================================ */
form {
    background-color: var(--color-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: column;
    padding: 1em 2em;
    height: 100%;
    text-align: center;
    width: 100%;
}

.input-container {
    position: relative;
    width: 100%;
}

.input-container i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-primary);
}

.input-container input {
    background-color: #f2f2f2;
    border: none;
    max-height: 21vh;
    font-weight: 500;
    width: 100%;
    padding: 0.6rem 0;
    border-radius: 0.7rem;
    resize: vertical;
    overflow-y: auto;
    color: var(--color-primary);
        font-size: clamp(.8em, 1.5vw, 5em);

}

.input-container input:focus {
    outline: none;
}

.campos-formulario {
    width: 100%;
    display: grid;
    gap: 3vh;
}

/* ============================================================
   BOTONES
============================================================ */
button {
    border-radius: 2vh;
    border: 1px solid var(--color-secondary);
    background-color: var(--color-primary);
    color: var(--color-secondary);
    padding: 1vh;
    text-transform: uppercase;
    width: 100%;
    font-size: clamp(.8em, 1.5vw, 5em);
    font-weight: bold;
    transition:
        transform 80ms ease-in,
        background-color 0.2s ease,
        color 0.3s ease;
}

button:active {
    transform: scale(0.95);
}

button:focus {
    outline: none;
}

/* Botón fantasma */
button.fantasma {
    background-color: transparent;
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    font-weight: bold;
}

button.fantasma:hover {
    border: 1px solid var(--color-primary);
    background-color: var(--color-secondary);
    color: var(--color-primary);
    transform: scale(1.05);
    transition: .6s;
}

/* Botones de selección de tipo de usuario */
.botones-tipo-usuario {
    display: flex;
    gap: 1.2em;
    font-weight: bolder;
    justify-content: space-between;
    width: 100%;
    border-radius: 1.5vh;
    font-weight: bold;
    font-size: clamp(.8em, 1.5vw, 5em);

}

.boton-tipo-usuario {
    flex: 1;
    border: 2px solid var(--color-primary);
    background-color: #fff;
    color: var(--color-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 2vh;
    font-size: clamp(.8em, 1.3vw, 5em);
    font-weight: bolder;
}

.boton-tipo-usuario.activo {
    background-color: var(--color-primary);
    color: var(--color-secondary);
}

button{
    border: 2px solid var(--color-primary);

}

button:hover{
    color: var(--color-primary);
    background-color: var(--color-secondary);
    border: 2px solid var(--color-primary);
}
/* ============================================================
   PANEL DE SUPERPOSICIÓN
============================================================ */
.contenedor-superposicion {
    position: absolute;
    top: 0;
    left: 40%;
    width: 60%;
    height: 100%;
    overflow: hidden;
    transition: transform 0.6s ease-in-out;
    z-index: 100;
}

.contenedor.panel-derecho-activo .contenedor-superposicion {
    transform: translateX(-66.6%);
}

.superposicion {
    background: var(--color-primary);
    color: var(--color-secondary);
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: transform 0.6s ease-in-out;
}

.contenedor.panel-derecho-activo .superposicion {
    transform: translateX(50%);
}

.panel-superposicion {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    top: 0;
    height: 100%;
    width: 50%;
    gap: 1em;
    transition: transform 0.6s ease-in-out;
}

.panel-superposicion h1 {
    font-size: 6em;
    font-weight: bolder;
}

.panel-superposicion h3 {
    font-weight: bolder;
    font-size: 1.5em;
}

.panel-izquierdo {
    transform: translateX(-20%);
}

.contenedor.panel-derecho-activo .panel-izquierdo {
    transform: translateX(0);
}

.panel-derecho {
    right: 0;
    transform: translateX(0);
}

.contenedor.panel-derecho-activo .panel-derecho {
    transform: translateX(20%);
}

/* ============================================================
   TEXTOS E INFORMACIÓN
============================================================ */
.imgPresentation {
    display: flex;
    flex-direction: column;
    align-items: left;
    justify-content: center;
    padding: 0em 2em;
    height: 100%;
    gap: 2em;
}

.imgPresentation h1 {
    font-size: 6em;
    font-weight: bolder;
    text-align: left;
}

.imgPresentation h3 {
    text-align: left;
    font-size: 2.5em;
}

.imgPresentation .promotion {
    width: 100%;
    font-size: 1.3em;
    text-align: left;
}

/* Estilos para P y H2 dentro del formulario */
.inputP {
    color: var(--color-primary);
    font-size: clamp(1em, 1.5vw, 5em);
    font-weight: bolder;
    text-align: left;
    width: 100%;
}

.inputH2 {
    color: var(--color-primary);
    font-size: clamp(1em, 1.9vw, 5em);

}

/* ============================================================
   ENLACES DEL FORMULARIO
============================================================ */
.enlaces-formulario {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    width: 100%;
    margin-top: 1em;
}


/* Enlaces del formulario */
.enlaces-formulario2 {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-top: 1rem;
}

.olvidaste-contraseña {
    text-decoration: none;
    font-weight: 600;
    color: var(--color-primary);
    transition: transform 0.2s;
    font-size: clamp(.8em, 1vw, 5em);

}

.no-tiene-cuenta {
    text-decoration: none;
    font-weight: 600;
    color: var(--color-primary);
    transition: transform 0.2s;
    text-align: center;
    font-size: clamp(.8em, 1vw, 5em);

}

.tiene-cuenta {
    text-decoration: none;
    font-weight: 600;
    color: var(--color-primary);
    transition: transform 0.2s;
    text-align: center;
    font-size: clamp(.8em, 1vw, 5em);

}

.olvidaste-contraseña:hover,
.no-tiene-cuenta:hover,
.tiene-cuenta:hover {
    transform: scale(1.05);
    
}

/* ============================================================
   CONTENEDOR VOLVER
============================================================ */
.contenedor-volver {
    text-align: center;
    margin: 1.5rem 0;
}

.tieneCuenta {
    display: inline-block;
    padding: 10px 20px;
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    border-radius: 2vh;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tieneCuenta:hover {
    background-color: var(--color-primary);
    color: #fff;
}

/* ============================================================
   ANIMACIONES PERSONALIZADAS
============================================================ */
@keyframes rotateIcon {
    0% {
        transform: rotate(-90deg);
    }

    100% {
        transform: rotate(90deg);
    }
}

/* ============================================================
   ESTILOS RESPONSIVE PARA PANTALLAS CHICAS (MAX-WIDTH: 1050PX)
============================================================ */

@media (max-width:1150px) {

    .contenedor {
        width: 90vw;
        height: 90vh;
    }

    form{
        padding: 2vh;
    }

    .panel-superposicion {
        font-size: 0.8em;
    }

    .inputH2 {
        font-size: clamp(1em, 2.6vw, 12em);
    }

    .inputP {
        font-size: clamp(1em, 2.6vw, 12em);
    }
    input{
        font-size: clamp(.8em, 2vw, 5em);
    }
    .input-container{
        display: grid;
        gap: 1vh;
    }

    .boton-tipo-usuario {
        font-size: clamp(.8em, 2.5vh, 5em);
    }

}

/* ============================================================
   ESTILOS RESPONSIVE PARA MÓVILES (MAX-WIDTH: 768PX)
============================================================ */
@media (max-width: 850px) {

    /* Contenedor principal - pantalla completa */
    .contenedor {
        width: 90vw;
        box-shadow: 1px 1px 8px 1px var(--color-primary);
        min-height: auto;
        padding: 10px;
        background-color: #fff;
    }

    /* Ocultar superposición en móviles */
    .contenedor-superposicion {
        display: none;
    }

    /* Contenedor de formularios */
    .contenedor-formulario {
        position: relative;
        width: 100%;
        height: 100%;
        left: 0;
        transform: none;
        opacity: 1;
        display: none;
        opacity: 0;
        animation: aparecerSuave 0.5s ease forwards;
    }

    .contenedor-inicio-sesion,
    .contenedor-registro {
        display: none;
    }

    .contenedor-inicio-sesion.activo,
    .contenedor-registro.activo {
        display: flex;
        height: 100%;
    }

    /* Estilos para los formularios */
    form {
        background-color: transparent;
        padding: 0;
        height: auto;
        display: flex;
        flex-direction: column;
        height: 100%;
        gap: 20px;


        /* Títulos */
        .inputH2 {
            color: var(--color-primary);
            font-size: clamp(1em, 5vh, 12em);
            text-align: center;
            font-weight: bold;
        }
    }

    .registerForm {
        height: 100%;
    }

    .registerform

    /* Botones de tipo de usuario */
    .botones-tipo-usuario {
        display: flex;
        gap: 10px;
        width: 100%;
    }

    .boton-tipo-usuario {
        flex: 1;
        padding: 1vh .5vh;
        font-size: clamp(.8em, 3vh, 5em);
        font-weight: bold;
        border: 2px solid var(--color-primary);
        background: #fff;
        color: var(--color-primary);
    }

    .boton-tipo-usuario.activo {
        background: var(--color-primary);
        color: #fff;
    }

    .inputP {
        color: var(--color-primary);
        font-size: clamp(1em, 3.4vh, 12em);
        font-weight: bold;
        margin-bottom: 0.5rem;
    }

    .input-container input {
        width: 100%;
        padding: 12px;
        border: 1px solid #ddd;
    }

    /* Botón de submit */
    form>button[type="submit"] {
        padding: 10px;
        font-size: clamp(.8em, 3vh, 12em);
        font-weight: bold;
        margin-top: 10px;
        background: var(--color-primary);
        color: #fff;
        border: none;
        cursor: pointer;
    }

    /* Enlaces del formulario */
    .enlaces-formulario {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        margin-top: 1rem;
    }


    /* Enlaces del formulario */
    .enlaces-formulario2 {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        margin-top: 1rem;
    }


    .olvidaste-contraseña,
    .no-tiene-cuenta,
    .tiene-cuenta {
        color: var(--color-primary);
        font-size: clamp(.8em, 3vw, 5em);
        text-decoration: none;
    }

    /* Botón tiene cuenta */
    .tieneCuenta {
        width: 100%;
        text-align: center;
        padding: 12px;
        font-size: clamp(.8em, 3vw, 5em);

        margin-top: 10px;
    }

    .contenedor-registro,
    .contenedor-inicio-sesion {
        display: none;
    }

    .contenedor-registro.activo,
    .contenedor-inicio-sesion.activo {
        display: block;
    }


}