/* ==========================================================================
   Eloquens Sprachschule – globales Stylesheet
   Gilt für alle Seiten. Seitenspezifisches CSS bitte unten im Abschnitt
   "Seiten-Komponenten" ergänzen oder als <style> in head_extra der Seite.
   ========================================================================== */

/* ---------- Schriften (selbst gehostet, DSGVO-konform) ---------- */
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/montserrat-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/montserrat-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/montserrat-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Montserrat'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/montserrat-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 300; font-display: swap; src: url('../fonts/lato-latin-300-normal.woff2') format('woff2'); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/lato-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/lato-latin-700-normal.woff2') format('woff2'); }

/* ---------- Design-Tokens ---------- */
:root {
  --el-dark: #5B7560;
  --el-darker: #3F5544;
  --el-ink: #1E2820;
  --el-mid: #92A394;
  --el-light: #AEBAAF;
  --el-orange: #C8A96E;
  --el-dark-text: #333333;
  --el-mid-text: #666666;
  --el-bg: #F5F5F5;
  --el-white: #FFFFFF;
  --el-border: #e8ede9;
  --max-w: 900px;
  --max-w-wide: 1200px;
  --pad: clamp(1rem, 4vw, 3rem);
  --section: clamp(2rem, 5vw, 4rem);
  --radius: 12px;
  --shadow: 0 6px 24px rgba(91, 117, 96, 0.14);
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; hyphens: none; -webkit-hyphens: none; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Lato', sans-serif;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.0625rem);
  line-height: 1.65;
  color: var(--el-dark-text);
  background: var(--el-white);
  overflow-x: hidden;
  overflow-wrap: normal;
  word-break: normal;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--el-dark); }
