/* ═══════════════════════════════════════════════════════════════
   EDU-ADMIN · DOCUMENTOS LEGALES (términos, privacidad, soporte)
   Paleta institucional: azul marino profundo + oro champán
   ═══════════════════════════════════════════════════════════════ */

:root {
    --navy-900: #070c16;
    --navy-800: #0a1120;
    --navy-700: #0d1526;
    --navy-600: #16233c;
    --navy-500: #1f3150;

    --gold: #c8a45a;
    --gold-soft: #e8d29a;
    --gold-champagne: #f6e7b4;
    --gold-deep: #a9853f;

    --ivory: #f7f3e9;
    --ivory-soft: #ded9cb;
    --muted: #a4aec0;

    --line: rgba(200, 164, 90, 0.22);
    --line-soft: rgba(255, 255, 255, 0.08);
    --card: rgba(255, 255, 255, 0.035);
    --card-solid: rgba(13, 21, 38, 0.86);

    --ok: #58c39a;
    --warn: #e0b357;
    --danger: #dd8080;
    --info: #6fb3bd;

    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 34px 90px -50px rgba(0, 0, 0, 0.95);
    --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--ivory);
    background-color: var(--navy-900);
    background-image:
        radial-gradient(900px 520px at 6% -10%, rgba(200, 164, 90, 0.16) 0%, transparent 62%),
        radial-gradient(760px 460px at 102% 4%, rgba(200, 164, 90, 0.09) 0%, transparent 58%),
        linear-gradient(180deg, #05080f 0%, #0a1120 48%, #070c16 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--gold-soft); text-decoration: none; }
a:hover { color: var(--gold-champagne); }

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 36px);
}

/* ── Barra superior ─────────────────────────────────────────── */
.doc-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(7, 12, 22, 0.86);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px) saturate(1.15);
    -webkit-backdrop-filter: blur(18px) saturate(1.15);
}

.doc-header .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 68px;
}

.doc-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ivory);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.doc-brand .mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: linear-gradient(150deg, rgba(200, 164, 90, 0.20), rgba(200, 164, 90, 0.04));
    color: var(--gold-soft);
    font-size: 16px;
}

.doc-brand small {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

.doc-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.doc-nav a {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ivory-soft);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.doc-nav a:hover {
    color: var(--gold-champagne);
    border-color: var(--line);
    background: rgba(200, 164, 90, 0.07);
}

.doc-nav a.is-active {
    color: var(--navy-900);
    background: linear-gradient(135deg, var(--gold-champagne), var(--gold));
    border-color: transparent;
    font-weight: 600;
}

.doc-nav a.btn-enter {
    color: var(--ivory);
    border-color: var(--line);
}

/* ── Portada ────────────────────────────────────────────────── */
.hero {
    padding: clamp(38px, 7vw, 72px) 0 clamp(28px, 4vw, 42px);
    text-align: center;
}

.hero .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    margin-bottom: 20px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(200, 164, 90, 0.08);
    color: var(--gold-soft);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0 0 14px;
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: clamp(2.1rem, 5vw, 3.3rem);
    font-weight: 600;
    line-height: 1.15;
    color: var(--ivory);
}

.hero h1 em {
    font-style: normal;
    background: linear-gradient(120deg, var(--gold-champagne), var(--gold) 55%, var(--gold-deep));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p.lead {
    max-width: 720px;
    margin: 0 auto 22px;
    color: var(--muted);
    font-size: clamp(0.98rem, 1.6vw, 1.1rem);
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 15px;
    border-radius: 999px;
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.03);
    color: var(--ivory-soft);
    font-size: 12.5px;
}

.chip i, .chip .dot { color: var(--gold); }

/* ── Tarjetas y secciones ───────────────────────────────────── */
.doc-body { padding-bottom: 60px; }

.card {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: clamp(22px, 3.4vw, 40px);
}

.card + .card { margin-top: 22px; }

.section { margin-bottom: 38px; scroll-margin-top: 92px; }
.section:last-child { margin-bottom: 0; }

.section > h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line-soft);
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size: clamp(1.35rem, 2.6vw, 1.75rem);
    font-weight: 600;
    color: var(--ivory);
}

.section > h2 .num {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(200, 164, 90, 0.10);
    color: var(--gold-soft);
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
}

.section h3 {
    margin: 24px 0 10px;
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--gold-soft);
}

.section p { margin: 0 0 14px; color: var(--ivory-soft); }
.section p strong, .section li strong { color: var(--ivory); font-weight: 600; }
.section ul, .section ol { margin: 0 0 16px; padding-left: 22px; color: var(--ivory-soft); }
.section li { margin-bottom: 8px; }
.section li::marker { color: var(--gold); }

.note {
    margin: 18px 0;
    padding: 16px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    border-left: 3px solid var(--gold);
    background: linear-gradient(135deg, rgba(200, 164, 90, 0.12), rgba(200, 164, 90, 0.03));
    color: var(--ivory);
    font-size: 0.95rem;
}

.note strong { color: var(--gold-champagne); }
.note p:last-child { margin-bottom: 0; }

.note.is-info { border-left-color: var(--info); background: rgba(111, 179, 189, 0.09); }
.note.is-ok { border-left-color: var(--ok); background: rgba(88, 195, 154, 0.09); }

/* ── Tablas ─────────────────────────────────────────────────── */
.table-scroll {
    overflow-x: auto;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    margin: 6px 0 18px;
}

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 640px;
}

