body {
  background-color: #f4f4f4;
  padding: 0px;
}
/* --- ESTILOS PARA LOS BOTONES --- */

.botones-proyectos {
  text-align: center;
  margin-bottom: 40px;
  padding: 20px 0;
  background: linear-gradient(135deg, #1a2332 0%, #4b78a2 100%);
  border-radius: 15px;
  box-shadow: 0 8px 25px rgba(102, 234, 142, 0.3);
  margin: 20px 50px 40px 50px;
}

.boton-proyecto {
  display: inline-block;
  padding: 5px;
  margin: 8px 12px;
  background: linear-gradient(145deg, #243142, #00b050);
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-transform: uppercase;
  width: 100px;
  height: 100px;
}

.boton-proyecto img {
  border-radius: 50%;
}

/* Efecto de ondas en hover */
.boton-proyecto::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  transition: width 0.6s, height 0.6s;
  transform: translate(-50%, -50%);
  z-index: 0;
}

.boton-proyecto:hover::before {
  width: 300px;
  height: 300px;
}

.boton-proyecto:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15),
    0 4px 10px rgba(128, 234, 102, 0.2);
}

.boton-proyecto:active {
  transform: translateY(-1px) scale(1.02);
  transition: all 0.1s ease;
}

/* Estilo para el botón del proyecto ACTIVO - Mejorado */
.boton-proyecto.active {
  background: linear-gradient(135deg, #66aaea 0%, #4ba27e 100%);
  box-shadow: 0 6px 20px rgba(101, 240, 67, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  position: relative;
}

.boton-proyecto.active::after {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #66aaea, #4ba27e, #71ea66);
  border-radius: 32px;
  z-index: -1;
  opacity: 0.7;
  animation: borderGlow 2s linear infinite;
}

@keyframes borderGlow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.boton-proyecto.active::before {
  background: rgba(255, 255, 255, 0.1);
}

.boton-proyecto.active:hover {
  background: linear-gradient(135deg, #5ad87a 0%, #46c179 100%);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 10px 30px rgba(177, 234, 102, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Efecto de focus para accesibilidad */
.boton-proyecto:focus {
  outline: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), 0 0 0 3px rgba(102, 126, 234, 0.4);
}

/* Animación de carga inicial */
.boton-proyecto {
  animation: slideInUp 0.6s ease-out;
}

.boton-proyecto:nth-child(1) {
  animation-delay: 0.1s;
}
.boton-proyecto:nth-child(2) {
  animation-delay: 0.2s;
}
.boton-proyecto:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1445px) {
  #proyecto-biblioflex {
    margin: 0px;
  }
  .botones-proyectos {
    margin: 20px 20px 30px 20px;
    padding: 15px 0;
  }

  .boton-proyecto img {
    width: 70px;
    height: 70px;
  }
}

@media (max-width: 480px) {
  #proyecto-biblioflex {
    margin: 15px;
  }
  .botones-proyectos {
    margin: 15px 10px 25px 10px;
  }
  .boton-proyecto img {
    width: 70px;
    height: 70px;
    margin: 0px;
  }
}

article .heading_main {
  display: flex;
  flex-direction: column;
}

/* --- ESTILOS PARA EL CONTENEDOR Y LOS PROYECTOS (CONTENIDO SIN CORTAR) --- */

/* 1. Contenedor principal del carrusel */
.carrusel_proyectos {
  position: relative;
  /* CAMBIO: Eliminamos min-height fijo y usamos auto para ajustar al contenido */
  min-height: auto;
  height: auto;
  /* CAMBIO: Cambiamos overflow hidden por visible para evitar cortar contenido */
  overflow: visible;
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  margin: 50px;
  /* AGREGADO: Padding para dar espacio interno */
  padding: 20px;
}

/* 2. Estilos para cada artículo de proyecto */
.proyecto {
  /* CAMBIO: Usamos position relative en lugar de absolute */
  position: relative;
  /* CAMBIO: Eliminamos top, left y width fijos */
  top: auto;
  left: auto;
  width: 100%;
  /* AGREGADO: Padding interno para el contenido */
  padding: 0;

  /* Lógica de la animación */
  opacity: 0;

  transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;

  /* AGREGADO: Para evitar que el contenido se superponga */
  display: none;
}

