/* =============================
   Goldener Pfad Immobilienkompass
   style.css — Warm & Friendly theme
   Mobile-first, Flexbox-only layouts
   ============================= */

/* ---------- CSS Reset & Normalize ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; padding-left: 0; }
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
:focus { outline: 2px solid transparent; }
:focus-visible { outline: 3px solid rgba(195,145,43,0.6); outline-offset: 2px; }

/* ---------- Design Tokens ---------- */
:root {
  --primary: #1E3A5F;
  --secondary: #C3912B;
  --accent: #F5F7FA;
  --text: #2B2B2B;
  --muted: #6B7280;
  --success: #2F855A;
  --danger: #C53030;
  --warm-50: #FFF8F1;
  --warm-100: #FDF3E7;
  --warm-200: #FAE9D3;
  --card-bg: #FFFFFF;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 6px 16px rgba(0,0,0,0.10);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
}

/* ---------- Base Typography & Body ---------- */
body {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  color: var(--text, #222);
  background-color: var(--warm-50);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--primary);
  line-height: 1.25;
}

h1 { font-size: 32px; margin-bottom: 16px; }
h2 { font-size: 24px; margin-bottom: 14px; }
h3 { font-size: 18px; margin-bottom: 10px; }

p { font-size: 16px; color: var(--text); }
.subheadline { color: var(--muted); font-size: 18px; margin-bottom: 18px; }
.eyebrow { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--secondary); margin-bottom: 8px; }

strong { color: var(--primary); font-weight: 700; }
em { color: var(--primary); }

/* ---------- Layout Containers (Flexbox-only) ---------- */
.container {
  max-width: 1200px;
  width: 100%;
  padding: 0 20px;
  margin: 0 auto;
  display: flex; /* Flex container requirement */
  justify-content: center;
}
.content-wrapper {
  width: 100%;
  display: flex; /* Flex container requirement */
  flex-direction: column;
  gap: 20px;
}

