/* responsive.css - VERSIÓN "GRANDE Y DEFINIDA" */

/* 1. RESETEO GLOBAL */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

/* 2. CONFIGURACIÓN DEL BODY (FONDO Y CENTRADO) */
body {
    font-family: 'Segoe UI', sans-serif;
    color: #333;
    position: relative;
    background-color: #f4f6f9; 
    background-image: none; /* La imagen va en el ::before */
}

/* CAPA DE FONDO BORROSO (GLOBAL) */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    
    /* IMAGEN DE PC */
    background-image: url('imagenes/fondo.webp');
    background-size: cover; 
    background-position: center center;
    background-repeat: no-repeat;
    
    /* blur(5px) = Desenfoca */
    /* brightness(0.5) = Oscurece al 50% (Efecto "medio negrito") */
    /* Puedes cambiar 0.6 por 0.4 (más oscuro) o 0.8 (más claro) */
    filter: blur(5px) brightness(0.5);
    transform: scale(1.05);
}

/* 3. ESTILOS DE LA TARJETA (VERSIÓN PC GRANDE) */
/* Esto controla cómo se ve el formulario en pantalla grande */
.card { 
    background: #ffffff; /* Fondo blanco sólido para mayor contraste */
    padding: 3rem;       /* Mucho espacio interno (antes era 2rem) */
    width: 100%; 
    
    /* AQUÍ ESTÁ EL CAMBIO DE TAMAÑO: */
    max-width: 700px;    /* Antes era 400px. Ahora es mucho más grande */
    
    border-radius: 12px; 
    
    /* DEFINICIÓN DE BORDES Y SOMBRA (Para que no se vea "sin bordes") */
    border: 1px solid #e0e0e0;  /* Borde gris suave */
    box-shadow: 0 20px 40px rgba(0,0,0,0.2); /* Sombra potente para resaltar */
    
    text-align: center; 
    margin: auto; /* Centrado */
}

/* Títulos y Textos más grandes en PC */
.card h2 { 
    color: #003366; 
    margin-top: 0; 
    font-size: 2.2rem; /* Título grande */
}

.subtitle {
    color: #666; 
    font-size: 1.1rem; 
    margin-bottom: 30px;
}

/* Inputs gigantes para pantalla grande */
.card input { 
    width: 100%; 
    padding: 18px; /* Input más alto */
    border: 2px solid #ddd; /* Borde del input más visible */
    border-radius: 8px; 
    text-align: center; 
    font-size: 1.3rem; /* Letra grande al escribir */
    margin-bottom: 10px;
    background-color: #f9f9f9;
}

.card input:focus {
    border-color: #003366;
    background-color: #fff;
    outline: none;
}

/* Botón grande */
.card button { 
    width: 100%; 
    padding: 18px; 
    background: #003366; 
    color: white; 
    border: none; 
    border-radius: 8px; 
    font-size: 1.2rem; 
    font-weight: bold; 
    margin-top: 15px; 
    cursor: pointer; 
    transition: 0.3s; 
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card button:hover { 
    background: #002244; 
    transform: scale(1.01); 
    box-shadow: 0 5px 15px rgba(0,51,102,0.3);
}

/* Resultados y Datos (Mejor organizados) */
#resultado { 
    display: none; 
    margin-top: 30px; 
    text-align: left; 
    border-top: 2px dashed #eee; 
    padding-top: 20px; 
}

.dato { 
    margin-bottom: 15px; 
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 5px;
    display: flex;
    justify-content: space-between; /* Etiqueta a la izq, valor a la der */
    align-items: center;
}

