/* =============================
   QuirisLarg AutoKurator – style.css
   Theme: elegant_classic (timeless elegance, muted colors, refined spacing)
   Layout: Mobile-first, Flexbox-only (no grid/columns)
   ============================= */

/* ---------- CSS Reset & Base Normalize ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; cursor: pointer; }
ul, ol { margin: 0 0 16px; padding-left: 20px; }

/* ---------- Design Tokens ---------- */
:root {
  --primary: #0D2B45;
  --secondary: #1FA37D;
  --accent: #F5F7FA; /* light background */
  --paper: #FAFAF8;  /* off-white paper tone for classic feel */
  --ink: #1C2430;    /* near-black for body text */
  --muted: #6B7280;  /* muted gray for secondary text */
  --line: #E5E7EB;   /* subtle divider */
  --shadow: rgba(13, 43, 69, 0.08);
}

/* ---------- Typography ---------- */
body {
  font-family: Verdana, Georgia, "Times New Roman", serif; /* brand body with classic fallback */
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, "Times New Roman", serif; /* classic serif for elegant headings */
  color: var(--primary);
  margin: 0 0 12px;
  line-height: 1.25;
  letter-spacing: 0.2px;
}

h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }

p { margin: 0 0 12px; color: var(--ink); }
strong { font-weight: 700; }
em { color: var(--muted); }

/* Links */
main a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
main a:hover { color: #0b2339; }

/* Navigation & UI type accent */
.nav, .main-nav a, .footer-nav a, .legal-nav a, .btn, .brand-name, .mobile-nav a {
  font-family: "Trebuchet MS", Verdana, Arial, sans-serif; /* brand display */
}

/* ---------- Layout Helpers ---------- */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Default section rhythm (applies to raw <section>) */
section { padding: 36px 0; }

/* Mandatory spacing pattern class (still included explicitly) */
.section { margin-bottom: 60px; padding: 40px 20px; }

.content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

/* Generic content group layouts */
.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; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Cards and containers */
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 20px; box-shadow: 0 6px 18px var(--shadow); }

/* Text block styling */
.text-section { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: 80ch; }
.text-section h3 { margin-top: 12px; }
.text-section ul, .text-section ol { margin: 0 0 8px 18px; }
.text-section a.btn { text-decoration: none; }

/* Inline icon sizing for text sections and contact snippets */
.text-section img[alt], .contact-snippet img[alt] { width: 18px; height: auto; vertical-align: -3px; margin-right: 6px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 16px var(--shadow);
}
.site-header .content-wrapper {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--primary); }
.brand img { width: 36px; height: auto; }
.brand-name { font-weight: 700; letter-spacing: 0.3px; font-size: 16px; }

.main-nav { display: none; align-items: center; gap: 16px; }
.main-nav a { color: var(--primary); text-decoration: none; padding: 8px 10px; border-radius: 6px; transition: background-color 0.2s ease, color 0.2s ease; }
.main-nav a:hover { background: var(--accent); }

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

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 8px; color: var(--primary);
  border: 1px solid var(--line); background: #fff;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}
.mobile-menu-toggle:hover { background: var(--accent); box-shadow: 0 4px 12px var(--shadow); }

/* ---------- Mobile Menu Overlay ---------- */
.mobile-menu {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(13,43,69,0.08);
  display: flex; flex-direction: row; align-items: stretch; justify-content: flex-end;
  transform: translateX(100%);
  transition: transform 0.35s ease;
}
.mobile-menu.active { transform: translateX(0); }
.mobile-menu-close {
  position: relative; /* keeps content flow */
  align-self: flex-start; margin: 16px; width: 38px; height: 38px;
  border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--primary);
}
.mobile-nav {
  background: #fff; width: 82%; max-width: 360px; height: 100%;
  border-left: 1px solid var(--line); box-shadow: -8px 0 24px rgba(13,43,69,0.12);
  display: flex; flex-direction: column; gap: 10px; padding: 20px;
}
.mobile-nav a {
  display: flex; align-items: center; padding: 12px 10px;
  color: var(--primary); border-radius: 8px; text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.mobile-nav a:hover { background: var(--accent); }

/* ---------- Hero ---------- */
.hero { background: var(--accent); border-bottom: 1px solid var(--line); }
.hero .content-wrapper { padding: 18px 0 8px; }
.hero h1 { color: var(--primary); }
.hero p { color: var(--muted); max-width: 70ch; }

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

/* Trust badges */
.trust-badges ul { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 6px 0 0; }
.trust-badges li {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--primary); box-shadow: 0 4px 12px var(--shadow);
}
.trust-badges img { width: 18px; height: auto; }

/* Contact snippet (short line) */
.contact-snippet p { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--primary); }

/* Feature grid on index */
.feature-grid { display: flex; flex-wrap: wrap; gap: 20px; }
.feature-grid .text-section {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px;
  box-shadow: 0 6px 18px var(--shadow);
  flex: 1 1 280px;
}
.feature-grid h3 img { width: 18px; margin-right: 6px; vertical-align: -3px; }

