/* =====================================================
   Lexend / Staatsbürgerschaftstest Landing Core Styles
   Shared by all landing pages (2025)
   ===================================================== */

/* === 1. Fonts === */
@font-face {
  font-family: "Graphik";
  src: url("/assets/fonts/graphik/Graphik-Regular.woff2") format("woff2"),
       url("/assets/fonts/graphik/Graphik-Regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Graphik";
  src: url("/assets/fonts/graphik/Graphik-Medium.woff2") format("woff2"),
       url("/assets/fonts/graphik/Graphik-Medium.woff") format("woff");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Graphik";
  src: url("/assets/fonts/graphik/Graphik-Semibold.woff2") format("woff2"),
       url("/assets/fonts/graphik/Graphik-Semibold.woff") format("woff");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Mabry Pro";
  src: url("/assets/fonts/mabry-pro/MabryPro-Regular.woff2") format("woff2"),
       url("/assets/fonts/mabry-pro/MabryPro-Regular.woff") format("woff");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Mabry Pro";
  src: url("/assets/fonts/mabry-pro/MabryPro-Bold.woff2") format("woff2"),
       url("/assets/fonts/mabry-pro/MabryPro-Bold.woff") format("woff");
  font-weight: 700;
  font-display: swap;
}

/* === 2. Color palette === */
:root {
  --accent:#12715B;       /* Lexend green */
  --accent-light:#f5eee9;  /* Lexend beige */
  --ink:#111;
  --text:#222;
  --muted:#555;
  --line:#e9e9e9;
  --bg:#ffffff;            /* default background white */
  --bg-alt:#f5eee9;        /* beige alternate section */
}

/* === 3. Typography === */
*{box-sizing:border-box;}
body {
  font-family:"Graphik",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-weight:400;
  color:var(--text);
  margin:0;
  line-height:1.7;
  background:var(--bg);
  font-size:clamp(1rem,1.1vw,1.08rem);
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4,h5,h6 {
  font-family:"Mabry Pro","Graphik",sans-serif;
  font-weight:700;
  line-height:1.25;
  color:var(--ink);
}

/* === 4. Header === */
.header {
  max-width:1200px;
  margin:0 auto;
  padding:1rem 1.25rem;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:1rem;
}
.brand {
  display:flex;
  align-items:center;
  gap:.4rem;
  font-weight:700;
  letter-spacing:-.2px;
  font-size:1.05rem;
}
.flag-icon {
  width:22px;
  height:auto;
  margin-right:.4rem;
  border-radius:2px;
}
.nav a {
  color:var(--text);
  text-decoration:none;
  margin:0 .8rem;
  font-weight:500;
}
.nav a:hover { color:var(--accent); }
.header-cta a {
  background:var(--accent);
  color:#fff;
  padding:.55rem 1.1rem;
  border-radius:9999px;
  font-weight:600;
  text-decoration:none;
  white-space:nowrap;
}
.header-cta a:hover { opacity:.9; }
@media(max-width:860px){
  .nav{display:none;}
  .header{flex-wrap:wrap;}
}

/* === 5. Hero === */
.hero {
  text-align:center;
  padding:6rem 1rem 4.5rem;
  background:linear-gradient(135deg,var(--accent-light),#fff);
}
.hero h1 {
  font-family:"Graphik",sans-serif;
  font-weight:600;
  font-size:clamp(2rem,3.6vw,3rem);
  line-height:1.15;
  letter-spacing:-0.03em;
  color:#101013;
  margin:0 0 .6rem;
}
.hero p {
  font-family:"Graphik",sans-serif;
  font-weight:400;
  color:#444;
  font-size:clamp(1.05rem,1.3vw,1.2rem);
  line-height:1.6;
  max-width:760px;
  margin:0 auto 2rem;
}
.btn {
  display:inline-block;
  border-radius:999px;
  padding:.9rem 1.8rem;
  text-decoration:none;
  font-weight:600;
}
.btn.accent { background:var(--accent);color:#fff; }
.btn.accent:hover { opacity:.92; }

/* === 6. Layout & TOC === */
.wrap {
  max-width:1200px;
  margin:0 auto;
  display:grid;
  gap:2rem;
  grid-template-columns:260px 1fr;
  padding:2.5rem 1rem;
}
@media(max-width:980px){ .wrap{grid-template-columns:1fr;} }

.toc {
  border:1px solid var(--line);
  border-radius:12px;
  padding:1rem;
  background:#fff;
  position:sticky;
  top:18px;
  align-self:start;
}
.toc h2 { font-size:1rem;margin:.2rem 0 .6rem;font-weight:700; }
.toc a {
  display:block;
  color:var(--text);
  text-decoration:none;
  padding:.25rem;
  border-radius:8px;
  font-size:.98rem;
}
.toc a:hover { background:var(--accent-light);color:var(--accent); }
.toc .sub { padding-left:.75rem;font-size:.95rem;color:#444; }

/* Mobile TOC */
.toc-mobile {
  display:none;
  margin:1rem 0 1.5rem;
  padding:.75rem 1rem;
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px;
}
.toc-mobile label { font-weight:600;font-size:.95rem;margin-right:.4rem; }
.toc-mobile select {
  padding:.45rem .6rem;
  font-size:1rem;
  border:1px solid #ddd;
  border-radius:8px;
  background:#fafafa;
}
@media(max-width:980px){
  .toc{display:none;}
  .toc-mobile{display:block;}
}

/* === 7. Content Sections === */
.section {
  padding:2.25rem 1.25rem;
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  margin-bottom:1.2rem;
}
.section.alt { background:var(--bg-alt); }
.note {
  padding:.9rem 1rem;
  border-left:4px solid var(--accent);
  background:var(--accent-light);
  border-radius:8px;
  color:#333;
  margin:1rem 0;
}
.table { width:100%;border-collapse:collapse;margin:.6rem 0 1rem; }
.table th,.table td {
  border:1px solid var(--line);
  padding:.6rem .7rem;
  text-align:left;
}
.table th { background:#f6f6f6; }

/* === 8. FAQ === */
details { border-top:1px solid var(--line);padding:.7rem 0; }
details summary { cursor:pointer;font-weight:600; }
details[open] summary { color:var(--accent); }

/* === 9. Footer === */
.footer {
  background:#111;
  color:#bbb;
  font-size:.92rem;
  padding:2rem 1rem;
}
.footer-inner {
  max-width:1200px;
  margin:0 auto;
  display:flex;
  flex-wrap:wrap;
  gap:1rem;
  justify-content:space-between;
}
.footer a { color:#bbb;text-decoration:none; }
.footer a:hover { color:#fff; }

/* =====================================================
   RESPONSIVE FIX (overflow + wrapping)
   ===================================================== */

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* Force wrapping only for text elements */
body, p, li, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
}

/* Tables that might overflow */
.table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table th, .table td {
  white-space: normal !important;
}

/* Fix sticky sidebar on mobile */
@media (max-width: 980px) {
  .toc {
    display: none !important;
  }
  .toc-mobile {
    display: block !important;
  }
}

/* Mobile layout adjustments only */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
  }

  .wrap {
    display: block;
    width: 100%;
    padding: 1rem;
  }

  .section {
    padding: 1.25rem 1rem;
    margin-bottom: 1rem;
  }

  .hero {
    padding: 3rem 1rem 2rem;
  }

  .hero h1 {
    font-size: clamp(1.6rem, 6vw, 2rem);
    line-height: 1.25;
    padding: 0 0.5rem;
  }

  .hero p {
    font-size: 1rem;
    line-height: 1.55;
    max-width: 100%;
    padding: 0 0.5rem;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
/* =====================================================
   BUTTON SPACING & READABILITY FIX — Landing page only
   ===================================================== */

.btn,
.button,
a.btn-primary,
a.btn-success {
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  line-height: 1.2;
  border-radius: 9999px; /* keeps pill shape */
}

@media (max-width: 768px) {
  .btn,
  .button,
  a.btn-primary,
  a.btn-success {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 0.5rem auto;
    font-size: 0.95rem;
    padding: 1rem 1.25rem;
  }
}

