/* ===== Tokens ===== */
:root {
  --green-deep:   #5aae58;
  --green-dark:   #234c46;
  --green-accent: #3aa84a;
  --green-soft:   #d6ebd2;
  --cream:        #f5efe6;
  --cream-2:      #efe7d8;
  --peach:        #f1d6b8;
  --peach-2:      #f4e0c8;
  --orange:       #e89b5c;
  --indigo:       #5a5fd8;
  --indigo-dark:  #4b50c4;
  --ink:          #2a2f36;
  --ink-soft:     #5a5f66;
  --ink-muted:    #7c8189;
  --yellow:       #f1d271;
  --white:        #ffffff;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 32px; position: relative; }
.container--narrow { max-width: 1140px; }

/* ===== Section title ===== */
.section-title {
  text-align: center;
  font-weight: 700;
  font-size: clamp(32px, 4.2vw, 52px);
  line-height: 1.1;
  letter-spacing: -.01em;
  margin: 0 0 56px;
}
.section-title .muted { color: var(--ink-soft); font-weight: 500; }
.section-title .accent { color: var(--green-accent); font-weight: 800; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--indigo);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 26px;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(90,95,216,.25);
  transition: background .18s ease, transform .18s ease;
}
.btn:hover { background: var(--indigo-dark); transform: translateY(-1px); }

/* ===== HERO ===== */
.hero {
  position: relative;
  width: 100%;
  min-height: 720px;
  background: #1d3a36;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.hero__bg-pic { display: contents; }
.hero__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ===== NAV ===== */
.nav {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 24px;
  background: #fff;
  border-radius: 999px;
  padding: 20px 22px 20px 18px;
  margin: 28px auto 0;
  width: calc(100% - 64px);
  max-width: 1140px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .12);
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 18px;
}
.nav__logo img {
  height: 42px;
  width: auto;
  display: block;
}
.nav__list {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  flex: 1;
  justify-content: flex-end;
}
.nav__list li { display: flex; align-items: center; }
.nav__list li + li::before {
  content: "";
  width: 1px;
  height: 20px;
  background: #d8d8d8;
  margin: 0 6px;
}
.nav__list a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: #7c8189;
  border-radius: 999px;
  transition: color .15s ease, background .15s ease;
}
.nav__list a:hover { color: var(--indigo); }
.nav__list a.is-active { color: var(--indigo); font-weight: 600; }
.nav__list .caret { font-size: 10px; opacity: .7; margin-left: 2px; }
.nav__divider { display: none; }

/* ===== Dropdown submenu ===== */
.nav__has-sub { position: relative; }
.nav__sub {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(0,0,0,.14);
  list-style: none;
  padding: 8px 0;
  margin: 0;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
  z-index: 10;
}
/* Puente invisible para evitar que el submenú desaparezca al cruzar el gap */
.nav__sub::before {
  content: "";
  position: absolute;
  top: -16px;
  left: 0;
  right: 0;
  height: 16px;
  background: transparent;
}
.nav__has-sub:hover .nav__sub,
.nav__has-sub:focus-within .nav__sub {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition-delay: 0s;
}
/* Quitar el separador entre items del submenu (era para li horizontales) */
.nav__sub li {
  width: 100%;
  display: block;
}
.nav__sub li + li::before { display: none; }
.nav__sub a {
  display: block;
  width: 100%;
  padding: 12px 24px;
  font-size: 14px;
  white-space: nowrap;
  color: var(--ink);
  border-radius: 0;
  font-weight: 500;
  box-sizing: border-box;
}
.nav__sub a:hover { background: #f5f0e6; color: var(--indigo); }
.nav__sub a.is-active { background: #eef0fc; color: var(--indigo); }

/* ===== Hero panel ===== */
.hero__panel {
  position: relative;
  z-index: 4;
  width: 100%;
  max-width: 1140px;
  margin: auto auto 0;
  padding: 0 32px 50px;
  color: #fff;
}
.hero__panel > * { max-width: 700px; }
.hero__logo-img {
  display: block;
  height: 100px;
  width: auto;
  margin-bottom: 26px;
}
.hero__copy {
  font-size: 17px;
  line-height: 1.65;
  max-width: 640px;
}
.hero__copy strong { color: var(--green-accent); font-weight: 600; }

/* dark gradient over hero (bottom → top) */
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.95) 0%,
    rgba(0,0,0,.80) 15%,
    rgba(0,0,0,.45) 30%,
    rgba(0,0,0,.10) 45%,
    rgba(0,0,0,0)   55%
  );
  z-index: 2;
}

/* ===== STATS ===== */
.stats {
  position: relative;
  background: var(--cream);
  padding: 110px 0 120px;
  overflow: hidden;
}
.stats__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.stats .container { position: relative; z-index: 1; }

