/* ══════════════════════════════════════════
   COMISIÓN TERRITORIAL Y AMBIENTAL – JEP
   Estilos principales
══════════════════════════════════════════ */

/* ── Variables ──────────────────────────── */
:root {
  --green-dark:    #0f2b24;
  --green:         #2d5f47;
  --green-mid:     #3d7a5e;
  --green-light:   #5fa37c;
  --green-pale:    #e8f0eb;
  --teal-bg:        #34545e;
  --cream:          #f4efe3;
  --lime:           #a9cf3c;
  --btn-green:      #5d8a61;
  --btn-green-hover:#6fa073;
  --sand:          #c8a96e;
  --sand-bg:        #d3bc97;
  --sand-light:    #f0e8d8;
  --sand-pale:     #faf6f0;
  --text:          #1a1a1a;
  --text-mid:      #444;
  --text-muted:    #6b6b6b;
  --white:         #ffffff;
  --radius-sm:     4px;
  --radius:        8px;
  --radius-lg:     14px;
  --shadow:        0 2px 16px rgba(0,0,0,.12);
  --shadow-lg:     0 8px 32px rgba(0,0,0,.22);
  --font-serif:    'Merriweather', Georgia, serif;
  --font-sans:     'Source Sans 3', system-ui, sans-serif;
  --transition:    .25s ease;
}

/* ── Reset ──────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-sans) !important; color: var(--text); background: var(--white); line-height: 1.65; }
img  { display: block; max-width: 100%; }

/* ── Placeholders de imagen (espacio reservado) ── */
.ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e7eae4;
}
.ph::before {
  content: "";
  width: 44px;
  height: 44px;
  background: #aab4a8;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.5'%3E%3Crect%20x='3'%20y='3'%20width='18'%20height='18'%20rx='2'/%3E%3Ccircle%20cx='8.5'%20cy='8.5'%20r='1.5'/%3E%3Cpath%20d='M21%2015l-5-5L5%2021'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='%23000'%20stroke-width='1.5'%3E%3Crect%20x='3'%20y='3'%20width='18'%20height='18'%20rx='2'/%3E%3Ccircle%20cx='8.5'%20cy='8.5'%20r='1.5'/%3E%3Cpath%20d='M21%2015l-5-5L5%2021'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ph--dark        { background: var(--green-dark); }
.ph--dark::before{ background: rgba(255, 255, 255, .16); }
.ph--empty::before { display: none; }
.ph--mini::before  { width: 18px; height: 18px; }
.conceptos-portrait .ph { border-radius: 50%; background: #dfe5db; }
a    { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }



/* ── Layout ─────────────────────────────── */
.container {
  max-width: 1180px !important;
  width: auto !important;
  margin: 0 auto !important;
  padding: 0 28px !important;
  color: inherit !important;
}

/* ── Section base ───────────────────────── */
.section { padding: 80px 0; scroll-margin-top: 60px; }

.section__title {
   font-family: "STIX Two Text", serif !important;
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 14px;
  line-height: 1.3;
}
.section__title--white { color: var(--white); }

.section__lead {
  font-size: 1rem;
  color: var(--text-mid);
  max-width: 740px;
  margin-bottom: 8px;
  line-height: 1.75;
}
.section__lead--white { color: rgba(255,255,255,.88); }

.section__hint {
  font-size: .875rem;
  color: var(--green-mid);
  font-style: italic;
  margin-bottom: 32px;
}

/* ══════════════════════════════════════════
   HERO
══════════════════════════════════════════ */
.hero {
  background-image: url('../img/background-hero-comision-territorial-jep.webp');
  position: relative;
  min-height: 80vh;
  display: flex;
  overflow: hidden;
  margin-top: 70px;
}

.hero__bg {
  background-image: url('../img/background-hero-comision-territorial-jep.webp');
  background-size: cover;
  background-position: center bottom;
  position: absolute;
  inset: 0;
  z-index: 0;
}
/* .hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, .38) 0%,
    rgba(0, 0, 0, .06) 22%,
    rgba(0, 0, 0, .10) 60%,
    rgba(0, 0, 0, .48) 100%
  );
} */

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 40px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Título escalonado en serif itálica */
.hero__title {
  display: inline-block;
  text-align: left;
   font-family: "STIX Two Text", serif !important;
  font-style: italic;
  font-weight: 700;
  line-height: 1.02;
  color: var(--cream);
  text-shadow: 0 3px 18px rgba(0, 0, 0, .5);
}
.hero__title span { display: block; }
.hero__t1 {
  font-size: clamp(1.9rem, 4.2vw, 3.4rem);
  padding-left: .12em;
  color: #f4efe3;
}
.hero__t2,
.hero__t3 {
  font-size: clamp(3.2rem, 11vw, 8rem);
  color: #e9f0c2;
}
.hero__t3 { margin-top: -.06em; }
.hero__t4 {
  text-align: right;
  font-size: clamp(1.5rem, 3.6vw, 2.6rem);
  color: #c7e8eb;
  margin-top: .1em;
}
.hero__t4 strong { font-weight: 700; padding-left: .2em; }

/* Descripción + fecha al pie */
.hero__meta {
  position: absolute;
  left: 28px;
  right: 28px;
  bottom: 92px;                 /* deja espacio para el menú al pie del hero */
  max-width: 720px;
  margin: 0 auto;
}
.hero__desc {
  font-family: var(--font-sans) !important;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  line-height: 1.65;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .55);
  margin-bottom: 10px;
}
.hero__date {
  font-size: .92rem;
  font-weight: 700;
  color: var(--lime);
  text-shadow: 0 2px 12px rgba(0, 0, 0, .55);
}

/* ══════════════════════════════════════════
   BARRA SUPERIOR JEP
══════════════════════════════════════════ */
.ms-topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70px;
  background: #02345B;
  z-index: 500;
  display: flex;
  align-items: center;
}
.ms-topbar__inner {
  width: 100%;
  max-width: 1170px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.ms-topbar img {
  display: block;
}

/* ══════════════════════════════════════════
   NAVEGACIÓN
══════════════════════════════════════════ */
.site-nav {
  position: sticky;
  top: 70px;
  z-index: 150;
  margin-top: -56px;            /* se monta sobre el pie del hero (ajustado por JS) */
  background: transparent;
  transition: background .3s ease, box-shadow .3s ease;
}
.site-nav.stuck {
  background: var(--green);
  box-shadow: 0 2px 14px rgba(0, 0, 0, .22);
}

/* Botón hamburguesa (solo móvil) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 26px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .5);
  transition: transform .25s ease, opacity .25s ease;
}
.site-nav.menu-open .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.site-nav.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
.site-nav.menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.site-nav__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  justify-content: center;
  overflow-x: auto;
  scrollbar-width: none;
}
.site-nav__inner::-webkit-scrollbar { display: none; }

.site-nav__link {
  display: inline-block;
  padding: 16px 22px;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .9);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .55);
  transition: color var(--transition), border-color var(--transition), text-shadow var(--transition);
}
.site-nav__link:hover { color: var(--white); }
.site-nav__link.active {
  color: var(--white);
  border-color: var(--lime);
}
/* Estado fijo (sólido): se quita la sombra de texto */
.site-nav.stuck .site-nav__link {
  color: rgba(255, 255, 255, .7);
  text-shadow: none;
}
.site-nav.stuck .site-nav__link:hover,
.site-nav.stuck .site-nav__link.active { color: var(--white); }

/* ══════════════════════════════════════════
   CONCEPTOS CLAVE
══════════════════════════════════════════ */
.sec-conceptos {
  position: relative;
  background: var(--teal-bg);
}

/* Encabezado: retrato + intro */
.conceptos-head {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 44px;
}

.conceptos-portrait {
  width: 350px;
  justify-self: center;
}
.conceptos-portrait img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.section__title--cream { color: var(--cream); }

.title-rule {
  display: block;
  width: 190px;
  height: 4px;
  background: var(--lime);
  border-radius: 2px;
  margin: 40px 0 22px;
}

.section__lead--cream {
  color: rgba(244, 239, 227, .9);
  max-width: 640px;
}

/* Indicación + flecha */
.conceptos-hint {
  text-align: center;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--cream);
  margin-top: 8px;
}
.conceptos-chevron {
  text-align: center;
  color: var(--lime);
  font-size: 1.1rem;
  line-height: 1;
  margin: 6px 0 36px;
}

