/* =============================================
   Termiz Site Navigation
   ============================================= */

/* --- BASE / DESKTOP --- */
.nvm-termiz-site-navigation {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: #112437;
}
.nvm-termiz-site-navigation__mount > ul {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nvm-termiz-site-navigation li {
  position: relative;
  list-style: none;
}
.nvm-termiz-site-navigation a,
.nvm-termiz-site-navigation [data-submenu-toggle] {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .75rem 0;
  color: #112437;
  font: 400 1.125rem/1.6 'DM Sans', sans-serif;
  text-decoration: none;
  background: none;
  border: 0;
  cursor: pointer;
}
.nvm-termiz-site-navigation a:hover,
.nvm-termiz-site-navigation a:focus-visible,
.nvm-termiz-site-navigation [data-submenu-toggle]:hover {
  color: #BE202E;
}

/* Dropdown desktop */
.nvm-termiz-site-navigation .sub-menu {
  position: absolute;
  z-index: 30;
  top: 100%;
  left: 0;
  display: none;
  min-width: 15rem;
  margin: 0;
  padding: 1rem;
  background: #fff;
  border: 1px solid #1124374A;
  border-radius: 1rem;
  box-shadow: 0 .5rem 1.5rem rgba(17,36,55,.12);
}
.nvm-termiz-site-navigation li:hover > .sub-menu,
.nvm-termiz-site-navigation li:focus-within > .sub-menu {
  display: flex;
  flex-direction: column;
}
.nvm-termiz-site-navigation .sub-menu a {
  display: flex;
  padding: .5rem;
  color: #112437;
  font-size: 1rem;
}

/* Toggle — SIEMPRE oculto en desktop */
.nvm-termiz-site-navigation__toggle {
  display: none !important;
}

/* Chevron — oculto en desktop */
.nvm-termiz-site-navigation__chevron {
  display: none;
}

/* =============================================
   MOBILE  (≤ 64rem)
   ============================================= */
@media (max-width: 64rem) {

  /* Toggle visible — estilo botón primario */
  .nvm-termiz-site-navigation__toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: .28rem;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    background: #112437;
    border: 0;
    border-radius: 2rem;
    cursor: pointer;
    transition: background .2s ease;
  }
  .nvm-termiz-site-navigation__toggle:hover {
    background: #1e3a52;
  }
  .nvm-termiz-site-navigation__toggle span {
    display: block;
    width: 1.1rem;
    height: 2px;
    background: #ffffff;
    border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
  }
  /* X al abrir */
  .nvm-termiz-site-navigation.is-open .nvm-termiz-site-navigation__toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .nvm-termiz-site-navigation.is-open .nvm-termiz-site-navigation__toggle span:nth-child(2) {
    opacity: 0;
  }
  .nvm-termiz-site-navigation.is-open .nvm-termiz-site-navigation__toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  /* Panel del menú */
  .nvm-termiz-site-navigation__mount {
    display: none;
    position: absolute;
    z-index: 40;
    top: 100%;
    left: 0;
    width: 100%;
    padding: .75rem 1.25rem 1rem;
    background: #fff;
    border-bottom: 1px solid #1124374A;
    box-shadow: 0 .5rem 1.5rem rgba(17,36,55,.08);
  }
  .nvm-termiz-site-navigation.is-open .nvm-termiz-site-navigation__mount {
    display: block;
  }

  /* Lista principal */
  .nvm-termiz-site-navigation__mount > ul {
    align-items: stretch;
    flex-direction: column;
    gap: 0;
  }

  /* Ítem con submenú */
  .nvm-termiz-site-navigation .menu-item-has-children {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    border-bottom: 1px solid #1124370F;
  }
  .nvm-termiz-site-navigation .menu-item-has-children > a {
    flex: 1;
    border-bottom: 0;
    padding: .875rem .25rem;
    justify-content: flex-start;
  }

  /* Ítem sin submenú */
  .nvm-termiz-site-navigation .menu-item:not(.menu-item-has-children) > a {
    width: 100%;
    justify-content: flex-start;
    padding: .875rem .25rem;
    border-bottom: 1px solid #1124370F;
  }

  /* Chevron minimalista */
  .nvm-termiz-site-navigation__chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    cursor: pointer;
    color: #112437;
  }
  .nvm-termiz-site-navigation__chevron svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .2s ease;
  }
  .nvm-termiz-site-navigation .is-submenu-open > .nvm-termiz-site-navigation__chevron svg {
    transform: rotate(180deg);
  }
  .nvm-termiz-site-navigation__chevron:hover {
    color: #BE202E;
  }

  /* Ítem padre activo */
  .nvm-termiz-site-navigation .is-submenu-open > a {
    color: #BE202E;
  }

  /* Submenú inline — ocupa fila completa debajo */
  .nvm-termiz-site-navigation .sub-menu {
    display: none;
    position: static !important;
    flex-basis: 100%;
    width: 100%;
    min-width: 0;
    padding: .25rem 0 .5rem 1rem;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .nvm-termiz-site-navigation .is-submenu-open > .sub-menu {
    display: flex;
    flex-direction: column;
  }

  /* Links del submenú */
  .nvm-termiz-site-navigation .sub-menu a {
    padding: .5rem .25rem;
    font-size: 1rem;
    color: #112437;
    border-bottom: 0;
    justify-content: flex-start;
  }
  .nvm-termiz-site-navigation .sub-menu a:hover {
    color: #BE202E;
  }

  /* Botón Contacto */
  .nvm-termiz-site-navigation__mount .menu-item-contact > a {
    display: block;
    width: 100%;
    margin-top: .75rem;
    padding: .875rem 1rem;
    background: #112437;
    color: #fff !important;
    border-radius: 2rem;
    text-align: center;
    border-bottom: 0;
    font-weight: 500;
  }
}
