/* ─── legal-deaj.css — Estilos para páginas de documentos legales ─────────
   Usa tokens DEAJ: --deaj-primary #033e75, --deaj-secondary #71ce82,
   --deaj-yellow #fdb611. Mobile-first. Sin dependencias de JS.
   ───────────────────────────────────────────────────────────────────────── */

/* ── Contenedor del documento ────────────────────────────────────────────── */
.legal-doc {
    font-size: .95rem;
    line-height: 1.7;
    color: #1f2937;
}

/* ── Encabezado ──────────────────────────────────────────────────────────── */
.legal-header {
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 1.5rem;
}

.legal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
    font-size: .82rem;
    color: #6b7280;
}

/* ── Tabla de contenidos lateral ─────────────────────────────────────────── */
.legal-toc {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem 1.1rem;
    font-size: .83rem;
}
.legal-toc-title {
    font-weight: 700;
    color: #033e75;
    margin-bottom: .6rem;
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.legal-toc-list {
    padding-left: 1.1rem;
    margin: 0;
}
.legal-toc-list li {
    margin-bottom: .3rem;
    line-height: 1.35;
}
.legal-toc-list a {
    color: #374151;
    text-decoration: none;
    transition: color .12s;
}
.legal-toc-list a:hover {
    color: #033e75;
}

/* ── Secciones ───────────────────────────────────────────────────────────── */
.legal-section {
    margin-bottom: 2.5rem;
    padding-top: .5rem; /* espacio para anclas con navbar fija */
    scroll-margin-top: 80px;
}

.legal-h2 {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #033e75;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: .5rem;
    margin-bottom: 1rem;
}

.legal-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    background: #033e75;
    color: #fff;
    border-radius: 50%;
    font-size: .8rem;
    font-weight: 700;
    flex-shrink: 0;
}

.legal-h3 {
    font-size: .95rem;
    font-weight: 600;
    color: #033e75;
    margin: 1.25rem 0 .5rem;
}

/* ── Listas ──────────────────────────────────────────────────────────────── */
.legal-list {
    padding-left: 1.4rem;
    margin-bottom: .75rem;
}
.legal-list li {
    margin-bottom: .4rem;
}
.legal-list li::marker {
    color: #71ce82;
}

/* ── Definiciones ────────────────────────────────────────────────────────── */
.legal-dl dt {
    font-weight: 700;
    color: #033e75;
    margin-top: 1rem;
}
.legal-dl dd {
    margin-left: 1rem;
    color: #374151;
}

/* ── Tablas ──────────────────────────────────────────────────────────────── */
.legal-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-top: .75rem;
}
.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .87rem;
}
.legal-table th,
.legal-table td {
    padding: .6rem .85rem;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: top;
    text-align: left;
}
.legal-table th[scope="row"] {
    font-weight: 600;
    color: #033e75;
    background: #f8fafc;
    white-space: nowrap;
    width: 200px;
}
.legal-table thead th {
    background: #033e75;
    color: #fff;
    font-weight: 600;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: none;
}
.legal-table tbody tr:last-child td,
.legal-table tbody tr:last-child th {
    border-bottom: none;
}
.legal-table tbody tr:hover td,
.legal-table tbody tr:hover th[scope="row"] {
    background: #f0f7ff;
}

/* ── Callouts ────────────────────────────────────────────────────────────── */
.legal-callout {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    border-radius: 8px;
    padding: .9rem 1.1rem;
    font-size: .88rem;
    margin: 1rem 0;
    line-height: 1.55;
}
.legal-callout-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #78350f;
}
.legal-callout-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e3a5f;
}

/* ── Grid de derechos ARCO ───────────────────────────────────────────────── */
.legal-rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.legal-right-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 1.1rem 1.1rem .9rem;
    transition: box-shadow .15s, border-color .15s;
}
.legal-right-card:hover {
    box-shadow: 0 4px 16px rgba(3,62,117,.08);
    border-color: #033e75;
}
.legal-right-icon {
    width: 2.4rem;
    height: 2.4rem;
    background: rgba(3,62,117,.08);
    color: #033e75;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    margin-bottom: .65rem;
}
.legal-right-card h3 {
    font-size: .92rem;
    font-weight: 700;
    color: #033e75;
    margin: 0 0 .4rem;
}
.legal-right-card p {
    font-size: .82rem;
    color: #4b5563;
    margin: 0;
    line-height: 1.5;
}

/* ── Cards de seguridad ──────────────────────────────────────────────────── */
.legal-security-card {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem;
    height: 100%;
}
.legal-security-card i {
    font-size: 1.4rem;
    color: #033e75;
    margin-bottom: .5rem;
    display: block;
}
.legal-security-card h4 {
    font-size: .9rem;
    font-weight: 700;
    color: #033e75;
    margin: 0 0 .35rem;
}
.legal-security-card p {
    font-size: .82rem;
    color: #4b5563;
    margin: 0;
    line-height: 1.5;
}

/* ── Footer del documento ────────────────────────────────────────────────── */
.legal-footer {
    border-top: 1px solid #dee2e6;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 575.98px) {
    .legal-rights-grid {
        grid-template-columns: 1fr;
    }
    .legal-table th[scope="row"] {
        white-space: normal;
        width: auto;
    }
    .legal-h2 {
        font-size: .97rem;
    }
}
