/* DeMiZona — hoja de estilo del portal público.
   Sin dependencias externas: no se cargan fuentes, iconos ni scripts de terceros. */

:root {
  --forest: #075638;
  --forest-deep: #043f28;
  --forest-soft: #e6f3e8;
  --leaf: #4f9a44;
  --leaf-soft: #eef7ea;
  --sand: #f7f5ef;
  --paper: #fdfcf8;
  --card: #ffffff;
  --ink: #142d25;
  --ink-soft: #46584f;
  --muted: #6b7b72;
  --line: #e2e6df;
  --line-strong: #cfd8ce;
  --warn-bg: #fdf4e3;
  --warn-line: #ecd9b2;
  --warn-ink: #6b4a12;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(20, 45, 37, .06), 0 2px 8px rgba(20, 45, 37, .04);
  --shadow: 0 12px 32px rgba(20, 45, 37, .09);
  --max: 1180px;
  --font: "Segoe UI", "Helvetica Neue", Arial, "Liberation Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--forest-deep); }
h1, h2, h3, h4 { margin: 0; line-height: 1.16; letter-spacing: -0.022em; font-weight: 800; color: var(--ink); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:where(a, button, input, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--leaf);
  outline-offset: 2px;
  border-radius: 8px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--forest);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  transition: top .18s ease;
}
.skip-link:focus { top: 12px; color: #fff; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }

/* — Cabecera — */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(253, 252, 248, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(140%) blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 68px;
}
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); flex: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-name { font-size: 20px; font-weight: 800; letter-spacing: -0.03em; }
.brand-name em { font-style: normal; color: var(--forest); }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  display: inline-block;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 650;
  color: var(--ink-soft);
  text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { background: var(--forest-soft); color: var(--forest-deep); }

.header-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.label-corto { display: none; }

.btn {
  --btn-bg: var(--forest);
  --btn-ink: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.btn:hover { background: var(--forest-deep); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--ghost { --btn-bg: transparent; --btn-ink: var(--forest); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--forest-soft); color: var(--forest-deep); border-color: var(--forest-soft); }
.btn--light { --btn-bg: #fff; --btn-ink: var(--forest-deep); border-color: var(--line); }
.btn--light:hover { background: var(--forest-soft); color: var(--forest-deep); }
.btn--accent { --btn-bg: var(--leaf-soft); --btn-ink: var(--forest-deep); border-color: #cfe5c6; }
.btn--accent:hover { background: #e2f1d9; color: var(--forest-deep); }
.btn--sm { min-height: 38px; padding: 8px 15px; font-size: 14px; }
.btn[aria-disabled="true"] { opacity: .62; cursor: not-allowed; transform: none; box-shadow: none; }

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.menu-toggle svg { width: 22px; height: 22px; }
.menu-toggle .icon-close { display: none; }
.site-header[data-open="true"] .menu-toggle .icon-close { display: block; }
.site-header[data-open="true"] .menu-toggle .icon-menu { display: none; }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--paper);
}
.mobile-nav[data-open="true"] { display: block; }
.mobile-nav ul { padding: 10px 0 16px; }
.mobile-nav a {
  display: block;
  padding: 12px 4px;
  border-bottom: 1px solid var(--line);
  font-weight: 650;
  color: var(--ink);
  text-decoration: none;
}
.mobile-nav .btn { width: 100%; margin-top: 14px; }

/* — Estructura de secciones — */
.section { padding: clamp(46px, 7vw, 84px) 0; }
.section--tight { padding: clamp(34px, 5vw, 56px) 0; }
.section--paper { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: clamp(18px, 3vw, 30px); flex-wrap: wrap; }
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--forest);
  margin-bottom: 10px;
}
.section-kicker::before { content: ""; width: 22px; height: 2px; background: var(--leaf); border-radius: 2px; }
.section-head h2 { font-size: clamp(23px, 3.1vw, 34px); max-width: 30ch; }
.section-head p { color: var(--ink-soft); margin-top: 10px; max-width: 56ch; }
.section-link { font-size: 14.5px; font-weight: 750; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; padding-bottom: 4px; }
.section-link:hover { text-decoration: underline; }

/* — Portada — */
.hero { padding: clamp(26px, 4.5vw, 54px) 0 clamp(10px, 2vw, 20px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); gap: clamp(24px, 4vw, 52px); align-items: center; }
.hero-copy h1 { font-size: clamp(32px, 4.9vw, 60px); letter-spacing: -0.035em; }
.hero-copy h1 span { color: var(--forest); }
.hero-lead { margin-top: 16px; font-size: clamp(16px, 1.4vw, 18.5px); color: var(--ink-soft); max-width: 46ch; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px 7px 8px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
  box-shadow: var(--shadow-sm);
}
.hero-badge span {
  background: var(--leaf-soft);
  color: var(--forest-deep);
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-note { margin-top: 14px; font-size: 13px; color: var(--muted); display: flex; gap: 7px; align-items: flex-start; }
.hero-note svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--forest); }

