/* ============================================================
   Proyecto de Carbono Forestal Agrupado
   Paleta: verde #86A329 · verde oscuro #4a6b1e · azul #2b7aa8
           texto #666666 · beige #E8E1DA
   ============================================================ */

:root {
  --cfa-green: #86A329;
  --cfa-green-dark: #4a6b1e;
  --cfa-green-darker: #24421a;
  --cfa-blue: #2b7aa8;
  --cfa-teal: #2a9d8f;
  --cfa-orange: #d97b19;
  --cfa-text: #666666;
  --cfa-beige: #E8E1DA;
}

.cfa-page { color: var(--cfa-text); }

/* Banda intro: texto más ancho (como patrimonio.html, no el 500px del reverse) */
.two-column-section.reverse.cfa-intro .column-content { max-width: 800px; }

/* Contenedor centrado */
.cfa-container {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* ---------- Hero ---------- */
.cfa-hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  color: #ffffff;
}
.cfa-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.55) 100%);
}
.cfa-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 0 40px 60px;
}
.cfa-hero h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 14px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.cfa-hero p {
  font-size: 1.25rem;
  font-weight: 500;
  max-width: 720px;
  margin: 0;
  text-shadow: 0 1px 6px rgba(0,0,0,0.35);
}
.cfa-hero-bar {
  height: 12px;
  background: var(--cfa-green);
}

/* ---------- Título de sección (icono + chevron + texto) ---------- */
.cfa-section { padding: 56px 0; }
.cfa-section-alt { background: #f6f6f2; }

.cfa-section-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 28px;
}
.cfa-section-title .cfa-ico {
  font-size: 2rem;
  color: var(--cfa-green);
  flex: 0 0 auto;
}
.cfa-section-title h2 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--cfa-green-dark);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cfa-section-title h2 .fa-chevron-right {
  font-size: 1.3rem;
  margin-right: 8px;
  color: var(--cfa-green);
}

/* ---------- Resumen (dos columnas) ---------- */
.cfa-two-col {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: center;
}
.cfa-two-col .cfa-block {
  background: var(--cfa-green);
  color: #fff;
  border-radius: 10px;
  padding: 48px 36px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.cfa-two-col .cfa-block i { font-size: 2.6rem; }
.cfa-two-col .cfa-block h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin: 0;
  text-transform: uppercase;
}
.cfa-two-col .cfa-text p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin: 0 0 16px;
  text-align: justify;
}
.cfa-two-col .cfa-text p:last-child { margin-bottom: 0; }

/* ---------- Resumen (banda verde izq: icono+título · texto der) ---------- */
.cfa-resumen { height: auto; }
.cfa-resumen .column-left { padding: 0; position: relative; }
.cfa-resumen .column-left > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
/* Título estilo INTEGRIDAD (.valor-title de nosotros.html) */
.cfa-resumen-titulo {
  position: absolute;
  top: 50%;
  left: 30%;
  transform: translateY(-50%);
  margin: 0;
  z-index: 2;
  color: #ffffff;
  font-size: 2.5rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
}
.cfa-resumen-titulo i { margin-right: 8px; }
.cfa-resumen .column-right {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 60px;
  height: auto;          /* anula el height:100% base para que 'stretch' lo estire */
  align-self: stretch;   /* se estira a la altura de la sección → el texto centra */
}
.cfa-resumen .column-right p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin: 0;
  text-align: justify;
  color: var(--cfa-text);
  max-width: 640px;
}

/* ---------- Objetivo principal ----------
   Reutiliza íntegramente el patrón .sustainability-section del home
   (mismo fondo, overlay, layout e icono icono-sostenibilidad.webp). Sin CSS extra. */

/* ---------- Descripción general: banda verde con silueta + icono + título ---------- */
.cfa-desc-section { padding-top: 0; }
.cfa-desc-banner {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  min-height: 130px;
  background-color: #99a424;
  background-image: url('../img/carbono_forestal/banner-silueta.webp');
  background-repeat: repeat-x;
  background-position: bottom center;
  background-size: auto 100%;
  display: flex;
  align-items: center;
  justify-content: center;          /* centra el .sustainability-content, igual que la sección Objetivo */
  padding: 14px 40px;               /* mismo padding horizontal que .sustainability-section */
  overflow: hidden;
}
/* icono y título reutilizan .sustainability-icon / .sustainability-label (como Objetivo principal).
   El icono ocupa el mismo footprint de 100px que Objetivo para que el título quede alineado. */
.cfa-desc-banner .sustainability-icon {
  width: 100px;
  display: flex;
  align-items: center;
}
.cfa-desc-banner .sustainability-icon img { width: auto; height: 92px; }

