body{
        margin: 0;
        background-attachment: fixed;
        background-image: url("../img/Fondo_fernanda.jpg");
        background-repeat: no-repeat;
        justify-items: left;
        background-size: 75%;
        background-position: bottom right; /*alinear a la izquierda*/
    }
   .contenedor{
        position: relative;       
        background: linear-gradient(180deg, #153772, #2868D8);
        color: #ffffff; /* Texto blanco para todo dentro */       
        width: 540px;                
        min-height: 956px;           
        padding: 30px;
        box-sizing: border-box;      
        /* Crear un contexto aislado para que el texto e inputs no se vayan atrás */
        transform-style: preserve-3d; 
   }
   .contenedor::before {
        content: "";                 
        position: absolute;          
        top: 0px;                   
        left: -15px;                  
        width: 560px;
        height: 100%;
        background-color: #ffffff;    
        box-shadow: 20px 20px 40px rgba(0, 0, 0, 0.9);
        /* Envía el pseudoelemento al fondo tridimensional detrás del azul */
        transform: translateZ(-1px); 
        }
    .escudolog{
        display: block;
        margin: 80px auto 60px auto;
        width: 238px;
        height: auto;
        justify-items: center;
    }

    h1{
        font-size: 34px;
        font-family: 'Montserrat', sans-serif;
        font-weight: 600;        /*seminegrita */
        text-align: center;
        text-shadow: 
        -1px -2px 0 #BE1414,  
        1px -2px 0 #BE1414,
        -1px  2px 0 #BE1414,
         1px  2px 0 #BE1414; 
        line-height: 1.3;  /* Controla la separación entre las dos líneas */
        max-width: 500px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 35px; /*espacio de margen inferior */
    }

    h2 {
        font-size: 23px;
        font-family: 'Kadwa', serif;
        text-align: center;
        margin-bottom: 3px;
    }
    .campousser{
        display: block;
        width: 431px;
        height: 35px;
        margin-left: auto;
        margin-right: auto;
        border-radius: 7px;
        box-sizing: border-box;
    }
    .campopass{
        display: block;
        width: 431px;
        height: 35px;
        margin-left: auto;
        margin-right: auto;
        border-radius: 7px;
        box-sizing: border-box;
    }
    .botoncambio{
        display: block;
        background: none;
        border: none;
        color: #ffffff;
        font-size: 16px;
        cursor: pointer;
        margin: auto 1px 20px 20px;
        padding: 5px 0;
        transition: color 0.3s ease; /* Suaviza la transición del cambio de color */
    }
    .botoncambio:hover {
        color: #B5B5B5;
    }
    .botoncambio:active {
        color: #78909c;
    }
    .inicio{
        display: block;
        background-color: #CA2735;
        border: none;
        border-radius: 11px;
        color: #ffffff;
        width: 220px;
        height: 52px;
        font-size: 24px;
        cursor: pointer;
        margin: 20px auto 10px auto;
        padding: 3px 0;
        transition: background-color 0.3s ease;
    }
    .inicio:hover{
        background-color: #971823;
    }
    .inicio:active{
        background-color: #D06871;
    }

   /* Diseño moviles de Pantallas menores a 768px */
@media (max-width: 767px) {
    body {
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
        background-size: cover;
        background-position: center;
        padding: 20px; 
        box-sizing: border-box;
    }
    .contenedor {
        width: 85%;              
        max-width: 320px;        
        min-height: auto;        
        padding: 35px 20px;
        transform-style: preserve-3d; 
    }
    .contenedor::before {
        content: "";
        position: absolute;
        /* centrado */
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%) translateZ(-1px); /* Centrado absoluto + capa trasera */
        width: calc(100% + 12px);
        height: calc(100% + 12px);
        
        /* Estilos visuales del marco trasero */
        background-color: #ffffff;  
        border-radius: 14px;
        
        /* Sombra paralela expandida uniformemente hacia todos los lados */
        box-shadow: 0px 0px 25px rgba(0, 0, 0, 0.80);
    }
    .contenedor h1 {
        font-size: 20px;         
        max-width: 220px;
        margin-bottom: 20px;
    }
    .escudo-login {
        width: 100px;            
        height: 100px;
        margin-bottom: 15px;
    }
}
.contenedor input {
        display: block;
        width: 100%;             /* Se adapta al ancho disponible del contenedor */
        max-width: 240px;        /* Reducimos el ancho máximo para que quepa en móviles */
        box-sizing: border-box;  /* Evita que el padding sume tamaño extra */
        margin-left: auto;       
        margin-right: auto;
        padding: 10px 12px;      /* Hace el campo ligeramente más compacto en pantallas chicas */
    }


.boton-iniciar { 
        display: block;
        width: 100%;
        max-width: 240px;        
        box-sizing: border-box;
        margin-left: auto;
        margin-right: auto;
    }
/* EL FONDO OSCURO TRANSLÚCIDO */
/*.overlay-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6); /* El 0.6 da la opacidad oscura 
    z-index: 100; /* Número muy alto para que tape absolutamente todo 
    
    /* Centrado perfecto de la tarjeta interna 
    display: flex;
    justify-content: center;
    align-items: center;
}*/

/* 2. LA TARJETA AZUL DEL MODAL */
.tarjeta-modal {
    display: none;
    background: linear-gradient(180deg, #1e4b9b, #11306b); /* Tu degradado azul */
    width: 90%;
    max-width: 500px; /* Ancho idéntico al de tu imagen de referencia */
    padding: 35px;
    border-radius: 16px;
    box-sizing: border-box;
    text-align: center;
    color: #ffffff;
    font-family: system-ui, sans-serif;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* 3. ESTILOS DE TEXTOS E INPUTS INTERNOS */
.tarjeta-modal h2 {
    display: none;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
}

.texto-modal {
    display: none;
    font-size: 14px;
    line-height: 1.5;
    color: #e0e0e0;
    margin-bottom: 15px;
}

.correo-oculto {
    display: none;
    font-weight: bold;
    font-size: 15px;
    margin: 15px 0;
}

.input-modal {
    display: none;
    width: 100%;
    max-width: 400px;
    padding: 12px;
    border-radius: 4px; /* Bordes casi rectos como tu imagen */
    border: none;
    margin: 20px auto;
    display: block;
    box-sizing: border-box;
}

/* 4. BOTÓN ROJO */
.boton-enviar-codigo {
    
    background-color: #d32f2f; /* Tu rojo de botón */
    color: white;
    border: none;
    padding: 12px 35px;
    font-size: 15px;
    border-radius: 20px; /* Botón con forma ovalada/píldora */
    font-weight: bold;
    cursor: pointer;
    display: block;
    margin: 0 auto;
}