/* ===================================================================
   ChillWard Autoklinik — style.css
   Elegant Classic theme: serif accents, muted palette, refined spacing
   Mobile-first, Flexbox-only layouts (no grid/columns)
   =================================================================== */

/* -----------------------------
   CSS Reset / Base Normalize
------------------------------ */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; } 
html, body { height: 100%; }
body { margin: 0; }
img, picture, svg, video { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0 0 0 1.2rem; }
h1, h2, h3, h4, h5, h6, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }

/* -----------------------------
   Design Tokens / Variables
------------------------------ */
:root {
  --primary: #1E293B;          /* Brand primary (slate) */
  --secondary: #D72638;        /* Brand secondary (crimson) */
  --accent: #F5F7FA;           /* Brand accent (light) */
  --ink: #0F172A;              /* Deep text */
  --muted: #475569;            /* Muted text */
  --paper: #F8F6F2;            /* Warm ivory for classic feel */
  --line: #E2E8F0;             /* Subtle border */
  --line-soft: #ECEFF4;        /* Softer border */
  --success: #1B7F5F;
  --warning: #8A6D3B;
  --radius-s: 6px; 
  --radius-m: 10px;
  --shadow-s: 0 2px 6px rgba(17, 24, 39, 0.07);
  --shadow-m: 0 8px 20px rgba(17, 24, 39, 0.08);
  --focus: 0 0 0 3px rgba(215, 38, 56, 0.35);
}

/* -----------------------------
   Base Typography
   Elegant Classic: Serif headings, refined spacing
------------------------------ */
body {
  font-family: Arial, Helvetica, sans-serif; /* Brand body font */
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4 {
  font-family: Georgia, 'Times New Roman', Times, serif; /* Classic serif for display */
  color: var(--primary);
  letter-spacing: 0.2px;
}

h1 { font-size: 34px; line-height: 1.2; font-weight: 700; }
h2 { font-size: 26px; line-height: 1.25; margin-bottom: 8px; font-weight: 700; }
h3 { font-size: 20px; line-height: 1.3; font-weight: 700; }
h4 { font-size: 18px; line-height: 1.35; font-weight: 700; }

p, li { color: var(--muted); font-size: 16px; }
strong { color: var(--ink); font-weight: 700; }
em { font-style: italic; }

/* Links */
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--secondary); }

/* Focus states for accessibility */
:focus { outline: none; }
:focus-visible { box-shadow: var(--focus); border-radius: 4px; outline: none; }

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

.content-wrapper {
  display: flex;               /* Flex-only requirement */
  flex-direction: column;      /* Mobile-first */
  align-items: flex-start;
  gap: 20px;                   /* Consistent spacing */
  width: 100%;
  max-width: 1120px;
}

section { margin-bottom: 60px; padding: 40px 20px; }

/* Mandatory spacing class (must exist exactly) */
.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; }

/* -----------------------------
   Topbar / Header Navigation
------------------------------ */
.topbar {
  background: #FFFFFF;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 1000;
}
.topbar .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; }
.brand img { height: 40px; width: auto; }

.main-nav {
  display: none; /* Hidden on mobile */
  align-items: center;
  gap: 16px;
}
.main-nav a {
  padding: 8px 10px;
  border-radius: var(--radius-s);
  color: var(--primary);
  font-size: 15px;
  letter-spacing: 0.4px;
  transition: color 160ms ease, background-color 160ms ease;
}
.main-nav .button-primary{background: transparent;}
.main-nav a:hover { color: var(--secondary); background: var(--accent); }
.main-nav a.active { color: var(--ink); border-bottom: 2px solid var(--secondary); border-radius: 0; }