.stats__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 28px;
  margin: 0 auto;
}
.stats__grid .stat { grid-column: span 2; }
.stats__grid .stat:nth-child(4) { grid-column: 2 / span 2; }
.stats__grid .stat:nth-child(5) { grid-column: 4 / span 2; }
.stat {
  background: var(--cream);
  border: 1.5px solid var(--orange);
  border-radius: 18px;
  padding: 30px 26px 26px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.stat__icon { margin-bottom: 12px; display: flex; justify-content: center; }
.stat__icon img { height: 42px; width: auto; display: block; }
.stat__num {
  font-size: 46px;
  font-weight: 800;
  color: var(--green-accent);
  line-height: 1;
  margin-bottom: 10px;
  letter-spacing: -.01em;
}
.stat__num .arrow { font-size: 28px; vertical-align: middle; margin-right: 2px; }
.stat__label {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.45;
}

/* ===== PROGRAMS ===== */
.programs {
  background: var(--cream);
  padding: 60px 0 120px;
}
.program {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 60px;
}
.program--reverse .program__media { order: 2; }
.program__media img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  border-radius: 16px;
}
.program__body { padding: 0; }
.program__title {
  color: var(--green-accent);
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 18px;
}
.program__body p {
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.65;
  margin: 0 0 28px;
}

/* ===== ENTORNOS ===== */
.entornos {
  position: relative;
  background: var(--cream);
  padding: 80px 0 120px;
  overflow: hidden;
}
.entornos__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.entornos .container { position: relative; z-index: 1; }
.entornos__title {
  text-align: center;
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 50px;
}
.entornos__title .accent { color: var(--green-accent); }
.entornos__media {
  border-radius: 18px;
  overflow: hidden;
  max-width: 940px;
  margin: 0 auto 30px;
}
.entornos__media img {
  width: 100%;
  height: 340px;
  object-fit: cover;
}
.entornos__caption {
  text-align: center;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.7;
  max-width: 760px;
  margin: 0 auto 40px;
}
.entornos__caption strong { color: var(--ink); }
.entornos__cta { text-align: center; }

/* ===== FOOTER ===== */
.footer {
  background: var(--green-deep);
  color: #d9e3df;
  padding: 70px 0 40px;
  font-size: 14px;
}
.footer__top { max-width: 600px; }
.footer__heading {
  color: var(--yellow);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px;
}
.footer__lead { margin: 0 0 18px; line-height: 1.55; }
.footer__social {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}
.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity .15s ease, transform .15s ease;
}
.footer__social a:hover { opacity: .75; transform: translateY(-2px); }
.footer__social img { width: 22px; height: 22px; display: block; }

.footer__rule {
  border: 0;
  border-top: 1px solid rgba(255,255,255,.15);
  margin: 40px 0 36px;
}

.footer__cols {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
}
.footer__logo {
  display: block;
  height: 90px;
  width: auto;
  margin-bottom: 22px;
}
.footer__addr {
  font-size: 12.5px;
  line-height: 1.55;
  margin: 6px 0;
  opacity: .9;
}
.footer__copy {
  margin-top: 18px;
  font-size: 12px;
  opacity: .75;
}

.footer__col h4 {
  color: var(--yellow);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 16px;
}
.footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer__col li { margin-bottom: 8px; }
.footer__col a {
  color: #d9e3df;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer__col a:hover { color: #fff; }

/* ============================================
   DIRECTORIO
   ============================================ */

/* Hero compacto (sin texto, solo banner) */
.hero--compact {
  min-height: 380px;
  display: block;
}
.hero--compact .hero__bg {
  object-position: center 30%;
}
.hero--compact::after {
  background: linear-gradient(
    to top,
    rgba(0,0,0,.45) 0%,
    rgba(0,0,0,.15) 40%,
    rgba(0,0,0,0)   100%
  );
}

/* Breadcrumb */
.breadcrumb {
  background: var(--cream);
  padding: 22px 0 8px;
}
.breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13.5px;
  color: var(--ink-soft);
}
.breadcrumb li + li::before {
  content: "›";
  margin-right: 8px;
  color: var(--ink-muted);
}
.breadcrumb a {
  color: var(--ink-soft);
  transition: color .15s ease;
}
.breadcrumb a:hover { color: var(--green-accent); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 500; }

/* ===== TEAM ===== */
.team {
  position: relative;
  background: var(--cream);
  padding: 50px 0 90px;
  overflow: hidden;
}
.team__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.team .container { position: relative; z-index: 1; }

.team__featured {
  display: flex;
  justify-content: center;
  margin: 0 0 60px;
}
.team__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px 40px;
  max-width: 980px;
  margin: 0 auto;
}
.member {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.member__photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 18px;
}
.member__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.member__name {
  color: var(--green-accent);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 4px;
  line-height: 1.25;
}
.member__role {
  color: var(--ink-soft);
  font-size: 14px;
  margin: 0 0 6px;
  font-style: italic;
}
.member__email {
  color: var(--ink-soft);
  font-size: 13.5px;
  text-decoration: none;
  transition: color .15s ease;
}
.member__email:hover { color: var(--green-accent); }

/* ===== ORGANIGRAMA ===== */
.org {
  background: #fff;
  padding: 90px 0 110px;
}
.org__title { margin-bottom: 60px; }
.org__title .accent { color: var(--green-accent); font-weight: 800; }

.org-chart {
  max-width: 880px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  padding: 0 16px;
}
.org-chart img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   PÁGINAS INTERIORES (Quienes Somos, etc.)
   ============================================ */