/* Grilla de conceptos */
.concept-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.concept-btn {
  background: var(--btn-green);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius);
  padding: 20px 18px;
  text-align: center;
  font-size: .95rem;
  font-weight: 500;
  color: var(--white);
  line-height: 1.35;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .28);
  transition: background var(--transition), transform var(--transition),
              box-shadow var(--transition);
}
.concept-btn:hover {
  background: var(--btn-green-hover);
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, .35);
}
.concept-btn.active {
  background: var(--green-dark);
  font-weight: 700;
  box-shadow: inset 0 0 0 2px var(--lime), 0 6px 14px rgba(0, 0, 0, .35);
  transform: translateY(-2px);
}

/* Contenedor con peek: muestra 3 filas + asomo de la 4ª */
.concept-grid-wrap {
  position: relative;
  max-height: 290px;
  overflow: hidden;
  transition: max-height .45s ease;
}
.concept-grid-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to bottom, transparent, var(--teal-bg));
  pointer-events: none;
  transition: opacity .3s ease;
}
.concept-grid-wrap.expanded {
  max-height: 2000px;
}
.concept-grid-wrap.expanded::after {
  opacity: 0;
}

/* Contenedor de conceptos adicionales — hereda el grid del padre */
.concept-grid__more {
  display: contents;
}

