html, body {
  margin: 0;
  padding: 0;
  width: 100vw;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Fondo adaptativo igual que .la-bg */
.body {
  background-image: url("../../imagenes/fondo1.jpg");
  background-size: cover;      /* O "contain" según prefieras */
  background-repeat: no-repeat;
  background-position: center center;
  min-height: 100vh;
  font-family: 'Segoe UI', Arial, sans-serif;
  max-width: 100%;
  object-fit: cover;
  object-position: bottom;
}

/* Haz que el contenedor ocupe todo el espacio y empuje el footer abajo */


/* El contenido principal crece para ocupar el espacio disponible */
.banner-superior,
.top-region-btn-container,
.region-flex-container {
  flex-shrink: 0;
}

.banner-inferior {
  flex-shrink: 0;
  margin-top: auto; /* Empuja el footer al fondo si hay poco contenido */
  background: #021b1a !important; /* Asegura fondo oscuro en el footer */
}

/* Logo del banner superior */
.logo-img {
  max-width: 120px;
  max-height: 120px;
  width: auto;
  height: auto;
  margin: 0 1.5rem 0 0;
  display: block;
  animation: pulseLogo 2.5s infinite; /* Aplica la animación aquí */
}

/* Banner superior: alinea logo y título */
.home-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 1.2rem 1rem 1.2rem 1rem;
  gap: 1rem;
}

/* Contenedor del título */
.header-title-container {
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Cambia de center a flex-start */
  justify-content: center;
  text-align: left;        /* Alinea el texto a la izquierda */
  margin-left: -8rem;     /* Opcional: agrega un pequeño margen si quieres separarlo del logo */
}

/* Título principal */
.header-title.main-banner-title {
  width: 100%;
  font-size: 2.1rem;
  font-weight: bold;
  color: #fff;
  text-align: center;
  line-height: 1.2;
}

/* Responsividad para banner y logo */
@media (max-width: 900px) {
  .logo-img {
    max-width: 80px;
    max-height: 80px;
  }
  .header-title.main-banner-title {
    font-size: 1.3rem;
  }
  .home-header {
    padding: 0.7rem 0.5rem;
    gap: 0.7rem;
  }
}

@media (max-width: 600px) {
  .home-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    padding: 0.5rem 0.2rem;
  }
  .logo-img {
    max-width: 60px;
    max-height: 60px;
    margin: 0 auto;
  }
  .header-title-container {
    text-align: center;
    margin: 0;
  }
  .header-title.main-banner-title {
    font-size: 1rem;
    text-align: center;
  }
}

.search-bar-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  width: 100%;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.input-buscar {
  flex: 1 1 0;
  min-width: 200px;
  max-width: 600px;
  padding: 0.7em 1em;
  border-radius: 6px;
  border: none;
  font-size: 1.1rem;
  box-sizing: border-box;
}

.btn-buscar {
  flex: 0 0 auto;
  width: 160px;
  max-width: 180px;
  min-width: 100px;
  padding: 0.7em 0;
  border-radius: 6px;
  background: #1e40af;
  color: #fff;
  font-weight: bold;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  text-align: center;
  box-sizing: border-box;
}

