/* =====================================================
   ImmoKompass Deutschland — style.css
   Design: monochrome_sophisticated (black/white/gray, dramatic contrast, elegant typography)
   Brand fonts respected; brand colors used for subtle focus/accents
   Mobile-first, flexbox-only layouts (NO CSS Grid/Columns)
   Includes: Mobile menu + Cookie banner/modal
   ===================================================== */

/* -----------------------------
   Reset & Base
----------------------------- */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Verdana, Geneva, Tahoma, sans-serif; color: #0B0B0B; background: #FFFFFF; line-height: 1.6; font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
:focus { outline: none; }
:focus-visible { outline: 2px solid #0F3D56; outline-offset: 2px; }

/* -----------------------------
   CSS Variables
----------------------------- */
:root {
  /* Monochrome palette */
  --bg: #FFFFFF;
  --bg-2: #F7F7F7; /* elevated light */
  --text: #0B0B0B; /* near-black */
  --text-2: #2A2A2A; /* dark gray */
  --muted: #6F6F6F; /* mid gray */
  --line: #E6E6E6; /* light line */
  --dark: #111111; /* dark surface */
  --darker: #0A0A0A; /* hero dark */
  --shadow: 0 8px 20px rgba(0,0,0,0.08);
  --shadow-strong: 0 16px 40px rgba(0,0,0,0.16);

  /* Brand (accents only) */
  --brand-primary: #0F3D56; /* deep blue */
  --brand-secondary: #2E7D6B; /* warm green */
  --brand-accent: #F4F7FB; /* very light */

  /* Typography scale */
  --fs-14: 14px;
  --fs-16: 16px;
  --fs-18: 18px;
  --fs-20: 20px;
  --fs-24: 24px;
  --fs-28: 28px;
  --fs-32: 32px;
  --fs-40: 40px;
  --fs-48: 48px;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 14px;
  --speed: 200ms;
}

/* -----------------------------
   Typography
----------------------------- */
h1, h2, h3, h4 { font-family: Georgia, 'Times New Roman', serif; color: var(--text); letter-spacing: 0.2px; line-height: 1.25; margin: 0; }
h1 { font-size: var(--fs-32); }
h2 { font-size: var(--fs-28); }
h3 { font-size: var(--fs-20); }
h4 { font-size: var(--fs-18); }
p { margin: 0; color: var(--text-2); }
small { font-size: var(--fs-14); color: var(--muted); }
.subheadline { font-size: var(--fs-18); color: #D0D0D0; }
.tagline { color: var(--muted); font-size: var(--fs-16); }

/* hierarchy spacing inside content blocks */
.content-wrapper > * + * { margin-top: 20px; }
.text-section > * + * { margin-top: 10px; }

/* Links visibility */
a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* -----------------------------
   Layout Containers (Flexbox-only)
----------------------------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; flex-direction: column; align-items: stretch; }
.content-wrapper { display: flex; flex-direction: column; align-items: flex-start; 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; display: flex; flex-direction: column; gap: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 20px; box-shadow: var(--shadow); transition: transform var(--speed) ease, box-shadow var(--speed) ease; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-strong); }
.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: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: var(--shadow); color: var(--text); }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* -----------------------------
   Header & Navigation
----------------------------- */
header { background: var(--bg); border-bottom: 1px solid var(--line); position: relative; z-index: 1000; }
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; }
.logo img { height: 36px; width: auto; }

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

