:root {
  --nav-text: #2d2d2d;
  --nav-muted: #787878;
  --nav-pink: #ec639a;
  --nav-green: #1daf8b;
  --border: rgba(0, 0, 0, 0.08);
  --panel-bg: rgba(255, 255, 255, 0.98);
  --header-bg: rgba(255, 255, 255, 0.92);
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.16);
  --header-height: 72px;
}

html { scroll-padding-top: var(--header-height); }
body.has-global-nav {
  margin: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  padding-top: var(--header-height); /* FIX: ohne zusätzlichen 8px-Offset */
}
body.nav-open { overflow: hidden; }

.global-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  backdrop-filter: blur(10px);
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
}
.global-header__inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 8px 16px;
}
.global-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
}
.global-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--nav-text);
  min-width: 0;
}
.global-brand__logo {
  width: clamp(92px, 16vw, 120px);
  height: auto;
  display: block;
  object-fit: contain;
}
.global-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  color: #4f2249;
}
.global-brand__title { font-size: 16px; font-weight: 800; }
.global-brand__subtitle { font-size: 12px; color: var(--nav-muted); }

.menu-toggle {
  appearance: none;
  border: 0;
  background: #fff;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  flex: 0 0 auto;
}
.menu-toggle__bars {
  position: relative;
  width: 22px;
  height: 16px;
  display: inline-block;
}
.menu-toggle__bars span {
  position: absolute;
  left: 0;
  width: 22px;
  height: 2.5px;
  border-radius: 999px;
  background: var(--nav-text);
  transition: all 0.2s ease;
}
.menu-toggle__bars span:nth-child(1) { top: 0; }
.menu-toggle__bars span:nth-child(2) { top: 6.5px; }
.menu-toggle__bars span:nth-child(3) { top: 13px; }
.menu-toggle.is-active .menu-toggle__bars span:nth-child(1) { top: 6.5px; transform: rotate(45deg); }
.menu-toggle.is-active .menu-toggle__bars span:nth-child(2) { opacity: 0; }
.menu-toggle.is-active .menu-toggle__bars span:nth-child(3) { top: 6.5px; transform: rotate(-45deg); }

.nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(18, 18, 18, 0.38);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 9997;
}
.nav-backdrop.is-open { opacity: 1; pointer-events: auto; }

.nav-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100dvh;

  width: 100%;
  max-width: 420px;

  box-sizing: border-box;

  background: var(--panel-bg);
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform 0.24s ease;
  z-index: 9998;

  display: flex;
  flex-direction: column;

  border-top-left-radius: 24px;
  border-bottom-left-radius: 24px;

  overflow: hidden;
}

.nav-drawer.is-open { transform: translateX(0); }

.nav-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}
.nav-drawer__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.nav-drawer__logo { height: 34px; width: auto; display: block; object-fit: contain; }
.nav-drawer__brand-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nav-drawer__brand-text strong { font-size: 15px; color: var(--nav-text); }
.nav-drawer__brand-text span { font-size: 12px; color: var(--nav-muted); }
.nav-close {
  appearance: none;
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff;
  color: var(--nav-text);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 3px 12px rgba(0,0,0,0.08);
  flex: 0 0 auto;
}

.nav-drawer__content {
  flex: 1 1 auto;

  display: flex;
  flex-direction: column;
  gap: 12px;

  overflow-y: auto;
  overflow-x: hidden;

  padding: 12px;

  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}


.nav-section {
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 18px;

  padding: 10px;
  box-sizing: border-box;

  width: 100%;
}

.nav-section__title {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nav-muted);
  margin-bottom: 8px;
}
.nav-list { display: flex; flex-direction: column; gap: 6px; }
.nav-link {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  text-decoration: none;
  color: #4f2249;
  font-weight: 700;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}
