/* ============================================================
   UNICEF – Entornos que Cuidan
   Prefijo .ec-  (aislado del contexto Drupal)
   ============================================================ */

html, body { margin: 0; padding: 0; }

/* ---------- Fuentes ---------- */
@font-face {
  font-family: "Noto Sans EC";
  src: url("../fonts/NotoSans-VariableFont_wdth,wght.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans EC";
  src: url("../fonts/NotoSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Trendify";
  src: url("../fonts/Trendify.otf") format("opentype");
  font-weight: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
.ec-root {
  --ec-azul: #00aeef;
  --ec-azul-claro: #9adbe8;
  --ec-azul-osc: #0047bb;
  --ec-verde-osc: #004c45;
  --ec-amarillo: #ffb500;
  --ec-naranja: #ff8200;

  --ec-text-white: #ffffff;
  --ec-max: 1200px;

  font-family: "Noto Sans EC", "Noto Sans", system-ui, -apple-system, sans-serif;
  color: var(--ec-azul-osc);
  line-height: 1.5;
  box-sizing: border-box;
}
.ec-root *, .ec-root *::before, .ec-root *::after { box-sizing: inherit; }
.ec-root img { display: block; max-width: 100%; }

/* ---------- Fondo global ---------- */
.ec-root {
  width: 100%;
  margin: 0;
  background-color: #d3ecfa;
  background-image: url("../images/fondo.jpg");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: cover;
  overflow: hidden;
  position: relative;
}

.ec-inner {
  position: relative;
  z-index: 1;
  max-width: var(--ec-max);
  margin: 0 auto;
  padding: 40px 40px 60px;
}

/* ============================================================
   HEADER 50/50
   ============================================================ */
.ec-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  margin-bottom: 30px;
}

.ec-titulo {
  width: clamp(280px, 42vw, 500px);
  height: auto;
  margin-left: clamp(-40px, -3vw, -20px);
}

.ec-logos {
  width: 100%;
  max-width: 380px !important;
  height: auto;
  justify-self: end;
}

/* ============================================================
   INTRO
   ============================================================ */
.ec-intro {
  margin: 0 auto 20px auto;
  max-width: 780px;
  text-align: center;
  font-size: 18px;
  line-height: 1.6;
  color: #fff;
  font-weight: 400;
  word-break: keep-all;
  overflow-wrap: normal;
}

.ec-intro strong { font-weight: 700; }

/* ============================================================
   HERO: foto jóvenes + título con flecha (círculos SOLO aquí)
   ============================================================ */
.ec-hero-wrap {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 10px;
    padding: 0;
    background-image: url(../images/circulos.png);
    background-repeat: no-repeat;
    background-position: 0px -200px;
    background-size: 100% auto;
}
.ec-hero {
  position: relative;
  max-width: var(--ec-max);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.ec-jovenes {
  width: 100%;
  max-width: 720px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Botón con el título "Así estamos construyendo paz" (con flecha) */
.ec-titulo2-btn {
  position: absolute;
  bottom: 22%;
  left: 50%;
  transform: translateX(-50%);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.35s ease;
  z-index: 3;
}

.ec-titulo2-btn:hover,
.ec-titulo2-btn:focus {
  transform: translateX(-50%) scale(1.06) translateY(3px);
  outline: none;
}

.ec-titulo2 {
  width: clamp(240px, 32vw, 380px);
  height: auto;
  display: block;
}

/* ============================================================
   TARJETAS CIFRAS (con margen negativo sobre la foto)
   ============================================================ */
.ec-tarjetas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 2vw, 28px);
  max-width: 800px;
  margin: -80px auto 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 4;
}

.ec-tarjeta {
  transition: transform 0.4s ease;
  cursor: pointer;
  transform-origin: center center;
}

.ec-tarjeta img {
  width: 100%;
  height: auto;
  display: block;
}

/* Hover: zoom + rotación ligera alternada según variante */
.ec-tarjeta--naranja:hover { transform: scale(1.08); }
.ec-tarjeta--celeste:hover { transform: scale(1.10); }
.ec-tarjeta--azul:hover    { transform: scale(1.08); }

/* ============================================================
   DESTACADO (swap desktop/móvil) con hover zoom
   ============================================================ */
.ec-destacado-wrap {
  text-align: center;
  margin: 40px 0 30px 0;
}

.ec-root img.ec-destacado {
  height: auto;
  transition: transform 0.35s ease;
  cursor: pointer;
}

.ec-root img.ec-destacado:hover {
  transform: scale(1.03);
}

.ec-root img.ec-destacado--desktop {
  display: block;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.ec-root img.ec-destacado--movil { display: none; }

/* ============================================================
   CONTENEDORES 3 columnas (20 / 7 / 6)
   ============================================================ */
.ec-contenedores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
  max-width: 1000px;
  margin: 20px auto 40px auto;
  padding: 0 20px;
}

.ec-contenedor {
  cursor: pointer;
  transition: transform 0.4s ease;
  transform-origin: center center;
  perspective: 800px;
}

/* Cada uno gira ligeramente en dirección alterna */
.ec-contenedor:nth-child(1):hover { transform: scale(1.06); }
.ec-contenedor:nth-child(2):hover { transform: scale(1.08); }
.ec-contenedor:nth-child(3):hover { transform: scale(1.06); }

.ec-contenedor img {
  width: 100%;
  height: auto;
  display: block;
}

/* La flecha superior gira al hacer hover al contenedor */
.ec-contenedor:hover img {
  animation: ec-pulse 0.6s ease;
}

@keyframes ec-pulse {
  0% { filter: brightness(1); }
  50% { filter: brightness(1.1); }
  100% { filter: brightness(1); }
}

/* ============================================================
   CIERRE
   ============================================================ */
.ec-cierre {
  margin: 0 auto 24px auto;
  max-width: 780px;
  text-align: center;
    font-size: 18px !important;
  line-height: 1.6;
  color: var(--ec-azul-osc);
  font-weight: 400;
    word-break: keep-all;
  overflow-wrap: normal;
}

.ec-cierre strong { font-weight: 700; }

/* ============================================================
   BOTÓN CTA (CSS puro)
   ============================================================ */
.ec-cta-wrap {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.ec-cta-btn {
  display: inline-block;
  background: var(--ec-azul-osc);
  color: var(--ec-text-white);
  text-decoration: none;
  padding: 12px 42px;
  border-radius: 999px;
  font-weight: 700;
  font-size: clamp(15px, 1.2vw, 17px);
  letter-spacing: 0.4px;
  box-shadow: 0 6px 20px rgba(0, 71, 187, 0.35);
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.ec-cta-btn:hover,
.ec-cta-btn:focus {
  background: var(--ec-azul);
  transform: scale(1.08);
  box-shadow: 0 10px 28px rgba(0, 174, 239, 0.45);
  outline: none;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 820px) {
  .ec-root { background-size: cover; }
  .ec-inner { padding: 24px 20px 40px; }

  /* Header: logos primero, título después */
  .ec-header {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
    margin-bottom: 20px;
  }

  .ec-logos {
    max-width: 240px;
    justify-self: center;
    order: 1;
  }

  .ec-titulo {
    max-width: 320px;
    margin: 0 auto;
    order: 2;
  }

  /* Intro y cierre más pequeños */
    .ec-intro, .ec-cierre { font-size: 15px; text-align: left; }

  /* Hero */
  .ec-hero-wrap { background-size: cover; background-position: center; }
  .ec-hero { padding: 0 20px; }

  .ec-titulo2-btn {
    bottom: 18%;
  }
  .ec-titulo2 {
    width: clamp(200px, 60vw, 300px);
  }

  /* Tarjetas cifras: mantener 3 columnas con margen negativo menor */
  .ec-tarjetas {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: -40px;
    padding: 0 10px;
  }

  /* Destacado swap */
  .ec-root img.ec-destacado--desktop { display: none; }
  .ec-root img.ec-destacado--movil {
    display: block;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
  }

  /* Contenedores apilados verticalmente */
  .ec-contenedores {
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 320px;
    padding: 0;
  }

  /* Botón CTA más pequeño */
  .ec-cta-btn {
    padding: 12px 36px;
    font-size: 18px !important;
  }
}

@media (max-width: 480px) {
  .ec-inner { padding: 20px 16px 32px; }
  .ec-titulo { max-width: 260px; }
  .ec-titulo2-btn { bottom: 16%; }
  .ec-tarjetas { margin-top: -30px; gap: 6px; }
}

  .ec-intro, .ec-cierre { font-size: 18px !important; }

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .ec-root * { animation: none !important; transition: none !important; }
}
