/* VisitRealdeCatorce.com — layout clonado de huastecapotosina.org
   (estructura: topbar aviso, header sticky blur con buscador, hero-grid
   redondeado 1.1fr/.45fr/.45fr, tarjetas con portada, footer blanco).
   Tokens: teal #0B7C72, teal-bright #2DD4BF, ámbar/terra #B45309,
   navy #0C1E1C, Sora + DM Sans. CSS plano para CWV. */

:root {
  --forest: #0B7C72;
  --forest-darker: #085E56;
  --forest-light: #f0fdfa;
  --forest-chip: #ccfbf1;
  --teal-bright: #2DD4BF;
  --terra: #B45309;
  --terra-light: #fffbeb;
  --navy: #0C1E1C;
  --navy-green: #1e3331;
  --text: #222222;
  --text-medium: #3f3f3f;
  --text-muted: #6a6a6a;
  --text-light: #929292;
  --border: #dddddd;
  --border-light: #ebebeb;
  --bg-soft: #f7f7f7;
  --white: #ffffff;
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
  --radius-btn: 0.5rem;
  --radius-card: 0.875rem;
  --radius-xl: 1.5rem;
  --radius-pill: 999px;
  --font-heading: 'Sora', system-ui, sans-serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.2; color: var(--text); }
a { color: var(--forest); text-decoration: none; }
a:hover { text-decoration: none; }
img, svg { max-width: 100%; display: block; }
.wrap { max-width: 1320px; margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 768px) { .wrap { padding: 0 2.5rem; } }

/* ---------- Topbar de aviso (como la del .org) ---------- */
.topbar {
  background: var(--navy);
  color: #d9f7f3;
  font-size: 0.8rem;
}
.topbar .wrap {
  display: flex; align-items: center; justify-content: center; gap: 0.9rem;
  min-height: 38px; flex-wrap: wrap; padding-top: 0.3rem; padding-bottom: 0.3rem;
}
.topbar b { font-weight: 700; letter-spacing: 0.06em; font-size: 0.72rem; text-transform: uppercase; }
.topbar a { color: var(--teal-bright); text-decoration: underline; font-weight: 500; }

/* ---------- Header sticky (estructura .org) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: 68px;
}
.wordmark {
  font-family: var(--font-heading);
  font-weight: 800; font-size: 1.06rem;
  letter-spacing: -0.02em; line-height: 1;
  color: var(--navy);
  white-space: nowrap;
}
.wordmark .wm-teal { color: var(--teal-bright); }
.wordmark .wm-dot { color: var(--forest); }

.site-nav { display: flex; align-items: center; gap: 1.1rem; }
.site-nav a {
  font-size: 0.82rem; font-weight: 600; color: var(--text);
  transition: color 0.15s ease; white-space: nowrap;
}
.site-nav a:hover { color: var(--terra); }
.site-nav a[aria-current="page"] { color: var(--forest); }
.btn-pill {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: var(--forest); color: #fff;
  padding: 0.55rem 1.15rem; border-radius: var(--radius-pill);
  font-size: 0.82rem; font-weight: 600;
  transition: background 0.15s ease;
}
.btn-pill:hover { background: var(--forest-darker); }

/* Buscador centrado (como el del .org) */
.search { position: relative; flex: 1; max-width: 420px; margin: 0 auto; }
.search form {
  display: flex; align-items: center; gap: 0.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 0.3rem 0.4rem 0.3rem 1rem;
  background: #fff;
}
.search input {
  border: 0; outline: 0; flex: 1; min-width: 0;
  font-family: var(--font-sans); font-size: 0.9rem; color: var(--text);
  background: transparent;
}
.search button {
  border: 0; cursor: pointer;
  background: var(--forest); color: #fff;
  font-family: var(--font-heading); font-weight: 600; font-size: 0.82rem;
  padding: 0.42rem 1rem; border-radius: var(--radius-pill);
}
.search button:hover { background: var(--forest-darker); }
.search-drop {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
  overflow: hidden; display: none; z-index: 200;
}
.search-drop.open { display: block; }
.search-drop a {
  display: flex; justify-content: space-between; gap: 0.8rem;
  padding: 0.65rem 1rem; font-size: 0.88rem; color: var(--text);
  border-bottom: 1px solid var(--border-light);
}
.search-drop a:last-child { border-bottom: 0; }
.search-drop a:hover { background: var(--forest-light); }
.search-drop a small { color: var(--text-light); white-space: nowrap; }

