body {
  margin: 0;
  padding: 0;
  font-family: 'Lato', sans-serif;
  background-color: #f5f5dc71;
}

/*----------------------------------- Menú fijo superior -----------------------------------*/
.menu-background {
  background-color:#1F2A44;
  height: 6rem;
}

.top-bar {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: rgba(31, 42, 68, 0.85);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 2rem;
  z-index: 999;
  height: 5rem;
}

.logo {
  height: 4rem;
  width: auto;
}

.main-nav ul {
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.main-nav li {
  display: flex;
  align-items: center;
}

.main-nav a {
  color: #F5F5DC;
  text-decoration: none;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease-in-out;
  padding: 0.5rem 1rem;
  font-size: 1rem;
}

.main-nav img {
  width: 23px;
  height: 23px;
}

.main-nav a:hover {
  color: #E97A57;
  text-decoration: underline;
}

/*----------------------------------- Controles idioma y Moneda -----------------------------------*/
.floating-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  margin-right: 2.5rem;
}

.button-row {
  display: flex;
  gap: 8px;
}

.button-row button {
  background-color: #f5f5dc;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  width: 65px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: background-color 0.3s ease;
}

.button-row button:hover {
  background-color: #E97A57;
}

.flag-icon {
  width: 22px;
  height: auto;
}

.button-row span {
  font-size: 12px;
  color: #333;
}

.exchange-container {
  background-color: #f5f5dc;
  border-radius: 4px;
  padding: 0;
  margin: 0;
  width: 100%;
  backdrop-filter: blur(4px);
  color: #000;
  font-weight: bold;
  text-align: center;
  font-size: 9px;
  height: 39px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/*----------------------------------- Carrusel -----------------------------------*/
.carousel {
  position: relative;
  margin: 0;
  overflow: hidden;
  height: 500px;
}

.slides {
  display: flex;
  transition: transform 1s ease-in-out;
  height: 100%;
}

.slide {
  min-width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.3));
  z-index: 1;
}

.slides.no-transition {
  transition: none !important;
}

.header-text {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #F5F5DC;
  animation: fadeInUp 1s ease;
}

.header-text h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px #000;
  font-family: 'Cinzel', serif;
}

.header-text h2 {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 3px #000;
  font-family: 'Cinzel', serif;
}

.cta-button {
  background-color: rgba(255,255,255,0.2);
  color: #fff;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}

.cta-button:hover {
  background-color: rgba(255,255,255,0.4);
}

.carousel-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}

.carousel-dots button {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background-color: #F5F5DC;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.carousel-dots button.active {
  background-color: #E97A57;
}

.divider-line {
  width: 100%;
  height: 4px; 
  background-color: #1F2A44;
  margin:0; 
}

/* Animación */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
/*----------------------------------- Responsive -----------------------------------*/
@media (max-width: 768px) {
  .main-nav {
    flex: 1;
    justify-content: center; /* mantiene centrado */
  }

  .main-nav ul {
    justify-content: center; /* centra los íconos */
    gap: 0.5rem;
    padding-left: 0;         /* elimina empuje hacia la derecha */
  }
  /* Logo ocupa 1/4 del ancho */
  .logo-container {
    flex: 0 0 60px;
  }
  .logo {
    max-width: 100%;
    height: auto;
  }

  /* Barra azul más baja */
  .menu-background {
    height: 3rem; /* mitad de 6rem */
  }
  .top-bar {
    height: 2.5rem; /* mitad de 5rem */
    padding: 0.3rem 1rem;
  }

  /* Menú solo con íconos */
  .main-nav ul {
    flex-direction: row;
    gap: 0.3rem;
    padding-left: 1rem;
  }
  .main-nav a {
    padding: 0.3rem;
    font-size: 0; /* oculta texto */
  }
  .main-nav img {
    width: 24px;
    height: 24px;
  }

  /* Controles flotantes más compactos */
  .floating-controls {
    margin-right: 1rem;
    gap: 4px;
  }
  .button-row button {
    width: 50px;
    font-size: 12px;
    padding: 4px 6px;
  }

  /* Carrusel más compacto */
  .carousel {
    height: 400px;
  }
  .header-text h1 {
    font-size: 2rem;
  }
  .header-text h2 {
    font-size: 1rem;
  }
  .floating-controls {
    position: absolute;
    top: 3.3rem;              /* justo debajo del menú azul */
    right: 25px;
    flex-direction: row;    /* botones en fila */
    align-items: center;
    padding: 0;
    border-radius: 6px;
  }

  .floating-controls .exchange-container {
    display: none;          /* oculta el número del tipo de cambio */
  }

  .floating-controls .button-row {
    gap: 0.3rem;
  }

  .floating-controls button {
    font-size: 0.9rem;
    padding: 0.2rem 0.6rem;
    width: 57px;
  }

  .floating-controls .flag-icon {
    width: 20px;
    height: auto;
  }
}

@media (max-width: 480px) {
  /* Ajustes adicionales para pantallas muy pequeñas */
  .carousel {
    height: 350px;
  }
  .header-text h1 {
    font-size: 1.5rem;
  }
  .header-text h2 {
    font-size: 1rem;
  }
  .main-nav img {
    width: 21px;
    height: 21px;
  }
}
