/* ============================================================
   app.css — Fußball-Trainer-App v0.1.0
   ============================================================ */

/* -- Variablen ----------------------------------------------- */
:root {
  --gruen:        #1a5c2e;
  --gruen-hell:   #2d8a47;
  --gruen-dunkel: #0f3d1e;
  --weiss:        #ffffff;
  --grau-100:     #f4f6f4;
  --grau-200:     #e8ece8;
  --grau-400:     #9aaa9a;
  --grau-700:     #3a4a3a;
  --text:         #1a2a1a;
  --rot:          #c0392b;
  --gelb:         #f39c12;
  --radius:       8px;
  --shadow:       0 2px 8px rgba(0,0,0,.1);
  --transition:   .18s ease;
}

/* -- Reset --------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--grau-100);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
a { color: var(--gruen); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video, iframe { max-width: 100%; box-sizing: border-box; }

/* -- Navbar -------------------------------------------------- */
.navbar {
  background: var(--gruen);
  color: var(--weiss);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}
.navbar-brand { display: flex; align-items: center; gap: .5rem; }
.navbar-logo  { font-size: 1.4rem; }
.navbar-title { font-weight: 700; font-size: 1.1rem; letter-spacing: .02em; }
.navbar-menu  {
  display: flex;
  list-style: none;
  gap: .25rem;
  flex: 1;
}
.navbar-menu a {
  color: rgba(255,255,255,.85);
  padding: .4rem .75rem;
  border-radius: var(--radius);
  transition: background var(--transition);
  font-size: .95rem;
}
.navbar-menu a:hover { background: rgba(255,255,255,.15); text-decoration: none; color: #fff; }
.navbar-user { display: flex; align-items: center; gap: .75rem; margin-left: auto; }
.navbar-username { font-size: .9rem; opacity: .8; }
.navbar-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.4rem; cursor: pointer; }

/* -- Main Content -------------------------------------------- */
.main-content { flex: 1; padding: 1.5rem; max-width: 1200px; margin: 0 auto; width: 100%; overflow-x: hidden; }

/* -- Footer -------------------------------------------------- */
.footer {
  background: var(--grau-200);
  text-align: center;
  padding: .75rem;
  font-size: .8rem;
  color: var(--grau-400);
  border-top: 1px solid var(--grau-200);
}

/* -- Login-Seite --------------------------------------------- */
.login-page {
  background: var(--gruen-dunkel);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}
.login-box {
  background: var(--weiss);
  border-radius: calc(var(--radius) * 2);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.login-logo { text-align: center; font-size: 3rem; margin-bottom: .5rem; }
.login-titel { text-align: center; color: var(--gruen); margin-bottom: 1.5rem; font-size: 1.4rem; }

/* -- Formular ------------------------------------------------ */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: .875rem;
  font-weight: 600;
  margin-bottom: .35rem;
  color: var(--grau-700);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .6rem .85rem;
  border: 1.5px solid var(--grau-200);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: border-color var(--transition);
  background: var(--weiss);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--gruen-hell);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-check { display: flex; align-items: flex-start; gap: .5rem; margin-bottom: .75rem; }
.form-check input[type="checkbox"] { width: auto; margin-top: .2rem; }
.form-check label { font-size: .9rem; font-weight: normal; }

