/* =========================================
   Leuchthafen Immobilienkompass – Minimalist Flex CSS
   Mobile-first, flexbox-only, clean typography, generous spacing
   ========================================= */

/* --------------------------
   RESET & BASE
--------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Verdana, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; color: #0D2B45; background: #FFFFFF; line-height: 1.6; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: #0D2B45; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; background: transparent; border: none; cursor: pointer; }
ul, ol { padding-left: 20px; }
li + li { margin-top: 8px; }

/* --------------------------
   DESIGN TOKENS
--------------------------- */
:root {
  --primary: #0D2B45;
  --secondary: #1B998B;
  --accent: #F5F7FA;
  --text: #0D2B45;
  --muted: #5B6B7A;
  --border: #E6ECF2;
  --bg: #FFFFFF;
  --shadow: 0 6px 18px rgba(13, 43, 69, 0.08);
  --radius: 10px;
  --radius-sm: 8px;
  --radius-lg: 14px;
  --focus: #1B998B;
}

/* --------------------------
   TYPOGRAPHY
--------------------------- */
h1, h2, h3, h4 { font-family: "Trebuchet MS", Tahoma, Verdana, sans-serif; color: var(--text); line-height: 1.25; margin: 0 0 14px; }
h1 { font-size: 32px; letter-spacing: -0.2px; }
h2 { font-size: 24px; margin-top: 10px; }
h3 { font-size: 18px; color: var(--text); }
h4 { font-size: 16px; }
p { margin: 0 0 14px; color: var(--text); }
small, .muted { color: var(--muted); }
strong { font-weight: 700; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* --------------------------
   LAYOUT WRAPPERS (Flex-only)
--------------------------- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; display: flex; flex-direction: column; gap: 0; }
.content-wrapper { display: flex; flex-direction: column; gap: 16px; }

/* Mandatory spacing patterns */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; }
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Generic section spacing for plain <section> */
section { margin-bottom: 60px; padding: 40px 0; }

/* --------------------------
   HEADER & NAVIGATION
--------------------------- */
header { position: sticky; top: 0; background: var(--bg); border-bottom: 1px solid var(--border); z-index: 1000; }
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 36px; width: auto; }

.main-nav { display: none; align-items: center; gap: 16px; }
.main-nav a { padding: 8px 10px; border-radius: 6px; transition: background-color .2s ease, color .2s ease; color: var(--text); }
.main-nav a:hover { background: var(--accent); text-decoration: none; }

/* CTA button in header */
header .button.primary { display: none; }

/* Mobile menu toggle */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--border); background: var(--bg); transition: background-color .2s ease, box-shadow .2s ease; }
.mobile-menu-toggle:hover { background: var(--accent); box-shadow: var(--shadow); }