/* Botón Ver todos */
.concept-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 28px auto 0;
  padding: 12px 28px;
  background: transparent;
  border: 2px solid var(--lime);
  border-radius: var(--radius);
  color: var(--lime);
  font-family: var(--font-sans);
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.concept-toggle:hover {
  background: var(--lime);
  color: var(--green-dark);
}
.concept-toggle__icon {
  display: inline-block;
  transition: transform .3s ease;
}
.concept-toggle[aria-expanded="true"] .concept-toggle__icon {
  transform: rotate(180deg);
}

/* Lightbox de definición */
.concept-modal {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.concept-modal[hidden] { display: none; }

.concept-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 20, 14, .8);
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.concept-modal__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  background: var(--cream);
  border-top: 6px solid var(--lime);
  border-radius: var(--radius-lg);
  padding: 38px 40px 34px;
  box-shadow: var(--shadow-lg);
  animation: popIn .25s ease;
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

.concept-modal__close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--text-muted);
  transition: color var(--transition);
}
.concept-modal__close:hover { color: var(--text); }

.concept-modal__kicker {
  display: inline-block;
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--green-mid);
  margin-bottom: 8px;
}

.concept-modal__term {
  font-family: var(--font-serif) !important;
  font-size: 1.5rem;
  color: var(--green-dark);
  line-height: 1.3;
  margin-bottom: 14px;
  padding-right: 24px;
}
.concept-modal__def {
  font-size: 1rem;
  color: var(--text-mid);
  line-height: 1.8;
  overflow-y: auto;
}
.concept-modal__def p { margin-bottom: 14px; }
.concept-modal__def p:last-child { margin-bottom: 0; }
.concept-modal__def .cita { font-style: italic; }

.footnote {
  display: inline-block;
  color: var(--green);
  font-weight: 700;
  cursor: help;
}
.footnote__tip {
  position: fixed;
  width: 260px;
  max-width: calc(100vw - 20px);
  background: var(--green-dark);
  color: var(--white);
  font-size: .875rem;
  font-weight: 400;
  font-style: normal;
  text-transform: none;
  letter-spacing: normal;
  line-height: 1.5;
  padding: 10px 12px;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s;
  z-index: 600;
  pointer-events: none;
  word-break: break-word;
}
.footnote__tip.visible {
  opacity: 1;
  visibility: visible;
}

/* ══════════════════════════════════════════
   NOTICIAS
══════════════════════════════════════════ */
.sec-noticias {
  position: relative;
  padding: 72px 0 96px;
  overflow: hidden;
}
/* Fondo de sección */
.sec-noticias__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url('../img/section_news.webp');
  background-size: contain;
  background-position: center top;
  background-repeat: no-repeat;
  background-color: #d3bc97;
}
.sec-noticias > .container { position: relative; z-index: 1; margin-top: 4%; }

.sec-noticias .section__title {
  text-align: center;
  margin-bottom: 0;
}
.sec-noticias__rule { margin: 40px auto 32px; background: var(--white); }

.news-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Ventana fija que recorta (no se transforma) */
.news-viewport {
  flex: 1;
  overflow: hidden;
  padding: 28px 0 14px;          /* aire para la sombra de la imagen flotante */
}
/* Pista interna que se desplaza */
.news-track {
  display: flex;
  gap: 20px;
}

.news-card {
  flex: 0 0 calc(33.333% - 14px);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Imagen en la parte superior (queda detrás de la caja) */
.news-card__img {
  position: relative;
  z-index: 1;
  aspect-ratio: 4/3;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 26px rgba(0, 0, 0, .32);
}
.news-card__img .ph { width: 100%; height: 100%; }
.news-card__img img { width: 100%; height: 100%; object-fit: cover; }

/* Caja verde: se monta por encima del pie de la imagen */
.news-card__body {
  position: relative;
  z-index: 2;
  margin-top: -28px;
  padding: 22px 22px 26px;
  background: #5d7c4a;
  border-radius: 10px;
  flex: 1;
  box-shadow: 0 -6px 16px rgba(0, 0, 0, .18);
  transition: transform var(--transition);
}
.news-card:hover .news-card__body { transform: translateY(-4px); }

.news-card__tag {
  display: block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #d6e85a;
  margin-bottom: 8px;
}

.news-card__title {
  font-family: var(--font-serif) !important;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.42;
  color: var(--cream);
}

/* Botones carrusel */
.carousel__btn {
  flex-shrink: 0;
  align-self: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 2px solid var(--green-dark);
  background: var(--green-dark);
  color: var(--white);
  font-size: 1.8rem;
  line-height: 1;
  transition: background var(--transition), border-color var(--transition);
}
.carousel__btn:hover {
  background: var(--green);
  border-color: var(--green);
}
.carousel__btn:disabled { opacity: .25; pointer-events: none; }

.carousel__dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}
.carousel__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.3);
  transition: background var(--transition), transform var(--transition);
}
.carousel__dot.active {
  background: var(--sand);
  transform: scale(1.4);
}

/* ══════════════════════════════════════════
   GALERÍA
══════════════════════════════════════════ */
.sec-galeria { background: var(--sand-bg); background-image: url(../img/background-gallery.webp); background-position: center bottom; background-repeat: no-repeat; background-size: 100% auto; padding-bottom: 35%; }