@media (max-width: 1080px) {
  .site-nav a:not(.btn-pill) { display: none; }
  .search { max-width: none; }
}
@media (max-width: 640px) {
  .search form { padding-left: 0.7rem; }
  .search button { padding: 0.4rem 0.75rem; }
}

/* ---------- Hero grid (composición .org: 1.1fr .45fr .45fr) ---------- */
.hero-grid-wrap { padding-top: 1.5rem; padding-bottom: 1rem; }
@media (min-width: 768px) { .hero-grid-wrap { padding-top: 2rem; } }
.hero-grid {
  display: grid; gap: 0.6rem;
  grid-template-columns: 1fr;
  border-radius: var(--radius-xl); overflow: hidden;
}
@media (min-width: 768px) {
  .hero-grid {
    grid-template-columns: 1.1fr 0.45fr 0.45fr;
    grid-template-rows: 260px 260px;
  }
}
.hero-cell {
  position: relative; overflow: hidden;
  min-height: 420px;
}
@media (min-width: 768px) {
  .hero-cell { min-height: 0; }
  .hero-cell.main { grid-row: span 2; }
  .hero-cell.side { min-height: 260px; }
}
.hero-cell > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-cell .veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.55));
}
.hero-cell .hero-copy {
  position: absolute; left: 0; bottom: 0;
  padding: 2rem;
}
@media (min-width: 768px) { .hero-cell .hero-copy { padding: 3rem 3rem 3.5rem; } }
.hero-cell .kicker-w, .post-head .kicker-w {
  font-size: 0.7rem; font-weight: 600; color: rgba(255,255,255,0.7);
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 0.7rem;
}
.hero-cell h1 {
  font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 600;
  color: #fff; letter-spacing: -0.02em; line-height: 1.1;
}
.hero-cell .sub {
  font-size: 0.9rem; color: rgba(255,255,255,0.8);
  margin-top: 1rem; max-width: 420px; line-height: 1.55;
}
.hero-cell .hero-cta { margin-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn-hero {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: var(--radius-pill);
  font-size: 0.875rem; font-weight: 600; color: #fff;
}
.btn-hero.filled { background: var(--forest-darker); }
.btn-hero.filled:hover { background: #064b44; }
.btn-hero.ghost { background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.4); backdrop-filter: blur(4px); }
.btn-hero.ghost:hover { background: rgba(255,255,255,0.25); }

/* Hero simple de páginas internas (una sola celda con portada) */
.hero-page { padding-top: 1.5rem; }

/* ---------- Secciones ---------- */
.section { padding: 3.5rem 0; }
.section.soft { background: var(--bg-soft); }
.section-head { max-width: 680px; margin-bottom: 2.2rem; }
.kicker {
  color: var(--terra); font-weight: 700; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: 0.6rem;
}
.section-head h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: 0.7rem; }
.section-head p { color: var(--text-muted); font-size: 1rem; }

/* ---------- Grid de tarjetas con portada ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: box-shadow 0.15s ease;
}
.card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.card .cover { position: relative; aspect-ratio: 16 / 9; background: var(--bg-soft); }
.card .cover svg { width: 100%; height: 100%; position: absolute; inset: 0; }
.card .card-body { padding: 1.2rem 1.4rem 1.3rem; display: flex; flex-direction: column; gap: 0.55rem; flex: 1; }
.card h3 { font-size: 1.08rem; }
.card h3 a { color: var(--text); }
.card h3 a:hover { color: var(--forest); }
.card .card-body > p { color: var(--text-muted); font-size: 0.93rem; }
.card .tag {
  align-self: flex-start;
  background: var(--forest-chip); color: var(--forest-darker);
  border-radius: var(--radius-pill);
  font-size: 0.72rem; font-weight: 700;
  padding: 0.22rem 0.7rem; letter-spacing: 0.02em;
}
.card .tag.amber { background: var(--terra-light); color: var(--terra); }

/* ---------- Fichas de directorio ---------- */
.meta-row {
  display: flex; flex-wrap: wrap; gap: 0.4rem 1rem;
  font-size: 0.85rem; color: var(--text-muted);
  margin-top: auto; padding-top: 0.4rem;
}
.meta-row a { color: var(--forest); font-weight: 500; }
.rating-chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-family: var(--font-heading); font-weight: 700; font-size: 0.9rem;
  color: var(--forest-darker);
}
.rating-chip small { font-weight: 400; color: var(--text-muted); font-size: 0.78rem; font-family: var(--font-sans); }
.dir-note {
  max-width: 760px; background: var(--bg-soft);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  padding: 1rem 1.3rem; margin-top: 2.2rem;
  color: var(--text-muted); font-size: 0.9rem;
}