.search {
  margin-top: 26px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
}
.search-row { display: flex; gap: 8px; }
.search-field { position: relative; flex: 1 1 auto; min-width: 0; }
.search-field svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: var(--muted); pointer-events: none; }
.search-field input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px 12px 42px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  font: inherit;
  font-size: 15px;
  color: var(--ink);
}
.search-field input::placeholder { color: var(--muted); }
.search-field input:focus { border-color: var(--forest); background: #fff; outline: none; }
.search .btn { flex: none; }
.search-hint { margin: 10px 2px 2px; font-size: 12.5px; color: var(--muted); }
.search-hint strong { color: var(--ink-soft); font-weight: 700; }

.hero-art { position: relative; }
.hero-art-frame {
  position: relative;
  border-radius: clamp(20px, 3vw, 30px);
  overflow: hidden;
  background: linear-gradient(165deg, #eaf5e6 0%, #dfeee0 55%, #f5f1e4 100%);
  border: 1px solid #dce9d7;
  box-shadow: var(--shadow);
}
@media (max-width: 520px) {
  .hero-art-caption { position: static; padding: 10px 12px 12px; background: #fff; border-top: 1px solid var(--line); }
  .hero-art-frame { background: #fff; }
}

.hero-art-caption {
  position: absolute;
  left: 14px;
  bottom: 14px;
  right: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .93);
  border: 1px solid rgba(7, 86, 56, .1);
  font-size: 12px;
  font-weight: 700;
  color: var(--forest-deep);
}
.chip svg { width: 14px; height: 14px; }

/* — Aviso de estado real — */
.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--warn-line);
  background: var(--warn-bg);
  color: var(--warn-ink);
  font-size: 14px;
}
.notice svg { width: 19px; height: 19px; flex: none; margin-top: 2px; }
.notice strong { display: block; color: #57380a; }
.notice a { color: #57380a; }

/* — Rejillas y tarjetas — */
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
}
a.card { transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
a.card:hover { border-color: #bcd6be; transform: translateY(-2px); box-shadow: var(--shadow); color: inherit; }
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--forest-soft);
  color: var(--forest);
  margin-bottom: 6px;
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 16px; letter-spacing: -0.01em; }
.card p { font-size: 13.5px; color: var(--muted); }
.card-meta { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); }
.card-arrow { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--forest); }
.card-arrow svg { width: 15px; height: 15px; }

.biz-card { padding: 0; overflow: hidden; }
.biz-thumb {
  aspect-ratio: 16 / 9;
  background: var(--leaf-soft) center / cover no-repeat;
  display: grid;
  place-items: center;
  color: var(--forest);
}
.biz-thumb svg { width: 40px; height: 40px; opacity: .55; }
.biz-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.biz-body h3 { font-size: 16.5px; }
.biz-body .card-meta { gap: 6px 10px; }
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--leaf-soft);
  color: var(--forest-deep);
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: .01em;
}
.tag--neutral { background: #f1f2ee; color: var(--ink-soft); }

.skeleton-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  min-height: 158px;
  overflow: hidden;
  position: relative;
}
.skeleton-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(7, 86, 56, .06), transparent);
  animation: shimmer 1.5s infinite;
}
.skeleton-bar { height: 11px; border-radius: 6px; background: #eef1ec; margin-bottom: 10px; }
.skeleton-bar.w-40 { width: 40%; }
.skeleton-bar.w-70 { width: 70%; }
.skeleton-bar.w-90 { width: 90%; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.state {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 40px);
  text-align: center;
  background: var(--card);
  display: grid;
  gap: 8px;
  justify-items: center;
}
.state-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--forest-soft);
  color: var(--forest);
  margin-bottom: 4px;
}
.state-icon svg { width: 26px; height: 26px; }
.state h3 { font-size: 17px; }
.state p { color: var(--muted); font-size: 14px; max-width: 52ch; }
.state-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 8px; }
.state[data-tone="error"] .state-icon { background: var(--warn-bg); color: var(--warn-ink); }

/* — Pasos — */
.steps { counter-reset: step; display: grid; gap: 12px; }
.step { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.step-num {
  counter-increment: step;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--forest);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}
.step-num::before { content: counter(step); }
.step h3 { font-size: 15.5px; margin-bottom: 3px; }
.step p { font-size: 13.5px; color: var(--muted); }

