body {
  font-family: 'Open Sans', sans-serif;
  margin: 0;
  padding: 0;
}

.hero {
    position: relative;
    height: 400px;
    overflow: hidden;
  }
  
  .hero__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
  }
  
  .hero .container {
    z-index: 1;
  }
  
  .hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.2));
    z-index: 1;
  }
  
  

.offcanvas-start {
    width: 100vw !important; /* valor por defecto para móviles */
    max-width: 100vw !important;
  }
  .offcanvas-body .nav-link {
    font-size: 1.1rem;
    color: #333;
  }
  
  .main-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0)); /* degradado oscuro */
    color: white;
  }
  
  .main-header .navbar .nav-link,
  .main-header .navbar-brand,
  .main-header .btn {
    color: white !important;
    border-color: white !important;
  }
  
  .main-header .navbar .nav-link:hover {
    color: #f8f9fa !important;
  }
  
/* Estilo base del offcanvas-start (mantiene entrada desde la izquierda) */
.custom-fade-close.offcanvas-start {
    transition: transform 0.4s ease-in-out, opacity 0.3s ease-in-out;
  }
  
  /* Cuando está visible (abierto) */
  .custom-fade-close.offcanvas-start.show {
    transform: none;
    opacity: 1;
  }
  
  /* Mientras se está ocultando */
  .custom-fade-close.offcanvas-start.hiding {
    transform: none !important;  /* Evita que se deslice hacia atrás */
    opacity: 0 !important;       /* Aplica fade-out */
  }

  .offcanvas a.nav-link:hover {
    color: #ccc;
  }
  
  .offcanvas-fullscreen {
    width: 100vw !important;
    max-width: 100vw !important;
  }

  /* Para pantallas medianas (≥768px y <992px): ancho 50% */
  @media (min-width: 768px) and (max-width: 991.98px) {
    .offcanvas-start {
      width: 50vw !important;
      max-width: 50vw !important;
    }
  }

  /* Para pantallas grandes (≥992px): ancho 33.33% */
  @media (min-width: 992px) {
    .offcanvas-start {
      width: 33.33vw !important;
      max-width: 33.33vw !important;
    }
  }




  /* Estilos para la sección de azulejos */
  .mosaico {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* por defecto: 2 columnas */
    gap: 4px;
    padding: 1rem 0; /* sin márgenes laterales */
    margin: 0;
  }
  
  @media (min-width: 992px) {
    .mosaico {
      grid-template-columns: repeat(5, 1fr); /* 5 columnas en pantallas grandes */
      padding: 2rem; /* añade márgenes laterales solo en pantallas grandes */
    }
  }

  .mosaico2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* por defecto: 2 columnas */
    gap: 4px;
    padding: 1rem 0; /* sin márgenes laterales */
    margin: 0;
  }
  
  @media (min-width: 992px) {
    .mosaico2 {
      grid-template-columns: repeat(4, 1fr); /* 4 columnas en pantallas grandes */
      padding: 8rem; /* añade márgenes laterales solo en pantallas grandes */
    }
  }

  .azulejo {
    position: relative;
    border-radius: 0px;
    overflow: hidden;
    color: white;
    background-color: #000;
    outline: none;
  }

  .azulejo picture img {
    width: 100%;
    height: auto;
    display: block;
  }

  .azulejo__contenido {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .azulejo__contenido h3 {
    margin: 0;
    font-size: 1.2rem;
  }

  .azulejo__toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
  }

  .azulejo__desplegable {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: black;
    color: white;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    padding: 1rem;
    z-index: 2;
    opacity: 0.8 !important;
  }

  .azulejo.active .azulejo__desplegable {
    transform: translateY(0);
  }

  .azulejo__cerrar {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
  }




  .news-section {
    padding: 2rem 0;
    background-color: #f8f9fa;
  }
  
  .title_container .h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
  }
  
  .news-grid {
    display: grid;
    grid-template-columns: 1fr; /* una columna por defecto (pantallas pequeñas) */
    gap: 1rem;
  }

  /* En pantallas grandes: 3 columnas */
  @media (min-width: 992px) {
    .news-grid {
      grid-template-columns: repeat(3, 1fr);
    }
  }
  
  .news-card {
    width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  object-fit: cover;
  }
  
  .news-card:hover {
    transform: translateY(-5px);
  }
  
  .news-card img {
    width: 100%;
    height: auto;
    display: block;
  }
  
  .news-source {
    font-size: 0.9rem;
    color: #007bff;
    margin: 0.5rem 1rem 0 1rem;
  }
  
  .news-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0.2rem 1rem 1rem 1rem;
  }
  



  .whatsapp-float-small {
    position: fixed;
    bottom: 40px;
    right: 15px;
    z-index: 1000;
    transition: transform 0.2s ease;
    animation: fadeInOut 4s ease-in-out infinite;
  }
  
  /* Animación de opacidad suave */
  @keyframes fadeInOut {
    0%   { opacity: 0.8; }
    50%  { opacity: 1; }
    100% { opacity: 0.8; }
  }
  


  .logos-footer {
    margin-top: 1rem;
  }
  
  .logos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    justify-items: center;
    align-items: center;
  }
  
  .logos-grid img {
    max-width: 100px;
    height: auto;
    filter: brightness(0) invert(1); /* opcional para forzar blanco */
  }
  
  /* Para pantallas medianas o más grandes (>=768px) */
  @media (min-width: 768px) {
    .logos-grid {
      grid-template-columns: repeat(6, 1fr);
    }
  }

  

