/* ================= Variables ================= */
:root {
  --primary: #005bbe;
  --bg-color: #0d1126;
  --bg-color-light: #141a39;
  --black: #202020;
  --white: #f7f7f7;
  --gray: #dadada;
  --blue: #5086c1;
  --blue-dark: #003366;
  --green: rgb(0,162,0);
  --brown: #a68069;
  --red: #ff6961;
  --section-title-space: 4rem;
}

/* ================= Global Reset ================= */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ================= Base Typography ================= */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 140px; /* Ajusta el desplazamiento para compensar el header fijo */
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100dvh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  text-align: center;
  overflow-x: hidden;
  max-width: 100vw;
  margin: 0;
  padding: 0;
  padding-top: 0;
}

/* ================= Links ================= */
a, a:hover {
  text-decoration: none;
  color: inherit;
}

main {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  padding-top: 180px; /* Espacio para el header de dos niveles */
}

/* Prevenir overflow en containers de Bootstrap */
.container,
.container-fluid {
  max-width: 100% !important;
  overflow-x: hidden !important;
  padding-left: 15px !important;
  padding-right: 15px !important;
  box-sizing: border-box !important;
}

@media (max-width: 768px) {
  .container,
  .container-fluid {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}

.alianzas-section {
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

.aliados-intro {
  text-align: center;
  color: #666;
  font-size: 0.95rem;
  margin-top: 0.5rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

/* Grid para aliados en paralelo */
.aliados-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1400px;
  margin: 3rem auto 0;
  padding: 0 1rem;
  align-items: start;
}

.aliados-subsection {
  margin: 0;
  min-width: 0;
}

.aliados-subsection-title {
  text-align: center;
  font-size: 1.15rem;
  color: #0d2033;
  margin-bottom: 1.25rem;
  font-weight: 600;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.row {
  margin-bottom: 20px;
}

/* ================= Hero Section ================= */
.hero {
  width: 100%;
  max-width: 100vw;
  height: clamp(50vh, 60vh, 70vh);
  overflow: hidden;
  position: relative;
  margin-top: 0;
}

.hero .video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Hero Responsive */
@media (max-width: 1024px) {
  .hero {
    height: clamp(45vh, 55vh, 65vh);
  }
}

@media (max-width: 768px) {
  .hero {
    height: clamp(35vh, 45vh, 55vh);
  }
}

@media (max-width: 520px) {
  .hero {
    height: clamp(30vh, 40vh, 50vh);
  }
  .hero .video {
    object-fit: cover;
  }
}

/* ================= Sticky Sections ================= */
.section {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  width: 100%;
  max-width: 100vw;
  min-height: clamp(60vh, 75vh, 95vh); /* reducido para evitar solapamiento entre secciones */
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  overflow-x: hidden;
}



/* ================= Imagenes de Fondo en el index ================= */
.section:nth-child(4) {
  background-image: url(./assets/img/hero/hero-cenigaa-home.jpg);
}

.section:nth-child(6) {
  background-image: url(./assets/img/hero/Visor.jpg);
}





.sticky {
  position: static; /* El sticky se aplica en el interior para evitar que toda la sección quede pegada */
}

.section.sticky {
  margin-bottom: 1.5rem;
  min-height: clamp(45vh, 55vh, 65vh);
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 4rem; /* Aumentado de 3rem a 4rem */
  padding: 0 3rem;
}

/* Estilos específicos para section-header y section-title dentro de sticky */
.section.sticky .section-header {
  margin-bottom: 0;
  flex-shrink: 0;
  min-width: 350px; /* Cambiado a min-width */
  max-width: 450px; /* Aumentado de 400px */
}

.section.sticky .section-title {
  color: #ffffff;
  font-size: 2.8rem;
  font-weight: 700;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  opacity: 1;
  transform: translateY(0);
  text-align: left;
  line-height: 1.2;
}

.section.sticky .section-title::after {
  background-color: var(--primary);
  width: 120px; /* Aumentado de 100px */
  height: 6px;
  margin: 12px 0 0; /* Aumentado de 8px */
}

/* Contenido estático dentro de las secciones (no pegado) */
.section.sticky .contenido {
  position: static;
  top: auto;
  z-index: auto;
  align-self: center; /* centrar el contenido dentro de la sección */
}
.section.sticky .btn-sticky {
  min-width: 220px;
  padding: 15px 20px;
  background-color: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.12s ease;
  display: inline-block;
  text-align: center;
}

.section.sticky .btn-sticky:hover {
  background-color: var(--blue-dark);
  transform: translateY(-1px);
}

.section.sticky .btn-youtube {
  background-color: #FF0000;
  color: #ffffff;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(255, 0, 0, 0.3);
}

.section.sticky .btn-youtube:hover {
  background-color: #CC0000;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 0, 0, 0.4);
}

.section.sticky .btn-youtube i {
  font-size: 1.3rem;
}

.contenido {
  display: flex;
  flex-direction: column;
  text-align: left; /* Cambiado de center a left */
  font-size: larger;
  font-weight: 600;
  gap: 1.5rem; /* Aumentado de 1.25rem */
  width: 100%;
  max-width: 750px; /* Aumentado de 600px */
  background-color: rgba(0, 0, 0, 0.7);
  padding: 2rem 2.5rem; /* Aumentado padding */
  border-radius: 10px;
  box-sizing: border-box;
}

.contenido p {
  margin: 0;
  font-size: 1.2rem; /* Aumentado de 1.15rem */
  line-height: 1.7; /* Aumentado de 1.6 */
  text-align: justify; /* Justificado para mejor lectura */
}

.contenido > div {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

@media (max-width: 968px) {
  .section.sticky {
    flex-direction: column;
    gap: 1.5rem;
    padding: 0 1.5rem;
  }
  
  .section.sticky .section-header {
    min-width: auto;
    max-width: 100%;
  }
  
  .section.sticky .section-title {
    text-align: center;
    font-size: 2.8rem; /* Aumentado */
  }
  
  .section.sticky .section-title::after {
    margin: 12px auto 0;
  }
  
  .contenido {
    max-width: min(95%, 1000px);
    text-align: center; /* Centrado en tablets */
  }
  
  .contenido p {
    text-align: center; /* Centrado en tablets */
  }
}

@media (max-width: 768px) {
  .contenido {
    padding: 1.5rem 1.25rem; /* Aumentado */
    gap: 1.25rem;
  }
  
  .contenido p {
    font-size: 1.05rem; /* Aumentado */
  }
  
  .section.sticky {
    min-height: clamp(40vh, 50vh, 60vh);
  }
  
  .section.sticky .section-title {
    font-size: 2.4rem; /* Aumentado */
  }
}

/* ================= After Scrolling ================= */
.after-scrolling {
  position: relative;
  z-index: 2;
  /* Evitamos el padding-top grande que provocaba solapamiento con las secciones sticky */
  padding: 2rem 1rem;
  width: 100%;
  max-width: 100vw;
  background-color: #fff;
  margin-top: 1rem;
  overflow-x: hidden;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .after-scrolling {
    padding: 1rem 0.5rem;
  }
}

/* ================= Module: Acciones CTEL ================= */
.acciones-ctel {
  position: relative;
  background: none;
  color: #fff;
  padding: 2.5rem 1rem; /* Reducido de 4rem a 2.5rem */
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

.acciones-ctel .module-content {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  z-index: 2;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 3rem;
}

.acciones-ctel .section-header {
  flex-shrink: 0;
  min-width: 280px;
  max-width: 350px;
  position: sticky;
  top: 100px;
}

.acciones-ctel .section-title {
  text-align: left;
}

.acciones-ctel .section-title::after {
  margin: 12px 0 0;
}

.acciones-ctel .cards-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  justify-content: center;
  flex: 1;
}

@media (max-width: 1300px) {
  .acciones-ctel .cards-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 968px) {
  .acciones-ctel .module-content {
    flex-direction: column;
    gap: 2rem;
    padding: 0 1rem;
  }
  
  .acciones-ctel .section-header {
    min-width: auto;
    max-width: 100%;
    position: static;
  }
  
  .acciones-ctel .section-title {
    text-align: center;
  }
  
  .acciones-ctel .section-title::after {
    margin: 12px auto 0;
  }
  
  .acciones-ctel .cards-container {
    grid-template-columns: 1fr;
  }
}

.acciones-ctel .card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 420px;
}

.acciones-ctel .card img {
  width: 140px;
  height: 140px;
  object-fit: contain;
  margin: 1rem auto 0.5rem;
}

.acciones-ctel .card img.ciencia-icon,
.acciones-ctel .card img.tecnologia-icon,
.acciones-ctel .card img.innovacion-icon,
.acciones-ctel .card img.asc-icon {
  width: 140px;
  height: 140px;
  object-fit: contain;
  margin: 1rem auto 0.5rem;
}

.acciones-ctel .card h3 {
  background: #0d2033;
  color: #fff;
  padding: 1rem;
  margin: 0;
  font-weight: 700;
  text-align: center;
  font-size: 1.2rem;
}

.acciones-ctel .card p {
  padding: 1.25rem;
  font-size: 0.95rem;
  color: #333;
  flex-grow: 1;
  line-height: 1.5;
}

.acciones-ctel .card:hover {
  transform: translateY(-5px);
}

/* ================= Sección Instituciones Gestoras Líderes ================= */
.instituciones {
  padding: 4rem 1rem;
  width: 100%;
  overflow-x: hidden;  /* evitar desbordamiento horizontal */
}

.instituciones__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  width: 100%;
  margin: 2rem 0;
  padding: 0 1rem;
  overflow-x: hidden;  /* evita scroll horizontal */
  box-sizing: border-box;
}

.instituciones__grid {
  display: flex;
  gap: 2rem;
  width: 100%;
  margin: 2rem 0;
  padding: 0 1rem;
}

.instituciones__card {
  flex: 1 1 0;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  background-color: #fff !important; /* Asegura que el fondo sea blanco */
  box-shadow: none !important; /* Asegura que no haya sombra */
}

.instituciones__card:hover {
  transform: translateY(-5px); /* Mantiene el efecto de desplazamiento */
}

.instituciones__img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background-color: var(--white);
}

/* Overlay que aparece en hover :contentReference[oaicite:1]{index=1} */
.instituciones__overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.75);
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.instituciones__card:hover .instituciones__overlay {
  opacity: 1;
}