.page-section {
  position: relative;
  background: var(--cream);
  padding: 70px 0 90px;
  overflow: hidden;
}
.page-section__bg {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.page-section .container { position: relative; z-index: 1; }

/* Prose */
.prose {
  max-width: 760px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.75;
}
.prose p { margin: 0 0 18px; }
.prose strong { color: var(--ink); }
.prose a { color: var(--green-accent); text-decoration: underline; text-underline-offset: 3px; }
.prose h3 { color: var(--ink); font-size: 20px; margin: 32px 0 12px; font-weight: 700; }
.prose ul { padding-left: 22px; margin: 0 0 18px; }
.prose ul li { margin-bottom: 8px; }

/* ============================================
   INVESTIGACIÓN SOCIAL — página hija de Programas
   ============================================ */
.is-intro { background: #fff; padding: 50px 0 80px; }
.is-intro__tag {
  color: var(--green-accent);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.45;
  margin: 0 0 40px;
  max-width: 900px;
}
.is-intro__split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 50px;
  align-items: start;
}
.is-intro__body p {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.7;
}
.is-intro__body strong { color: var(--green-accent); font-weight: 700; }
.is-intro__media img {
  width: 100%;
  border-radius: 18px;
  height: 320px;
  object-fit: cover;
}

/* Líneas de trabajo */
.is-lines {
  position: relative;
  background: var(--cream);
  padding: 80px 0 100px;
  overflow: hidden;
}
.is-lines__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.is-lines .container { position: relative; z-index: 1; }
.fr-h--left { text-align: left; }

.is-lines__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px 40px;
  max-width: 1080px;
  margin: 40px auto 0;
}
.is-line {
  position: relative;
  background-image: url('img/icons/is-card-bg.svg');
  background-repeat: no-repeat;
  background-size: 100% 100%;
  background-position: center;
  padding: 48px 36px 36px 100px;
  margin-top: 18px;
  min-height: 200px;
}
/* Header: contiene el número absoluto y el título; queda como bloque */
.is-line__head {
  display: block;
  margin-bottom: 14px;
}
/* El número va posicionado sobre la hoja verde que viene en el SVG */
.is-line__num {
  position: absolute;
  top: 16px;
  left: 12px;
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.is-line__num::before {
  content: attr(data-num);
  font-weight: 800;
  font-size: 30px;
  color: #4865aa;
  font-family: 'Poppins', sans-serif;
  line-height: 1;
}
.is-line__leaf { display: none; }
.is-line h4 {
  color: var(--green-accent);
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
}
.is-line p {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 860px) {
  .is-intro__split { grid-template-columns: 1fr; gap: 30px; }
  .is-intro__media img { height: 240px; }
  .is-lines__grid { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 560px) {
  .is-intro__tag { font-size: 18px; }
  .is-line { padding-left: 64px; }
  .is-line__num { width: 48px; height: 48px; font-size: 26px; }
}

/* ============================================
   FAMILIAS EN RED — página hija de Programas
   ============================================ */

.fr-intro { background: #fff; padding: 50px 0 70px; }
.fr-intro__tag {
  color: var(--green-accent);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.4;
  margin: 0 0 36px;
  max-width: 900px;
}
.fr-intro__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.fr-intro__body p {
  margin: 0 0 16px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.7;
}
.fr-intro__body strong { color: var(--green-accent); font-weight: 700; }
.fr-intro__media img {
  width: 100%;
  border-radius: 18px;
  height: 360px;
  object-fit: cover;
}

/* Works (¿Qué trabajamos? / ¿A quién atendemos?) */
.fr-works {
  position: relative;
  background: var(--cream);
  padding: 80px 0 90px;
  overflow: hidden;
}
.fr-works__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.fr-works .container { position: relative; z-index: 1; }

.fr-h {
  color: var(--green-accent);
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 30px;
  text-align: center;
}
.fr-h--mt { margin-top: 60px; }
.fr-h--center { text-align: center; }

.fr-works__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  max-width: 1000px;
  margin: 0 auto;
}
.fr-card {
  background: var(--cream);
  border: 2px solid var(--orange);
  border-radius: 18px;
  padding: 32px 22px 26px;
  text-align: center;
}
.fr-card__icon {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}
.fr-card__icon img { width: 56px; height: 56px; }
.fr-card h4 {
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 500;
  margin: 0;
  line-height: 1.35;
}

/* Pills */
.fr-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 32px;
  max-width: 880px;
  margin: 0 auto;
}
.fr-pill {
  border: 2px solid var(--green-accent);
  color: #234c46;
  background: #fff;
  border-radius: 999px;
  padding: 12px 22px;
  text-align: center;
  font-weight: 600;
  font-size: 14.5px;
}

/* Enfoque territorial */
.fr-territorial { background: #fff; padding: 90px 0 100px; }
.fr-territorial__hero {
  border-radius: 18px;
  overflow: hidden;
  margin: 0 0 40px;
}
.fr-territorial__hero img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}
.fr-territorial__lead {
  text-align: center;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 auto 50px;
  max-width: 780px;
}
.fr-territorial__lead strong { color: var(--green-accent); font-weight: 700; }

.fr-territorial__split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: stretch;
}
.fr-territorial__card {
  background: #f0eee6;
  border-radius: 18px;
  padding: 40px 36px;
  display: flex;
  align-items: center;
}
.fr-territorial__card p {
  margin: 0;
  text-align: center;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.7;
}
.fr-territorial__card strong { color: var(--green-accent); font-weight: 700; }
.fr-territorial__photo {
  border-radius: 18px;
  overflow: hidden;
}
.fr-territorial__photo img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  display: block;
}