/* ---------- Descripción general: split 50/50 (KPIs izq · mapa toda la derecha) ---------- */
.cfa-desc-split {
  display: flex;
  align-items: stretch;
  width: 100%;
}
.cfa-desc-left {
  flex: 0 0 50%;
  max-width: 50%;
  box-sizing: border-box;
  display: block;
}
.cfa-desc-left .cfa-kpi-grid { width: 100%; height: 100%; }
.cfa-desc-right {
  flex: 0 0 50%;
  max-width: 50%;
  position: relative;
  background: #ffffff;
  overflow: hidden;
}
.cfa-desc-right > img {
  display: block;
  width: 100%;
  height: auto;
}
/* labels traducibles superpuestos al mapa */
.cfa-mapa-titulo {
  position: absolute;
  top: 10.5%;
  left: 17.5%;
  transform: translateY(-50%);
  max-width: 26%;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #839023;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.15;
}
.cfa-mapa-titulo .fa-chevron-right { color: #99a424; font-size: 1.25rem; flex: 0 0 auto; }
.cfa-mapa-leyenda {
  position: absolute;
  top: 78%;
  left: 17.5%;
  transform: translateY(-50%);
  max-width: 17%;
  margin: 0;
  color: #666666;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
}
.cfa-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 221fr 272fr 81fr 188fr 223fr;  /* proporciones medidas del PDF */
  gap: 0;
}
/* Resto de la página (ODS + Garantías + Timeline) como imagen, swap ES/EN.
   width:100% (no 100vw) para conservar el mismo ancho que las secciones de arriba. */