.instituciones__name {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
  font-weight: 700;
}

.instituciones__desc {
  font-size: 0.95rem;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.instituciones__btn {
  padding: 0.6rem 1.2rem;
  background: var(--primary);
  color: var(--white);
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
}

.instituciones__btn:hover {
  background: var(--blue-dark);
}

/* Ajustes responsivos */
@media (max-width: 768px) {
  .instituciones__grid {
    grid-template-columns: 1fr;
  }
}

/* ================= Section Fundadores ================= */
.fundadores-container {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.fundadores-columna {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  transition: all 0.3s ease;
}

.fundadores-columna:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.fundadores-subtitulo {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0d1126;
  margin: 0 0 2rem 0;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--primary);
}

.fundadores-lista {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fundador-item {
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  font-size: 1.05rem;
  color: #333;
  transition: all 0.3s ease;
}

.fundador-item:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  transform: translateX(5px);
  border-left-width: 6px;
}

@media (max-width: 968px) {
  .fundadores-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .fundadores-container {
    padding: 0 1rem;
  }
  
  .fundadores-columna {
    padding: 1.5rem;
  }
  
  .fundadores-subtitulo {
    font-size: 1.5rem;
  }
}

/* ================= Section Fundadores (Old Grid - Unused) ================= */
.grid-fundadores {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  /* Mostrar 4 columnas en pantallas grandes (4 + 3 = 7 items en 2 filas)
     y ajustar responsivamente en puntos de quiebre */
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 20px;
}

@media (max-width: 1024px) {
  .grid-fundadores {
    grid-template-columns: repeat(3, minmax(200px, 1fr));
  }
}

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

@media (max-width: 480px) {
  .grid-fundadores {
    grid-template-columns: 1fr;
  }
}

/* Estilos para diferenciar fundadores activos/inactivos */
.investigador-activo-estado .investigador-card {
  border: 2px solid #00A200 !important;
  background-color: rgba(0, 162, 0, 0.08) !important;
}

.investigador-inactivo-estado .investigador-card {
  border: 2px solid #cccccc !important;
  background-color: rgba(204, 204, 204, 0.15) !important;
  opacity: 0.85;
}

.badge-activo {
  display: inline-block;
  background-color: #00A200;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.5rem 0;
}

.badge-inactivo {
  display: inline-block;
  background-color: #999999;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.5rem 0;
}

.fecha-renuncia {
  margin: 0.5rem 0 0 0;
  font-size: 0.8rem;
  color: #666;
  font-style: italic;
}

/* ================= Section Noticias - Diseño Moderno ================= */
.section-noticias {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 5rem 1rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
  position: relative;
}

.section-noticias::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 105, 92, 0.3), transparent);
}