/* — Descubrir por localidad — */
.localidades { display: flex; flex-wrap: wrap; gap: 10px; }
.localidad {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.localidad:hover { border-color: #bcd6be; background: var(--leaf-soft); color: var(--forest-deep); }
.localidad svg { width: 16px; height: 16px; color: var(--forest); }
.localidad span { color: var(--muted); font-weight: 600; }

/* — Para negocios — */
.business-cta {
  background: linear-gradient(150deg, #075638 0%, #0a6340 55%, #0d7346 100%);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(26px, 4.5vw, 52px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(22px, 4vw, 48px);
  align-items: center;
}
.business-cta h2 { color: #fff; font-size: clamp(24px, 3.2vw, 36px); }
.business-cta p { color: #d9ecdd; margin-top: 12px; max-width: 46ch; }
.business-cta .btn--light { --btn-ink: var(--forest-deep); }
.business-cta ul { display: grid; gap: 10px; margin-top: 18px; }
.business-cta li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; color: #eaf6ec; }
.business-cta li svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: #b9e6ae; }
.cta-panel { background: rgba(255, 255, 255, .09); border: 1px solid rgba(255, 255, 255, .18); border-radius: var(--radius); padding: 20px; }
.cta-panel h3 { color: #fff; font-size: 15.5px; }
.cta-panel p { font-size: 13.5px; color: #d9ecdd; margin-top: 6px; }
.cta-panel .btn { width: 100%; margin-top: 14px; }
.cta-panel small { display: block; margin-top: 10px; color: #c2e2c9; font-size: 12px; }

/* — Llamada final — */
.final-cta { text-align: center; display: grid; justify-items: center; gap: 14px; padding: clamp(28px, 5vw, 56px) clamp(18px, 4vw, 44px); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.final-cta h2 { font-size: clamp(24px, 3.4vw, 38px); max-width: 24ch; }
.final-cta p { color: var(--ink-soft); max-width: 52ch; }
.final-cta .hero-actions { justify-content: center; margin-top: 4px; }

/* — Pie de página — */
.site-footer { background: var(--paper); border-top: 1px solid var(--line); padding: clamp(34px, 5vw, 56px) 0 26px; margin-top: clamp(20px, 4vw, 40px); }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.footer-brand p { color: var(--muted); font-size: 14px; margin-top: 12px; max-width: 34ch; }
.footer-col h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .11em; color: var(--muted); margin-bottom: 12px; }
.footer-col li + li { margin-top: 8px; }
.footer-col a { color: var(--ink-soft); text-decoration: none; font-size: 14px; }
.footer-col a:hover { color: var(--forest); text-decoration: underline; }
.footer-bottom {
  margin-top: clamp(24px, 4vw, 40px);
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}
.footer-credit strong { color: var(--forest); font-weight: 800; }

/* — Páginas internas — */
.page-hero { padding: clamp(28px, 4vw, 48px) 0 clamp(16px, 2vw, 24px); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--ink-soft); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb svg { width: 13px; height: 13px; }
.page-hero h1 { font-size: clamp(27px, 4vw, 44px); }
.page-hero .lead { margin-top: 12px; color: var(--ink-soft); max-width: 62ch; }

.detail-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(18px, 3vw, 32px); align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 26px); }
.panel + .panel { margin-top: 16px; }
.panel h2 { font-size: 18px; margin-bottom: 12px; }
.detail-list { display: grid; gap: 12px; }
.detail-list div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; font-size: 14.5px; }
.detail-list dt { color: var(--muted); font-weight: 650; }
.detail-list dd { margin: 0; color: var(--ink); font-weight: 600; }
.prose { color: var(--ink-soft); font-size: 15px; }
.prose p + p { margin-top: 12px; }
.prose h2 { margin: 26px 0 10px; font-size: 19px; color: var(--ink); }
.prose ul { list-style: disc; padding-left: 20px; display: grid; gap: 6px; }
.legal-note { border-left: 3px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-ink); padding: 12px 14px; border-radius: 8px; font-size: 13.5px; margin-bottom: 20px; }

@media (max-width: 1040px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-art { order: -1; }
  .business-cta { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .site-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-actions .btn--ghost { display: none; }
  .header-actions { margin-left: auto; }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  .grid-3, .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .hero-copy h1 { font-size: clamp(30px, 8.6vw, 42px); }
  .search-row { flex-direction: column; }
  .search .btn { width: 100%; }
  .header-inner { min-height: 60px; gap: 8px; }
  .brand-name { font-size: 18px; }
  .brand svg { width: 30px; height: 30px; }
  .header-actions .btn { min-height: 40px; padding: 9px 14px; font-size: 13.5px; }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-list div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .section-head { align-items: flex-start; }
}

@media (max-width: 400px) {
  .header-actions .btn .label-largo { display: none; }
  .header-actions .btn .label-corto { display: inline; }
  .header-actions .btn { padding: 9px 14px; }
  .brand-name { font-size: 17px; }
  .brand svg { width: 28px; height: 28px; }
}

@media (max-width: 340px) {
  .header-actions .btn { padding: 9px 11px; }
  .header-actions .btn svg { display: none; }
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .localidades .localidad { width: 100%; justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

@media print {
  .site-header, .site-footer, .hero-art, .btn { display: none !important; }
  body { background: #fff; }
}