/* Ilustración decorativa superior */
.galeria-illu {
  width: 450px;
  max-width: 70%;
  margin: 0 auto 8px;
}
.galeria-illu img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Título y descripción centrados, en verde-azulado */
.sec-galeria__title {
  text-align: center;
  color: var(--teal-bg);
  margin-bottom: 0;
}
.sec-galeria__rule { margin: 40px auto 14px; background: var(--white); }
.sec-galeria__lead {
  text-align: center;
  max-width: 880px;
  margin: 0 auto 12px;
  color: var(--teal-bg);
}

/* Cuadrícula masonry (columnas) */
.gallery {
  column-count: 4;
  column-gap: 14px;
  margin-top: 44px;
}

.gallery__item {
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: #e7eae4;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .16);
}
.gallery__item .ph { height: var(--h, 220px); }
.gallery__item img {
  display: block;
  width: 100%;
  height: var(--h, 220px);
  object-fit: cover;
  color: transparent;          /* oculta el texto alternativo mientras carga */
  opacity: 0;                  /* aparece completa al terminar de cargar */
  transition: opacity .45s ease, transform .4s ease;
}
.gallery__item img.is-loaded { opacity: 1; }

/* Marcador animado mientras la foto carga */
.gallery__item.is-loading {
  background: linear-gradient(100deg, #e7eae4 30%, #f3f5f1 50%, #e7eae4 70%);
  background-size: 300% 100%;
  animation: galleryShimmer 1.4s ease-in-out infinite;
}
@keyframes galleryShimmer {
  from { background-position: 100% 0; }
  to   { background-position: 0 0; }
}
.btn-load-more[aria-busy="true"] { opacity: .75; cursor: progress; }
.gallery__item:hover img { transform: scale(1.07); }

.gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(18, 42, 28, 0);
  transition: background .3s;
}
.gallery__item:hover::after { background: rgba(18, 42, 28, .25); }

.gallery__item .zoom-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(0);
  z-index: 2;
  color: var(--white);
  font-size: 2rem;
  transition: transform .3s;
  pointer-events: none;
}
.gallery__item:hover .zoom-icon { transform: translate(-50%,-50%) scale(1); }

.gallery__item.is-hidden { display: none; }

@keyframes galleryReveal {
  from { opacity: 0; transform: translateY(16px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
.gallery__item.reveal { animation: galleryReveal .5s ease both; }

/* Botón "Cargar más imágenes" */
.gallery-more { text-align: center; margin-top: 34px; }
.btn-load-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: 6px;
  padding: 14px 30px;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .03em;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
  transition: background var(--transition), transform var(--transition);
}
.btn-load-more:hover { background: var(--green-dark); transform: translateY(-2px); }
.btn-load-more[hidden] { display: none; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 14, .92);
  z-index: 300;
  align-items: center;
  justify-content: center;
}
.lightbox.open { display: flex; }

.lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 88vw;
  max-height: 88vh;
}

.lightbox__img {
  max-width: 88vw;
  max-height: 76vh;
  border-radius: var(--radius);
  object-fit: contain;
  box-shadow: 0 0 60px rgba(0,0,0,.5);
}

.lightbox__caption {
  margin-top: 14px;
  max-width: 640px;
  text-align: center;
  color: rgba(255, 255, 255, .9);
  font-size: .95rem;
  line-height: 1.5;
}

.lightbox__close {
  position: fixed;
  top: 20px; right: 26px;
  background: rgba(255,255,255,.12);
  border: none;
  color: var(--white);
  font-size: 1.4rem;
  width: 44px; height: 44px;
  border-radius: 50%;
  transition: background var(--transition);
}
.lightbox__close:hover { background: rgba(255,255,255,.25); }

.lightbox__nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.12);
  border: none;
  color: var(--white);
  font-size: 2.4rem;
  width: 52px; height: 52px;
  border-radius: 50%;
  line-height: 1;
  transition: background var(--transition);
}
.lightbox__nav:hover { background: rgba(255,255,255,.25); }
.lightbox__nav--prev { left: 16px; }
.lightbox__nav--next { right: 16px; }

/* ══════════════════════════════════════════
   DOCUMENTOS
══════════════════════════════════════════ */
.sec-documentos {
  --doc-bg: #435a30;
  position: relative;
  background: var(--doc-bg);
  padding: 84px 0;
}

/* Encabezado: texto + retrato del pescador */
.docs-header {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 40px;
  align-items: center;
  margin-bottom: 56px;
}
.docs-header .title-rule { width: 230px; }

.docs-portrait {
  width: 400px;
  justify-self: end;
}
.docs-portrait img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Cuadrícula de documentos */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  padding-top: 26px;          /* aire para el ícono flotante */
}

.doc-card {
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, .3);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius);
  padding: 46px 20px 26px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: background var(--transition), transform var(--transition);

}
.doc-card:hover {
  background: rgba(255, 255, 255, .22);
  transform: translateY(-4px);
  z-index: 20;                  /* la tarjeta y su tooltip quedan sobre las demás */
}