.section-header-news {
  text-align: center;
  margin-bottom: 3rem;
  max-width: 800px;
}

.news-title-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.news-subtitle {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #00695c;
  opacity: 0.9;
}

.section-title-news {
  font-size: clamp(2.5rem, 5vw, 3rem);
  font-weight: 700;
  color: #0d1126;
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.news-description {
  font-size: 1rem;
  color: #6c757d;
  margin: 1rem 0 0 0;
  line-height: 1.6;
}

/* Contenedor del carrete */
.noticias-wrapper {
  width: min(95%, 1400px);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-top: 1rem;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .noticias-wrapper {
    width: 95%;
    gap: 0.75rem;
  }
  
  .section-noticias {
    padding: 3rem 1rem;
  }
}

.noticias {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 0.5rem 1.5rem;
  flex: 1 1 auto;
}

.noticias::-webkit-scrollbar {
  height: 8px;
}
.noticias::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 10px;
}
.noticias::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, #00695c, #00897b);
  border-radius: 10px;
  transition: background 0.3s ease;
}
.noticias::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, #004d40, #00695c);
}

.noticia {
  scroll-snap-align: start;
  flex: 0 0 min(90%, 650px);
  display: flex;
  border-radius: 20px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 
    0 8px 16px rgba(0, 0, 0, 0.1),
    0 16px 32px rgba(0, 0, 0, 0.06);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.noticia:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 16px 32px rgba(0, 105, 92, 0.15),
    0 24px 48px rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 105, 92, 0.2);
}

