/*------- Inicio --------*/
.inicio-container .box {
  margin-bottom: 2px;
  background-color: #ffffff;
  text-align: center;
  font-weight: bold;
}

.inicio-container img {
  max-width: 100%;
  height: auto;
}

/* Caja contenedora */
/* Slider */
.slider-container {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.slide {
  display: none;
  position: relative;
}

.slide.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

.slider-container img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

/* Caja contenedora - Ahora con altura fija */
.noticia-detalle {
  background: #fff;
  padding: 20px;
  min-height: 140px; /* Altura fija para evitar movimientos */
  display: flex;
  align-items: center;
}

.noticia-detalle .row {
  width: 100%;
}

/* Titular */
.noticia-detalle .titular {
  text-align: left;
  display: flex;
  align-items: center;
  min-height: 100px; /* Altura mínima para consistencia */
}

.noticia-enlace {
  color: #339966;
  font-weight: 600;
  text-decoration: none;
  font-size: 1.1rem;
  line-height: 1.4;
  transition: all 0.3s ease;
  position: relative;
  display: inline-block;
}

.noticia-enlace::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -2px;
  left: 0;
  background-color: #339966;
  transition: width 0.3s ease;
}

.noticia-enlace:hover {
  color: #267a4d;
}

.noticia-enlace:hover::after {
  width: 100%;
}

/* Bajada con altura fija y degradado */
.noticia-detalle .bajada {
  position: relative;
  border-left: 2px solid #e0e0e0;
  text-align: left;
  padding-left: 20px;
  font-size: 0.95rem;
  line-height: 1.5;
  height: 100px; /* Altura fija para evitar movimientos */
  overflow: hidden;
  display: flex;
  align-items: center;
}

.bajada p {
  font-weight: normal;
  color: #555;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 5; /* Máximo 4 líneas */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.noticia-detalle .bajada::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2em;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
  pointer-events: none;
}

/* Puntos del slider - Modernizados */
.slider-dots {
  padding: 20px 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  background: #fff;
}

.slider-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #d0d0d0;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.slider-dots .dot:hover {
  background-color: #a0a0a0;
  transform: scale(1.2);
}

.slider-dots .dot.active {
  background-color: #339966;
  width: 32px;
  border-radius: 6px;
  border-color: #339966;
}