/* Stats en página interior (sin bordes naranja) */
.stats--page { padding: 60px 0 80px; background: #fff; }
.stats--page .stats__bg { display: none; }
.stats__grid--bare {
  grid-template-columns: repeat(6, 1fr);
  max-width: 900px;
  gap: 32px 16px;
}
.stats__grid--bare .stat--bare {
  background: transparent;
  border: none;
  padding: 16px 12px;
  margin-left: 0 !important;
}
/* Reescribir override de span y posición — primera fila 3 stats */
.stats__grid--bare .stat:nth-child(1) { grid-column: 1 / span 2; }
.stats__grid--bare .stat:nth-child(2) { grid-column: 3 / span 2; }
.stats__grid--bare .stat:nth-child(3) { grid-column: 5 / span 2; }
/* Segunda fila — 2 centrados (4 y 5) */
.stats__grid--bare .stat:nth-child(4) { grid-column: 2 / span 2; }
.stats__grid--bare .stat:nth-child(5) { grid-column: 4 / span 2; }

/* Testimonios */
.testimonials {
  background: var(--cream);
  padding: 70px 0 80px;
}
.testimonials__slider {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto;
}
.testimonials__track {
  display: flex;
  gap: 24px;
  overflow: hidden;
  flex: 1;
  scroll-snap-type: x mandatory;
}
.testimonial {
  flex: 0 0 calc((100% - 48px) / 3);
  background-image: url('img/fr-testimonio-bg.webp');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: top center;
  padding: 80px 36px 50px;
  position: relative;
  text-align: center;
  scroll-snap-align: start;
  min-height: 230px;
  aspect-ratio: 460 / 350;
}
.testimonial p {
  font-style: italic;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.55;
  margin: 0 0 14px;
}
.testimonial__name {
  font-size: 13.5px;
  color: var(--ink);
  font-weight: 500;
}
.testimonials__arrow {
  background: transparent;
  border: none;
  color: var(--ink-soft);
  font-size: 30px;
  font-weight: 300;
  cursor: pointer;
  padding: 8px 12px;
  line-height: 1;
  transition: color .15s ease;
}
.testimonials__arrow:hover { color: var(--green-accent); }

/* Gallery */
.gallery { background: #fff; padding: 60px 0 80px; }
.gallery__main {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  max-width: 1100px;
  margin: 0 auto 16px;
}
.gallery__main img {
  width: 100%;
  height: 460px;
  object-fit: cover;
  display: block;
}
.gallery__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.5);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  color: var(--ink);
  transition: background .15s ease;
  z-index: 2;
}
.gallery__arrow:hover { background: #fff; }
.gallery__arrow--prev { left: 16px; }
.gallery__arrow--next { right: 16px; }
.gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 8px;
  max-width: 1100px;
  margin: 0 auto;
}
.gallery__thumb {
  border: 2px solid transparent;
  background: transparent;
  padding: 0;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  transition: border-color .15s ease, transform .15s ease;
}
.gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery__thumb:hover { transform: translateY(-2px); }
.gallery__thumb.is-active { border-color: var(--green-accent); }

/* Recursos */
.resources { background: #fff; padding: 70px 0 100px; }
.resources__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  max-width: 1080px;
  margin: 30px auto 0;
}
/* Variante con una sola card centrada */
.resources__grid--single {
  grid-template-columns: 1fr;
  max-width: 560px;
}
.resources__grid--single .resource {
  padding: 28px 30px 24px;
}
.resources__grid--single .resource h5 {
  font-size: 18px;
  margin-bottom: 12px;
}
.resources__grid--single .resource p {
  font-size: 14.5px;
  min-height: auto;
  margin-bottom: 16px;
}
.resources__grid--single .resource__link {
  font-size: 14.5px;
}
.resource {
  background: #f0eee6;
  border-radius: 12px;
  padding: 22px 22px 20px;
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.resource:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.06);
}
.resource h5 {
  color: #234c46;
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 10px;
  padding-bottom: 8px;
  border-bottom: 1.5px solid #b8c4be;
}
.resource p {
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0 0 12px;
  min-height: 60px;
}
.resource__link {
  color: #234c46;
  font-weight: 700;
  font-size: 13.5px;
}

/* Responsive Familias en Red */
@media (max-width: 960px) {
  .fr-intro__split { grid-template-columns: 1fr; gap: 30px; }
  .fr-intro__media img { height: 260px; }
  .fr-works__grid { grid-template-columns: repeat(2, 1fr); }
  .fr-pills { grid-template-columns: repeat(2, 1fr); }
  .fr-territorial__split { grid-template-columns: 1fr; }
  /* Stats bare → 2 columnas en tablet */
  .stats__grid--bare { grid-template-columns: repeat(2, 1fr); }
  .stats__grid--bare .stat:nth-child(1),
  .stats__grid--bare .stat:nth-child(2),
  .stats__grid--bare .stat:nth-child(3),
  .stats__grid--bare .stat:nth-child(4),
  .stats__grid--bare .stat:nth-child(5) { grid-column: auto; }
  .testimonial { flex: 0 0 calc((100% - 24px) / 2); }
  .gallery__main img { height: 360px; }
  .gallery__thumbs { grid-template-columns: repeat(6, 1fr); }
  .resources__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .fr-intro__tag { font-size: 18px; }
  .fr-works__grid { grid-template-columns: 1fr 1fr; }
  .fr-pills { grid-template-columns: 1fr; }
  .stats__grid--bare { grid-template-columns: repeat(2, 1fr); }
  .testimonial { flex: 0 0 100%; }
  .gallery__main img { height: 240px; }
  .gallery__thumbs { grid-template-columns: repeat(4, 1fr); }
  .resources__grid { grid-template-columns: 1fr; }
  .fr-territorial__hero img { height: 220px; }
  .fr-h { font-size: 22px; }
}