.doc-card__icon {
  position: absolute;
  top: -26px;
  left: 50%;
  transform: translateX(-50%);
  width: 58px;
  height: 64px;
}
.doc-card__icon svg { width: 100%; height: 100%; display: block; }

.doc-card__label {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--lime);
}

.doc-card__title {
  font-size: 1.3rem;
  font-weight: 400;
  color: #15240f;
  line-height: 1.45;
}

/* Tooltip con el título completo */
.doc-card__tip {
  position: absolute;
  top: 64%;
  left: 50%;
  transform: translate(-50%, 6px);
  width: calc(100% + 40px);
  max-width: 260px;
  background: var(--white);
  color: var(--green-dark);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .03em;
  line-height: 1.45;
  text-transform: uppercase;
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .3);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, transform .2s;
  z-index: 5;
  pointer-events: none;
}
.doc-card:hover .doc-card__tip {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* Divisor lima */
.docs-divider {
  width: 100%;
  height: 3px;
  background: var(--lime);
  border-radius: 2px;
  margin: 64px 0 48px;
  opacity: .9;
}

/* Publicaciones en páginas externas */
.docs-pubs {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 48px;
  align-items: start;
}
.docs-pubs__title { margin-bottom: 0; }

.pub-list { list-style: none; }
.pub-row__link {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr auto;
  gap: 20px;
  align-items: center;
  padding: 20px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, .35);
  color: var(--white);
  font-style: italic;
  font-size: .98rem;
  transition: background var(--transition);
}
.pub-list li:first-child .pub-row__link { border-top: 1px solid rgba(255, 255, 255, .35); }
.pub-row__link:hover { background: rgba(255, 255, 255, .06); }
.pub-go {
  font-style: normal;
  font-size: .8rem;
  color: var(--lime);
  justify-self: end;
}

/* ══════════════════════════════════════════
   ARQUITECTURA INSTITUCIONAL
══════════════════════════════════════════ */
.sec-arquitectura {
  position: relative;
  padding: 120px 0;
  overflow: hidden;
}
.sec-arquitectura__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.sec-arquitectura__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Cenefas de transición: pegadas al borde superior/inferior de la sección */
.sec-arquitectura__edge {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  line-height: 0;
}
.sec-arquitectura__edge img { width: 100%; display: block; }
.sec-arquitectura__edge--top    { top: 0; }
.sec-arquitectura__edge--bottom { bottom: 0; }

.sec-arquitectura .container { position: relative; z-index: 2; }

/* Título centrado + línea */
.sec-arq__title {
  text-align: center;
  text-shadow: 0 2px 14px rgba(0, 0, 0, .55);
}
.sec-arq__rule {
  display: block;
  width: 170px;
  height: 4px;
  background: rgba(255, 255, 255, .9);
  border-radius: 2px;
  margin: 40px auto 0;
}

/* Organigrama */
.orgchart {
  margin-top: 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.org-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  width: 100%;
}
.org-row--wrap { flex-wrap: wrap; }

.org-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px 20px;
  border-radius: 3px;
  font-size: .92rem;
  line-height: 1.35;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
  min-height: 72px;
}
.org-box strong { font-weight: 700; font-size: .98rem; }
.org-box span   { font-size: .82rem; opacity: .9; margin-top: 2px; }

.org-box--wide { width: 280px; max-width: 90%; }

.org-box--blue {
  background: #7fb1d6;
  color: #15384a;
}
.org-box--tan {
  background: #d8bd88;
  color: #3b2f17;
  flex: 0 1 210px;
  min-width: 180px;
}
.org-box--green {
  background: var(--green-dark);
  color: var(--white);
  width: 320px;
  max-width: 90%;
}

/* ══════════════════════════════════════════
   COMISIÓN (acordeón)
══════════════════════════════════════════ */
.sec-comision {
  background: var(--green-dark);
  padding: 4% 0 ;
}

/* Ilustración superior (placeholder) */
.comision-illu {
  width: 400px;
  max-width: 70%;
  margin: 0 auto 8px;
}
.comision-illu img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.sec-comision__title {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}
.sec-comision__rule { margin-left: auto; margin-right: auto; }

.sec-comision__lead {
  text-align: center;
  max-width: 880px;
  margin: 28px auto 0;
  color: rgba(255, 255, 255, .88);
  font-size: 1.02rem;
  line-height: 1.8;
}

/* Acordeón */
.accordion {
  margin-top: 56px;
  border-top: 2px solid rgba(255, 255, 255, .25);
}
.acc-item { border-bottom: 1px solid rgba(255, 255, 255, .25); }

.acc-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background var(--transition);
}
.acc-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--white);
}
.acc-icon {
  flex-shrink: 0;
  width: 24px;
  text-align: center;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--lime);
}
.acc-icon::before { content: "+"; }

.acc-header:hover {
  background: rgba(255, 255, 255, .08);
}
.acc-header:hover .acc-title {
  color: var(--lime);
}

