/* ======================================================================
   Motive Surge Rentenberatung – style.css
   Design: modern_bold (bold fonts, bright accents, geometric shapes, high contrast)
   Layout: FLEXBOX ONLY (no CSS Grid/Columns)
   ====================================================================== */

/* ------------------------------
   CSS Reset & Base Normalize
   ------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img, svg { display: block; max-width: 100%; height: auto; }
a { background-color: transparent; text-decoration: none; color: inherit; }
ul, ol { margin: 0; padding: 0 0 0 1.25rem; }
h1, h2, h3, h4, h5, h6, p { margin: 0 0 16px 0; }
button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid #2E8A7A; outline-offset: 2px; }

/* ------------------------------
   Root Variables (with fallbacks)
   ------------------------------ */
:root {
  --primary: #0A3A63; /* Navy */
  --secondary: #2E8A7A; /* Teal */
  --accent: #F4F7FB; /* Light */
  --text: #0B1A2B; /* Dark neutral */
  --muted: #5B6B7A; /* Muted text */
  --white: #FFFFFF;
  --black: #000000;
  --danger: #C62828; /* for toggles/errors */
  --warning: #F5A524; /* optional highlight */

  --radius-8: 8px;
  --radius-12: 12px;
  --radius-16: 16px;

  --shadow-sm: 0 4px 12px rgba(10,58,99,0.12);
  --shadow-md: 0 10px 30px rgba(10,58,99,0.18);

  --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
   ------------------------------ */
body {
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text, #0B1A2B);
  background: var(--white, #FFFFFF);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--primary, #0A3A63);
}

h1 { font-size: 40px; line-height: 1.15; }
h2 { font-size: 28px; line-height: 1.2; }
h3 { font-size: 22px; line-height: 1.3; }

p, li, a, summary { font-size: 16px; }

.kicker {
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--secondary, #2E8A7A);
}

.a11y-note, .data-note {
  background: var(--accent, #F4F7FB);
  border-left: 6px solid var(--secondary, #2E8A7A);
  padding: 12px 14px;
  border-radius: var(--radius-8);
  color: var(--text);
}

/* Strong, high-contrast links */
a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--secondary); text-decoration-color: var(--secondary); }

/* ------------------------------
   Layout Helpers (Flex Only)
   ------------------------------ */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: var(--space-20);
}

/* 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; }

/* Default section spacing for all sections */
main > section { margin-bottom: var(--space-60); padding: var(--space-40) 0; background: transparent; }

/* ---------------------------------
   Header + Navigation (Flex Only)
   --------------------------------- */
header {
  background: var(--white);
  border-bottom: 4px solid var(--accent);
  position: relative;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
  padding-top: 14px; padding-bottom: 14px;
}

.logo img { height: 36px; width: auto; }

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

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

/* Mobile burger */
.mobile-menu-toggle {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 2px solid var(--primary);
  border-radius: 10px;
  color: var(--primary);
  background: var(--white);
  transition: transform .2s ease, background-color .2s ease, color .2s ease;
}
.mobile-menu-toggle:hover { background: var(--primary); color: var(--white); transform: translateY(-2px); }

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  background: var(--primary);
  color: var(--white);
  transform: translateX(100%);
  transition: transform .35s ease;
  z-index: 1500;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mobile-menu[aria-hidden="false"], .mobile-menu.open { transform: translateX(0); }

.mobile-menu-close {
  align-self: flex-end;
  width: 44px; height: 44px;
  border: 2px solid var(--white);
  border-radius: 10px;
  color: var(--white);
}
.mobile-nav { display: flex; flex-direction: column; gap: 6px; }
.mobile-nav a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--white);
  font-weight: 700;
  background: rgba(255,255,255,0.06);
}
.mobile-nav a:hover { background: rgba(255,255,255,0.14); }
.mobile-nav a[aria-current="page"] { background: var(--secondary); color: var(--white); }

/* ---------------------------------
   Hero Section (bold, geometric)
   --------------------------------- */