/* ============================================
   QUIÉNES SOMOS — Layout del mockup real
   ============================================ */

/* Title alineado a la izquierda */
.section-title--left { text-align: left; }

/* ¿Qué es Infamilia? */
.qs-intro {
  background: var(--cream);
  padding: 50px 0 90px;
}
.qs-intro__hero {
  border-radius: 18px;
  overflow: hidden;
  margin: 32px 0 50px;
}
.qs-intro__hero img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
}
.qs-intro__lead {
  color: var(--green-accent);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 18px;
  max-width: 880px;
}
.qs-intro__copy {
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.7;
  margin: 0 0 50px;
  max-width: 880px;
}
.qs-intro__split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  align-items: center;
  margin-top: 20px;
}
.qs-intro__split-media {
  border-radius: 18px;
  overflow: hidden;
}
.qs-intro__split-media img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}
.qs-intro__split-body p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--ink-soft);
}
.qs-intro__split-body strong {
  color: var(--green-accent);
  font-weight: 700;
}

/* ===== MISIÓN Y VISIÓN ===== */
.mv {
  position: relative;
  background: var(--cream);
  padding: 90px 0 100px;
  overflow: hidden;
}
.mv__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}
.mv .container { position: relative; z-index: 1; }
.mv .section-title { text-align: center; margin-bottom: 50px; }
.mv__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  max-width: 820px;
  margin: 0 auto;
}
.mv__card {
  background: var(--cream);
  border: 2px solid var(--orange);
  border-radius: 18px;
  padding: 36px 34px;
  text-align: center;
}
.mv__icon {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}
.mv__icon img {
  width: 56px;
  height: 56px;
}
.mv__card h3 {
  color: var(--green-accent);
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 14px;
}
.mv__card p {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.6;
  margin: 0;
}

/* ===== ¿QUÉ NOS HACE ÚNICOS? ===== */
.qs-unique {
  background: #fff;
  padding: 90px 0 110px;
}
.qs-unique .section-title { text-align: center; }
.qs-unique__lead {
  text-align: center;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.65;
  max-width: 760px;
  margin: -20px auto 56px;
}
.qs-unique__lead strong {
  color: var(--green-accent);
  font-weight: 700;
}
.qs-unique__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  max-width: 1080px;
  margin: 0 auto 70px;
}
.qs-feat {
  background: #f0eee6;
  border-radius: 18px;
  padding: 36px 34px;
}
.qs-feat h3 {
  color: var(--green-accent);
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px;
  line-height: 1.3;
}
.qs-feat p {
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.65;
  margin: 0;
}

.qs-unique__media {
  border-radius: 18px;
  overflow: hidden;
  max-width: 1080px;
  margin: 0 auto;
}
.qs-unique__media img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  display: block;
}

/* Responsive */
@media (max-width: 860px) {
  .qs-intro { padding: 30px 0 70px; }
  .qs-intro__hero img { height: 260px; }
  .qs-intro__lead { font-size: 20px; }
  .qs-intro__split { grid-template-columns: 1fr; gap: 24px; }
  .qs-intro__split-media img { height: 220px; }

  .mv { padding: 70px 0 80px; }
  .mv__grid { grid-template-columns: 1fr; max-width: 460px; }

  .qs-unique { padding: 70px 0 80px; }
  .qs-unique__grid { grid-template-columns: 1fr; }
  .qs-feat { padding: 28px 24px; }
  .qs-feat h3 { font-size: 18px; }
  .qs-unique__media img { height: 240px; }
}
@media (max-width: 560px) {
  .qs-intro__hero img { height: 200px; }
  .mv__card { padding: 28px 22px; }
  .mv__card h3 { font-size: 22px; }
  .qs-unique__lead br { display: none; }
}

/* ===== Misión / Visión / Valores ===== */
.mvv {
  background: var(--cream);
  padding: 0 0 100px;
}
.mvv__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 1080px;
  margin: 0 auto;
}
.mvv__card {
  background: #fff;
  border-radius: 18px;
  padding: 36px 30px;
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
  border: 1px solid #eee5d4;
  transition: transform .2s ease, box-shadow .2s ease;
}
.mvv__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,.08);
}
.mvv__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #eaf6e9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.mvv__card h3 {
  color: var(--green-accent);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px;
}
.mvv__card p {
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0;
}
.mvv__list {
  list-style: none;
  padding: 0;
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.8;
}
.mvv__list li { position: relative; padding-left: 18px; }
.mvv__list li::before {
  content: "•";
  color: var(--green-accent);
  font-weight: 800;
  position: absolute;
  left: 0;
}

/* ===== Timeline ===== */
.history {
  position: relative;
  background: var(--cream);
  padding: 100px 0 110px;
  overflow: hidden;
}
.history .container { position: relative; z-index: 1; }