/* Estado abierto */
.acc-item.open > .acc-header {
  background: #5d7c4a;
}
.acc-item.open .acc-icon { color: var(--white); }
.acc-item.open .acc-icon::before { content: "−"; }

.acc-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
}
.acc-item.open .acc-panel { max-height: 3000px; }

.acc-panel__inner {
  background: var(--white);
  color: #2b2b2b;
  padding: 30px 34px;
  font-size: .95rem;
  line-height: 1.75;
}
.acc-panel__inner p { margin-bottom: 18px; }
.acc-panel__inner p:last-child { margin-bottom: 0; }

/* ══════════════════════════════════════════
   INTEGRANTES
══════════════════════════════════════════ */
.sec-integrantes {
  background: var(--green-dark);
  padding-top: 0;
  padding-bottom: 80px;
}
.sec-integrantes__title {
  font-family: var(--font-sans);
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  font-weight: 700;
  color: var(--white);
  text-align: center;
  margin-bottom: 40px;
}
.sec-integrantes__rule {
  display: block;
  width: 36px;
  height: 2px;
  background: var(--lime);
  margin: 8px auto 48px;
}

.integrantes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 100px 32px;
  padding-top: 60px;
}

.integrante-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--green-pale);
  box-shadow: var(--shadow);
  text-align: center;
  padding: 0 24px 28px;
  position: relative;
  padding-top: 70px;
}
.integrante-card__photo-wrap {
  position: absolute;
  top: -55px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 110px;
}
.integrante-card__photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--lime);
  background: var(--green-pale);
  object-fit: cover;
}
.integrante-card__photo--ph {
  display: flex;
  align-items: center;
  justify-content: center;
}
.integrante-card__photo--ph::after {
  content: '';
  display: block;
  width: 52px;
  height: 52px;
  background: var(--green-light);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c0-4 3.6-7 8-7s8 3 8 7'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c0-4 3.6-7 8-7s8 3 8 7'/%3E%3C/svg%3E") center / contain no-repeat;
}
.integrante-card__name {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  color: var(--green-dark);
  margin-bottom: 4px;
  line-height: 1.3;
}
.integrante-card__role {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: .82rem;
  color: var(--green-mid);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 4px;
}
.integrante-card__org {
  font-family: var(--font-sans);
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.3;
}

@media (max-width: 900px) {
  .integrantes-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .integrantes-grid { grid-template-columns: 1fr; }
}

/* Imagen de cierre del sitio */
.end-banner { position: relative; line-height: 0; overflow: hidden; }
.end-banner > img { width: 100%; display: block; }

.end-banner__edge {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
}
.end-banner__edge img { width: 100%; display: block; }

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */

/* Footer: reemplaza float Bootstrap con flexbox responsive */
#footer .container {
  max-width: 1170px !important;
  width: 100% !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 24px !important;
  padding-right: 24px !important;
}
#footer .row {
  display: flex !important;
  flex-wrap: wrap !important;
  float: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  gap: 0 !important;
}
#footer .col-md-3 {
  float: none !important;
  flex: 0 0 33.333% !important;
  max-width: 33.333% !important;
  width: auto !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
  box-sizing: border-box !important;
}
@media (max-width: 768px) {
  #footer .col-md-3 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,.65);
  padding: 56px 0 0;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer__logo-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.footer__escudo svg { filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }

.footer__name {
  font-family: var(--font-serif) !important;
  font-size: .95rem;
  color: var(--white);
  line-height: 1.4;
}

.footer__stars {
  color: var(--sand);
  font-size: .75rem;
  letter-spacing: 3px;
  margin-top: 4px;
}

.footer__tagline {
  font-size: .82rem;
  color: var(--sand);
  font-weight: 600;
  letter-spacing: .04em;
}

.footer__col-title {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 16px;
}

.footer__links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: .87rem;
}
.footer__links a {
  color: rgba(255,255,255,.6);
  transition: color var(--transition);
}
.footer__links a:hover { color: var(--sand); }

