/* Tema institucional del sitio de Morón. Se carga después de css/style.css y redefine sus variables y componentes:
   paleta rojo/grafito, Neo Sans / Neo Sans Ultra, cabecera grafito con filete rojo, héroe con foto y tarjetas
   rectas con borde superior rojo (misma línea visual que el sitio de presupuesto del Municipio). */

@font-face { font-family: "Neo Sans"; font-weight: 400; font-display: swap; src: url("../fonts/neo-sans-regular.woff2") format("woff2"); }
@font-face { font-family: "Neo Sans"; font-weight: 700; font-display: swap; src: url("../fonts/neo-sans-bold.woff2") format("woff2"); }
@font-face { font-family: "Neo Sans Ultra"; font-weight: 900; font-display: swap; src: url("../fonts/neo-sans-ultra.woff2") format("woff2"); }

:root {
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --red: #f01c24;
  --red-dark: #ce1520;
  --charcoal: #212121;
  --bg: #f5f5f5;
  --surface: #ffffff;
  --surface-2: #f1f1f1;
  --line: #e5e5e5;
  --line-strong: #d6d6d6;
  --text: #212121;
  --muted: #606060;
  --accent: #d71922;
  --accent-strong: #ce1520;
  --accent-soft: #fdeeee;
  --accent-grad: linear-gradient(135deg, #e11a22, #ce1520);
  --glow: transparent;
  --grid-dot: transparent;
  --bar: #212121;
  --shadow: none;
  --shadow-card: none;
  --radius: 5px;
  --radius-sm: 3px;
  --warm: #305480;
  /* gráficos y mapas */
  --c-main: #d71922; --c-soft: #f4b6b9; --c-alt: #7a7a7a; --c-warm: #305480; --c-borde-sel: #212121; --sin-dato: #e5e5e5;
  --r0: #fdeeee; --r1: #f9cfd0; --r2: #f4a3a5; --r3: #ec6f73; --r4: #d93a40; --r5: #a8121a;
}

body { background: var(--bg); color: var(--charcoal); font-family: var(--font); -webkit-font-smoothing: antialiased; }
body::before { display: none; }
h1, h2, h3 { font-family: "Neo Sans Ultra", "Neo Sans", sans-serif; font-weight: 900; letter-spacing: -0.025em; }
a { color: var(--red-dark); }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid #d71922; outline-offset: 3px; }

.app-main { margin: 0 auto; max-width: 1320px; padding: 40px 32px 64px; }

.eyebrow { color: #686868; display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .14em; line-height: 1.5; text-transform: uppercase; margin: 0; }
.eyebrow::before { display: none; }
.eyebrow.light { color: #ffffffd9; }

/* Cabecera ---------------------------------------------------------------- */
.municipal-header { background: var(--charcoal); border-bottom: 4px solid var(--red); color: #fff; }
.municipal-header-inner { align-items: center; display: flex; flex-wrap: wrap; gap: 38px; margin: auto; max-width: 1320px; min-height: 106px; padding: 15px 32px; }
.municipal-brand { align-items: center; color: #fff; display: flex; flex-shrink: 0; gap: 22px; text-decoration: none; }
.municipal-brand:hover { color: #fff; }
.municipal-brand img { height: 74px; object-fit: contain; width: 72px; }
.municipal-brand > span { border-left: 1px solid #555; font-size: 14px; line-height: 1.45; padding-left: 20px; }
.municipal-brand strong { font-size: 17px; }
.municipal-nav { align-items: center; display: flex; flex: 1 1; flex-wrap: wrap; gap: 25px; justify-content: flex-end; }
.municipal-nav a { background: transparent; border: 0; border-bottom: 2px solid transparent; color: #eee; font-size: 15px; font-weight: 700; padding: 13px 0; text-decoration: none; }
.municipal-nav a:hover { color: #ff8084; border-color: var(--red); }
html { scroll-padding-top: 16px; }
.col-res .live { top: 16px; }

/* Encabezado de página ---------------------------------------------------- */
.page-heading { border-bottom: 1px solid #ddd; margin: 0 0 8px; padding-bottom: 28px; }
.page-heading h1 { color: var(--red); font-size: clamp(38px, 4.4vw, 56px); line-height: 1.05; margin: 10px 0 12px; }
.page-heading p { color: var(--muted); font-size: 16px; line-height: 1.6; max-width: 760px; margin: 0; }

/* Héroe ------------------------------------------------------------------- */
.municipal-hero { background: linear-gradient(90deg, #0f1418cc, #0f14183d), url("../img/moron-city.jpg") center 52% / cover; color: #fff; min-height: 415px; position: relative; }
.hero-content { margin: auto; max-width: 1256px; padding: 64px 32px 62px; }
.hero-content h1 { color: #fff; font-size: clamp(42px, 4.7vw, 68px); line-height: 1.06; margin: 15px 0 20px; }
.hero-content p { color: #f4f4f4; font-size: 19px; line-height: 1.6; margin-bottom: 28px; max-width: 640px; }
.hero-button { align-items: center; display: inline-flex; gap: 34px; }
.hero-caption { bottom: 20px; color: #eee; font-size: 11px; letter-spacing: .02em; position: absolute; right: 32px; }
.hero-caption > span:first-child { color: var(--red); margin-right: 6px; }

/* Botones ----------------------------------------------------------------- */
.btn { align-items: center; border: 1px solid transparent; border-radius: 3px; cursor: pointer; display: inline-flex; font: inherit; font-size: 14px; font-weight: 700; gap: 10px; justify-content: center; padding: 12px 20px; text-decoration: none; transition: background .15s; }
.btn-primary { background: var(--red-dark); border-color: var(--red-dark); color: #fff; box-shadow: none; }
.btn-primary:hover { background: #b9131c; border-color: #b9131c; color: #fff; filter: none; }
button.ghost, button.png { border-radius: 3px; border-color: #cdcdcd; color: #383838; background: #fff; }
button.ghost:hover, button.png:hover { background: #f4f4f4; border-color: #777; color: #212121; }

/* Secciones ---------------------------------------------------------------- */
h2 { font-size: 34px; margin: 56px 0 18px; }
main > section[id] > h2 { color: var(--red); }
main > section[id] > h2::before { background: none; border: 0; border-radius: 0; color: #e0e0e0; font: 900 38px "Neo Sans Ultra", sans-serif; letter-spacing: 0; padding: 0; }
main > section[id] > h2::after { background: #d8d8d8; height: 2px; }
main > section:first-of-type > h2 { margin-top: 8px; }
h3 { font-family: "Neo Sans", "Neo Sans Ultra", sans-serif; font-weight: 700; color: #303030; font-size: 18px; letter-spacing: 0; }

/* Tarjetas ----------------------------------------------------------------- */
.card { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: 3px; box-shadow: none; padding: 26px 28px; }
.card.live { background-image: none; }
.card .sub, .hint, .muted { color: var(--muted); }
.prose { color: #3a3a3a; line-height: 1.7; }

/* Controles ----------------------------------------------------------------- */
select, input[type="number"], input[type="search"], input[type="text"] { background: #fff; border: 1px solid #d6d6d6; border-radius: 3px; min-height: 44px; }
select:focus, input:focus { border-color: var(--red); box-shadow: 0 0 0 3px #f01c240d; outline: none; }
.label, label.label { color: #3f3f3f; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.seg { border-radius: 3px; background: #ececec; border-color: #d6d6d6; }
.seg button { border-radius: 2px; }
.seg button[aria-pressed="true"] { background: var(--red-dark); box-shadow: none; color: #fff; }
input[type="range"], input[type="checkbox"], input[type="radio"] { accent-color: var(--red-dark); }
.checks label { font-weight: 500; }

/* Resultados ---------------------------------------------------------------- */
.kpi { background: #f7f7f7; border: 1px solid var(--line); border-radius: 3px; }
.kpi .k { color: #686868; letter-spacing: .06em; }
.kpi.main { background: var(--red-dark); border-color: var(--red-dark); box-shadow: none; }
.kpi:not(.main) .delta { background: #fdeeee; color: var(--red-dark); }
.delta { border-radius: 3px; }
.tag { background: #fdeeee; color: var(--red-dark); border-radius: 3px; }
.param .head .val, .param summary { color: var(--red-dark); }
.param .explain { background: #f7f7f7; border-radius: 3px; }
.pulso::before { background: #3b643b; }

/* Tablas -------------------------------------------------------------------- */
.tablewrap { border-radius: 3px; border-color: #e0e0e0; }
th { background: #f1f1f1; border-bottom: 2px solid #e0e0e0; color: #4a4a4a; letter-spacing: .06em; }
td { border-bottom-color: #eee; }
tbody tr:hover td { background: #fff9f9; }
.badge { border-radius: 3px; }
.badge.si { background: #edf3ec; color: #3b643b; }
.badge.no { background: #fdeeee; color: #8a1c1c; }
.badge.sd { background: #ececec; color: #666; }
.notice { border-radius: 3px; background: #f7efe1; border-color: #ecdcbc; color: #805d18; }
.notice.info { background: #f1f1f1; border-color: #e0e0e0; color: #424242; }

/* Gráficos y mapas ------------------------------------------------------------ */
#map, #mapaVivo { border-radius: 3px; background: #f1f1f1; }
.leaflet-container { background: #f1f1f1; }
.chip, .pills li { border-radius: 3px; background: #fff; }
.chip b, .pills li b { color: var(--red-dark); }
svg.chart .t { fill: #212121; }

/* Pie ----------------------------------------------------------------------- */
.municipal-footer { background: var(--charcoal); color: #fff; }
.municipal-footer > div { align-items: center; display: flex; flex-wrap: wrap; gap: 28px; margin: auto; max-width: 1320px; padding: 30px 32px; }
.municipal-footer img { height: 72px; object-fit: contain; width: 60px; }
.municipal-footer p { font-size: 15px; line-height: 1.8; margin: 0; }
.municipal-footer p span { color: #bbb; font-size: 12px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; margin-left: auto; }
.footer-links a { color: #fff; font-size: 13px; text-decoration: none; }
.footer-links a:hover { color: #ff8084; }

@media (max-width: 900px) {
  .municipal-header-inner { gap: 16px; min-height: 0; padding: 12px 16px; }
  .municipal-brand img { height: 52px; width: 50px; }
  .municipal-brand > span { font-size: 12px; }
  .municipal-brand strong { font-size: 14px; }
  .municipal-nav { gap: 6px 16px; justify-content: flex-start; }
  .municipal-nav a { font-size: 13.5px; padding: 6px 0; }
  html { scroll-padding-top: 16px; }
  .app-main { padding: 24px 16px 48px; }
  .hero-content { padding: 40px 16px; }
  .hero-caption { right: 16px; }
  h2 { font-size: 28px; }
}
