/* =========================
   DeutschlandKompass – tech_futuristic UI
   Author: Senior CSS Developer & UI Designer
   Notes:
   - Mobile-first, ONLY flexbox for layouts (no grid/columns)
   - Brand fonts/colors applied with a futuristic twist (neon accents, sleek surfaces)
   - Solid color base with subtle simple gradients only where safe
   - Includes mobile menu & cookie consent styles
   ========================= */

/* ===== CSS RESET / NORMALIZE ===== */
* { box-sizing: border-box; }
*::before, *::after { box-sizing: inherit; }
html, body { margin: 0; padding: 0; }
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
a { color: inherit; text-decoration: none; }

/* ===== THEME VARIABLES (with fallbacks) ===== */
:root {
  --primary: #1C2A3A;
  --secondary: #2E6B57;
  --accent: #F3E7C9;
  --bg: #0F1724; /* tech-dusk */
  --surface: #13202C; /* card surface */
  --surface-2: #0C1520; /* header/nav surface */
  --text: #E6EDF5; /* body text */
  --muted: #9FB3C8; /* secondary text */
  --neon: #26F4D2; /* neon accent */
  --error: #FF5C7A;
  --success: #28D294;
  --shadow: rgba(0, 0, 0, 0.5);
}

/* ===== BASE TYPOGRAPHY ===== */
body {
  font-family: Verdana, Geneva, Tahoma, sans-serif; /* brand body */
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: Georgia, serif; /* brand display */
  color: #F7FAFF;
  letter-spacing: 0.2px;
}

h1 { font-size: 32px; line-height: 1.2; }
h2 { font-size: 24px; line-height: 1.3; margin-bottom: 12px; }
h3 { font-size: 18px; line-height: 1.35; margin-top: 8px; margin-bottom: 8px; }

p, li { font-size: 16px; color: var(--text); }
.subheadline { color: var(--muted); font-size: 18px; margin-top: 10px; }

/* Accessible focus */
:focus-visible { outline: 2px solid var(--neon); outline-offset: 2px; }

/* ===== LAYOUT UTILITIES (only flexbox) ===== */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex; /* mandatory flex layout */
  flex-direction: column;
  gap: 20px;
}

.content-wrapper { display: flex; flex-direction: column; gap: 16px; }

/* 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; display: flex; flex-direction: column; }
.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; }

/* Generic section spacing for semantic <section> */
section { padding: 40px 0; }
section + section { margin-top: 20px; }

/* ===== HEADER & NAV ===== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(12, 21, 32, 0.9);
  backdrop-filter: saturate(120%);
  border-bottom: 1px solid rgba(38, 244, 210, 0.15);
}

header .container { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; padding-bottom: 12px; }
.logo { display: flex; align-items: center; }
.logo img { height: 40px; width: auto; filter: drop-shadow(0 0 4px rgba(38, 244, 210, 0.25)); }

.main-nav { display: none; align-items: center; gap: 16px; }
.main-nav a {
  padding: 10px 12px;
  color: #E9F3FF;
  border-radius: 10px;
  transition: color 200ms ease, background-color 200ms ease, box-shadow 200ms ease;
}
.main-nav a:hover {
  color: var(--neon);
  background-color: rgba(38, 244, 210, 0.06);
  box-shadow: 0 0 0 1px rgba(38, 244, 210, 0.25) inset;
}

/* CTA Buttons */
.button-primary, .button-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 16px; border-radius: 12px;
  border: 1px solid transparent; text-align: center;
  transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease, transform 120ms ease;
}

.button-primary {
  background-color: var(--secondary);
  color: #EFFFFA;
  border-color: rgba(38, 244, 210, 0.2);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(38, 244, 210, 0.0);
}
.button-primary:hover { color: #0B1A22; background-color: var(--neon); box-shadow: 0 8px 22px rgba(38, 244, 210, 0.25); }
.button-primary:active { transform: translateY(1px); }

.button-secondary {
  background-color: transparent;
  color: var(--neon);
  border-color: rgba(38, 244, 210, 0.35);
}
.button-secondary:hover { background-color: rgba(38, 244, 210, 0.08); box-shadow: 0 0 0 2px rgba(38, 244, 210, 0.2) inset; }

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

/* Mobile burger */
.mobile-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  background: transparent; color: #E9F3FF;
  border: 1px solid rgba(38, 244, 210, 0.25); border-radius: 10px;
  transition: background-color 200ms ease, color 200ms ease, box-shadow 200ms ease;
}
.mobile-menu-toggle:hover { background-color: rgba(38, 244, 210, 0.08); color: var(--neon); box-shadow: 0 0 12px rgba(38, 244, 210, 0.2) inset; }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0;
  background: #0B131E; color: #E9F3FF;
  z-index: 2000;
  display: flex; flex-direction: column; gap: 8px;
  padding: 20px 16px;
  transform: translateX(100%);
  transition: transform 280ms ease;
}
.mobile-menu.open, .mobile-menu.is-open { transform: translateX(0); }