/* -- Buttons ------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1.1rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 600;
  transition: background var(--transition), opacity var(--transition);
  text-decoration: none;
}
.btn:hover { opacity: .88; text-decoration: none; }
.btn-primary  { background: var(--gruen); color: var(--weiss); }
.btn-secondary{ background: var(--grau-200); color: var(--text); }
.btn-danger   { background: var(--rot); color: var(--weiss); }
.btn-outline  { background: transparent; color: var(--weiss); border: 1.5px solid rgba(255,255,255,.5); }
.btn-outline:hover { background: rgba(255,255,255,.15); }
.btn-sm       { padding: .35rem .7rem; font-size: .85rem; }
.btn-block    { width: 100%; justify-content: center; }

/* -- Alerts -------------------------------------------------- */
.alert {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: .95rem;
}
.alert-erfolg { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-fehler { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info   { background: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }
.alert-warn   { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }

/* -- Badges -------------------------------------------------- */
.badge { display: inline-block; padding: .25rem .6rem; border-radius: 99px; font-size: .8rem; font-weight: 600; }
.badge-rolle { background: var(--gruen); color: var(--weiss); }
.badge-aktiv { background: #d4edda; color: #155724; }
.badge-warn  { background: #fff3cd; color: #856404; }

/* -- Page Header -------------------------------------------- */
.page-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.page-header h1 { font-size: 1.5rem; color: var(--gruen-dunkel); }
.page-header-actions { margin-left: auto; display: flex; gap: .5rem; }

/* -- Dashboard Grid ----------------------------------------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}
.dashboard-card {
  background: var(--weiss);
  border-radius: calc(var(--radius) * 1.5);
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  color: var(--text);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  border: 2px solid transparent;
}
.dashboard-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  border-color: var(--gruen-hell);
  text-decoration: none;
}
.card-icon  { font-size: 2.2rem; }
.card-label { font-weight: 600; font-size: .95rem; color: var(--gruen-dunkel); }

/* -- Tabellen ------------------------------------------------ */
.table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
table { min-width: 100%; }
table { width: 100%; border-collapse: collapse; background: var(--weiss); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
th { background: var(--gruen); color: var(--weiss); padding: .75rem 1rem; text-align: left; font-size: .875rem; font-weight: 600; }
td { padding: .7rem 1rem; border-bottom: 1px solid var(--grau-200); font-size: .9rem; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--grau-100); }

/* -- Cards --------------------------------------------------- */
.card { background: var(--weiss); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.card-titel { font-size: 1.1rem; font-weight: 700; color: var(--gruen-dunkel); margin-bottom: .75rem; }

/* -- Copy-Link ---------------------------------------------- */
.copy-link-wrap { display: flex; gap: .5rem; align-items: center; }
.copy-link-wrap input { flex: 1; font-size: .8rem; color: var(--grau-700); background: var(--grau-100); }

/* -- Responsive --------------------------------------------- */
@media (max-width: 700px) {
  .navbar-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--gruen-dunkel);
    padding: 1rem;
    gap: .25rem;
  }
  .navbar-menu.open { display: flex; }
  .navbar-toggle { display: block; }
  .navbar-user .navbar-username { display: none; }
  .main-content { padding: 1rem; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   Responsive Grid Fixes — v0.5.7
   Alle 2-Spalten-Grids umbrechen auf Mobile automatisch
   ============================================================ */

/* Globale Klasse für 2-Spalten-Grids */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

/* Plan-Builder Layout */
.plan-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.25rem;
  align-items: start;
}

/* Video-Player Layout */
.player-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 1.25rem;
  align-items: start;
}

/* Statistik-Kacheln */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
  margin-bottom: 1.5rem;
}

.stat-kachel {
  display: block;
  background: #fff;
  border-radius: 10px;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  text-decoration: none;
  color: inherit;
  transition: transform .15s;
}
.stat-kachel:hover { transform: translateY(-2px); text-decoration: none; }
.stat-icon  { font-size: 1.6rem; margin-bottom: .25rem; }
.stat-wert  { font-size: 1.5rem; font-weight: 700; color: var(--gruen); }
.stat-label { font-size: .82rem; color: #999; margin-top: .15rem; }

@media (max-width: 700px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: .5rem;
  }
  .stat-kachel { padding: .75rem .5rem; }
  .stat-icon   { font-size: 1.2rem; }
  .stat-wert   { font-size: 1.2rem; }
}

@media (max-width: 900px) {
  .plan-layout {
    grid-template-columns: 1fr;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  /* Alle 2-Spalten-Grids auf Mobile umbrechen */
  .grid-2,
  .player-layout,
  .plan-layout {
    grid-template-columns: 1fr !important;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Inline-Grids die per style= gesetzt sind */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  [style*="grid-template-columns: 1fr 300px"],
  [style*="grid-template-columns:1fr 300px"] {
    grid-template-columns: 1fr !important;
  }

  [style*="grid-template-columns: 1fr 360px"],
  [style*="grid-template-columns:1fr 360px"] {
    grid-template-columns: 1fr !important;
  }

  [style*="grid-template-columns: 1fr 340px"],
  [style*="grid-template-columns:1fr 340px"] {
    grid-template-columns: 1fr !important;
  }

  [style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns:repeat(4"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Tabellen horizontal scrollbar */
  .table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Karten volle Breite */
  .card {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Buttons in Flex-Containern umbrechen */
  .page-header {
    flex-wrap: wrap;
    gap: .5rem;
  }

  .page-header-actions {
    width: 100%;
    justify-content: flex-start;
  }

  /* Formulare volle Breite */
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px; /* Verhindert Auto-Zoom auf iOS */
  }

  /* Anwesenheits-Liste */
  .anwesenheit-row {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .anwesenheit-spieler {
    min-width: unset !important;
  }

  /* Video-Grid */
  .video-grid {
    grid-template-columns: 1fr !important;
  }

  /* Dashboard-Grid: 2 Spalten auf Mobile */
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Plan-Builder Sidebar unter den Builder */
  #plan-form > div[style*="grid"] {
    grid-template-columns: 1fr !important;
  }

  /* Sticky Sidebar nicht mehr sticky auf Mobile */
  [style*="position:sticky"],
  [style*="position: sticky"] {
    position: static !important;
  }

  /* Übungs-Karten volle Breite */
  [style*="minmax(300px"] {
    grid-template-columns: 1fr !important;
  }

  /* Trainer-Verwaltung Karten */
  [style*="grid-template-columns: 1fr 380px"],
  [style*="grid-template-columns:1fr 380px"] {
    grid-template-columns: 1fr !important;
  }

  /* Copy-Link Wrap auf Mobile */
  .copy-link-wrap {
    flex-direction: column;
  }

  .copy-link-wrap input {
    width: 100%;
  }

  /* Alle Flex-Container auf Mobile umbrechen */
  .page-header,
  .page-header-actions,
  .filter-bar form,
  .anwesenheit-row,
  .anwesenheit-buttons {
    flex-wrap: wrap !important;
  }

  /* Protokoll-Filter Tabs umbrechen */
  .card > div[style*="margin-left:auto"] {
    margin-left: 0 !important;
    width: 100%;
  }

  /* Breite Elemente auf Mobile begrenzen */
  .card,
  .main-content > * {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Kalender Legende umbrechen */
  [style*="margin-left:auto;flex-wrap:wrap"] {
    margin-left: 0 !important;
  }

  /* Plan-Builder Block-Header umbrechen */
  .block-header {
    flex-wrap: wrap !important;
  }

  /* Anwesenheit Filter-Tabs volle Breite */
  .card [style*="display:flex;gap:.25rem"] {
    flex-wrap: wrap !important;
    width: 100%;
  }

  /* Kalender-Event Text kürzer */
  .kalender-event {
    font-size: .65rem !important;
  }

  /* Filter-Bars umbrechen */
  .filter-bar form {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  /* Protokoll Statistik-Badges */
  [style*="margin-left:auto;display:flex"] {
    margin-left: 0 !important;
  }
}

/* Tablet (601-900px) */
@media (min-width: 601px) and (max-width: 900px) {
  [style*="grid-template-columns: 1fr 300px"],
  [style*="grid-template-columns:1fr 300px"],
  [style*="grid-template-columns: 1fr 360px"],
  [style*="grid-template-columns:1fr 360px"],
  [style*="grid-template-columns: 1fr 380px"],
  [style*="grid-template-columns:1fr 380px"] {
    grid-template-columns: 1fr !important;
  }

  .plan-layout,
  .player-layout {
    grid-template-columns: 1fr !important;
  }
}

/* Trainer-Verwaltung Grid */
.trainer-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1.25rem;
  align-items: start;
}

/* Plan-Sidebar */
.plan-sidebar { position: sticky; top: 80px; }

@media (max-width: 900px) {
  .trainer-grid {
    grid-template-columns: 1fr;
  }
  .plan-sidebar {
    position: static;
  }
}

/* ============================================================
   Mobile-Tabellen als Karten — v0.5.11
   Klasse "mobile-cards" auf <table> setzen
   data-label="Spaltenname" auf jede <td>
   ============================================================ */

@media (max-width: 650px) {

  table.mobile-cards,
  table.mobile-cards thead,
  table.mobile-cards tbody,
  table.mobile-cards th,
  table.mobile-cards td,
  table.mobile-cards tr {
    display: block;
  }

  /* Header verstecken */
  table.mobile-cards thead {
    display: none;
  }

  /* Jede Zeile = Karte */
  table.mobile-cards tbody tr {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    margin-bottom: .65rem;
    padding: .65rem .85rem;
    border: none;
  }

  table.mobile-cards tbody tr:hover td {
    background: transparent;
  }

  /* Jede Zelle = Zeile in der Karte */
  table.mobile-cards td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .25rem 0;
    border: none;
    font-size: .88rem;
    border-bottom: 1px solid #f4f4f4;
  }

  table.mobile-cards td:last-child {
    border-bottom: none;
    padding-top: .4rem;
    margin-top: .15rem;
  }

  /* Label links, Wert rechts */
  table.mobile-cards td::before {
    content: attr(data-label);
    font-weight: 700;
    font-size: .78rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: .03em;
    flex-shrink: 0;
    margin-right: .75rem;
  }

  /* Zellen ohne Label (Aktions-Spalte) */
  table.mobile-cards td[data-label=""] {
    justify-content: flex-end;
    gap: .35rem;
  }
  table.mobile-cards td[data-label=""]::before {
    display: none;
  }

  /* Wrapper braucht kein overflow mehr */
  .table-wrapper {
    overflow-x: visible;
  }
}

/* Nachrichten-Badge in Navbar */
.navbar-nachrichten {
  position: relative;
  font-size: 1.2rem;
  text-decoration: none;
  padding: .2rem .3rem;
}
.nachrichten-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #c0392b;
  color: #fff;
  border-radius: 99px;
  font-size: .6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* Emojis in Navbar — nur auf Mobile sichtbar */
@media (min-width: 769px) {
  .nav-emoji { display: none; }
}
@media (max-width: 768px) {
  .nav-emoji { display: inline; }
}


/* ============================================================
   Navbar + Side Menu v1.4.2
   ============================================================ */

.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 52px;
  background: var(--gruen, #1a5c2e);
  display: flex;
  align-items: center;
  padding: 0 1rem;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
  gap: .75rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  color: #fff;
  flex: 1;
  min-width: 0;
}

.navbar-logo  { font-size: 1.4rem; flex-shrink: 0; }
.navbar-title { font-weight: 700; font-size: .95rem;
                white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Badges (Nachrichten, Chat) */
.navbar-badges {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-right: .25rem;
}

/* Hamburger */
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem .5rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-radius: 6px;
  transition: background .15s;
  flex-shrink: 0;
}
.hamburger:hover { background: rgba(255,255,255,.15); }
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Overlay */
.menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1010;
  backdrop-filter: blur(2px);
}
.menu-overlay.open { display: block; }

/* Side Menu */
.side-menu {
  position: fixed;
  top: 0; left: 0;
  width: 260px;
  height: 100%;
  background: #1a2a1a;
  z-index: 1020;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}
.side-menu.open { transform: translateX(0); }

.side-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1rem;
  background: var(--gruen, #1a5c2e);
  color: #fff;
  flex-shrink: 0;
}

.side-menu-user {
  padding: .75rem 1rem;
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.85);
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}

.side-menu-nav {
  flex: 1;
  overflow-y: auto;
  padding: .5rem 0 1rem;
}

.side-group-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: rgba(255,255,255,.35);
  padding: .75rem 1rem .2rem;
}

.side-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem 1rem;
  color: rgba(255,255,255,.82);
  text-decoration: none;
  font-size: .88rem;
  transition: background .12s, color .12s;
  border-radius: 0;
}
.side-link:hover, .side-link.aktiv {
  background: rgba(255,255,255,.1);
  color: #fff;
}
.side-link.side-link-logout {
  color: rgba(255,100,100,.8);
  margin-top: .25rem;
}
.side-link.side-link-logout:hover { background: rgba(255,80,80,.1); color: #ff6464; }

.side-icon {
  font-size: 1rem;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}

/* Main-Content Offset */
.main-content { margin-top: 52px; }

/* Nachrichten-Badge */
.navbar-nachrichten {
  position: relative;
  font-size: 1.15rem;
  text-decoration: none;
  padding: .2rem .3rem;
  color: rgba(255,255,255,.85);
  transition: color .12s;
}
.navbar-nachrichten:hover { color: #fff; }

.nachrichten-badge {
  position: absolute;
  top: -3px; right: -3px;
  background: #e74c3c;
  color: #fff;
  border-radius: 99px;
  font-size: .6rem;
  font-weight: 700;
  min-width: 15px;
  height: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* Aktiver Link highlighten */
.side-link[href] {
  position: relative;
}


/* ============================================================
   Desktop-Dropdown-Navigation v1.5.0
   Sichtbar ab 901px, Hamburger ab ≤900px
   ============================================================ */

/* Desktop-Nav: nur > 900px sichtbar */
.desktop-nav {
  display: none;
  list-style: none;
  margin: 0; padding: 0;
  flex: 1;
  align-items: center;
  gap: .1rem;
}

@media (min-width: 901px) {
  .desktop-nav   { display: flex; }
  .hamburger     { display: none !important; }
  .menu-overlay  { display: none !important; }
  .side-menu     { display: none !important; }
}

@media (max-width: 900px) {
  .desktop-nav { display: none !important; }
  .hamburger   { display: flex; }
}

/* Desktop-Nav Links */
.desktop-nav-link {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .5rem .65rem; /* etwas mehr damit Hover-Area nach unten reicht */
  color: rgba(255,255,255,.88);
  text-decoration: none;
  font-size: .85rem;
  font-weight: 500;
  border-radius: 5px;
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, color .12s;
  font-family: inherit;
}
.desktop-nav-link:hover,
.desktop-nav > li:hover > .desktop-nav-link,
.desktop-nav > li:focus-within > .desktop-nav-link {
  background: rgba(255,255,255,.15);
  color: #fff;
}

/* Dropdown-Container */
.desktop-nav-dropdown {
  position: relative;
  list-style: none;
}

/* Dropdown-Menü */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%; /* kein Gap — verhindert dass Maus das li verlässt */
  left: 0;
  min-width: 200px;
  background: #fff;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  list-style: none;
  padding: .4rem 0;
  z-index: 2000;
  border: 1px solid rgba(0,0,0,.08);
  border-top: none;
  /* Unsichtbarer Bereich oben damit Maus nahtlos reinkommt */
  margin-top: 0;
}

/* Unsichtbare Brücke: Pseudo-Element füllt Gap zwischen Button und Menü */
.desktop-nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 8px; /* Puffer damit Maus nicht "rausfällt" */
  background: transparent;
  display: none;
}
.desktop-nav-dropdown:hover::after { display: block; }

.dropdown-menu-right {
  left: auto;
  right: 0;
}

/* Dropdown öffnen bei Hover UND Focus */
.desktop-nav-dropdown:hover > .dropdown-menu,
.desktop-nav-dropdown:focus-within > .dropdown-menu {
  display: block;
}

.dropdown-menu li a {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .85rem;
  color: #333;
  text-decoration: none;
  font-size: .85rem;
  transition: background .1s;
  white-space: nowrap;
}
.dropdown-menu li a:hover {
  background: #f0faf3;
  color: #1a5c2e;
}

.dropdown-divider {
  height: 1px;
  background: #eee;
  margin: .3rem 0;
}

/* Aktiver Link im Dropdown */
.dropdown-menu li a.aktiv {
  background: #f0faf3;
  color: #1a5c2e;
  font-weight: 600;
}
