/* ===========================================================================
   RENARE — hoja de estilos
   Paleta cívica: verde pino (renovación/territorio) + ámbar (esperanza)
   sobre fondo crema. Tipografía: Fraunces (títulos) + Inter (texto).
   =========================================================================== */

:root {
  --ink: #1f2421;
  --ink-soft: #4a524c;
  --pine: #1b4332;
  --pine-2: #2d6a4f;
  --leaf: #74c69d;
  --leaf-soft: #d8f0e2;
  --amber: #e9a23b;
  --amber-ink: #a86a10;
  --cream: #faf8f3;
  --sand: #f2ecdf;
  --paper: #ffffff;
  --line: #e6dfd0;
  --shadow: 0 1px 2px rgba(27,67,50,.05), 0 10px 30px -12px rgba(27,67,50,.18);
  --shadow-lg: 0 24px 60px -24px rgba(27,67,50,.35);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1140px;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.12; color: var(--pine); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1rem; }
a { color: var(--pine-2); text-decoration: none; }
a:hover { color: var(--amber-ink); }
img { max-width: 100%; display: block; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.container-narrow { max-width: 760px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--pine); color: #fff; padding: .6rem 1rem; z-index: 100; }
.skip:focus { left: 8px; top: 8px; }

/* ---- Botones ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: var(--pine); color: #fff; border: 2px solid var(--pine);
  padding: .7rem 1.3rem; border-radius: 999px; font-weight: 600; font-size: .98rem;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { background: var(--pine-2); border-color: var(--pine-2); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-lg { padding: .9rem 1.7rem; font-size: 1.05rem; }
.btn-sm { padding: .5rem 1.05rem; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--pine); border-color: rgba(27,67,50,.25); }
.btn-ghost:hover { background: rgba(27,67,50,.06); color: var(--pine); border-color: var(--pine); }
.btn-light { background: #fff; color: var(--pine); border-color: #fff; }
.btn-light:hover { background: var(--cream); color: var(--pine); border-color: var(--cream); }

.link-arrow { font-weight: 600; }

/* ---- Cabecera ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250,248,243,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--pine); }
.brand:hover { color: var(--pine); }
.logo { color: var(--pine); }
.logo .logo-leaf-l { fill: var(--leaf); }
.logo .logo-leaf-r { fill: var(--pine-2); }
.logo .logo-arc { color: var(--amber); }
.logo-mono, .logo-mono .logo-leaf-l, .logo-mono .logo-leaf-r { color: currentColor; fill: currentColor; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-family: var(--font-head); font-size: 1.3rem; letter-spacing: .02em; }
.brand-text small { font-size: .72rem; color: var(--ink-soft); letter-spacing: .14em; text-transform: uppercase; }

.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a { color: var(--ink); font-weight: 500; font-size: .96rem; }
.site-nav a:hover { color: var(--amber-ink); }
.site-nav a.btn { color: #fff; }

.navtoggle-btn { display: none; flex-direction: column; gap: 5px; padding: 10px; cursor: pointer; }
.navtoggle-btn span { width: 24px; height: 2px; background: var(--pine); border-radius: 2px; transition: .2s; }

/* ---- Hero ---- */
.hero { position: relative; overflow: hidden; color: #fff;
  background:
    linear-gradient(160deg, rgba(20,52,38,.93) 0%, rgba(27,67,50,.84) 55%, rgba(45,106,79,.74) 100%),
    url("../img/photos/hero.f55e923dd589.jpg");
  background-size: cover; background-position: center; }
.hero-bg { position: absolute; inset: 0; opacity: .45; pointer-events: none;
  background:
    radial-gradient(640px 320px at 85% -10%, rgba(233,162,59,.35), transparent 60%),
    radial-gradient(520px 320px at 5% 110%, rgba(116,198,157,.3), transparent 60%);
}
.hero-inner { position: relative; padding: clamp(3.5rem, 9vw, 7rem) 24px; max-width: 880px; }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero .hl { color: var(--amber); font-style: italic; }
.eyebrow { text-transform: uppercase; letter-spacing: .18em; font-size: .8rem; font-weight: 600; color: var(--amber); margin-bottom: 1rem; }
.hero .lead { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: rgba(255,255,255,.88); max-width: 620px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; }

/* ---- Stats ---- */
.stats { background: var(--pine); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; padding: 2.2rem 24px; text-align: center; }
.stat { display: flex; flex-direction: column; gap: .2rem; }
.stat-num { font-family: var(--font-head); font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--amber); font-weight: 700; }
.stat-lbl { font-size: .86rem; letter-spacing: .06em; color: rgba(255,255,255,.82); }

