/* ==========================================================
   MoorGlanz Immobilien — Vintage Retro style.css
   Mobile-first, flexbox-only layouts, brand-aligned, accessible
   ========================================================== */

/* -----------------------------
   CSS Reset / Normalize (light)
   ----------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, li, figure { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { padding-left: 1.2rem; }
button { background: none; border: none; font: inherit; color: inherit; cursor: pointer; }

/* -----------------------------
   Theme Variables (brand + vintage)
   ----------------------------- */
:root {
  /* Brand */
  --brand-primary: #1F3A60; /* Navy */
  --brand-secondary: #1B5E4B; /* Deep green */
  --brand-accent: #F4F5F7; /* Light grey */

  /* Vintage palette */
  --paper: #FBF7EF; /* Cream paper */
  --paper-2: #F5EBDC; /* Warm cream */
  --ink: #2B1E12; /* Deep brown text */
  --rust: #B7632B; /* Burnt orange */
  --burgundy: #5E2A2A; /* Wine */
  --sage: #6E7D5A; /* Sage green */
  --tan: #E8DCC8; /* Tan */
  --charcoal: #1C2024; /* Dark accent for contrast */
  --muted: #8A7A66; /* Muted brown */

  /* Shadows & borders */
  --soft-shadow: 0 2px 0 rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.08);
  --retro-shadow: 4px 4px 0 rgba(43,30,18,.12);
  --line: #D9CCB8;

  /* Sizing */
  --wrap: 1120px;
  --radius: 10px;

  /* Typography scale */
  --fs-14: 14px; /* small */
  --fs-16: 16px; /* base */
  --fs-18: 18px; /* lead */
  --fs-24: 24px; /* h3 */
  --fs-32: 32px; /* h2 */
  --fs-48: 40px; /* h1 mobile */
  --fs-56: 48px; /* h1 desktop */
}

/* -----------------------------
   Base Typography & Body
   ----------------------------- */
body {
  font-family: Arial, Helvetica, sans-serif; /* Brand body */
  font-size: var(--fs-16);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Trebuchet MS", Tahoma, Geneva, Verdana, sans-serif; /* Brand display */
  color: var(--charcoal);
  letter-spacing: 0.2px;
}

h1 { font-size: var(--fs-48); line-height: 1.15; }
h2 { font-size: var(--fs-32); line-height: 1.2; }
h3 { font-size: var(--fs-24); line-height: 1.25; }

p { font-size: var(--fs-16); color: var(--ink); }
small { font-size: var(--fs-14); color: var(--muted); }

.subheadline { font-size: var(--fs-18); color: var(--muted); }

/* Vintage-flavored link styling with visible focus */
a { color: var(--brand-secondary); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1.5px; }
a:hover { color: var(--rust); }
a:focus-visible { outline: 2px dashed var(--rust); outline-offset: 3px; }

/* -----------------------------
   Layout Containers (Flex only)
   ----------------------------- */
.container {
  width: 100%;
  display: flex; /* flex layout */
  justify-content: center;
  padding: 0 16px;
}

.content-wrapper {
  width: 100%;
  max-width: var(--wrap);
  display: flex; /* flex layout */
  flex-direction: column;
  align-items: flex-start;
  gap: 24px; /* consistent spacing */
}

/* Global sections spacing (also provide .section class as mandated) */
section { margin-bottom: 60px; padding: 40px 20px; background: transparent; }
.section { margin-bottom: 60px; padding: 40px 20px; }

/* -----------------------------
   Header & Navigation
   ----------------------------- */
.site-header {
  background: var(--brand-primary);
  color: #fff;
  border-bottom: 6px solid var(--rust); /* retro accent bar */
  position: relative;
  z-index: 50;
}
.site-header .container { padding-top: 16px; padding-bottom: 16px; }
.site-header .content-wrapper { gap: 12px; }

.brand { display: flex; align-items: center; gap: 12px; }
.logo-text {
  font-family: "Trebuchet MS", Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 1px 1px 0 rgba(0,0,0,.2);
}

.tagline { color: #E6EEF8; font-size: var(--fs-14); }

.main-nav { display: none; /* hidden on mobile */ }
.main-nav a {
  color: #EDEFF3;
  padding: 8px 10px;
  border-radius: 6px;
  display: flex;
}
.main-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }

.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--brand-secondary);
  color: #fff;
  border-radius: 8px;
  box-shadow: var(--retro-shadow);
  transition: transform .2s ease, background-color .2s ease;
  margin-left: auto;
}
.mobile-menu-toggle:hover { transform: translateY(-1px); background: #0F4033; }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: auto;
  width: 85%;
  max-width: 420px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: -6px 0 0 rgba(0,0,0,.05), -24px 0 48px rgba(0,0,0,.25);
  transform: translateX(100%);
  transition: transform .35s ease;
  display: flex; /* flex layout */
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}
.mobile-menu.open, .mobile-menu.active { transform: translateX(0); }

