/* 
   ESTILO FINAL BASADO EN PANTALLAZOS REALES
   Sin invenciones, fidelidad total a Grumexsa
*/

:root {
    --bg-color: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --brand-mid: #0073bb; /* Azul para TENGO UN TOKEN */
    --primary: #00aeef; /* Azul para INICIAR SOLICITUD */
    --surface: #ffffff;
    --border: #e2e8f0;
}

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/icon?family=Material+Icons+Round');

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: 'Montserrat', sans-serif; 
    background-color: var(--bg-color); 
    color: var(--text-main); 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
    -webkit-font-smoothing: antialiased; 
}

/* ─── ICONOS FIX ─── */
.material-icons-round {
    font-family: 'Material Icons Round';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'liga';
}

/* ─── NAVBAR ─── */
.top-navbar { 
    background: #ffffff; 
    border-bottom: 1px solid var(--border); 
    padding: 12px 40px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    position: sticky; top: 0; z-index: 100; 
}
.brand-logo-img { height: 32px; width: auto; object-fit: contain; }

.pill-text { 
    background: var(--brand-mid); 
    padding: 8px 20px; 
    border-radius: 6px; 
}
.pill-text h1 { 
    font-size: 0.9rem; 
    font-weight: 800; 
    color: #ffffff; 
    margin: 0; 
    text-transform: uppercase;
}

/* 📈 INDICADOR DE AVANCE INSTITUCIONAL (SORAP) */
.progress-container {
    background: #f1f5f9;
    border-radius: 50px;
    height: 12px;
    width: 100%;
    margin: 15px 0;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #0073bb 0%, #00aeef 100%);
    width: 0%; /* Se controla dinámicamente con Persistencia */
    border-radius: 50px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(0, 115, 187, 0.3);
}

.progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-main);
    font-weight: 700;
    margin-bottom: 5px;
}

.progress-pct {
    color: var(--brand-mid);
    font-weight: 800;
}

/* 🏁 AJUSTE FINAL DE IDENTIDAD CORPORATIVA GRUMEXSA S.A. DE C.V. */
footer div:first-child { text-transform: uppercase !important; }


/* ─── VISOR DE ARCHIVOS MODAL (GRUMEXSA S.A. DE C.V.) ─── */
.modal-gr {
    display: none; /* OCULTO POR DEFECTO PARA QUE NO ESTORBE */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-gr__content {
    background: white;
    width: 90%;
    max-width: 1000px;
    height: 90vh;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-gr__header {
    background: #0073bb;
    color: white;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-gr__close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.modal-gr__close:hover {
    background: #ef4444;
}

.modal-gr__body {
    flex: 1;
    padding: 10px;
}


/* ─── PANEL Y CONTENIDO (DIETA SIN SCROLL) ─── */
.container { 
    max-width: 1200px; 
    margin: 4px auto; 
    width: 100%; 
    padding: 0 15px; 
    flex: 1; 
}

.panel { 
    max-width: 1100px; 
    margin: 30px auto; 
    padding: 40px; 
    border-radius: 8px; 
    border: 1px solid var(--border); 
    box-shadow: 0 20px 40px rgba(0,0,0,0.04); 
    background: var(--surface);
}

.hero-section { text-align: center; margin-bottom: 5px; }
.panel__title { font-size: 1.4rem; font-weight: 800; color: var(--text-main); text-transform: uppercase; margin-bottom: 0px; }
.panel__lead { font-size: 0.8rem; color: var(--text-muted); line-height: 1.25; max-width: 850px; margin: 0 auto; }

/* ─── SPLIT LAYOUT ─── */
.split-layout { display: flex; gap: 30px; margin-top: 5px; }
.split-left { flex: 1; border-right: 1px solid var(--border); padding-right: 30px; }
.split-right { 
    width: 360px; 
    flex-shrink: 0; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    align-items: center; 
    gap: 12px; 
}

/* ─── STEP CARDS ─── */
.steps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.step-card { 
    background: #f8fafc; 
    border: 1px solid #e2e8f0; 
    padding: 12px 15px; 
    border-radius: 10px; 
    transition: all 0.25s ease; 
}
.step-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary);
    box-shadow: 0 10px 24px rgba(0,174,239,0.08);
}
.step-icon { 
    width: 34px; height: 34px; background: white; border-radius: 8px; 
    display: flex; align-items: center; justify-content: center; 
    color: var(--primary); font-size: 1.2rem; margin-bottom: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06); border: 1px solid #f1f5f9;
}
.step-card h3 { font-size: 0.9rem; font-weight: 800; color: var(--text-main); margin-bottom: 3px; }
.step-card p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.3; text-align: justify; }

