/*
 * Mobil-Ansicht (App-Look). Gilt NUR, wenn mobile.js <html data-view="mobile"> setzt (Bildschirm <= 900 px, nicht "Klassisch").
 * Alles hier steht unter html[data-view="mobile"]; ohne dieses Attribut (Desktop, Klassisch) aendert sich nichts.
 */
@font-face { font-family: "Rajdhani"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/rajdhani-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Rajdhani"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/rajdhani-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Rajdhani"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/rajdhani-latin-700-normal.woff2") format("woff2"); }

:root { --m-bg: #040806; --m-line: #0c6a28; --m-green: #00ff41; --m-text: #d6ffe0; --m-muted: #8fb89a; --m-top: 54px; --m-tabs: 62px; }

/* Hilfselemente: standardmaessig unsichtbar */
.m-top, .m-tabs, .m-sheet { display: none; }

/* ===== Mobil-Ansicht ===== */
html[data-view="mobile"] .m-top { display: flex; }
html[data-view="mobile"] .m-tabs { display: flex; }
html[data-view="mobile"].m-kb .m-tabs { display: none; }   /* Tastatur offen */

html[data-view="mobile"] body {
  box-sizing: border-box;   /* Abstand zaehlt zur Hoehe: Seiten, die genau einen Bildschirm fuellen, scrollen nicht ueberfluessig */
  padding-top: calc(var(--m-top) + env(safe-area-inset-top));
  padding-bottom: calc(var(--m-tabs) + env(safe-area-inset-bottom) + 8px);
}
/* Was die Hilfe der Huelle uebernimmt (Logo-Ueberschrift, Social-Icons, Burger/Menue, schwebender FAQ-Knopf, Rechtliches) */
html[data-view="mobile"] .content-title,
html[data-view="mobile"] .content:has(> .content-title:only-child),
html[data-view="mobile"] .social-links-container,
html[data-view="mobile"] #burgerMenuBtn,
html[data-view="mobile"] #mainMenu,
html[data-view="mobile"] #faqLauncherBtn,
html[data-view="mobile"] nav.legal-links { display: none !important; }

.m-top {
  position: fixed; z-index: 1000; top: 0; left: 0; right: 0; align-items: center; gap: 0.7rem;
  height: calc(var(--m-top) + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 0.8rem 0;
  background: rgba(4, 8, 6, 0.97); border-bottom: 1px solid var(--m-green); box-shadow: 0 0 14px rgba(0, 255, 65, 0.2);
}
.m-top__brand { font: 900 1.2rem/1 "Montserrat", sans-serif; letter-spacing: 0.03em; color: #fff; text-decoration: none; text-shadow: 0 0 6px rgba(255, 255, 255, 0.7), 0 0 14px rgba(255, 255, 255, 0.3); }
.m-top__title {
  flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font: 600 1.05rem/1 "Rajdhani", sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: var(--m-green); text-shadow: 0 0 6px rgba(0, 255, 65, 0.5);
}
.m-top__more, .m-sheet__x {
  display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--m-line); background: transparent; color: var(--m-green); cursor: pointer;
}
.m-ico { display: inline-flex; }
.m-ico svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.m-tabs {
  position: fixed; z-index: 1000; left: 0; right: 0; bottom: 0; align-items: stretch;
  height: calc(var(--m-tabs) + env(safe-area-inset-bottom)); padding: 0 2px env(safe-area-inset-bottom);
  background: rgba(4, 8, 6, 0.98); border-top: 1px solid var(--m-green); box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.7);
}
.m-tab {
  position: relative; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 0;
  border: 0; background: none; color: var(--m-muted); text-decoration: none; cursor: pointer;
  font: 600 0.8rem/1 "Rajdhani", sans-serif; letter-spacing: 0.06em; text-transform: uppercase;
}
.m-tab span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-tab[aria-current="page"] { color: var(--m-green); text-shadow: 0 0 8px rgba(0, 255, 65, 0.7); }
.m-tab[aria-current="page"]::before { content: ""; position: absolute; top: -1px; left: 50%; width: 30px; height: 3px; margin-left: -15px; background: var(--m-green); box-shadow: 0 0 8px var(--m-green); }
.m-tab:focus-visible, .m-top__more:focus-visible, .m-sheet__item:focus-visible, .m-sheet__switch:focus-visible, .m-sheet__x:focus-visible { outline: 2px solid #fff; outline-offset: -3px; }

/* "More"-Blatt */
.m-sheet {
  position: fixed; inset: auto 0 0 0; width: 100%; max-width: 100%; margin: 0; padding: 0 0 env(safe-area-inset-bottom); max-height: 86dvh; overflow-y: auto;
  border: 0; border-top: 1px solid var(--m-green); background: #060c08; color: var(--m-text); z-index: 1100; flex-direction: column;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.8);
}
.m-sheet::backdrop { background: rgba(0, 0, 0, 0.72); }
html[data-view="mobile"] .m-sheet[open] { display: flex; }
.m-sheet__head { display: flex; align-items: center; justify-content: space-between; padding: 0.4rem 0.8rem 0.4rem 1rem; border-bottom: 1px solid var(--m-line); }
.m-sheet__title { font: 700 1.1rem/1 "Rajdhani", sans-serif; letter-spacing: 0.16em; text-transform: uppercase; color: var(--m-green); }
.m-sheet__list { list-style: none; margin: 0; padding: 0.3rem 0; }
.m-sheet__item {
  display: flex; align-items: center; gap: 0.9rem; width: 100%; min-height: 52px; padding: 0 1rem; border: 0; background: none; text-align: left; text-decoration: none; cursor: pointer;
  color: var(--m-text); font: 600 1.1rem/1 "Rajdhani", sans-serif; letter-spacing: 0.08em; text-transform: uppercase;
}
.m-sheet__item.is-on { color: var(--m-green); }
.m-sheet__item .m-ico svg { stroke: var(--m-green); }
.m-sheet__row { display: flex; flex-wrap: wrap; gap: 0.6rem; padding: 0.7rem 1rem 0; }
.m-sheet__row:empty { display: none; }
.m-sheet__social, .m-sheet__legal {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 1rem; border: 1px solid var(--m-line); color: var(--m-text); text-decoration: none;
  font: 600 1rem/1 "Rajdhani", sans-serif; letter-spacing: 0.08em; text-transform: uppercase;
}
.m-sheet__legal { border-color: transparent; color: var(--m-muted); padding: 0 0.6rem; }
.m-sheet__switch {
  display: block; width: calc(100% - 2rem); min-height: 48px; margin: 0.9rem 1rem 1rem; padding: 0; border: 1px dashed var(--m-green); background: rgba(0, 255, 65, 0.06); color: var(--m-green); cursor: pointer;
  font: 700 1rem/1 "Rajdhani", sans-serif; letter-spacing: 0.1em; text-transform: uppercase;
}

/* FAQ-Fenster: auf dem Handy als Vollbild-Blatt (das Fenster selbst und faq.js bleiben unveraendert) */
html[data-view="mobile"] #faqWindow:not(.faq-hidden) {
  position: fixed !important; inset: 0 !important; width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important;
  box-sizing: border-box !important; margin: 0 !important; transform: none !important; z-index: 10000 !important;
}
html[data-view="mobile"] #faqWindow:not(.faq-hidden) .card { height: 100%; }
html[data-view="mobile"] #faqWindow:not(.faq-hidden) #faqCloseBtn { min-width: 44px; min-height: 44px; font-size: 1.1rem; }   /* X-Knopf: Tippflaeche */
html[data-view="mobile"] #faqWindow:not(.faq-hidden) .faq-body { max-height: calc(100dvh - 60px); overflow-y: auto; }

/* Querformat am Handy (niedrige Fenster): schmalere Leisten, Beschriftung neben dem Symbol, damit der Inhalt Platz behaelt */
@media (max-height: 500px) {
  :root { --m-top: 44px; --m-tabs: 48px; }
  .m-tab { flex-direction: row; gap: 6px; font-size: 0.85rem; }
  .m-ico svg { width: 20px; height: 20px; }
  .m-top__more { width: 40px; height: 40px; }
}

/* Sehr schmale Bildschirme (320 px): Tab-Beschriftung etwas kleiner, damit "SERVICES" in die Leiste passt */
@media (max-width: 340px) {
  .m-tab { font-size: 0.7rem; letter-spacing: 0; }
}
