/* =============================
   Luxury Premium Style - ImmoKauf Navigator Deutschland
   Mobile-first, Flexbox-only, No Grid/Columns
   ============================= */

/* CSS Reset & Normalize */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
img, svg { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { margin: 0 0 16px 24px; padding: 0; }
button { font: inherit; background: none; border: none; padding: 0; cursor: pointer; }
:focus { outline: none; }
:focus-visible { outline: 2px solid #D4AF37; outline-offset: 2px; }

/* Theme Variables */
:root {
  --primary: #0B3D91;         /* Brand Navy */
  --secondary: #1F7A63;       /* Teal */
  --accent: #F5F7FB;          /* Light Accent */
  --gold: #D4AF37;            /* Luxury Gold */
  --gold-soft: #C9A54A;       /* Softer Gold */
  --text: #1A1A1A;            /* Body Text */
  --muted: #5A5F6A;           /* Muted */
  --border: #E6E6EA;          /* Borders */
  --surface: #FFFFFF;         /* Cards & Panels */
  --surface-alt: #FAFAFC;     /* Subtle alt */
  --shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* Typography */
body {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  color: var(--text);
  background: var(--surface);
  line-height: 1.6;
  letter-spacing: 0.2px;
  font-size: 16px;
}
h1, h2, h3, h4 {
  font-family: Georgia, "Times New Roman", serif;
  color: #0F1220;
  line-height: 1.25;
  margin: 0 0 12px 0;
}
h1 { font-size: 32px; font-weight: 700; letter-spacing: 0.2px; }
h2 { font-size: 24px; font-weight: 700; }
h3 { font-size: 18px; font-weight: 700; }
.subheadline { color: var(--muted); font-size: 18px; margin: 8px 0 0 0; }
.microcopy { font-size: 14px; color: var(--muted); }

/* Global Layout */
.container {
  width: 100%;
  padding: 0 16px;
  display: flex;               /* Flexbox only */
  justify-content: center;
}
.content-wrapper {
  width: 100%;
  max-width: 1140px;
  display: flex;
  flex-direction: column;      /* mobile-first */
  gap: 20px;
}
section { margin-bottom: 60px; padding: 40px 0; }

/* Mandatory spacing classes (as provided) */
.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; }

/* Header */
header {
  position: relative;
  z-index: 1000;
  background: var(--surface);
  border-bottom: 2px solid rgba(212,175,55,0.2); /* subtle gold line */
}
header .content-wrapper {
  flex-direction: row;         /* align header items horizontally on all sizes */
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
}
.logo img { height: 36px; }

/* Main Navigation */
.main-nav { display: none; gap: 20px; align-items: center; }
.main-nav a {
  color: #111827;
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: 2px solid transparent;
  transition: color .25s ease, border-color .25s ease;
}
.main-nav a:hover { color: var(--primary); border-color: var(--gold); }

/* Header CTAs */
.header-cta { display: none; gap: 12px; align-items: center; }
.header-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--gold);
  font-weight: 700;
  transition: background-color .25s ease, color .25s ease, box-shadow .25s ease, transform .08s ease;
}
.header-cta a:first-child {
  background: var(--primary);
  color: #fff;
  border-color: var(--gold);
}
.header-cta a:first-child:hover { box-shadow: 0 6px 18px rgba(11,61,145,0.25); transform: translateY(-1px); }
.header-cta a:nth-child(2) {
  background: transparent;
  color: var(--primary);
}
.header-cta a:nth-child(2):hover { background: rgba(212,175,55,0.08); }

