/* =========================================
   SISTEMA DE KARDEX - CONSULTA PÚBLICA
   Estilos Globales V8 (Premium & Responsivo)
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700;800;900&display=swap');

:root {
    /* Paleta de Colores Corporativa */
    --primary: #2b4e84;        
    --primary-dark: #1a355e;
    --primary-gradient: linear-gradient(135deg, #2b4e84 0%, #1a355e 100%);
    
    --accent: #ff8c42;        
    --accent-hover: #e67e3a;
    
    --bg-body: #f0f2f5;       
    --white: #ffffff;
    
    /* Textos */
    --text-main: #2c3e50;
    --text-muted: #95a5a6;
    
    /* Estados */
    --success: #00b894;       
    --danger: #ff7675;        
    --warning: #fdcb6e;       
    
    /* UI Moderna */
    --radius: 16px;            
    --shadow-soft: 0 5px 20px rgba(0,0,0,0.05);
    --shadow-hover: 0 15px 35px rgba(0,0,0,0.1);
}

/* --- RESET BÁSICO --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background-color: var(--bg-body); color: var(--text-main); line-height: 1.6; min-height: 100vh; }
a { text-decoration: none; transition: all 0.3s ease; }

/* =========================================
   SITIO PÚBLICO PREMIUM (V9)
   ========================================= */

/* Navbar Transparente/Blanca */
.public-navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 5%; 
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky; top: 0; z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.brand { font-size: 1.8rem; font-weight: 900; color: var(--primary); letter-spacing: 1px; }
.brand span { color: var(--accent); }

/* Botón de Login (Outlined) */
.btn-login-outline {
    color: var(--primary); font-weight: 700; border: 2px solid var(--primary);
    padding: 8px 20px; border-radius: 50px; font-size: 0.9rem;
    display: flex; align-items: center; gap: 8px;
}
.btn-login-outline:hover { background: var(--primary); color: white; box-shadow: 0 5px 15px rgba(43, 78, 132, 0.3); }

/* HERO SECTION (Encabezado) */
.hero-section {
    background: var(--primary-gradient);
    padding: 80px 20px 160px 20px; 
    text-align: center; color: white;
    position: relative; overflow: hidden;
    clip-path: ellipse(150% 100% at 50% 0%);
}

.hero-pattern {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 30px 30px; pointer-events: none;
}

.hero-title { font-size: 3rem; font-weight: 900; margin-bottom: 15px; text-shadow: 0 4px 10px rgba(0,0,0,0.2); position: relative; z-index: 2; }
.hero-subtitle { font-size: 1.1rem; opacity: 0.9; max-width: 600px; margin: 0 auto; font-weight: 300; position: relative; z-index: 2; line-height: 1.6; }