/* CTA bar (links group) */
.cta-bar { display: flex; flex-wrap: wrap; gap: 12px; }

/* Ordered/Unordered lists inside process sections */
ol.text-section, ul.text-section { display: flex; flex-direction: column; gap: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 18px; border-radius: 8px; border: 1px solid var(--primary);
  color: var(--primary); background: transparent;
  font-weight: 600; letter-spacing: 0.3px; text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.12s ease;
}
.btn:hover { box-shadow: 0 8px 18px var(--shadow); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus { outline: 2px solid #96D2C2; outline-offset: 2px; }

.btn-primary {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.btn-primary:hover { background: #0b2339; }

.btn-secondary {
  background: #fff; color: var(--primary); border-color: var(--secondary);
}
.btn-secondary:hover { background: #E9F7F2; color: #0b2339; border-color: #169172; }

/* ---------- Testimonials ---------- */
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; background: #ffffff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px var(--shadow); }
.testimonial-card p { margin: 0; color: var(--ink); }
.testimonial-card p:first-child { font-style: italic; }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary); color: #EAF1F5; margin-top: 20px; }
.site-footer .content-wrapper { padding: 28px 0; }
.site-footer p { color: #EAF1F5; opacity: 0.92; }
.site-footer img { width: 40px; height: auto; }
.footer-nav, .legal-nav { display: flex; flex-wrap: wrap; gap: 12px 18px; }
.footer-nav a, .legal-nav a { color: #F5F7FA; text-decoration: none; opacity: 0.95; }
.footer-nav a:hover, .legal-nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Cookie Consent Banner ---------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1400;
  background: #ffffff; border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(13,43,69,0.12);
}
.cookie-banner .inner {
  display: flex; flex-direction: column; gap: 12px; align-items: flex-start; justify-content: center;
  padding: 14px 20px;
}
.cookie-banner p { margin: 0; color: var(--ink); }
.cookie-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-buttons .btn { padding: 10px 14px; }
.cookie-buttons .btn-accept { background: var(--secondary); border-color: var(--secondary); color: #fff; }
.cookie-buttons .btn-accept:hover { background: #169172; }
.cookie-buttons .btn-reject { border-color: var(--primary); color: var(--primary); background: #fff; }
.cookie-buttons .btn-settings { border-color: var(--line); color: var(--primary); background: #fff; }

/* Cookie Preferences Modal */
.cookie-modal-overlay {
  position: fixed; inset: 0; z-index: 1500; background: rgba(13,43,69,0.35);
  display: none; align-items: center; justify-content: center;
}
.cookie-modal-overlay.active { display: flex; }
.cookie-modal {
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 16px 40px rgba(13,43,69,0.25);
  width: 92%; max-width: 640px; padding: 20px; display: flex; flex-direction: column; gap: 16px;
}
.cookie-modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-options { display: flex; flex-direction: column; gap: 12px; }
.cookie-option { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.cookie-option .label { font-weight: 600; color: var(--primary); }
.cookie-option .desc { color: var(--muted); font-size: 14px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* ---------- Forms (generic) ---------- */
input, select, textarea { font: inherit; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid #CFEAE2; border-color: #96D2C2; }

/* ---------- Utility Spacing ---------- */
.hr { width: 100%; height: 1px; background: var(--line); margin: 12px 0; }

/* ---------- Responsive Rules ---------- */
@media (min-width: 480px) {
  h1 { font-size: 34px; }
}

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

  .hero .content-wrapper { padding: 26px 0 12px; }
  .text-image-section { flex-direction: row; }
}

@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; }

  /* Header spacing refinement */
  .site-header .content-wrapper { padding: 14px 0; }

  /* Feature grid density */
  .feature-grid .text-section { flex: 1 1 340px; }
}

/* ---------- Page-specific fine-tuning ---------- */
/* Regionen, Leistungen, Bewertungen, etc. use similar blocks */

/* Lists emphasized inside overviews */
.text-section ul li { margin-bottom: 4px; }

/* Buttons inside paragraphs spacing */
.text-section .btn + .btn, .cta-group .btn + .btn { margin-left: 0; }

/* ---------- Accessibility Focus Styles ---------- */
:focus-visible { outline: 2px dashed #96D2C2; outline-offset: 3px; }

/* ---------- Prevent overlaps & ensure gaps (global) ---------- */
section > .container > .content-wrapper > * + * { margin-top: 0; }

/* ---------- Additional Mandatory Patterns (kept for reuse) ---------- */
/* Already defined above but reiterated to guarantee presence */
/* .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; } */

/* ---------- Minor component styling present in pages ---------- */
/* Footer contact icons */
.site-footer .text-section img[alt] { width: 16px; margin-right: 6px; vertical-align: -3px; }

/* Align footer columns in a simple stack on mobile, row on desktop via flex */
.site-footer .content-wrapper { gap: 20px; }
@media (min-width: 992px) {
  .site-footer .content-wrapper { flex-direction: row; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
  .site-footer .text-section { max-width: 360px; }
}

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