/* Responsivo para móviles */
@media (max-width: 600px) {
  .search-bar-container {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    max-width: 100vw;
  }
  .input-buscar, .btn-buscar {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
}

.top-region-btn-container {
  position: relative;
  text-align: center;
}

.region-btn-top {
  font-size: 1.1rem;
  padding: 0.7rem 2rem;
  background: #2046a7;
  color: #fff;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(32,70,167,0.10);
  transition: background 0.2s;
}

.region-btn-top:hover {
  background: #02AC66;
}

.lista-paises {
  display: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 100%;
  background: rgba(80, 116, 77, 0); /* Fondo traslúcido del cuadro*/
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(32,70,167,0.15);
  margin: 0;
  padding: 0.7rem 0;
  list-style: none;
  min-width: 340px;      /* Más ancho */
  z-index: 10;
  backdrop-filter: blur(4px); /* Efecto de desenfoque para más modernidad */
}

.lista-paises li {
  padding: 0.5rem 1.2rem;
}

.lista-paises li a {
  color: #f1c40f;
  text-decoration: none;
  font-weight: 500;
  display: block;
  transition: background 0.2s, color 0.2s;
  /* Borde negro para resaltar el texto */
  text-shadow:
    -1px -1px 0 #000,
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000;
}

.lista-paises li a:hover {
  background: #f1c40f;
  color: #fff;
  border-radius: 5px;
}

.top-region-btn-container {
  width: 100vw;
  display: flex;
  justify-content: center;
  margin: 1.5rem 0 0.5rem 0;
  box-sizing: border-box;
}

.region-btn-top {
  width: 92vw;
  max-width: 420px;
  min-width: 0;
  font-size: 1.2rem;
  padding: 1.1rem 0.5rem;
  margin: 0 auto;
  box-sizing: border-box;
  display: block;
}

/* Responsivo para tablets */
@media (max-width: 900px) {
  .region-btn-top {
    font-size: 1.5rem;
    padding: 1.2rem 0.5rem;
    width: 98vw;
    max-width: 98vw;
    min-width: 0;
  }
}

/* Responsivo para móviles */
@media (max-width: 600px) {
  .region-btn-top {
    width: 96vw;
    max-width: 340px;
    font-size: 1.05rem;
    padding: 0.9rem 0.2rem;
  }
  .top-region-btn-container {
    width: 100vw;
    margin: 1rem 0 0.5rem 0;
    padding: 0;
  }
}

.region-btn-mostrar {
  min-width: 350px;   
  width: auto;        
  max-width: 350px;   
  font-size: 1.5rem;
  margin-top: 5rem; /* Solo el botón baja */
}

.region-flex-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

.region-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Elimina cualquier width o margin innecesario */
  padding: 0;
}

.img-universidades {
  width: 40%; /* Ajusta el tamaño según tu preferencia */
  max-width: 100%;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.15);
}

.footer-content {
  max-width: 1100px; /* Reduce el ancho máximo, ajusta según lo que necesites */
  margin: 0 auto;
  display: flex;
  gap: 40px; /* Reduce el espacio entre columnas */
  justify-content: flex-start; /* Opcional: alinea las columnas al inicio */
}

.footer-section {
  flex: 1 1 200px;
  min-width: 180px;
  margin-bottom: 1rem;
}

.footer-logo-desc {
  flex: 1 1 350px;
  min-width: 300px;
  margin-bottom: 1rem;
}

/* Logo del footer */
.footer-logo-img {
  max-width: 70px;
  max-height: 70px;
  width: auto;
  height: auto;
  margin-right: 1rem;
  display: inline-block;
  vertical-align: middle;
  animation: pulseLogo 2.5s infinite;
}

/* Alineación del título y logo en el footer */
.footer-logo-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.footer-title {
  font-size: 2.5rem;
  font-weight: bold;
  color: #fff;
}

.footer-desc {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  text-align: justify;
}

.footer-link {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
}

.footer-link-yellow {
  color: #f1c40f;
}