.hero {
  position: relative;
  background: var(--accent);
  overflow: hidden;
}
.hero::before, .hero::after {
  content: ""; position: absolute; pointer-events: none; z-index: 0;
}
/* Geometric blocks (decorative only) */
.hero::before {
  width: 220px; height: 220px; background: var(--secondary);
  top: -60px; right: -60px; border-radius: 24px;
  transform: rotate(15deg);
}
.hero::after {
  width: 140px; height: 140px; background: var(--primary);
  bottom: -40px; left: -40px; border-radius: 18px;
  transform: rotate(-12deg);
}
.hero .container { position: relative; z-index: 1; }
.hero .content-wrapper { gap: var(--space-16); }
.hero h1 { color: var(--primary); }
.hero p { max-width: 800px; }

/* Trust badges */
.trust-badges ul {
  list-style: none;
  display: flex; flex-wrap: wrap; gap: 12px 16px;
  padding: 0; margin: 0;
}
.trust-badges li {
  display: flex; align-items: center; gap: 8px;
  background: var(--white);
  border: 2px solid var(--primary);
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--primary);
  font-weight: 700;
}
.trust-badges img { width: 18px; height: 18px; }

.language-switcher { color: var(--muted); font-weight: 700; }
.language-switcher a { color: var(--primary); text-decoration: none; }
.language-switcher a:hover { color: var(--secondary); text-decoration: underline; }

/* ---------------------------------
   Buttons (bold, high-contrast)
   --------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 18px;
  border-radius: 12px;
  border: 2px solid var(--primary);
  background: var(--white);
  color: var(--primary);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); background: var(--accent); }

.btn-primary { background: var(--primary); color: var(--white); border-color: var(--primary); }
.btn-primary:hover { background: #094058; box-shadow: var(--shadow-md); }

.btn-secondary { background: var(--secondary); color: var(--white); border-color: var(--secondary); }
.btn-secondary:hover { background: #277968; box-shadow: var(--shadow-md); }

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

/* ---------------------------------
   Text Sections & Lists
   --------------------------------- */
.text-section { display: flex; flex-direction: column; gap: 14px; max-width: 980px; }
.text-section ul { list-style: none; padding-left: 0; display: flex; flex-direction: column; gap: 10px; }
.text-section ul li {
  position: relative;
  padding-left: 28px;
}
.text-section ul li::before {
  content: "";
  position: absolute; left: 0; top: 8px;
  width: 14px; height: 14px;
  background: var(--secondary);
  border-radius: 4px; /* geometric */
}
.text-section ol { padding-left: 20px; }
.text-section details { border: 2px solid var(--accent); border-radius: 10px; padding: 10px 12px; background: var(--white); }
.text-section summary { cursor: pointer; font-weight: 800; color: var(--primary); }
.text-section details[open] { border-color: var(--secondary); background: var(--accent); }

/* ---------------------------------
   Testimonials (light bg, dark text)
   --------------------------------- */
.testimonial-card {
  background: var(--white);
  border: 2px solid var(--primary);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  color: var(--text);
}
.testimonial-card p { margin: 0; }

/* ---------------------------------
   Footer
   --------------------------------- */
footer {
  background: var(--primary);
  color: var(--white);
  padding: 30px 0;
  margin-top: 20px;
}
footer .content-wrapper {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 20px 32px;
  align-items: flex-start;
  justify-content: space-between;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 16px; }
.footer-nav a { color: var(--white); opacity: 0.9; font-weight: 700; }
.footer-nav a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 3px; }
footer .logo img { filter: brightness(0) invert(1); height: 32px; }

/* ---------------------------------
   Responsive Helpers
   --------------------------------- */
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; }
}

@media (min-width: 769px) {
  h1 { font-size: 56px; }
  h2 { font-size: 36px; }
  h3 { font-size: 24px; }

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

  .hero .content-wrapper { max-width: 980px; }
}

