/* ==========================================================
   Leyes con enfoque humano, sello de la LXII Legislatura
   ========================================================== */

:root {
  --oliva: #83754B;
  --oliva-oscuro: #6B5F3C;
  --dorado: #CCB26E;
  --gris: #9A9A9A;
  --arena: #F5EBDC;
  --taupe: #8B7D66;
  --tinta: #221F1A;
  --tinta-suave: #3A362C;
  --gris-texto: #6E6A5B;
  --ancho: 1100px;
  --gutter: 24px;
}

/* ---------- Base ---------- */

html, body { margin: 0; padding: 0; width: 100%; min-height: 100%; }

html {
  background-color: #F0DDBB;
  background-image: url('assets/leyesHumano/uploads/backgroud_segundo-informe.webp');
  background-size: 1920px auto;
  background-position: center top;
  background-repeat: repeat;
  background-attachment: fixed;
}
html.sin-textura { background-image: none; }

a { color: var(--oliva); }
a:hover { color: var(--oliva-oscuro); }

.pagina {
  font-family: 'Jost', sans-serif;
  color: var(--tinta);
  overflow-x: hidden;
}

.contenedor {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Navegación, franjas y pie ---------- */

.nav {
  height: 74px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav__enlace { display: flex; align-items: center; justify-content: center; padding: 8px 16px; }
.nav__logo { display: block; height: 34px; width: auto; }

.franja { height: 56px; background: var(--oliva); }

.pie { background: #fff; display: flex; align-items: center; min-height: 110px; }
.pie__contenido {
  width: 100%;
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
}
.pie__logo { display: block; height: 51px; width: auto; max-width: 100%; }

/* ---------- Encabezado ---------- */

.encabezado {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 54px var(--gutter) 30px;
}

.titulo-principal {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  color: var(--oliva);
  text-align: center;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.08;
  letter-spacing: 0.2px;
  margin: 0 0 26px;
  text-wrap: pretty;
}

.entrada {
  font-weight: 600;
  font-size: clamp(16px, 1.5vw, 21px);
  line-height: 1.6;
  color: var(--gris-texto);
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
  text-wrap: pretty;
  margin: 0;
}
.entrada--clara { color: #fff; }

.banda { background: var(--oliva); padding: 30px 0; }

/* ---------- Mosaico y créditos ---------- */

.mosaico {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 34px;
}
.mosaico__celda { aspect-ratio: 1 / 1.15; background: var(--gris); overflow: hidden; }
.mosaico__celda--dorada { background: var(--dorado); }
.mosaico__celda img { display: block; width: 100%; height: 100%; object-fit: cover; }

.creditos {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 16px 4px 14px;
}
.creditos p { font-size: 14px; font-weight: 500; color: var(--tinta-suave); margin: 0; }
.creditos span { font-family: 'Anton', sans-serif; color: var(--oliva); letter-spacing: .3px; }

.linea { height: 3px; background: var(--oliva); }

/* ---------- Cifras ---------- */

.titulo-seccion {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  color: var(--oliva);
  text-align: center;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1.1;
  max-width: var(--ancho);
  margin: 44px auto 16px;
  padding: 0 var(--gutter);
  text-wrap: pretty;
}
.titulo-seccion--grupos {
  font-size: clamp(30px, 4.4vw, 56px);
  margin: 10px auto 0;
  padding-bottom: 20px;
}

.banda--fecha { padding: 10px 0; margin-bottom: 34px; }
.banda--fecha p {
  font-weight: 700;
  font-size: clamp(17px, 1.8vw, 24px);
  color: #fff;
  text-align: center;
  margin: 0;
  padding: 0 var(--gutter);
}

.contenedor--cifras { padding-bottom: 40px; }

.cifras {
  border: 3px solid var(--dorado);
  padding: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.cifra {
  --color: var(--tinta-suave);
  background: var(--arena);
  color: var(--color);
  padding: 26px 16px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  min-height: 210px;
}
.cifra--oscura { --color: #fff; background: var(--taupe); }
.cifra--doble { justify-content: center; gap: 4px; padding: 22px 16px 20px; }

.cifra svg {
  fill: none;
  stroke: var(--color);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cifra__numero { font-weight: 600; font-size: 46px; line-height: 1; }
.cifra--doble .cifra__numero { font-size: 44px; }
.cifra--doble .cifra__numero + .cifra__texto + .cifra__numero { margin-top: 4px; }
.cifra__texto { font-weight: 500; font-size: 17px; line-height: 1.25; text-align: center; }

/* ---------- Grupos prioritarios ---------- */

.grupo { margin-top: 34px; }
.grupo--mujeres { margin-top: 0; }

.grupo__banda { background: var(--oliva); padding: 14px 0; }
.grupo__banda h2 {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  color: #fff;
  text-align: center;
  font-size: clamp(26px, 3.2vw, 44px);
  line-height: 1.15;
  margin: 0;
  padding: 0 var(--gutter);
}

.grupo__portada { background: #DDD2E3; overflow: hidden; }
.grupo__portada img { display: block; width: 100%; max-width: var(--ancho); height: auto; margin: 0 auto; }

.grupo__cuerpo {
  max-width: var(--ancho);
  margin: 0 auto;
  padding: 30px var(--gutter) 10px;
}
.grupo--mujeres .grupo__cuerpo { padding-top: 26px; }
.grupo--justicia .grupo__cuerpo { padding-bottom: 92px; }

.texto {
  font-weight: 500;
  font-size: clamp(15px, 1.15vw, 18px);
  line-height: 1.62;
  color: var(--tinta);
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
  text-wrap: pretty;
  margin: 0 0 18px;
}
.texto:last-child { margin-bottom: 0; }
.texto--mas-espacio { margin-bottom: 26px; }

/* Filas de ilustración + texto */
.fila { display: flex; flex-wrap: wrap; gap: 26px; align-items: center; }
.fila--invertida { flex-direction: row-reverse; }
.fila--arriba { align-items: flex-start; }
.fila--amplia { gap: 30px; }
.fila--separada { margin-bottom: 22px; }

.columna { flex: 1 1 300px; min-width: 260px; }
.columna--ancha { flex: 2 1 380px; min-width: 280px; }
.grupo--indigenas .columna--ancha { flex-basis: 400px; }

/* Ilustraciones: tamaño de cada una según su sección */
.ilustracion { flex: 1 1 280px; min-width: 240px; display: flex; justify-content: center; }
.ilustracion img { display: block; max-width: 100%; width: auto; height: auto; }

.ilustracion--caja { flex: 1 1 300px; min-width: 250px; max-width: 420px; display: block; }
.ilustracion--caja img { width: 100%; max-height: 300px; object-fit: cover; }

.grupo--indigenas  .ilustracion { flex: 0 1 240px; min-width: 190px; max-width: 260px; }
.grupo--indigenas  .ilustracion img { max-height: 560px; }

.grupo--diversidad .ilustracion { flex: 1 1 300px; min-width: 250px; max-width: 400px; }
.grupo--diversidad .ilustracion img { max-height: 260px; }

.grupo--migrantes  .ilustracion { flex: 0 1 200px; min-width: 170px; max-width: 220px; margin: 0 auto; }
.grupo--migrantes  .ilustracion img { max-height: 230px; }

.grupo--adultos    .ilustracion { max-width: 380px; }
.grupo--adultos    .ilustracion img { max-height: 250px; }

.grupo--salud      .ilustracion { max-width: 340px; }
.grupo--salud      .ilustracion img { max-height: 340px; }

.grupo--deporte    .ilustracion { max-width: 360px; }
.grupo--deporte    .ilustracion img { width: 182px; height: 281px; }

.grupo--justicia   .ilustracion { flex: 1 1 260px; min-width: 220px; max-width: 320px; }
.grupo--justicia   .ilustracion img { max-height: 320px; }

/* ---------- Animaciones de entrada ---------- */
/* Solo se ocultan si hay JavaScript (clase .js en <html>) */

html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s ease, transform .7s ease;
}
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsivo ---------- */

@media (max-width: 1024px) {
  html { background-size: 1024px auto; }
}

@media (max-width: 760px) {
  .entrada, .texto { text-align: left; }
  .mosaico, .cifras { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
  html { background-size: 700px auto; background-attachment: scroll; }
}