.label { font-size: 0.9rem; color: #777; font-weight: bold; text-transform: uppercase; }
.valor { font-size: 1.2rem; color: #333; font-weight: 600; text-align: right; }

/* Botón WhatsApp */
.wa-btn { 
    display: block; 
    background: #25D366; 
    color: white; 
    text-align: center; 
    padding: 15px; 
    text-decoration: none; 
    border-radius: 8px; 
    font-weight: bold; 
    font-size: 1.1rem;
    margin-top: 25px; 
    transition: 0.3s; 
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}
.wa-btn:hover { background: #1da851; transform: translateY(-2px); }

/* Errores */
.error { 
    color: #d32f2f; background: #ffebee; padding: 15px; border-radius: 6px; 
    display: none; margin-top: 15px; border: 1px solid #ffcdd2; font-weight: bold;
}

/* Estilos extra para Admin (Container) */
.container { padding: 20px; max-width: 1100px; margin: 0 auto; position: relative; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; }
.table-responsive { width: 100%; overflow-x: auto; }

/* ESTILOS DE LA PÁGINA DE CONSULTA */
body.page-consulta {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* =========================================
   MEDIA QUERIES (CAMBIOS SOLO PARA MÓVIL)
   ========================================= */
@media screen and (max-width: 768px) {

    /* En celular cambiamos la imagen de fondo */
    body::before {
        background-image: url('imagenes/fondo_mobiles.jpeg') !important;
    }

    body { display: flex; flex-direction: column; justify-content: center; }

    /* REDUCCIÓN DE TAMAÑO PARA CELULAR */
    /* Aquí volvemos a hacer la tarjeta pequeña para que quepa en el teléfono */
    .card, .container, .box {
        width: 90%;          /* Ocupa casi toda la pantalla del cel */
        max-width: 400px;    /* Pero no pasa de 400px */
        padding: 1.5rem;     /* Menos relleno interno */
        margin: auto;
    }

    /* Textos más pequeños para celular */
    .card h2 { font-size: 1.5rem; }
    .subtitle { font-size: 0.9rem; margin-bottom: 20px; }
    .card input { padding: 12px; font-size: 1rem; }
    .card button { padding: 12px; font-size: 1rem; }
    .dato { flex-direction: column; align-items: flex-start; } /* Datos uno debajo del otro */
    .valor { text-align: left; margin-top: 2px; }

    /* Ajustes generales admin */
    .form-grid { grid-template-columns: 1fr; }
    div[style*="justify-content:space-between"], form[method="GET"] { flex-direction: column; width: 100%; gap: 10px; }
    form[method="GET"] input { width: 100% !important; }
}


/* =========================================================
   ESTILOS EXCLUSIVOS PARA EL PANEL ADMINISTRATIVO (ADMIN.PHP)
   (Pega esto al final de tu archivo responsive.css)
   ========================================================= */

/* 1. CONTENEDORES Y CAJAS (ADMIN) */
/* Mejoramos la apariencia de las cajas blancas del admin */
.box {
    background: #ffffff;
    padding: 25px;
    border-radius: 8px;        /* Bordes redondeados */
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); /* Sombra suave */
    border: 1px solid #e1e4e8; /* Borde gris muy sutil */
    margin-bottom: 20px;       /* Separación entre cajas */
    transition: transform 0.2s ease;
}

/* Títulos dentro del admin */
.box h3 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f2f5; /* Línea separadora moderna */
    color: #003366;            /* Mismo azul corporativo */
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 2. TABLAS PROFESIONALES */
/* Diseño limpio para la lista de estudiantes y docentes */
table {
    width: 100%;
    border-collapse: separate; 
    border-spacing: 0;
    font-size: 0.95rem;
}

/* Cabecera de la tabla */
table th {
    background-color: #003366; /* Cabecera Azul Oscuro */
    color: white;
    font-weight: 600;
    padding: 12px 15px;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    text-align: left;
}

/* Celdas del cuerpo */
table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    color: #444;
}

/* Efecto al pasar el mouse por una fila */
table tr:hover {
    background-color: #f1f5f9; /* Gris muy claro al pasar mouse */
}

/* Botones pequeños dentro de la tabla */
table .btn {
    padding: 6px 10px;
    font-size: 0.85rem;
    margin-right: 5px;
    box-shadow: none;
}

/* 3. FORMULARIOS DEL ADMIN */
/* Inputs y Selects más modernos */
.box input, .box select {
    width: 100%;
    padding: 10px 15px;
    margin-bottom: 15px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 0.95rem;
    background-color: #fcfcfc;
    transition: all 0.3s;
    outline: none;
}

/* Efecto al escribir en un input */
.box input:focus, .box select:focus {
    border-color: #003366;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1); /* Resplandor azul suave */
}

.box label {
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
    display: block;
    font-size: 0.9rem;
}

/* 4. BOTONES (ESTILO MATERIAL DESIGN) */
.btn {
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: white;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px); /* Se levanta un poco */
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    opacity: 0.95;
}

/* Colores específicos de botones */
.btn-blue   { background: linear-gradient(135deg, #003366 0%, #004080 100%); }
.btn-green  { background: linear-gradient(135deg, #28a745 0%, #218838 100%); }
.btn-red    { background: linear-gradient(135deg, #dc3545 0%, #c82333 100%); }
.btn-orange { background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%); }

/* 5. MENSAJES Y UTILIDADES */
.msg {
    padding: 15px;
    border-radius: 6px;
    color: white;
    font-weight: bold;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

/* Paginación */
.pagination {
    margin-top: 25px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.page-btn {
    padding: 8px 14px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    border-radius: 4px;
    text-decoration: none;
    transition: 0.3s;
}

.page-btn:hover {
    border-color: #003366;
    color: #003366;
}

.page-btn.active {
    background: #003366;
    color: white;
    border-color: #003366;
}

/* Buscador y Filtros */
.filter-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #eee;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}






/* Estilo para el botón de [Quitar Filtro] */
.btn-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px; /* Espacio entre icono y texto */
    background-color: #e5cfdc;
    color: var(--perea-magenta); /* Texto color magenta */
    border: 0px solid var(--perea-magenta); /* Borde fino magenta */
    padding: 6px 14px;
    border-radius: 50px; /* Bordes muy redondos (estilo pastilla) */
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.btn-chip:hover {
    background-color: var(--perea-magenta); /* Al pasar el mouse se rellena */
    color: rgb(218, 64, 103);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(124, 13, 76, 0.2);
}

/* Pequeño icono de X con CSS puro */
.btn-chip::before {
    content: "✕"; /* Icono de multiplicar */
    font-size: 0.8em;
}
