/* =========================================================
   ImmoKompass Deutschland – Luxury Premium CSS (Flexbox-only)
   - Aesthetic: gold accents, sophisticated colors, refined details
   - Mobile-first, responsive, accessible
   - NO Grid/Columns; FLEXBOX ONLY
   - Includes mobile menu + cookie consent banner/modal
   ========================================================= */

/* ---------------------------
   CSS Reset / Normalize
---------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { background: none; border: none; cursor: pointer; font: inherit; }
:focus-visible { outline: 2px solid #C6A15B; outline-offset: 2px; }

/* ---------------------------
   Design Tokens (CSS Vars)
---------------------------- */
:root {
  --brand-primary: #0F3D5E; /* deep, sophisticated blue */
  --brand-secondary: #2E7D6B; /* supportive green */
  --brand-accent: #F5F7FA; /* light background */
  --gold: #C6A15B; /* refined gold accent */
  --gold-strong: #B38A3A; /* deeper gold for hovers */
  --ink: #1A1F24; /* rich text color */
  --ink-soft: #2C343C;
  --muted: #8A93A3; /* secondary text */
  --surface: #FFFFFF; /* cards */
  --surface-alt: #F2F4F7; /* alt bg near accent */
  --shadow: rgba(15, 20, 30, 0.08);
  --shadow-strong: rgba(15, 20, 30, 0.14);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --container-max: 1180px;
}

/* ---------------------------
   Base Typography & Body
---------------------------- */
body {
  font-family: Verdana, "Segoe UI", Roboto, Arial, sans-serif; /* brand body */
  color: var(--ink);
  background-color: var(--brand-accent);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4 {
  font-family: "Trebuchet MS", Tahoma, Arial, sans-serif; /* brand display */

  letter-spacing: -0.2px;
}

h1 { font-size: 32px; line-height: 1.2; margin-bottom: 16px; }
h2 { font-size: 24px; line-height: 1.25; margin-bottom: 16px; position: relative; }
h3 { font-size: 18px; line-height: 1.3; margin-bottom: 10px; }

p, li { font-size: 16px; }
.subheadline { color: var(--ink-soft); font-size: 18px; margin-bottom: 18px; }

/* Gold underline accent on sections */
h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  background-color: var(--gold);
  margin-top: 10px;
}

/* ---------------------------
   Layout Wrappers (Flexbox-only)
---------------------------- */
.container {
  display: flex; /* FLEX ONLY */
  flex-direction: column; /* mobile-first */
  align-items: center; /* center inner wrapper */
  width: 100%;
  padding: 0 20px;
}

.content-wrapper {
  display: flex; /* FLEX ONLY */
  flex-direction: column; /* mobile-first */
  gap: 20px;
  width: 100%;
  max-width: var(--container-max);
}

/* MANDATORY spacing pattern class (also apply to generic section) */
.section { margin-bottom: 60px; padding: 40px 20px; }
section { margin-bottom: 60px; padding: 40px 0; }

/* Ensure minimum spacing between content cards/blocks */
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: var(--surface); border: 1px solid #E7EBF0; border-radius: var(--radius-md); box-shadow: 0 6px 20px var(--shadow); padding: 20px; }
.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: 1px solid #E6E8ED; border-left: 4px solid var(--gold); border-radius: var(--radius-md); box-shadow: 0 6px 18px var(--shadow); color: #0A0D12; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* ---------------------------
   Header & Navigation
---------------------------- */
header {
  position: sticky; top: 0; z-index: 50;
  background: #FFFFFF;
  border-bottom: 1px solid rgba(198,161,91,0.28);
  box-shadow: 0 2px 10px var(--shadow);
}

header .content-wrapper {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 16px;
  padding: 12px 0;
}

.logo img { height: 36px; width: auto; }

