/* =========================================================================
   LEGAL PAGES — Páginas /contacto/ /politica-de-privacidad/ /terminos-y-condiciones/
   Estilo NYT-style sobrio, lectura óptima 760px, tipografía editorial Fraunces+Inter.
   Heredado del design system del home-premium.css (mismas vars).
   ========================================================================= */

/* Container general */
.elc-legal-body {
    background: #ffffff;
    color: #2a2a2a;
    -webkit-font-smoothing: antialiased;
}

/* Wrapper editorial — se aplica via filter the_content sin tocar el HTML */
.elc-legal-content {
    max-width: 760px;
    margin: 0 auto;
    padding: 60px 24px 80px;
    font-family: var(--elc-font-sans, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
    font-size: 17px;
    line-height: 1.7;
}

/* Título principal de la página — el h1 inyectado por WP del título */
.elc-legal-content h1,
.elc-legal-page .entry-title,
.elc-legal-page .elc-legal-h1 {
    font-family: var(--elc-font-serif, 'Fraunces', Georgia, serif);
    font-size: clamp(32px, 4vw, 44px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #1a1a1a;
    margin: 0 0 32px;
    font-variation-settings: 'opsz' 96;
}

/* === TOC === */
.elc-legal-toc {
    background: #fafafa;
    border: 1px solid #ececec;
    border-radius: 2px;
    padding: 24px 28px;
    margin: 0 0 48px;
}
.elc-legal-toc__title {
    font-family: var(--elc-font-sans, 'Inter', sans-serif);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #6b7280;
    margin: 0 0 14px;
}
.elc-legal-toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: legal-toc;
}
.elc-legal-toc ol li {
    counter-increment: legal-toc;
    padding: 5px 0 5px 28px;
    position: relative;
}
.elc-legal-toc ol li::before {
    content: counter(legal-toc, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 5px;
    font-family: var(--elc-font-sans, 'Inter', sans-serif);
    font-size: 11px;
    font-weight: 600;
    color: #c8a35a;
    letter-spacing: 0.02em;
}
.elc-legal-toc ol li a {
    font-family: var(--elc-font-serif, 'Fraunces', Georgia, serif);
    font-size: 15.5px;
    color: #2a2a2a;
    text-decoration: none;
    transition: color 200ms;
}
.elc-legal-toc ol li a:hover {
    color: #C0392B;
}

/* === Secciones === */
.elc-legal-section {
    margin: 0 0 40px;
    scroll-margin-top: 24px;
}
.elc-legal-section h2 {
    font-family: var(--elc-font-serif, 'Fraunces', Georgia, serif);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: #1a1a1a;
    margin: 0 0 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #ececec;
    font-variation-settings: 'opsz' 96;
}
.elc-legal-section h3 {
    font-family: var(--elc-font-serif, 'Fraunces', Georgia, serif);
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 24px 0 12px;
}

.elc-legal-section p {
    font-family: var(--elc-font-sans, 'Inter', sans-serif);
    font-size: 17px;
    line-height: 1.7;
    color: #2a2a2a;
    margin: 0 0 16px;
}
.elc-legal-section strong { color: #1a1a1a; font-weight: 600; }
.elc-legal-section em     { font-style: italic; }

.elc-legal-section a {
    color: #1a1a1a;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}
.elc-legal-section a:hover {
    color: #C0392B;
}

/* Listas */
.elc-legal-section ul,
.elc-legal-section ol {
    margin: 0 0 20px;
    padding: 0 0 0 24px;
}
.elc-legal-section ul li,
.elc-legal-section ol li {
    font-family: var(--elc-font-sans, 'Inter', sans-serif);
    font-size: 17px;
    line-height: 1.65;
    color: #2a2a2a;
    margin: 0 0 10px;
}
.elc-legal-section ul li::marker {
    color: #c8a35a;
}

/* === Tabla de cookies (privacidad sección 5) === */
.elc-legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
    font-family: var(--elc-font-sans, 'Inter', sans-serif);
    font-size: 14.5px;
    line-height: 1.5;
}
.elc-legal-table thead th {
    text-align: left;
    padding: 10px 12px;
    background: #fafafa;
    border-bottom: 2px solid #1a1a1a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #4b5563;
}
.elc-legal-table tbody td {
    padding: 12px;
    border-bottom: 1px solid #ececec;
    vertical-align: top;
    color: #2a2a2a;
}
.elc-legal-table tbody tr:last-child td { border-bottom: none; }

/* === Meta final (fecha + datos legales) === */
.elc-legal-meta {
    margin: 56px 0 0;
    padding: 32px 28px;
    background: #fafafa;
    border-left: 3px solid #c8a35a;
    border-radius: 2px;
    font-family: var(--elc-font-sans, 'Inter', sans-serif);
    font-size: 14px;
    line-height: 1.6;
    color: #4b5563;
}
.elc-legal-meta p { margin: 0 0 6px; }
.elc-legal-meta p:last-child { margin: 0; }
.elc-legal-meta strong { color: #1a1a1a; }

/* === Mobile === */
@media (max-width: 768px) {
    .elc-legal-content { padding: 36px 20px 56px; font-size: 16px; }
    .elc-legal-content h1 { font-size: 30px; margin-bottom: 24px; }
    .elc-legal-toc { padding: 20px 22px; margin-bottom: 36px; }
    .elc-legal-toc ol li { padding-left: 24px; }
    .elc-legal-toc ol li a { font-size: 14.5px; }
    .elc-legal-section h2 { font-size: 22px; padding-bottom: 10px; }
    .elc-legal-section p,
    .elc-legal-section ul li,
    .elc-legal-section ol li { font-size: 16px; }
    .elc-legal-table { font-size: 13px; }
    .elc-legal-table thead th { font-size: 10px; padding: 8px; }
    .elc-legal-table tbody td { padding: 8px; }
    .elc-legal-meta { padding: 24px 20px; font-size: 13px; }
}

/* === Dark mode === */
html.dark .elc-legal-body { background: #0A0A0C; color: #d4d4d4; }
html.dark .elc-legal-content h1,
html.dark .elc-legal-page .entry-title { color: #F0F0F0; }
html.dark .elc-legal-toc { background: #131319; border-color: #1F1F24; }
html.dark .elc-legal-toc__title { color: #8A8A8E; }
html.dark .elc-legal-toc ol li a { color: #d4d4d4; }
html.dark .elc-legal-toc ol li a:hover,
html.dark .elc-legal-section a:hover { color: #E74C3C; }
html.dark .elc-legal-section h2 { color: #F0F0F0; border-bottom-color: #1F1F24; }
html.dark .elc-legal-section h3 { color: #F0F0F0; }
html.dark .elc-legal-section p,
html.dark .elc-legal-section ul li,
html.dark .elc-legal-section ol li { color: #d4d4d4; }
html.dark .elc-legal-section strong { color: #F0F0F0; }
html.dark .elc-legal-section a { color: #F0F0F0; }
html.dark .elc-legal-table thead th { background: #131319; color: #B5B5B8; border-bottom-color: #F0F0F0; }
html.dark .elc-legal-table tbody td { color: #d4d4d4; border-bottom-color: #1F1F24; }
html.dark .elc-legal-meta { background: #131319; color: #B5B5B8; }
html.dark .elc-legal-meta strong { color: #F0F0F0; }

/* === Smooth scroll para los anchors del TOC === */
html { scroll-behavior: smooth; }

/* === Footer links institucionales (legal) — visibilidad sutil === */
.elc-footer__legal-line {
    text-align: center;
    font-family: var(--elc-font-sans, 'Inter', sans-serif);
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    padding: 8px 16px 0;
}
.elc-footer__legal-line a {
    color: #6b7280;
    text-decoration: none;
    transition: color 200ms;
}
.elc-footer__legal-line a:hover {
    color: #1a1a1a;
}
.elc-footer__legal-line .elc-footer__legal-sep {
    margin: 0 8px;
    color: #c8a35a;
}
html.dark .elc-footer__legal-line { color: #8A8A8E; }
html.dark .elc-footer__legal-line a { color: #8A8A8E; }
html.dark .elc-footer__legal-line a:hover { color: #F0F0F0; }