.carousel-inner img {
  max-height: 600px;
  object-fit: contain;
}

  /* Anular posición absoluta y situar indicadores debajo */
#carouselLogos .carousel-indicators {
  position: static;    /* Ya no está "absoluto" encima de la imagen */
  margin-bottom: 1rem; /* Ajusta el espacio que quieres hacia abajo */
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

/* Estilos de cada botón indicador */
#carouselLogos .carousel-indicators button {
  width: 12px;
  height: 12px;
  background-color: #bebebe;
  opacity: 0.5;
  border: none;
  border-radius: 50%;
  transition: opacity 0.3s ease;
}

#carouselLogos .carousel-indicators button.active {
  opacity: 1;
  background-color: #9e143d;
}





.card-horario {
  background-color: #fff;
  border-radius: 1rem;
  box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.card-horario:hover {
  transform: translateY(-5px);
}

.card-horario h5 {
  margin-top: 0.75rem;
  font-weight: 600;
  color: #20416c;
}

.card-horario p {
  font-size: 0.9rem;
  color: #555;
}

.bg-academico {
  background: linear-gradient(to top, #212529, #ffffff);
  color: #212529;
  padding: 3rem 0 2rem;
}


.scene {
  width: 200px;
  height: 200px;
  margin: 50px auto;
  perspective: 800px;
}

.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: rotateCube 10s infinite linear;
}

.face {
  position: absolute;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: sans-serif;
  font-size: 1.2rem;
  font-weight: bold;
  color: white;
  background: #b22823;
  border: 2px solid white;
  opacity: 0.95;
}

/* Caras del cubo */
.face.front  { transform: rotateY(  0deg) translateZ(100px); }
.face.back   { transform: rotateY(180deg) translateZ(100px); }
.face.right  { transform: rotateY( 90deg) translateZ(100px); }
.face.left   { transform: rotateY(-90deg) translateZ(100px); }
.face.top    { transform: rotateX( 90deg) translateZ(100px); }
.face.bottom { transform: rotateX(-90deg) translateZ(100px); }

@keyframes rotateCube {
  0%   { transform: rotateX(0deg) rotateY(0deg); }
  25%  { transform: rotateX(0deg) rotateY(90deg); }
  50%  { transform: rotateX(90deg) rotateY(90deg); }
  75%  { transform: rotateX(180deg) rotateY(90deg); }
  100% { transform: rotateX(360deg) rotateY(360deg); }
}




.becas-wrapper {
  background: linear-gradient(to right, #f1f5f9, #ffffff);
  padding: 4rem 1rem;
  border-radius: 1rem;
  box-shadow: 0 0 2rem rgba(0,0,0,0.05);
}

.becas-title {
  font-weight: 700;
  font-size: 2rem;
  color: #f8c400;
  margin-bottom: 2rem;
  text-align: center;
}

.beca-card {
  background: white;
  border-left: 5px solid #20416c;
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 0.75rem 1.5rem rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.beca-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 1rem 2rem rgba(0,0,0,0.08);
}

.beca-card i {
  font-size: 1.8rem;
  color: #20416c;
  margin-right: 0.75rem;
  flex-shrink: 0;
}

.beca-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.beca-highlight {
  font-size: 1.1rem;
  font-weight: 500;
  color: #155724;
  background-color: #d4edda;
  padding: 1rem;
  border-left: 5px solid #28a745;
  border-radius: 0.5rem;
  margin-bottom: 2rem;
}



.seccion-encuentranos {
  background: linear-gradient(135deg, #ffffff, #ffffff);
  padding: 3rem 1rem;
}

.contenedor-encuentranos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: auto;
  align-items: center;
}

.texto-encuentranos h2 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
  color: #1e1e1e;
}

.texto-encuentranos p {
  font-size: 1.1rem;
  color: #444;
  line-height: 1.6;
}

.mapa-encuentranos {
  width: 100%;
  height: 400px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* Pantallas grandes: divide en 2 columnas */
@media (min-width: 992px) {
  .contenedor-encuentranos {
    grid-template-columns: 1fr 1fr;
  }
}




.texto-encuentranos.estilizado {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  color: #333;
  max-width: 600px;
  margin: auto;
  font-family: 'Segoe UI', sans-serif;
}

.texto-encuentranos.estilizado h2 {
  font-size: 2rem;
  color: #1e3a8a;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.texto-encuentranos.estilizado .descripcion {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #444;
}

.dato-contacto {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0;
  font-size: 1rem;
}

.dato-contacto i {
  color: #1e3a8a;
  font-size: 1.3rem;
}



.btn-llamar {
  display: inline-block;
  background-color: #1e3a8a;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  margin-top: 1rem;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.btn-llamar:hover {
  background-color: #163372;
}