.main-nav { display: none; gap: 20px; align-items: center; }
.main-nav a {
  color: var(--ink);
  padding: 8px 10px;
  border-radius: 6px;
  position: relative;
  transition: color 200ms ease;
}
.main-nav a::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 6px; height: 2px; background: transparent; transition: background-color 200ms ease, transform 200ms ease; transform: scaleX(0);
}
.main-nav a:hover { color: var(--brand-primary); }
.main-nav a:hover::after { background: var(--gold); transform: scaleX(1); }

.cta-group { display: none; gap: 12px; align-items: center; }
.cta-group a {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--gold);
  color: var(--ink);
  background: #FFFFFF;
  box-shadow: 0 4px 12px var(--shadow);
  transition: transform 200ms ease, box-shadow 200ms ease, background-color 200ms ease, color 200ms ease;
}
.cta-group a:hover { transform: translateY(-1px); box-shadow: 0 8px 22px var(--shadow-strong); background: var(--gold); color: #0E1014; }

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 8px;
  color: var(--ink);
  border: 1px solid rgba(198,161,91,0.45);
  background: #FFF;
  box-shadow: 0 3px 10px var(--shadow);
  transition: background-color 150ms ease, transform 150ms ease;
}
.mobile-menu-toggle:active { transform: scale(0.98); }

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed; top: 0; right: 0; bottom: 0; width: 86%; max-width: 360px;
  display: flex; flex-direction: column; gap: 16px; align-items: flex-start;
  background: #0F1A24; color: #EAEFF6;
  padding: 20px; box-shadow: -8px 0 24px rgba(0,0,0,0.3);
  transform: translateX(100%);
  transition: transform 280ms ease;
  z-index: 9999;
  border-left: 1px solid rgba(198,161,91,0.35);
}
.mobile-menu.open, .mobile-menu.active, .mobile-menu.is-open { transform: translateX(0); }
.mobile-menu-close {
  align-self: flex-end; width: 38px; height: 38px; border-radius: 8px;
  border: 1px solid rgba(198,161,91,0.45); color: #EAEFF6;
}
.mobile-nav { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.mobile-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 10px; border-radius: 8px;
  color: #EAEFF6;
  border: 1px solid transparent;
  transition: background-color 150ms ease, border-color 150ms ease;
}
.mobile-nav a:hover { background: rgba(255,255,255,0.06); border-color: rgba(198,161,91,0.35); }