a:hover { color: var(--el-darker); }
:focus-visible { outline: 3px solid var(--el-orange); outline-offset: 2px; }

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  color: var(--el-ink);
  line-height: 1.25;
  margin: 0 0 0.6em;
  hyphens: none; -webkit-hyphens: none;
  overflow-wrap: normal; word-break: normal;
}
h1 { font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.75rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.5vw, 2rem); font-weight: 700; }
h3 { font-size: clamp(1.15rem, 1rem + 0.7vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 1em; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--el-ink); color: #fff; padding: 10px 16px; z-index: 1000;
}
.skip-link:focus { left: 8px; top: 8px; color: #fff; }

/* ---------- Layout-Helfer ---------- */
.inner { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--pad); }
.inner-wide { max-width: var(--max-w-wide); margin: 0 auto; padding: 0 var(--pad); }
.section { padding: var(--section) 0; }
.section-grey { background: var(--el-bg); }
.section-dark { background: var(--el-dark); color: #fff; }
.section-dark h1, .section-dark h2, .section-dark h3 { color: #fff; }
.section-dark a:not([class*="btn"]) { color: #fff; }

/* ---------- Buttons ---------- */
.btn-primary, .btn-ghost, .btn-ghost-light {
  display: inline-block;
  min-height: 44px;
  border-radius: 8px;
  font-family: 'Lato', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: opacity 0.2s, border-color 0.2s, background 0.2s;
}
.btn-primary { background: var(--el-orange); color: var(--el-ink) !important; border: none; padding: 14px 28px; }
.btn-primary:hover, .btn-primary:focus-visible { opacity: 0.88; color: var(--el-ink) !important; }
.btn-ghost { background: transparent; color: #fff !important; border: 1.5px solid rgba(255,255,255,0.45); padding: 13px 28px; }
.btn-ghost:hover, .btn-ghost:focus-visible { border-color: rgba(255,255,255,0.75); color: #fff !important; }
.btn-ghost-light { background: transparent; color: var(--el-dark) !important; border: 1.5px solid var(--el-dark); padding: 13px 28px; }
.btn-ghost-light:hover, .btn-ghost-light:focus-visible { background: var(--el-dark); color: #fff !important; }

/* ---------- Topbar ---------- */
.topbar { background: var(--el-darker); color: #fff; font-size: 0.85rem; }
.topbar-inner {
  max-width: var(--max-w-wide); margin: 0 auto; padding: 6px var(--pad);
  display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: clamp(0.8rem, 3vw, 2rem);
}
.topbar-item {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; white-space: nowrap;
  color: #fff; text-decoration: none; min-height: 32px;
}
.topbar-item:hover { color: #fff; text-decoration: underline; }
.topbar-item svg { width: 15px; height: 15px; fill: currentColor; }
.topbar-insta svg { width: 17px; height: 17px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--el-white);
  border-bottom: 1px solid var(--el-border);
}
.header-inner {
  max-width: var(--max-w-wide); margin: 0 auto; padding: 0 var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  min-height: 76px;
}
.logo { flex-shrink: 0; display: block; }
.logo img { height: clamp(36px, 4.2vw, 50px); width: auto; }

.main-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0.25rem; }
.nav-item { position: relative; display: flex; align-items: center; }
.nav-item > a {
  display: block; padding: 26px 10px; font-weight: 700; font-size: 0.95rem;
  color: var(--el-dark-text); text-decoration: none; white-space: nowrap;
}
.nav-item > a:hover, .nav-item.is-active > a { color: var(--el-dark); }
.nav-item.is-active > a { box-shadow: inset 0 -3px 0 var(--el-orange); }
.sub-toggle { display: none; }
.has-sub > a::after {
  content: ''; display: inline-block; margin-left: 6px; vertical-align: 2px;
  border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0;
}
.sub-nav {
  list-style: none; margin: 0; padding: 8px 0;
  position: absolute; top: 100%; left: 0; min-width: 250px;
  background: #fff; border: 1px solid var(--el-border); border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.has-sub:hover > .sub-nav, .has-sub:focus-within > .sub-nav { opacity: 1; visibility: visible; transform: none; }
.sub-nav a {
  display: block; padding: 9px 18px; color: var(--el-dark-text); text-decoration: none; font-size: 0.93rem;
}
.sub-nav a:hover, .sub-nav a[aria-current="page"] { background: var(--el-bg); color: var(--el-dark); }
.nav-cta { margin-left: 0.75rem; }
.nav-cta .btn-primary { padding: 11px 22px; }

/* Burger */
.nav-toggle {
  display: none; width: 48px; height: 48px; border: 0; background: transparent; cursor: pointer;
  padding: 12px; flex-direction: column; justify-content: space-between;
}
.nav-toggle span { display: block; height: 2px; background: var(--el-ink); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

@media (max-width: 1080px) {
  .header-inner { min-height: 64px; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; left: 0; right: 0; top: var(--header-h, 96px); bottom: 0;
    background: #fff; overflow-y: auto; padding: 0.5rem 0 2rem;
    display: none; border-top: 1px solid var(--el-border);
  }
  .main-nav.is-open { display: block; }
  .main-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-item { flex-wrap: wrap; border-bottom: 1px solid var(--el-border); }
  .nav-item > a { flex: 1; padding: 14px var(--pad); min-height: 48px; }
  .nav-item.is-active > a { box-shadow: inset 4px 0 0 var(--el-orange); }
  .has-sub > a::after { display: none; }
  .sub-toggle {
    display: flex; align-items: center; justify-content: center;
    width: 56px; min-height: 48px; border: 0; border-left: 1px solid var(--el-border);
    background: transparent; cursor: pointer;
  }
  .sub-toggle svg { width: 24px; height: 24px; fill: var(--el-dark); transition: transform 0.2s; }
  .sub-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .sub-nav {
    position: static; width: 100%; min-width: 0; display: none;
    opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; border-radius: 0; background: var(--el-bg); padding: 4px 0;
  }
  .has-sub:hover > .sub-nav { display: none; }
  .sub-nav.is-open, .has-sub:hover > .sub-nav.is-open { display: block; }
  .sub-nav a { padding: 12px calc(var(--pad) + 1rem); min-height: 44px; }
  .nav-cta { margin: 1.25rem var(--pad) 0; }
  .nav-cta .btn-primary { display: block; padding: 14px 22px; }
  body.nav-open { overflow: hidden; }
}

@media (max-width: 640px) {
  .topbar-inner { justify-content: center; }
  .topbar-item span { font-size: 0.8rem; }
  .btn-primary, .btn-ghost, .btn-ghost-light { display: block; width: 100%; }
}
@media (max-width: 380px) {
  .topbar-item[href^="mailto"] span { display: none; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--el-ink); color: rgba(255,255,255,0.82); font-size: 0.95rem; margin-top: 0; }
.footer-inner {
  max-width: var(--max-w-wide); margin: 0 auto; padding: var(--section) var(--pad) 2rem;
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 2rem;
}
.site-footer h2 { color: #fff; font-size: 1rem; margin: 0 0 0.9rem; letter-spacing: 0.02em; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 0.35rem; }
.site-footer a { color: rgba(255,255,255,0.82); text-decoration: none; display: inline-block; padding: 3px 0; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer address { font-style: normal; margin: 0 0 1rem; }
.footer-logo { height: 40px; width: auto; margin-bottom: 1rem; background: #fff; border-radius: 8px; padding: 6px 10px; box-sizing: content-box; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); text-align: center; padding: 1.1rem var(--pad); font-size: 0.85rem; }
.footer-bottom p { margin: 0; }
@media (max-width: 900px) { .footer-inner { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-inner { grid-template-columns: 1fr; } }

/* ==========================================================================
   Seiten-Komponenten (wiederverwendbar)
   ========================================================================== */

/* Hero */
.hero { background: var(--el-dark); color: #fff; padding: clamp(2.5rem, 7vw, 5rem) 0; }
.hero h1 { color: #fff; }
.hero p.lead { font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem); opacity: 0.92; max-width: 640px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

/* Karten */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.25rem; }
.card {
  background: #fff; border: 1px solid var(--el-border); border-radius: var(--radius);
  padding: 1.5rem; transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card h3 { margin-bottom: 0.4em; font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.15rem); }
a.card { display: block; color: inherit; text-decoration: none; }

/* Badge */
.badge {
  display: inline-block; background: var(--el-light); color: var(--el-ink);
  font-size: 0.8rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}

/* Kurzantwort-Box (Ratgeber) */
.answer-box { background: var(--el-bg); border-left: 4px solid var(--el-dark); border-radius: 0 var(--radius) var(--radius) 0; padding: 1.25rem 1.5rem; margin: 1.5rem 0; }

/* Breadcrumb */
.breadcrumb { font-size: 0.85rem; color: var(--el-mid-text); padding: 1rem 0 0; }
.breadcrumb a { color: var(--el-mid-text); }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.breadcrumb li + li::before { content: '›'; margin-right: 0.4rem; }

/* FAQ-Accordion (natives <details>) */
.faq details { border: 1px solid var(--el-border); border-radius: var(--radius); margin-bottom: 0.75rem; background: #fff; }
.faq summary {
  cursor: pointer; list-style: none; padding: 1rem 3rem 1rem 1.25rem; position: relative;
  font-family: 'Montserrat', sans-serif; font-weight: 600; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--el-dark); }
.faq details[open] summary::after { content: '–'; }
.faq details > div { padding: 0 1.25rem 1rem; }

/* Druck */
@media print {
  .topbar, .site-header, .site-footer, .skip-link { display: none !important; }
  body { color: #000; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Sprungmarken (#pakete usw.) nicht unter dem klebenden Menü verstecken */
[id] { scroll-margin-top: 100px; }
