/* =============================
   KlarRente International - Industrial Modern UI
   style.css (one file for all pages)
   Requirements met:
   - Industrial Modern aesthetic (dark, metallic accents, urban feel)
   - Brand colors & fonts
   - Only Flexbox for all layouts
   - Mobile-first, responsive
   - Mobile burger menu + slide-in overlay
   - Cookie consent banner + modal
   - Strong contrast in testimonial/review sections (light card, dark text)
   - Mandatory spacing/alignment patterns included
   ============================= */

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

/* -----------------------------
   Theme Variables (with fallbacks)
   ----------------------------- */
:root {
  --brand-primary: #0B3A5B;
  --brand-secondary: #2F7D62;
  --brand-accent: #F5F7FA;
  --bg-900: #0E1216;   /* industrial charcoal */
  --bg-800: #141A1F;   /* deep slate */
  --bg-700: #1B2127;   /* steel */
  --text-100: #E6EDF3; /* light text */
  --text-300: #C7D0D8; /* muted text */
  --metal-500: #88939E;/* metallic accent */
  --metal-400: #9FA9B2;/* metallic light */
  --border-600: #232A31;/* dark divider */
  --success-600: #2F7D62;
  --warning-600: #B98200;
  --danger-600: #B33939;
  --shadow-1: 0 6px 18px rgba(0,0,0,.35);
  --shadow-2: 0 10px 30px rgba(0,0,0,.45);
}

/* -----------------------------
   Base Typography & Body
   ----------------------------- */
body {
  background: var(--bg-900);
  color: var(--text-100);
  font-family: Arial, "Segoe UI", Helvetica, sans-serif; /* brand body */
  line-height: 1.6;
  font-size: 16px;
}
h1, h2, h3, h4 {
  font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; /* brand display */
  color: var(--text-100);
  letter-spacing: 0.02em; /* industrial precision feel */
}
h1 { font-size: 32px; line-height: 1.2; }
h2 { font-size: 24px; line-height: 1.3; margin-bottom: 16px; }
h3 { font-size: 18px; line-height: 1.4; }