.button-primary, .button-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 18px; border-radius: var(--radius-m); font-weight: 600; text-decoration: none; transition: transform var(--speed) ease, background var(--speed) ease, color var(--speed) ease, box-shadow var(--speed) ease; cursor: pointer; }
.button-primary { background: #0F0F10; color: #FFFFFF; border: 1px solid #0F0F10; box-shadow: 0 6px 14px rgba(0,0,0,0.12); }
.button-primary:hover { background: #1A1A1B; transform: translateY(-1px); box-shadow: var(--shadow-strong); }
.button-primary:focus-visible { box-shadow: 0 0 0 3px var(--brand-accent), 0 0 0 6px var(--brand-primary); }

.button-secondary { background: transparent; color: var(--text); border: 1px solid #1A1A1A; }
.button-secondary:hover { background: #111111; color: #FFFFFF; }
.button-secondary:focus-visible { box-shadow: 0 0 0 3px var(--brand-accent), 0 0 0 6px var(--brand-secondary); }

/* Hamburger button */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 20px; transition: background var(--speed) ease, color var(--speed) ease, transform var(--speed) ease; }
.mobile-menu-toggle:hover { background: var(--bg-2); transform: translateY(-1px); }

/* Mobile menu overlay */
.mobile-menu { position: fixed; inset: 0; background: rgba(10,10,10,0.98); color: #FFFFFF; transform: translateX(100%); transition: transform 300ms ease; display: flex; flex-direction: column; align-items: stretch; gap: 20px; padding: 20px; z-index: 2000; pointer-events: none; }
.mobile-menu.active { transform: translateX(0); pointer-events: auto; }
.mobile-menu-close { align-self: flex-end; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid #2A2A2A; background: transparent; color: #FFFFFF; font-size: 18px; }
.mobile-menu-close:hover { background: #1C1C1C; }
.mobile-nav { display: flex; flex-direction: column; gap: 8px; }
.mobile-nav a { display: flex; align-items: center; padding: 14px 12px; border-radius: var(--radius-s); color: #F0F0F0; border: 1px solid #202020; background: #121212; transition: background var(--speed) ease, transform var(--speed) ease; }
.mobile-nav a:hover { background: #171717; transform: translateX(2px); }

/* Hide scroll behind mobile nav when active */
body.menu-open { overflow: hidden; }

/* -----------------------------
   Hero Section (dramatic contrast)
----------------------------- */
.hero { background: var(--darker); color: #FFFFFF; padding: 60px 0; position: relative; }
.hero .subheadline { color: #CFCFCF; }
.hero h1 { color: #FFFFFF; }
.usp-list { display: flex; flex-direction: column; gap: 10px; list-style: none; padding: 0; margin: 0; color: #EDEDED; }
.usp-list li { display: flex; align-items: flex-start; gap: 10px; }
.usp-list li::before { content: "—"; color: #AFAFAF; }
.cta-group { display: flex; flex-wrap: wrap; gap: 12px; }

/* -----------------------------
   Generic Sections & Elements
----------------------------- */
section { padding: 40px 0; }
section:not(.hero) { background: var(--bg); }

/* Lists styling for clarity */
ul, ol { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
ul li, ol li { display: flex; align-items: flex-start; gap: 10px; color: var(--text-2); }
ul li::before { content: "–"; color: var(--muted); }
ol { counter-reset: item; }
ol li::before { counter-increment: item; content: counter(item) "."; color: var(--muted); min-width: 20px; text-align: right; }

/* Text sections as elegant cards */
.text-section { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 20px; box-shadow: var(--shadow); }
.text-section h3 { color: var(--text); }

/* Contact options */
.contact-options { display: flex; flex-direction: column; gap: 10px; }
.contact-options p { display: flex; align-items: center; gap: 10px; color: var(--text-2); }
.contact-options img { width: 18px; height: 18px; filter: grayscale(100%); opacity: 0.8; }

/* Footer */
footer { background: var(--dark); color: #EDEDED; padding: 40px 0 20px; }
footer .content-wrapper { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
footer p { color: #CFCFCF; }
.footer-nav, .footer-legal, .footer-cta { display: flex; flex-direction: column; gap: 10px; }
.footer-nav h3, .footer-legal h3 { color: #FFFFFF; font-size: var(--fs-18); }
.footer-nav ul, .footer-legal ul { display: flex; flex-direction: column; gap: 8px; }
.footer-nav a, .footer-legal a { color: #E6E6E6; padding: 6px 0; transition: color var(--speed) ease; }
.footer-nav a:hover, .footer-legal a:hover { color: #FFFFFF; text-decoration: none; }
footer .button-primary { background: #FFFFFF; color: #111111; border-color: #FFFFFF; }
footer .button-primary:hover { background: #EDEDED; }
footer .logo img { height: 32px; filter: invert(1);}

/* -----------------------------
   Utilities & Micro-interactions
----------------------------- */
.muted { color: var(--muted); }
.divider { width: 100%; height: 1px; background: var(--line); }
.shadow { box-shadow: var(--shadow); }
.rounded { border-radius: var(--radius-m); }

/* Card grid responsive using flex-basis */
.card-container .card { flex: 1 1 100%; }
.content-grid > * { flex: 1 1 100%; }

/* -----------------------------
   Testimonials (readable on light bg)
----------------------------- */
.testimonial-card p { color: var(--text-2); }
.testimonial-card strong { color: var(--text); }

/* -----------------------------
   Mobile Navigation Visibility
----------------------------- */
@media (max-width: 767px) {
  .main-nav { display: none; }
  .mobile-menu-toggle { display: inline-flex; }
}

/* -----------------------------
   Responsive (>=768px)
----------------------------- */
@media (min-width: 768px) {
  h1 { font-size: var(--fs-40); }
  h2 { font-size: var(--fs-32); }
  .logo img { height: 44px; }
  .main-nav { display: flex; }
  .mobile-menu-toggle { display: none; }
  .hero { padding: 90px 0; }
  .cta-group { gap: 14px; }
  .text-image-section { flex-direction: row; }
  .contact-options { flex-direction: row; flex-wrap: wrap; gap: 16px; }
  .card-container .card { flex: 1 1 calc(50% - 24px); }
  .content-grid > * { flex: 1 1 calc(48% - 10px); }
}

/* -----------------------------
   Responsive (>=1024px)
----------------------------- */
@media (min-width: 1024px) {
  h1 { font-size: var(--fs-48); }
  .card-container .card { flex: 1 1 calc(33.333% - 24px); }
  .content-grid > * { flex: 1 1 calc(31%); }
}

/* -----------------------------
   Accessibility States
----------------------------- */
button:focus-visible, a:focus-visible { outline: 2px solid var(--brand-primary); outline-offset: 2px; }

/* -----------------------------
   Cookie Consent Banner & Modal
----------------------------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; background: #121212; color: #FFFFFF; border-top: 1px solid #1F1F1F; padding: 16px 20px; display: flex; align-items: center; justify-content: center; z-index: 3000; transform: translateY(100%); transition: transform 250ms ease; }
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .cookie-inner { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; width: 100%; max-width: 1200px; }
.cookie-banner p { margin: 0; color: #EAEAEA; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: var(--radius-s); border: 1px solid #2A2A2A; background: #1A1A1A; color: #FFFFFF; cursor: pointer; transition: background var(--speed) ease, transform var(--speed) ease; }
.cookie-actions .btn:hover { background: #202020; transform: translateY(-1px); }
.cookie-actions .btn.primary { background: #FFFFFF; color: #0B0B0B; border-color: #FFFFFF; }
.cookie-actions .btn.secondary { background: transparent; }

/* Cookie settings modal */
.cookie-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.55); display: none; align-items: center; justify-content: center; z-index: 3500; }
.cookie-modal-overlay.show { display: flex; }
.cookie-modal { width: 92%; max-width: 680px; background: #FFFFFF; color: var(--text); border-radius: var(--radius-l); border: 1px solid var(--line); box-shadow: var(--shadow-strong); display: flex; flex-direction: column; gap: 20px; padding: 20px; }
.cookie-modal header { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.cookie-modal .modal-body { display: flex; flex-direction: column; gap: 14px; }
.cookie-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.cookie-row:last-child { border-bottom: 0; }

/* Toggle switch (pure CSS) */
.toggle { display: inline-flex; align-items: center; gap: 10px; }
.toggle .switch { width: 46px; height: 26px; border-radius: 100px; background: #D9D9D9; border: 1px solid #CFCFCF; position: relative; transition: background var(--speed) ease; }
.toggle .switch::after { content: ""; position: absolute; top: 50%; left: 3px; transform: translateY(-50%); width: 20px; height: 20px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0,0,0,0.2); transition: left var(--speed) ease, background var(--speed) ease; }
.toggle input { display: none; }
.toggle input:checked + .switch { background: #0F3D56; border-color: #0F3D56; }
.toggle input:checked + .switch::after { left: 23px; }

.cookie-modal .modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.cookie-modal .btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: var(--radius-s); border: 1px solid var(--line); background: var(--bg); color: var(--text); cursor: pointer; }
.cookie-modal .btn.primary { background: #111111; color: #FFFFFF; border-color: #111111; }
.cookie-modal .btn.secondary { background: transparent; }

/* -----------------------------
   Additional Responsive Tweaks
----------------------------- */
@media (min-width: 992px) {
  .cookie-banner .cookie-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* -----------------------------
   Fine-tuning for the provided pages
----------------------------- */
/* Make hero headings crisp and spacing consistent */
.hero .content-wrapper > * + * { margin-top: 16px; }

/* Ensure adequate spacing between section cards/testimonials */
.content-wrapper .testimonial-card + .testimonial-card { margin-top: 20px; }

/* Footer last row copyright alignment */
footer .content-wrapper:last-child { justify-content: center; }
footer .content-wrapper:last-child p { color: #BEBEBE; }

/* Ensure all interactive elements have pointer cursor */
button, .button-primary, .button-secondary, .mobile-nav a, .cookie-actions .btn, .cookie-modal .btn { cursor: pointer; }

/* -----------------------------
   Flex-only patterns for potential components
----------------------------- */
/* Feature list container example */
.features { display: flex; flex-wrap: wrap; gap: 20px; }
.features > * { flex: 1 1 100%; }
@media (min-width: 768px) { .features > * { flex: 1 1 calc(50% - 20px); } }
@media (min-width: 1024px) { .features > * { flex: 1 1 calc(33.333% - 20px); } }

/* Text-image universal section behavior */
@media (max-width: 768px) { .text-image-section { flex-direction: column; align-items: center; } }

/* -----------------------------
   Contrast & Readability guarantees
----------------------------- */
/* Ensure testimonial readability on light background */
.testimonial-card, .testimonial-card p, .testimonial-card strong { color: #0B0B0B; }

/* -----------------------------
   Subtle brand accent lines (monochrome-forward)
----------------------------- */
hr, .accent-line { display: block; width: 100%; height: 2px; background: #1A1A1A; border: none; }

/* -----------------------------
   Lists inside dark hero
----------------------------- */
.hero ul li { color: #EAEAEA; }
.hero ul li::before { color: #AFAFAF; }

/* -----------------------------
   Prevent overlapping — spacing safeguards
----------------------------- */
section + section { margin-top: 20px; }
.content-wrapper > .card, .content-wrapper > .text-section, .content-wrapper > .testimonial-card { margin-top: 0; }

/* -----------------------------
   Print basics
----------------------------- */
@media print { .mobile-menu, .mobile-menu-toggle, .cookie-banner, .cookie-modal-overlay { display: none !important; } a { text-decoration: underline; } }
