/* =============================
   KlarKante Ausbau – Industrial Modern UI
   style.css (mobile-first, flexbox-only)
   ============================= */

/* ---------- CSS Reset & 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 { margin: 0; padding: 0; }
ul, ol { list-style-position: outside; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ---------- Design Tokens ---------- */
:root {
  --clr-bg: #0f1417;          /* deep graphite */
  --clr-surface: #161c20;     /* charcoal */
  --clr-panel: #1b2227;       /* darker panel */
  --clr-primary: #263238;     /* brand primary */
  --clr-secondary: #C46A3A;   /* brand rust */
  --clr-accent: #F5F1E8;      /* brand accent (light) */
  --clr-ink: #E6E9EC;         /* light ink for dark bg */
  --clr-steel: #9AA3A9;       /* metallic accent */
  --clr-ink-muted: #B8C0C5;   /* muted text */
  --radius-sm: 6px;
  --radius-md: 10px;
  --shadow-1: 0 1px 2px rgba(0,0,0,0.2), 0 4px 10px rgba(0,0,0,0.25);
  --shadow-2: 0 6px 18px rgba(0,0,0,0.35);
  --focus: 2px solid #C46A3A; /* accessible focus */
}

/* ---------- Base & Typography ---------- */
body {
  background: var(--clr-bg, #0f1417);
  color: var(--clr-ink, #E6E9EC);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; letter-spacing: 0.3px; }
h1 { font-size: 32px; line-height: 1.2; margin-bottom: 16px; }
h2 { font-size: 24px; line-height: 1.25; margin-bottom: 16px; }
h3 { font-size: 18px; line-height: 1.3; margin-top: 16px; margin-bottom: 8px; }
p, li { font-size: 16px; color: var(--clr-ink, #E6E9EC); }
strong { color: #ffffff; font-weight: 700; }

/* Links */
a { color: var(--clr-secondary, #C46A3A); }
a:hover { color: #de7a46; }
a:focus-visible { outline: var(--focus); outline-offset: 2px; }

/* ---------- Layout Helpers ---------- */
.container {
  display: flex;               /* flex-only layout */
  flex-direction: column;
  gap: 20px;
  max-width: 1120px;
  padding: 0 20px;
  margin: 0 auto;
}

.content-wrapper {
  display: flex;               /* flex-only layout */
  flex-direction: column;
  gap: 20px;
}

/* Mandatory spacing classes */
.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; }

/* General <section> styling for pages using plain section tags */
section { margin-bottom: 60px; padding: 40px 20px; background: var(--clr-surface, #161c20); border: 1px solid rgba(154,163,169,0.16); border-left: 4px solid var(--clr-steel, #9AA3A9); border-radius: var(--radius-md); box-shadow: var(--shadow-1); }
section .container { gap: 16px; }

/* ---------- Header & Navigation ---------- */
header { position: sticky; top: 0; z-index: 100; background: var(--clr-panel, #1b2227); border-bottom: 1px solid rgba(154,163,169,0.25); box-shadow: 0 2px 14px rgba(0,0,0,0.35); }
header .container { padding-top: 14px; padding-bottom: 14px; }

/* Header content row */
header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }

.logo { display: flex; align-items: center; }
.logo img { height: 38px; width: auto; filter: grayscale(20%) contrast(1.05); }

.main-nav { display: none; }
.main-nav a { color: var(--clr-ink, #E6E9EC); padding: 10px 12px; border-radius: var(--radius-sm); transition: background-color .25s ease, color .2s ease, transform .2s ease; }
.main-nav a:hover { background: rgba(154,163,169,0.12); color: #ffffff; transform: translateY(-1px); }
.main-nav a[aria-current="page"] { color: #ffffff; background: rgba(196,106,58,0.18); border: 1px solid rgba(196,106,58,0.5); }

/* CTA button inside nav */
.main-nav .btn-primary { padding: 10px 14px; }

/* Mobile Hamburger */
.mobile-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 6px;
  background: rgba(154,163,169,0.16);
  color: #fff;
  border: 1px solid rgba(154,163,169,0.35);
  cursor: pointer; transition: background .25s ease, transform .2s ease;
}
.mobile-menu-toggle:hover { background: rgba(154,163,169,0.25); transform: translateY(-1px); }
.mobile-menu-toggle:focus-visible { outline: var(--focus); }

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed; inset: 0; z-index: 1000;
  display: flex;               /* flex-only */
  flex-direction: column; justify-content: flex-start; align-items: stretch;
  background: rgba(15,20,23,0.85);
  backdrop-filter: blur(3px);
  transform: translateX(100%);
  transition: transform .35s ease;
}
.mobile-menu[aria-hidden="false"] { transform: translateX(0); }
.mobile-menu .mobile-menu-close {
  align-self: flex-end; margin: 16px; width: 42px; height: 42px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(245,241,232,0.1);
  color: #fff; border: 1px solid rgba(154,163,169,0.35); border-radius: 6px;
  cursor: pointer; transition: background .25s ease;
}
.mobile-menu .mobile-menu-close:hover { background: rgba(245,241,232,0.18); }

.mobile-nav {
  display: flex;               /* flex-only */
  flex-direction: column; gap: 8px; padding: 10px 20px 40px;
  background: var(--clr-panel, #1b2227);
  border-top: 1px solid rgba(154,163,169,0.25);
  border-radius: 10px 10px 0 0;
  box-shadow: var(--shadow-2);
}
.mobile-nav a {
  display: flex;               /* flex enhances touch area */
  align-items: center;
  padding: 14px 12px;
  color: var(--clr-ink, #E6E9EC);
  border: 1px solid rgba(154,163,169,0.22);
  border-radius: 8px;
  background: rgba(22,28,32,0.65);
  transition: background .25s ease, color .2s ease;
}
.mobile-nav a:hover { background: rgba(154,163,169,0.16); color: #fff; }
.mobile-nav a[aria-current="page"] { background: rgba(196,106,58,0.2); border-color: rgba(196,106,58,0.5); }

/* ---------- Footer ---------- */
footer { background: #12171b; border-top: 1px solid rgba(154,163,169,0.25); padding: 30px 0; }
footer .content-wrapper { gap: 16px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.footer-nav a { color: var(--clr-ink-muted, #B8C0C5); padding: 6px 8px; border-radius: 6px; transition: background .2s ease, color .2s ease; }
.footer-nav a:hover { background: rgba(154,163,169,0.15); color: #fff; }

/* ---------- Hero ---------- */
.hero { background: #151a1e; border: 1px solid rgba(154,163,169,0.18); border-left: 4px solid var(--clr-secondary, #C46A3A); box-shadow: var(--shadow-2); }
.hero h1 { font-size: 32px; }
.hero p { color: var(--clr-ink-muted, #B8C0C5); max-width: 68ch; }

/* ---------- Text Blocks ---------- */
.text-section { display: flex; flex-direction: column; gap: 12px; }
.text-section ul, .text-section ol { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }
.text-section li { color: var(--clr-ink, #E6E9EC); }

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

/* ---------- Buttons ---------- */
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; min-height: 44px; padding: 10px 16px; border-radius: 8px;
  border: 1px solid transparent; font-weight: 700; letter-spacing: 0.2px;
  transition: background .25s ease, color .2s ease, border-color .25s ease, transform .15s ease;
}
.btn-primary { background: var(--clr-secondary, #C46A3A); color: #111; border-color: rgba(0,0,0,0.25); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.05), var(--shadow-1); }
.btn-primary:hover { background: #de7a46; transform: translateY(-1px);color: white; }
.btn-primary:active { transform: translateY(0); }

.btn-secondary { background: transparent; color: var(--clr-accent, #F5F1E8); border-color: rgba(154,163,169,0.45); }
.btn-secondary:hover { background: rgba(154,163,169,0.16); }

.btn-primary:focus-visible, .btn-secondary:focus-visible { outline: var(--focus); outline-offset: 2px; }

/* ---------- Cards & Surfaces ---------- */
.card {
  background: var(--clr-surface, #161c20);
  border: 1px solid rgba(154,163,169,0.18);
  border-radius: var(--radius-md);
  padding: 20px; box-shadow: var(--shadow-1);
}

/* Testimonial cards must be light with dark text for contrast */
.testimonial-card {
  background: var(--clr-accent, #F5F1E8);
  color: var(--clr-primary, #263238);
  border: 1px solid rgba(38,50,56,0.25);
  border-left: 4px solid var(--clr-secondary, #C46A3A);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.testimonial-card p { color: var(--clr-primary, #263238); }
.testimonial-card strong { color: #111; }

/* ---------- Lists & FAQ spacing ---------- */
.text-section h3 + p { margin-top: 4px; }
.text-section p + h3 { margin-top: 16px; }

/* ---------- Accessibility & Micro-interactions ---------- */
::selection { background: rgba(196,106,58,0.35); color: #fff; }

/* Focusable nav links */
nav a:focus-visible { outline: var(--focus); outline-offset: 2px; }

/* ---------- Tables (if any) ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid rgba(154,163,169,0.2); }
th { color: #fff; }

/* ---------- Forms (if any future forms) ---------- */
input[type="text"], input[type="email"], input[type="tel"], textarea, select {
  width: 100%; padding: 10px 12px; background: #12171b; color: #E6E9EC;
  border: 1px solid rgba(154,163,169,0.35); border-radius: 8px;
}
input:focus, textarea:focus, select:focus { outline: var(--focus); background: #12171b; }

/* ---------- Utility Flex Helpers ---------- */
.flex-row { display: flex; flex-direction: row; gap: 16px; }
.flex-col { display: flex; flex-direction: column; gap: 16px; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

/* ---------- Cookie Consent Banner ---------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1100;
  display: flex;                  /* flex-only */
  flex-direction: column; gap: 12px;
  background: #12171b;
  border-top: 1px solid rgba(154,163,169,0.35);
  box-shadow: 0 -8px 24px rgba(0,0,0,0.4);
  padding: 16px 20px;
  transform: translateY(100%);
  transition: transform .35s ease;
}
.cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner .cookie-row { display: flex; flex-direction: column; gap: 12px; }
.cookie-banner p { color: var(--clr-ink-muted, #B8C0C5); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .btn-primary { background: var(--clr-secondary, #C46A3A); color: #111; }
.cookie-actions .btn-secondary { border-color: rgba(154,163,169,0.45); color: var(--clr-accent, #F5F1E8); }
.cookie-actions .btn-ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 14px; border-radius: 8px; border: 1px dashed rgba(154,163,169,0.45); color: var(--clr-ink, #E6E9EC); background: transparent; transition: background .25s ease, border-color .25s ease; }
.cookie-actions .btn-ghost:hover { background: rgba(154,163,169,0.12); border-color: rgba(154,163,169,0.6); }

/* Cookie Preferences Modal */
.cookie-modal-backdrop {
  position: fixed; inset: 0; z-index: 1200;
  display: none;                /* toggled by .open */
  background: rgba(0,0,0,0.6);
}
.cookie-modal-backdrop.open { display: flex; }
.cookie-modal {
  margin: auto; width: min(720px, 92%);
  display: flex; flex-direction: column; gap: 16px;
  background: var(--clr-panel, #1b2227);
  border: 1px solid rgba(154,163,169,0.35);
  border-left: 4px solid var(--clr-steel, #9AA3A9);
  border-radius: 12px; padding: 20px;
  box-shadow: var(--shadow-2);
  transform: translateY(20px);
  transition: transform .3s ease;
}
.cookie-modal-backdrop.open .cookie-modal { transform: translateY(0); }
.cookie-modal .modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal .modal-body { display: flex; flex-direction: column; gap: 12px; }
.cookie-modal .modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* Optional cookie toggles */
.cookie-toggle { display: flex; align-items: center; gap: 10px; }
.cookie-toggle input { accent-color: var(--clr-secondary, #C46A3A); width: 18px; height: 18px; }

/* ---------- Page-specific touches ---------- */
/* Index strengths/FAQ lists spacing */
.text-section ul li + li, .text-section ol li + li { margin-top: 4px; }

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

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

  /* Header large screens */
  .main-nav { display: flex; align-items: center; gap: 6px; }
  .mobile-menu-toggle { display: none; }

  /* Layout refinements */
  .content-wrapper { flex-direction: row; align-items: flex-start; justify-content: space-between; }
  .hero .content-wrapper { flex-direction: column; align-items: flex-start; }

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

  /* Footer */
  footer .content-wrapper { flex-direction: row; align-items: flex-start; justify-content: space-between; }
}

@media (min-width: 992px) {
  h1 { font-size: 48px; }
  .container { max-width: 1200px; }
  .main-nav { gap: 10px; }
}

/* ---------- Visual Accents & Dividers ---------- */
/* Subtle top divider lines inside sections */
section .text-section { border-top: 1px solid rgba(154,163,169,0.16); padding-top: 12px; }

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

/* ---------- Safety: Prevent overlaps & ensure spacing ---------- */
section + section { margin-top: 0; }
.card + .card, .testimonial-card + .testimonial-card { margin-top: 20px; }

/* ---------- Misc Page Elements from HTML ---------- */
/* Footer text blocks */
footer .text-section p { color: var(--clr-ink-muted, #B8C0C5); }

/* Nav button in header should stand out */
header .btn-primary { background: var(--clr-secondary, #C46A3A); color: #111; }
header .btn-primary:hover { background: #de7a46; }

/* Accessibility: aria-current in any nav */
nav a[aria-current="page"] { font-weight: 700; }

/* Ensure adequate gaps in content grids even if added later */
.content-grid > * { flex: 1 1 280px; min-width: 260px; }

/* Make sure testimonial text is always readable */
.testimonial-card a { color: #1d4ed8; text-decoration: underline; }

/* Ensure all interactive elements show pointer cursor */
button, .btn-primary, .btn-secondary, .cookie-actions .btn-ghost { cursor: pointer; }