/* ---------------------------------
   Cards / Generic Blocks (for reuse)
   --------------------------------- */
.card {
  background: var(--white);
  border: 2px solid var(--accent);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 20px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

/* ---------------------------------
   Nav active states in all navs
   --------------------------------- */
nav a[aria-current="page"] { font-weight: 900; }

/* ---------------------------------
   Tables (just in case)
   --------------------------------- */
table { width: 100%; border-collapse: collapse; }
th, td { border: 1px solid var(--accent); padding: 10px; text-align: left; }
th { background: var(--accent); color: var(--primary); }

/* ---------------------------------
   Forms (future-proof)
   --------------------------------- */
input, select, textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--accent);
  border-radius: 10px;
  font: inherit;
}
input:focus, select:focus, textarea:focus { border-color: var(--secondary); outline: none; box-shadow: 0 0 0 3px rgba(46,138,122,0.25); }

/* ---------------------------------
   Mobile-first spacing for sections
   --------------------------------- */
main > section .container { gap: var(--space-20); }

/* ---------------------------------
   Mobile Menu Animation (reduced motion)
   --------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------------------------------
   COOKIE CONSENT: banner + modal
   --------------------------------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--accent);
  color: var(--text);
  border-top: 4px solid var(--secondary);
  box-shadow: 0 -8px 24px rgba(10,58,99,0.15);
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  z-index: 1600;
}
.cookie-banner .cookie-content { display: flex; flex-direction: column; gap: 12px; }
.cookie-banner .cookie-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-banner .btn { padding: 10px 14px; }
.cookie-accept { background: var(--secondary); color: var(--white); border-color: var(--secondary); }
.cookie-reject { background: var(--white); color: var(--primary); border-color: var(--primary); }
.cookie-settings { background: var(--white); color: var(--secondary); border-color: var(--secondary); }

/* Cookie Preferences Modal */
.cookie-modal {
  position: fixed; inset: 0; /* top/right/bottom/left */
  background: rgba(0,0,0,0.6);
  display: none; /* shown via .open */
  align-items: center; justify-content: center;
  padding: 20px;
  z-index: 2000;
}
.cookie-modal.open { display: flex; }
.cookie-modal-content {
  background: var(--white);
  color: var(--text);
  border-radius: 16px;
  width: 100%; max-width: 680px;
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; gap: 16px;
  padding: 20px;
}
.cookie-modal-header { display: flex; align-items: center; justify-content: space-between; }
.cookie-modal-body { display: flex; flex-direction: column; gap: 12px; }
.cookie-category { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 2px solid var(--accent); border-radius: 12px; padding: 12px; }
.cookie-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* Toggle switch */
.toggle { display: inline-flex; align-items: center; gap: 8px; }
.switch { position: relative; width: 46px; height: 26px; background: var(--accent); border: 2px solid var(--primary); border-radius: 999px; display: inline-flex; align-items: center; padding: 2px; }
.switch .dot { width: 18px; height: 18px; background: var(--primary); border-radius: 50%; transform: translateX(0); transition: transform .2s ease, background-color .2s ease; }
.switch.on { background: var(--secondary); border-color: var(--secondary); }
.switch.on .dot { background: var(--white); transform: translateX(20px); }

/* ---------------------------------
   Accessibility helpers
   --------------------------------- */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------------------------------
   Page-specific minor tweaks
   --------------------------------- */
.hero + section h2 { margin-top: 0; }

/* Make sure all flex containers have gaps to prevent overlap */
header .container, .content-wrapper, .card-container, .content-grid, .text-image-section, .testimonial-card, .feature-item, .cta-group, .mobile-nav, footer .content-wrapper { gap: 20px; }

/* Ensure proper alignment in text-image sections across viewports */
.text-image-section { align-items: center; }

/* ---------------------------------
   Desktop adjustments
   --------------------------------- */
@media (min-width: 992px) {
  header .container { gap: 24px; }
  .main-nav a { padding: 10px 12px; }
  .logo img { height: 40px; }
}
