/* ============================================================
   El Sueño Compartido — hoja de estilos
   Identidad visual: verdes de marca, logo azul+verde,
   tipografía Montserrat, 7 énfasis estratégicos con color propio.
   ============================================================ */

:root {
  /* --- Marca --- */
  --brand-blue: #1b4f91;       /* azul institucional (título + "El") */
  --brand-blue-dark: #16415f;
  --brand-green: #3faa4f;      /* verde institucional ("Sueño Compartido") */
  --brand-green-dark: #3a8f3e;
  --brand-green-deep: #2f7a33; /* acentos verdes */
  --brand-green-soft: #eaf5ea;
  --hero-bg: #eef3f7;          /* fondo claro de la portada */

  /* --- Énfasis estratégicos (1..7) --- */
  --e1: #9c2a5c; /* Articulación de actores */
  --e2: #f5b400; /* Organización comunitaria */
  --e3: #1f8fd4; /* Incidencia pública */
  --e4: #4caf50; /* Sostenibilidad y recursos naturales */
  --e5: #00b3c4; /* Formación de liderazgo */
  --e6: #d32f2f; /* Valoración de las culturas */
  --e7: #f26c4f; /* Bienestar integral */

  /* --- Neutros --- */
  --ink: #1d2733;
  --ink-soft: #4a5a6a;
  --bg: #ffffff;
  --bg-alt: #f4f8f5;
  --line: #e2ebe4;
  --white: #ffffff;

  --max: 1120px;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(22, 65, 95, 0.10);
  --shadow-sm: 0 4px 14px rgba(22, 65, 95, 0.08);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 1.5rem; }

/* Accesibilidad: salto al contenido */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--brand-blue); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid var(--brand-blue); outline-offset: 2px; border-radius: 4px; }

/* ============================================================
   Encabezado / navegación
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 72px; gap: 1rem;
}

/* Logo tipográfico El(azul) Sueño Compartido(verde) */
.logo { display: flex; flex-direction: column; line-height: 1.05; text-decoration: none; }
.logo-main { font-weight: 800; font-size: 1.35rem; letter-spacing: -0.5px; }
.logo-main .el { color: var(--brand-blue); }
.logo-main .sc { color: var(--brand-green); }
.logo-main .dot { color: var(--brand-green); }
.logo-sub {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 3px;
  color: var(--ink-soft); text-transform: uppercase; margin-top: 2px;
}

.nav-links { list-style: none; display: flex; gap: 1.75rem; align-items: center; }
.nav-links a {
  text-decoration: none; font-size: 0.92rem; font-weight: 600; color: var(--ink);
  padding: .4rem 0; position: relative;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--brand-green); transition: width .25s ease;
}
.nav-links a:hover::after, .nav-links a:focus-visible::after { width: 100%; }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: .5rem;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .3s; border-radius: 2px; }

/* ============================================================
   Hero — portada verde completa con niños (ref. fondo-verde)
   ============================================================ */
.hero {
  position: relative; overflow: hidden; color: #fff; isolation: isolate;
  background: var(--brand-green);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: url("assets/fondo-verde.png") bottom center / cover no-repeat;
}
.hero .container {
  position: relative; padding-top: 4.5rem; padding-bottom: 14rem;
  display: block; max-width: 760px; margin-inline: auto; text-align: center;
}
.hero-copy { display: grid; gap: 1.4rem; justify-items: center; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: .75rem;
  font-size: .78rem; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: #fff;
}
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 5rem); font-weight: 800; line-height: .98; letter-spacing: 1px;
  color: #fff;
}
.hero .lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem); font-weight: 500; color: rgba(255,255,255,.95); max-width: 46ch;
  margin-inline: auto;
}
.hero-actions { display: flex; gap: .9rem; flex-wrap: wrap; justify-content: center; margin-top: .5rem; }

.btn {
  display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; font-size: .98rem;
  padding: .85rem 1.75rem; border-radius: 999px; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand-green); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-green-dark); }
