/* ===============================
   Sly Navigator Ausbau – Vibrant Energetic CSS
   Mobile-first, Flexbox-only, solid colors, accessible
   =============================== */

/* -------------------------------
   CSS Reset & Normalize
---------------------------------- */
* { box-sizing: border-box; }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; }
body { margin: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 12px; font-weight: 800; line-height: 1.2; }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px 20px; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid #00E5FF; outline-offset: 2px; }

/* -------------------------------
   Theme Variables
---------------------------------- */
:root {
  --primary: #1F3947;   /* Deep slate blue */
  --secondary: #B96A3A; /* Warm copper */
  --accent: #F5F7FA;    /* Soft light */
  --text: #0F2430;      /* Main text */
  --muted: #6B7C88;     /* Muted text */
  --surface: #FFFFFF;   /* Cards / surfaces */
  --line: #E4EBF0;      /* Hairline borders */
  --shadow: rgba(15, 36, 48, 0.1);
  /* Vibrant energetic accents */
  --electric-1: #00E5FF; /* electric cyan */
  --electric-2: #FF3D71; /* hot pink-red */
  --electric-3: #32E875; /* lime green */
}

/* -------------------------------
   Base Typography & Body
---------------------------------- */
body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: #ffffff;
}
.display, h1, h2, h3 { font-family: Montserrat, Inter, "Helvetica Neue", Arial, sans-serif; }

/* Type scale */
h1 { font-size: 32px; letter-spacing: -0.02em; }
h2 { font-size: 24px; letter-spacing: -0.01em; }
h3 { font-size: 18px; }
small, .small { font-size: 14px; color: var(--muted); }

/* Containers & Layout helpers – Flex-only */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex; /* flex-only */
  flex-direction: column;
}
.content-wrapper {
  display: flex; /* flex-only */
  flex-direction: column;
  gap: 20px;
}

/* Mandatory Spacing & Alignment Patterns */
.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; }

/* Global spacing utilities */
.section-gap { margin-bottom: 60px; }
.stack-8 > * + * { margin-top: 8px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-24 > * + * { margin-top: 24px; }
.stack-32 > * + * { margin-top: 32px; }

/* Link styles */
a:hover { color: var(--secondary); }
a.underline, .content-wrapper a { text-decoration: underline; text-underline-offset: 3px; }
.content-wrapper a.btn { text-decoration: none; }

/* -------------------------------
   Header & Navigation
---------------------------------- */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 10px var(--shadow);
}
header .content-wrapper {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
}
.logo img { height: 36px; }

.main-nav { display: none; gap: 16px; align-items: center; }
.main-nav a {
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--text);
  font-weight: 600;
}
.main-nav a[aria-current="page"] { color: var(--secondary); }
.main-nav a:hover { background: var(--accent); }

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

.mobile-menu-toggle {
  display: inline-flex;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  background: var(--primary);
  color: #fff; border-radius: 10px;
  box-shadow: 0 6px 14px rgba(31,57,71,0.2);
}
.mobile-menu-toggle:hover { background: #244454; }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed;
  inset: 0 0 0 auto;
  width: 100%;
  max-width: 360px;
  background: var(--surface);
  box-shadow: -10px 0 30px rgba(0,0,0,0.2);
  transform: translateX(100%);
  transition: transform 300ms ease;
  z-index: 1500;
  display: flex; flex-direction: column;
}
.mobile-menu.open { transform: translateX(0%); }
.mobile-menu-close {
  align-self: flex-end; margin: 12px; width: 40px; height: 40px;
  border-radius: 10px; background: var(--accent);
}
.mobile-nav { display: flex; flex-direction: column; gap: 8px; padding: 10px 16px 24px; }
.mobile-nav a {
  padding: 14px 12px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--text);
  font-weight: 700;
}
.mobile-nav a[aria-current="page"] { background: var(--primary); color: #fff; }

/* Optional scrim behind drawer (JS can add .mobile-menu-backdrop) */
.mobile-menu-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.35);
  opacity: 0; pointer-events: none; transition: opacity 250ms ease; z-index: 1400;
}
.mobile-menu-backdrop.open { opacity: 1; pointer-events: auto; }