.mobile-menu-close {
  position: absolute;
  top: 12px; right: 12px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
}
.mobile-nav { margin-top: 60px; display: flex; flex-direction: column; }
.mobile-nav a {
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
}
.mobile-nav a:hover { background: var(--paper-2); }

/* -----------------------------
   Hero Section
   ----------------------------- */
.hero {
  background: var(--paper-2);
  border: 2px solid var(--tan);
  border-left: 8px solid var(--rust); /* vintage band */
  box-shadow: var(--soft-shadow);
  border-radius: var(--radius);
}
.hero .subheadline { color: #5B5143; }
.hero .text-section a { font-weight: 700; }

/* -----------------------------
   Generic Text Sections
   ----------------------------- */
.text-section { display: flex; flex-direction: column; gap: 12px; }
.text-section p { max-width: 72ch; }
.text-section ul, .text-section ol { display: flex; flex-direction: column; gap: 8px; }
.text-section li { padding-left: 2px; }

/* Vintage list markers */
.text-section ul li { list-style-type: square; }
.text-section ol li { list-style-type: decimal; }

/* -----------------------------
   Cards, Grids & Features (Flex-only)
   ----------------------------- */
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card {
  margin-bottom: 20px; position: relative; /* as mandated but not used for content positioning */
  background: #fff;
  border: 1px solid var(--tan);
  border-radius: var(--radius);
  box-shadow: var(--retro-shadow);
  padding: 20px;
  display: flex; flex-direction: column; gap: 12px;
}

.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.content-grid > * { flex: 1 1 280px; }

.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Text + Image block pattern */
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.text-image-section > * { flex: 1 1 320px; }

/* -----------------------------
   Testimonials (high contrast requirement)
   ----------------------------- */
.testimonial-card {
  display: flex; align-items: center; gap: 20px; padding: 20px;
  background: #FAF3E3; /* light cream for retro */
  color: #21160F; /* dark text for high readability */
  border: 1px solid var(--tan);
  border-left: 6px solid var(--brand-secondary);
  border-radius: 12px;
  box-shadow: var(--retro-shadow);
}
.testimonial-card h3 { color: var(--charcoal); }
.testimonial-card p strong { color: var(--brand-primary); }

/* -----------------------------
   Footer
   ----------------------------- */
.site-footer {
  background: #10263F; /* darker variant of primary */
  color: #EDEFF3;
  padding-top: 10px; /* section has own padding */
  border-top: 6px solid var(--burgundy);
}
.site-footer .footer-menu { display: flex; flex-wrap: wrap; gap: 12px; }
.site-footer .footer-menu a {
  color: #EDEFF3;
  padding: 6px 8px; border-radius: 6px;
}
.site-footer .footer-menu a:hover { background: rgba(255,255,255,.08); }
.site-footer .logo-text { color: #fff; }

/* -----------------------------
   Buttons (utility classes for CTAs)
   ----------------------------- */
.btn, .button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px;
  border-radius: 999px; /* pill for retro badge feel */
  border: 2px solid var(--charcoal);
  background: var(--brand-secondary);
  color: #fff; font-weight: 700;
  box-shadow: 2px 2px 0 rgba(33,22,15,.25);
  transition: transform .15s ease, background-color .2s ease, box-shadow .15s ease;
}
.btn:hover, .button:hover { background: #0F4033; transform: translateY(-1px); }
.btn:active, .button:active { transform: translateY(0); box-shadow: 1px 1px 0 rgba(33,22,15,.25); }
.btn--outline { background: transparent; color: var(--brand-secondary); border-color: var(--brand-secondary); }
.btn--light { background: var(--paper); color: var(--charcoal); border-color: var(--charcoal); }

/* -----------------------------
   Forms (generic ready styles, even if not present)
   ----------------------------- */
.input, input[type="text"], input[type="email"], input[type="tel"], textarea, select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--tan); border-radius: 8px; background: #fff;
}
.input:focus, input:focus, textarea:focus, select:focus { outline: 2px dashed var(--rust); outline-offset: 3px; }