.noticia-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  min-height: 350px;
}

.noticia-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
  padding: 2.5rem;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.noticia-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: #f8f9fa;
}

.noticia-image {
  width: 100%;
  height: 100%;
  min-height: 300px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.noticia:hover .noticia-image {
  transform: scale(1.03);
}

.noticia .red-social {
  display: flex;
  gap: 0.75rem;
  position: relative;
  z-index: 2;
}

.noticia .red-social a {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  color: #00695c;
  text-decoration: none;
  font-size: 1.1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.noticia .red-social a:hover {
  transform: translateY(-3px) scale(1.15);
  background: linear-gradient(135deg, #00695c, #00897b);
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(0, 105, 92, 0.4);
}

.noticia-title {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  font-weight: 700;
  line-height: 1.3;
  color: #0d1126;
  margin: 0;
  letter-spacing: -0.02em;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.noticia-description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #6c757d;
  margin: 0;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.noticia-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 0.45rem 0.9rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #00695c;
  background: linear-gradient(135deg, rgba(0, 105, 92, 0.12), rgba(0, 137, 123, 0.08));
  border-radius: 20px;
  border: 1px solid rgba(0, 105, 92, 0.2);
}

.noticia-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: center;
  padding: 0.875rem 1.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #00695c, #00897b);
  text-decoration: none;
  border-radius: 30px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 105, 92, 0.25);
}

.noticia-btn::after {
  content: '→';
  font-size: 1.25rem;
  transition: transform 0.3s ease;
}

.noticia-btn:hover {
  background: linear-gradient(135deg, #004d40, #00695c);
  transform: translateX(5px);
  box-shadow: 0 6px 20px rgba(0, 105, 92, 0.35);
}

.noticia-btn:hover::after {
  transform: translateX(4px);
}

.noticia .red-social {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
  justify-content: center;
  align-self: center;
}

.noticia .red-social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #00695c, #00897b);
  color: #ffffff;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 3px 10px rgba(0, 105, 92, 0.25);
}

.noticia .red-social a:hover {
  transform: translateY(-3px) scale(1.12);
  background: linear-gradient(135deg, #004d40, #00695c);
  box-shadow: 0 6px 18px rgba(0, 105, 92, 0.4);
}

/* Botones del carrusel - Estilo Moderno */
.carousel-btn {
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  border: 2px solid rgba(0, 105, 92, 0.15);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #00695c;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 12px rgba(0, 105, 92, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  z-index: 2;
}

.carousel-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #00695c, #00897b);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.carousel-btn i {
  position: relative;
  z-index: 1;
}

.carousel-btn:disabled {
  cursor: not-allowed;
  color: rgba(0, 0, 0, 0.2);
  background: rgba(240, 240, 240, 0.5);
  border-color: rgba(0, 0, 0, 0.05);
  box-shadow: none;
}

.carousel-btn:not(:disabled):hover::before {
  opacity: 1;
}

.carousel-btn:not(:disabled):hover {
  color: #ffffff;
  transform: scale(1.1);
  box-shadow: 
    0 8px 20px rgba(0, 105, 92, 0.25),
    0 4px 8px rgba(0, 0, 0, 0.1);
  border-color: rgba(0, 105, 92, 0.3);
}

/* Responsive */
@media (max-width: 1024px) {
  .noticia { 
    flex: 0 0 min(85%, 600px); 
  }
  .noticia-left {
    padding: 2rem;
  }
}

@media (max-width: 800px) {
  .noticia { 
    flex: 0 0 min(90%, 500px);
  }
  .noticia-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .noticia-left {
    padding: 2rem;
    order: 2;
  }
  .noticia-right {
    order: 1;
    min-height: 250px;
  }
  .noticia-image {
    min-height: 250px;
  }
  .noticia-title {
    font-size: 1.35rem;
  }
}

@media (max-width: 520px) {
  .noticias-wrapper { gap: 0.5rem; }
  .carousel-btn { display: none; }
  .noticia { 
    flex: 0 0 92%; 
  }
  .noticia-left {
    padding: 1.5rem;
    gap: 1rem;
  }
  .noticia-right {
    padding: 1rem;
    min-height: 220px;
  }
  .noticia-image {
    min-height: 220px;
  }
  .noticia-title {
    font-size: 1.25rem;
  }
  .noticia-description {
    font-size: 0.9rem;
  }
  .noticia-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.85rem;
  }
}