.footer-section-title {
  color: #bdbdbd;
  font-weight: bold;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.paises-grid {
  display: flex;
  justify-content: center;   /* Centra las columnas horizontalmente */
  gap: 1rem;               /* Ajusta el espacio entre columnas si lo deseas */
  margin: 3rem auto;         /* Centra el grid en el contenedor */
  flex-wrap: wrap;
  width: auto;               /* Permite que el grid se ajuste al contenido */
  max-width: 900px;          /* Opcional: limita el ancho máximo */
}

.paises-columna {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.pais-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 1.1rem;
}

.bandera-img {
  width: 38px;   /* antes 28px */
  height: 28px;  /* antes 20px */
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.pais-nombre {
  font-size: 1.35rem;  /* antes 1.1rem */
  color: #fff;
  font-weight: 600;
  text-decoration: none; /* Elimina subrayado */
  text-shadow:
    -1px -1px 0 #000,
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000;
}
.banner-titulo-region {
  display: flex;
  justify-content: center;
  margin-top: 0.1rem;
}
.titulo-region {
  color: #ffb92a;
  font-size: 2rem;
}

.banner-superior {
  background: rgb(2, 27, 26); /* Fondo oscuro semitransparente */
  padding: 1.5rem 0 1rem 0;
  width: 100vw;
  margin: 0;
  left: 0;
  box-sizing: border-box;
}

/* --- Estilos base responsivos --- */

/* Imágenes y logos siempre adaptables */
img, .logo-img, .img-universidades, .footer-logo-img {
  max-width: 100%;
  height: auto;
}

/* Contenedores principales */
.home-container, .banner-superior, .region-flex-container, .footer-content {
  width: 100%;
  box-sizing: border-box;
}

/* Botones y entradas */
.input-buscar, .btn-buscar, .region-btn, .region-btn-top {
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
}

/* Grillas de países y ciudades */
.paises-grid, .ciudades-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Tarjetas de universidad */
.la-universidad-card {
  max-width: 100%;
  min-width: 220px;
  box-sizing: border-box;
}

/* --- Media Queries para pantallas pequeñas --- */
@media (max-width: 900px) {
  .header-title {
    font-size: 2rem;
  }
  .main-banner-title {
    font-size: 1.3rem;
  }
  .logo-img {
    height: 70px;
  }
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 2rem;
  }
  .footer-section {
    width: 100%;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 600px) {
  .banner-superior {
    flex-direction: column;
    padding: 1rem 0.5rem;
  }
  .home-header {
    flex-direction: column;
    align-items: center;
    margin-top: 0.5rem;
  }
  .header-title, .main-banner-title {
    font-size: 1rem;
    margin-left: 0;
  }
  .search-bar-container {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }
  .input-buscar, .btn-buscar {
    width: 100%;
    max-width: 100%;
  }
  .region-flex-container {
    flex-direction: column;
    align-items: center;
  }
  .region-grid {
    width: 100%;
    margin-bottom: 1rem;
  }
  .img-universidades {
    width: 50%;
    margin: 0 auto;
    display: block;
  }
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .footer-section {
    width: 100%;
    margin-bottom: 1rem;
  }
}

/* Puedes agregar esto al final de estiloshome.css o en un archivo CSS vinculado */
/* Ajuste responsive para la grilla de países en móviles */
@media (max-width: 600px) {
  .paises-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
    justify-content: center;
    align-items: start;
    width: 100%;
  }
  .paises-columna {
    display: contents;
  }
  .pais-item {
    width: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-start;
    margin-left: 2.5rem; /* Elimina margen izquierdo */
  }
  .bandera-img {
    width: 32px;
    height: auto;
    display: block;
  }
  .pais-nombre {
    font-size: 1rem;
    white-space: pre-line;
  }
  /* Ajuste para el salto de línea en "Guayana Francesa" */
  .pais-nombre br {
    display: block;
    content: "";
    margin-bottom: -2px;
  }
}

.header-title {
  animation: slideDownFade 1.2s cubic-bezier(.68,-0.55,.27,1.55) forwards;
  opacity: 0;
}

@keyframes slideDownFade {
  0% {
    transform: translateY(-40px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes pulseLogo {
  0%, 100% { transform: scale(1.2);}
  80% { transform: scale(1.07);}
}

.video-fondo {
  position: fixed;
  top: 0;
  left: 0;
  min-width: 100vw;
  min-height: 100vh;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -1;
  opacity: 0.7; /* Ajusta la opacidad si quieres que el contenido se vea mejor */
  pointer-events: none; /* El video no interfiere con los clics */
  background: #021b1a;
}