/* centros-dialisis.es — páginas de CCAA, provincias y ciudades */
:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --text: #0f1d2e;
  --muted: #5b6b82;
  --border: #e4eaf2;
  --accent: #0b6bcb;
  --accent-dark: #064e95;
  --accent-light: #1a7fd8;
  --red: #d9342b;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Topbar */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--accent); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; width: 32px; height: auto; }
.brand h1, .brand .brand-name { font-size: 16px; font-weight: 700; margin: 0; color: var(--text); letter-spacing: -0.01em; }
.brand .subtitle { font-size: 12px; margin: 2px 0 0; color: var(--muted); font-weight: 500; }
.topnav a {
  display: inline-block;
  padding: 8px 14px;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
}
.topnav a:hover { background: var(--accent-dark); text-decoration: none; }

/* Main */
.region-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}
.breadcrumb span { margin: 0 6px; }

.page-title {
  font-size: clamp(26px, 4vw, 36px);
  font-weight: 700;
  margin: 0 0 12px;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.lead {
  font-size: 18px;
  color: var(--muted);
  margin: 0 0 32px;
  max-width: 720px;
}

.intro {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 32px;
}
.intro p { margin: 0 0 12px; }
.intro p:last-child { margin-bottom: 0; }

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 40px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
}
.stat-card strong {
  display: block;
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.stat-card span {
  font-size: 13px;
  color: var(--muted);
}

/* Content blocks */
.content-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 24px;
}
.content-block h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
  color: var(--text);
}
.content-block h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 20px 0 10px;
  color: var(--accent-dark);
}
.content-block p { margin: 0 0 12px; }
.content-block p:last-child { margin-bottom: 0; }

.types-list, .depts-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}
.types-list li, .depts-list li {
  padding: 8px 12px;
  background: #f0f6fd;
  border-radius: 6px;
  font-size: 14px;
}

.hint { font-size: 13px; color: var(--muted); font-style: normal; }

/* Centers */
.dept-block {
  margin-bottom: 24px;
}
.region-block-op {
  margin-bottom: 28px;
  padding-top: 8px;
}
.region-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--accent-dark);
  margin: 0 0 12px 0;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--border);
}
.centers-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.centers-list li {
  padding: 14px 16px;
  background: #fafbfe;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.5;
}
.centers-list li strong {
  font-size: 15px;
  color: var(--text);
}
.badge {
  display: inline-block;
  background: #e6f0fb;
  color: var(--accent-dark);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  margin-right: 4px;
  margin-top: 4px;
}

/* FAQ */
#faq details {
  background: #fafbfe;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  margin-bottom: 10px;
}
#faq summary {
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  list-style: none;
}
#faq summary::-webkit-details-marker { display: none; }
#faq summary::before {
  content: "+";
  display: inline-block;
  width: 20px;
  color: var(--accent);
  font-weight: 700;
}
#faq details[open] summary::before { content: "−"; }
#faq details > div {
  padding-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

/* Related */
.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px;
}
.related-list li {
  padding: 10px 14px;
  background: #f0f6fd;
  border-radius: 6px;
  font-size: 14px;
}

/* CTA */
.cta {
  background: linear-gradient(135deg, #0b6bcb 0%, #064e95 100%);
  color: #fff;
  text-align: center;
  border: none;
}
.cta h2, .cta p { color: #fff; }
.cta .btn {
  display: inline-block;
  background: #fff;
  color: var(--accent-dark);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  margin-top: 8px;
  font-size: 15px;
}
.cta .btn:hover {
  background: #f0f6fd;
  text-decoration: none;
}

/* Footer */
.site-footer {
  max-width: 920px;
  margin: 0 auto;
  padding: 24px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}
.site-footer p { margin: 0 0 6px; }

/* Responsive */
@media (max-width: 600px) {
  .region-page { padding: 20px 16px 48px; }
  .content-block { padding: 18px 18px; }
  .types-list, .depts-list, .related-list { grid-template-columns: 1fr; }
  .brand h1, .brand .brand-name { font-size: 14px; }
  .brand .subtitle { font-size: 11px; }
}

/* Type chips (region → type page) */
.type-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.type-chip {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: transform 0.1s ease, box-shadow 0.15s ease;
  border: 1px solid transparent;
}
.type-chip-hemo {
  background: #ffe5e2;
  color: #b5271f;
  border-color: #f5c3be;
}
.type-chip-hemo:hover { background: #fdd1cc; transform: translateY(-1px); text-decoration: none; }
.type-chip-auto {
  background: #e0f1ff;
  color: var(--accent-dark);
  border-color: #b5dbfb;
}
.type-chip-auto:hover { background: #cce5fc; transform: translateY(-1px); text-decoration: none; }

/* City list on region pages */
.city-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.city-list li {
  padding: 0;
}
.city-list li a {
  display: block;
  padding: 12px 16px;
  background: #f3f8fe;
  border: 1px solid #d9e7f5;
  border-radius: 8px;
  text-decoration: none;
  color: var(--accent-dark);
  font-weight: 500;
  transition: background 0.15s ease, transform 0.1s ease;
}
.city-list li a:hover {
  background: #e0ebf7;
  transform: translateY(-1px);
  text-decoration: none;
}

/* City-specific tweaks on /dialyse-ville-*/  */
.region-page .muted-note {
  font-style: normal;
  color: #6b7d91;
  font-size: 14px;
  margin: 0 0 12px;
}
.region-page .type-chips {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.region-page .dept-link {
  margin: 6px 0 0;
  font-size: 13px;
}
.region-page .dept-link a {
  color: var(--accent);
  text-decoration: none;
}
.region-page .dept-link a:hover { text-decoration: underline; }

/* Cities hub on homepage */
.cities-hub {
  background: #f8fafc;
  border-top: 1px solid #e1e9f2;
}

/* ==========================================================
   Blog / guides éditoriaux
   ========================================================== */

/* Hub /guides-dialyse/ */
.guide-hub .cat-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--accent-dark);
  margin: 32px 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}

.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 12px;
}

.guide-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.18s ease;
}
.guide-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.08);
  transform: translateY(-2px);
}
.guide-card-cat {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}
.guide-card h3 {
  font-size: 17px;
  margin: 0 0 10px 0;
  line-height: 1.35;
  color: var(--text);
}
.guide-card p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 12px 0;
  flex-grow: 1;
}
.guide-card-meta {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

/* Article /guides-dialyse/[slug]/ */
.guide-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 12px 0 20px 0;
  font-size: 13px;
  color: var(--muted);
}
.guide-category {
  background: #e6f0fb;
  color: var(--accent-dark);
  padding: 3px 10px;
  border-radius: 12px;
  font-weight: 500;
}
.guide-reading, .guide-date {
  padding: 3px 0;
}

