/* =====================================================
   Civan België Kompas — Elegant Classic UI (Flex-only)
   Mobile-first, refined, brand-aligned
   ===================================================== */

/* -----------------------
   CSS RESET / NORMALIZE
------------------------ */
* { box-sizing: border-box; }
html, body, h1, h2, h3, h4, h5, h6, p, ul, ol, 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, input, select, textarea { font: inherit; color: inherit; }
html { -webkit-text-size-adjust: 100%; }

/* -----------------------
   THEME TOKENS (with fallbacks)
------------------------ */
:root {
  --color-primary: #1E3A5F;
  --color-secondary: #C08A22;
  --color-accent: #F6F2E8;
  --color-ink: #283444;   /* refined dark ink */
  --color-ink-soft: #4A5565;
  --color-border: #D9D3C6;
  --color-surface: #FFFFFF;
  --shadow-soft: 0 6px 18px rgba(0,0,0,0.06);
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 16px;
  --space-8: 8px; --space-12: 12px; --space-16: 16px; --space-20: 20px; --space-24: 24px; --space-32: 32px; --space-40: 40px; --space-60: 60px;
}

/* -----------------------
   BASE TYPOGRAPHY
   Brand fonts: Headings = Trebuchet MS; Body = Verdana
   Elegant-classic feel via spacing, muted tones, rules
------------------------ */
body {
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-ink);
  background: #FAFAF8;
}

h1, h2, h3, h4 {
  font-family: "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", Arial, sans-serif;
  color: var(--color-primary);
  letter-spacing: 0.3px;
}

h1 { font-size: 32px; line-height: 1.2; margin-bottom: var(--space-16); }
h2 { font-size: 24px; line-height: 1.3; margin-bottom: var(--space-16); }
h3 { font-size: 18px; line-height: 1.4; margin-bottom: var(--space-12); }

p { margin-bottom: var(--space-12); color: var(--color-ink); }
.subheading { color: var(--color-ink-soft); font-size: 18px; margin-bottom: var(--space-16); }

strong { color: var(--color-primary); font-weight: 700; }

/* elegant link styling */
a { color: var(--color-primary); text-underline-offset: 3px; }
a:hover { color: var(--color-secondary); }

/* Focus states for accessibility */
:focus-visible {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

/* Text selection */
::selection { background: rgba(192,138,34,0.18); color: var(--color-primary); }

/* -----------------------
   LAYOUT CONTAINERS
------------------------ */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-20);
  display: flex;
  flex-direction: column;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-24);
  align-items: flex-start;
}

/* Generic section spacing */
section { padding: var(--space-40) 0; }

/* -----------------------
   HEADER
------------------------ */
header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}
header .container { padding-top: var(--space-12); padding-bottom: var(--space-12); }
header .content-wrapper {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-16);
}
.brand { display: flex; align-items: center; }
.brand img { height: 36px; width: auto; }

.main-nav {
  display: none; /* mobile-first: hide */
  align-items: center;
  gap: var(--space-16);
}
.main-nav a {
  padding: 8px 10px;
  color: var(--color-ink);
  border-radius: var(--radius-s);
  transition: color .2s ease, background-color .2s ease;
}
.main-nav a[aria-current="page"], .main-nav a:hover {
  color: var(--color-primary);
  background: rgba(30,58,95,0.06);
}

.header-cta { display: none; }
.header-cta a {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px;
  background: var(--color-secondary);
  color: #fff;
  border-radius: 999px;
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.header-cta a:hover { background: #A8741C; transform: translateY(-1px); box-shadow: 0 8px 22px rgba(0,0,0,0.08); }

/* -----------------------
   MOBILE NAVIGATION (burger)
------------------------ */
.mobile-menu-toggle {
  position: fixed;
  top: 14px; right: 14px;
  z-index: 70;
  width: 42px; height: 42px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-primary);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-soft);
  transition: background-color .2s ease, transform .2s ease;
}
.mobile-menu-toggle:hover { background: var(--color-accent); transform: translateY(-1px); }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--color-accent);
  z-index: 80;
  transform: translateX(100%);
  transition: transform .35s ease;
  display: flex;
  flex-direction: column;
  padding: var(--space-20);
  visibility: hidden;
}
.mobile-menu.open { transform: translateX(0); visibility: visible; }
.mobile-menu-close {
  align-self: flex-end;
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-primary);
  display: inline-flex; align-items: center; justify-content: center;
}
.mobile-nav { display: flex; flex-direction: column; gap: var(--space-8); margin-top: var(--space-20); }
.mobile-nav a {
  display: flex; align-items: center;
  padding: 14px 12px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-s);
  color: var(--color-primary);
}
.mobile-nav a[aria-current="page"], .mobile-nav a:hover { border-color: var(--color-secondary); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }

