@font-face {
    font-family: 'Tamrin';
    src: url('fuentes/tamrin.ttf') format('truetype');
}

body {
    margin: 0;
    background-color: #8aae70;
}

.EsquinaCirculo {
    position: absolute;
    height: 213px;
    width: 238px;
    border-top-right-radius: 100%;
    background-color: #4d70bc;
    left: 0;
    bottom: 0;
}

.EsquinaCurva {
    position: absolute;
    right: 0;
    top: 0;
    height: 210px;
    width: 200px;
}

.FondoVerde {
    position: absolute;
    width: 782px;
    height: 435px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 6%;
    background-color: #a9cd46;
}

.fondoAzul-Celular {
    display: none;
}

.fondoAzul {
    position: absolute;
    height: 438px;
    width: 445px;
    top: 50%;
    left: 27.5%;
    transform: translate(-50%, -50%);
}

/* Contenedor principal del encabezado (Logo + Textos) */
.ContenedorLogo {
    position: absolute;
    top: 3%;           
    left: 1%;         
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2;
}

/* Imagen del Logo */
.Logo {
    border-radius: 50%;
    width: 70px;
    height: 70px;
}

.TextosLogo {
    display: flex;
    flex-direction: column;
}

.Cooperadora {
    font-family: 'Tamrin', sans-serif;
    font-size: 8px;   /* Aumentado (antes era 11px) */
    font-weight: bold;
    color: black;
    margin: 0;
    white-space: nowrap;
}

.Instituto {
    font-family: 'Tamrin', sans-serif;
    font-size: 6px;    /* Aumentado (antes era 7px) */
    color: black;
    margin: 0;
    white-space: nowrap;
}

.Verde {
    color: #a9cd46;
}

/* --- ILUSTRACIÓN PUENTE Y TEXTO INFERIOR --- */
.ContenedorLogoNegro {
    position: absolute;
    top: 52%;          /* Ajuste leve para mantenerlo centrado verticalmente con su nuevo tamaño */
    left: 24%;         /* Se conserva la posición original */
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

.LogoNegro {
    width: 260px;      
    height: auto;
}

.ISFDYT {
    font-family: 'Tamrin', sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: #4d70bc; /* o el azul de fondo */
    margin-top: 10px;
    letter-spacing: 1px;
}

.Necochea {
    font-family: 'Tamrin', sans-serif;
    font-size: 9px;
    color: black;
    text-transform: lowercase;
    margin-top: 2px;
}

.ContenedorFormulario {
    position: absolute;
    width: 300px; 
    height: auto;
    top: 52.5%;     
    left: 73%;    
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
}

.formulario {
    display: flex;
    flex-direction: column;
    align-items: center; 
    width: 100%;
}

.contra {
    position: relative;
    width: 100%;
}

.ojo img{
    position: absolute;
    width: 10px;
    height: 10px;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
}

.titulo {
    font-family: 'Tamrin';
    font-size: 20px;
    margin: 0 0 25px 0;
}

.grupoInput {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 180px;
    margin-bottom: 7px;
}

.input {
    border-radius: 25px;
    padding: 10px;
    width: 100%;
    height: 30px;
    box-sizing: border-box;
    border: none;
    outline: none;
}

.label {
    font-family: 'Tamrin';
    font-size: 10px;
    margin-bottom: 4px;
}

input::placeholder {
    font-size: 10px;
}

input[type="text"] {
    font-size: 10px;
}

.linkOlvido {
    margin: 1px 0 0 0;
    align-self: flex-start;
    font-size: 10px;
    font-family: sans-serif;
    font-weight: bold;
}

.linkOlvido a {
    text-decoration: none;
}

.error{
    color: #c62828;
    font-size: 10px;
    font-family: sans-serif;
    font-weight: bold;
    align-self: flex-start;
    margin: 2px 0 0 0;
}

.btn {
    background-color: #ffffff;
    color: #000000;
    border: none;
    padding: 6px 18px;
    border-radius: 25px;
    font-family: 'Tamrin';
    font-size: 10px;
    box-shadow: 0px 2px 5px rgba(0,0,0,0.1);
    margin-top: -2px;
}

.linkRegistro {
    font-family: sans-serif;
    margin: 1px 0 0 0;
    font-size: 10px;
    font-weight: bold;
    color: #666666;
}

.linkRegistro a {
    text-decoration: none;
    color: #666666;
}

.modal-olvido {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    
    /* Centrado Flexbox universal */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999; /* Asegura que esté por encima de todo */
}

/* Caja blanca/verde del modal */
.modal-contenido {
    background: #a9cd46;
    padding: 30px 25px;
    border-radius: 16px;
    width: 90%;
    max-width: 380px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    
    /* Disposición interna centrada */
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    
    /* Animación suave */
    animation: modalEntrada 0.25s ease-out forwards;
}

@keyframes modalEntrada {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Botón 'X' de cierre */
.cerrar-modal {
    position: absolute;
    top: 10px;
    right: 16px;
    font-size: 24px;
    font-family: 'Tamrin', sans-serif;
    color: black;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.2s ease;
}

.cerrar-modal:hover {
    transform: scale(1.2);
}

/* Formulario dentro del modal */
#formOlvido {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Centrado exacto del campo DNI dentro del modal */
#formOlvido .grupoInput {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 220px;
    margin-bottom: 10px;
}

#formOlvido .input {
    width: 100%;
    height: 32px;
    border-radius: 20px;
    padding: 0 12px;
    box-sizing: border-box;
    border: none;
    outline: none;
    font-size: 11px;
}