.timeline {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
  padding-left: 32px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--green-accent);
  opacity: .35;
}
.timeline__item {
  position: relative;
  margin-bottom: 36px;
}
.timeline__item::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--green-accent);
  box-shadow: 0 0 0 4px rgba(90, 174, 88, .2);
}
.timeline__year {
  font-size: 14px;
  font-weight: 700;
  color: var(--green-accent);
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.timeline__body h4 {
  font-size: 18px;
  margin: 0 0 6px;
  color: var(--ink);
  font-weight: 700;
}
.timeline__body p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ===== Programas página ===== */
.programs--page { padding: 30px 0 110px; }
.program__bullets {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-size: 15px;
}
.program__bullets li {
  padding: 4px 0 4px 24px;
  position: relative;
}
.program__bullets li::before {
  content: "✓";
  color: var(--green-accent);
  font-weight: 800;
  position: absolute;
  left: 0;
}

/* ===== Contacto ===== */
.contact {
  position: relative;
  background: var(--cream);
  padding: 60px 0 100px;
  overflow: hidden;
}
.contact .container { position: relative; z-index: 1; }
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 50px;
  max-width: 1040px;
  margin: 0 auto;
}
.contact__info h3,
.contact__form h3 {
  color: var(--green-accent);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 22px;
}
.contact__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.contact__list li {
  margin-bottom: 22px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.contact__list strong {
  display: block;
  color: var(--ink);
  margin-bottom: 4px;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.contact__list a {
  color: var(--green-accent);
  text-decoration: none;
}
.contact__list a:hover { text-decoration: underline; }

/* Formulario */
.contact__form {
  background: #fff;
  border-radius: 18px;
  padding: 32px;
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
}
.form-row { margin-bottom: 16px; }
.form-row--two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.contact__form label {
  display: block;
}
.contact__form label span {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.contact__form input,
.contact__form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid #e2dccb;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: #faf7f0;
  color: var(--ink);
  transition: border-color .15s ease, background .15s ease;
}
.contact__form input:focus,
.contact__form textarea:focus {
  outline: none;
  border-color: var(--green-accent);
  background: #fff;
}
.contact__form textarea { resize: vertical; min-height: 110px; }
.contact__form .btn {
  margin-top: 8px;
  width: 100%;
}

/* Mapa */
.map { position: relative; }
.map iframe { display: block; }
.map__cta {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.map__cta .btn {
  box-shadow: 0 8px 22px rgba(0,0,0,.25);
}

/* ===== Transparencia ===== */
.transparency {
  position: relative;
  background: var(--cream);
  padding: 60px 0 90px;
  overflow: hidden;
}
.transparency .container { position: relative; z-index: 1; }
.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  max-width: 1080px;
  margin: 50px auto 0;
}
.doc-card {
  background: #fff;
  border-radius: 16px;
  padding: 28px 26px;
  box-shadow: 0 4px 14px rgba(0,0,0,.05);
  border: 1px solid #eee5d4;
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  display: block;
}
.doc-card:hover {
  transform: translateY(-3px);
  border-color: var(--green-accent);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}
.doc-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: #eaf6e9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.doc-card h4 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.doc-card p {
  margin: 0 0 14px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
}
.doc-card__link {
  color: var(--green-accent);
  font-weight: 600;
  font-size: 13.5px;
}

/* Lista de categorías de Transparencia (accordion) */
.trans-list {
  max-width: 1080px;
  margin: 50px auto 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.trans-cat {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,.05);
  border: 1px solid #eee5d4;
  overflow: hidden;
  transition: box-shadow .2s ease, border-color .2s ease;
}
.trans-cat:hover { border-color: #d8e7d4; }
.trans-cat summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  user-select: none;
}
.trans-cat summary::-webkit-details-marker { display: none; }
.trans-cat__title {
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.trans-cat__chev {
  color: var(--green-accent);
  font-size: 18px;
  font-weight: 700;
  transition: transform .25s ease;
}
.trans-cat[open] .trans-cat__chev { transform: rotate(180deg); }
.trans-cat[open] summary { border-bottom: 1px solid #f0e9d8; }

.trans-links {
  list-style: none;
  margin: 0;
  padding: 8px 0 14px;
}
.trans-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.trans-links li {
  border-bottom: 1px solid #f5efe2;
}
.trans-links li:last-child { border-bottom: none; }
.trans-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 26px 12px 38px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14.5px;
  line-height: 1.4;
  transition: color .15s ease, background .15s ease;
}
/* Cuando NO hay sub-headings (lista plana) el padding-left baja */
.trans-cat > ul.trans-links a { padding-left: 26px; }
.trans-links a:hover {
  color: var(--green-accent);
  background: #f8f5ec;
}
.trans-links a span {
  color: var(--green-accent);
  font-weight: 700;
  font-size: 13px;
}
/* Sub-encabezado de año dentro de un accordion */
.trans-year {
  margin: 14px 26px 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--green-accent);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.trans-links > .trans-year:first-child { margin-top: 4px; }

.info-cta {
  display: flex;
  align-items: center;
  gap: 30px;
  background: #fff;
  border-radius: 18px;
  padding: 32px 36px;
  margin: 60px auto 0;
  max-width: 1080px;
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
}
.info-cta > div { flex: 1; }
.info-cta h3 {
  margin: 0 0 8px;
  color: var(--green-accent);
  font-size: 20px;
  font-weight: 700;
}
.info-cta p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.55;
}
.info-cta .btn { white-space: nowrap; }

.privacy {
  background: #fff;
  padding: 90px 0 110px;
}

/* Responsive páginas interiores */
@media (max-width: 860px) {
  .mvv__grid { grid-template-columns: 1fr; }
  .docs-grid { grid-template-columns: 1fr 1fr; }
  .contact__grid { grid-template-columns: 1fr; gap: 36px; }
  .form-row--two { grid-template-columns: 1fr; }
  .info-cta { flex-direction: column; text-align: center; padding: 28px 24px; }
}
@media (max-width: 560px) {
  .docs-grid { grid-template-columns: 1fr; }
  .timeline { padding-left: 28px; }
  .mvv__card { padding: 28px 22px; }
  .page-section, .mvv, .contact, .transparency, .privacy { padding: 50px 0 70px; }
}

/* ===== Mobile Nav Toggle ===== */
.nav__toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 40px;
  height: 40px;
  margin-left: auto;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
}
.nav__toggle span,
.nav__toggle span::before,
.nav__toggle span::after {
  content: "";
  display: block;
  width: 22px;
  height: 2px;
  background: var(--green-deep);
  border-radius: 2px;
  position: relative;
  transition: transform .25s ease, top .25s ease;
}
.nav__toggle span::before { position: absolute; top: -7px; }
.nav__toggle span::after  { position: absolute; top:  7px; }
.nav.is-open .nav__toggle span { background: transparent; }
.nav.is-open .nav__toggle span::before { top: 0; transform: rotate(45deg); }
.nav.is-open .nav__toggle span::after  { top: 0; transform: rotate(-45deg); }