/* Mandatory spacing classes */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: var(--card-bg); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.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; background: #FFFFFF; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); border: 1px solid var(--warm-200); }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* ---------- Header ---------- */
header {
  background: #FFFFFF;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}
header .container { justify-content: space-between; }
header .content-wrapper {
  flex-direction: row;
  align-items: center; /* vertical centering */
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}
.logo img { height: 44px; width: auto; }

.main-nav { display: none; gap: 14px; align-items: center; }
.main-nav a { color: var(--primary); padding: 8px 10px; border-radius: 8px; transition: color .2s ease, background-color .2s ease; }
.main-nav a:hover { background: var(--warm-100); color: var(--primary); }

.header-ctas { display: none; gap: 10px; align-items: center; }

/* Mobile menu toggle */
.mobile-menu-toggle {
  font-size: 24px;
  line-height: 1;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: #FFFFFF;
  background: var(--primary);
  box-shadow: var(--shadow-sm);
}
.mobile-menu-toggle:hover { background: #234364; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; /* Flex for alignment */
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: transform .15s ease, background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
  font-weight: 600;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--primary); color: #FFFFFF; }
.btn.primary:hover { background: #234364; box-shadow: var(--shadow-md); }
.btn.secondary { background: var(--secondary); color: #1B1B1B; }
.btn.secondary:hover { background: #AD7F20; color: #101010; box-shadow: var(--shadow-md); }
.btn:focus-visible { outline: 3px solid rgba(30,58,95,0.45); outline-offset: 2px; }

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

/* ---------- Hero ---------- */
.hero { background: var(--warm-100); }
.hero .content-wrapper { padding: 30px 0; align-items: flex-start; }
.hero nav[aria-label="Breadcrumb"] { font-size: 14px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
.hero nav[aria-label="Breadcrumb"] a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }

.trust-badges ul { display: flex; flex-wrap: wrap; gap: 10px; }
.trust-badges li { background: #FFFFFF; color: var(--primary); border: 1px solid var(--warm-200); border-radius: 999px; padding: 8px 12px; box-shadow: var(--shadow-sm); }

.supporting-links { color: var(--primary); display: flex; flex-wrap: wrap; gap: 8px; }
.supporting-links a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Generic Content Sections ---------- */
section .content-wrapper > h2 { margin-top: 10px; }
.text-section { display: flex; flex-direction: column; gap: 14px; }

.text-section ul, .text-section ol { padding-left: 18px; }
.text-section ul { list-style: disc inside; }
.text-section ol { list-style: decimal inside; }
.text-section li { margin-bottom: 8px; }
.text-section a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }

.stat-counters { display: flex; flex-wrap: wrap; gap: 14px; }
.stat-counters p { background: #FFFFFF; border: 1px solid var(--warm-200); border-radius: var(--radius-md); padding: 12px 14px; box-shadow: var(--shadow-sm); }
.stat-counters strong { font-size: 18px; color: var(--secondary); }

.callouts { display: flex; flex-direction: column; gap: 12px; }
.callouts p { background: #FFFFFF; border-left: 5px solid var(--secondary); padding: 12px 14px; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }

/* ---------- Testimonials (Readable contrast) ---------- */
.testimonial-card p { color: var(--text); }
.testimonial-card strong { color: var(--primary); }

/* ---------- Footer ---------- */
footer { background: #FFFFFF; border-top: 1px solid var(--warm-200); margin-top: 40px; }
footer .content-wrapper { padding: 24px 0; gap: 20px; }
.brand-footer { display: flex; flex-direction: column; gap: 10px; }
.brand-footer img { height: 40px; width: auto; }
.footer-nav, .legal-links { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-nav a, .legal-links a { color: var(--primary); padding: 6px 8px; border-radius: 8px; }
.footer-nav a:hover, .legal-links a:hover { background: var(--warm-100); }
.contact-snippet { display: flex; flex-direction: column; gap: 8px; color: var(--muted); }
.newsletter-note { display: flex; flex-direction: column; gap: 12px; }
footer .container:last-of-type { justify-content: center; }
footer .container:last-of-type p { color: var(--muted); padding: 10px 0 20px; }

/* ---------- Navigation (Desktop breakpoint applied later) ---------- */
/* Mobile overlay menu */
.mobile-menu {
  position: fixed; inset: 0; /* top/right/bottom/left */
  background: rgba(30,58,95,0.25);
  display: flex; /* overlay as flex */
  justify-content: flex-end; /* slide-in panel on the right */
  transform: translateX(100%);
  transition: transform .35s ease, opacity .3s ease;
  opacity: 0;
  z-index: 1200;
  pointer-events: none;
}
.mobile-menu.open, .mobile-menu.active, .mobile-menu.is-open { transform: translateX(0); opacity: 1; pointer-events: auto; }

.mobile-nav {
  background: #FFFFFF;
  width: 85vw;
  max-width: 420px;
  height: 100%;
  display: flex; flex-direction: column; gap: 6px;
  padding: 16px;
  box-shadow: var(--shadow-md);
  border-top-left-radius: var(--radius-lg);
  border-bottom-left-radius: var(--radius-lg);
}
.mobile-menu-close { align-self: flex-end; font-size: 22px; color: var(--primary); padding: 6px 8px; border-radius: 8px; }
.mobile-menu-close:hover { background: var(--warm-100); }
.mobile-nav a {
  padding: 12px 10px;
  color: var(--primary);
  border-radius: 10px;
  transition: background-color .2s ease, transform .15s ease;
}
.mobile-nav a:hover { background: var(--warm-100); transform: translateX(2px); }

/* ---------- Links and micro-interactions ---------- */
a:hover { color: var(--primary); }
a:focus-visible { outline: 3px solid rgba(195,145,43,0.5); border-radius: 6px; }

/* ---------- Cards (generic) ---------- */
.card:hover { box-shadow: var(--shadow-md); }

/* ---------- Icons inline with text ---------- */
.text-section a img { display: inline-block; vertical-align: middle; margin-right: 6px; height: 18px; width: 18px; }

/* ---------- Cookie Consent Banner ---------- */
#cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: #FFFFFF;
  border-top: 1px solid var(--warm-200);
  box-shadow: 0 -6px 16px rgba(0,0,0,0.08);
  z-index: 1300;
  display: flex; /* Flex container requirement */
  justify-content: center;
  opacity: 0; transform: translateY(20px);
  transition: transform .3s ease, opacity .3s ease;
  pointer-events: none;
}
#cookie-banner.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
#cookie-banner .banner-inner {
  max-width: 1200px; width: 100%; padding: 14px 20px;
  display: flex; flex-direction: column; gap: 12px;
}
#cookie-banner p { color: var(--text); }
#cookie-banner .actions { display: flex; flex-wrap: wrap; gap: 10px; }
#cookie-banner .btn { padding: 10px 14px; }
#cookie-banner .btn.reject { background: #FFFFFF; border: 1px solid var(--primary); color: var(--primary); }
#cookie-banner .btn.reject:hover { background: var(--accent); }
#cookie-banner .btn.settings { background: var(--secondary); color: #1B1B1B; }

/* Cookie Preferences Modal */
#cookie-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.35);
  display: none; /* toggled to flex when open */
  align-items: center; justify-content: center;
  z-index: 1400;
}
#cookie-modal.open { display: flex; }
.cookie-modal-content {
  background: #FFFFFF; width: 92vw; max-width: 720px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 20px;
  display: flex; flex-direction: column; gap: 16px;
}
.cookie-modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-categories { display: flex; flex-direction: column; gap: 12px; }
.cookie-category { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--warm-200); border-radius: var(--radius-md); background: var(--accent); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.toggle { display: inline-flex; align-items: center; gap: 8px; }
/* Simple toggle switch */
.switch { position: relative; width: 44px; height: 24px; background: #D1D5DB; border-radius: 999px; transition: background .2s ease; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #FFFFFF; border-radius: 50%; box-shadow: var(--shadow-sm); transition: transform .2s ease; }
input[type="checkbox"].switch-input { position: absolute; opacity: 0; width: 44px; height: 24px; }
input[type="checkbox"].switch-input:checked + .switch { background: #8BC34A; }
input[type="checkbox"].switch-input:checked + .switch::after { transform: translateX(20px); }

/* ---------- Utility & Helpers ---------- */
.hidden { display: none !important; }
.muted { color: var(--muted); }
.wrap { display: flex; flex-wrap: wrap; gap: 12px; }
.centered { display: flex; align-items: center; justify-content: center; }

/* ---------- Responsive (Mobile-first) ---------- */
@media (min-width: 480px) {
  h1 { font-size: 36px; }
  h2 { font-size: 26px; }
  .hero .content-wrapper { padding: 36px 0; }
}

@media (min-width: 768px) {
  body { font-size: 17px; }
  h1 { font-size: 44px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }

  /* Header: show desktop nav */
  .main-nav { display: flex; }
  .header-ctas { display: flex; }
  .mobile-menu-toggle { display: none; }

  /* Hero alignment */
  .hero .content-wrapper { align-items: flex-start; }

  /* Text-image sections side-by-side on desktop */
  .text-image-section { flex-direction: row; }

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

  /* Cookie banner actions inline */
  #cookie-banner .banner-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

@media (min-width: 1024px) {
  body { font-size: 18px; }
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }

  header .content-wrapper { gap: 22px; }
  .main-nav { gap: 18px; }
}

/* ---------- Page-specific Enhancements ---------- */
/* Breadcrumbs spacing across pages */
nav[aria-label="Breadcrumb"] { display: flex; flex-wrap: wrap; gap: 6px; color: var(--muted); }
nav[aria-label="Breadcrumb"] a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }

/* Highlight sections alternation for breathing room */
main > section:nth-of-type(odd) { background: #FFFFFF; }
main > section:nth-of-type(even) { background: var(--warm-100); }
main > section .container { padding: 24px 0; }

/* Stats and testimonials grouping spacing */
.testimonial-card + .testimonial-card { margin-top: 12px; }

/* ---------- Accessibility & Motion Preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------- Specific Class Styling from HTML ---------- */
/* Header CTAs inside footer newsletter note */
.newsletter-note .cta-group .btn { padding: 10px 14px; }

/* Support lists in hero */
.supporting-links { font-size: 14px; }

/* Legal links area */
.legal-links { display: flex; flex-wrap: wrap; gap: 10px; }

/* Ensure adequate spacing between all sections */
main section { padding: 20px 0; }

/* Content readability widths */
section .text-section { max-width: 900px; }

/* ---------- Additional Reusable Patterns (future-proof) ---------- */
/* Feature list as friendly cards */
.features { display: flex; flex-wrap: wrap; gap: 20px; }
.feature-card { background: #FFFFFF; border: 1px solid var(--warm-200); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.feature-card:hover { box-shadow: var(--shadow-md); }

/* Content split utility (flex only) */
.split { display: flex; flex-wrap: wrap; gap: 20px; }
.split > * { flex: 1 1 280px; }

/* ---------- Header link refined hover underline (warm-friendly) ---------- */
.main-nav a { position: relative; }
.main-nav a::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 6px; height: 2px; background: var(--secondary); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; border-radius: 2px; }
.main-nav a:hover::after { transform: scaleX(1); }

/* ---------- Ensure no overlap and consistent gaps ---------- */
section .content-wrapper { gap: 20px; }
.card, .testimonial-card, .callouts p { margin-bottom: 20px; }

/* ---------- Dark text on light bg for testimonials (contrast) ---------- */
.testimonial-card { background: #FFFFFF; color: #1F2937; }

/* ---------- Tables (if ever appear) kept simple and flex-wrapped ---------- */
.table-flex { display: flex; flex-direction: column; gap: 10px; }
.table-flex .row { display: flex; flex-wrap: wrap; gap: 10px; padding: 8px 10px; background: #FFFFFF; border: 1px solid var(--warm-200); border-radius: 8px; }
.table-flex .cell { flex: 1 1 140px; }

/* ---------- Hero CTA grouping alignment across pages ---------- */
.hero .cta-group .btn { min-width: 180px; }

/* ---------- Header compact on scroll (optional class) ---------- */
header.compact .content-wrapper { padding: 8px 0; }
.logo img { transition: transform .2s ease; }
header.compact .logo img { transform: scale(0.92); }

/* ---------- Print basics ---------- */
@media print {
  header, footer, #cookie-banner, #cookie-modal, .mobile-menu { display: none !important; }
  body { background: #FFFFFF; color: #000; }
}

/* ---------- End of file ---------- */