/* Mobile full-screen menu overlay */
.mobile-menu { position: fixed; inset: 0; background: rgba(13, 43, 69, 0.4); backdrop-filter: saturate(120%) blur(2px); display: flex; flex-direction: column; align-items: flex-end; padding: 0; transform: translateX(100%); transition: transform .35s ease; z-index: 1200; }
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-close { margin: 14px 16px 6px; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--bg); border: 1px solid var(--border); }
.mobile-nav { background: var(--bg); width: 100%; max-width: 360px; height: 100%; box-shadow: -6px 0 20px rgba(13,43,69,.12); padding: 12px 20px 24px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.mobile-nav a { padding: 14px 10px; border-radius: 8px; font-size: 16px; color: var(--text); transition: background-color .2s ease; }
.mobile-nav a:hover { background: var(--accent); text-decoration: none; }

/* --------------------------
   HERO
--------------------------- */
.hero { background: var(--accent); border-bottom: 1px solid var(--border); }
.hero .content-wrapper { align-items: flex-start; gap: 14px; padding: 26px 0; }
.hero h1 { font-size: 28px; }
.hero p { color: var(--muted); max-width: 58ch; }

.cta-group { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Trust badges */
.trust-badges { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-top: 6px; }
.trust-badges .text-section { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); background: #fff; border-radius: 999px; }
.trust-badges img { width: 18px; height: 18px; }
.trust-badges p { margin: 0; font-size: 14px; color: var(--text); }

/* --------------------------
   TEXT BLOCKS & LIST GROUPS
--------------------------- */
.text-section { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.benefit-list { display: flex; flex-wrap: wrap; gap: 20px; }
.benefit-list .text-section { flex: 1 1 260px; padding: 18px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: 0 2px 10px rgba(13,43,69,0.05); transition: transform .2s ease, box-shadow .2s ease; }
.benefit-list .text-section:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.benefit-list img { width: 28px; height: 28px; }

/* Cards (generic) */
.card { flex: 1 1 280px; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; padding: 18px; box-shadow: 0 2px 10px rgba(13,43,69,0.05); transition: box-shadow .2s ease, transform .2s ease; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

/* Content grid utility (flex only) */
.content-grid > * { flex: 1 1 300px; }

/* Text + Image split */
.text-image-section img { flex: 1 1 280px; border-radius: var(--radius); box-shadow: var(--shadow); }
.text-image-section .text { flex: 1 1 320px; }

/* Filter tags (Ratgeber) */
.filter-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.filter-tags span { padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; background: #fff; font-size: 14px; color: var(--text); }

/* --------------------------
   TESTIMONIALS
--------------------------- */
.testimonial-card { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; box-shadow: 0 2px 10px rgba(13,43,69,0.05); }
.testimonial-card p { margin: 0; color: var(--text); }
.testimonial-card strong { color: var(--text); }

/* --------------------------
   BUTTONS & INTERACTIONS
--------------------------- */
.button { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--primary); background: #fff; color: var(--primary); font-weight: 600; transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, transform .1s ease; }
.button:hover { background: var(--accent); text-decoration: none; box-shadow: var(--shadow); }
.button:active { transform: translateY(1px); }
.button.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.button.primary:hover { background: #0b253b; border-color: #0b253b; }
.button.secondary { border-color: var(--secondary); color: var(--secondary); }
.button.secondary:hover { background: rgba(27,153,139,0.08); }

/* Inline links emphasized inside paragraphs */
.text-section a:not(.button) { color: var(--secondary); text-decoration: underline; text-underline-offset: 2px; }
.text-section a:not(.button):hover { color: #157e73; }

/* --------------------------
   FOOTER
--------------------------- */
footer { background: var(--accent); border-top: 1px solid var(--border); color: var(--text); }
footer .content-wrapper { gap: 20px; padding: 28px 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.footer-nav a { color: var(--text); padding: 6px 8px; border-radius: 6px; }
.footer-nav a:hover { background: #fff; text-decoration: none; box-shadow: var(--shadow); }
footer p, footer a { color: var(--text); }

/* --------------------------
   UTILITIES
--------------------------- */
.hr { height: 1px; background: var(--border); width: 100%; }
.hidden { display: none !important; }
.visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* --------------------------
   COOKIE CONSENT BANNER & MODAL
--------------------------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--border); box-shadow: 0 -8px 24px rgba(13,43,69,0.08); z-index: 1100; display: none; }
.cookie-banner.show { display: flex; }
.cookie-banner .container { padding: 16px 20px; }
.cookie-banner .content-wrapper { flex-direction: column; gap: 12px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .button { padding: 10px 14px; }
.cookie-actions .accept { background: var(--primary); color: #fff; border-color: var(--primary); }
.cookie-actions .reject { border-color: var(--muted); color: var(--muted); }
.cookie-actions .settings { border-color: var(--secondary); color: var(--secondary); }

/* Cookie preferences modal */
.cookie-modal { position: fixed; inset: 0; background: rgba(13,43,69,0.5); display: none; align-items: center; justify-content: center; padding: 20px; z-index: 1300; }
.cookie-modal.show { display: flex; }
.cookie-modal .modal-content { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); width: 100%; max-width: 620px; padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 18px; }
.cookie-groups { display: flex; flex-direction: column; gap: 12px; }
.cookie-group { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.cookie-group .info { display: flex; flex-direction: column; gap: 4px; }
.cookie-modal .modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }

/* Toggle switch (checkbox) */
.cookie-switch { position: relative; width: 46px; height: 26px; border-radius: 999px; background: #d3dbe3; transition: background-color .2s ease; display: inline-flex; align-items: center; padding: 3px; }
.cookie-switch input { appearance: none; width: 0; height: 0; margin: 0; }
.cookie-switch::after { content: ""; width: 20px; height: 20px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.2); transform: translateX(0); transition: transform .2s ease; }
.cookie-switch input:checked + .cookie-switch-track { background: var(--secondary); }
/* helper for markup variant: input + track */
.cookie-switch-track { position: relative; width: 46px; height: 26px; border-radius: 999px; background: #d3dbe3; transition: background-color .2s ease; display: inline-flex; align-items: center; padding: 3px; }
.cookie-switch-track::after { content: ""; width: 20px; height: 20px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,0.2); transform: translateX(0); transition: transform .2s ease; }
.cookie-toggle:checked + .cookie-switch-track { background: var(--secondary); }
.cookie-toggle:checked + .cookie-switch-track::after { transform: translateX(20px); }

/* --------------------------
   RESPONSIVE (Mobile-first)
--------------------------- */
@media (min-width: 480px) {
  h1 { font-size: 34px; }
}

@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }

  /* Header desktop nav */
  .main-nav { display: flex; }
  header .button.primary { display: inline-flex; }
  .mobile-menu-toggle { display: none; }

  .hero .content-wrapper { align-items: flex-start; gap: 16px; padding: 40px 0; }
  .hero h1 { font-size: 44px; }

  .content-wrapper { gap: 20px; }

  /* Text-image layout: row on desktop */
  .text-image-section { flex-direction: row; align-items: center; }

  /* Footer spacing */
  footer .content-wrapper { flex-direction: row; align-items: flex-start; justify-content: space-between; }
}

@media (min-width: 1024px) {
  .container { padding: 0 24px; }
}

/* --------------------------
   PAGE-SPECIFIC LIGHT TOUCHES
--------------------------- */
/* Breadcrumbs */
[aria-label="Brotkrumen"] { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 14px; }
[aria-label="Brotkrumen"] a { color: var(--muted); }

/* Contact emphasis blocks */
#kontaktmoeglichkeiten .text-section p strong { color: var(--text); }

/* Thank-you icon alignment */
.hero .text-section img { width: 48px; height: 48px; }

/* --------------------------
   ACCESSIBILITY & STATES
--------------------------- */
::selection { background: rgba(27,153,139,0.2); }
:focus:not(:focus-visible) { outline: none; }

/* --------------------------
   ADDITIONAL FLEX UTILITIES (No Grid)
--------------------------- */
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-direction: row; flex-wrap: wrap; gap: 16px; }
.center { display: flex; align-items: center; justify-content: center; }

/* --------------------------
   SECTION VARIANTS
--------------------------- */
.section-muted { background: var(--accent); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-narrow .container { max-width: 860px; }

/* --------------------------
   SAFETY: PREVENT OVERLAP & CLEAR GAPS
--------------------------- */
main > section + section { margin-top: 0; }
main, header, footer, .content-wrapper, .card-container, .content-grid, .text-image-section, .testimonial-card { gap: 20px; }

/* Ensure no overlapping due to negative margins (none used) and adequate spacing */

/* --------------------------
   PRINT BASICS
--------------------------- */
@media print {
  header, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  a { text-decoration: underline; }
  .button { border: 1px solid #000; background: transparent; color: #000; box-shadow: none; }
}