.nav-link:hover {
  background: rgba(236, 99, 154, 0.08);
  color: var(--nav-pink);
  transform: translateX(2px);
}
.nav-link.active {
  background: linear-gradient(135deg, rgba(236,99,154,0.14), rgba(29,175,139,0.10));
  color: var(--nav-pink);
}

.current-heft-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  background-color: #4f224919;
  padding: 10px;
  border:1px;
  border-radius: 10px;
}

.current-heft-head:hover {
 background-color: #4f22490a; 
}

.current-heft-head__title {
  font-size: 16px;
  text-decoration: none;
  font-weight: 800;
  color: #4f2249;
}
.current-heft-head__overview {
  text-decoration: none;
  color: var(--nav-pink);
  font-weight: 700;
  font-size: 13px;
}


.module-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px;
  margin-bottom: 10px;
}

.module-tile {
  height: 125px;            /* Desktop-Höhe */
  min-height: 0 !important;

  border-radius: 16px;
  text-decoration: none;
  color: #4f2249;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  padding: 5px;
  font-weight: 800;
  font-size: 15px;
  line-height: 1.1;

  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease;
}

.module-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.10);
  background: linear-gradient(  135deg,  rgba(29, 175, 138, 0.122), rgba(132, 48, 149, 0.271) );
  color:#4f2249;}

.module-tile.active {
  background: linear-gradient(  135deg,  rgba(236,99,154,0.206),  rgba(29,175,138,0.132) );
  color: var(--nav-pink);
  border-color: rgba(236,99,154,0.16);
}



.nav-drawer__footer {
  margin-top: auto;
  padding: 10px 14px 14px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  line-height: 1.5;
  color: var(--nav-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 0 0 auto;
}
.nav-drawer__footer a { color: var(--nav-muted); text-decoration: none; }
.nav-drawer__footer a:hover { color: var(--nav-pink); }
.nav-drawer__footer-links { display: flex; gap: 10px; flex-wrap: wrap; }

.nav-link--tagesimpuls {
  background: linear-gradient(135deg, rgb(196, 65, 135), rgba(29, 175, 138, 0.535));
  border: 1px solid rgba(236, 99, 154, 0.25);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.nav-link--tagesimpuls:hover {
  background: linear-gradient(135deg, rgba(84, 8, 89, 0.868), rgba(29, 175, 138, 0.489));
  color: #fff;
  box-shadow: 0 6px 18px rgba(236, 99, 154, 0.25);
  transform: translateX(4px);
}
.nav-link--tagesimpuls::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.25), transparent 60%);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.nav-link--tagesimpuls:hover::after { opacity: 1; }


@media (max-width: 640px) {

  :root {
    --header-height: 64px;  }

  .global-header__inner {
    padding: 8px 10px;  }

  .global-header__bar {
    min-height: 48px;  }

  .global-brand__logo {
    height: 35px;
    width: auto;
    padding-left: 5px;  }

  .global-brand__subtitle {
    display: none;  }

  .menu-toggle {
    width: 44px;
    height: 44px;
    border-radius: 14px;  }

  /* ✅ ALLES in EINEM Media-Block */

  .nav-drawer {
    width: calc(100% - 8px);
    max-width: 333px;
    box-sizing: border-box;
    padding-right: env(safe-area-inset-right);
    right: 0;
    left: auto;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
  }

  .nav-drawer__header {
    padding: 12px 12px 10px;  }

  .nav-drawer__content {
    padding: 12px;
    gap: 10px;  }

  .nav-section {
    padding: 10px;
    border-radius: 16px;  }

.module-grid {
  
    display: grid !important;                     
    grid-template-columns: 1fr 1fr !important;
    gap: 8px;
    width: 100%;

}


  .module-tile {
    height: 125px;   /* ✅ Mobile-Höhe anpassbar */

    box-sizing: border-box;

    border-radius: 14px;
    padding: 8px;

    font-size: 13px;
    line-height: 1.15;
  }

  .nav-link {
    height: 40px;
    padding: 0 11px;  }
}