.mobile-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: #fff; color: var(--primary);
  cursor: pointer; transition: background 160ms ease, color 160ms ease, transform 120ms ease;
}
.mobile-menu-toggle:hover { background: var(--accent); color: var(--ink); }
.mobile-menu-toggle:active { transform: scale(0.98); }

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed; inset: 0; /* full screen */
  background: rgba(248,246,242,0.98);
  transform: translateX(100%);
  transition: transform 280ms ease;
  z-index: 1100; display: flex; flex-direction: column; padding: 16px;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-close {
  align-self: flex-end;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: #fff; color: var(--primary);
  cursor: pointer; transition: background 160ms ease, color 160ms ease;
}
.mobile-menu-close:hover { background: var(--accent); color: var(--ink); }
.mobile-nav {
  display: flex; flex-direction: column; gap: 8px; padding: 12px 0; margin-top: 8px;
}
.mobile-nav a {
  padding: 14px 12px; border-bottom: 1px solid var(--line-soft);
  font-size: 18px; color: var(--primary);
}
.mobile-nav a:hover { background: #fff; color: var(--secondary); }

/* Desktop nav breakpoint */
@media (min-width: 960px) {
  .main-nav { display: flex; }
  .mobile-menu-toggle { display: none; }
}

/* -----------------------------
   Hero Section
------------------------------ */
.hero { background: var(--accent); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.hero .content-wrapper { padding: 10px 0; }
.hero h1 { font-size: 32px; }
.hero p { font-size: 18px; color: var(--muted); }

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

.contact-snippet p, .hero .contact-snippet p { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 15px; }
.contact-snippet img { width: 18px; height: 18px; }

/* -----------------------------
   Buttons
------------------------------ */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 16px;
  border: 1px solid var(--primary);
  background: transparent; color: var(--primary);
  border-radius: var(--radius-s);
  text-decoration: none; cursor: pointer;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 100ms ease;
}
.button:hover { background: #FFFFFF; color: var(--ink); box-shadow: var(--shadow-s); }
.button:active { transform: translateY(1px); }

.button-primary {
  background: var(--primary); color: #FFFFFF; border-color: var(--primary);
}
.button-primary:hover { background: #172136; color: #fff; box-shadow: var(--shadow-m); }
.button-primary:focus-visible { box-shadow: var(--focus); }

/* Badge-like subtle buttons if needed */
.button-secondary { background: #FFFFFF; border-color: var(--line); color: var(--primary); }
.button-secondary:hover { border-color: var(--primary); }

/* -----------------------------
   Text Sections as Classic Cards
------------------------------ */
.text-section {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: 16px; box-shadow: var(--shadow-s);
  flex: 1 1 260px; min-width: 260px;
}
.text-section ul, .text-section ol { padding-left: 1.2rem; }
.text-section li { margin: 4px 0; }
.text-section p + p { margin-top: 8px; }

/* Section headings spacing harmony */
.content-wrapper > h2 { padding-top: 4px; }

/* Multi-column flow on larger screens (Flex only) */
@media (min-width: 768px) {
  main section .content-wrapper { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  main section .content-wrapper > h2 { flex: 1 1 100%; }
}

/* -----------------------------
   Testimonials — readable on light background
------------------------------ */
.testimonial-card {
  background: #FFFFFF; 
  border: 1px solid var(--line);
  border-left: 4px solid var(--secondary);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-s);
}
.testimonial-card p { margin: 0; color: var(--primary); }
.testimonial-card p + p { color: var(--ink); }

/* -----------------------------
   Footer
------------------------------ */
footer { background: #FFFFFF; border-top: 1px solid var(--line); }
footer .content-wrapper {
  flex-direction: column; gap: 20px; padding: 30px 0;
}
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-brand img { width: 130px; height: auto; }
.footer-brand p { color: var(--muted); }

.footer-nav, .legal-nav, .footer-contact, .newsletter { display: flex; flex-direction: column; gap: 8px; }
.footer-nav a, .legal-nav a { color: var(--primary); font-size: 15px; padding: 4px 0; }
.footer-nav a:hover, .legal-nav a:hover { color: var(--secondary); }
.footer-nav a.active, .legal-nav a.active { border-bottom: 2px solid var(--secondary); width: fit-content; }

.newsletter .social-links { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.social-links a { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 6px; background: #fff; transition: transform 120ms ease, border-color 160ms ease; }
.social-links a:hover { transform: translateY(-1px); border-color: var(--primary); }
.social-links img { width: 18px; height: 18px; }

@media (min-width: 900px) {
  footer .content-wrapper { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
  .footer-brand { flex: 1 1 240px; }
  .footer-nav { flex: 1 1 220px; }
  .legal-nav { flex: 1 1 220px; }
  .footer-contact { flex: 1 1 260px; }
  .newsletter { flex: 1 1 260px; }
}

/* -----------------------------
   Lists, Quotes and Classic Details
------------------------------ */
ul { list-style: disc; }
ol { list-style: decimal; }
li::marker { color: var(--secondary); }
blockquote { margin: 0; padding-left: 16px; border-left: 4px solid var(--line); color: var(--muted); }

/* -----------------------------
   Tables (if any appear later)
------------------------------ */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--line-soft); }
th { font-family: Georgia, 'Times New Roman', Times, serif; color: var(--primary); }

/* -----------------------------
   Utilities
------------------------------ */
.muted { color: var(--muted); }
.text-center { text-align: center; }
.align-center { display: flex; align-items: center; justify-content: center; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-direction: row; gap: 12px; flex-wrap: wrap; }

/* -----------------------------
   Page-specific fine-tuning
------------------------------ */
/* Highlight hero call-to-actions grouping */
.hero .content-wrapper > div:has(.button) { display: flex; flex-wrap: wrap; gap: 10px; }
/* Fallback for older browsers that don't support :has */
.hero .content-wrapper > div { display: flex; flex-wrap: wrap; gap: 10px; }

/* Make major headings breathe */
main .content-wrapper > h2 + .text-section { margin-top: 4px; }

/* Review summary lines under testimonial groups */
section .content-wrapper > p strong { color: var(--ink); }

/* Contact lines with icons */
.text-section p img { width: 18px; height: 18px; vertical-align: middle; }

/* -----------------------------
   Mobile-first Responsiveness
------------------------------ */
@media (min-width: 600px) {
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
}

@media (min-width: 960px) {
  h1 { font-size: 44px; }
  h2 { font-size: 32px; }
  h3 { font-size: 22px; }
  .hero .content-wrapper { flex-direction: column; }
}

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

/* -----------------------------
   Cookie Consent Banner & Modal
------------------------------ */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 1200; background: #FFFFFF; border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(17,24,39,0.06);
  display: flex; flex-direction: column; gap: 12px;
  padding: 16px; /* Mobile */
}
.cookie-banner .cookie-inner { display: flex; flex-direction: column; gap: 12px; }
.cookie-banner .cookie-text { color: var(--primary); font-size: 15px; }
.cookie-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-buttons .btn { padding: 10px 14px; border-radius: var(--radius-s); border: 1px solid var(--line); background: #fff; color: var(--primary); cursor: pointer; transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease; }
.cookie-buttons .btn:hover { background: var(--accent); }
.cookie-buttons .btn-accept { background: var(--primary); color: #fff; border-color: var(--primary); }
.cookie-buttons .btn-accept:hover { background: #172136; }
.cookie-buttons .btn-reject { background: #fff; color: var(--primary); }
.cookie-buttons .btn-settings { background: #fff; }

@media (min-width: 768px) {
  .cookie-banner { padding: 18px 24px; }
  .cookie-banner .cookie-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* Cookie Preferences Modal */
.cookie-modal {
  position: fixed; inset: 0; z-index: 1300;
  background: rgba(30,41,59,0.45);
  display: none; /* toggled by .open */
  align-items: center; justify-content: center; padding: 16px;
}
.cookie-modal.open { display: flex; }
.cookie-modal .modal-inner {
  background: #FFFFFF; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-m);
  display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 640px; padding: 18px;
}
.cookie-modal h3 { margin-bottom: 4px; }
.cookie-category { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line-soft); border-radius: var(--radius-s); padding: 10px 12px; }
.cookie-note { font-size: 14px; color: var(--muted); }

/* Simple toggle style */
.toggle { position: relative; width: 48px; height: 28px; border: 1px solid var(--line); border-radius: 999px; background: var(--accent); cursor: pointer; transition: background 160ms ease, border-color 160ms ease; display: flex; align-items: center; }
.toggle .knob { width: 22px; height: 22px; background: #fff; border: 1px solid var(--line); border-radius: 50%; margin-left: 2px; transition: transform 160ms ease; }
.toggle.on { background: #1B7F5F; border-color: #1B7F5F; }
.toggle.on .knob { transform: translateX(18px); }

.cookie-modal .modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.cookie-modal .modal-actions .btn { padding: 10px 14px; border-radius: var(--radius-s); border: 1px solid var(--line); background: #fff; color: var(--primary); }
.cookie-modal .modal-actions .btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }

/* -----------------------------
   Cards (generic) — classic styling
------------------------------ */
.card {
  background: #FFFFFF; border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: var(--shadow-s);
  padding: 16px;
}

/* -----------------------------
   Ensure adequate gaps between sibling content blocks
------------------------------ */
main .content-wrapper > * + * { margin-top: 0; }

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