/* ================= Organigrama ================= */
.organigrama-img {
  max-width: 80%;
  height: auto;
  display: block;
  margin: var(--section-title-space) auto 0;
}

/* ================= Alianzas Section ================= */
.alianza-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  width: 100%;
  max-width: 260px;
  min-height: 320px;
  background-color: transparent !important;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
  cursor: pointer;
  outline: none !important;
}

.alianza-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  object-position: center;
  border-radius: 10px 10px 0 0;
  padding: 15px;
  flex-shrink: 0;
}

.alianza-card .card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  padding: 1rem;
  flex-grow: 1;
  width: 100%;
}

.alianza-card .card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: #333;
  text-align: center;
  word-wrap: break-word;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-aliado {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #00695c, #00897b);
  text-decoration: none;
  border-radius: 25px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 105, 92, 0.2);
  border: none;
}

.btn-aliado:hover {
  background: linear-gradient(135deg, #004d40, #00695c);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 105, 92, 0.35);
  color: #ffffff;
}

.btn-aliado i {
  font-size: 0.75rem;
}

.alianza-card:hover {
  box-shadow: 0 6px 12px #77dd77;
  transform: translateY(-5px);
}

/* Carrete de Aliados I+D+i IES */
.alianzas-wrapper {
  width: min(95%, 1200px);
  display: flex;
  align-items: center;
  text-align: center;
  gap: 12px;
  margin: 0 auto;
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .alianzas-wrapper {
    width: 95%;
    gap: 8px;
  }
}

.alianzas {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  flex: 1 1 auto;
}

.alianzas-empresariales {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  flex: 1 1 auto;
}

.alianzas-territoriales {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  flex: 1 1 auto;
}

.alianzas .alianza-card {
  scroll-snap-align: start;
  flex: 0 0 230px; /* ancho por tarjeta */
  height: auto;
}

.alianzas-empresariales .alianza-card {
  scroll-snap-align: start;
  flex: 0 0 230px; /* ancho por tarjeta */
  height: auto;
}

.alianzas-territoriales .alianza-card {
  scroll-snap-align: start;
  flex: 0 0 230px; /* ancho por tarjeta */
  height: auto;
}

@media (max-width: 800px) {
  .alianzas .alianza-card { flex: 0 0 210px; }
  .alianzas-empresariales .alianza-card { flex: 0 0 210px; }
  .alianzas-territoriales .alianza-card { flex: 0 0 210px; }
}

@media (max-width: 520px) {
  .alianzas-wrapper { gap: 8px; }
  .alianzas .alianza-card { flex: 0 0 85%; }
  .alianzas-prev,
  .alianzas-next { display: none; } /* ocultar botones en móvil, usar swipe */
}

/* ================= Aliados Tecnológicos ================= */
.aliados-tecnologicos-section {
  padding: 3rem 1rem;
  background: #fff;
  text-align: center;
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

.aliados-wrapper {
  position: relative;
  max-width: 1400px;
  margin: 2rem auto 0;
  padding: 0 3rem;
}

@media (max-width: 768px) {
  .aliados-wrapper {
    padding: 0 2rem;
  }
}

@media (max-width: 480px) {
  .aliados-wrapper {
    padding: 0 1rem;
  }
}

.aliados-tech-carousel {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 1rem 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.aliados-tech-carousel::-webkit-scrollbar {
  height: 8px;
}

.aliados-tech-carousel::-webkit-scrollbar-track {
  background: #e9ecef;
  border-radius: 10px;
}

.aliados-tech-carousel::-webkit-scrollbar-thumb {
  background: #005bbe;
  border-radius: 10px;
}

.aliado-card {
  flex: 0 0 280px;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
  scroll-snap-align: start;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: inherit;
  min-height: 380px;
}

.aliado-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  background: #fff;
}

.aliado-card img {
  max-width: 180px;
  height: 180px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.aliado-card:hover img {
  transform: scale(1.05);
}

.aliado-card img.esri-logo {
  max-width: 220px;
  height: 180px;
}

.aliado-card h5 {
  color: #0d2033;
  font-weight: 700;
  margin: 0;
  min-height: 2.8rem;
  display: flex;
  align-items: center;
  text-align: center;
}

.aliado-text {
  font-size: 0.9rem;
  color: #555;
  margin: 0;
  text-align: center;
  line-height: 1.5;
  flex-grow: 1;
}

.aliados-disclaimer {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: #444;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
  text-align: center;
}

.aliados-tech-prev,
.aliados-tech-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.aliados-tech-prev {
  left: 0.5rem;
}

.aliados-tech-next {
  right: 0.5rem;
}

@media (max-width: 768px) {
  .aliados-wrapper {
    padding: 0 2.5rem;
  }
  .aliado-card {
    flex: 0 0 240px;
  }
  .aliados-tech-prev, .aliados-tech-next {
    width: 36px;
    height: 36px;
    font-size: 1.5rem;
  }
}

@media (max-width: 520px) {
  .aliado-card img { max-width: 190px; }
  .aliado-card img.esri-logo { max-width: 230px; }
}

/* ================= SECCIÓN: POLÍTICAS Y LINEAMIENTOS ================= */
.politicas-section {
  color: #333;
  padding: 4rem 0;
}

.politicas-content h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin: 0;
}

.politicas-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.politica-item {
  display: flex;
  flex-direction: column;
  background: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, background-color 0.3s ease;
  cursor: pointer;
  align-self: start;
  min-height: 190px;
}

.politica-item:hover {
  transform: translateY(-5px);
  background-color: #77dd77;
}

.politica-header:focus,
.politica-header:active,
.politica-header:focus-visible,
.politica-item:focus-within {
  outline: none;
}

.politica-header {
  background: transparent;
  color: #333;
  border: none;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  cursor: pointer;
}

.politica-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  color: #0d2033;
}

.politica-label {
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
}

.politica-arrow {
  position: absolute;
  right: 1rem;
  top: 1.5rem;
  font-size: 1.25rem;
  transition: transform 0.3s ease;
}

.politica-body {
  background: #fff;
  color: #333;
  padding: 0 1rem;
  overflow: hidden;
  transition: max-height 0.4s ease;
  max-height: 0;
}

.politica-body p {
  margin: 1rem 0;
  line-height: 1.6;
}

/* Animaciones de entrada (reutilizadas) */
.from-left,
.from-right {
  opacity: 0;
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.from-left { transform: translateX(-100px); }
.from-right { transform: translateX(100px); }

.from-left.visible,
.from-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Responsividad: en móviles, una sola columna */
@media (max-width: 768px) {
  .politicas-content h2 {
    font-size: 2rem;
  }
  .politicas-grid {
    grid-template-columns: 1fr;
  }
  .politica-arrow {
    top: 1rem;
    right: 1rem;
  }
}

/* ================= Modal ================= */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #fff;
  padding: 30px;
  border-radius: 10px;
  width: 60%;
  max-width: 800px;
  max-height: 80%;
  overflow-y: auto;
  text-align: center;
  position: relative;
}

.close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 30px;
  cursor: pointer;
  color: #0d2033;
}