.guide-content {
  max-width: 780px;
}
.guide-content h2 {
  font-size: 22px;
  margin: 36px 0 14px 0;
  color: var(--accent-dark);
  line-height: 1.3;
}
.guide-content p {
  font-size: 16px;
  line-height: 1.7;
  margin: 0 0 16px 0;
  color: var(--text);
}
.guide-list {
  margin: 8px 0 20px 0;
  padding-left: 22px;
}
.guide-list li {
  font-size: 15.5px;
  line-height: 1.65;
  margin-bottom: 8px;
  color: var(--text);
}

/* Sources block */
.sources-block .sources-list {
  list-style: none;
  padding: 0;
  margin: 0 0 12px 0;
}
.sources-block .sources-list li {
  padding: 6px 0;
  font-size: 14px;
}
.sources-block .sources-list a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
}
.sources-block .sources-list a:hover {
  border-bottom-style: solid;
}

/* Guides hub on homepage */
.guides-hub {
  background: #fafbfe;
  border-top: 1px solid #e1e9f2;
}

/* ---------- Date de mise à jour des données (bandeau) ---------- */
.topbar-right { display: flex; align-items: center; gap: 14px; }
.data-update {
  margin: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
.data-update time { color: var(--text); font-weight: 600; }
.data-update .du-short { display: none; }
@media (max-width: 760px) {
  .data-update .du-long { display: none; }
  .data-update .du-short { display: inline; }
  .topbar-right { gap: 10px; }
}
@media (max-width: 600px) {
  .topbar-right { flex-direction: column-reverse; align-items: flex-end; gap: 3px; flex-shrink: 0; }
  .data-update { font-size: 10.5px; line-height: 1.2; }
  .topbar-right .filter-toggle, .topbar-right .topnav a { padding: 5px 10px; font-size: 13px; }
}

/* ---------- Pages légales et liens de pied de page ---------- */
.legal-links { margin-top: 10px !important; font-size: 13px; }
.legal-links a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.legal-updated { font-size: 13px; color: var(--muted); margin: -20px 0 24px; }
.legal-page .guide-content ul.guide-list { margin-top: 0; }

/* centros-dialisis.es : nombre del sitio sin corte */
.brand .brand-name { white-space: nowrap; }
@media (max-width: 480px) { .brand .subtitle { display: none; } }
.topnav .du-short { display: none; }
@media (max-width: 640px) { .topnav .du-long { display: none; } .topnav .du-short { display: inline; } }

/* ---- centros-dialisis.es : titularidad, fichas, cercanos ---- */
.badge-publico { background: #e6f0fb; color: #064e95; }
.badge-privado { background: #fdeee4; color: #9a3a06; }
.centers-list li a.center-link { color: var(--text); }
.centers-list li a.center-link:hover strong { color: var(--accent); text-decoration: underline; }
.sector-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; }
.sector-card { display: block; padding: 16px 18px; border-radius: 10px; border: 1px solid var(--border); background: #fafbfe; color: var(--text); }
.sector-card strong { display: block; font-size: 22px; }
.sector-card.publico strong { color: #0b6bcb; }
.sector-card.privado strong { color: #e8590c; }
.sector-card:hover { border-color: var(--accent); text-decoration: none; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0; font-size: 15px; }
.facts dt { color: var(--muted); font-weight: 500; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.center-layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.mini-map { height: 320px; border-radius: 10px; border: 1px solid var(--border); z-index: 0; }
.center-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.btn-outline { display: inline-block; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--accent); color: var(--accent); font-weight: 600; font-size: 14px; }
.btn-outline:hover { background: #e6f0fb; text-decoration: none; }
.nearby-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.nearby-list li { padding: 10px 14px; background: #fafbfe; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; }
.nearby-list .km { color: var(--muted); white-space: nowrap; }
@media (max-width: 760px) {
  .center-layout { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 2px; }
  .facts dd { margin-bottom: 8px; }
  .mini-map { height: 240px; }
}
.btn-primary { display: inline-block; padding: 10px 16px; border-radius: 8px; background: var(--accent); color: #fff; font-weight: 600; font-size: 14px; }
.btn-primary:hover { background: var(--accent-dark); text-decoration: none; }
.sector-card { text-decoration: none; }