/* ---------------------------
   Hero Sections (Premium look)
---------------------------- */
.hero { background: #0E2F48; color: #F8FAFC; border-bottom: 2px solid var(--gold); }
.hero .content-wrapper { padding: 24px 0; }
.hero h1, .hero .subheadline { color: #F8FAFC; }
.hero .button-row a { background: var(--gold); color: #111316; border-color: var(--gold); }
.hero .button-row a:hover { background: var(--gold-strong); border-color: var(--gold-strong); color: #0A0C0F; }

/* ---------------------------
   Buttons & Links (contextual)
---------------------------- */
.button-row { display: flex; flex-wrap: wrap; gap: 12px; }
.button-row a,
.content-wrapper > a,
.link-list a,
.testimonial-card a {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--brand-primary);
  background: #FFFFFF;
  color: var(--brand-primary);
  font-weight: 600;
  box-shadow: 0 4px 12px var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}
.button-row a:hover,
.content-wrapper > a:hover,
.link-list a:hover,
.testimonial-card a:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px var(--shadow-strong);
  background: var(--brand-primary);
  color: #FFFFFF;
  border-color: var(--brand-primary);
}

/* Secondary (ghost) style for subtle links inside content areas */
.link-list { display: flex; flex-wrap: wrap; gap: 12px; }
.link-list a { border-color: var(--gold); color: var(--ink); }
.link-list img { width: 18px; height: 18px; margin-right: 6px; }

/* ---------------------------
   Content Blocks
---------------------------- */
.text-section { display: flex; flex-direction: column; gap: 10px; }
.text-section p img, .text-section li img { width: 18px; height: 18px; margin-right: 8px; display: inline-block; vertical-align: middle; }

.trust-row { display: flex; flex-wrap: wrap; gap: 24px; }
.trust-row .text-section { flex: 1 1 260px; background: var(--surface); border: 1px solid #E7EBF0; border-left: 4px solid var(--gold); border-radius: var(--radius-md); padding: 14px; box-shadow: 0 4px 12px var(--shadow); }
.trust-row p { display: flex; align-items: center; gap: 8px; }
.trust-row ul { display: flex; flex-direction: column; gap: 6px; }
.trust-row li strong { color: var(--brand-primary); }

ol, ul { display: flex; flex-direction: column; gap: 8px; padding-left: 0; }

/* Disclaimers */
.disclaimer { font-size: 14px; color: var(--muted); }

/* ---------------------------
   Cards & Testimonials
---------------------------- */
.card:hover { box-shadow: 0 10px 24px var(--shadow-strong); }

.testimonial-card p { color: #0A0D12; }
.testimonial-card strong { color: var(--brand-primary); }

/* ---------------------------
   Footer (elevated, premium)
---------------------------- */
footer { background: #0B2438; color: #EAF1F7; border-top: 2px solid var(--gold); }
footer .content-wrapper { padding: 24px 0; }
footer a { color: #EAF1F7; text-decoration: none; }
footer a:hover { color: var(--gold); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px; }
.brand { display: flex; flex-direction: column; gap: 10px; }
.brand img { height: 34px; }

/* ---------------------------
   Accessibility & Micro-interactions
---------------------------- */
a, button { transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease; }
::selection { background: var(--gold); color: #0B1020; }

/* ---------------------------
   Cookie Consent (Banner & Modal)
---------------------------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; flex-direction: column; gap: 14px;
  background: #0F1A24; color: #EAF1F7;
  padding: 16px 20px; border-top: 2px solid var(--gold);
  box-shadow: 0 -8px 24px rgba(0,0,0,0.25);
  transform: translateY(100%);
  transition: transform 280ms ease; z-index: 9998;
}
.cookie-banner.show, .cookie-banner.open, .cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner .cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-banner .btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 999px; font-weight: 600; }
.cookie-banner .btn-accept { background: var(--gold); color: #121417; border: 1px solid var(--gold); }
.cookie-banner .btn-accept:hover { background: var(--gold-strong); border-color: var(--gold-strong); }
.cookie-banner .btn-reject { background: transparent; color: #EAF1F7; border: 1px solid rgba(198,161,91,0.6); }
.cookie-banner .btn-reject:hover { background: rgba(198,161,91,0.12); }
.cookie-banner .btn-settings { background: #1A2834; color: #EAF1F7; border: 1px solid rgba(198,161,91,0.4); }
.cookie-banner .btn-settings:hover { background: #213346; }

/* Cookie Preferences Modal */
.cookie-modal {
  position: fixed; inset: 0; display: none; align-items: center; justify-content: center; padding: 20px; z-index: 10000;
}
.cookie-modal.open, .cookie-modal.active, .cookie-modal.is-open { display: flex; }
.cookie-modal .overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }
.cookie-modal .dialog {
  position: relative; display: flex; flex-direction: column; gap: 16px;
  width: 100%; max-width: 560px; background: #FFFFFF; color: var(--ink);
  border-radius: var(--radius-lg);
  border: 1px solid #E7EBF0; box-shadow: 0 16px 40px rgba(0,0,0,0.25);
  padding: 20px;
}
.cookie-modal .dialog h3 { margin-top: 8px; }
.cookie-modal .dialog .rows { display: flex; flex-direction: column; gap: 12px; }
.cookie-modal .dialog .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border: 1px solid #ECEFF4; border-radius: 10px; }
.cookie-modal .dialog .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: 999px; font-weight: 600; border: 1px solid var(--brand-primary); color: var(--brand-primary); background: #FFF; }
.cookie-modal .btn:hover { background: var(--brand-primary); color: #FFF; }
.cookie-modal .btn-primary { background: var(--gold); color: #111316; border-color: var(--gold); }
.cookie-modal .btn-primary:hover { background: var(--gold-strong); border-color: var(--gold-strong); }

/* ---------------------------
   Forms (generic minimal)
---------------------------- */
input, select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 8px;
  border: 1px solid #DDE3EA; background: #FFFFFF; color: var(--ink);
}
label { font-size: 14px; color: var(--ink-soft); }

/* ---------------------------
   Utilities
---------------------------- */
.max-w { max-width: var(--container-max); }
.muted { color: var(--muted); }
.hr { height: 1px; background: #E7EBF0; }

/* ---------------------------
   Responsive Adjustments
---------------------------- */
@media (min-width: 600px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  .hero .content-wrapper { padding: 36px 0; }
}

@media (min-width: 768px) {
  /* Show desktop nav */
  .main-nav { display: flex; }
  .cta-group { display: flex; }
  .mobile-menu-toggle { display: none; }

  /* Sections with side-by-side capability */
  .text-image-section { flex-direction: row; }
}

@media (min-width: 992px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  .content-wrapper { gap: 24px; }
  .button-row { gap: 14px; }
}

/* ---------------------------
   Page-specific fine-tuning
---------------------------- */
/* Index specific trust-row spacing inside hero */
.hero .trust-row .text-section { background: rgba(255,255,255,0.06); border-color: rgba(198,161,91,0.65); color: #EAF1F7; }
.hero .trust-row p, .hero .trust-row li, .hero .trust-row strong { color: #EAF1F7; }
.hero .trust-row strong { color: var(--gold); }

/* Footer blocks spacing */
footer .text-section { gap: 8px; }

/* Lists inside content with subtle markers for premium look */
.content-wrapper ul li, .content-wrapper ol li { position: relative; padding-left: 0; }
.content-wrapper ul li::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); margin-right: 10px; vertical-align: middle;
}
.content-wrapper ol { counter-reset: step; }
.content-wrapper ol li { counter-increment: step; }
.content-wrapper ol li::before {
  content: counter(step) "."; display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 999px; background: #FFF; color: var(--brand-primary);
  border: 1px solid var(--gold); font-size: 12px; margin-right: 10px;
}

/* Ensure minimum 20px margin between block elements */
.content-wrapper > * + * { margin-top: 8px; }

/* Images within text paragraphs inline alignment */
.text-section p { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------------------------
   Contrast rules for testimonials/reviews (dark text on light bg)
---------------------------- */
.testimonial-card { background: #FFFFFF; color: #111; }
.testimonial-card p { color: #111; }

/* ---------------------------
   Misc small details for luxury feel
---------------------------- */
/* Fine hairline on headings wrapper */
.content-wrapper h2 { padding-top: 6px; }

/* Elegant borders for inline contact rows */
.content-wrapper a[href^="tel:"],
.content-wrapper a[href^="mailto:"] {
  border-bottom: 1px solid rgba(198,161,91,0.35);
  padding-bottom: 1px;
}
.content-wrapper a[href^="tel:"]:hover,
.content-wrapper a[href^="mailto:"]:hover { border-color: var(--gold); }

/* Ensure all flex containers don't overlap and have gaps */
.content-wrapper, .content-grid, .card-container, .button-row, .footer-nav, .mobile-nav, .cookie-banner .cookie-actions, .cookie-modal .dialog .rows { gap: 20px; }

/* Prevent overlaps with adequate spacing */
section .card, section .testimonial-card, section .text-section { margin-bottom: 20px; }

/* Decorative borders (allowed) */
.hero { position: relative; }
.hero::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--gold); opacity: 0.75; }

/* End */
