/* ============================================
   IDEO MAKER — HEADER / NAV / FOOTER compartido
   Cargado despues del <style> de cada pagina,
   por lo que es la fuente de verdad del navbar.
   ============================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  height: 54px;
  background-color: var(--color-purple, #5c0f8b);
}

.header__inner {
  max-width: var(--container-max, 1280px);
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 96px 0 10px;
}

.header__logo {
  display: block;
  flex-shrink: 0;
  width: 93px;
  height: 45px;
}
.header__logo img { width: 100%; height: 100%; object-fit: contain; }

.nav__list {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav__item {
  display: flex;
  align-items: center;
  height: 100%;
  position: relative;
  padding: 0 18px;
}

.nav__item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 20px;
  background: var(--color-divider, rgba(255, 255, 255, 0.45));
}

.nav__link {
  font-family: var(--font-body, 'Montserrat', sans-serif);
  font-weight: 600;
  font-size: var(--fs-nav-link, 16px);
  color: var(--color-white, #fff);
  white-space: nowrap;
}
.nav__link[aria-current="page"],
.nav__dropdown a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* ---------- Submenus ---------- */
.nav__item--has-dropdown { gap: 6px; }

.nav__caret {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 4px;
  margin: 0;
  color: var(--color-white, #fff);
  line-height: 0;
  cursor: pointer;
}
.nav__caret-icon { transition: transform 0.2s ease; }
.nav__item--has-dropdown:hover .nav__caret-icon,
.nav__item--has-dropdown:focus-within .nav__caret-icon,
.nav__item--open .nav__caret-icon { transform: rotate(180deg); }

.nav__dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 190px;
  background-color: #8d57ae;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 50;
  padding: 4px 0;
  list-style: none;
  margin: 0;
}
.nav__dropdown li { border-bottom: 1px solid rgba(255, 255, 255, 0.25); }
.nav__dropdown li:last-child { border-bottom: none; }
.nav__dropdown a {
  display: block;
  padding: 12px 20px;
  font-family: var(--font-body, 'Montserrat', sans-serif);
  font-weight: 600;
  font-size: var(--fs-nav-link, 16px);
  color: var(--color-white, #fff);
  white-space: nowrap;
}
.nav__dropdown a:hover,
.nav__dropdown a:focus-visible { background-color: rgba(255, 255, 255, 0.12); }

.nav__item--has-dropdown:hover .nav__dropdown,
.nav__item--has-dropdown:focus-within .nav__dropdown,
.nav__item--open .nav__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* ---------- Boton hamburguesa ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  padding: 0;
  flex-shrink: 0;
  cursor: pointer;
}
.nav-toggle__bar {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--color-white, #fff);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1180px) {
  .header__inner { padding: 0 24px 0 12px; }
  .nav__item { padding: 0 12px; }
  .nav__link { font-size: 14px; }
}

@media (max-width: 1024px) {
  .header__inner { padding: 0 20px; }

  .nav-toggle { display: flex; }

  .nav {
    position: absolute;
    top: 54px;
    left: 0;
    width: 100%;
    background-color: var(--color-purple, #5c0f8b);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
  }
  .nav.is-open { max-height: calc(100vh - 54px); overflow-y: auto; }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    height: auto;
    padding: 8px 0;
  }

  .nav__item {
    height: auto;
    padding: 0;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .nav__item:not(:last-child)::after {
    top: auto;
    bottom: 0;
    left: 20px;
    right: 20px;
    transform: none;
    width: auto;
    height: 1px;
  }

  .nav__link {
    display: block;
    flex: 1;
    padding: 14px 20px;
    font-size: 16px;
  }

  .nav__caret { padding: 14px 20px; }

  .nav__dropdown {
    position: static;
    width: 100%;
    flex-basis: 100%;
    min-width: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    background-color: rgba(0, 0, 0, 0.18);
    max-height: 0;
    overflow: hidden;
    padding: 0;
    transition: max-height 0.3s ease;
  }
  .nav__item--has-dropdown:hover .nav__dropdown,
  .nav__item--has-dropdown:focus-within .nav__dropdown { max-height: 0; }
  .nav__item--open .nav__dropdown { max-height: 360px; }
  .nav__dropdown a { padding: 12px 16px 12px 40px; }
}

@media (max-width: 768px) {
  .header__logo { width: 74px; height: 36px; }
}