p { color: var(--text-100); margin: 10px 0 16px; }
small, .muted { color: var(--text-300); }
strong { color: #fff; font-weight: 700; }
em { color: var(--text-300); }

/* Links */
a { color: var(--brand-secondary); transition: color .2s ease, opacity .2s ease; }
a:hover { color: #3e9a7c; }

/* Focus styles (accessible) */
:focus-visible { outline: 2px solid var(--brand-secondary); outline-offset: 2px; }

/* -----------------------------
   Layout Containers (Flex-only)
   ----------------------------- */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

main { display: flex; flex-direction: column; gap: 20px; }
section { border-top: 1px solid var(--border-600); background: var(--bg-800); }
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: transparent;
}
.text-section { padding-top: 28px; }

/* Mandatory spacing classes (exact names) */
.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 & Navigation (Flex-only)
   ----------------------------- */
header { position: sticky; top: 0; z-index: 50; background: #0B1116; border-bottom: 1px solid var(--border-600); }
header .container { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 20px; }
header img { height: 36px; filter: saturate(.85) contrast(1.05); }

/* Desktop nav hidden on mobile */
header nav { display: none; }
header nav a {
  padding: 10px 12px;
  color: var(--text-100);
  border: 1px solid transparent;
  border-radius: 6px;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
header nav a:hover { background: var(--bg-700); border-color: var(--border-600); transform: translateY(-1px); }

/* CTA button in nav */
.cta-primary {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 16px;
  background: var(--brand-primary);
  color: #fff; border: 1px solid #0a3654; border-radius: 8px;
  box-shadow: var(--shadow-1);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.cta-primary:hover { background: #0d466f; transform: translateY(-2px); box-shadow: var(--shadow-2); }

.cta-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 11px 16px;
  background: transparent; color: var(--brand-secondary);
  border: 1px solid var(--metal-500); border-radius: 8px;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.cta-secondary:hover { background: #1b242b; border-color: var(--brand-secondary); transform: translateY(-2px); }

/* Mobile menu toggle */
.mobile-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 8px;
  background: var(--bg-700); color: var(--text-100);
  border: 1px solid var(--border-600);
  cursor: pointer; transition: background .2s ease, transform .2s ease;
}
.mobile-menu-toggle:hover { background: #242b32; transform: translateY(-1px); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; /* full screen */
  background: rgba(8, 12, 16, 0.75);
  backdrop-filter: blur(3px);
  display: flex; flex-direction: row; justify-content: flex-end; align-items: stretch;
  transform: translateX(100%);
  transition: transform .35s ease;
  z-index: 70;
}
.mobile-menu .mobile-nav {
  width: 86%; max-width: 360px; min-width: 300px;
  background: #0F151B;
  border-left: 1px solid var(--border-600);
  display: flex; flex-direction: column; gap: 4px; padding: 70px 20px 20px;
}
.mobile-menu .mobile-nav a {
  display: flex; align-items: center; padding: 14px 12px;
  color: var(--text-100); border-radius: 6px; border: 1px solid transparent;
}
.mobile-menu .mobile-nav a:hover { background: var(--bg-700); border-color: var(--border-600); }
.mobile-menu-close {
  position: absolute; right: 16px; top: 16px; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 8px;
  background: var(--bg-700); color: var(--text-100);
  border: 1px solid var(--border-600); cursor: pointer; transition: background .2s ease;
}
.mobile-menu-close:hover { background: #242b32; }
/* Active states for JS toggling */
.mobile-menu.open, .mobile-menu.is-active, .mobile-menu[aria-hidden="false"] { transform: translateX(0%); }

/* Desktop breakpoint for nav */
@media (min-width: 992px) {
  header nav { display: flex; gap: 8px; align-items: center; }
  .mobile-menu-toggle { display: none; }
}

/* -----------------------------
   Lists, Badges, Stats (Flex only)
   ----------------------------- */
.trust-badges { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.trust-badges img { width: 28px; height: 28px; filter: grayscale(30%) brightness(1.1); opacity: .95; }

.stat-highlights ul { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; padding-left: 0; }
.stat-highlights li {
  background: var(--bg-700); color: var(--text-100);
  border: 1px solid var(--border-600); border-radius: 8px; padding: 10px 14px;
}

.certifications-list { display: flex; flex-direction: column; gap: 10px; padding-left: 0; list-style: none; }
.certifications-list li { display: flex; align-items: center; gap: 10px; color: var(--text-100); }
.certifications-list img { width: 22px; height: 22px; filter: grayscale(10%) brightness(1); }

/* Feature grid (cards) */
.feature-grid { display: flex; flex-wrap: wrap; gap: 16px; }
.feature-grid > div {
  flex: 1 1 260px;
  display: flex; flex-direction: column; gap: 8px;
  background: var(--bg-700);
  border: 1px solid var(--border-600);
  border-radius: 10px; padding: 18px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.03) inset;
}
.feature-grid img { width: 30px; height: 30px; }

/* Services (cards/list) */
.service-cards, .service-list { display: flex; flex-wrap: wrap; gap: 16px; }
.service-card {
  flex: 1 1 260px;
  display: flex; flex-direction: column; gap: 10px;
  background: #151B21; border: 1px solid #222A31; border-radius: 12px;
  padding: 18px; box-shadow: var(--shadow-1);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: #2a333b; }
.service-list li { flex: 1 1 280px; background: var(--bg-700); color: var(--text-100); border: 1px solid var(--border-600); border-radius: 10px; padding: 12px 14px; list-style: none; }

.checklist-included { display: flex; flex-direction: column; gap: 10px; list-style: none; padding-left: 0; }
.checklist-included li { display: flex; align-items: flex-start; gap: 10px; }
.checklist-included li::before { content: "✔"; color: var(--brand-secondary); margin-top: 2px; }

/* CTA rows */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Text-Image section responsive rule (required) */
@media (max-width: 768px) { .text-image-section { flex-direction: column; } }

/* -----------------------------
   Testimonials (light cards, high contrast)
   ----------------------------- */
.testimonial-card {
  background: var(--brand-accent); /* light */
  color: #12161B; /* dark text for readability */
  border: 1px solid #D7DEE6; border-left: 4px solid var(--brand-primary);
  border-radius: 12px; box-shadow: 0 8px 22px rgba(0,0,0,.12);
}
.testimonial-card p { color: #0F141A; margin: 0; }
.testimonial-card span { color: #222B33; font-weight: 600; }
.star-ratings { display: flex; gap: 4px; align-items: center; }
.star-ratings img { width: 18px; height: 18px; }
.rating-summary { color: var(--text-100); background: var(--bg-700); border: 1px solid var(--border-600); border-radius: 8px; padding: 10px 14px; display: inline-flex; }

/* -----------------------------
   Address & Meta blocks
   ----------------------------- */
address { font-style: normal; color: var(--text-100); }
.office-hours, .map-description, .privacy-note { color: var(--text-300); }
.address-block { color: var(--text-100); display: flex; flex-direction: column; gap: 6px; }

/* -----------------------------
   Footer
   ----------------------------- */
footer { background: #0B1116; border-top: 1px solid var(--border-600); margin-top: 20px; }
footer .container { padding: 24px 20px; gap: 20px; }
.footer-navigation { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-navigation a { color: var(--text-300); padding: 6px 8px; border-radius: 6px; border: 1px solid transparent; }
.footer-navigation a:hover { color: #fff; border-color: var(--border-600); background: var(--bg-700); }
.social-links { display: flex; gap: 10px; align-items: center; }
.social-links img { width: 22px; height: 22px; filter: invert(92%); opacity: .9; }
.newsletter-signup { display: flex; flex-direction: column; gap: 10px; color: var(--text-300); }
.newsletter-signup form { display: flex; gap: 8px; }
.newsletter-signup input[type="email"] { flex: 1; padding: 10px 12px; border-radius: 8px; border: 1px solid #cfd6dd; background: #fff; color: #1c232a; }
.newsletter-signup button { padding: 10px 12px; border-radius: 8px; border: 1px solid #0a3654; background: var(--brand-primary); color: #fff; }
.newsletter-signup input[disabled], .newsletter-signup button[disabled] { opacity: .6; cursor: not-allowed; }
.legal-links { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 12px; color: var(--text-300); border-top: 1px solid var(--border-600); }
.legal-links a { color: var(--text-300); }
.legal-links a:hover { color: #fff; }

/* -----------------------------
   Forms & Inputs (generic)
   ----------------------------- */
input, textarea, select { background: #10161B; color: var(--text-100); border: 1px solid var(--border-600); border-radius: 8px; padding: 10px 12px; }
input::placeholder, textarea::placeholder { color: #7d8791; }
button { cursor: pointer; }

/* -----------------------------
   Utilities for spacing rhythm
   ----------------------------- */
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-20 { margin-top: 20px; } .mb-20 { margin-bottom: 20px; }

/* -----------------------------
   Responsive Typographic Scale
   ----------------------------- */
@media (min-width: 640px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }
}
@media (min-width: 1024px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
}

/* -----------------------------
   Page-specific fine-tuning
   ----------------------------- */
/* Index hero spacing */
body > main > section:first-of-type .content-wrapper { padding-top: 36px; }

/* Ordered lists visual style */
ol { display: flex; flex-direction: column; gap: 8px; padding-left: 1.2rem; }

/* CTA groups inside text blocks */
.text-section > div:has(.cta-primary), .text-section > div:has(.cta-secondary) { display: flex; flex-wrap: wrap; gap: 10px; }

/* Fallback: if :has unsupported, ensure generic buttons stack nicely */
.text-section a.cta-primary + a.cta-secondary { margin-left: 6px; }

/* -----------------------------
   Cards - Generic Industrial Style
   ----------------------------- */
.card, .feature-item, .content-grid > .card {
  background: #151B21; border: 1px solid #222A31; border-radius: 12px; padding: 18px;
}

/* -----------------------------
   Mobile-first responsive layouts
   ----------------------------- */
/* Enhance multi-column on larger screens using flex-wrap */
@media (min-width: 768px) {
  .service-cards { justify-content: space-between; }
  .service-card { flex: 1 1 calc(50% - 16px); }
  .feature-grid > div { flex: 1 1 calc(50% - 16px); }
}
@media (min-width: 1024px) {
  .service-card { flex: 1 1 calc(33.333% - 16px); }
  .feature-grid > div { flex: 1 1 calc(33.333% - 16px); }
}

/* -----------------------------
   Buttons: states & micro-interactions
   ----------------------------- */
.cta-primary:active, .cta-secondary:active { transform: translateY(0); }
.cta-primary:focus-visible, .cta-secondary:focus-visible { box-shadow: 0 0 0 3px rgba(47,125,98,0.35); }

/* -----------------------------
   Cookie Consent Banner & Modal
   ----------------------------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: #0B1116; border-top: 1px solid var(--border-600);
  display: flex; flex-direction: column; gap: 12px; padding: 16px 18px;
  color: var(--text-100); box-shadow: 0 -8px 24px rgba(0,0,0,.35);
  transform: translateY(110%); transition: transform .35s ease;
}
.cookie-banner.show, .cookie-banner.is-visible { transform: translateY(0%); }
.cookie-banner .cookie-text { display: flex; flex-direction: column; gap: 8px; }
.cookie-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-buttons .btn { padding: 10px 14px; border-radius: 8px; border: 1px solid var(--border-600); }
.cookie-accept { background: var(--brand-secondary); color: #fff; border-color: #2b6f58; }
.cookie-reject { background: transparent; color: #fff; }
.cookie-settings { background: var(--bg-700); color: var(--text-100); }
.cookie-buttons .btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); }

/* Cookie Preferences Modal */
.cookie-modal {
  position: fixed; inset: 0; z-index: 95;
  background: rgba(0,0,0,.6);
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.cookie-modal.open { display: flex; }
.cookie-modal-content {
  background: #0F151B; color: var(--text-100);
  border: 1px solid var(--border-600); border-radius: 12px;
  display: flex; flex-direction: column; gap: 16px; padding: 20px; width: 100%; max-width: 640px;
  box-shadow: var(--shadow-2);
}
.cookie-modal-header { display: flex; justify-content: space-between; align-items: center; }
.cookie-modal-close { background: var(--bg-700); border: 1px solid var(--border-600); color: var(--text-100); border-radius: 8px; padding: 8px 10px; }
.cookie-options { display: flex; flex-direction: column; gap: 12px; }
.cookie-option { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--border-600); border-radius: 10px; background: #121921; }
.cookie-option .desc { color: var(--text-300); }

/* Toggle Switch (checkbox) */
.toggle { position: relative; width: 48px; height: 28px; border-radius: 999px; background: #2a333b; border: 1px solid #3a444c; display: flex; align-items: center; padding: 2px; }
.toggle .knob { width: 22px; height: 22px; border-radius: 50%; background: #cfd6dd; transition: transform .2s ease; }
.toggle.on { background: #2F7D62; border-color: #2b6f58; }
.toggle.on .knob { transform: translateX(20px); }

/* -----------------------------
   Accessibility & Readability helpers
   ----------------------------- */
hr { border: 0; border-top: 1px solid var(--border-600); margin: 16px 0; }
blockquote { border-left: 4px solid var(--brand-primary); padding-left: 12px; color: var(--text-300); }

/* -----------------------------
   Industrial decorative touches (no gradients)
   ----------------------------- */
.separator { height: 1px; background: var(--border-600); }
.kicker { color: var(--metal-400); text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }

/* -----------------------------
   Desktop layout enhancements (Flex only)
   ----------------------------- */
@media (min-width: 992px) {
  .container { gap: 20px; }
  .content-wrapper { padding: 28px; }
  /* Footer columns */
  footer .container { flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; }
  .newsletter-signup form { align-items: center; }
}

/* -----------------------------
   Ensure minimum gaps between elements
   ----------------------------- */
section + section { margin-top: 20px; }
.service-card + .service-card { margin-top: 0; } /* gap handled by flex */

/* -----------------------------
   Additional elements from HTML
   ----------------------------- */
.brand-story { color: var(--text-300); background: var(--bg-700); border: 1px solid var(--border-600); border-radius: 10px; padding: 14px; }

/* Legal text areas */
main ul, main ol { margin-bottom: 8px; }

/* Links inside content blocks */
.content-wrapper a { text-decoration: none; }
.content-wrapper a:hover { text-decoration: none; }

/* Phone/email rows */
.content-wrapper > div > a { display: inline-flex; align-items: center; gap: 8px; }

/* -----------------------------
   Print friendly adjustments
   ----------------------------- */
@media print {
  header, footer, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  body { background: #fff; color: #000; }
  .content-wrapper, section { background: #fff; border: none; }
}