.footer__bottom {
  padding: 20px 0;
  text-align: center;
  font-size: .78rem;
  color: rgba(255,255,255,.35);
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 960px) {
  /* Hero: título centrado en el espacio superior y meta fija al pie */
  .hero { min-height: 70vh; }
  .hero__content { padding-bottom: 72px; }
  .hero__title { margin-top: auto; margin-bottom: auto; }
  .hero__meta {
    position: static;
    left: auto;
    right: auto;
    margin: 0 auto;
    max-width: 600px;
  }

  /* Menú: desplazable desde el primer enlace */
  .site-nav__inner { justify-content: flex-start; }

  .conceptos-head {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }
  .title-rule { margin-left: auto; margin-right: auto; }
  .section__lead--cream { margin-left: auto; margin-right: auto; }
  .concept-grid { grid-template-columns: repeat(2, 1fr); }

  .news-card { flex: 0 0 calc(50% - 10px); }

  .gallery { column-count: 3; }

  .docs-header { grid-template-columns: 1fr; text-align: center; }
  .docs-header .title-rule { margin-left: auto; margin-right: auto; }
  .docs-portrait { justify-self: center; order: -1; }
  .docs-grid { grid-template-columns: repeat(2, 1fr); }
  .docs-pubs { grid-template-columns: 1fr; gap: 24px; }

  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .section { padding: 56px 0; }
  .hero { min-height: 70vh; }
  .hero__content { padding: 88px 22px 72px; }
  .hero__t2, .hero__t3 { font-size: clamp(2.5rem, 11vw, 3.4rem); }

  /* Menú hamburguesa */
  .site-nav { display: flex; align-items: center; justify-content: flex-end; padding: 8px 18px; min-height: 52px; }
  .nav-toggle { display: flex; }
  .site-nav__inner { display: none; }
  /* Menú abierto: pantalla completa con fondo opaco */
  .site-nav.menu-open .site-nav__inner {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 400;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    max-width: none;
    margin: 0;
    padding: 24px;
    background: rgba(30, 58, 47, .6);
    backdrop-filter: blur(3px);
    overflow-y: auto;
    animation: fadeIn .2s ease;
  }
  /* La X queda fija arriba a la derecha, por encima del overlay */
  .site-nav.menu-open .nav-toggle {
    position: fixed;
    top: 16px;
    right: 18px;
    z-index: 410;
  }
  .site-nav__inner .site-nav__link {
    text-shadow: none;
    color: rgba(255, 255, 255, .9);
    font-size: 1.2rem;
    font-weight: 700;
    padding: 16px 24px;
    border-bottom: none;
  }
  .site-nav__inner .site-nav__link.active { color: var(--lime); }

  .concept-grid { grid-template-columns: 1fr; }
  .conceptos-portrait { width: 220px; }

  .news-card { flex: 0 0 100%; }

  .gallery { column-count: 2; }

  .docs-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  /* Publicaciones: textos apilados a la izquierda, flecha a la derecha */
  .pub-row__link {
    grid-template-columns: 1fr auto;
    gap: 2px 16px;
    align-items: center;
  }
  .pub-source { grid-column: 1; grid-row: 1; }
  .pub-type   { grid-column: 1; grid-row: 2; opacity: .85; font-size: .9rem; }
  .pub-author { grid-column: 1; grid-row: 3; }
  .pub-go     { grid-column: 2; grid-row: 1 / 4; align-self: center; }

  .footer__grid { grid-template-columns: 1fr; gap: 32px; }

  /* Footer Bootstrap: apilar columnas en móvil */
  #footer .col-md-3 {
    float: none !important;
    width: 100% !important;
  }
  #footer .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* ── Pantallas de poca altura ── */
@media (max-height: 840px) {
  .hero__t1 { font-size: clamp(1.2rem, 3.2vw, 2rem); }
  .hero__t2,
  .hero__t3 { font-size: clamp(2.2rem, 8vw, 5rem); }
  .hero__t4 { font-size: clamp(1.1rem, 3vw, 2rem); }
  .hero__meta { bottom: 76px; }
}
@media (max-height: 640px) {
  .hero__t1 { font-size: clamp(1rem, 2.8vw, 1.6rem); }
  .hero__t2,
  .hero__t3 { font-size: clamp(1.8rem, 6.5vw, 3.5rem); }
  .hero__t4 { font-size: clamp(1rem, 2.5vw, 1.6rem); }
  .hero__meta { bottom: 68px; }
}

/* ══════════════════════════════════════════
   PROFILE MODAL
   ══════════════════════════════════════════ */

/* Make cards look clickable */
.integrante-card {
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.integrante-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
}
.integrante-card:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 4px;
}

/* Modal overlay */
.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.profile-modal[hidden] { display: none; }

.profile-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 28, 22, .72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Inner wrapper — positions photo above card without clipping */
.profile-modal__inner {
  position: relative;
  width: 100%;
  max-width: 600px;
  padding-top: 60px;
  animation: pm-in .22s ease;
  z-index: 1;
}
@keyframes pm-in {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* Photo — sibling of card, no overflow conflict */
.profile-modal__photo-wrap {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--lime);
  overflow: hidden;
  background: var(--green-pale, #e4efe8);
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
  z-index: 2;
}
.profile-modal__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Modal card */
.profile-modal__card {
  position: relative;
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  padding: 76px 40px 130px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,.35);
}