.btn-outline { background: transparent; color: var(--brand-blue); border-color: var(--brand-blue); }
.btn-outline:hover { background: rgba(27,79,145,.08); }
.hero .btn-primary { background: #fff; color: var(--brand-green-deep); }
.hero .btn-primary:hover { background: #f1faf1; }
.hero .btn-outline { color: #fff; border-color: #fff; }
.hero .btn-outline:hover { background: rgba(255,255,255,.15); }

/* ============================================================
   Secciones genéricas
   ============================================================ */
.section { padding-block: 5rem; }
.section-alt { background: var(--bg-alt); }

.section-head { max-width: 720px; margin: 0 auto 3rem; text-align: center; }
.section-head .kicker {
  font-size: .78rem; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--brand-green-dark);
}
.section-head h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 800; letter-spacing: -.5px; margin-top: .5rem; color: var(--ink);
}
.section-head h2 .accent { color: var(--brand-green); }
.section-head p { color: var(--ink-soft); font-size: 1.05rem; margin-top: 1rem; }

/* ---------- "¿Qué es?" ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.feature {
  position: relative; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem 1.75rem; box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
  overflow: hidden;
}
.feature::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: var(--brand-green);
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature .icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1rem;
  background: var(--brand-green-soft); color: var(--brand-green-dark);
}
.feature h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: .5rem; }
.feature p { color: var(--ink-soft); font-size: .97rem; }

/* ---------- Quiénes somos / Historia (split) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.split + .split { margin-top: 4rem; }
.split .prose h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 1rem; color: var(--brand-blue); }
.split .prose p { color: var(--ink-soft); margin-bottom: 1rem; }
.split-media {
  border-radius: var(--radius); min-height: 280px; box-shadow: var(--shadow);
  background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-blue) 120%);
  display: grid; place-items: center; color: rgba(255,255,255,.9); padding: 2rem; position: relative; overflow: hidden;
}
.split-media svg { width: 70%; max-width: 320px; opacity: .95; }

/* Caja verde con el logo compartido centrado (Nuestra historia) */
.split-media.logo-box {
  background: linear-gradient(135deg, var(--brand-green) 0%, var(--brand-blue) 120%);
  padding: 2.5rem;
}
.split-media.logo-box img {
  width: 100%; max-width: 420px; height: auto;
  background: #fff; border-radius: 14px; padding: 1.25rem 1.5rem; box-shadow: var(--shadow-sm);
}

/* Panel con la rueda completa de los 7 énfasis (fondo claro) */
.split-media.map { background: #f4f6fb; padding: 1.25rem; }
.split-media.map img { width: 100%; height: auto; object-fit: contain; }
.draft-badge {
  display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
  color: var(--brand-green-dark); background: var(--brand-green-soft); border: 1px dashed var(--brand-green);
  padding: .25rem .6rem; border-radius: 6px; margin-bottom: .75rem;
}
.timeline { list-style: none; margin-top: 1rem; display: grid; gap: 1.1rem; }
.timeline li { position: relative; padding-left: 2.25rem; color: var(--ink-soft); }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: .35rem; width: 14px; height: 14px; border-radius: 50%;
  background: var(--brand-green); box-shadow: 0 0 0 4px var(--brand-green-soft);
}
.timeline strong { color: var(--ink); display: block; }

/* ============================================================
   Énfasis estratégicos
   ============================================================ */
.emphasis-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1.5rem; }
.emphasis {
  --c: var(--brand-green);
  position: relative; background: var(--white); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; transition: transform .2s ease, box-shadow .2s ease;
}
.emphasis:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.emphasis::before { content: ""; height: 6px; background: var(--c); }
.emphasis-body { padding: 1.75rem; display: flex; flex-direction: column; gap: .75rem; flex: 1; }
.emphasis-top { display: flex; align-items: center; gap: 1rem; }
.emphasis-num {
  flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--c); color: #fff; font-weight: 800; font-size: 1.2rem;
}
.emphasis-icon { width: 34px; height: 34px; color: var(--c); margin-left: auto; }
.emphasis h3 { font-size: 1.12rem; font-weight: 700; color: var(--ink); }
.emphasis p { color: var(--ink-soft); font-size: .95rem; }
.emphasis-verse {
  margin-top: auto; font-size: .85rem; font-style: italic; color: var(--ink-soft);
  border-left: 3px solid var(--c); padding-left: .85rem;
}
.emphasis-ref {
  align-self: flex-start; margin-top: .25rem; font-size: .75rem; font-weight: 700; color: #fff;
  background: var(--c); padding: .3rem .75rem; border-radius: 999px; font-style: normal;
}