/* -----------------------------
   Cookie Consent Banner & Modal
   ----------------------------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--paper-2);
  color: var(--ink);
  border-top: 3px solid var(--rust);
  box-shadow: 0 -8px 24px rgba(0,0,0,.2);
  padding: 16px;
  display: none; /* default hidden, show with .visible */
  z-index: 9998;
}
.cookie-banner.visible { display: flex; }
.cookie-banner .container { padding: 0 16px; }
.cookie-banner .content-wrapper { flex-direction: column; gap: 12px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .btn { padding: 10px 14px; }
.cookie-actions .btn.reject { background: var(--burgundy); border-color: var(--charcoal); }
.cookie-actions .btn.settings { background: var(--paper); color: var(--charcoal); border-color: var(--charcoal); }

/* Preferences modal */
.cookie-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: none; z-index: 9998; }
.cookie-backdrop.visible { display: flex; }

.cookie-modal {
  margin: auto; width: 92%; max-width: 640px;
  background: var(--paper);
  border: 2px solid var(--tan);
  border-radius: 12px;
  box-shadow: var(--soft-shadow);
  padding: 20px;
  display: flex; flex-direction: column; gap: 16px;
  transform: translateY(24px);
  transition: transform .25s ease;
}
.cookie-backdrop.visible .cookie-modal { transform: translateY(0); }
.cookie-modal .cookie-categories { display: flex; flex-direction: column; gap: 12px; }
.cookie-modal .cookie-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--tan); }
.cookie-modal .cookie-row .label { font-weight: 700; }
.cookie-modal .cookie-row .hint { color: var(--muted); font-size: var(--fs-14); }

/* Simple toggle visual */
.toggle { width: 48px; height: 28px; background: var(--brand-accent); border: 2px solid var(--charcoal); border-radius: 999px; position: relative; flex-shrink: 0; }
.toggle::after { content: ""; position: absolute; top: 50%; left: 4px; transform: translateY(-50%); width: 18px; height: 18px; background: var(--charcoal); border-radius: 50%; transition: left .2s ease; }
.toggle.on { background: var(--brand-secondary); }
.toggle.on::after { left: 24px; background: #fff; }

/* -----------------------------
   Utility & Helpers
   ----------------------------- */
.muted { color: var(--muted); }
.hr { height: 1px; background: var(--line); width: 100%; }
.center { display: flex; justify-content: center; align-items: center; }
.row { display: flex; flex-wrap: wrap; gap: 20px; }
.col { display: flex; flex-direction: column; gap: 12px; }

/* Mandated spacing/align patterns (explicit classes) */
.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; }
.section { margin-bottom: 60px; padding: 40px 20px; }

/* Ensure minimum gaps between sibling cards/sections */
.content-wrapper > * + * { margin-top: 0; }

/* -----------------------------
   Accessibility & Focus
   ----------------------------- */
:focus { outline-color: var(--rust); }
::selection { background: #FFE1C9; color: #2B1E12; }

/* -----------------------------
   Responsive (Mobile-first)
   ----------------------------- */
@media (min-width: 576px) {
  .hero { padding: 48px 24px; }
}

@media (min-width: 768px) {
  .main-nav { display: flex; gap: 10px; flex-wrap: wrap; }
  .mobile-menu-toggle { display: none; }

  .text-image-section { flex-direction: row; }
  .testimonial-card { padding: 24px; }
  h1 { font-size: var(--fs-56); }
  .subheadline { font-size: 20px; }
}

@media (min-width: 992px) {
  .site-header .content-wrapper { flex-direction: row; align-items: center; gap: 18px; }
  .tagline { margin-left: 8px; }
  .main-nav { margin-left: auto; }
}

/* -----------------------------
   Animations preferences
   ----------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* -----------------------------
   Page-specific light accents (optional)
   ----------------------------- */
/* Index highlights */
body.index .hero { border-left-color: var(--brand-secondary); }
/* Dienstleistungen */
body.dienstleistungen .hero { border-left-color: var(--rust); }
/* Städte & Märkte */
body.staedte-und-maerkte .hero { border-left-color: var(--brand-primary); }
/* Marktanalysen */
body.marktanalysen .hero { border-left-color: var(--burgundy); }
/* Referenzen */
body.referenzen .hero { border-left-color: var(--sage); }
/* Über uns */
body.ueber-uns .hero { border-left-color: var(--tan); }
/* Kontakt */
body.kontakt .hero { border-left-color: var(--brand-secondary); }

/* -----------------------------
   Lists and inline link groups
   ----------------------------- */
.text-section a + a { margin-left: 6px; }
.text-section a { text-decoration-style: dotted; }

/* -----------------------------
   Prevent overlapping and ensure spacing
   ----------------------------- */
section + section { margin-top: 0; }
.content-wrapper { padding-top: 4px; padding-bottom: 4px; }

/* -----------------------------
   Tables (if any in future)
   ----------------------------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--brand-accent); color: var(--charcoal); }

/* -----------------------------
   Ensure testimonial readability on any bg
   ----------------------------- */
.testimonial-card, .testimonial-card * { color: #1e1e1e; }

/* End of file */