/* -----------------------
   HERO SECTIONS
------------------------ */
.hero { background: var(--color-accent); border-bottom: 1px solid var(--color-border); }
.hero .content-wrapper { align-items: flex-start; }
.hero h1 { font-size: 28px; }
.hero .subheading { font-size: 16px; }

/* CTA groups in hero and elsewhere */
.cta-group { display: flex; flex-wrap: wrap; gap: var(--space-12); }
.cta-group a, .hero .content-wrapper > a, .header-cta a {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--color-secondary);
  color: #fff;
  box-shadow: var(--shadow-soft);
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease, color .2s ease, border-color .2s ease;
}
.cta-group a:hover, .hero .content-wrapper > a:hover { background: #A8741C; transform: translateY(-1px); }

/* Secondary ghost button style inside cta-group if multiple anchors */
.cta-group a:nth-child(2) {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.cta-group a:nth-child(2):hover { background: rgba(30,58,95,0.06); color: var(--color-primary); }

/* -----------------------
   CONTENT BLOCKS
------------------------ */
.content-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }

.text-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-12);
  color: var(--color-ink);
}

/* Card-like style for multi-column content within sections */
section .content-wrapper > .text-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-m);
  padding: var(--space-20);
  box-shadow: var(--shadow-soft);
  flex: 1 1 280px;
}

/* But not in hero */
.hero .text-section { background: transparent; border: 0; box-shadow: none; padding: 0; }

/* Links inside text blocks: elegant underline on hover */
.text-section a { color: var(--color-primary); text-decoration: underline; }
.text-section a:hover { color: var(--color-secondary); }

/* Lists */
.text-section ul, .text-section ol { margin-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.text-section ul { list-style: disc; }
.text-section ol { list-style: decimal; }

/* Text-image pairings */
.text-image-section { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }

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

/* -----------------------
   TESTIMONIALS
------------------------ */
.testimonial-card { 
  display: flex; align-items: center; gap: 20px; padding: 20px;
  background: #FFFDF8;
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-secondary);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-soft);
  color: var(--color-ink);
}
.testimonial-card p { font-style: italic; color: var(--color-ink); }

