/* ==========================
   Mobile + Tablet ≤1024px
   ========================== */
@media only screen and (max-width: 1024px) {

  /* ── HEADER: kompakte einzelne Zeile ── */
  header {
    flex-direction: row;
    height: 64px;
    padding: 0 60px 0 16px; /* rechts Platz für den fixen Toggle-Button */
    align-items: center;
    justify-content: flex-start;
  }

  .header-container {
    flex-direction: row;
    gap: 8px;
    text-align: left;
  }

  .logo {
    width: 34px;
    height: auto;
  }

  header h1 {
    font-size: 1.25em;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* ── HAMBURGER: fix oben rechts, immer sichtbar ── */
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    position: fixed;
    top: 12px;
    right: 16px;
    transform: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 4000;
    width: 40px;
    height: 40px;
    padding: 6px;
  }

  .nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }

  /* X-Animation */
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* ── NAV OVERLAY: sanft einblenden ── */
  header nav {
    display: flex !important;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 12, 48, 0.97);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    overflow-y: auto;
    padding: 80px 30px 50px;
    box-sizing: border-box;
    /* Versteckt via opacity statt display:none → Transitions funktionieren */
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  header nav.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
  }

  /* ── NAV LISTE ── */
  nav ul {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
    list-style: none;
    width: 100%;
    max-width: 360px;
    text-align: center;
  }

  nav li {
    margin: 0;
    width: 100%;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  nav ul > li:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  /* Top-Level Links */
  nav > ul > li > a {
    color: #fff;
    font-family: 'Barlow Condensed', Arial, sans-serif;
    font-weight: 700;
    font-size: 1.7em;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 14px 20px;
    display: block;
    background: transparent !important;
    border-radius: 0;
    text-shadow: none;
    transition: color 0.2s, padding-left 0.2s;
  }

  nav > ul > li > a:hover,
  nav > ul > li > a.active {
    color: #ffcc00;
    background: transparent !important;
    padding-left: 30px;
  }

  /* Unterlinie deaktivieren (vom Desktop) */
  nav > ul > li > a::after {
    display: none !important;
  }

  /* ── DROPDOWN SUB-ITEMS ── */
  .dropdown-content {
    display: flex;
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    /* Kein hässlicher blauer Hintergrund mehr */
    background: rgba(255, 255, 255, 0.04);
    position: static;
    box-shadow: none;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 0;
    min-width: unset;
  }

  .dropdown-content.open {
    max-height: 500px;
    opacity: 1;
  }

  .dropdown-content li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    border-top: none;
    width: 100%;
  }

  .dropdown-content a {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 600 !important;
    font-size: 0.85em !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 12px 30px !important;
    color: rgba(255, 255, 255, 0.65) !important;
    background: transparent !important;
    transition: color 0.2s, padding-left 0.2s;
    border-radius: 0;
  }

  .dropdown-content a:hover {
    color: #ffcc00 !important;
    background: transparent !important;
    padding-left: 40px !important;
  }

  /* ── HAUPT-INHALT ── */
  main {
    padding: 20px 16px;
  }

  /* ── FOOTER ── */
  #footer {
    font-size: 0.85em;
    padding: 14px 0;
  }
}
