/* ===== MOBIL MENÜ (≤768px) ===== */
.nav-container {
  width: 90%;
  max-width: 1200px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  box-sizing: border-box;

}

/* Alap desktop layout */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
}
.site-nav .brand {
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-right: 16px;
}
.nav-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: #fff;
  width: 32px;
  height: 32px;
  cursor: pointer;
}
.nav-toggle:focus { outline: 2px solid #fff3; outline-offset: 2px; }

.nav-menu {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-menu > li > a {
  display: block;
  padding: 15px 16px;
  color: #fff;
  text-transform: uppercase;
  font-size: 14px;
}

/* Almenü (desktop) */
.nav-menu li {
  position: relative;
}
.nav-menu li .dropdown {
  position: absolute;
  left: 0;
  top: 100%;          /* közvetlenül a menüpont alatt */
  min-width: 220px;
  background: #2a2a2a;
  border: 1px solid #0006;
  border-radius: 6px;
  display: none;
  flex-direction: column;
  padding: 6px 0;
  z-index: 1001;
}
.nav-menu li:hover > .dropdown {
  display: flex;
}
.dropdown a {
  padding: 10px 14px;
  color: #fff;
  text-transform: none;
  font-size: 14px;
  white-space: nowrap;
}
.dropdown a:hover { background: #3a3a3a; }

/* ====== Töréspont: 768px alatt mobil nézet ====== */
@media (max-width: 768px) {
  nav { justify-content: stretch; } /* a meglévő fixed nav-hoz illesztve */
  .site-nav { justify-content: space-between; }

  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }

  /* Rejtett offcanvas/overlay menü */
  .nav-menu {
    position: fixed;
    inset: 60px 0 0 0;            /* a fixed nav alatt nyíljon (felső margó igazítsd ha kell) */
    background: #222;
    display: block;
    overflow-y: auto;
    transform: translateY(-8px);
    max-height: 0;
    transition: max-height .35s ease;
    border-top: 1px solid #0006;
  }
  .site-nav.open .nav-menu {
    max-height: calc(100vh - 60px); /* kinyitva teljes magasság */
  }

  .nav-menu > li > a {
    padding: 14px 18px;
    border-bottom: 1px solid #0006;
    font-size: 16px;
  }

  /* Almenü mobilon: accordion-szerű, a menüpont ALATT nyílik */
  .nav-menu li .dropdown {
    position: static;     /* ne legyen absolute */
    display: block;       /* a max-height fogja nyitni/csukni */
    max-height: 0;
    overflow: hidden;
    padding: 0;
    border: 0;
    border-radius: 0;
    transition: max-height .3s ease;
  }
  .nav-menu li.open > .dropdown {
    max-height: 600px; /* elég nagy, hogy kiférjen; szükség szerint növelhető */
  }
  .nav-menu li.has-sub > a {
    position: relative;
    padding-right: 42px;
  }
  .nav-menu li.has-sub > a::after {
    content: "▾";
    position: absolute;
    right: 16px;
    top: 0;
    height: 100%;
    display: grid;
    place-items: center;
    opacity: .8;
  }
}