/* BUSCADOR FLOTANTE (Animado) */
.search-container-floating {
    max-width: 800px; margin: -80px auto 50px auto; 
    padding: 0 20px; position: relative; z-index: 50;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.search-card {
    background: white; padding: 15px; border-radius: 60px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    display: flex; align-items: center; gap: 10px;
    border: 1px solid rgba(255,255,255,0.5);
}

.search-icon { color: #aaa; font-size: 1.2rem; margin-left: 15px; }
.search-input-lg { flex-grow: 1; border: none; font-size: 1.1rem; padding: 15px 20px; outline: none; background: transparent; color: #333; }
.search-btn-lg {
    background: var(--accent); color: white; border: none;
    padding: 15px 40px; border-radius: 50px; font-size: 1.1rem; font-weight: 700;
    box-shadow: 0 5px 15px rgba(255, 140, 66, 0.4); cursor: pointer; transition: 0.3s;
}
.search-btn-lg:hover { background: var(--accent-hover); transform: translateY(-2px); }

/* --- DISEÑO DE RESULTADOS (Tipo Expediente) --- */
.results-container { max-width: 900px; margin: 0 auto; padding: 0 20px 60px; }

.certificate-card {
    background: white; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    margin-bottom: 40px; overflow: hidden; position: relative; border: 1px solid #f0f0f0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.certificate-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }

/* Franja de estado lateral */
.card-border-left-ok { border-left: 6px solid var(--success); }
.card-border-left-fail { border-left: 6px solid var(--danger); }

/* Cabecera del Trámite */
.cert-header { padding: 25px 30px; border-bottom: 1px dashed #e0e0e0; display: flex; justify-content: space-between; align-items: flex-start; background: #fff; }
.cert-title { font-size: 1.4rem; font-weight: 800; color: var(--primary); line-height: 1.3; margin-bottom: 5px; }
.cert-version { font-size: 0.9rem; color: #888; display: flex; flex-wrap: wrap; gap: 15px; margin-top: 10px; }
.icon-accent { color: var(--accent); margin-right: 5px; }
.icon-primary { color: var(--primary); margin-right: 5px; }

/* Badges */
.badge-pill { padding: 6px 15px; border-radius: 30px; font-size: 0.8rem; font-weight: 700; display: inline-flex; align-items: center; text-transform: uppercase; }
.badge-green { background: rgba(0, 184, 148, 0.15); color: var(--success); border: 1px solid rgba(0, 184, 148, 0.3); }
.badge-red { background: rgba(255, 118, 117, 0.15); color: var(--danger); border: 1px solid rgba(255, 118, 117, 0.3); }

/* Cuerpo de la tarjeta */
.cert-body { padding: 30px; }

/* Datos del alumno */
.student-info { margin-bottom: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.student-label { font-size: 0.75rem; color: #aaa; text-transform: uppercase; letter-spacing: 1px; font-weight: 700; margin-bottom: 5px; }
.student-value { font-size: 1.1rem; color: var(--text-main); font-weight: 700; }

/* Secciones (Docs) */
.section-divider { display: flex; align-items: center; gap: 10px; margin: 30px 0 20px 0; font-size: 0.9rem; font-weight: 700; color: var(--primary); text-transform: uppercase; }
.section-line { flex-grow: 1; height: 1px; background: #eee; }

/* Grid de Documentos (Píldoras) */
.pill-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.doc-pill { padding: 8px 15px; border-radius: 8px; font-size: 0.85rem; font-weight: 600; border: 1px solid #eee; display: flex; align-items: center; gap: 8px; }
.pill-ok { background: #e6fffa; color: #00b894; border-color: #b2f5ea; }
.pill-fail { background: #fff5f5; color: #fc8181; border-color: #fed7d7; opacity: 0.7; }

/* Ilustraciones de estado vacio */
.empty-state { text-align: center; padding: 60px 20px; color: #aab2bd; background: white; border-radius: 20px; box-shadow: var(--shadow-soft); }
.empty-icon { font-size: 4rem; margin-bottom: 20px; opacity: 0.5; color: var(--primary); }

/* Botones genéricos */
.btn-primary { background: var(--primary-gradient); color: white; padding: 12px 25px; border-radius: 50px; font-weight: 600; display: inline-block; box-shadow: 0 4px 15px rgba(43, 78, 132, 0.3); }
.btn-outline { border: 2px solid #ccc; color: #666; padding: 12px 25px; border-radius: 50px; font-weight: 600; display: inline-block; }
.mt-4 { margin-top: 30px; }

/* Animaciones */
.fade-in-up { animation: fadeInUp 0.8s ease-out forwards; opacity: 0; transform: translateY(30px); }
.delay-1 { animation-delay: 0.1s; } .delay-2 { animation-delay: 0.2s; }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }

/* RESPONSIVE MÓVIL */
@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .hero-section { padding-bottom: 100px; clip-path: none; border-bottom-left-radius: 30px; border-bottom-right-radius: 30px; }
    .search-card { flex-direction: column; border-radius: 20px; padding: 20px; animation: none; }
    .search-input-lg { width: 100%; text-align: center; border-bottom: 1px solid #eee; margin-bottom: 10px; }
    .search-btn-lg { width: 100%; border-radius: 12px; }
    .cert-header { flex-direction: column; text-align: center; gap: 15px; align-items: center; }
    .cert-version { justify-content: center; }
    .student-info { grid-template-columns: 1fr; text-align: center; gap: 15px; }
    .public-navbar { padding: 15px 20px; }
}