:root {
    --primary: #004aad;
    --primary-light: #005eff;
    --accent: #f2f6ff;
    --text: #333;
    --error: #d32f2f;
}
  
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
  
body {
    font-family: 'Segoe UI', sans-serif;
    background: url('../assets/FOTO-PARA-WEB .png') no-repeat center top fixed;
    background-size: 100% auto;
    background-repeat: no-repeat;
    background-color: #f5f5f5;
    color: var(--text);
    line-height: 1.6;
    animation: fadeIn 1s ease-in;
}
@media (max-width: 480px) {
    body {
      background: #f5f5f5; /* Color de fondo de respaldo */
      background-image: none; /* Elimina la imagen */
    }
  }
  

/* Estilo para el botón de escanear QR */
/* Estilo para el botón de escanear QR */
.scan-qr-btn {
    width: 70%; /* Ancho más alargado */
    max-width: 400px; /* Máximo tamaño para no ser demasiado grande */
    padding: 15px 0; /* Ajustamos el padding para hacerlo más alto */
    background-color: #4290ED;
    color: white;
    border: none;
    font-size: 18px;
    cursor: pointer;
    text-align: center;
    font-weight: bold; /* Le da énfasis al texto */
    border-radius: 8px; /* Redondeamos los bordes */
    display: block;
    margin: 20px auto; /* Lo centra */
    transition: background 0.3s ease;
}

.scan-qr-btn:hover {
    background-color: #0056b3;
}


/* Estilo para el área donde se muestra el lector de QR */
#reader {
    width: 100%; /* Se adapta a diferentes tamaños */
    max-width: 400px; /* Máximo de 500px de ancho */
    height: 300px; /* Altura constante */
    margin: 20px auto;
    background-color: #eaf1fb; /* Fondo suave azul claro */
    border: 3px solid #007bff; /* Borde azul para hacerlo destacar */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1); /* Sombra más notoria para profundidad */
    display: flex;
    justify-content: center;
    align-items: center;
  
}

/* Estilo para el cuadro que muestra el QR escaneado */
.qr-result-container {
    width: 100%;
    max-width: 500px; /* Limita el tamaño máximo */
    padding: 20px;
    background-color: #f5faff; /* Fondo más claro */
    border: 2px solid #007bff; /* Borde azul más fuerte */
    border-radius: 12px; /* Bordes redondeados */
    color: #333;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    margin: 20px auto;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1); /* Sombra adicional para profundidad */
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
@media (max-width: 480px) {
    .qr-result-container {
        padding: 15px;
        font-size: 1rem;
        border-radius: 10px;
    }

    .qr-result-container span {
        font-size: 1.2rem;
    }

    .qr-result-container p {
        font-size: 1rem;
    }
}


.qr-result-container:hover {
    background-color: #d1e9ff; /* Fondo más claro cuando se pasa el mouse */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15); /* Sombra más destacada */
}

/* Estilo del texto dentro del cuadro */
.qr-result-container p {
    margin: 0;
    font-size: 1.1rem;
    color: #007bff; /* Color del texto en azul */
    font-weight: bold;
}

.qr-result-container span {
    display: block;
    font-size: 1.4rem;
    margin-top: 10px;
    color: #0056b3;
    font-weight: bold;
    word-wrap: break-word; /* Asegura que los textos largos no se salgan del cuadro */
}

/* Agrega un poco de espacio al texto cuando el código QR se muestra */
.qr-result-container p,
.qr-result-container span {
    margin-bottom: 15px;
}


@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Contenedor principal */
.container {
    max-width: 1200px;
    margin: auto;
    padding: 3rem;
    background: white;
    margin-top: 3rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.container:hover {
    transform: scale(1.02);
}

/* Logo centrado y más grande */
.logo-fullscreen-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 35vh;
    background-color: #4290ED;
    padding: 1rem;
}

.logo-centered {
    max-width: 500px;
    width: 100%;
    height: auto;
    animation: bounce 2s infinite;
}


@media (min-width: 1024px) {
    .logo-centered {
        max-width: 600px;
    }
}


@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Títulos principales */
h1, h2 {
    text-align: center;
    color: #4290ED;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    text-transform: uppercase;
    font-weight: bold;
}

/* Párrafos */
p {
    margin-bottom: 1rem;
   
}

/* Formulario */
.search-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-form label {
    font-weight: bold;
}

.search-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* Campo inválido */
input:invalid {
    border-color: var(--error);
    background-color: #f8d7da;
}

/* Campo válido */
input:valid {
    border-color: #28a745;
    background-color: #d4edda;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 5px rgba(0, 74, 173, 0.3);
    outline: none;
}

/* Mensaje de error personalizado */
.error-text {
    color: var(--error);
    font-size: 0.9rem;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    display: none;
}

/* Botón */
.search-btn {
    width: 100%;
    background:#4290ED;
    color: white;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: var(--primary-light);
}

/* Resultados */
.result-container {
    margin-top: 2rem;
    overflow-x: auto;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    animation: fadeIn 0.5s ease-in;
}

.result-table th, .result-table td {
    border: 1px solid #ddd;
    padding: 0.75rem;
    text-align: left;
    min-width: 120px;
}

.result-table th {
    background-color: #4290ED;
    color: white;
}

.result-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.error-msg {
    color: var(--error);
    font-weight: bold;
    margin-top: 1rem;
}

/* Pie de página */
footer {
    text-align: center;
    padding: 1rem;
    background: #eee;
    justify-content: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #777;
}

/* Cuadro explicativo */
.validation-container {
    background-color: #f0f8ff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-top: 3rem;
    text-align: center;
}

.validation-container h2 {
    color: var(--primary);
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.validation-container p {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-align: justify;
}

.validation-container span {
    font-weight: bold;
    color: var(--primary);
    font-size: 1.15rem;
}

.validation-container .btn-verify {
    background-color: var(--primary);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.validation-container .btn-verify:hover {
    background-color: var(--primary-light);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 1.5rem;
    }

    .result-table th, .result-table td {
        padding: 0.6rem;
    }

    .validation-container {
        padding: 1.5rem;
    }

    .validation-container h2 {
        font-size: 1.8rem;
    }

    .validation-container p {
        font-size: 1rem;
    }

    .validation-container .btn-verify {
        padding: 0.6rem 1.2rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }

    .result-table th, .result-table td {
        padding: 0.5rem;
    }

    footer {
        font-size: 0.8rem;
    }

    .validation-container {
        padding: 1rem;
    }

    .validation-container h2 {
        font-size: 1.5rem;
    }

    .validation-container p {
        font-size: 0.95rem;
    }

    .validation-container .btn-verify {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}