/* Ensure high contrast for readability */
.testimonial-card, .testimonial-card p, .testimonial-card div { color: #1D2630; }

/* -----------------------
   FOOTER
------------------------ */
footer { background: #F4F1EA; border-top: 1px solid var(--color-border); }
footer .content-wrapper { flex-direction: column; gap: var(--space-20); }
.footer-nav { display: flex; flex-wrap: wrap; gap: var(--space-12); }
.footer-nav a { color: var(--color-primary); padding: 6px 8px; border-radius: var(--radius-s); }
.footer-nav a:hover { background: rgba(30,58,95,0.06); }

/* Contact text blocks in footer */
footer .text-section img { display: inline-block; vertical-align: middle; height: 16px; width: 16px; margin-right: 6px; }

/* -----------------------
   UTILITY CARDS & LAYOUTS (MANDATORY PATTERNS)
------------------------ */
.section { margin-bottom: 60px; padding: 40px 20px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; display: flex; flex-direction: column; gap: 12px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-m); padding: 16px; box-shadow: var(--shadow-soft); }

/* -----------------------
   BUTTONS (utility classes)
------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 1px solid transparent; transition: all .2s ease; }
.btn-primary { background: var(--color-secondary); color: #fff; }
.btn-primary:hover { background: #A8741C; transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--color-primary); border-color: var(--color-primary); }
.btn-secondary:hover { background: rgba(30,58,95,0.06); }
.btn-ghost { background: #fff; color: var(--color-ink); border: 1px solid var(--color-border); }
.btn-ghost:hover { border-color: var(--color-secondary); color: var(--color-primary); }

/* -----------------------
   COOKIE CONSENT BANNER & MODAL
------------------------ */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--color-accent);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -8px 20px rgba(0,0,0,0.06);
  z-index: 90;
  display: none; /* hidden by default; show via .show */
}
.cookie-banner.show { display: flex; }
.cookie-banner .inner {
  width: 100%; max-width: 1100px; margin: 0 auto; padding: 14px 20px;
  display: flex; flex-direction: column; gap: 12px; align-items: flex-start;
}
.cookie-banner p { color: var(--color-ink); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .accept { composes: btn btn-primary; }
.cookie-actions .reject { composes: btn btn-ghost; }
.cookie-actions .settings { composes: btn btn-secondary; }
/* Fallback for composes (if not supported) */
.cookie-actions .accept { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border-radius: 999px; background: var(--color-secondary); color: #fff; }
.cookie-actions .accept:hover { background: #A8741C; }
.cookie-actions .reject { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--color-border); }
.cookie-actions .reject:hover { border-color: var(--color-secondary); color: var(--color-primary); }
.cookie-actions .settings { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border-radius: 999px; background: transparent; border: 1px solid var(--color-primary); color: var(--color-primary); }
.cookie-actions .settings:hover { background: rgba(30,58,95,0.06); }

/* Cookie preferences modal */
.cookie-modal { position: fixed; inset: 0; z-index: 95; display: none; }
.cookie-modal.open { display: flex; }
.cookie-modal { align-items: center; justify-content: center; }
.cookie-modal::before { content: ""; position: fixed; inset: 0; background: rgba(30,58,95,0.55); }
.cookie-modal .modal {
  position: relative; z-index: 1; background: #fff; border-radius: var(--radius-l);
  width: calc(100% - 40px); max-width: 720px; border: 1px solid var(--color-border);
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
  display: flex; flex-direction: column; gap: 16px; padding: 20px;
}
.cookie-modal h3 { margin-bottom: 4px; }
.cookie-options { display: flex; flex-direction: column; gap: 12px; }
.cookie-option { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--color-border); border-radius: var(--radius-m); }

/* Toggle switch */
.toggle { position: relative; width: 44px; height: 26px; background: #E4E1D8; border-radius: 999px; border: 1px solid var(--color-border); flex: 0 0 auto; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: #fff; border-radius: 50%; box-shadow: var(--shadow-soft); transition: transform .2s ease, background-color .2s ease; }
.toggle.is-on { background: rgba(192,138,34,0.4); border-color: var(--color-secondary); }
.toggle.is-on::after { transform: translateX(18px); background: #fff; }

.cookie-modal .actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* -----------------------
   ICONS in body text
------------------------ */
.text-section img[alt^=""]:not([alt=""]) { vertical-align: middle; }
.text-section img[alt] { display: inline-block; height: 16px; width: 16px; margin-right: 6px; }

/* -----------------------
   MEDIA QUERIES
------------------------ */
@media (min-width: 600px) {
  h1 { font-size: 36px; }
  .hero h1 { font-size: 34px; }
  .subheading { font-size: 18px; }
}

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

  .content-wrapper { flex-direction: row; align-items: flex-start; }
  .hero .content-wrapper { flex-direction: column; align-items: flex-start; }

  /* Text-image sections row layout */
  .text-image-section { flex-direction: row; }
}

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

  header .content-wrapper { gap: var(--space-24); }
}

/* -----------------------
   ADDITIONAL POLISH
------------------------ */
/* Gentle dividers on sections for classic structure */
main > section + section { border-top: 1px solid var(--color-border); }

/* Subtle hover lift for cards */
section .content-wrapper > .text-section:hover { box-shadow: 0 10px 24px rgba(0,0,0,0.08); transform: translateY(-1px); transition: box-shadow .2s ease, transform .2s ease; }

/* Ensure no overlapping content */
section .content-wrapper { gap: var(--space-24); }
section .content-wrapper > * { margin: 0; }

/* -----------------------
   PAGE-SPECIFIC TWEAKS
------------------------ */
/* Index hero alignment */
.hero .text-section span { color: var(--color-ink-soft); }

/* Footer logo mark size (homepage footer) */
footer .text-section img[alt*="logo"] { height: 28px; width: auto; }

/* ARIA current highlight in any nav */
nav a[aria-current="page"] { color: var(--color-primary); font-weight: 700; }

/* -----------------------
   FLEX RULES REQUIRED BY SPEC
------------------------ */
/* content cards/sections minimum spacing */
section .content-wrapper > * { margin-bottom: 0; }
.card, .text-section, .testimonial-card { margin-bottom: 0; }

/* Prevent absolute positioning for content (only relative for cards allowed) already set */

/* Alignments defaults */
.align-center { display: flex; align-items: center; justify-content: center; }
.align-start { display: flex; align-items: flex-start; }

/* -----------------------
   PRINT (minimal)
------------------------ */
@media print {
  .mobile-menu-toggle, .mobile-menu, .header-cta, .cookie-banner, .cookie-modal { display: none !important; }
  a { text-decoration: underline; }
  header { position: static; }
}
