/* HablemosDE — cabecera, pie y páginas del portal.
   Autocontenido (prefijo hd-): se carga en todas las páginas, también dentro de
   las secciones, sin depender de la hoja de estilos de cada sección. */

:root {
  --hd-ink: #0f172a;
  --hd-text: #1e293b;
  --hd-muted: #475569;
  --hd-soft: #64748b;
  --hd-line: #e2e8f0;
  --hd-bg: #f8fafc;
  --hd-card: #ffffff;
  --hd-accent: #2563eb;
  --hd-accent-dark: #1d4ed8;
  --hd-manchas: #0d9488;
  --hd-jardin: #16a34a;
  --hd-gallinas: #d97706;
  --hd-piscinas: #0284c7;
  --hd-radius: 14px;
  --hd-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* ── Cabecera del portal ───────────────────────────────────────── */
.hd-header { background: var(--hd-ink); color: #fff; font-family: var(--hd-font); position: relative; z-index: 50; }
.hd-header * { box-sizing: border-box; }
.hd-header-inner { max-width: 1180px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; }
.hd-brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 1.02rem; letter-spacing: -0.01em; }
.hd-brand:hover { color: #fff; }
.hd-brand-mark { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #2563eb, #7c3aed); display: inline-grid; place-items: center; font-size: 0.72rem; font-weight: 900; letter-spacing: -0.02em; }
.hd-brand small { display: block; font-weight: 500; font-size: 0.72rem; color: #94a3b8; letter-spacing: 0; }
.hd-sections { display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; list-style: none; }
.hd-sections a { display: inline-block; color: #cbd5e1; text-decoration: none; font-size: 0.9rem; font-weight: 600; padding: 7px 12px; border-radius: 999px; }
.hd-sections a:hover { color: #fff; background: #1e293b; }
.hd-sections a[aria-current="true"] { color: #fff; background: #1e293b; box-shadow: inset 0 -2px 0 var(--hd-sec, var(--hd-accent)); }
.hd-subnav { background: #fff; border-bottom: 1px solid var(--hd-line); font-family: var(--hd-font); }
.hd-subnav-inner { max-width: 1180px; margin: 0 auto; padding: 8px 20px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; font-size: 0.9rem; }
.hd-subnav-title { font-weight: 800; color: var(--hd-sec, var(--hd-ink)); margin-right: 6px; text-decoration: none; }
.hd-subnav a { color: var(--hd-muted); text-decoration: none; padding: 4px 0; }
.hd-subnav a:hover { color: var(--hd-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ── Pie del portal ────────────────────────────────────────────── */
.hd-footer { background: var(--hd-ink); color: #cbd5e1; font-family: var(--hd-font); margin-top: 56px; }
.hd-footer * { box-sizing: border-box; }
.hd-footer-inner { max-width: 1180px; margin: 0 auto; padding: 44px 20px 28px; }
.hd-footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.hd-footer p { margin: 10px 0 0; font-size: 0.9rem; line-height: 1.6; color: #94a3b8; }
.hd-footer-title { margin: 0 0 12px; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #fff; }
.hd-footer-links { display: grid; gap: 8px; }
.hd-footer a { color: #cbd5e1; text-decoration: none; font-size: 0.92rem; }
.hd-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.hd-footer-note { border-top: 1px solid #1e293b; margin-top: 32px; padding-top: 18px; font-size: 0.82rem; color: #94a3b8; }
.hd-footer-note p { margin: 4px 0; font-size: 0.82rem; }
@media (max-width: 820px) { .hd-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) {
  .hd-footer-grid { grid-template-columns: 1fr; }
  .hd-header-inner { padding: 10px 14px; }
  .hd-sections a { padding: 6px 9px; font-size: 0.85rem; }
}

/* ── Páginas del portal (portada y páginas institucionales) ──── */
.hd-page { margin: 0; background: var(--hd-bg); color: var(--hd-text); font-family: var(--hd-font); line-height: 1.65; }
.hd-page *, .hd-page *::before, .hd-page *::after { box-sizing: border-box; }
.hd-page a { color: var(--hd-accent); }
.hd-skip { position: absolute; left: -9999px; top: 0; background: var(--hd-accent); color: #fff; padding: 10px 18px; z-index: 100; }
.hd-skip:focus { left: 12px; }
.hd-container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.hd-hero { background: linear-gradient(180deg, #eef2ff 0%, var(--hd-bg) 100%); padding: 56px 0 40px; border-bottom: 1px solid var(--hd-line); }
.hd-hero h1 { margin: 10px 0 14px; font-size: clamp(2rem, 4.4vw, 3.1rem); line-height: 1.08; letter-spacing: -0.03em; color: var(--hd-ink); max-width: 820px; }
.hd-hero p.hd-lead { margin: 0; max-width: 760px; font-size: 1.1rem; color: var(--hd-muted); }
.hd-kicker { display: inline-block; font-size: 0.76rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--hd-accent-dark); }
.hd-hero-sections { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 30px; }
.hd-sec-card { display: block; background: var(--hd-card); border: 1px solid var(--hd-line); border-top: 4px solid var(--hd-sec, var(--hd-accent)); border-radius: var(--hd-radius); padding: 18px 18px 16px; text-decoration: none; color: var(--hd-text); transition: box-shadow .15s, transform .15s; }
.hd-page .hd-sec-card { color: var(--hd-text); }
.hd-sec-card:hover { box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08); transform: translateY(-2px); }
.hd-sec-card strong { display: block; font-size: 1.08rem; color: var(--hd-ink); }
.hd-sec-card span { display: block; margin-top: 6px; font-size: 0.9rem; color: var(--hd-muted); }
.hd-sec-card em { display: block; margin-top: 10px; font-style: normal; font-size: 0.82rem; font-weight: 700; color: var(--hd-sec, var(--hd-accent)); }
.hd-section { padding: 48px 0 8px; }
.hd-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid var(--hd-line); padding-bottom: 12px; margin-bottom: 20px; }
.hd-section-head h2 { margin: 4px 0 0; font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -0.02em; color: var(--hd-ink); }
.hd-section-head p { margin: 6px 0 0; color: var(--hd-muted); max-width: 720px; }
.hd-section-head .hd-more { font-weight: 700; text-decoration: none; white-space: nowrap; color: var(--hd-sec, var(--hd-accent)); }
.hd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.hd-card { display: flex; flex-direction: column; background: var(--hd-card); border: 1px solid var(--hd-line); border-radius: var(--hd-radius); padding: 18px; text-decoration: none; color: var(--hd-text); transition: box-shadow .15s, border-color .15s; }
.hd-page a.hd-card { color: var(--hd-text); }
.hd-card:hover { border-color: var(--hd-sec, var(--hd-accent)); box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07); }
.hd-card h3 { margin: 0 0 8px; font-size: 1.02rem; line-height: 1.35; color: var(--hd-ink); }
.hd-card p { margin: 0; font-size: 0.9rem; color: var(--hd-muted); line-height: 1.55; }
.hd-card .hd-tag { margin-bottom: 8px; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--hd-sec, var(--hd-accent)); }
.hd-about { background: var(--hd-card); border: 1px solid var(--hd-line); border-radius: var(--hd-radius); padding: 28px; margin-top: 48px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; }
.hd-about h2 { margin: 6px 0 10px; font-size: 1.5rem; color: var(--hd-ink); }
.hd-about p { margin: 0 0 10px; color: var(--hd-muted); }
.hd-about ul { margin: 0; padding-left: 18px; color: var(--hd-muted); }
.hd-about li { margin-bottom: 6px; }
.hd-btn { display: inline-block; background: var(--hd-accent); color: #fff !important; text-decoration: none; font-weight: 700; padding: 10px 18px; border-radius: 10px; margin: 6px 8px 0 0; }
.hd-btn.hd-ghost { background: transparent; color: var(--hd-accent) !important; border: 1px solid var(--hd-line); }
.hd-search { margin-top: 26px; max-width: 560px; position: relative; }
.hd-search input { width: 100%; padding: 13px 16px; border: 1px solid #cbd5e1; border-radius: 12px; font-size: 1rem; font-family: inherit; background: #fff; }
.hd-search-results { margin-top: 8px; display: grid; gap: 6px; }
.hd-search-results a { display: block; background: #fff; border: 1px solid var(--hd-line); border-radius: 10px; padding: 10px 14px; text-decoration: none; }
.hd-search-results small { display: block; color: var(--hd-soft); }
.hd-article { max-width: 780px; margin: 0 auto; padding: 40px 20px 20px; }
.hd-article h1 { font-size: clamp(1.8rem, 3.6vw, 2.5rem); line-height: 1.12; letter-spacing: -0.02em; color: var(--hd-ink); margin: 8px 0 12px; }
.hd-article h2 { font-size: 1.25rem; color: var(--hd-ink); margin: 32px 0 10px; }
.hd-article p, .hd-article li { color: var(--hd-text); }
.hd-article .hd-lead { font-size: 1.08rem; color: var(--hd-muted); }
.hd-article table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: 0.92rem; background: #fff; }
.hd-article th, .hd-article td { border: 1px solid var(--hd-line); padding: 8px 10px; text-align: left; vertical-align: top; }
.hd-article th { background: #f1f5f9; }
.hd-crumbs { font-size: 0.85rem; color: var(--hd-soft); }
.hd-crumbs a { color: var(--hd-soft); }
.hd-note { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 12px; padding: 14px 16px; margin: 18px 0; }
.sec-manchas { --hd-sec: var(--hd-manchas); }
.sec-jardin { --hd-sec: var(--hd-jardin); }
.sec-gallinas { --hd-sec: var(--hd-gallinas); }
.sec-piscinas { --hd-sec: var(--hd-piscinas); }
@media (max-width: 900px) { .hd-hero-sections { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hd-about { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .hd-hero-sections, .hd-grid { grid-template-columns: 1fr; } .hd-hero { padding: 36px 0 28px; } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ── Ajustes comunes a las secciones ──────────────────────────────
   FAQ con <button>: en los artículos no se carga el JS de la sección, así que
   las respuestas se muestran siempre y la pregunta funciona como un título. */
.faq-item > button.faq-question { width: 100%; background: none; border: 0; font: inherit; color: inherit; text-align: left; cursor: default; }
.faq-item > button.faq-question > span { display: none; }
.faq-item > button.faq-question::after { content: none; }
.faq-item > .faq-answer { display: block !important; }
/* Lateral: separación entre tarjetas y listas sin viñetas */
.content-side > * + * { margin-top: 16px; }
.side-list { list-style: none; margin: 0; padding: 0; }
.byline { margin: 10px 0 0; font-size: 0.88rem; color: #64748b; }
.byline a { font-weight: 600; }
.related { margin-top: 32px; padding-top: 16px; border-top: 1px solid #e2e8f0; }
/* Enlaces dentro del texto: siempre visibles (algunas hojas de sección los dejan sin color ni subrayado) */
.entry-body a:not(.button), .legal-card p a:not(.button), .legal-card li a:not(.button),
.faq-answer a:not(.button), .related a:not(.button), .content-main p a:not(.button), .content-main li a:not(.button) {
  color: #1d4ed8; text-decoration: underline; text-underline-offset: 2px;
}
/* Listas del texto con sangría (algunas hojas de sección ponen padding 0 a ul/ol) */
.entry-body ul:not([class]), .entry-body ol:not([class]), .content-main ul:not([class]), .content-main ol:not([class]),
.legal-card ul:not([class]), .legal-card ol:not([class]) { padding-left: 1.4em; margin: 0.6em 0 1em; }
.entry-body ul:not([class]), .content-main ul:not([class]), .legal-card ul:not([class]) { list-style: disc; }
.entry-body ol:not([class]), .content-main ol:not([class]), .legal-card ol:not([class]) { list-style: decimal; }
