/* Tipografía y base */
html, body { height: 100%; }
body { font-family: 'Inter', 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', Arial, sans-serif; min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; padding-top: 80px; }
/* ImÃ¡genes fluidas por defecto */
img { max-width: 100%; height: auto; }
/* TamaÃ±o especÃ­fico del logo en el navbar (evitar que el global img lo agrande) */
.navbar .navbar-brand img { height: 36px; width: auto; }
/* Mayor altura visual del navbar y legibilidad de enlaces */
.navbar { padding-top: .75rem; padding-bottom: .75rem; font-family: 'Inter', 'Montserrat', system-ui, -apple-system, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', Arial, sans-serif; }
.navbar .user-greeting { max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.9rem; }
.navbar .nav-link { font-size: 0.95rem; font-weight: 600; color: var(--brand-green-deep); transition: color .15s ease, background-color .15s ease, box-shadow .15s ease; }
/* Estado activo del mÃ³dulo en el encabezado */
.navbar .nav-link.active {
  color: #ffffff !important;
background-color: var(--brand-green-deep);
  border-radius: 10px;
  padding: .35rem .75rem;
  box-shadow: 0 4px 10px rgba(0,0,0,.15);
}
.navbar .nav-link.active:hover {
  color: #ffffff !important;
  background-color: #062116;
}

/* Hero de inicio */
.hero {
  position: relative;
  min-height: 90vh;
  /* Usar ruta relativa desde assets/css hacia la raÃ­z del proyecto */
  background: url('../../FONDO.png') center center / cover no-repeat;
  color: #ffffff;
  display: flex;
  align-items: center;
  /* Compensar el padding-top del body (navbar fijo) para que el fondo del hero se alinee con el encabezado */
  margin-top: -80px;
  padding-top: 80px;
}

.hero-social {
  position: absolute;
  left: 50%;
  bottom: 24px; /* mÃ¡s separaciÃ³n para no chocar con el contenido */
  transform: translateX(-50%);
  display: flex;
  gap: 16px;
}

.hero-social a {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(2px);
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-social a:hover {
  transform: translateY(-2px);
  background: rgba(0, 0, 0, 0.55);
}

.hero-social svg {
  width: 20px;
  height: 20px;
  fill: #ffffff;
}

@media (max-width: 576px) {
  .hero { padding-bottom: 88px; margin-top: -72px; padding-top: 72px; }
  .hero .hero-content { padding-bottom: 0; }
  .cta-pill { margin-top: 1rem; }
  .hero-social {
    display: none; /* ocultar iconos sociales en mÃ³viles por solicitud */
  }
  .hero-social a {
    width: 34px;
    height: 34px;
  }
  .hero-social svg {
    width: 16px;
    height: 16px;
  }
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  /* degradado para legibilidad */
  background: linear-gradient(90deg, rgba(10, 35, 20, 0.85) 0%, rgba(10, 35, 20, 0.65) 35%, rgba(10, 35, 20, 0.25) 65%, rgba(10, 35, 20, 0.0) 100%);
  z-index: 0; /* por detrÃ¡s del contenido del hero */
}
.hero .hero-content {
  position: relative;
  z-index: 1; /* por encima del overlay, pero no por encima de la siguiente secciÃ³n */
  max-width: 560px;
  padding: 3rem 0;
}
.hero-slider {
  position: relative;
  z-index: 1;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
}
.hero-slider img { width: 100%; height: 100%; object-fit: cover; }
.hero-slider .carousel { height: clamp(260px, 36vw, 420px); }
.hero-slider .carousel-inner, .hero-slider .carousel-item { height: 100%; }
.hero-slider .carousel-indicators [data-bs-target] {
  width: 8px; height: 8px; border-radius: 50%;
  background-color: rgba(255,255,255,.8);
}
.hero-slider .carousel-indicators .active { background-color: #8BC34A; }
@media (max-width: 992px) {
  .hero-slider { margin-bottom: 1rem; }
  .hero-slider .carousel { height: clamp(220px, 44vw, 340px); }
}
/* Redes en Contacto */
.contact-social-section { background: #f8faf9; border-top: 1px solid rgba(0,0,0,.08); }
.contact-social-section .section-header { display: flex; justify-content: center !important; }
.contact-social-section .section-header h2 { text-align: center; }
.contact-social { display: flex; gap: 16px; align-items: center; justify-content: center; }
.contact-social a { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--brand-green-deep, #0a2314); color: #fff; transition: transform .2s ease, filter .2s ease; }
.contact-social a:hover { transform: translateY(-2px); filter: brightness(1.1); }
.contact-social i { font-size: 20px; line-height: 1; }
@media (max-width: 576px) { .contact-social { gap: 12px; } .contact-social a { width: 36px; height: 36px; } .contact-social i { font-size: 18px; } }

/* AnimaciÃ³n: zoom grande->chico con pequeÃ±o rebote */
@keyframes socialZoomBounce {
  0% { transform: scale(1.25); }
  40% { transform: scale(0.92); }
  70% { transform: scale(1.06); }
  100% { transform: scale(1.00); }
}
.contact-social.play a {
  animation: socialZoomBounce 600ms cubic-bezier(0.22, 1, 0.36, 1) 1 both;
  will-change: transform;
}
.contact-social.play a:nth-child(2) { animation-delay: 80ms; }
.contact-social.play a:nth-child(3) { animation-delay: 160ms; }
@media (prefers-reduced-motion: reduce) {
  .contact-social.play a { animation: none; }
}
/* Ajustes adicionales para pantallas pequeÃ±as */
@media (max-width: 576px) {
  /* Compensar el header fijo en pantallas pequeÃ±as con un poco mÃ¡s de espacio */
  body { padding-top: 104px; }
  #hero { scroll-margin-top: 104px; }
  .hero { min-height: 80vh; }
  .hero .hero-content { max-width: 100%; padding: 2rem .75rem; }
  .hero .kicker { font-size: .95rem; }
  .hero h1 { font-size: 1.75rem; }
  .hero .accent { font-size: 2rem; }
  .hero .lead { max-width: 100%; }
  .hero-callout { max-width: 100%; }
  .hero-slider .carousel { height: clamp(200px, 60vw, 300px); }
  .navbar .navbar-brand img { height: 32px; }
}
.hero .kicker { font-weight: 600; letter-spacing: 0.4px; opacity: 0.9; }
.hero h1 { font-weight: 800; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; margin: 0.5rem 0; }
.hero .accent { color: var(--accent-green); display: block; font-size: clamp(2.2rem, 6vw, 4rem); font-weight: 800; }
.hero .lead { max-width: 520px; opacity: 0.95; }
.hero { position: relative; z-index: 3; }
.hero-callout {
  margin: .5rem 0 1rem;
  font-weight: 700;
  color: #dcedc8;
  background: rgba(33,66,44,.35);
  border-left: 4px solid var(--brand-green);
  padding: .75rem 1rem;
  border-radius: 10px;
  max-width: 560px;
}
.hero-callout .highlight { color: var(--brand-green); font-weight: 800; }

/* Ocultar slider del hero en mÃ³vil y ajustar altura */
@media (max-width: 576px) {
  .hero-slider { display: none !important; }
  #hero { min-height: 68vh !important; padding-top: 104px; }
  .hero .lead { max-width: 100%; }
  /* Alinear el hero con el encabezado: mismas paddings del container */
  .hero .container { padding-left: var(--bs-gutter-x, .75rem); padding-right: var(--bs-gutter-x, .75rem); }
  .hero .hero-content { text-align: left; }
}

/* Mantener alineaciÃ³n tambiÃ©n en tablets */
@media (max-width: 768px) {
  #hero { padding-top: 88px; }
  .hero .container { padding-left: var(--bs-gutter-x, .75rem); padding-right: var(--bs-gutter-x, .75rem); }
}

/* BotÃ³n estilo pastilla como en el diseÃ±o */
.cta-pill {
  display: inline-block;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  border: 2px solid var(--accent-green);
  color: #e8f5e9;
  background: rgba(33, 66, 44, 0.35);
  text-decoration: none;
  font-weight: 600;
 box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.cta-pill:hover { background: rgba(33, 66, 44, 0.5); color: #ffffff; }

/* Variante de botÃ³n en paleta de marca */
.cta-pill.cta-brand { background: var(--brand-green); border-color: var(--brand-green); color: #ffffff; }
.cta-pill.cta-brand:hover { background: var(--brand-green-dark); border-color: var(--brand-green-dark); color: #ffffff; }

/* Encabezado blanco fijo ya estÃ¡ con Bootstrap (bg-light + border-bottom) */

/* Tabla de Contenido (secciÃ³n siguiente) */
/* Nueva SecciÃ³n: Participa e Impacta */
.engage-section {
  position: relative;
  padding: 72px 0;
  color: #e8f5e9;
  z-index: 0; /* mantener por debajo del hero */
}
.engage-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 35, 20, 0.88) 0%, rgba(10, 35, 20, 0.65) 40%, rgba(10, 35, 20, 0.25) 70%, rgba(10, 35, 20, 0.0) 100%);
  z-index: -1; /* overlay detrÃ¡s del contenido y del hero */
}
.engage-inner { position: relative; z-index: 1; }
.engage-callout { max-width: 520px; margin-right: auto; }
.engage-title { font-weight: 800; font-size: clamp(1.75rem, 3.6vw, 2.25rem); color: var(--brand-green); }
.engage-lead { font-size: 1.0625rem; line-height: 1.7; color: #e0f2f1; margin-bottom: 1rem; }
.engage-lead .highlight { font-weight: 700; color: #c8e6c9; }
.engage-highlights { display: grid; grid-template-columns: 1fr; gap: 14px; }
.highlight-item { display: flex; align-items: center; gap: .75rem; padding: .5rem .75rem; border-radius: 12px; background: rgba(10, 35, 20, 0.35); box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.highlight-title { font-weight: 700; color: #c8e6c9; }
.highlight-text { color: #e0f2f1; font-size: .975rem; }
@media (min-width: 768px) {
  .engage-highlights { grid-template-columns: 1fr; }
}
@media (max-width: 576px) {
  /* Reducir altura en mÃ³viles: menos padding vertical */
  .engage-section { padding: 24px 0; padding-top: 48px; }
  .engage-title { font-size: 1.6rem; }
  .engage-lead { font-size: .95rem; line-height: 1.5; }
  .engage-highlights { gap: 8px; }
  .highlight-item { padding: .5rem .6rem; }
}

@media (max-width: 768px) {
  /* Compactar tambiÃ©n en tablets */
  .engage-section { padding: 32px 0; padding-top: 56px; }
  .engage-highlights { gap: 12px; }
}

/* Footer sticky y contraste visual */
/* Footer blanco con paleta verde acorde al logo */
footer.site-footer {
  margin-top: auto;
  background: var(--brand-green-deep); /* verde oscuro consistente */
  color: #ffffff; /* texto principal en blanco */
  border-top: 4px solid var(--brand-green-dark); /* borde superior con verde mÃ¡s oscuro */
  position: relative;
  z-index: 1000; /* asegurar que se muestre sobre overlays anteriores */
}
.site-footer .footer-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: .25rem;
  color: #ffffff; /* tÃ­tulos en blanco para contraste */
}
.site-footer .footer-list { margin: 0; }
.site-footer .footer-item { margin-bottom: .25rem; line-height: 1.3; color: #ffffff; font-size: .95rem; }
.site-footer .footer-item a { color: #ffffff; text-decoration: underline; }
.site-footer .footer-item a:hover { text-decoration: none; }
.site-footer .footer-item i {
  color: #ffffff; /* iconos en blanco para contraste sobre fondo oscuro */
  font-size: .95rem;
}
.site-footer .copyright {
  color: #ffffff;
  font-size: .95rem;
}
.site-footer .footer-bottom {
  border-top: 2px solid rgba(255,255,255,.35);
}
.site-footer .footer-bottom .copyright {
  color: #ffffff; /* texto inferior en blanco */
  font-weight: 600;
  font-size: .9rem;
}

/* Tercera secciÃ³n: Refugio Natural */
.feature-section {
  position: relative;
  padding: 72px 0;
  color: #e8f5e9;
  background: url('../../FONDO.png') center / cover no-repeat;
}
.feature-overlay {
  position: absolute;
  inset: 0;
  content: '';
  /* Invertir direcciÃ³n: oscuro a la derecha para legibilidad del texto */
  background: linear-gradient(270deg, rgba(10, 35, 20, 0.0) 0%, rgba(10, 35, 20, 0.25) 35%, rgba(10, 35, 20, 0.65) 65%, rgba(10, 35, 20, 0.88) 100%);
}
.feature-card { position: relative; z-index: 1; max-width: 520px; }
.feature-icon { display: none; }
.feature-title { font-weight: 800; font-size: clamp(2rem, 5vw, 3rem); color: #8BC34A; margin-bottom: .75rem; }
.feature-text { color: #e0f2f1; line-height: 1.7; margin-bottom: .85rem; }
.feature-image-card {
  position: relative; z-index: 1;
  border-radius: 16px; overflow: hidden; box-shadow: 0 8px 24px rgba(0,0,0,.35);
  aspect-ratio: 16/9; max-width: 520px; margin-right: auto;
}
.feature-section .row { --gap-x: 2rem; }
@media (min-width: 992px) {
  .feature-section .row { column-gap: 32px; }
}
.feature-image-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 992px) {
  .feature-card, .feature-image-card { max-width: 100%; margin-right: 0; }
}
@media (max-width: 576px) {
  .feature-section { padding: 56px 0; }
}

/* SecciÃ³n 3: HÃ¡bitats Naturales */
.habitats-section {
  position: relative;
  padding: 72px 0;
  color: #e8f5e9;
  background: url('../../FONDO.png') center / cover no-repeat;
}
.habitats-overlay {
  position: absolute;
  inset: 0;
  content: '';
  background: linear-gradient(180deg, rgba(10,35,20,0.65) 0%, rgba(10,35,20,0.85) 100%);
}
.habitats-title { font-weight: 800; font-size: clamp(1.75rem, 4.2vw, 2.75rem); color: #f5f7f6; text-shadow: 0 2px 10px rgba(0,0,0,.45); }
.habitats-lead { max-width: 760px; margin: 0 auto; color: #d9eae6; }
.habitat-grid { position: relative; z-index: 1; }
.habitat-card { background: rgba(12,58,40,.25); border-radius: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.35); overflow: visible; padding: .75rem; transition: transform .25s ease, box-shadow .25s ease; transform-origin: center; will-change: transform; transform: translateZ(0); }
.habitat-image { border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 2px rgba(139,195,74,.75); }
.habitat-image img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 4/3; }
.habitat-label { display: inline-block; margin-top: .75rem; background: #7cb342; color: #0a2c20; font-weight: 700; padding: .5rem 1rem; border-radius: 999px; box-shadow: 0 6px 16px rgba(0,0,0,.35); }

/* Zoom suave en tarjetas de hÃ¡bitats */
.habitat-card:hover { transform: translateZ(0) scale(1.12); box-shadow: 0 12px 32px rgba(0,0,0,.4); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }

@media (max-width: 576px) {
  .habitats-section { padding: 56px 0; }
  .habitat-label { margin-top: .5rem; }
}

/* SecciÃ³n 4: Problemas Ambientales Actuales */
.issues-section {
  position: relative;
  padding: 72px 0;
  color: #e8f5e9;
  background: url('../../FONDO.png') center / cover no-repeat;
}
.issues-overlay { position: absolute; inset: 0; content: ''; background: linear-gradient(180deg, rgba(10,35,20,0.70) 0%, rgba(10,35,20,0.88) 100%); }
.issues-title { font-weight: 800; font-size: clamp(1.9rem, 4.6vw, 3rem); color: #f5f7f6; text-align: center; text-shadow: 0 2px 12px rgba(0,0,0,.45); }
.issue-item { position: relative; z-index: 1; padding: .5rem; background: rgba(12,58,40,.22); border-radius: 12px; overflow: hidden; transition: transform .30s ease, box-shadow .30s ease; transform-origin: center; will-change: transform; transform: translateZ(0); }
.issue-thumb { width: 84px; height: 84px; border-radius: 12px; overflow: hidden; box-shadow: 0 6px 16px rgba(0,0,0,.35), inset 0 0 0 3px rgba(139,195,74,.65); flex: 0 0 84px; }
.issue-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.issue-content { flex: 1 1 auto; }
.issue-title-item { margin: 0; font-size: .95rem; font-weight: 700; color: #ffffff; text-shadow: 0 2px 12px rgba(0,0,0,.45); }
.issue-text { color: #e0f2f1; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.issue-item:hover { transform: translateZ(0) scale(2.00); transform-origin: center; box-shadow: 0 12px 32px rgba(0,0,0,.4); z-index: 5; background: rgba(10,35,20,.92); }
.issue-item:hover .issue-thumb { transform: none; box-shadow: 0 8px 22px rgba(0,0,0,.45), inset 0 0 0 3px rgba(139,195,74,.85); }
.issue-item:hover .issue-title-item { font-size: 1.05rem; }
.issue-item:hover .issue-text { display: block; -webkit-line-clamp: unset; -webkit-box-orient: vertical; overflow: visible; font-size: .95rem; line-height: 1.6; }


@media (max-width: 576px) {
.issues-section { padding: 48px 0; }
.issue-thumb { width: 56px; height: 56px; flex-basis: 56px; }
}

/* Centrar el zoom respecto al centro de la secciÃ³n en pantallas medianas+ */
@media (min-width: 768px) {
  .issues-section .row { overflow: visible; }
  /* Mover desde la columna izquierda hacia el centro de la secciÃ³n */
  .issues-section .col-md-6:first-child .issue-item:hover {
    transform: translateZ(0) translateX(40%) scale(2.00);
    transform-origin: center;
  }
  /* Mover desde la columna derecha hacia el centro de la secciÃ³n */
  .issues-section .col-md-6:last-child .issue-item:hover {
    transform: translateZ(0) translateX(-40%) scale(2.00);
    transform-origin: center;
  }
}

/* Difuminar otros temas cuando uno estÃ¡ activo (hover/active/focus) */
.issues-section:has(.issue-item:hover) .issue-item:not(:hover),
.issues-section:has(.issue-item:active) .issue-item:not(:active),
.issues-section:has(.issue-item:focus-within) .issue-item:not(:focus-within) {
  filter: blur(3px);
  transition: filter .2s ease;
}

/* TransiciÃ³n ajustada para zoom */
.issue-item {
  transition: transform .35s ease-in-out, box-shadow .35s ease-in-out, background-color .35s ease-in-out;
}

/* AdaptaciÃ³n para mÃ³viles: usar :active/:focus-within con menor escala */
@media (max-width: 576px) {
  .issues-section .issue-item:active,
  .issues-section .issue-item:focus-within {
    transform: translateZ(0) scale(1.35);
    transform-origin: center;
    z-index: 8;
    background: rgba(10,35,20,.95);
    box-shadow: 0 8px 22px rgba(0,0,0,.45);
  }
  .issues-section:has(.issue-item:active) .issue-item:not(:active),
  .issues-section:has(.issue-item:focus-within) .issue-item:not(:focus-within) {
    filter: blur(3px);
  }
}

/* Blur gaussiano del fondo de la secciÃ³n al pasar sobre un tema */
.issues-section { position: relative; }
.issues-section::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .25s ease;
  background: rgba(8,20,12,.12);
}
.issues-section:has(.issue-item:hover)::before,
.issues-section:has(.issue-item:active)::before,
.issues-section:has(.issue-item:focus-within)::before { opacity: 1; }
.issue-item { position: relative; }
.issues-section .issue-item:hover { z-index: 10; }

/* SecciÃ³n 5: Acciones para Proteger la Naturaleza */
.actions-section {
  position: relative;
  padding: 72px 0;
  color: #e8f5e9;
  background: url('../../FONDO.png') center / cover no-repeat;
}
.actions-overlay { position: absolute; inset: 0; content: ''; background: linear-gradient(180deg, rgba(10,35,20,0.70) 0%, rgba(10,35,20,0.88) 100%); }
.actions-title { font-weight: 800; font-size: clamp(1.9rem, 4.6vw, 3rem); color: #f5f7f6; text-align: center; text-shadow: 0 2px 12px rgba(0,0,0,.45); }
.actions-lead { max-width: 820px; margin: 0 auto; color: #d9eae6; }
.action-card { background: rgba(12,58,40,.25); border-radius: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.35); overflow: hidden; padding: .75rem; }
.actions-section .row { overflow: visible; }
.actions-section .action-card { position: relative; transform: translateZ(0); transform-origin: center; will-change: transform, box-shadow; }
.action-image { border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 2px rgba(139,195,74,.75); }
.action-image img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 4/3; }
.action-text { color: #e0f2f1; line-height: 1.7; margin-top: .5rem; }
.actions-section .action-text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Generic text clamp utilities for reuse */
.text-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.text-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Gallery cards: unified image fit and height */
.gallery-card .card-img-top {
  height: 180px;
  object-fit: cover;
}

/* BotÃ³n para expandir/colapsar texto de acciones */
.actions-section .action-toggle {
  display: none; /* por defecto oculto en dispositivos con hover */
  margin-top: .4rem;
  font-weight: 600;
  color: #b9e4cc;
  cursor: pointer;
  user-select: none;
  text-decoration: underline;
  background: transparent;
  border: none;
  padding: 0;
}
.actions-section .action-toggle:hover { color: #d4f6df; }
.actions-section .action-card.expanded .action-text {
  display: block;
  -webkit-line-clamp: unset;
  -webkit-box-orient: vertical;
  overflow: visible;
}
/* Mostrar botÃ³n en dispositivos sin hover (mÃ³viles/tablets) */
@media (hover: none) {
  .actions-section .action-toggle { display: inline-block; }
}
/* En mÃ³viles, limitar altura del texto expandido y permitir scroll interno */
@media (max-width: 576px) {
  .actions-section .action-card.expanded .action-text {
    max-height: 200px;
    overflow: auto;
  }
}
@media (max-width: 576px) {
  .actions-section { padding: 56px 0; }
}

/* AnimaciÃ³n de entrada desde varios lados para SecciÃ³n 5 */
.actions-section.actions-animate { 
  --ease-out-back: cubic-bezier(0.175, 0.885, 0.320, 1.275);
  --ease-out-soft: cubic-bezier(0.22, 1, 0.36, 1); /* ease-out sobrio */
}
.actions-section.actions-animate .action-card {
  opacity: 0;
  transform: translateZ(0);
  will-change: transform, opacity;
  transition: transform .7s var(--ease-out-soft), opacity .5s ease;
  transition-delay: var(--delay, 0ms);
}
.actions-section.actions-animate .action-card.no-anim {
  transition: none !important;
}
.actions-section.actions-animate .action-card[data-dir="left"] { transform: translateX(-60px); }
.actions-section.actions-animate .action-card[data-dir="right"] { transform: translateX(60px); }
.actions-section.actions-animate .action-card[data-dir="top"] { transform: translateY(-60px); }
.actions-section.actions-animate .action-card[data-dir="bottom"] { transform: translateY(60px); }
.actions-section.actions-animate .action-card.in {
  opacity: 1;
  transform: none;
}

/* Hover: expandir bloque y mostrar texto completo en flujo */
.actions-section .action-card {
  transition: box-shadow .25s ease, background-color .25s ease;
}
.actions-section .action-card:hover {
  box-shadow: 0 12px 32px rgba(0,0,0,.4);
  background: rgba(10,35,20,.92);
  z-index: 10;
}
.actions-section .action-card:hover .action-text {
  display: block; /* desactiva -webkit-box para quitar el clamp */
  -webkit-line-clamp: unset;
  -webkit-box-orient: vertical;
  overflow: visible;
  position: static; /* en flujo debajo de la imagen */
}
@media (hover: none) {
  /* En dispositivos sin hover, mantener truncado hasta que se pulse Ver mÃ¡s */
  .actions-section .action-card:hover .action-text {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}
/* Hover desactivado: mantener tarjetas estÃ¡ticas (solo animaciÃ³n de entrada) */

/* Sin efectos de hover/clic ni overlay: mantener tarjetas estÃ¡ticas */

/* Click: pequeÃ±o movimiento y zoom suave */
/* Eliminar estados de clic */

/* Limitar hover a dispositivos con puntero/hover; usar focus-within como alternativa accesible */
@media (hover: hover) {
  /* Sin efectos especiales en hover en acciones */
}
/* Eliminar difuminado/active/focus y superposiciones */
/* Alternativa accesible desactivada: mantener texto truncado */

/* SecciÃ³n 7: Contacto */
.contact-section {
  position: relative;
  padding: 28px 0;
  color: #e9f7ef;
  background: url('../../FONDO.png') center / cover no-repeat;
}
.contact-section .container { max-width: 960px; }
.contact-title { font-weight: 800; color: #ffffff; margin-bottom: 6px; text-shadow: 0 2px 12px rgba(0,0,0,.45); }
.contact-lead { color: #cfead8; margin-bottom: 16px; }
.contact-section form.card {
  border-radius: 16px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(139,195,74,.35);
  color: #e8f5e9;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
}
.contact-section .form-label { color: #e8f5e9; margin-bottom: 4px; }
.contact-section .form-control { padding: .5rem .7rem; }
.contact-section .mb-3 { margin-bottom: .6rem !important; }
.contact-section button.btn-success { background-color: var(--accent-green); border-color: var(--accent-green); }
.contact-section button.btn-success:hover { background-color: var(--accent-green-hover); border-color: var(--accent-green-hover); }
@media (max-width: 768px) {
  .contact-section { padding: 20px 0; }
  .contact-section .container { max-width: 100%; }
  .contact-section form.card { padding: 12px; }
}
@media (max-width: 576px) {
  .site-footer { padding-top: .5rem; padding-bottom: .5rem; }
  .site-footer .footer-title { font-size: .95rem; margin-bottom: .2rem; }
  .site-footer .footer-item { font-size: .85rem; margin-bottom: .2rem; line-height: 1.25; }
  .site-footer .footer-item i { font-size: .85rem; }
  .site-footer .copyright { font-size: .85rem; }
  .site-footer .footer-bottom { padding-top: 0; margin-top: .25rem; }
}

/* Enlaces del footer: hover mÃ¡s contrastado */
.site-footer .footer-item a { color: #ffffff; text-decoration: underline; }
.site-footer .footer-item a:hover { color: #e8f5e9; text-decoration: none; }

/* BotÃ³n flotante de WhatsApp */
.whatsapp-fab {
  position: static; /* anclado dentro del contenedor del footer */
  right: auto;
  bottom: auto;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #25D366; /* color oficial WhatsApp */
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  z-index: 1100; /* por encima del footer */
  text-decoration: none;
}
.whatsapp-fab .bi { font-size: 28px; line-height: 1; }
.whatsapp-fab:hover { background: #1ebe57; color: #ffffff; box-shadow: 0 12px 32px rgba(0,0,0,.45); }
/* Contenedor y menÃº del botÃ³n WhatsApp */
.whatsapp-fab-container { position: absolute; right: 16px; bottom: 16px; z-index: 1100; }
.whatsapp-menu { min-width: 220px; box-shadow: 0 6px 24px rgba(0,0,0,.18); border: 1px solid rgba(0,0,0,.08); }
.whatsapp-menu { transform: translateY(8px); opacity: 0; transition: transform 150ms ease, opacity 150ms ease; }
.whatsapp-menu.show { transform: translateY(0); opacity: 1; }
.whatsapp-menu .dropdown-item { padding: .5rem .75rem; }
.whatsapp-menu .dropdown-item:hover { background-color: #e8f9ef; }

/* BotÃ³n volver al hero (aparece en el footer) */
.back-to-hero-container { position: absolute; right: 16px; bottom: calc(16px + 52px + 8px); z-index: 1100; }
.back-to-hero-btn {
  width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; background: #0a2c20; color: #fff; text-decoration: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.back-to-hero-btn .bi { font-size: 28px; line-height: 1; }
.back-to-hero-btn:hover { background: #062116; color: #fff; box-shadow: 0 12px 32px rgba(0,0,0,.35); }

/* Mostrar/ocultar controlado por JS */
.back-to-hero-container { opacity: 0; transform: translateY(8px); transition: opacity 150ms ease, transform 150ms ease; pointer-events: none; }
.back-to-hero-container.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
/* Dropdown en navbar al pasar el cursor (solo en pantallas grandes) */
@media (min-width: 992px) {
  .navbar .dropdown:hover > .dropdown-menu { display: block; }
  .navbar .dropdown-toggle::after { vertical-align: middle; }
}

/* Dropdown en navbar dentro del menÃº colapsado (mÃ³vil y tablet) */
@media (max-width: 991.98px) {
  /* Evitar posicionamiento absoluto/poppers que corten el menÃº dentro del colapso */
  .navbar-nav .dropdown-menu { position: static; float: none; }
  /* Asegurar que se muestre cuando Bootstrap agrega la clase .show */
  .navbar-nav .dropdown.show .dropdown-menu { display: block; margin-top: .25rem; }
}

/* Fondo tipo inicio para mÃ³dulos */
.module-bg {
  position: relative;
  min-height: 60vh;
  background: url('../../FONDO.png') center center / cover no-repeat;
  display: flex;
  align-items: center;
  /* Compensar el padding-top del body por el header fijo */
  margin-top: -80px;
  padding-top: 80px;
}
.module-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(10, 35, 20, 0.85) 0%, rgba(10, 35, 20, 0.65) 35%, rgba(10, 35, 20, 0.25) 65%, rgba(10, 35, 20, 0.0) 100%);
}
.module-bg > * { position: relative; z-index: 1; width: 100%; }

.root-vars:where(html) {}
:root {
  --brand-green: #1b7d46; /* verde del logo */
  --brand-green-dark: #145e37;
  --brand-green-deep: #0a2c20;
  --brand-green-light: #e6f4ea;
  --accent-green: #4CAF50; /* acento primario */
  --accent-green-hover: #43A047;
}
/* Encabezado de pÃ¡gina reutilizable */
.page-hero { color: #ffffff; text-align: center; }
.page-hero-title { font-weight: 800; }
.page-hero-lead { color: #e0f2f1; }
/* Icono redondo para encabezados de tarjetas */
.icon-pill { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 999px; }
/* Hero reutilizable con padding compacto en mÃ³dulos */
.module-bg .page-hero { padding-top: 1rem; padding-bottom: 1rem; }
.compact-page .module-bg { min-height: 28vh; }
.compact-page .module-bg .page-hero { padding-top: .5rem; padding-bottom: .5rem; }
@media (max-width: 576px) {
  .compact-page .module-bg { min-height: 34vh; }
  .module-bg { margin-top: -72px; padding-top: 72px; }
}
.compact-page .container:not(.page-hero) { padding-top: .75rem !important; }
.module-bg .page-hero.mb-0, .module-bg .page-hero + * { margin-top: .25rem; }

/* Ancho de lectura mÃ¡s estrecho para la reseÃ±a de QuiÃ©nes Somos */
#quienes-somos .content-body { margin-left: auto; margin-right: auto; }
@media (min-width: 992px) {
  #quienes-somos .content-body { max-width: 60rem; }
}
@media (min-width: 1200px) {
  #quienes-somos .content-body { max-width: 56rem; }
}
/* CompensaciÃ³n de ancla por header fijo */
#quienes-somos { scroll-margin-top: 80px; }
@media (max-width: 576px) {
  #quienes-somos { scroll-margin-top: 104px; }
}
@media (min-width: 577px) and (max-width: 768px) {
  #quienes-somos { scroll-margin-top: 88px; }
}

/* Encabezado moderno y elegante para Quiénes Somos */
#quienes-somos .section-header { margin-bottom: 1rem; }
#quienes-somos .section-header .title { letter-spacing: .2px; }
#quienes-somos .section-header .lead { color: var(--bs-secondary-color, #6c757d); }

/* Bloque de contenido con fondo suave y bordes redondeados */
#quienes-somos .about-content {
  background: #f8faf9;
  border: 1px solid rgba(0,0,0,.05);
}

/* JustificaciÃ³n y guionado automÃ¡tico en reseÃ±a QuiÃ©nes Somos */
#quienes-somos .content-body p {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  overflow-wrap: anywhere;
}

/* Clamping de 7 lÃ­neas y Leer mÃ¡s en MisiÃ³n/VisiÃ³n/Valores */
.brand-card .clamped-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 7;
  overflow: hidden;
}
.brand-card.expanded .clamped-text {
  display: block;
  -webkit-line-clamp: initial;
  overflow: visible;
}
.brand-card .clamped-text p,
.brand-card .clamped-text li {
  text-align: justify;
  hyphens: auto;
  overflow-wrap: anywhere;
}
.brand-card .read-more-toggle {
  font-weight: 600;
  color: var(--bs-success);
}

/* Mayor separaciÃ³n bajo el header en la pÃ¡gina de Contacto */
.contact-page .module-bg .page-hero { padding-top: 2rem; padding-bottom: .5rem; }

/* Utilidades ligeras */
.mt-n1 { margin-top: -0.25rem !important; }

/* Centrados responsivos para hÃ©roes internos */
.hero-align-left { text-align: left; }
.hero-align-center { text-align: center; }
@media (min-width: 992px) {
  .hero-align-left-lg { text-align: left; }
  .hero-align-center-lg { text-align: center; }
}
@media (max-width: 991.98px) {
  .hero-align-left-md-down { text-align: left; }
  .hero-align-center-md-down { text-align: center; }
}

/* Tarjetas de participaciÃ³n con ilustraciÃ³n y borde inferior acento */
.participation-card { border-bottom: 4px solid var(--brand-green); }
.participation-card .illustration-wrap { border-top-left-radius: .5rem; border-top-right-radius: .5rem; overflow: hidden; aspect-ratio: 16/9; }
.participation-card .illustration-img { width: 100%; height: 100%; object-fit: cover; display: block; box-shadow: 0 6px 16px rgba(0,0,0,.12); }

/* Lightbox (usando modal de Bootstrap) */
.lightbox-img { width: 100%; height: auto; display: block; }
.lightbox-caption { color: #e0f2f1; }
.gallery-card { transition: transform .15s ease, box-shadow .15s ease; }
.gallery-card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,.18); }

/* Programas: bloques mixtos imagen + texto (verde) */
.program-item { display:flex; align-items:flex-start; gap:1rem; margin-bottom:1rem; }
.program-item.img-right { flex-direction: row-reverse; }
/* Contenedor fijo para asegurar círculo perfecto */
.program-img { width:96px; height:96px; flex:0 0 auto; display:block; }
.program-img img { width:100%; height:100%; aspect-ratio:1 / 1; display:block; object-fit:cover; border-radius:50%; box-shadow: 0 4px 12px rgba(0,0,0,.25); border:3px solid var(--brand-green-light); }
/* Variante rectangular grande */
.program-img.rect { width:220px; height:140px; }
.program-img.rect img { border-radius:12px; aspect-ratio:auto; }
.program-text { background: linear-gradient(135deg, var(--brand-green), var(--brand-green-dark)); color:#fff; border-radius:16px; padding:1rem 1.25rem; box-shadow: 0 8px 24px rgba(27,125,70,.25); flex:1 1 auto; }
.program-text h4 { color:#fff; font-weight:800; margin-bottom:.25rem; }
.program-text p { color:rgba(255,255,255,.92); margin:0; line-height:1.65; }
@media (max-width: 576px){
.program-item { flex-direction: column; }
.program-item.img-right { flex-direction: column; }
.program-img { width:72px; height:72px; }
.program-img.rect { width:100%; height:auto; }
.program-img.rect img { width:100%; height:200px; object-fit:cover; }
}

/* Team avatars and cards */
.team-card { background: linear-gradient(135deg, var(--brand-green), var(--brand-green-dark)); color: #fff; border: none; border-radius: 16px; box-shadow: 0 10px 24px rgba(27,125,70,.25); transition: transform .15s ease, box-shadow .15s ease; padding-top: 1rem; position: relative; overflow: hidden; }
.team-card:hover { transform: translateY(-2px) scale(1.01); box-shadow: 0 16px 36px rgba(27,125,70,.35); }
.team-card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 180px at 20% 0%, rgba(255,255,255,.15), transparent 60%); opacity: 0; transition: opacity .2s ease; }
.team-card:hover::after { opacity: 1; }
.team-card .avatar-wrap { display: flex; justify-content: center; margin-bottom: .75rem; }

/* User menu (header) */
.user-menu { gap: .5rem; }
.btn-user {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: #fff;
  border: 1px solid #dee2e6;
  color: #212529;
  border-radius: 999px;
  padding: .25rem .6rem .25rem .25rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.btn-user:hover { border-color: #cfd4da; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem; color: #fff;
  background: linear-gradient(135deg, #3da35a, #2f7d3b);
}
.user-name { max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-transform: uppercase; letter-spacing: .02em; font-weight: 600; }
.btn-login { border-radius: 999px; padding: .3rem .75rem; }

@media (max-width: 576px) {
  .user-name { display: none; }
}

/* Login page */
body.login-page {
  min-height: 100vh; background: linear-gradient(180deg, #f3f6f4, #e8f3ec);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.login-card {
  width: 100%; max-width: 520px; border: 1px solid #e9ecef; border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
/* Compact login refinements */
.login-card.card { padding: 1rem !important; }
.login-card .mb-3 { margin-bottom: .5rem !important; }
.login-brand { display: flex; align-items: center; gap: .5rem; justify-content: center; }
.login-brand img { height: 48px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.15)); }
.login-title { font-weight: 700; letter-spacing: .01em; text-align: center; margin: .25rem 0 .75rem; }
.login-page .form-control:focus { box-shadow: 0 0 0 .2rem rgba(61,163,90,.15); border-color: #3da35a; }
.toggle-password { border-color: #dee2e6; }
.btn-login-submit { background: #2f7d3b; border-color: #2f7d3b; }
.btn-login-submit:hover { background: #296e35; border-color: #296e35; }
.login-card .input-group-text { padding: .375rem .5rem; }
.login-card .form-control { padding: .45rem .6rem; }
.team-card .avatar-circle { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: 0 0 0 4px rgba(255,255,255,.22); transition: transform .2s ease, box-shadow .2s ease; }
.team-card:hover .avatar-circle { transform: scale(1.03); box-shadow: 0 0 0 6px rgba(255,255,255,.28); }
.team-card .card-body { text-align: center; display: flex; flex-direction: column; align-items: center; gap: .35rem; }
.team-card .card-body h3 { font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.team-card .role-badge { display: inline-block; padding: .25rem .6rem; font-size: .75rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--role-color, #fff); border: 1px solid var(--role-border, rgba(255,255,255,.6)); border-radius: 999px; background: var(--role-bg, rgba(255,255,255,.15)); backdrop-filter: blur(2px); }
.team-card .bio-clamp { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; overflow: hidden; text-align: justify; hyphens: auto; overflow-wrap: anywhere; }
.team-card.expanded .bio-clamp { -webkit-line-clamp: initial; overflow: visible; }
.team-card .bio-toggle { font-weight: 600; color: #ffffff; }
.team-card .card-body p { color: rgba(255,255,255,.9); }

/* Tarjeta verde para MisiÃ³n/VisiÃ³n */
.brand-card { background: linear-gradient(135deg, var(--brand-green), var(--brand-green-dark)); color: #fff; border: none; border-radius: 16px; box-shadow: 0 10px 24px rgba(27,125,70,.25); position: relative; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.brand-card:hover { transform: translateY(-2px) scale(1.01); box-shadow: 0 16px 36px rgba(27,125,70,.35); }
.brand-card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 180px at 20% 0%, rgba(255,255,255,.12), transparent 60%); opacity: 0; transition: opacity .2s ease; }
.brand-card:hover::after { opacity: 1; }
.brand-card .card-body { padding: 1.25rem 1.25rem 1.5rem; position: relative; z-index: 1; }
.brand-card h2, .brand-card p { color: #ffffff; }
.brand-card .values-list { padding-left: 1rem; margin-bottom: 0; }
.brand-card .values-list li { color: #ffffff; margin-bottom: .35rem; }
.brand-card .values-list li:last-child { margin-bottom: 0; }
.brand-card .icon-pill { background-color: rgba(255,255,255,.18) !important; color: #ffffff !important; box-shadow: 0 0 0 2px rgba(255,255,255,.35) inset; }

/* Filter pills for gallery */
.filter-pills { gap: .5rem; }
.filter-pills .nav-link { border-radius: 999px; border: 1px solid var(--brand-green); color: var(--brand-green); background: #fff; padding: .25rem .75rem; }
.filter-pills .nav-link:hover { background: var(--brand-green-light); color: var(--brand-green-dark); }
.filter-pills .nav-link.active { background: var(--brand-green); color: #fff; }
/* Leer más/menos en Programas */
.program-text .program-more { display:none; }
.program-text .program-more.show { display:block; }
.read-more-toggle { margin-top:.5rem; }

/* Section header helper */
.section-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1rem; }
.section-header .title { font-weight: 700; }
.section-header .lead { color: #3d7f54; }
/* Espacio global al final de los mÃ³dulos antes del footer */
main.content .container:last-of-type { padding-bottom: 3rem; }
/* Variantes de botones Bootstrap con paleta de marca */
.btn-brand { background-color: var(--brand-green); border-color: var(--brand-green); color: #fff; }
.btn-brand:hover, .btn-brand:focus { background-color: var(--brand-green-dark); border-color: var(--brand-green-dark); color: #fff; }
.btn-outline-brand { background-color: transparent; border-color: var(--brand-green); color: var(--brand-green); }
.btn-outline-brand:hover, .btn-outline-brand:focus { background-color: var(--brand-green-light); border-color: var(--brand-green-dark); color: var(--brand-green-dark); }
/* Refinamiento tipográfico para acentos y legibilidad */
body { text-rendering: optimizeLegibility; font-kerning: normal; font-feature-settings: "kern", "liga", "clig"; }

/* Ajustes de listas y badges dentro de tarjetas de marca del módulo Nosotros */
.brand-card .list-group-item { background: transparent; color: #ffffff; border-color: rgba(255,255,255,.28); }
.brand-card .list-group-flush .list-group-item { border-left: 0; border-right: 0; }
.brand-card .badge-role { background: var(--role-bg, rgba(255,255,255,.15)); color: var(--role-color, #ffffff); border: 1px solid var(--role-border, rgba(255,255,255,.6)); font-weight: 700; letter-spacing: .03em; text-transform: uppercase; border-radius: 999px; padding: .25rem .6rem; backdrop-filter: blur(2px); }
.badge-member { background: #ffffff; color: var(--brand-green-deep); border: 1px solid rgba(27,125,70,.22); font-weight: 600; }
.brand-card .card-body h3 { font-weight: 800; letter-spacing: .02em; }
.section-header .title { font-weight: 800; letter-spacing: .01em; }
/* --- Compact layout fixes (Equipo y secciones) --- */
.section-header{align-items:flex-start;flex-wrap:wrap;gap:.25rem .75rem}
.section-header .lead{flex:1 1 100%;text-align:left !important;text-justify:auto;hyphens:auto}
.brand-card{border-radius:14px}
.brand-card .card-body{padding:1rem 1rem 1.25rem}
.brand-card .card-title{margin-bottom:.25rem}
.brand-card .list-group{margin-top:.5rem}
.brand-card .list-group-item{padding:.375rem .75rem}
.brand-card.h-100{display:flex}
.brand-card.h-100 .card-body{display:flex;flex-direction:column;gap:.35rem}

/* Variaciones de color para insignias por rol */
.role-direccion { --role-bg: linear-gradient(90deg, #FFD54F, #FFB300); --role-border: rgba(255, 179, 0, .6); --role-color: #1b1b1b; }
.role-coordinacion { --role-bg: linear-gradient(90deg, #64B5F6, #1E88E5); --role-border: rgba(30, 136, 229, .6); --role-color: #ffffff; }
.role-soporte { --role-bg: linear-gradient(90deg, #B39DDB, #7E57C2); --role-border: rgba(126, 87, 194, .6); --role-color: #ffffff; }

/* Afinar alturas consistentes en tarjetas del equipo */
.team-card { display: flex; flex-direction: column; }
.team-card .avatar-wrap { margin-bottom: .65rem; }
.team-card .card-body { padding-bottom: .75rem; }

/* Programas: tarjetas rectangulares (override) */
.program-item { display:grid; grid-template-columns: 1fr 1fr; align-items: stretch; gap:0; margin-bottom:1rem; border:1px solid rgba(0,0,0,.08); border-radius:16px; overflow:hidden; box-shadow:0 8px 24px rgba(0,0,0,.12); background:#fff; }
.program-item.img-right .program-img { order:2; }
.program-item.img-right .program-text { order:1; }
.program-img { width:100%; min-height:200px; height:auto; display:block; }
.program-img img { width:100%; height:100%; display:block; object-fit:cover; border-radius:0; box-shadow:none; border:none; }
.program-img.rect { width:100%; min-height:200px; height:auto; }
.program-img.rect img { border-radius:0; }
@media (max-width: 768px) { .program-item { grid-template-columns: 1fr; } .program-img, .program-img.rect { min-height:200px; height:auto; } }
.program-text { padding: .75rem 1rem; }
/* Programas: clamp de texto y misma altura de imagen */
.program-item { align-items: stretch; }
.program-item .program-text { position: relative; }
.program-item .program-more { display: none; }
.program-item.expanded .program-more { display: block; }
.program-item.clamped:not(.expanded) .program-text { 
  max-height: 160px; 
  overflow: hidden; 
}
.program-item.clamped:not(.expanded) .program-text::after { 
  content: ''; 
  position: absolute; 
  left: 0; right: 0; bottom: 0; 
  height: 48px; 
  background: linear-gradient(180deg, rgba(20,94,55,0) 0%, rgba(20,94,55,.6) 60%, rgba(20,94,55,.9) 100%); 
  pointer-events: none; 
}
.read-more-toggle { margin-top: .25rem; }
.program-item.expanded .program-text { max-height: none; }
.program-item.expanded .program-text::after { display: none; }
.program-item .program-img { align-self: stretch; }
.program-item .program-img img { width: 100%; height: 100%; object-fit: cover; }
.program-item .program-img.rect { flex: 0 0 320px; width: 320px; height: auto; }
@media (max-width: 768px){
  .program-item { flex-direction: column; }
  .program-item .program-img.rect { flex: none; width: 100%; height: 200px; align-self: auto; }
  .program-item.clamped:not(.expanded) .program-text { max-height: 140px; }
}
/* Ajuste: el texto debe ocupar el alto completo de su celda para evitar huecos */
.program-item .program-text { height: 100%; display: flex; flex-direction: column; border-radius: 0; box-shadow: none; }
.program-item .program-img { height: 100%; }
@media (max-width: 768px){
  .program-item .program-text, .program-item .program-img { height: auto; }
}

/* Program cards (nuevo diseño 4 columnas) */
.program-card { 
  display: flex; 
  flex-direction: column; 
  background: #fff; 
  border: 1px solid rgba(0,0,0,.08); 
  border-radius: 16px; 
  overflow: hidden; 
  box-shadow: 0 8px 24px rgba(0,0,0,.12); 
  transition: transform .18s ease, box-shadow .18s ease; 
  width: 100%; 
  border-top: 4px solid var(--brand-green-dark);
}
.program-card:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(0,0,0,.18); }
.program-card-img-wrap { width: 100%; aspect-ratio: 4/3; background: #e9f5ee; }
.program-card-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.program-card-body { display: flex; flex-direction: column; gap: .6rem; padding: 1rem 1.1rem 1.2rem; }
.program-card-title { font-weight: 800; font-size: 1rem; color: var(--brand-green-deep); margin: 0; letter-spacing: .01em; }
.program-card-text { color: #4b5d52; line-height: 1.6; overflow: hidden; position: relative; }
.program-card-text p { margin: 0 0 .5rem; text-align: justify; hyphens: auto; overflow-wrap: anywhere; }
.program-card.clamped:not(.expanded) .program-card-text::after { 
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 48px; 
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.85) 100%);
}
.program-card .read-more-toggle { align-self: flex-start; font-weight: 600; }

@media (max-width: 576px){
  .program-card-img-wrap { aspect-ratio: 16/10; }
}

/* Noticias: clamping de texto en tarjetas (10 líneas) */
.news-text { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; text-align: justify; hyphens: auto; overflow-wrap: anywhere; }
.news-text.clamp-10 { -webkit-line-clamp: 10; }

/* Noticias: clamping contenedor (título + texto) */
.news-content {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.clamp-14 {
  -webkit-line-clamp: 14;
}
.news-content .card-title {
  margin: 0 0 .25rem 0;
}
.news-read-toggle {
  font-weight: 600;
}
/* Tarjetas modernas para Misión, Visión y Valores */
.purpose-card { background: #ffffff; color: #234; border: 1px solid rgba(27,125,70,.14); border-radius: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.08); transition: transform .15s ease, box-shadow .15s ease; overflow: hidden; }
.purpose-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,.12); }
.purpose-card .card-body { padding: 1.25rem; }
.purpose-card .card-body h2 { color: var(--brand-green-deep); font-weight: 800; letter-spacing: .02em; }
.purpose-card .icon-pill { background: rgba(139,195,74,.14); color: var(--brand-green-deep); border-radius: 999px; padding: .35rem .5rem; display: inline-flex; align-items: center; justify-content: center; }
.purpose-card .preview-img { width: 100%; height: 180px; object-fit: cover; border-radius: 12px; box-shadow: 0 6px 16px rgba(0,0,0,.08); }
.purpose-card .clamped-text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 7; overflow: hidden; text-align: justify; hyphens: auto; overflow-wrap: anywhere; }
.purpose-card.expanded .clamped-text { -webkit-line-clamp: initial; overflow: visible; }
.purpose-card .read-more-toggle { font-weight: 600; color: var(--brand-green-deep); }

/* Grid responsive para logos de alianzas y colaboradores */
.logos-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; align-items: center; }
.logos-grid img { max-height: var(--logo-max-height, 64px); width: auto; object-fit: contain; justify-self: center; }
/* Celdas para numeración y contenido */
.logos-grid .logo-cell { position: relative; display: flex; align-items: center; justify-content: center; }
/* Badge de índice (1., 2., 3., …) */
.logos-grid .logo-index {
  position: absolute;
  top: 6px; left: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 24px; padding: 0 .25rem;
  font-size: .8rem; font-weight: 700; color: var(--brand-green-deep);
  background: #ffffff; border: 1px solid rgba(27,125,70,.24); border-radius: 999px;
  box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
/* Texto fallback (badge) cuando no hay logo */
.logos-grid .brand-name {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--logo-max-height, 64px);
  padding: .5rem .75rem;
  text-align: center;
  font-weight: 600;
  color: #2f6650;
  background: #ffffff;
  border: 1px solid rgba(27, 125, 70, .22);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
@media (max-width: 576px) {
.logos-grid { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 6px; }
.logos-grid img { max-height: var(--logo-max-height, 56px); }
.logos-grid .logo-index { top: 4px; left: 4px; min-width: 22px; height: 22px; font-size: .75rem; }
.logos-grid .brand-name { min-height: var(--logo-max-height, 56px); }

/* (Eliminado) Contenedor .logo-item: ya no se usa en logos-grid */
}
/* Lista vertical para nombres sin logo (enumerada) */
.brand-list { margin: .25rem 0 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: .25rem; }
.brand-list-item { color: #2f6650; font-weight: 600; }