.e1 { --c: var(--e1); } .e2 { --c: var(--e2); } .e3 { --c: var(--e3); }
.e4 { --c: var(--e4); } .e5 { --c: var(--e5); } .e6 { --c: var(--e6); } .e7 { --c: var(--e7); }

/* ============================================================
   Noticias
   ============================================================ */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.75rem; }
.news-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; display: flex; flex-direction: column;
}
.news-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.news-thumb { aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--brand-green), var(--brand-blue)); position: relative; }
.news-thumb .tag {
  position: absolute; top: .9rem; left: .9rem; background: rgba(255,255,255,.95); color: var(--brand-green-dark);
  font-size: .72rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: .3rem .7rem; border-radius: 999px;
}
.news-body { padding: 1.5rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.news-date { font-size: .8rem; font-weight: 600; color: var(--brand-green-dark); }
.news-body h3 { font-size: 1.1rem; font-weight: 700; }
.news-body p { color: var(--ink-soft); font-size: .93rem; flex: 1; }
.news-link { font-weight: 700; font-size: .9rem; color: var(--brand-blue); text-decoration: none; }
.news-link:hover { text-decoration: underline; }

/* Tarjeta de documento descargable (propuesta El Sueño Compartido) */
.news-thumb-doc {
  display: flex; flex-direction: column; justify-content: center;
  padding: 1.5rem; color: #fff;
}
.news-doc-title { margin-top: .75rem; }
.news-doc-title strong {
  display: block; font-size: 1.9rem; line-height: 1.05; font-weight: 800; letter-spacing: -.5px;
}
.news-doc-title span { display: block; font-size: 1rem; font-weight: 500; margin-top: .35rem; opacity: .95; }
.news-doc-btn {
  margin-top: .75rem; width: 100%; justify-content: center;
  background: var(--brand-blue); color: #fff; box-shadow: var(--shadow-sm);
}
.news-doc-btn:hover { background: var(--brand-blue-dark); }

/* ============================================================
   Organizaciones (logos)
   ============================================================ */
.logos-strip { background: var(--white); }
.logos-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1.5rem; align-items: center;
}
.logo-item {
  display: grid; place-items: center; padding: 1rem; border-radius: 12px; background: var(--bg-alt);
  min-height: 110px; transition: transform .2s ease, box-shadow .2s ease;
}
.logo-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); background: #fff; }
.logo-item img {
  max-height: 72px; width: auto; object-fit: contain;
  filter: grayscale(100%); opacity: .75; transition: filter .25s ease, opacity .25s ease;
}
.logo-item:hover img { filter: grayscale(0); opacity: 1; }

/* ============================================================
   Pie de página
   ============================================================ */
.site-footer { background: var(--brand-blue-dark); color: #cfe0ec; padding-block: 3.5rem 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
.site-footer h4 { color: #fff; font-size: .95rem; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 1rem; }
.site-footer a { color: #cfe0ec; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; display: grid; gap: .6rem; }
.footer-brand .logo-main { font-size: 1.5rem; }
.footer-brand .logo-main .el { color: #7fc7f2; }
.footer-brand .logo-main .sc { color: #8fdc92; }
.footer-brand p { margin-top: 1rem; max-width: 40ch; font-size: .92rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15); padding-top: 1.5rem; text-align: center; font-size: .85rem; opacity: .85;
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split-media { order: -1; min-height: 220px; }
  /* "Quiénes somos": mantener el orden natural (texto arriba, imagen debajo). */
  .split-media.map { order: 0; }
  /* "Historia": texto arriba, logo debajo (la imagen va primero en el DOM). */
  .split-history .prose { order: -1; }
  .split-history .split-media { order: 0; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero .container { padding-bottom: 10rem; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav-links.open { max-height: 420px; }
  .nav-links li { width: 100%; border-top: 1px solid var(--line); }
  .nav-links a { display: block; padding: 1rem 1.5rem; }
  .nav-links a::after { display: none; }
  .section { padding-block: 3.5rem; }
  .hero h1 { font-size: clamp(2rem, 11vw, 3rem); letter-spacing: .5px; }
}

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