/* ---------- Bloques de contenido / posts ---------- */
.prose, .post-body { max-width: 720px; }
.prose p, .post-body p { margin-bottom: 1.15rem; color: var(--text-medium); font-size: 1.02rem; }
.prose h2, .post-body h2 { font-size: 1.4rem; margin: 2rem 0 0.8rem; }
.prose ul, .post-body ul { margin: 0 0 1.2rem 1.2rem; color: var(--text-medium); }
.prose li, .post-body li { margin-bottom: 0.5rem; }
.prose strong, .post-body strong { color: var(--text); }
.post-meta { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 2rem; }
.blog-grid .card h3 { font-size: 1.02rem; }
.blog-grid .card p { font-size: 0.9rem; }

/* Encabezado de post con portada ancha */
.post-head {
  border-radius: var(--radius-xl); overflow: hidden;
  position: relative; min-height: 300px; margin-bottom: 2.5rem;
}
.post-head > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.post-head .veil { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.55)); }
.post-head .hero-copy { position: absolute; left: 0; bottom: 0; padding: 2.2rem; }
.post-head h1 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); font-weight: 600; color: #fff; letter-spacing: -0.02em; max-width: 720px; }

.info-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin-top: 2.5rem;
}
.info-strip .fact {
  background: var(--forest-light);
  border: 1px solid var(--forest-chip);
  border-radius: var(--radius-card);
  padding: 1.1rem 1.3rem;
}
.info-strip .fact b { display: block; font-family: var(--font-heading); font-size: 1.25rem; color: var(--forest-darker); }
.info-strip .fact span { color: var(--text-muted); font-size: 0.88rem; }

.cta-banner {
  background: var(--navy);
  border-radius: var(--radius-xl);
  color: #fff;
  padding: 2.6rem;
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 1.4rem;
}
.cta-banner h2 { color: #fff; font-size: 1.45rem; margin-bottom: 0.4rem; }
.cta-banner p { color: #b9cdc9; font-size: 0.97rem; max-width: 520px; }

.faq { max-width: 760px; }
.faq details {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-card);
  margin-bottom: 0.9rem;
  padding: 1.1rem 1.4rem;
}
.faq details[open] { border-color: var(--forest-chip); box-shadow: var(--shadow-card); }
.faq summary { font-family: var(--font-heading); font-weight: 600; cursor: pointer; color: var(--text); }
.faq details p { margin-top: 0.7rem; color: var(--text-muted); font-size: 0.97rem; }

.respeto {
  background: var(--terra-light);
  border: 1px solid #fde68a;
  border-radius: var(--radius-card);
  padding: 1.4rem 1.6rem;
  margin: 2rem 0;
}
.respeto b { color: var(--terra); }

/* ---------- Footer blanco (estructura .org) ---------- */
.site-footer {
  background: #fff;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 3.5rem 0 2rem;
  font-size: 0.88rem;
  margin-top: 2rem;
}
.site-footer .cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.2rem;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 1.6rem;
}
@media (max-width: 768px) { .site-footer .cols { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--text); font-size: 0.92rem; margin-bottom: 0.8rem; }
.site-footer a { color: var(--text-medium); }
.site-footer a:hover { color: var(--forest); }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer .desc { color: var(--text-muted); font-size: 0.85rem; line-height: 1.6; }
.entity-block {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem;
  align-items: center; justify-content: space-between;
  font-size: 0.82rem; color: var(--text-light);
}
.entity-block a { color: var(--text-medium); font-weight: 500; }
.fuente-note { font-size: 0.78rem; color: var(--text-light); margin-top: 0.8rem; }