/* -------------------------------
   Buttons
---------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 18px;
  border-radius: 12px;
  border: 2px solid transparent;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: transform 140ms ease, background-color 140ms ease, color 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}
.btn.primary {
  background: var(--electric-2);
  color: #fff;
  box-shadow: 0 10px 20px rgba(255,61,113,0.3);
}
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 14px 26px rgba(255,61,113,0.35); }
.btn.primary:active { transform: translateY(0); }

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

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

/* -------------------------------
   Hero Section – vibrant, high-energy
---------------------------------- */
.hero {
  position: relative;
  background: var(--primary);
  color: #fff;
  overflow: hidden;
}
.hero .content-wrapper { padding: 36px 0; }
.hero h1 { font-size: 28px; }
.hero p { color: #E2EAF0; }
/* Electric corner blocks */
.hero::before, .hero::after {
  content: ""; position: absolute; width: 180px; height: 180px; border-radius: 24px; opacity: 0.12; z-index: 0;
}
.hero::before { background: var(--electric-1); top: -40px; left: -30px; }
.hero::after { background: var(--electric-2); bottom: -40px; right: -30px; }
.hero .container, .hero .content-wrapper, .hero * { position: relative; z-index: 1; }

/* Trust badges & chips */
.trust-badges, .filter-chips {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.trust-badges li, .filter-chips li {
  background: #fff; color: var(--primary);
  border: 2px solid var(--electric-1);
  border-radius: 999px; padding: 8px 12px; font-weight: 700;
}
.filter-chips li { border-color: var(--electric-2); }

/* -------------------------------
   Sections & Content Blocks
---------------------------------- */
main section { padding: 28px 0; }
main section + section { border-top: 1px solid var(--line); }

/* "Warum" feature grid */
.feature-grid { display: flex; flex-wrap: wrap; gap: 20px; }
.feature-grid > div {
  flex: 1 1 260px; min-width: 240px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  box-shadow: 0 6px 14px var(--shadow);
}
.feature-grid h3 { color: var(--primary); font-weight: 800; }

.metrics { font-weight: 700; color: var(--primary); }
.guarantee { color: var(--secondary); font-weight: 700; }

/* Services list */
.service-list { display: flex; flex-wrap: wrap; gap: 20px; list-style: none; margin: 0; padding: 0; }
.service-list > li {
  flex: 1 1 280px; min-width: 260px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  box-shadow: 0 6px 14px var(--shadow);
}
.service-list > li ul { margin-left: 16px; }

/* Steps */
.steps { display: flex; flex-wrap: wrap; gap: 10px; margin-left: 0; padding-left: 0; list-style: none; }
.steps li {
  flex: 1 1 220px; min-width: 200px; background: var(--accent); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px; font-weight: 600;
}

/* Gallery thumbs */
.project-thumbs { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; margin: 0; padding: 0; }
.project-thumbs li { flex: 1 1 240px; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px; }

/* Testimonials – light background, dark text for readability */
.testimonial-card {
  background: #fff; color: var(--text);
  border: 1px solid var(--line); border-left: 6px solid var(--electric-3);
  border-radius: 14px;
  box-shadow: 0 10px 20px var(--shadow);
}
.testimonial-card p { margin: 0; }
.testimonial-card p + p { color: var(--primary); }

/* Pricing cards */
.price-cards { display: flex; flex-wrap: wrap; gap: 20px; list-style: none; margin: 0; padding: 0; }
.price-cards > li {
  flex: 1 1 260px; min-width: 240px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; padding: 18px;
  box-shadow: 0 8px 18px var(--shadow);
}
.price-cards > li h3 { color: var(--primary); }

.note { color: var(--muted); }

/* Values & misc lists */
.values { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.values li { background: var(--accent); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-weight: 600; }

/* Contact blocks */
.contact-block, .contact-details {
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px; background: var(--accent); border: 1px solid var(--line); border-radius: 12px;
}

/* Project cards (referenzen) */
.project-cards { display: flex; flex-wrap: wrap; gap: 20px; list-style: none; margin: 0; padding: 0; }
.project-cards > li {
  flex: 1 1 300px; min-width: 260px; background: #fff;
  border: 1px solid var(--line); border-radius: 16px; padding: 18px;
  box-shadow: 0 10px 20px var(--shadow);
}

/* Articles in cases */
article { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }

/* Packages & Extras */
.packages, .extras { display: flex; flex-direction: column; gap: 10px; }
.packages ul, .extras ul { margin-left: 16px; }

/* Quality check list */
.quality-check { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.quality-check li { background: var(--accent); padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); }

/* Timeline */
.timeline { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-left: 4px solid var(--electric-1); background: #fff; border-radius: 10px; }

/* Sitemap columns – flex only */
.sitemap-columns { display: flex; flex-wrap: wrap; gap: 20px; }
.sitemap-columns > div { flex: 1 1 260px; min-width: 240px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }

/* Toggle groups (cookie settings page) */
.toggle-group { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.toggle-group h3 { margin-bottom: 4px; }

/* -------------------------------
   Footer
---------------------------------- */
footer { background: var(--primary); color: #E8F0F5; margin-top: 20px; }
footer .content-wrapper { flex-direction: row; flex-wrap: wrap; gap: 20px; padding: 24px 0; }
.footer-brand { display: flex; flex-direction: column; gap: 10px; flex: 1 1 260px; }
.footer-brand img { height: 32px; filter: brightness(0) invert(1); }
.footer-nav, .legal-nav, footer address {
  display: flex; flex-direction: column; gap: 8px; flex: 1 1 200px;
}
.footer-nav a, .legal-nav a { color: #E8F0F5; }
.footer-nav a:hover, .legal-nav a:hover { color: var(--electric-1); }
footer address a { color: #fff; text-decoration: underline; }

/* Newsletter block (index footer) */
.newsletter { display: flex; flex-direction: column; gap: 8px; flex: 1 1 260px; }

/* -------------------------------
   Cookie Consent Banner & Modal
---------------------------------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px;
  background: #fff; color: var(--text);
  border: 1px solid var(--line); border-left: 6px solid var(--electric-2);
  border-radius: 14px; box-shadow: 0 14px 30px rgba(0,0,0,0.18);
  padding: 16px; z-index: 1600;
  display: none; /* JS toggles to flex */
  align-items: center; justify-content: space-between; gap: 12px;
}
.cookie-banner.show { display: flex; }
.cookie-text { display: flex; flex-direction: column; gap: 8px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cookie-actions .btn { padding: 10px 14px; }
.cookie-actions .btn.accept { background: var(--electric-3); color: #0b2815; border-color: transparent; }
.cookie-actions .btn.reject { background: #fff; color: var(--electric-2); border-color: var(--electric-2); }
.cookie-actions .btn.settings { background: var(--accent); color: var(--primary); border-color: var(--primary); }

.cookie-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); opacity: 0; pointer-events: none; transition: opacity 200ms ease; z-index: 1700; }
.cookie-overlay.show { opacity: 1; pointer-events: auto; }
.cookie-modal {
  position: fixed; inset: auto 16px 16px 16px; left: 50%; transform: translateX(-50%) translateY(20px);
  max-width: 720px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 20px 40px rgba(0,0,0,0.2);
  padding: 18px; z-index: 1800; opacity: 0; pointer-events: none; transition: opacity 220ms ease, transform 220ms ease;
  display: flex; flex-direction: column; gap: 12px;
}
.cookie-modal.show { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.cookie-modal .modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal .category { display: flex; flex-direction: column; gap: 6px; padding: 12px; background: var(--accent); border: 1px solid var(--line); border-radius: 10px; }
.cookie-modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* -------------------------------
   Micro-interactions
---------------------------------- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.animate-in { animation: fadeInUp 280ms ease both; }

/* -------------------------------
   Headings with energetic underline
---------------------------------- */
.content-wrapper h2 {
  position: relative; padding-bottom: 6px; display: inline-flex; align-items: center; gap: 8px;
}
.content-wrapper h2::after {
  content: ""; height: 4px; width: 56px; background: var(--electric-1); border-radius: 999px;
}

/* -------------------------------
   Accessibility & Misc
---------------------------------- */
[aria-current="page"] { font-weight: 800; }
summary { cursor: pointer; font-weight: 700; }
details { border: 1px solid var(--line); border-radius: 10px; padding: 12px; background: #fff; }
details + details { margin-top: 10px; }

/* Ensure gaps between generic cards/blocks */
main .content-wrapper > * { margin-bottom: 20px; }
main .content-wrapper > *:last-child { margin-bottom: 0; }

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

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

  .main-nav { display: flex; }
  .header-cta { display: flex; }
  .mobile-menu-toggle { display: none; }

  .hero .content-wrapper { padding: 56px 0; }

  .text-image-section { flex-direction: row; }
}

@media (min-width: 1024px) {
  h1 { font-size: 48px; }

  header .content-wrapper { gap: 20px; }
  .main-nav { gap: 20px; }

  .hero::before { width: 240px; height: 240px; }
  .hero::after { width: 240px; height: 240px; }
}

/* -------------------------------
   Page-specific minor tweaks
---------------------------------- */
/* Index footer brand block */
.footer-brand p { color: #CFE1EB; }

/* Legal pages readability */
main h3 { color: var(--primary); font-weight: 800; margin-top: 8px; }
main ul li { margin-bottom: 6px; }

/* Sitemap page title spacing */
#map-title { margin-bottom: 10px; }

/* 404 hero buttons spacing */
.hero .cta-group .btn { border-width: 0; }

/* -------------------------------
   Cards & Generic Elements
---------------------------------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: 0 8px 18px var(--shadow); }
.card:hover { box-shadow: 0 12px 26px rgba(15,36,48,0.18); }

/* -------------------------------
   Ensure flex alignment for required classes
---------------------------------- */
.content-grid { align-items: flex-start; }
.text-image-section { align-items: center; }
.card-container { align-items: stretch; }

/* -------------------------------
   Ensure adequate contrast in testimonials
---------------------------------- */
#testimonials-title, [aria-labelledby="testimonials-title"] .testimonial-card { color: var(--text); }

/* -------------------------------
   Print basics (optional)
---------------------------------- */
@media print {
  header, footer, .mobile-menu, .cookie-banner, .cookie-overlay, .cookie-modal { display: none !important; }
  a { text-decoration: underline; }
}