table.data thead th {
    text-align: left;
    padding: 13px 16px;
    background: rgba(200, 164, 90, 0.12);
    color: var(--gold-champagne);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}

table.data tbody td {
    padding: 13px 16px;
    border-top: 1px solid var(--line-soft);
    color: var(--ivory-soft);
    vertical-align: top;
}

table.data tbody tr:hover td { background: rgba(255, 255, 255, 0.025); }
table.data tbody td strong { color: var(--ivory); }

/* ── Rejilla de tarjetas (permisos, canales, FAQ) ───────────── */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 14px;
    margin: 8px 0 18px;
}

.mini-card {
    padding: 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.028);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.mini-card:hover { border-color: var(--line); transform: translateY(-2px); }

.mini-card .ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: rgba(200, 164, 90, 0.10);
    color: var(--gold-soft);
    font-size: 16px;
}

.mini-card h4 {
    margin: 0 0 6px;
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--ivory);
}

.mini-card p { margin: 0; font-size: 0.88rem; color: var(--muted); }
.mini-card p strong { color: var(--ivory-soft); }

/* ── Preguntas frecuentes ───────────────────────────────────── */
details.faq {
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.028);
    margin-bottom: 10px;
    overflow: hidden;
}

details.faq[open] { border-color: var(--line); }

details.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 18px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--ivory);
    list-style: none;
}

details.faq summary::-webkit-details-marker { display: none; }

details.faq summary::after {
    content: '\002B';
    color: var(--gold);
    font-size: 18px;
    line-height: 1;
}

details.faq[open] summary::after { content: '\2212'; }

details.faq .answer {
    padding: 0 18px 16px;
    color: var(--ivory-soft);
    font-size: 0.92rem;
}

details.faq .answer p:last-child,
details.faq .answer ul:last-child,
details.faq .answer ol:last-child { margin-bottom: 0; }

/* ── Índice ─────────────────────────────────────────────────── */
.toc {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 22px;
    padding: 14px 16px;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.022);
}

.toc span.label {
    width: 100%;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 2px;
}

.toc a {
    padding: 5px 12px;
    border-radius: 999px;
    border: 1px solid var(--line-soft);
    font-size: 12.5px;
    color: var(--ivory-soft);
}

.toc a:hover { border-color: var(--line); color: var(--gold-champagne); }

/* ── Contacto ───────────────────────────────────────────────── */
.contact-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 8px;
}

.contact-item {
    padding: 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: linear-gradient(140deg, rgba(200, 164, 90, 0.10), rgba(255, 255, 255, 0.02));
}

.contact-item span.k {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

.contact-item .v { font-size: 0.98rem; font-weight: 600; color: var(--ivory); }
.contact-item .v a { color: var(--gold-champagne); }

/* ── Pie ────────────────────────────────────────────────────── */
.doc-footer {
    margin-top: 40px;
    padding: 34px 0 40px;
    border-top: 1px solid var(--line);
    background: rgba(5, 8, 15, 0.6);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 26px;
}

.footer-col h3 {
    margin: 0 0 12px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold-soft);
}

.footer-col p { margin: 0 0 10px; color: var(--muted); font-size: 0.9rem; }

.footer-links { display: grid; gap: 8px; }

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ivory-soft);
    font-size: 0.9rem;
}

.footer-links a:hover { color: var(--gold-champagne); }
.footer-links i { color: var(--gold-deep); font-size: 12px; }

.footer-bottom {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid var(--line-soft);
    text-align: center;
    color: var(--muted);
    font-size: 0.82rem;
}

/* ── Volver arriba ──────────────────────────────────────────── */
.to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 50;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: rgba(13, 21, 38, 0.92);
    color: var(--gold-soft);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.to-top.is-visible { opacity: 1; pointer-events: auto; }
.to-top:hover { transform: translateY(-2px); color: var(--gold-champagne); }

/* ── Responsivo ─────────────────────────────────────────────── */
@media (max-width: 860px) {
    .doc-header .wrap { flex-direction: column; align-items: flex-start; padding-top: 12px; padding-bottom: 12px; }
    .doc-nav { width: 100%; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
    body { font-size: 15px; }
    .card { padding: 20px 16px; }
    .footer-grid { grid-template-columns: 1fr; }
    .chip { font-size: 11.5px; }
}

/* ── Impresión ──────────────────────────────────────────────── */
@media print {
    body {
        background: #fff !important;
        color: #111 !important;
        font-size: 11.5pt;
    }
    .doc-header, .to-top, .doc-footer, .toc { display: none !important; }
    .card { border: 0; box-shadow: none; padding: 0; }
    .hero { padding: 0 0 18px; text-align: left; }
    .hero h1 { color: #111 !important; }
    .hero h1 em { -webkit-text-fill-color: #111 !important; color: #111 !important; }
    .hero p.lead, .chip { color: #333 !important; }
    .section > h2 { color: #111 !important; border-bottom: 1px solid #ccc; }
    .section h3, .section p, .section li, table.data tbody td { color: #222 !important; }
    .section > h2 .num { border: 1px solid #999; color: #333; background: none; }
    .note { border: 1px solid #bbb; background: none; }
    table.data thead th { background: #eee !important; color: #111 !important; }
    details.faq { border: 1px solid #ccc; }
    details.faq[open] summary::after, details.faq summary::after { display: none; }
    a { color: #111 !important; text-decoration: underline; }
}
