/* ======================================
   HEADER / NAVBAR (Maíz Fundido)
====================================== */

/* Header fijo arriba + animación hide/show (móvil) */
.header-fijo{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1030;                 /* consistente con Bootstrap */
  transform: translateY(0);
  transition: transform .25s ease;
}

/* Solo móvil: cuando el JS agrega .is-hidden => se oculta */
@media (max-width: 767.98px){
  .header-fijo.is-hidden{
    transform: translateY(-110%);
  }
}

/* Navbar principal (glass) */
.angie-navbar{
  width: 100%;
  background-color: rgba(15, 17, 21, 0.90);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  justify-content: center;
  padding: 0.6rem 1rem;
}

/* Modo claro */
html[data-bs-theme="light"] .angie-navbar{
  background-color: rgba(255, 255, 255, 0.95);
  color: #111;
}

/* Modo oscuro */
html[data-bs-theme="dark"] .angie-navbar{
  color: #fff;
}

/* Contenedor interno */
.nav-container{
  width: 100%;
  max-width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
}

/* Logo */
.logo-link img{
  border-radius: 8px;
  height: auto;
}

/* Tamaño logo: desktop */
.angie-navbar .logo{
  width: 150px;
  height: auto;
}

/* Tamaño logo: móvil */
@media (max-width: 767.98px){
  .angie-navbar .logo{
    width: 100px !important;
  }
}

/* Logos modo claro/oscuro */
.logo-light, .logo-dark{ display: inline-block; }
.logo-dark{ display: none; }
html[data-bs-theme="dark"] .logo-light{ display: none; }
html[data-bs-theme="dark"] .logo-dark{ display: inline-block; }

/* Separador */
.header-separador{
  width: 100%;
  height: 2px;
  background-color: #bad200;
}

/* Hamburguesa (solo móvil) */
.nav-toggle{
  display: none;
  background: none;
  border: none;
  color: inherit;
  font-size: 1.6rem;
  line-height: 1;
}

/* Menú desktop */
.nav-menu{
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links{
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a{
  text-decoration: none;
  color: inherit;
  font-weight: 600;
}

/* =========================
   Menú móvil desplegable
========================= */
@media (max-width: 768px){

  .nav-toggle{ display: block; }

  .nav-menu{
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;                   /* CLAVE: justo debajo del navbar */
    width: 100%;
    display: none;               /* cerrado por defecto */
    flex-direction: column;
    padding: .75rem 0;
    text-align: center;
  }

  /* Fondo según tema */
  html[data-bs-theme="light"] .nav-menu{
    background-color: rgba(255,255,255,0.92);
    color: #222;
  }
  html[data-bs-theme="dark"] .nav-menu{
    background-color: rgba(0,0,0,0.75);
    color: #fff;
  }

  .nav-menu.active{ display: flex; }

  .nav-links{
    flex-direction: column;
    gap: .65rem;
  }

  .nav-links a{
    display: block;
    padding: .35rem 0;
  }
}

/* =========================
   Switch idioma (ES/EN)
========================= */
.lang-switch{
  position: relative;
  width: 84px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(108,117,125,.5);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  cursor: pointer;
  overflow: hidden;
}

.lang-switch:focus{
  outline: none;
  /* si ya no usas turquesa, ajusta este glow a #bad200 */
  box-shadow: 0 0 0 .25rem rgba(186,210,0,.25);
}

.lang-pill{
  position: absolute;
  top: 4px;
  left: 4px;
  width: 36px;
  height: 26px;
  border-radius: 999px;
  background: var(--accent-color);
  transition: transform .2s ease;
}

.lang-text{
  position: relative;
  z-index: 1;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .5px;
  opacity: .85;
}

.lang-switch.is-en .lang-pill{ transform: translateX(40px); }
.lang-switch.is-en .lang-left{ opacity: .55; }
.lang-switch:not(.is-en) .lang-right{ opacity: .55; }

html[data-bs-theme="dark"] .lang-switch{
  border-color: rgba(255,255,255,.2);
}

/* =========================
   Fix Tablet (iPad) botones
========================= */
@media (min-width: 768px) and (max-width: 991.98px){

  .nav-container > .d-flex{
    flex-wrap: nowrap !important;
    gap: .4rem !important;
  }

  #theme-toggle{
    padding: .25rem .45rem !important;
    font-size: .75rem !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  #theme-toggle span{ display: none !important; }

  #theme-toggle i{
    margin: 0 !important;
    font-size: .85rem !important;
  }

  .lang-switch{
    width: 72px !important;
    height: 30px !important;
    padding: 0 8px !important;
  }

  .lang-pill{
    width: 30px !important;
    height: 22px !important;
  }

  .lang-switch.is-en .lang-pill{
    transform: translateX(34px) !important;
  }

  .lang-text{
    font-size: .7rem !important;
  }
}
