:root {
  --nav-h: 3.5rem;
}

/* ====== DESKTOP (logo centrado arriba, nav debajo) ====== */
.navbar {
  position: relative; /* desktop relativo */
  width: 100%;
  display: flex;
  flex-direction: column; /* ← dos filas */
  align-items: center; /* centra el logo */
  padding: 4rem 1rem 1rem;
  z-index: 20;
  background-color: var(--bg-beige);
}

.logo img {
  width: 14rem;
  height: auto;
}

.nav {
  width: 100%;
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
  margin-top: 2.5rem;
}

.nav-links a {
  text-decoration: none;
}
.lang-switcher {
  appearance: none;
  background: none;
  border: 0;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font: inherit;
}

.menu-toggle {
  display: none;
}

@media (max-width: 768px) {
  .navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    min-height: var(--nav-h);
    padding: 0px 1.2rem;
    background: var(--bg-beige);
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
  }

  .logo img {
    height: 3rem;
    width: auto;
  }

  .menu-toggle {
    display: flex;
    gap: 6px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 34px;
    height: 28px;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: var(--rojo);
    z-index: 1001;
  }
  .menu-toggle span {
    width: 26px;
    height: 2px;
    background: currentColor;
    transition: transform 0.25s, opacity 0.25s;
  }
  .menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Panel desplegable */
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
  }
  .nav-links {
    flex-direction: column;
    gap: 1.25rem;
    padding: 2rem 1rem 2.5rem;
    background: var(--bg-beige);
    display: none;
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.25s, transform 0.25s;
    margin: 0px !important;
  }
  .nav-links.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
  }

  /* opcional: bloquear scroll del body al abrir */
  body.has-mobile-nav {
    overflow: hidden;
  }
}

/*language switcher*/
/* Contenedor */
.lang {
  position: relative;
}

/* Botón con flecha */
.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  cursor: pointer;
  font: inherit;
  color: var(--rojo);
  border: 0px;
}
.lang-trigger::after {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  margin-inline-start: 0.125rem;
  position: relative;
  top: -3px;
}
.lang.open .lang-trigger::after {
  transform: rotate(-135deg);
  top: 1px;
} /* flecha hacia arriba */

/* Menú: ABSOLUTO en desktop */
.lang-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 10rem;
  padding: 0.5rem 0;
  margin: 0;
  list-style: none;
  display: none;
  background: var(--bg-beige);
  border: 1px solid white;
  z-index: 1200;
}
.lang.open .lang-menu {
  display: block;
}

.lang-menu a {
  display: block;
  padding: 0.5rem 0.75rem;
  text-decoration: none;
}

/* En móvil: RELATIVO (fluye dentro del menú) */
@media (max-width: 768px) {
  .lang {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .lang-menu {
    position: static;
    box-shadow: none;
    border: 0;
    min-width: 0;
    padding: 0.25rem 0;
    display: none;
    text-align: center;
  }
  .lang.open .lang-menu {
    display: block;
  }
  .lang-menu a {
    padding: 0.5rem 0;
  }
}

/*!Footer*/
.footer_section {
  position: relative;
  width: 100%;
  background-color: var(--bg-beige);

  background-image: url(/images/footer-bg.svg);
  background-position: bottom center;
  background-repeat: no-repeat;
  background-size: cover; /* asegúrate de que se adapte */

  aspect-ratio: 1728 / 493; /* ratio real de la imagen */

  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.footer_section .padding-global {
  position: relative;
  z-index: 10;
}
.footer_section .padding-section {
  padding-bottom: 3rem !important;
}
.footer-component {
  display: flex;
  row-gap: 1rem;
  flex-direction: column;
  width: 100%;
}
.footer-row1 {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  column-gap: 2rem;
  width: 100%;
}
.footer-row2 {
  display: flex;
  align-items: center;
  column-gap: 2rem;
  width: 100%;
}
.footer-mountains {
  display: none;
}
.footer-mountains img {
  width: 100%;
  display: block;
}
@media (max-width: 768px) {
  .footer-mountains {
    display: block;
    position: relative;
    bottom: -0.5rem;
  }
  .footer_section {
    background-image: none !important;
  }
  .footer_section .padding-global {
    padding: 0px !important;
  }
  .footer_section .padding-section {
    padding-bottom: 0px !important;
  }
  .footer-component {
    display: flex;
    row-gap: 0rem;
    flex-direction: column;
    width: 100%;
  }
  .footer-row1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    row-gap: 1.5rem;
    width: 100%;
    background-color: var(--palido);
    padding-top: 1rem;
  }
  .footer-row2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 1.5rem 0rem 4rem 0rem;
    background-color: var(--palido);
  }
}