.mobile-menu-close {
  align-self: flex-end;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 10px;
  border: 1px solid rgba(38, 244, 210, 0.25);
  background: transparent; color: #E9F3FF;
}
.mobile-menu-close:hover { background-color: rgba(38, 244, 210, 0.08); color: var(--neon); }

.mobile-nav { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.mobile-nav a {
  display: flex; align-items: center; padding: 14px 12px;
  border-radius: 12px; color: #E9F3FF;
  background: rgba(19, 32, 44, 0.65);
  border: 1px solid rgba(38, 244, 210, 0.15);
}
.mobile-nav a:hover { color: var(--neon); background: rgba(38, 244, 210, 0.08); }

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

/* ===== HERO ===== */
.hero {
  background-color: var(--primary);
  /* subtle simple gradient for tech vibe with solid fallback */
  background-image: linear-gradient(180deg, rgba(28, 42, 58, 1) 0%, rgba(19, 32, 44, 1) 100%);
  border-bottom: 1px solid rgba(38, 244, 210, 0.15);
}
.hero .container { padding-top: 40px; padding-bottom: 40px; }
.hero .content-wrapper { gap: 14px; }
.hero h1 { text-shadow: 0 2px 24px rgba(38, 244, 210, 0.08); }

/* ===== TEXT BLOCKS & LISTS ===== */
.text-section { display: flex; flex-direction: column; gap: 16px; }
.text-section ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.text-section li {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(19, 32, 44, 0.5);
  border: 1px solid rgba(38, 244, 210, 0.12);
}
.text-section li img { width: 20px; height: 20px; margin-top: 2px; filter: drop-shadow(0 0 6px rgba(38, 244, 210, 0.25)); }
.text-section a { color: var(--neon); border-bottom: 1px dashed rgba(38, 244, 210, 0.35); }
.text-section a:hover { color: #0B1A22; background: var(--neon); padding: 2px 4px; border-radius: 6px; }

/* ===== CARDS (generic) ===== */
.card {
  background: var(--surface);
  border: 1px solid rgba(38, 244, 210, 0.12);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 10px 24px var(--shadow);
  transition: transform 140ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
.card:hover { transform: translateY(-2px); border-color: rgba(38, 244, 210, 0.35); box-shadow: 0 14px 28px rgba(0,0,0,0.45); }

/* ===== TESTIMONIALS (light for readability) ===== */
.testimonial-card {
  background: #FFFFFF; /* light background for contrast */
  color: #1C2A3A; /* dark text as required */
  border-radius: 14px;
  border: 1px solid #E7E7E7;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  margin-bottom: 20px; /* ensure spacing */
}
.testimonial-card p { color: #1C2A3A; }
.testimonial-card p strong { color: #0A2232; }

/* Accent strip for testimonials */
.testimonial-card::before {
  content: "";
  width: 6px; height: 100%;
  background: var(--secondary);
  border-radius: 6px;
  margin-right: 8px;
}

/* Ensure inner flex alignment works with ::before */
.testimonial-card { padding-left: 14px; }

/* ===== FOOTER ===== */
footer {
  background: #0B131E;
  border-top: 1px solid rgba(38, 244, 210, 0.15);
}
footer .container { padding-top: 28px; padding-bottom: 28px; }
footer .content-wrapper { display: flex; flex-direction: column; gap: 20px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-nav a {
  color: #CFE4FF;
  padding: 8px 10px; border-radius: 8px;
  transition: color 200ms ease, background-color 200ms ease;
}
.footer-nav a:hover { color: var(--neon); background-color: rgba(38, 244, 210, 0.08); }

/* ===== RESPONSIVE TEXT-IMAGE SECTIONS ===== */
.text-image-section { align-items: center; }
@media (min-width: 768px) {
  .text-image-section { flex-wrap: nowrap; }
}
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; }
}

/* ===== LINKS & MICRO INTERACTIONS ===== */
a:hover { filter: brightness(1.02); }

/* ===== GLOBAL BORDERS & DIVIDERS ===== */
hr { border: 0; height: 1px; background: rgba(38, 244, 210, 0.18); margin: 20px 0; }

/* ===== FORMS (basic) ===== */
input[type="text"], input[type="email"], input[type="tel"], textarea, select {
  width: 100%;
  background: #101B28;
  color: var(--text);
  border: 1px solid rgba(38, 244, 210, 0.2);
  border-radius: 10px;
  padding: 12px 14px;
}
input::placeholder, textarea::placeholder { color: #9CB3C8; }

/* ===== MOBILE-FIRST LAYOUT ENHANCEMENTS ===== */
@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }
  .hero .container { padding-top: 56px; padding-bottom: 56px; }
}

@media (min-width: 1024px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  .container { gap: 24px; }
  header .container { padding-top: 14px; padding-bottom: 14px; }
  footer .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; }
}

/* ===== ACCESSIBILITY & CONTRAST ADJUSTMENTS ===== */
strong { color: #FDFEFF; font-weight: 700; }

/* ===== OPTIONAL SUPPORT COMPONENTS ===== */
/* Content grids using flex only */
.content-grid > * { flex: 1 1 280px; min-width: 260px; }

/* Feature item flair */
.feature-item { background: rgba(19, 32, 44, 0.5); border: 1px solid rgba(38, 244, 210, 0.12); border-radius: 12px; padding: 16px; }

/* ===== MOBILE NAV VISIBILITY RULES ===== */
/* Hide desktop CTA on small screens if needed */
@media (max-width: 1023.98px) {
  header .button-primary { display: none; }
}

/* ===== COOKIE CONSENT BANNER ===== */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: #FFFFFF; color: #1C2A3A;
  border-top: 1px solid #E5E7EB;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.08);
  z-index: 3000;
  transform: translateY(100%);
  transition: transform 280ms ease;
}
.cookie-banner.show, .cookie-banner.is-visible { transform: translateY(0); }
.cookie-banner .container { flex-direction: column; align-items: stretch; gap: 12px; padding-top: 16px; padding-bottom: 16px; }
.cookie-banner p { color: #1C2A3A; }
.cookie-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-buttons .button-primary { background: var(--secondary); color: #EFFFFA; border-color: rgba(46, 107, 87, 0.6); }
.cookie-buttons .button-primary:hover { background: var(--neon); color: #0B1A22; }
.cookie-buttons .button-secondary { color: #0B1A22; background: #F3F4F6; border-color: #D1D5DB; }
.cookie-buttons .button-secondary:hover { background: #E5E7EB; }
.cookie-buttons .button-link { display: inline-flex; padding: 12px 10px; color: var(--secondary); border-radius: 10px; }
.cookie-buttons .button-link:hover { color: #0E8B6C; background: #EEF8F5; }

/* ===== COOKIE PREFERENCES MODAL ===== */
.cookie-modal {
  position: fixed; inset: 0; z-index: 4000;
  background: rgba(0, 10, 20, 0.6);
  display: flex; align-items: center; justify-content: center;
  transform: translateY(10%); opacity: 0; pointer-events: none;
  transition: transform 260ms ease, opacity 260ms ease;
}
.cookie-modal.open, .cookie-modal.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.cookie-modal-content {
  width: 100%; max-width: 720px;
  background: #FFFFFF; color: #1C2A3A;
  border-radius: 14px; border: 1px solid #E5E7EB;
  box-shadow: 0 20px 60px rgba(0,0,0,0.18);
  display: flex; flex-direction: column; gap: 16px;
  padding: 20px;
}
.cookie-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid #F0F2F5; }
.cookie-row:last-child { border-bottom: 0; }
.cookie-row .label { display: flex; flex-direction: column; gap: 4px; }
.cookie-row .label small { color: #374151; }

/* Toggle (visual only) */
.toggle { display: flex; align-items: center; }
.toggle input { appearance: none; width: 46px; height: 26px; border-radius: 20px; background: #CBD5E1; position: relative; outline: none; transition: background-color 180ms ease; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #FFFFFF; box-shadow: 0 1px 3px rgba(0,0,0,0.2); transition: transform 180ms ease; }
.toggle input:checked { background: #34D399; }
.toggle input:checked::after { transform: translateX(20px); }

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

/* ===== HELPER CLASSES ===== */
.hide { display: none !important; }
.muted { color: var(--muted) !important; }

/* ===== PAGE-SPECIFIC TUNE-UPS ===== */
/* Make non-hero sections slightly lifted on dark bg */
main section:not(.hero) .content-wrapper {
  background: rgba(19, 32, 44, 0.35);
  border: 1px solid rgba(38, 244, 210, 0.12);
  border-radius: 14px;
  padding: 18px;
}

/* Ensure adequate spacing between testimonial cards */
.testimonial-card + .testimonial-card { margin-top: 16px; }

/* Section titles subtle neon underline effect */
.content-wrapper > h2 {
  position: relative;
  padding-bottom: 6px;
}
.content-wrapper > h2::after {
  content: "";
  display: block; height: 3px; width: 64px;
  background: var(--secondary);
  box-shadow: 0 0 10px rgba(38, 244, 210, 0.25);
  border-radius: 3px;
  margin-top: 8px;
}

/* ===== PRINT BASICS ===== */
@media print {
  header, footer, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  body { color: #000; background: #fff; }
}
