/* ─── Documentación ───────────────────────────────────────────────── */

.doc-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg);
    border-radius: var(--radius);
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

.doc-nav a {
    color: var(--primary);
    padding: 0.3rem 0.7rem;
    border-radius: 4px;
    transition: background 0.15s;
}

.doc-nav a:hover {
    background: var(--border-light);
    text-decoration: none;
}

/* ─── Secciones ───────────────────────────────────────────────────── */
.doc-section {
    margin-bottom: 3.5rem;
    scroll-margin-top: calc(var(--nav-h) + 1.5rem);
}

.doc-section h2 {
    color: var(--primary);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.6rem;
    border-bottom: 3px solid var(--accent-light);
    letter-spacing: -0.02em;
}

.doc-section h3 {
    color: var(--primary);
    font-size: 1.15rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
}

.doc-section p {
    margin-bottom: 1rem;
    text-align: justify;
}

.doc-section ul,
.doc-section ol {
    margin: 0.75rem 0 1rem 1.5rem;
}

.doc-section li {
    margin-bottom: 0.6rem;
}

/* ─── Cajas informativas ──────────────────────────────────────────── */
.info-box {
    background: #fff8e6;
    border: 2px solid #f0c040;
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}

.info-box h4 {
    color: #7a5c00;
    margin-bottom: 0.6rem;
    font-size: 1rem;
}

.info-box p,
.info-box li {
    color: #6b5000;
    font-size: 0.95rem;
}

.info-box ul { margin-left: 1.25rem; }

.warning-box {
    background: #ffe6e6;
    border-left: 4px solid var(--accent-light);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1rem 1.5rem;
    margin: 1.25rem 0;
    font-size: 0.95rem;
    color: #6b1010;
}

/* ─── Tablas de signos ────────────────────────────────────────────── */
.sign-table-wrap {
    overflow-x: auto;
    margin: 1.5rem 0;
}

.sign-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
}

.sign-table th,
.sign-table td {
    border: 1px solid var(--border);
    padding: 0.6rem 0.875rem;
    text-align: center;
}

.sign-table th {
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sign-table tr:nth-child(even) { background: var(--bg); }

.sign-cell {
    font-size: 2rem;
    line-height: 1.4;
}

/* ─── Comparativa de variantes ────────────────────────────────────── */
.variant-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.variant-card {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}

.variant-card h4 {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--border);
}

/* ─── Bibliografía ────────────────────────────────────────────────── */
.bib-list {
    list-style: none;
    margin: 0;
}

.bib-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.95rem;
}

.bib-list li:last-child { border-bottom: none; }

/* ─── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .variant-grid { grid-template-columns: 1fr; }
    .doc-section h2 { font-size: 1.35rem; }
    .sign-cell { font-size: 1.5rem; }
}
