/* NearPlaza — hoja de estilos única del sitio público. Sin frameworks. */

:root {
  --brand: #0f766e;
  --brand-dark: #115e59;
  --text: #1f2937;
  --text-soft: #6b7280;
  --bg: #ffffff;
  --bg-soft: #f8fafc;
  --border: #e5e7eb;
  --radius: 10px;
  --max: 64rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #2dd4bf;
    --brand-dark: #5eead4;
    --text: #e5e7eb;
    --text-soft: #9ca3af;
    --bg: #0b1220;
    --bg-soft: #111827;
    --border: #1f2937;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; height: auto; display: block; }

main { max-width: var(--max); margin: 0 auto; padding: 1rem 1rem 3rem; }
h1 { font-size: clamp(1.5rem, 4vw, 2.25rem); line-height: 1.2; }

/* Cabecera */
.site-header {
  display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap;
  max-width: var(--max); margin: 0 auto; padding: 1rem;
  border-bottom: 1px solid var(--border);
}
.brand { font-weight: 800; font-size: 1.25rem; text-decoration: none; letter-spacing: -.02em; }
.tagline { color: var(--text-soft); font-size: .9rem; }

/* Home */
.search input {
  width: 100%; padding: .75rem 1rem; font-size: 1rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-soft); color: var(--text);
}
.cities { list-style: none; padding: 0; display: grid; gap: .5rem;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
.cities a {
  display: block; padding: .75rem 1rem; text-decoration: none; font-weight: 600;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-soft);
}
.cities a:hover { border-color: var(--brand); }

/* Listado de ciudad */
.count { color: var(--text-soft); }
.listing { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.listing-entry {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  background: var(--bg-soft);
}
.listing-entry img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.listing-entry h2 { font-size: 1.05rem; margin: .6rem .9rem .2rem; }
.listing-entry .meta { margin: 0 .9rem .8rem; color: var(--text-soft); font-size: .875rem; }
.listing-entry.tier-tier1, .listing-entry.tier-tier2 { border-color: var(--brand); }

/* Ficha de restaurante */
.breadcrumb { font-size: .9rem; }
.hero, .gallery img { border-radius: var(--radius); }
.gallery { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
.details { border-collapse: collapse; width: 100%; max-width: 40rem; }
.details th { text-align: left; padding: .5rem .75rem .5rem 0; color: var(--text-soft);
  font-weight: 600; white-space: nowrap; vertical-align: top; }
.details td { padding: .5rem 0; }
.details tr { border-bottom: 1px solid var(--border); }

/* Bloques de anuncio */
.ad { margin: 1rem 0; border-radius: var(--radius); overflow: hidden; }
.ad-adsense { min-height: 6rem; background: var(--bg-soft); border: 1px dashed var(--border); }
.ad-own { border: 1px solid var(--brand); padding: 1rem; }
.listing .ad { grid-column: 1 / -1; }

/* Formulario de reclamación */
form.claim { display: grid; gap: 1rem; max-width: 32rem; }
form.claim label { display: grid; gap: .3rem; font-weight: 600; font-size: .9rem; }
form.claim input, form.claim textarea {
  padding: .6rem .8rem; font-size: 1rem; font-family: inherit;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg-soft); color: var(--text);
}
form.claim textarea { min-height: 6rem; resize: vertical; }
form.claim button {
  padding: .75rem 1.25rem; font-size: 1rem; font-weight: 700; cursor: pointer;
  border: 0; border-radius: var(--radius); background: var(--brand); color: #fff;
}
form.claim button:hover { background: var(--brand-dark); }

/* Pie */
.site-footer {
  max-width: var(--max); margin: 0 auto; padding: 1rem;
  border-top: 1px solid var(--border); color: var(--text-soft); font-size: .85rem;
}

/* Paginación */
.pagination { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: 1.5rem; }
.pagination a, .pagination .pag-current {
  padding: .4rem .8rem; border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; background: var(--bg-soft);
}
.pagination .pag-current { font-weight: 700; border-color: var(--brand); }
.pagination .pag-gap { color: var(--text-soft); }

/* CTA de reclamación en listado + confirmación del formulario */
.claim-cta { margin: 0 .9rem .8rem; font-size: .85rem; }
.form-ok { padding: 1rem; border: 1px solid var(--brand); border-radius: var(--radius); font-weight: 600; }