.modal-image {
  width: 200px;
  height: 200px;
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
  display: block;
}

.modal-content h2 {
  margin: 10px 0;
  font-size: 2rem;
  color: #0d2033;
}

.modal-content p {
  margin: 10px 0;
  font-size: 18px;
  color: #0d2033;
}

/* ================= Section Title ================= */
.section-header {
  text-align: center;
  margin: var(--section-title-space) 0;
}

.section-title {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 2.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  line-height: 1.2;
  color: #2c3e50;
  margin: 0;
  position: relative;
  display: inline-block;
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}

.section-title.visible {
  opacity: 1;
  transform: translateY(0);
}

.section-title::after {
  content: '';
  display: block;
  width: 120px;
  height: 10px;
  background-color: rgb(0,162,0);
  margin: 12px auto 0;
}

/* ================= Intro Text ================= */
.intro-text {
  text-align: center;
  padding: 2rem 1.25rem;
  margin: 1.5rem auto 2rem;
  color: var(--black);
  background: #ffffffee;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
  max-width: min(95%, 1400px);
}

.intro-text h2 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.intro-text p {
  font-size: 1.1rem;
  line-height: 1.6;
}

/* ================= Sección Podcast ================= */
.podcast-section {
  padding: 4rem 1rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  max-width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

.podcast-subtitle {
  text-align: center;
  color: #666;
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

/* Grid para dos columnas paralelas */
.canal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1400px;
  margin: 3rem auto 0;
  padding: 0 1rem;
  align-items: start;
}

/* Subsecciones de Canal CENIGAA */
.canal-subsection {
  margin: 0;
  min-width: 0;
}

.canal-subsection-title {
  text-align: center;
  font-size: 1.3rem;
  color: #0d2033;
  margin-bottom: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  min-height: 70px;
}

.canal-subsection-title svg {
  flex-shrink: 0;
}

.podcast-wrapper {
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 2rem;
  box-sizing: border-box;
}

@media (max-width: 480px) {
  .podcast-wrapper {
    padding: 0 1rem;
  }
}

.podcast-carousel,
.video-carousel {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  padding: 1rem 0;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.podcast-carousel::-webkit-scrollbar,
.video-carousel::-webkit-scrollbar {
  height: 8px;
}

.podcast-carousel::-webkit-scrollbar-track,
.video-carousel::-webkit-scrollbar-track {
  background: #e9ecef;
  border-radius: 10px;
}

.podcast-carousel::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 10px;
}

.video-carousel::-webkit-scrollbar-thumb {
  background: #FF0000;
  border-radius: 10px;
}

.podcast-card-item {
  flex: 0 0 280px;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  scroll-snap-align: start;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.podcast-card-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.podcast-thumbnail {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, #FF0000 0%, #cc0000 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.play-icon {
  opacity: 0.9;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.podcast-card-item:hover .play-icon {
  opacity: 1;
  transform: scale(1.1);
}

.podcast-info {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.podcast-badge {
  display: inline-block;
  padding: 0.3rem 0.6rem;
  background: #FF0000;
  color: white;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.podcast-info h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #0d2033;
  line-height: 1.3;
}

.podcast-info p {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.podcast-source-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, rgba(0, 91, 190, 0.85) 100%);
  color: white;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 6px;
  transition: all 0.3s ease;
  margin-top: auto;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.podcast-source-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 91, 190, 0.3);
  background: linear-gradient(135deg, rgba(0, 91, 190, 0.9) 0%, var(--primary) 100%);
}

.podcast-source-btn i {
  font-size: 0.8rem;
}

.podcast-link {
  display: inline-block;
  color: #FF0000;
  font-weight: 600;
  font-size: 0.9rem;
  transition: opacity 0.2s ease;
}

.podcast-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.podcast-ver-mas {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
  border: 2px dashed #ddd;
  min-height: 340px;
}

.podcast-ver-mas svg {
  margin-bottom: 1rem;
}

.podcast-ver-mas h4 {
  color: #0d2033;
  margin-bottom: 1rem;
  text-align: center;
  padding: 0 1rem;
}

.podcast-cta {
  background: #FF0000;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 700;
  transition: transform 0.2s ease, opacity 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.podcast-cta:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.podcast-prev,
.podcast-next,
.video-prev,
.video-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

.podcast-prev,
.video-prev {
  left: 0.5rem;
}

.podcast-next,
.video-next {
  right: 0.5rem;
}

@media (max-width: 768px) {
  .aliados-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .aliados-subsection-title {
    font-size: 1.5rem;
  }
  
  .canal-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .podcast-wrapper {
    padding: 0 2.5rem;
  }
  .podcast-card-item {
    flex: 0 0 280px;
  }
  .podcast-prev, .podcast-next,
  .video-prev, .video-next {
    width: 36px;
    height: 36px;
    font-size: 1.5rem;
  }
  .canal-subsection-title {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .podcast-card-item {
    flex: 0 0 90%;
  }
  .carousel-btn {
    display: none;
  }
  .podcast-prev, .podcast-next,
  .video-prev, .video-next {
    display: none;
  }
}

/* ================= Responsive helpers ================= */
img, picture, video, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Ajustes para modal en pantallas pequeñas */
.modal-content {
  width: 60%;
}

@media (max-width: 1024px) {
  .modal-content { width: 80%; }
}

@media (max-width: 768px) {
  .after-scrolling {
    padding-top: 0; /* evitar empujar contenido y posibles solapamientos en móviles */
    padding: 1rem;
  }
  .modal-content {
    width: 92%;
    padding: 1rem;
    max-width: 95%;
  }
  .modal-image {
    width: 140px;
    height: 140px;
  }
  .intro-text {
    padding: 1.25rem 1rem;
    margin: 1rem auto 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 10px;
    max-width: 95%;
  }
  .contenido p {
    font-size: 1rem;
  }
  .section-title {
    font-size: 2rem;
  }
}

@media (max-width: 420px) {
  .contenido {
    padding: 1rem;
    width: min(96%, 600px);
  }
  .section.sticky .btn-sticky { width: auto; padding: 10px 16px; }
}