/* Mobile Burger */
.mobile-menu-toggle {
  display: inline-flex;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--gold);
  color: #111827;
  background: var(--surface);
  transition: background-color .25s ease, transform .08s ease;
}
.mobile-menu-toggle:hover { background: rgba(212,175,55,0.08); }
.mobile-menu-toggle:active { transform: scale(0.98); }

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(8, 12, 22, 0.92);
  transform: translateX(100%);
  transition: transform .35s ease;
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 20px;
  z-index: 1200;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-close {
  position: absolute; top: 14px; right: 14px;
  width: 44px; height: 44px;
  border-radius: 8px;
  border: 1px solid var(--gold);
  background: rgba(255,255,255,0.06);
  color: #fff;
}
.mobile-nav { display: flex; flex-direction: column; gap: 12px; margin-top: 40px; }
.mobile-nav a {
  color: #fff;
  font-size: 18px; font-weight: 600;
  padding: 12px 14px;
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  transition: background-color .25s ease, transform .08s ease;
}
.mobile-nav a:hover { background: rgba(212,175,55,0.12); transform: translateX(2px); }

/* Hero Sections */
section[aria-label="Hero"] {
  background: var(--accent);
  border-top: 3px solid rgba(212,175,55,0.35);
  border-bottom: 1px solid var(--border);
}
section[aria-label="Hero"] .content-wrapper { padding: 14px 0; }
section[aria-label="Hero"] h1 { color: #0B2B6B; }

/* Text Blocks */
.text-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.text-section p { margin: 0; }

/* Button-like links inside immediate text sections */
.text-section > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--gold);
  font-weight: 700;
  transition: background-color .25s ease, color .25s ease, box-shadow .25s ease, transform .08s ease;
}
.text-section > a:first-of-type { background: var(--secondary); color: #fff; border-color: var(--gold); }
.text-section > a:first-of-type:hover { box-shadow: 0 6px 18px rgba(31,122,99,0.25); transform: translateY(-1px); }
.text-section > a + a { background: transparent; color: var(--primary); }
.text-section > a + a:hover { background: rgba(212,175,55,0.08); }

/* Inline links inside paragraphs remain clean with premium underline */
.text-section p a { color: var(--primary); border-bottom: 1px solid rgba(212,175,55,0.6); padding-bottom: 1px; }
.text-section p a:hover { color: #092e6e; border-color: var(--gold); }

/* Lists with refined gold markers */
.text-section ul, .text-section ol { margin-left: 0; padding-left: 0; display: flex; flex-direction: column; gap: 8px; }
.text-section ul li, .text-section ol li { list-style: none; position: relative; padding-left: 22px; }
.text-section ul li::before {
  content: "";
  position: absolute; left: 0; top: 9px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 2px rgba(212,175,55,0.25);
}
.text-section ol { counter-reset: lux; }
.text-section ol li { counter-increment: lux; }
.text-section ol li::before {
  content: counter(lux) ".";
  position: absolute; left: 0; top: 0;
  color: var(--gold); font-weight: 700;
}

/* Testimonials - ensure light background and dark text for accessibility */
.testimonial-card {
  background: #FFFFFF;
  border: 1px solid rgba(212,175,55,0.35);
  border-radius: 12px;
  box-shadow: var(--shadow);
  color: #111;
}
.testimonial-card p { margin: 0; }
.testimonial-card strong { color: #0B2B6B; }

/* Generic Card Styles (for future content) */
.card {
  background: var(--surface);
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
}

/* Feature Items */
.feature-item h3 { color: #0B2B6B; }

/* Footer */
footer {
  background: #0B3D91;
  color: #F6F7FB;
  border-top: 3px solid rgba(212,175,55,0.4);
}
footer .content-wrapper { padding: 24px 0; gap: 16px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-nav a { color: #F6F7FB; opacity: 0.9; border-bottom: 1px solid transparent; }
.footer-nav a:hover { opacity: 1; border-color: rgba(212,175,55,0.7); }
footer a { color: #F6F7FB; }

/* Cookie Consent Banner */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px;
  background: #FFFFFF;
  color: var(--text);
  border: 1px solid rgba(212,175,55,0.35);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.18);
  padding: 16px;
  z-index: 1500;
  display: flex; flex-direction: column; gap: 12px;
  transform: translateY(120%);
  transition: transform .35s ease;
}
.cookie-banner.show { 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: 8px; font-weight: 700; border: 1px solid var(--gold); }
.cookie-banner .btn-accept { background: var(--secondary); color: #fff; }
.cookie-banner .btn-reject { background: transparent; color: var(--primary); }
.cookie-banner .btn-settings { background: rgba(212,175,55,0.08); color: #1A1A1A; }
.cookie-banner .btn:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.08); }

/* Cookie Preferences Modal */
.cookie-modal-overlay {
  position: fixed; inset: 0; background: rgba(8,12,22,0.6); z-index: 1600;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.cookie-modal-overlay.open { display: flex; }
.cookie-modal {
  width: 100%; max-width: 680px; background: #fff; color: var(--text);
  border: 1px solid rgba(212,175,55,0.4); border-radius: 12px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 16px; padding: 20px;
  transform: translateY(12px); opacity: 0; transition: transform .25s ease, opacity .25s ease;
}
.cookie-modal-overlay.open .cookie-modal { transform: translateY(0); opacity: 1; }
.cookie-modal .cookie-modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal .cookie-groups { display: flex; flex-direction: column; gap: 12px; }
.cookie-modal .cookie-group { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; }
.cookie-modal .cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* Toggle (basic) */
.toggle { display: inline-flex; align-items: center; gap: 10px; }
.toggle input[type="checkbox"] { appearance: none; width: 44px; height: 24px; border-radius: 999px; background: #D1D5DB; position: relative; transition: background-color .2s ease; }
.toggle input[type="checkbox"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s ease; }
.toggle input[type="checkbox"]:checked { background: var(--secondary); }
.toggle input[type="checkbox"]:checked::after { transform: translateX(20px); }

/* Utility & Micro-interactions */
.shadow { box-shadow: var(--shadow); }
.divider { height: 1px; background: linear-gradient(90deg, rgba(212,175,55,0.0), rgba(212,175,55,0.6), rgba(212,175,55,0.0)); }
.badge-gold { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; font-size: 12px; border: 1px solid var(--gold); border-radius: 999px; background: rgba(212,175,55,0.08); color: #6B5B22; }

/* Accessibility & Contrast in testimonials/reviews */
[aria-label*="Erfahrungen"], [aria-label*="Kundenstimmen"] { background: var(--surface-alt); }

/* Forms (basic future-proofing) */
input, select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,0.2); }

/* Footer social line spacing as text-section */
.text-section[aria-label="Social Links"] { flex-direction: row; flex-wrap: wrap; gap: 8px; }

/* Ensure adequate spacing between stacked elements */
.content-wrapper > * + * { margin-top: 0; }

/* Responsive - Tablet and Up */
@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  .content-wrapper { gap: 24px; }
  .text-image-section { flex-direction: row; align-items: center; }
}

/* Responsive - Desktop */
@media (min-width: 992px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  .main-nav { display: flex; }
  .header-cta { display: flex; }
  .mobile-menu-toggle { display: none; }
}

/* Additional Flex Layout Helpers (no grid) */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-row { display: flex; flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-20 { gap: 20px; }

/* Page-specific subtle touches */
[aria-label="Kontakt-CTA"], [aria-label="Kontakt CTA"], [aria-label="Kontakt aufnehmen"], [aria-label="Finanzierungs-Check"], [aria-label="Kontakt-CTA"] {
  background: linear-gradient(0deg, rgba(212,175,55,0.06), rgba(212,175,55,0.06));
  border-top: 1px solid rgba(212,175,55,0.35);
  border-bottom: 1px solid rgba(212,175,55,0.2);
}

/* Navigation focus states */
.main-nav a:focus-visible, .mobile-nav a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Prevent overlap by ensuring spacing */
section .testimonial-card + .testimonial-card { margin-top: 16px; }

/* Ensure all containers use flex and gaps appropriately */
footer .content-wrapper, header .content-wrapper, main .content-wrapper { gap: 20px; }

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