.cfa-resto-img {
  display: block;
  width: 100%;
  height: auto;
}
.m-box { border-radius: 0; }
.m-blue      { background: #176f9f; }  /* VCS + CCB */
.m-lightblue { background: #739eb8; }  /* Metodología (texto) */
.m-teal      { background: #186656; }  /* Horizonte */
.m-green     { background: #2a9564; }  /* Sumidero de Carbono */
.m-bar       { background: #99a424; grid-column: 1 / -1; }  /* ID 3734 (full width) */
.m-img {
  background-color: #e9e9e9;
  background-size: cover;
  background-position: center;
  position: relative;
}
/* texto i18n superpuesto sobre las imágenes con letras (2 y 4) */
.m-txt {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  text-align: right;
  gap: 2px;
  padding: 12px clamp(14px, 3%, 34px);
  color: #ffffff;
  text-shadow: 0 1px 8px rgba(0,0,0,0.45);
}
.m-txt .m-med   { font-size: clamp(0.95rem, 1.7vw, 1.45rem); font-weight: 500; }
.m-txt .m-big   { font-size: clamp(1.25rem, 2.3vw, 2.1rem); font-weight: 800; line-height: 1.1; }
.m-txt .m-small { font-size: clamp(0.8rem, 1.4vw, 1.15rem); font-weight: 500; }

/* texto i18n en las cajas de color (centrado, blanco) */
.m-blue, .m-lightblue, .m-teal, .m-green {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  padding: 14px 18px;
  gap: 6px;
}
.mk-lg { font-size: clamp(1.15rem, 2.3vw, 1.9rem); font-weight: 800; line-height: 1.15; }
.mk-md { font-size: clamp(1rem, 1.95vw, 1.55rem); font-weight: 700; line-height: 1.3; }
.mk-sm { font-size: clamp(0.9rem, 1.6vw, 1.25rem); font-weight: 500; line-height: 1.3; }
/* barra ID: 3734 / link (full width) */
.m-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px clamp(16px, 3.5%, 46px);
  color: #ffffff;
  flex-wrap: wrap;
}
.m-bar .m-id { font-size: clamp(1.05rem, 2vw, 1.7rem); font-weight: 800; }
.m-bar .m-link {
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(0.9rem, 1.7vw, 1.35rem);
}
.m-bar .m-link .m-aqui {
  background: var(--cfa-green-dark);
  padding: 4px 14px;
  border-radius: 7px;
}
.m-bar .m-link .fa-caret-left { font-size: 1.4em; }
.m-bar .m-link:hover .m-aqui { background: var(--cfa-green-darker); }
.cfa-kpi {
  border-radius: 10px;
  padding: 22px 20px;
  color: #fff;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.cfa-kpi .cfa-kpi-big { font-size: 1.5rem; font-weight: 800; line-height: 1.15; }
.cfa-kpi .cfa-kpi-small { font-size: 0.95rem; line-height: 1.35; margin-top: 6px; }
.cfa-kpi.is-blue  { background: var(--cfa-blue); }
.cfa-kpi.is-green { background: var(--cfa-green); }
.cfa-kpi.is-dark  { background: var(--cfa-green-dark); }
.cfa-kpi.is-teal  { background: var(--cfa-teal); }
.cfa-kpi.wide { grid-column: 1 / -1; }

/* fila ID + link */
.cfa-id-row {
  grid-column: 1 / -1;
  background: var(--cfa-green);
  border-radius: 10px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: #fff;
  flex-wrap: wrap;
}
.cfa-id-row strong { font-size: 1.15rem; }
.cfa-id-row a {
  color: #fff;
  background: var(--cfa-green-dark);
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background .25s ease;
}
.cfa-id-row a:hover { background: var(--cfa-green-darker); }

.cfa-mapa { text-align: center; }
.cfa-mapa img { max-width: 100%; height: auto; }

/* ---------- Bloques ODS ---------- */
.cfa-ods-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.cfa-ods {
  border-radius: 10px;
  padding: 32px 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 230px;
}
.cfa-ods.is-impacto { background-size: cover; background-position: center; }
.cfa-ods.is-impacto::before { content:''; position:absolute; inset:0; background: rgba(36,66,26,0.55); }
.cfa-ods.is-blue { background: var(--cfa-blue); }
.cfa-ods.is-teal { background: var(--cfa-teal); }
.cfa-ods.is-orange { background: var(--cfa-orange); }
.cfa-ods > * { position: relative; z-index: 2; }
.cfa-ods h3 {
  font-size: 1.7rem;
  font-weight: 800;
  margin: 0 0 10px;
  line-height: 1.15;
}
.cfa-ods h3 i { margin-right: 8px; }
.cfa-ods p { font-size: 1.05rem; line-height: 1.5; margin: 0; font-weight: 500; }
.cfa-ods .cfa-ods-badges {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cfa-ods .cfa-ods-badges img { width: 72px; height: 72px; border-radius: 4px; }
.cfa-ods .cfa-impacto-imgs {
  margin-top: auto;
  padding-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.cfa-ods .cfa-impacto-imgs img { width: 100%; height: 80px; object-fit: cover; border-radius: 6px; }

/* ---------- Garantías ---------- */
.cfa-garantias {
  position: relative;
  background-size: cover;
  background-position: center;
  color: #fff;
}
.cfa-garantias::before { content:''; position:absolute; inset:0; background: rgba(20,34,15,0.78); }
.cfa-garantias .cfa-container { position: relative; z-index: 2; padding-top: 56px; padding-bottom: 56px; }
.cfa-garantias .cfa-section-title h2 { color: #fff; }
.cfa-garantias .cfa-section-title .cfa-ico { color: #cfe08a; }
.cfa-gar-list { display: grid; gap: 22px; max-width: 900px; }
.cfa-gar-item {
  border-left: 4px solid var(--cfa-green);
  padding-left: 18px;
  font-size: 1.15rem;
  line-height: 1.5;
}
.cfa-fsc { margin-top: 30px; }
.cfa-fsc img { width: 120px; height: auto; background: #fff; border-radius: 6px; padding: 6px; }

/* ---------- Línea de tiempo ---------- */
.cfa-timeline-wrap { overflow-x: auto; }
.cfa-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(200px, 1fr));
  gap: 14px;
  min-width: 900px;
}
.cfa-step {
  background: var(--cfa-green);
  color: #fff;
  border-radius: 10px;
  padding: 22px 18px 26px;
  position: relative;
  text-align: center;
}
.cfa-step:nth-child(1) { background: #a6be2e; }
.cfa-step:nth-child(2) { background: #8ba52a; }
.cfa-step:nth-child(3) { background: #6d8621; }
.cfa-step:nth-child(4) { background: #56701a; }
.cfa-step .cfa-step-num {
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 800;
  background: rgba(255,255,255,0.25);
  width: 42px; height: 42px; line-height: 42px;
  border-radius: 50%;
  margin-bottom: 12px;
}
.cfa-step .cfa-step-ha { font-size: 0.85rem; opacity: .9; margin-bottom: 6px; }
.cfa-step p { font-size: 1rem; font-weight: 600; line-height: 1.35; margin: 0; }
.cfa-timeline-foot {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.cfa-timeline-foot .cfa-year {
  background: var(--cfa-green-dark);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 800;
  padding: 8px 34px;
  border-radius: 8px;
}
.cfa-timeline-foot .cfa-sem { font-weight: 700; color: var(--cfa-green-dark); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cfa-hero h1 { font-size: 2.2rem; }
  .cfa-hero p { font-size: 1.05rem; }
  .cfa-two-col,
  .cfa-ods-grid { grid-template-columns: 1fr; }
  .cfa-section-title h2 { font-size: 1.6rem; }
  /* Descripción general: apilar el split en móvil */
  .cfa-desc-split { flex-direction: column; }
  .cfa-desc-left,
  .cfa-desc-right { flex: 0 0 100%; max-width: 100%; }
  .cfa-desc-left { padding: 30px 24px; }
  .cfa-mapa-titulo { font-size: 1.4rem; }
  .cfa-mapa-leyenda { font-size: 0.9rem; }
}
@media (max-width: 520px) {
  .cfa-kpi-grid { grid-template-columns: 1fr; }
  .cfa-hero-content { padding: 0 20px 40px; }
}