/* ===== Responsive — Tablet (≤1024px) ===== */
@media (max-width: 1024px) {
  .container, .container--narrow { padding: 0 24px; }
  .hero { min-height: 620px; }
  .hero__brand-name { font-size: 44px; }
  .hero__copy { font-size: 16px; }
  .program__media img { height: 320px; }
  .entornos__media img { height: 300px; }
}

/* ===== Responsive — Tablet pequeña (≤860px) ===== */
@media (max-width: 860px) {
  /* Nav colapsa a hamburguesa */
  .nav {
    flex-wrap: wrap;
    gap: 8px;
    border-radius: 22px;
    padding: 12px 14px 12px 16px;
    width: calc(100% - 32px);
  }
  .nav__logo { padding-right: 0; flex: 1; }
  .nav__toggle { display: inline-flex; }
  .nav__list {
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height .35s ease, opacity .25s ease, margin .25s ease;
    margin: 0;
  }
  .nav.is-open .nav__list {
    max-height: 480px;
    opacity: 1;
    pointer-events: auto;
    margin-top: 8px;
  }
  .nav__list li { width: 100%; }
  .nav__list li + li::before { display: none; }
  .nav__list a {
    display: block;
    padding: 12px 14px;
    border-radius: 10px;
    width: 100%;
  }
  .nav__list li + li {
    border-top: 1px solid #ececec;
  }
  /* Submenu en móvil: inline, sin posición absoluta */
  .nav__sub {
    position: static;
    transform: none !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    box-shadow: none;
    border-radius: 0;
    background: #f9f5ec;
    padding: 4px 0;
    margin: 4px 0 0;
    min-width: 0;
  }
  .nav__sub a {
    padding: 10px 14px 10px 28px;
    font-size: 13.5px;
  }
  .nav__sub li + li { border-top: 1px solid #ececec; }

  /* Hero */
  .hero { min-height: auto; padding-bottom: 0; }
  .hero__panel {
    margin: 70px auto 0;
    padding: 0 24px 64px;
  }
  .hero__panel > * { max-width: 100%; }
  .hero__logo-img { height: 80px; margin-bottom: 22px; }
  .hero__copy { font-size: 15.5px; line-height: 1.6; }

  /* Section titles */
  .section-title { font-size: clamp(28px, 5.5vw, 38px); margin-bottom: 40px; }

  /* Stats */
  .stats { padding: 80px 0 90px; }
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
  .stats__grid .stat,
  .stats__grid .stat:nth-child(4),
  .stats__grid .stat:nth-child(5) { grid-column: auto; }
  .stat { padding: 24px 18px 22px; }
  .stat__num { font-size: 38px; }

  /* Programas — espaciado generoso */
  .programs { padding: 40px 0 80px; }
  .program, .program--reverse {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 0;
    margin-bottom: 56px;
  }
  .program:last-child, .program--reverse:last-child { margin-bottom: 0; }
  .program--reverse .program__media { order: 0; }
  .program__media { margin: 0; }
  .program__media img {
    height: 240px;
    width: 100%;
    display: block;
    border-radius: 16px;
  }
  .program__body { padding: 0; }
  .program__title { font-size: 26px; margin-bottom: 16px; }
  .program__body p { font-size: 15px; margin-bottom: 28px; line-height: 1.6; }
  .program__bullets { margin-bottom: 28px; }
  .program .btn { margin-top: 8px; }

  /* Entornos — más aire */
  .entornos { padding: 70px 0 90px; }
  .entornos__title { font-size: clamp(24px, 5.2vw, 34px); margin-bottom: 32px; }
  .entornos__media { margin: 0 0 32px; }
  .entornos__media img {
    height: 240px;
    width: 100%;
    display: block;
    border-radius: 16px;
  }
  .entornos__caption { font-size: 13.5px; padding: 0 8px; margin-bottom: 32px; }
  .entornos__caption br { display: none; }
  .entornos__cta { margin-top: 8px; }

  /* Footer */
  .footer { padding: 56px 0 32px; text-align: center; }
  .footer__top { max-width: 100%; margin: 0 auto; }
  .footer__social { justify-content: center; }
  .footer__cols {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    text-align: center;
  }
  .footer__brand {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .footer__logo { margin-left: auto; margin-right: auto; }
  .footer__heading { font-size: 20px; }
  .footer__rule { margin: 32px 0 28px; }
}

/* ===== Responsive — Móvil (≤560px) ===== */
@media (max-width: 560px) {
  .container, .container--narrow { padding: 0 18px; }

  /* Hero */
  .hero__panel { padding: 0 20px 52px; margin-top: 60px; }
  .hero__logo-img { height: 64px; margin-bottom: 18px; }
  .hero__copy { font-size: 14.5px; line-height: 1.55; }

  /* Nav */
  .nav {
    margin-top: 18px;
    width: calc(100% - 24px);
    padding: 10px 12px 10px 14px;
  }
  .nav__logo img { height: 36px; }

  /* Section titles */
  .section-title { font-size: clamp(24px, 6vw, 30px); margin-bottom: 32px; }

  /* Stats → 1 columna */
  .stats { padding: 60px 0 70px; }
  .stats__grid { grid-template-columns: 1fr; gap: 16px; }
  .stat { padding: 26px 22px; }
  .stat__num { font-size: 42px; }
  .stat__label { font-size: 13px; }
  .stat__label br { display: none; }

  /* Programas */
  .programs { padding: 16px 0 60px; }
  .program__media img { height: 200px; }
  .program__title { font-size: 24px; }

  /* Entornos */
  .entornos { padding: 50px 0 70px; }
  .entornos__media img { height: 200px; }
  .entornos__caption { font-size: 13px; line-height: 1.6; }

  /* Footer */
  .footer { padding: 48px 0 28px; font-size: 13.5px; }
  .footer__heading { font-size: 18px; }
  .footer__lead { font-size: 14px; }
  .footer__lead br { display: none; }
  .footer__brand-text strong { font-size: 20px; }
  .footer__col h4 { font-size: 16px; }

  /* Botones - touch target ≥ 44px */
  .btn { padding: 12px 24px; font-size: 14.5px; min-height: 44px; }

  /* Formas decorativas se reducen */
  .stats__shape--left, .stats__shape--right,
  .entornos__shape--left, .entornos__shape--right {
    transform: scale(.7);
    opacity: .5;
  }
}

/* ===== Responsive — Móvil pequeño (≤380px) ===== */
@media (max-width: 380px) {
  .hero__logo-img { height: 54px; }
  .nav__logo img { height: 32px; }
  .stat__num { font-size: 36px; }
  .program__title { font-size: 22px; }
  .entornos__title { font-size: 22px; }
}

/* ===== Garantía global de espaciado en móvil ===== */
@media (max-width: 860px) {
  /* Toda foto principal en cards de contenido respira con margin */
  .fr-intro__media,
  .fr-intro__media img,
  .fr-territorial__hero,
  .fr-territorial__hero img,
  .fr-territorial__photo,
  .fr-territorial__photo img,
  .is-intro__media,
  .is-intro__media img,
  .qs-intro__hero,
  .qs-intro__hero img,
  .qs-intro__split-media,
  .qs-intro__split-media img,
  .qs-unique__media,
  .qs-unique__media img {
    margin: 0;
    width: 100%;
    display: block;
  }
  /* Gallery imagen principal */
  .gallery__main { margin-bottom: 24px; }
  /* Splits con foto + texto: gap consistente */
  .fr-intro__split,
  .fr-territorial__split,
  .is-intro__split,
  .qs-intro__split {
    gap: 32px;
  }
  /* Cards bloque de texto sobre foto: respiración */
  .fr-territorial__card { margin-bottom: 8px; padding: 32px 24px; }
  /* Botones siempre tienen aire arriba */
  .program .btn,
  .fr-intro .btn,
  .is-intro .btn,
  .entornos__cta .btn,
  .map__cta .btn { margin-top: 12px; }
  /* Spacing entre header de seccion y contenido */
  .section-title { margin-bottom: 36px !important; }
  .fr-h { margin-bottom: 28px; }
  /* Resources card */
  .resource { padding: 24px 22px; }
}

/* ===== Directorio responsive ===== */
@media (max-width: 860px) {
  .hero--compact { min-height: 280px; }
  .team { padding: 40px 0 70px; }
  .team__grid { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
  .member__photo { width: 130px; height: 130px; }
  .member__name { font-size: 16px; }
  .org { padding: 60px 0 70px; }
}
@media (max-width: 560px) {
  .team__grid { grid-template-columns: 1fr; gap: 36px; }
  .member__photo { width: 140px; height: 140px; }
  .breadcrumb { font-size: 12.5px; }
}

/* ===== Evita scroll horizontal ===== */
html, body { overflow-x: hidden; max-width: 100%; }
img, svg { max-width: 100%; height: auto; }