/* ---- Secciones ---- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section-alt { background: var(--sand); }
.section-head { max-width: 680px; margin-bottom: 2.6rem; }
.section-head p { color: var(--ink-soft); font-size: 1.08rem; margin: 0; }
.section-foot { margin-top: 2rem; }

.page-head { background: var(--sand); padding: clamp(2.6rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.page-head .lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 680px; }

/* ---- Rejillas y tarjetas ---- */
.grid { display: grid; gap: 1.4rem; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; position: relative; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card h3 { margin-bottom: .5rem; }
.card p { color: var(--ink-soft); margin-bottom: .4rem; }

/* Foto que sangra a los bordes superiores de la tarjeta */
.card-photo { margin: -1.6rem -1.6rem 1.1rem -1.6rem; height: 180px; width: calc(100% + 3.2rem); object-fit: cover; display: block; background: var(--sand); }
.card { overflow: hidden; }
.init-card .estado { position: absolute; top: .9rem; left: .9rem; margin: 0; z-index: 2; box-shadow: 0 2px 8px rgba(0,0,0,.25); }

.eje-card { border-top: 4px solid var(--leaf); }
.eje-icon { font-size: 2rem; display: block; margin-bottom: .6rem; }
.terr-card .pill { display: inline-block; background: var(--leaf-soft); color: var(--pine); font-size: .78rem; font-weight: 600; padding: .2rem .7rem; border-radius: 999px; margin-bottom: .6rem; }
.badge { position: absolute; top: 1rem; right: 1rem; background: var(--amber); color: #3a2a06; font-size: .72rem; font-weight: 700; padding: .18rem .6rem; border-radius: 999px; }
.muted { color: var(--ink-soft); font-size: .9rem; }

.init-card .estado { display: inline-block; font-size: .74rem; font-weight: 700; padding: .2rem .65rem; border-radius: 999px; margin-bottom: .7rem; text-transform: uppercase; letter-spacing: .04em; }
.estado-planeada { background: #fdf0d8; color: var(--amber-ink); }
.estado-en_curso { background: var(--leaf-soft); color: var(--pine); }
.estado-finalizada { background: #e7e2d6; color: var(--ink-soft); }
.init-meta { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .85rem; color: var(--ink-soft); margin-top: .8rem; }

.news-card time { font-size: .82rem; color: var(--amber-ink); font-weight: 600; letter-spacing: .04em; }
.news-card h3 { margin: .3rem 0 .5rem; }
.news-img { border-radius: var(--radius-sm); margin-bottom: .9rem; aspect-ratio: 16/9; object-fit: cover; width: 100%; }

/* ---- Ejes (página programa) ---- */
.ejes-list { display: flex; flex-direction: column; gap: 1.2rem; }
.eje-row { display: grid; grid-template-columns: 72px 1fr; gap: 1.4rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow); }
.eje-row-icon { font-size: 2.4rem; width: 72px; height: 72px; display: grid; place-items: center; background: var(--leaf-soft); border-radius: 50%; }
.eje-row h2 { font-size: 1.5rem; margin-bottom: .3rem; }
.eje-row-lead { font-size: 1.08rem; color: var(--ink); font-weight: 500; }
.eje-row p { color: var(--ink-soft); }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.chip { background: var(--sand); border: 1px solid var(--line); color: var(--ink); font-size: .84rem; padding: .3rem .8rem; border-radius: 999px; }
a.chip:hover { background: var(--leaf-soft); color: var(--pine); }

/* ---- Banda con foto (misión) ---- */
.band { position: relative; color: #fff; background-size: cover; background-position: center; }
.band::before { content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(20,52,38,.93) 0%, rgba(20,52,38,.6) 55%, rgba(20,52,38,.35) 100%); }
.band-inner { position: relative; padding: clamp(3rem, 7vw, 5.5rem) 24px; max-width: 620px; }
.band h2 { color: #fff; }
.band .eyebrow { color: var(--amber); }
.band p { color: rgba(255,255,255,.92); font-size: 1.12rem; }
.band-mission { background-image: url("../img/photos/band-mission.d59ff89eebb7.jpg"); }

/* ---- Banda CTA (con foto) ---- */
.cta-band { position: relative; color: #fff; background-size: cover; background-position: center 35%;
  background-image: url("../img/photos/band-cta.c4cff98245f6.jpg"); }
.cta-band::before { content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(27,67,50,.92) 0%, rgba(45,106,79,.82) 100%); }
.cta-inner { position: relative; padding: clamp(2.8rem, 6vw, 4.2rem) 24px; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-inner p { font-size: 1.12rem; margin-bottom: 1.6rem; color: rgba(255,255,255,.92); }

/* ---- Filtros ---- */
.filters { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 2rem; }
.filters select { font-family: inherit; font-size: .95rem; padding: .6rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); cursor: pointer; }

/* ---- Artículo ---- */
.article { padding: clamp(2.4rem, 6vw, 4rem) 0; }
.article-date { color: var(--amber-ink); font-weight: 600; font-size: .9rem; }
.article-img { border-radius: var(--radius); margin: 1.4rem 0; width: 100%; }
.article-lead { font-size: 1.25rem; color: var(--ink); font-weight: 500; margin: 1.2rem 0; }
.article-body { font-size: 1.08rem; color: var(--ink-soft); }

/* ---- Formularios ---- */
.form-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 2.4rem; align-items: start; }
.form-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
.field { margin-bottom: 1.2rem; }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .4rem; color: var(--ink); }
.field .req { color: var(--amber-ink); }
.field input, .field select, .field textarea {
  width: 100%; font-family: inherit; font-size: 1rem; padding: .7rem .9rem;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--cream); color: var(--ink);
  transition: border .15s ease, box-shadow .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--pine-2); box-shadow: 0 0 0 3px var(--leaf-soft); background: #fff; }