/* Animación de entrada */
@keyframes fadeIn {
  from { 
    opacity: 0;
    transform: translateY(10px);
  }
  to { 
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .slider-container img {
    height: 250px;
  }
  
  .noticia-detalle {
    min-height: auto;
    padding: 15px;
  }
  
  .noticia-detalle .titular,
  .noticia-detalle .bajada {
    min-height: auto;
    height: auto;
    border-left: none;
    padding-left: 0;
    margin-bottom: 15px;
  }
  
  .noticia-detalle .bajada {
    padding-top: 15px;
    border-top: 2px solid #e0e0e0;
  }
  
  .noticia-enlace {
    font-size: 1rem;
  }
  
  .bajada p {
    -webkit-line-clamp: 3;
  }
}


/*------- Card Infórmate ------*/
.info-card-video {
  margin-bottom: 6px;
  overflow: hidden;
  height: 180px;
}

.video-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.youtube-thumbnail {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.youtube-thumbnail-videos {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.youtube-thumbnail img {
  width: 100%;
  display: block;
  position: relative;
  margin-top: -38px;
}

.youtube-thumbnail-videos img {
  width: 100%;
  display: block;
  height: auto;
}

.youtube-play-button {
  position: absolute;
  top: 43%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 78px;
  height: 58px;
  background: url('https://img.icons8.com/ios-filled/100/ffffff/play-button-circled--v1.png') no-repeat center;
  background-size: contain;
}

.youtube-play-button-videos {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  background: url('https://img.icons8.com/ios-filled/100/ffffff/play-button-circled--v1.png') no-repeat center;
  background-size: contain;
  z-index: 2;
}

.info-card {
  background-color: transparent;
  overflow: hidden;
  transition: transform 0.2s;
  border-bottom: 3px solid #bdc9d2;
}

.info-card:hover {
  transform: translateY(-3px);
}

.info-card a {
  color: inherit;
  text-decoration: none;
  display: block;
  margin-bottom: 2px;
}

/*------ Logos Instituciones -------*/
.subtitulo-instituciones {
  text-align: justify;
  font-size: 1.1rem;
  color: #565656;
  margin-bottom: 13px;
  line-height: 1.6;
  max-width: 1000px;
  margin-left: 42px;
  margin-right: auto;
}

.logos-instituciones-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 60px;
/*   flex-wrap: wrap; */
  padding: 7px 5px;
  border-radius: 12px;
}

.logo-institucion-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  transition: all 0.3s ease;
  border-radius: 8px;
  background: #fff;
  max-width: 500px;
  width: 100%;
}

.logo-institucion-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.logo-imagen {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-imagen img {
  max-width: 460px;
  max-height: 150px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  filter: grayscale(20%);
  transition: filter 0.3s ease;
}

.logo-institucion-item:hover .logo-imagen img {
  filter: grayscale(0%);
}

.logo-texto {
  flex: 1;
  text-align: center;
}

.logo-titulo {
  font-size: 1.1rem;
  font-weight: 600;
  color: #339966;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.logo-bajada {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

/* Distribución responsiva automática */
/* 1 logo: centrado */
.logos-instituciones-grid:has(.logo-institucion-item:only-child) {
  justify-content: center;
}

/* 2 logos: espaciados */
.logos-instituciones-grid:has(.logo-institucion-item:nth-child(2):last-child) {
  justify-content: space-evenly;
  gap: 40px;
}

/* 3 logos: distribuidos uniformemente */
.logos-instituciones-grid:has(.logo-institucion-item:nth-child(3)) {
  justify-content: space-between;
  gap: 30px;
}

/* 4 o más logos: grid */
.logos-instituciones-grid:has(.logo-institucion-item:nth-child(4)) {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

/* Responsive */
@media (max-width: 768px) {
  .logos-instituciones-grid {
    gap: 30px;
    padding: 30px 15px;
  }
  
  .logo-institucion-item {
    max-width: 100%;
  }
  
  .logo-imagen {
    width: 100px;
  }
  
  .logo-imagen img {
    max-width: 100px;
    max-height: 80px;
  }
  
  .logo-titulo {
    font-size: 1rem;
  }
  
  .logo-bajada {
    font-size: 0.85rem;
  }
  
  .subtitulo-instituciones {
    font-size: 1rem;
    margin-bottom: 30px;
  }
}

@media (max-width: 480px) {
  .logos-instituciones-grid {
    flex-direction: column;
    gap: 20px;
  }
  
  .logos-instituciones-grid:has(.logo-institucion-item:nth-child(2):last-child),
  .logos-instituciones-grid:has(.logo-institucion-item:nth-child(3)) {
    flex-direction: column;
  }
  
  .logo-institucion-item {
    flex-direction: column;
    text-align: center;
  }
  
  .logo-texto {
    text-align: center;
  }
}

/*------ Noticias -------*/
.clase-slider{
    margin-bottom: -5px;
}

.noticias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.noticia-card {
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.3s;
}

.noticia-card:hover {
  transform: translateY(-4px);
}

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

.noticia-info {
  padding: 16px;
}

.noticia-fecha {
  font-size: 13px;
  color: #888;
  margin-bottom: 8px;
}

.noticia-titulo {
  font-size: 18px;
  font-weight: bold;
  color: #339966;
  text-decoration: none;
  margin-bottom: 10px;
  display: block;
  line-height: 1.3;
}

.noticia-titulo:hover {
  text-decoration: underline;
}

.noticia-descripcion {
  font-size: 14px;
  color: #444;
  line-height: 1.5;
}

.noticias-footer {
  margin-top: 40px;
}

.btn-mas-noticias {
  background-color: #e5e5e5;
  color: #004a99;
  font-weight: bold;
  padding: 12px 24px;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s;
}

.btn-mas-noticias:hover {
  background-color: #ccc;
}

/*-------Imagen grande-------*/
.imagen-central {
  display: flex;
  align-items: center;
  padding: 20px;
  transition: all 0.3s ease;
  border-radius: 8px;
  background: #fff;
  width: 100%;
}

.imagen-central img{
  min-height: 300px;
}

.imagen-central:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/*-------Recursos-------*/

.recursos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
	align-items: stretch;
}

/* Columna de cada recurso */
.columna-recurso {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Encabezado verde */
.encabezado-recurso {
  background: #339966;
  color: white;
  padding: 16px;
  position: relative;
}

.encabezado-recurso .titulo {
  font-weight: bold;
  font-size: 18px;
}

.encabezado-recurso .subtitulo {
  font-size: 16px;
  margin-top: 4px;
}

/* Punta debajo del encabezado */
.encabezado-recurso .punta {
  position: absolute;
  bottom: -10px;
  left: 30px;
  width: 20px;
  height: 10px;
  background: #339966;
  clip-path: polygon(50% 100%, 0 0, 100% 0);
}

/* Bloques internos */
.bloques-recurso {
  display: flex;
  flex-direction: column;
  gap: 12px; /* separación uniforme entre bloques */
  flex-grow: 1;
  margin-top: 15px;
  background: transparent; /* para ver el fondo */
  height: 100%; /* que se estiren hasta igualar altura si es posible */
}

.bloque {
  display: flex;
  align-items: flex-start;
  background: #fff; /* cada bloque con fondo blanco separado */
  height: 120px; /* altura fija para alinear */
  box-sizing: border-box;
	border-bottom: 3px solid #bdc9d2;
}

.bloque .img {
  width: 150px;
  height: 100%;
  flex-shrink: 0;
  overflow: hidden;
}

.bloque .img img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* fuerza que la imagen rellene sin deformarse */
  display: block;
}

.bloque .texto {
  font-size: 14px;
  color: #333;
  line-height: 1.4;
  flex: 1;
	padding: 10px;
  overflow: hidden;
}


/* Botón Ver Más */
.footer-recurso {
  margin-top: auto;
  text-align: center;
}

.btn-ver-mas {
  background-color: #BAB8B8;
  color: #339966;
  font-weight: bold;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: center;
  margin-bottom: 15px;
}


.btn-ver-mas:hover {
  background-color: #ccc;
}

/*-------Videos---------*/

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.video-card {
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  transition: transform 0.3s;
}

.video-card:hover {
  transform: translateY(-4px);
}

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

.video-info {
  padding: 16px;
}

.video-fecha {
  font-size: 13px;
  color: #888;
  margin-bottom: 8px;
}

.video-titulo {
  font-size: 18px;
  font-weight: bold;
  color: #339966;
  text-decoration: none;
  margin-bottom: 10px;
  display: block;
  line-height: 1.3;
}

.video-titulo:hover {
  text-decoration: underline;
}

.video-descripcion {
  font-size: 14px;
  color: #444;
  line-height: 1.5;
}

.videos-footer {
  margin-top: 40px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 ratio */
  height: 0;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Zoom 150% (1265px) */
@media screen and (min-width: 1236px) and (max-width: 1325px) {
	.info-card-video {
    	height: 180px;
    }
    .youtube-thumbnail img {
    	margin-top: -38px;
	}
}

/* Zoom 125% (1210px) NOTEBOOK*/
@media screen and (min-width: 1200px) and (max-width: 1235px) {
	.info-card-video {
    	height: 180px;
    }
    .youtube-thumbnail img {
    	margin-top: -38px;
	}
}

/* Zoom 175% (1084px) */
@media screen and (min-width: 1051px) and (max-width: 1199px) {
	.info-card-video {
    	height: 181px;
    }
    .youtube-thumbnail img {
    	margin-top: -32px;
	}
}

@media screen and (min-width: 1001px) and (max-width: 1050px) {
	.info-card-video {
    	height: 168px;
    }
    .youtube-thumbnail img {
    	margin-top: -32px;
	}
}

/* Zoom 200% (956px) */
@media screen and (min-width: 901px) and (max-width: 1000px) {
	.info-card-video {
    	height: 150px;
    }
    .youtube-thumbnail img {
    	margin-top: -36px;
	}
    .youtube-play-button {
    	height: 38px;
    }
}

/* NOTEBOOK 175% (864px)*/
@media screen and (min-width: 801px) and (max-width: 900px) {
	.info-card-video {
    	height: 141px;
    }
    .youtube-thumbnail img {
    	margin-top: -27px;
	}
}

/* Zoom 250% (758px)*/
@media screen and (min-width: 700px) and (max-width: 800px) {
	.info-card-video {
    	height: 123px;
    }
    .youtube-thumbnail img {
    	margin-top: -22px;
	}
}

/* Zoom 300% (632px) */
@media screen and (min-width: 620px) and (max-width: 699px) {
	.info-card-video {
    	height: 100px;
    }
    .youtube-thumbnail img {
    	margin-top: -18px;
	}
}

/* NOTEBOOK Zoom 250% (605px) */
@media screen and (min-width: 560px) and (max-width: 619px) {
	.info-card-video {
    	height: 93px;
    }
    .youtube-thumbnail img {
    	margin-top: -18px;
	}
}

/* Celu Zoom 300% (605px) */
@media screen and (max-width: 559px) {
	.info-card-video {
    	height: 192px;
    }
    .youtube-thumbnail img {
    	margin-top: -41px;
	}
    .margin-especial {
    	margin-top:50px;
    }
}

/* Carrusel */
/* Contenedor principal para evitar problemas de ancho */
.instituciones-carrusel-seccion {
    margin: 40px 0;
    position: relative;
}

/* El contenedor de Swiper debe tener un ancho definido o ser fluido */
.mi-carrusel-instituciones {
    width: 100%;
    height: auto;
    padding: 0;
    margin: 0;
}

/* Estilo para cada item del carrusel */
.carrusel-slide {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 0; /* Eliminado el padding que afectaba el cálculo */
    transition: transform 0.3s ease;
}

/* Efecto hover moderno en las slides */
.carrusel-slide:hover {
    transform: translateY(-5px);
}

/* El enlace que contiene la imagen y el texto */
.carrusel-enlace-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    width: 100%;
	max-height: 300px;
	min-height: 300px;
    padding: 15px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    box-sizing: border-box; /* Importante para que el padding no afecte el ancho */
	overflow: hidden;
}

/* Efecto hover en el enlace */
.carrusel-enlace-item:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transform: scale(1.02);
}

/* La imagen */
.carrusel-imagen {
    width: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 120px;
    margin: 0 auto;
    display: block;
    transition: opacity 0.3s ease;
}

.carrusel-enlace-item:hover .carrusel-imagen {
    opacity: 0.9;
}

/* El texto de la descripción */
.carrusel-descripcion {
    margin-top: 15px;
    font-size: 0.95em;
    font-weight: bold;
    color: #333;
    max-width: 100%;
    word-wrap: break-word;
    line-height: 1.4;
}

/* Estilos modernos para los botones de navegación */
.instituciones-carrusel-seccion .swiper-button-prev,
.instituciones-carrusel-seccion .swiper-button-next {
    color: #339966;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

/* Posicionar las flechas superpuestas al contenido */
.instituciones-carrusel-seccion .swiper-button-prev {
    left: 10px;
}

.instituciones-carrusel-seccion .swiper-button-next {
    right: 10px;
}

/* Ajustar el tamaño del icono de la flecha */
.instituciones-carrusel-seccion .swiper-button-prev:after,
.instituciones-carrusel-seccion .swiper-button-next:after {
    font-size: 22px;
    font-weight: bold;
}

/* Efecto hover en las flechas */
.instituciones-carrusel-seccion .swiper-button-prev:hover,
.instituciones-carrusel-seccion .swiper-button-next:hover {
    background: #339966;
    color: #fff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 16px rgba(51, 153, 102, 0.3);
}

/* Estilos de la paginación */
.mi-carrusel-instituciones .swiper-pagination {
    position: relative;
    margin-top: 25px;
}

.mi-carrusel-instituciones .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.mi-carrusel-instituciones .swiper-pagination-bullet-active {
    background: #339966;
    opacity: 1;
    width: 24px;
    border-radius: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .instituciones-carrusel-seccion .swiper-button-prev,
    .instituciones-carrusel-seccion .swiper-button-next {
        width: 36px;
        height: 36px;
    }
    
    .instituciones-carrusel-seccion .swiper-button-prev:after,
    .instituciones-carrusel-seccion .swiper-button-next:after {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .instituciones-carrusel-seccion .swiper-button-prev,
    .instituciones-carrusel-seccion .swiper-button-next {
        width: 32px;
        height: 32px;
    }
}