/* 3. Estilo para el proyecto que está ACTIVO */
.proyecto.active {
  opacity: 1;
  visibility: visible;
  /* AGREGADO: Mostramos el contenido activo */
  display: block;
}

/* --- AJUSTES ADICIONALES PARA MEJOR PRESENTACIÓN --- */

/* Asegurar que el contenedor se ajuste dinámicamente */
.carrusel_proyectos::after {
  content: "";
  display: block;
  clear: both;
}

/* Evitar que las imágenes se salgan del contenedor */
.Proyectos {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  /* AGREGADO: Para evitar desbordamiento */
  object-fit: contain;
}
.Proyectos img {
  margin: 10px 150px;
}
/* Mejorar el espaciado del texto */
.proyecto p {
  line-height: 1.6;
  margin-bottom: 20px;
}
p {
  text-align: justify;
}
/* --- Estilos adicionales de tu código (sin cambios) --- */
.container {
  max-width: 1140px;
  margin: auto;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: -15px;
}

.col-md-6,
.col-md-4,
.col-md-12 {
  padding: 15px;
  box-sizing: border-box;
}

.col-md-6 {
  width: 50%;
}

.col-md-4 {
  width: 33.33%;
}

.col-md-12 {
  width: 100%;
}
.heading_main_pregunta h2 {
  font-size: 40px;
  font-weight: 700;
  padding: 0 0 15px 0;
  margin: 0 0 30px 0;
  width: 100%;
  color: #095a83;
  font-family: "Raleway", sans-serif;
  position: relative;
  background-position: left bottom;
  background-repeat: no-repeat;
}
.heading_main_pregunta p {
  text-align: center;
  font-size: 30px;
}
.container .inscribir {
  display: flex;
  justify-content: center;
  margin: 20px 0px;
}