.field textarea { resize: vertical; }
.field .help { color: var(--ink-soft); font-size: .82rem; }
.field .err { color: #b3261e; font-size: .84rem; font-weight: 500; }
.field-error input, .field-error select, .field-error textarea { border-color: #b3261e; }
.field-check { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.field-check label { order: 2; margin: 0; font-weight: 500; }
.field-check input { width: auto; }

.form-aside h3 { margin-top: 0; }
.form-aside { background: var(--sand); border-radius: var(--radius); padding: 1.8rem; }
.check-list { list-style: none; padding: 0; margin: 0 0 1.4rem; }
.check-list li { position: relative; padding-left: 1.7rem; margin-bottom: .6rem; color: var(--ink-soft); }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--pine-2); font-weight: 800; }

.empty { text-align: center; color: var(--ink-soft); padding: 3rem 0; font-size: 1.05rem; }

/* ---- Mensajes flash ---- */
.flash { border-radius: var(--radius-sm); padding: .9rem 1.2rem; margin: 1.2rem 0; font-weight: 500; }
.flash-success { background: var(--leaf-soft); color: var(--pine); border: 1px solid var(--leaf); }
.flash-error { background: #fde8e6; color: #b3261e; border: 1px solid #f3b4ae; }

/* ---- Pie ---- */
.site-footer { background: var(--pine); color: rgba(255,255,255,.82); margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; padding: 3rem 24px 2rem; }
.footer-brand .logo { color: #fff; margin-bottom: .8rem; }
.footer-brand p { max-width: 320px; font-size: .95rem; }
.site-footer h4 { color: #fff; font-family: var(--font-body); font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 1rem; }
.site-footer a { display: block; color: rgba(255,255,255,.82); margin-bottom: .5rem; font-size: .95rem; }
.site-footer a:hover { color: var(--amber); }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; padding: 1.4rem 24px; border-top: 1px solid rgba(255,255,255,.12); font-size: .85rem; color: rgba(255,255,255,.6); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .cards-3 { grid-template-columns: repeat(2, 1fr); }
  .form-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .navtoggle-btn { display: flex; }
  .site-nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--cream); border-bottom: 1px solid var(--line); padding: 1rem 24px 1.4rem;
    gap: .2rem; transform: translateY(-120%); transition: transform .25s ease; box-shadow: var(--shadow);
  }
  .site-nav a { padding: .7rem 0; border-bottom: 1px solid var(--line); }
  .site-nav a.btn { margin-top: .6rem; border: 2px solid var(--pine); text-align: center; }
  .navtoggle:checked ~ .site-nav { transform: translateY(0); }
}
@media (max-width: 560px) {
  .cards-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
  .eje-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

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