@font-face {
    font-family: 'Avenir';
    src: url('path_to_your_font/avenir.woff2') format('woff2'),
         url('path_to_your_font/avenir.woff') format('woff');
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.btn-inicio {
    width: 100%;
    display: inline-block;
    color: #fff;
    background-color: var(--color-azul);
    padding: 12px 30px;
    border-radius: 12px;
    font-weight: bold;
    text-decoration: none;
    font-size: 18px;
    text-align: center;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.btn-inicio:hover {
    background-color: #4290ed;
    transform: translateY(-5px);  /* Sube el botón un poco al pasar el cursor */
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.3);
}



.btn-inicio:focus {
    outline: none; /* Elimina el borde al hacer clic */
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

:root {
    --color-azul: #4290ed;
    --color-amarillo: #ffcc00;
    --color-rojo: #e52f32;
    --color-texto: #4290ed;
}

/* Estilos generales SIN margen global */
/* Aplica en todos los dispositivos */
*, *::before, *::after {
  box-sizing: border-box;
  padding: 0;
  
}

/* Solo en escritorio (desde 768px en adelante) */
@media screen and (min-width: 768px) {
  *, *::before, *::after {
    margin: 0;
      box-sizing: border-box;
  padding: 0;
  }
}



body {
    background: url('../imagenes/LOBBY.jpg') no-repeat;
    background-position: 50% -40%; /* más arriba = imagen más alejada visualmente */
    background-size: cover;
    font-family: 'Roboto', sans-serif;
    background-color: #f4f4f4;
    color: var(--color-texto);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


header {
    background-color: var(--color-azul);
    padding: 20px;
    text-align: center;
    animation: fadeInDown 0.8s ease;
}

header img {
    width: 180px;
    max-width: 80%;
    height: auto;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px;
}

.contenedor {
    width: 100%;
    max-width: 650px;
}
@media (max-width: 768px) {
    .carnet {
      transform: scale(1.) !important;
      transform-origin: top center !important;
    }
  }
  .carnet {
    width: 90vw;
    max-width: 638px;
    aspect-ratio: 638 / 1016;
    background: url('../imagenes/carnet_plantilla.png') no-repeat center center;
    background-size: contain; /* Por defecto para pantallas grandes */
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-radius: 20px;
    overflow: hidden;
    padding: 20px;
}

@media (max-width: 768px) {
    .carnet {
        background-size: 100%; /* Hace la imagen más grande en pantallas pequeñas */
    }

}



form {
    background-color: #fff;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease;
}
@media only screen and (max-width: 600px) {
    form {
      /* Anula el max-width fijo y ocupa casi todo el ancho */
      max-width: none;
      width: 100%;
      height:100%;
      
      /* Reduce un poco el padding para que entre bien */
      padding: 24px;
      
      /* Ajusta ligeramente el radio de los bordes */
      border-radius: 12px;
      
      /* Suaviza un poco la sombra en pantallas pequeñas */
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
      
      /* Mantén la misma animación */
      animation: fadeInUp 0.8s ease;
    }
    
  }
  
form h2 {
    color: var(--color-azul);
    font-size: 28px; /* Aumentado para hacerlo más grande */
    margin-bottom: 30px;
    font-weight: bold;
    animation: fadeInUp 1s ease;
}

form input[type="text"] {
    width: 100%;
    padding: 15px; /* Más grande para un toque más cómodo */
    margin-bottom: 30px; /* Más espacio entre los campos */
    border: 2px solid #ccc;
    border-radius: 12px;
    font-size: 18px; /* Fuente más grande */
    transition: all 0.3s;
}
form input[type="text"]:focus {
    border-color: var(--color-azul);
    box-shadow: 0 0 8px rgba(42, 65, 109, 0.5);
}


form button {
    width: 100%;
    padding: 15px;
    background-color: var(--color-azul);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 18px; /* Botón más grande */
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    animation: pulse 1.5s infinite; /* Animación de pulsado */
}

form button:hover {
    background-color: #1c2d4f;
    transform: scale(1.05); /* Aumento de tamaño al hacer hover */
}


form .error {
    color: var(--color-rojo);
    font-weight: bold;
    margin-top: 20px;
    animation: fadeInUp 1.5s ease;
    font-size: 20px;
}

.header-carnet {
    position: absolute;
    top: 0;
    width: 100%;
    background-color: var(--color-azul);
    color: #fff;
    padding: 12px 0;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
}

.subheader {
    position: absolute;
    top: 40px;
    width: 100%;
    background-color: var(--color-amarillo);
    color: var(--color-texto);
    padding: 8px 0;
    text-align: center;
    font-weight: bold;
}

.foto {
    position: absolute;
    top: 90px;
    width: 120px;
    height: 120px;
    border-radius: 20px;
    overflow: hidden;
    border: 3px solid var(--color-azul);
}

.foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.contenido {
    position: absolute;
    top: 230px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    text-align: center;
}

.contenido h2 {
    color: var(--color-rojo);
    font-size: 20px;
}

.contenido p {
    color: var(--color-texto);
    font-size: 16px;
}

.qr-code {
    position: absolute;
    bottom: 60px;
}

.qr-code img {
    width: 100px;
    padding: 0px;
    border-radius: 12px;
    background: #fff;
}

.logout {
    position: absolute;
    bottom: 10px;
    width: 100%;
    text-align: center;
}

.logout a {
    color: var(--color-azul);
    font-weight: bold;
    text-decoration: none;
    background: rgba(255,255,255,0.8);
    padding: 4px 12px;
    border-radius: 12px;
}

footer {
    background-color: var(--color-azul);
    color: #fff;
    text-align: center;
    padding: 12px;
    font-size: 14px;
    position: static;
    width: 100%;
}

@media (max-width: 600px) {

    .wrapper {
        width: 100vw;
        overflow-x: hidden;
        
    }


    .header-carnet {
        font-size: 18px;
        padding: 10px 0;
    }

    .subheader {
        font-size: 16px;
        padding: 8px 0;
    }

    .foto {
        top: 90px;
        width: 110px;
        height: 110px;
        border-radius: 18px;
    }

    .contenido {
        top: 240px;
        padding: 0 12px;
    }

    .contenido h2 {
        font-size: 20px;
    }

    .contenido p {
        font-size: 16px;
    }

    .qr-code img {
        width: 90px;
    }


    form {
        padding: 30px 20px;
    }

    form h2 {
        font-size: 24px;
    }

    form input[type="text"] {
        font-size: 16px;
        padding: 12px;
    }

    form button {
        font-size: 16px;
        padding: 12px;
    }
}