/* === BOTONES MEJORADOS DEL CONTENEDOR PROYECTO === */
.inscribir {
  display: inline-block;
  margin: 12px 8px 8px 0;
  padding: 14px 28px;
  background: linear-gradient(135deg, #00b050 0%, #00cc5a 100%);
  color: rgb(255, 255, 255);
  text-decoration: none;
  border-radius: 25px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(0, 176, 80, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  width: 300px;
}

/* Efecto de brillo deslizante */
.inscribir::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.6s;
}

.inscribir:hover::before {
  left: 100%;
}

/* Estado hover */
.inscribir:hover {
  background: linear-gradient(135deg, #00994d 0%, #00b050 100%);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 176, 80, 0.4), 0 4px 15px rgba(0, 204, 90, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  border-color: rgba(0, 176, 80, 0.6);
}

/* Estado activo */
.inscribir:active {
  transform: translateY(-1px) scale(1.02);
  transition: all 0.1s ease;
}

/* Variante para botón secundario (segundo botón) */
.inscribir:nth-child(2) {
  background: linear-gradient(135deg, #1a2332 0%, #243142 100%);
  box-shadow: 0 4px 15px rgba(26, 35, 50, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.inscribir:nth-child(2):hover {
  background: linear-gradient(135deg, #243142 0%, #2d3a4d 100%);
  box-shadow: 0 8px 25px rgba(26, 35, 50, 0.4), 0 4px 15px rgba(36, 49, 66, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Efecto de pulso para el botón principal */
.inscribir:first-child {
  animation: pulseGreen 2.5s infinite;
}

@keyframes pulseGreen {
  0% {
    box-shadow: 0 4px 15px rgba(0, 176, 80, 0.3), 0 0 0 0 rgba(0, 176, 80, 0.7);
  }
  70% {
    box-shadow: 0 4px 15px rgba(0, 176, 80, 0.3), 0 0 0 12px rgba(0, 176, 80, 0);
  }
  100% {
    box-shadow: 0 4px 15px rgba(0, 176, 80, 0.3), 0 0 0 0 rgba(0, 176, 80, 0);
  }
}

/* Efecto de focus para accesibilidad */
.inscribir:focus {
  outline: none;
  box-shadow: 0 4px 15px rgba(0, 176, 80, 0.3), 0 0 0 3px rgba(0, 176, 80, 0.5);
}

.inscribir:nth-child(2):focus {
  box-shadow: 0 4px 15px rgba(26, 35, 50, 0.3), 0 0 0 3px rgba(26, 35, 50, 0.5);
}

/* Iconos con pseudo-elementos */
.inscribir::after {
  content: "→";
  margin-left: 8px;
  transition: transform 0.3s ease;
  font-weight: bold;
}

.inscribir:hover::after {
  transform: translateX(4px);
}

/* Icono especial para botón secundario */
.inscribir:nth-child(2)::after {
  content: "★";
  margin-left: 6px;
}

.inscribir:nth-child(2):hover::after {
  transform: rotate(360deg) scale(1.2);
  transition: transform 0.6s ease;
}
/*contenedor de instittucion*/
#institucion {
  display: inline-block;
  vertical-align: middle;
  -webkit-transform: perspective(1px) translateZ(0);
  transform: perspective(1px) translateZ(0);
  box-shadow: 0 0 1px rgba(0, 0, 0, 0);
  position: relative;
  overflow: hidden;
  background: #095a83;
  -webkit-transition-property: color;
  transition-property: color;
  -webkit-transition-duration: 0.3s;
  transition-duration: 0.3s;
  color: #fff;
  width: 300px;
  height: 45px;
  text-align: center;
  line-height: 45px;
  margin-top: 20px;
  font-weight: 600;
}

.contenedor::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #179154;
  border-radius: 100%;
  -webkit-transform: scale(0);
  transform: scale(0);
  -webkit-transition-property: transform;
  transition-property: transform;
  -webkit-transition-duration: 0.3s;
  transition-duration: 0.3s;
  -webkit-transition-timing-function: ease-out;
  transition-timing-function: ease-out;
}
.contenedor:hover::before,
.contenedor:focus::before,
.contenedor:active::before {
  -webkit-transform: scale(2);
  transform: scale(2);
}
a.contenedor:hover,
a.contenedor:focus {
  color: #fff;
}

a#scroll-to-top::after {
  display: none;
}
.row img {
  margin-left: 50px;
}
/* Responsive para móviles */
@media (max-width: 1200px) {
  .row img {
    margin-left: 40px;
  }
}
@media (max-width: 1000px) {
  .row img {
    margin-left: 30px;
  }
}
@media (max-width: 768px) {
  .inscribir {
    display: block;
    margin: 10px auto;
    width: 90%;
    max-width: 280px;
    padding: 16px 24px;
    font-size: 16px;
    text-align: center;
  }

  .inscribir::after {
    margin-left: 6px;
  }
  .inscribir:hover {
    transform: translateY(-2px) scale(1.02);
  }
  .carrusel_proyectos {
    margin: 20px;
    padding: 15px;
  }

  .col-md-6 {
    width: 100%;
  }

  .row {
    flex-direction: row;
  }

  /* Botones responsive */
  .botones-proyectos {
    margin: 10px 20px 30px 20px;
    padding: 15px 10px;
    border-radius: 12px;
  }

  .boton-proyecto {
    display: block;
    margin: 10px auto;
    width: 80%;
    max-width: 250px;
    padding: 16px 20px;
    font-size: 16px;
  }

  .boton-proyecto:hover {
    transform: translateY(-2px) scale(1.02);
  }
  .Proyectos {
    margin: 0px 70px;
  }
  .proyecto {
    margin: 50px;
  }
  .row img {
    margin-left: 30px;
  }
}
/* --- RESPONSIVE PARA PANTALLAS PEQUEÑAS --- */

@media (max-width: 590px) {
  .img-responsive {
    margin-left: 60px;
  }
}
@media (max-width: 540px) {
  .row img {
    margin-left: 50px;
  }
}
@media (max-width: 475px) {
  .img-responsive {
    margin-right: 80px;
  }
  .Proyectos {
    margin: 0px;
  }
}
@media (max-width: 460px) {
  .img-responsive {
    margin-left: 40px;
  }
}
@media (max-width: 420px) {
  .hvr-radial-out {
    width: 200px;
    margin: 0px;
  }
  .row img {
    margin-left: 30px;
  }
}
@media (max-width: 390px) {
  .img-responsive {
    margin-left: 30px;
  }
}
@media (max-width: 320px) {
  .proyecto.active {
    margin: 0px !important;
  }
  .img-responsive {
    margin-left: 2500px;
  }
  .Proyectos {
    margin: 0px;
  }
  .col-md-4 {
    margin: 0px;
  }
}
@media (max-width: 270px) {
  .row img {
    margin-left: 17px;
  }
}
