/* ══════════════════════════════════════════════════════════════════
   PÁGINAS LEGALES — plantilla única de marca AppsDocentes
   ──────────────────────────────────────────────────────────────────
   La comparten las 6: aviso-legal, privacidad, cookies, condiciones,
   seguridad y accesibilidad. NO crear estilos por página: se toca aquí
   y cambian todas (igual que el shell de generadorsa con dashboard.css).

   Calcada del panel (panel.php): mismas fuentes (Fraunces + Plus Jakarta
   Sans), mismo fondo con manchas pastel, mismo menú lateral y mismas
   tarjetas. El shell de generadorsa (app-shell/sidebar.js) no sirve aquí
   porque su menú es el de la app y estas páginas son públicas.

   Responsive (docs/MANUAL_RESPONSIVE_MOVIL_TABLET.md):
   - Escritorio: menú lateral sticky en columna de grid.
   - ≤1024px: drawer + backdrop, se abre con el botón hamburguesa.
   - Nunca se toca escritorio desde los @media.
   ══════════════════════════════════════════════════════════════════ */

:root {
    --font-heading: 'Fraunces', Georgia, serif;
    --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
    --lg-ink: #1E293B;
    --lg-muted: #475569;
    --lg-line: #e2e8f0;
    --lg-primary: #4f46e5;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

/* Mismo lienzo que el panel: crema + 4 manchas pastel fijas. */
body {
    background-color: #f7f8fc;
    background-image:
        radial-gradient(circle at 8% 10%, rgba(186,230,253,0.4) 0%, transparent 42%),
        radial-gradient(circle at 92% 12%, rgba(253,186,228,0.35) 0%, transparent 42%),
        radial-gradient(circle at 12% 90%, rgba(167,243,208,0.32) 0%, transparent 42%),
        radial-gradient(circle at 90% 88%, rgba(254,240,138,0.30) 0%, transparent 42%);
    background-attachment: fixed;
    font-family: var(--font-body);
    color: var(--lg-ink);
    line-height: 1.65;
    min-height: 100vh;
}
img { max-width: 100%; height: auto; }

/* ── Shell ───────────────────────────────────────────────────────── */
.lg-shell { display: grid; grid-template-columns: 188px 1fr; min-height: 100vh; }

.lg-sidebar {
    position: sticky; top: 0; left: 0;
    height: 100vh;
    background: #fff;
    border-right: 1px solid var(--lg-line);
    display: flex; flex-direction: column;
    padding: 16px 9px;
    overflow-y: auto;
}
.lg-sb-logo {
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    padding: 0 8px 18px;
    border-bottom: 1px solid var(--lg-line);
    margin-bottom: 14px;
}
.lg-sb-logo img { width: 124px; height: 124px; object-fit: contain; }

.lg-sb-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.lg-sb-rot {
    font-size: 0.68rem; font-weight: 800; letter-spacing: .12em;
    /* var(--lg-muted), no #94a3b8: ese gris da 2,56:1 sobre blanco y necesita
       4,5:1 (WCAG 1.4.3). Lo cazó el gate de accesibilidad del CI en cuanto se
       creó esta plantilla — en la propia Declaración de accesibilidad, además. */
    text-transform: uppercase; color: var(--lg-muted);
    padding: 14px 10px 6px;
}
.lg-sb-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 10px; border-radius: 11px;
    text-decoration: none; color: var(--lg-muted);
    font-weight: 600; font-size: 0.9rem;
    transition: all .15s; position: relative;
}
.lg-sb-nav a:hover { background: #f8fafc; color: var(--lg-ink); }
.lg-sb-nav a.is-active { background: #eef2ff; color: #4338ca; font-weight: 700; }
.lg-sb-nav a.is-active::before {
    content: ''; position: absolute; left: -9px; top: 8px; bottom: 8px;
    width: 3px; background: var(--lg-primary); border-radius: 0 4px 4px 0;
}
.lg-sb-nav a .pi { font-size: 1.15rem; width: 22px; text-align: center; flex-shrink: 0; }

/* Tarjetita de pie del menú, como la del panel. */
.lg-sb-card {
    margin-top: auto;
    background: linear-gradient(135deg, #f5f3ff, #fce7f3);
    border: 1px solid #ede9fe; border-radius: 14px;
    padding: 12px; text-align: center;
    font-size: 0.72rem; color: #6d28d9; font-weight: 600;
}
.lg-sb-card a { color: #6d28d9; }

/* Aviso de copyright: lo llevaba el <footer> de las páginas antiguas y al
   pasar los enlaces al menú lateral se habría perdido. Vive aquí. */
.lg-sb-copy { margin-top: 10px; text-align: center; font-size: 0.68rem; color: var(--lg-muted); line-height: 1.4; }

/* ── Contenido ───────────────────────────────────────────────────── */
.lg-main { padding: 26px clamp(18px, 2.4vw, 36px) 80px; max-width: 1100px; width: 100%; }

.lg-head { margin-bottom: 22px; }
.lg-eyebrow {
    display: inline-flex; align-items: center; gap: 7px;
    background: #eef2ff; color: #4338ca;
    font-size: 0.72rem; font-weight: 800; letter-spacing: .1em;
    text-transform: uppercase;
    padding: 6px 13px; border-radius: 999px; margin-bottom: 12px;
}
/* El degradado de marca como relleno del texto SOLO vale aquí porque el h1 es
   texto grande (>=24px o >=18.66px en negrita), y ahí WCAG 1.4.3 pide 3:1 y no
   4,5:1. Medido sobre blanco: #4f46e5 = 6,29:1 · #7c3aed = 5,70:1 ·
   #ec4899 = 3,53:1 — el extremo rosa pasa por los pelos, y SOLO en grande.
   NO reutilices este degradado en texto normal: incumpliría.
   Ojo: pa11y no puede medirlo (el relleno es transparente), así que aquí el
   gate NO te va a avisar. Este comentario es la única red. */
h1 {
    font-family: var(--font-heading); font-weight: 800;
    font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.12;
    background: linear-gradient(135deg, #4f46e5, #7c3aed, #ec4899);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}
.lg-sub { color: var(--lg-muted); font-size: 0.98rem; }

.lg-card {
    background: rgba(255,255,255,0.86);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.9);
    border-radius: 20px;
    padding: clamp(20px, 2.6vw, 34px);
    box-shadow: 0 6px 26px rgba(15,23,42,0.05);
}

.lg-card h2 {
    font-family: var(--font-heading); font-weight: 700;
    font-size: 1.3rem; color: var(--lg-ink);
    margin: 32px 0 10px; scroll-margin-top: 20px;
}
.lg-card h2:first-child { margin-top: 0; }
.lg-card h3 { font-family: var(--font-heading); font-weight: 600; font-size: 1.05rem; color: var(--lg-ink); margin: 20px 0 6px; }
.lg-card p, .lg-card li { color: #3d4b5c; }
.lg-card ul { margin: 8px 0 8px 22px; }
.lg-card li { margin-bottom: 6px; }
.lg-card a { color: var(--lg-primary); }
.lg-card strong { color: var(--lg-ink); }

/* Avisos: mismo lenguaje pastel de marca, sin barras laterales duras. */
.aviso, .lg-aviso {
    background: linear-gradient(135deg, #f5f3ff, #faf5ff);
    border: 1px solid #ede9fe; border-radius: 14px;
    padding: 15px 17px; margin: 18px 0;
}
.estado, .lg-estado {
    background: linear-gradient(135deg, #fff7ed, #fffbeb);
    border: 1px solid #fed7aa; border-radius: 14px;
    padding: 15px 17px; margin: 18px 0;
}
.estado b, .lg-estado b { color: #9a3412; }
/* Verde de "esto está bien / cumplimos" — lo usaba el banner de confianza de
   seguridad.html; sin esta variante se quedaba morado y perdía el significado. */
.lg-ok {
    background: linear-gradient(135deg, #ecfdf5, #f0fdfa);
    border: 1px solid #a7f3d0; border-radius: 14px;
    padding: 15px 17px; margin: 18px 0;
}
.lg-ok b, .lg-ok strong { color: #047857; }

table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 0.9rem; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--lg-line); vertical-align: top; }
th { color: var(--lg-muted); font-weight: 700; background: #f8fafc; }
.lg-tablewrap { overflow-x: auto; }

/* ── Hamburguesa + backdrop (solo ≤1024px) ───────────────────────── */
.lg-burger {
    display: none;
    position: fixed; top: 12px; left: 12px; z-index: 60;
    width: 44px; height: 44px;              /* tap target 44px (gotcha 7.1) */
    align-items: center; justify-content: center;
    background: #fff; border: 1px solid var(--lg-line);
    border-radius: 12px; cursor: pointer;
    box-shadow: 0 4px 14px rgba(15,23,42,0.10);
    color: var(--lg-ink); font-size: 1.3rem;
}
.lg-backdrop {
    display: none; position: fixed; inset: 0; z-index: 50;
    background: rgba(15,23,42,0.45); opacity: 0; transition: opacity .25s;
}
.lg-backdrop.is-open { opacity: 1; }

.skip { position: absolute; left: -9999px; top: 0; background: #fff; color: var(--lg-primary); padding: 10px 16px; z-index: 100; border-radius: 0 0 10px 0; font-weight: 700; }
.skip:focus { left: 0; top: 0; }
:focus-visible { outline: 3px solid #6366f1; outline-offset: 2px; border-radius: 4px; }

/* ── Tablet / móvil: el menú pasa a drawer (≤1024px) ─────────────── */
@media (max-width: 1024px) {
    .lg-shell { grid-template-columns: 1fr; }
    .lg-sidebar {
        position: fixed; top: 0; left: 0;
        width: 280px; max-width: 86vw;
        transform: translateX(-100%); transition: transform .25s;
        z-index: 55; box-shadow: 0 0 30px rgba(15,23,42,0.15);
    }
    .lg-sidebar.is-open { transform: translateX(0); }
    .lg-burger { display: flex; }
    .lg-backdrop.is-open { display: block; }
    .lg-main { padding-top: 68px; }
    .lg-sb-nav a { min-height: 44px; }      /* tap target */
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
    html { scroll-behavior: auto; }
}
