/* =========================================================
   cdvallesMX — hoja de estilos principal
   Identidad: ríos y cascadas de la Huasteca (turquesa/jungla),
   tono editorial de revista de ciudad, acentos cálidos locales.
   ========================================================= */

:root {
  /* Paleta */
  --ink: #16231d;            /* texto principal, negro-verdoso */
  --jungle: #1b4332;         /* superficie oscura principal */
  --jungle-2: #234737;
  --river: #1d9e75;          /* acento turquesa (cascadas/ríos) */
  --river-light: #5dcaa5;
  --sand: #f3ecda;           /* fondo claro cálido */
  --cream: #fffdf8;          /* tarjetas */
  --clay: #a64b2a;           /* acento cálido / CTA */
  --clay-dark: #7c381f;
  --gold: #e8a33d;           /* acento secundario */
  --line: #dcd3ba;           /* líneas divisorias sobre sand */

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Work Sans", -apple-system, sans-serif;
  --font-mono: "Space Mono", monospace;

  --radius: 14px;
  --wrap: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 .4em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .72rem;
  color: var(--river);
  display: inline-block;
  margin-bottom: .6em;
}

/* ---------- Header / navegación ---------- */

.site-header {
  background: var(--jungle);
  color: var(--sand);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--cream);
  letter-spacing: -.01em;
}
.logo span { color: var(--river-light); }

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: .92rem;
  font-weight: 500;
  color: var(--sand);
  opacity: .82;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: opacity .15s, border-color .15s;
}
.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
  border-color: var(--river-light);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--sand);
  font-size: 1.6rem;
  cursor: pointer;
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--jungle-2);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .nav-links.open { max-height: 400px; }
  .nav-links a {
    display: block;
    padding: 14px 24px;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
}

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(180deg, var(--jungle) 0%, var(--jungle-2) 100%);
  color: var(--cream);
  padding: 72px 0 110px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
}

.hero p.lead {
  font-size: 1.1rem;
  color: rgba(255,253,248,.82);
  max-width: 46ch;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 1.6em; }

/* Panel "clima rápido" en el hero, estilo tarjeta de datos */
.weather-chip {
  background: rgba(255,253,248,.08);
  border: 1px solid rgba(255,253,248,.18);
  border-radius: var(--radius);
  padding: 24px;
  font-family: var(--font-mono);
}
.weather-chip .temp { font-size: 2.6rem; color: var(--river-light); font-family: var(--font-display); }
.weather-chip .row { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid rgba(255,253,248,.12); font-size: .82rem; }
.weather-chip .row:first-of-type { border-top: none; }

/* ---------- Botones ---------- */

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .92rem;
  cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: var(--clay); color: var(--cream); }
.btn-primary:hover { background: var(--clay-dark); }
.btn-ghost { border-color: rgba(255,253,248,.4); color: var(--cream); }
.btn-ghost:hover { border-color: var(--cream); }

/* ---------- Divisor tipo río (elemento de firma visual) ---------- */

.river-divider {
  display: block;
  width: 100%;
  height: 48px;
  margin-top: -1px;
}

/* ---------- Secciones y tarjetas ---------- */

.section { padding: 64px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.section-head a.see-all { font-size: .88rem; font-weight: 600; color: var(--clay); border-bottom: 1px solid var(--clay); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}

.card {
  background: var(--cream);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card-media {
  height: 130px;
  background: linear-gradient(135deg, var(--river) 0%, var(--jungle) 100%);
  display: flex;
  align-items: flex-end;
  padding: 12px;
}

.card-media .tag {
  font-family: var(--font-mono);
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: rgba(22,35,29,.55);
  color: var(--cream);
  padding: 4px 10px;
  border-radius: 999px;
}

.card-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { margin-bottom: .3em; }
.card-body .meta { font-family: var(--font-mono); font-size: .74rem; color: var(--clay-dark); margin-bottom: .6em; }
.card-body p { color: #45514a; font-size: .92rem; margin-bottom: 0; flex: 1; }

/* Tono alterno para secciones sobre fondo distinto */
.section-alt { background: var(--cream); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Listas prácticas (noticias, directorio) ---------- */

.list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.list-row:first-child { border-top: 1px solid var(--line); }
.list-row .date {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--river);
  min-width: 90px;
}
.list-row .title { font-weight: 600; flex: 1; }
.list-row .cat {
  font-family: var(--font-mono);
  font-size: .7rem;
  text-transform: uppercase;
  color: var(--clay);
}

/* ---------- Filtros (directorio) ---------- */

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.filter-btn {
  font-family: var(--font-mono);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--cream);
  cursor: pointer;
}
.filter-btn.active { background: var(--jungle); color: var(--cream); border-color: var(--jungle); }

.search-input {
  width: 100%;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-family: var(--font-body);
  font-size: .95rem;
  margin-bottom: 24px;
  background: var(--cream);
}

/* ---------- Reseñas / comunidad ---------- */

.review {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.review .author { font-family: var(--font-mono); font-size: .74rem; color: var(--river); margin-top: 10px; display: block; }
.review p { font-family: var(--font-display); font-size: 1.05rem; color: var(--ink); margin-bottom: 0; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--jungle);
  color: rgba(255,253,248,.75);
  padding: 48px 0 28px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--cream); font-family: var(--font-body); font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; font-size: .9rem; }
.footer-bottom { border-top: 1px solid rgba(255,253,248,.15); padding-top: 20px; font-size: .8rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* ---------- Utilidades ---------- */

.page-hero {
  background: var(--jungle);
  color: var(--cream);
  padding: 56px 0;
}
.page-hero p { color: rgba(255,253,248,.8); max-width: 60ch; }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #6b7a71;
  font-family: var(--font-mono);
  font-size: .85rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