/* Close button */
.profile-modal__close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--green-mid);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 50%;
  line-height: 1;
  transition: background .15s;
}
.profile-modal__close:hover {
  background: var(--green-pale, #e4efe8);
  color: var(--green-dark);
}

/* Name */
.profile-modal__name {
  font-family: var(--font-sans);
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  font-weight: 800;
  color: var(--green-dark);
  margin: 0 0 6px;
  line-height: 1.2;
}

/* Role */
.profile-modal__role {
  font-family: var(--font-sans);
  font-size: .95rem;
  font-weight: 600;
  color: var(--green-mid);
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Email */
.profile-modal__email {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: .9rem;
  color: var(--green);
  text-decoration: none;
  margin-bottom: 20px;
}
.profile-modal__email:hover { text-decoration: underline; }

/* Divider */
.profile-modal__rule {
  border: none;
  border-top: 1px solid #dde8e3;
  margin: 0 0 20px;
}

/* Bio */
.profile-modal__bio {
  font-family: var(--font-sans);
  font-size: .92rem;
  line-height: 1.75;
  color: #2c3e35;
  text-align: left;
}
.profile-modal__bio p { margin: 0 0 .9em; }
.profile-modal__bio p:last-child { margin-bottom: 0; }

/* Hojas decorativas */
.profile-modal__hoja {
  position: absolute;
  bottom: 0;
  width: 160px;
  pointer-events: none;
  user-select: none;
}
.profile-modal__hoja--izq {
  left: 0;
}
.profile-modal__hoja--der {
  right: 0;
}

@media (max-width: 600px) {
  .profile-modal__card { padding: 76px 24px 32px; }
  .profile-modal__hoja { width: 110px; }
}

/* ══════════════════════════════════════════
   LIBROS DIGITALES
══════════════════════════════════════════ */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.sec-libros { background: #435a30; /* mismo fondo que Documentos (--doc-bg) */ padding: 40px 0 100px; }
.sec-libros__head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.sec-libros__head .title-rule { margin-left: auto; margin-right: auto; }
.sec-libros__head .section__lead { margin: 0 auto; }
.sec-libros__eyebrow {
  display: inline-block; font-family: var(--font-sans); font-size: 1rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--lime); margin-bottom: 10px;
}

.libros-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }

.libro {
  display: grid; grid-template-rows: auto 1fr; background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18); transition: transform .25s ease, box-shadow .25s ease;
}
.libro:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0, 0, 0, .28); }
.libro__cover {
  background: var(--sand-pale); display: flex; align-items: center; justify-content: center;
  height: 360px; overflow: hidden;
}
.libro__cover { position: relative; cursor: pointer; text-decoration: none; }
.libro__cover img { height: 100%; width: auto; max-width: none; flex-shrink: 0; transition: transform .35s ease; }
.libro__cover:focus-visible { outline: 3px solid var(--lime); outline-offset: -3px; }
.libro__view {
  position: absolute; right: 16px; bottom: 16px;
  font-family: var(--font-sans); font-size: 1rem; font-weight: 700;
  color: #fff; background: var(--green-dark); padding: 8px 16px; border-radius: 999px;
  opacity: 0; transform: translateY(6px); transition: opacity .25s ease, transform .25s ease;
}
.libro__cover:hover .libro__view,
.libro__cover:focus-visible .libro__view { opacity: 1; transform: translateY(0); }
@media (hover: none) { .libro__view { opacity: 1; transform: none; } }
.libro:hover .libro__cover img { transform: scale(1.05) rotate(-1deg); }
.libro--verde   .libro__cover { background: #eef5dc; }
.libro--naranja .libro__cover { background: #fbf1e3; }

.libro__body { padding: 32px 36px 36px; display: flex; flex-direction: column; }
.libro__tag {
  align-self: flex-start; font-family: var(--font-sans); font-size: 1rem; font-weight: 700;
  color: var(--green-dark); background: var(--lime); padding: 4px 14px; border-radius: 999px; margin-bottom: 16px;
}
.libro__kicker { font-family: var(--font-sans); font-size: 1rem; color: var(--green-mid); margin: 0 0 6px; line-height: 1.4; }
.libro__title {
  font-family: "STIX Two Text", serif; font-size: 1.4rem; font-weight: 700;
  color: var(--green-dark); line-height: 1.3; margin: 0 0 14px;
}
.libro__desc { font-family: var(--font-sans); font-size: 1rem; line-height: 1.6; color: var(--text-mid); margin: 0 0 20px; }
.libro__meta { display: flex; gap: 16px; font-family: var(--font-sans); font-size: 1rem; color: #5b6b63; margin: auto 0 20px; }
.libro__meta span + span::before { content: '•'; margin-right: 6px; color: var(--green-light); }
.libro__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--green-dark); color: #fff; font-family: var(--font-sans); font-size: 1rem; font-weight: 700;
  text-decoration: none; padding: 13px 26px; border-radius: 999px; transition: background .2s ease, color .2s ease;
}
.libro__btn:hover, .libro__btn:focus-visible { background: var(--lime); color: var(--green-dark); }
.libro__btn:focus-visible { outline: 3px solid var(--green-dark); outline-offset: 3px; }
.libro__btn svg { width: 18px; height: 18px; flex-shrink: 0; }

@media (max-width: 1024px) {
  .libros-grid { grid-template-columns: 1fr; max-width: 680px; margin: 0 auto; }
}
@media (max-width: 560px) {
  .sec-libros { padding: 32px 0 72px; }
  .libro__cover { height: 300px; }
  .libro__body { padding: 28px 24px; }
  .libro__btn { width: 100%; }
}