#formOlvido .btn {
    margin-top: 10px;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

#formOlvido .btn:hover {
    transform: scale(1.05);
    background-color: #f0f0f0;
}

#mensajeModal {
    margin-top: 12px;
    font-size: 12px;
    font-family: 'Tamrin', sans-serif;
    text-align: center;
    font-weight: bold;
}

@media screen and (max-width: 1200px) and (min-width: 768px), screen and (max-height: 800px) {
    .FondoVerde {
        width: 90%;
        max-width: 782px;
        height: 436px;
        transform: translate(-50%, -50%) scale(0.9);
    }

    .ContenedorFormulario {
        left: 73%;
        top: 50%;
        transform: translate(-50%, -50%);
    }
}

/* ===================================================
   RESPONSIVE PARA PANTALLAS ULTRA ANCHAS (2K Y 4K)
   =================================================== */

/* Para monitores 2K (2560px) */
@media screen and (min-width: 2000px) and (max-width: 2825px) {
    .FondoVerde {
        /* Agranda la tarjeta al doble de tamaño (200%) */
        transform: translate(-50%, -50%) scale(2) !important;
    }

    .EsquinaCirculo {
        transform: scale(2);
        transform-origin: bottom left;
    }

    .EsquinaCurva {
        transform: scale(2);
        transform-origin: top right;
    }

    .modal-contenido {
        transform: scale(1.8);
    }
}