.legal-note { 
    background: #eff6ff; 
    border-left: 4px solid var(--brand-mid); 
    padding: 10px 15px; 
    border-radius: 0 6px 6px 0; 
    font-size: 0.75rem; 
    color: var(--text-main); 
    font-weight: 600; 
    display: flex; 
    align-items: flex-start; 
    gap: 8px;
    margin-top: 15px;
    text-align: justify;
}
.legal-note .material-icons-round { 
    font-size: 1rem; 
    color: var(--brand-mid); 
    flex-shrink: 0; 
    margin-top: 1px; 
}

/* ─── ALERTAS ─── */
.alert--error { 
    background: #fef2f2; 
    border-left: 4px solid #ef4444; 
    color: #991b1b; 
    padding: 12px 15px; 
    border-radius: 0 6px 6px 0; 
    margin-bottom: 15px; 
    font-size: 0.85rem; 
    font-weight: 600;
}

/* ─── LANDING (portada index.php): sin bloque <style> duplicado ─── */
.landing-page .hero-section {
    text-align: center;
    margin-bottom: 28px;
}
.landing-page .panel__title {
    font-size: 1.6rem;
    letter-spacing: -0.3px;
}
.landing-page .split-layout {
    gap: 30px;
    margin-top: 10px;
    align-items: stretch;
}
.landing-page .split-left {
    padding-right: 30px;
}
.landing-page .split-right {
    align-items: stretch;
    justify-content: center;
    gap: 8px;
}
.landing-page .access-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}
.landing-page .btn-divider {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}
.landing-page .identity-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
}
.landing-page .identity-stamp {
    color: #ef4444;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}
@media (max-width: 980px) {
    .landing-page .split-layout {
        gap: 30px;
    }
    .landing-page .split-left {
        padding-right: 0;
    }
}

/* ─── BOTONES (azul institucional + cristal / traslúcido) ─── */
.btn { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 10px; 
    width: 100%; 
    padding: 12px 20px; 
    border-radius: 8px; 
    font-weight: 800; 
    font-size: 0.85rem; 
    text-decoration: none; 
    border: none; 
    cursor: pointer;
    text-transform: uppercase; 
    letter-spacing: 0.5px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

.btn--solicitud, .btn--primary { 
    color: #fff;
    background: linear-gradient(145deg, #00aeef 0%, #0073bb 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    text-shadow: none !important;
}

.btn--solicitud:hover, .btn--primary:hover {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    opacity: 0.95;
}

.btn--token, .btn--secondary { 
    color: #fff;
    background: linear-gradient(145deg, #0073bb 0%, #005a96 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    text-shadow: none !important;
}

.btn--token:hover, .btn--secondary:hover {
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
    opacity: 0.95;
}

.btn--ghost { 
    color: var(--brand-mid);
    background: rgba(0, 115, 187, 0.05);
    border: 1.5px solid rgba(0, 115, 187, 0.2);
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    -moz-box-shadow: none !important;
}

.btn--ghost:hover {
    background: rgba(0, 174, 239, 0.12);
    border-color: rgba(0, 115, 187, 0.55);
    color: var(--brand-mid);
}

/* Variante: borde cyan (misma familia que --primary) para acciones secundarias en columnas */
.btn--ghost-accent {
    color: var(--primary);
    border-color: rgba(0, 174, 239, 0.45);
    background: rgba(0, 174, 239, 0.06);
}
.btn--ghost-accent:hover {
    background: rgba(0, 174, 239, 0.14);
    border-color: rgba(0, 174, 239, 0.65);
}

/* ─── FOOTER ─── */
.footer-modern { 
    background: var(--brand-mid); color: #ffffff; padding: 12px 40px; 
    display: flex; justify-content: space-between; align-items: center; 
    font-size: 0.75rem; margin-top: auto; 
}
.footer-center { display: flex; align-items: center; gap: 8px; }

/* ─── Páginas de error (404 / 403): mismo sistema de botones ─── */
.page-error {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(165deg, rgba(0, 115, 187, 0.1) 0%, rgba(0, 174, 239, 0.06) 40%, #f8fafc 100%);
}
.page-error__card {
    max-width: 460px;
    width: 100%;
    text-align: center;
    padding: 48px 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 20px 50px rgba(0, 115, 187, 0.08);
}
.page-error__code {
    font-size: clamp(4rem, 14vw, 5.5rem);
    font-weight: 900;
    color: #ef4444;
    line-height: 1;
    margin-bottom: 8px;
}
.page-error__title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.page-error__msg {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 28px;
    line-height: 1.5;
}
.page-error .btn {
    width: auto;
    min-width: 220px;
    display: inline-flex;
}

@media (max-width: 850px) {
    .top-navbar { flex-direction: column; gap: 10px; text-align: center; }
    .split-layout { flex-direction: column; }
    .split-left { border-right: none; padding-right: 0; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
    .steps-grid { grid-template-columns: 1fr; }
    .split-right { width: 100%; }
}