@media screen and (max-width: 767px) {
    html, body {
        width: 100% !important;
        min-height: 100vh !important;
        height: auto !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        background-color: #8dae6b !important;
        margin: 0 !important;
        padding: 0 0 50px 0 !important;
        display: block !important;
        position: relative !important;
    }

    /* Ocultar elementos decorativos del escritorio */
    .EsquinaCirculo,
    .EsquinaCurva,
    .fondoAzul,
    .ContenedorLogoNegro,
    .ISFDYT,
    .Necochea {
        display: none !important;
    }

    /* Hacer que FondoVerde sea transparente para MOSTRAR el logo y el formulario */
    .FondoVerde {
        position: static !important;        /* OBLIGATORIO: hace que ContenedorLogo tome al BODY como referencia */
        display: block !important;
        width: 100% !important;
        height: auto !important;
        background-color: transparent !important;
        border-radius: 0 !important;
        transform: none !important;
        box-shadow: none !important;
    }

    /* Mostrar y posicionar el fondo azul exclusivo de Celular arriba */
    .fondoAzul-Celular {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        max-width: 100vw !important;
        line-height: 0 !important;
        z-index: 1 !important;
    }

    .fondoAzul-Celular img {
        width: 100% !important;
        height: auto !important;
        display: block !important;
    }

    /* 2. Logo anclado ARRIBA DEL TODO de la página */
    .ContenedorLogo {
        position: absolute !important;       /* Se ancla arriba al inicio de la página */
        top: 18px !important;                 /* Distancia superior sobre el fondo azul */
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 92% !important;
        max-width: 360px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: clamp(4px, 1.5vw, 8px) !important;
        z-index: 99 !important;
        box-sizing: border-box !important;
    }

    /* clamp() es una función que define un rango de valores dinámico */
    .Logo {
        /* Se achica dinámicamente entre 28px y 42px según el ancho de pantalla */
        width: clamp(28px, 8.5vw, 42px) !important; /* El navegador calcula en 8.5% del ancho de la pantalla y bloquea los tamaños segun el resultado */
        height: clamp(28px, 8.5vw, 42px) !important;
        border-radius: 50% !important;
        flex-shrink: 0 !important;
    }

    .TextosLogo {
        display: flex !important;
        flex-direction: column !important;
        min-width: 0 !important;             /* Evita que desborde el contenedor flex */
        flex-shrink: 1 !important;
    }

    /* Título principal escalable */
    .Cooperadora {
        position: static !important;
        transform: none !important;
        font-size: clamp(7.5px, 2.2vw, 10px) !important;  /* Se ajusta entre 7.5px y 10px según la pantalla */
        color: #000000 !important;
        white-space: normal !important; /* PERMITE adaptarse si es necesario */
        margin: 0 !important;
        line-height: 1.1 !important;
    }

    /* Subtítulo escalable */
    .Instituto {
        position: static !important;
        transform: none !important;
        /* Forzamos a que mantenga 1 sola línea siempre */
        white-space: nowrap !important;
        font-size: clamp(5px, 1.8vw, 7px) !important;
        color: #000000 !important;
        line-height: 1.1 !important;
        margin: 0 !important;
    }

    /* Contenedor del Formulario abajo */
    .ContenedorFormulario {
        position: relative !important;
        left: 0 !important;
        width: 80% !important;
        max-width: 320px !important;
        margin: auto !important;
        transform: none !important;
        z-index: 5 !important;
    }

    .formulario {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .titulo {
        font-size: 18px !important;
        margin-bottom: 20px !important;
        text-align: center !important;
    }

    .grupoInput {
        width: 100% !important;
        margin-bottom: 12px !important;
    }

    .input {
        width: 100% !important;
        height: 38px !important;
        font-size: 12px !important;
        padding: 0 15px !important;
        box-sizing: border-box !important;
        border-radius: 20px !important;
    }

    .label {
        font-size: 10px !important;
        margin-bottom: 4px !important;
    }

    .btn {
        width: 160px !important;
        height: 36px !important;
        font-size: 11px !important;
        margin-top: 5px !important;
        border-radius: 20px !important;
    }

    .linkOlvido, .linkOlvido a, .linkRegistro, .linkRegistro a {
        color: #000000 !important;
        font-size: 11px !important;
        text-align: center !important;
        margin-top: 8px !important;
    }

    .modal-olvido {
        padding: 15px;
        box-sizing: border-box;
    }

    .modal-contenido {
        width: 100% !important;
        max-width: 320px !important;
        padding: 25px 20px 20px 20px !important;
        border-radius: 18px !important;
    }

    .modal-contenido h3 {
        font-size: 16px !important;
        margin-bottom: 8px !important;
    }

    .modal-contenido p {
        font-size: 11px !important;
        line-height: 1.3 !important;
        margin-bottom: 15px !important;
    }

    /* Centra el input y el botón de enviar correo dentro del modal */
    #formOlvido {
        width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    #formOlvido .grupoInput {
        width: 100% !important;
        margin-bottom: 10px !important;
    }

    #formOlvido .input {
        width: 100% !important;
        height: 38px !important;
        font-size: 12px !important;
        padding: 0 15px !important;
        box-sizing: border-box !important;
        border-radius: 20px !important;
    }

    #formOlvido .btn {
        width: 160px !important;
        height: 36px !important;
        font-size: 11px !important;
        margin-top: 10px !important;
        border-radius: 20px !important;
    }

    .cerrar-modal {
        top: 8px !important;
        right: 14px !important;
        font-size: 24px !important;
    }
}