/* =============================
   Brilliant Dynamo Rentenberatung
   style.css – modern_bold theme
   Mobile-first, flexbox-only, high-contrast
   ============================= */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@700;900&family=Source+Sans+3:wght@400;600;700&display=swap');

/* CSS Reset & 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 { color:#2d7ba0; text-decoration: none; }
ul, ol { margin: 0; padding-left: 1.25rem; }
p { margin: 0; }
button { font: inherit; border: none; background: none; cursor: pointer; }
:focus-visible { outline: 3px solid #2E6F8E; outline-offset: 2px; }

/* Theme Variables */
:root {
  --primary: #0C3C66;
  --secondary: #2E6F8E;
  --accent: #F5F8FC;
  --ink: #0F1720; /* dark text */
  --muted: #5A6B7A;
  --white: #FFFFFF;
  --outline: #D7E2ED;
  --success: #15A85C;
  --danger: #D7263D;
  --shadow-sm: 0 2px 6px rgba(12, 60, 102, 0.08);
  --shadow-md: 0 8px 20px rgba(12, 60, 102, 0.12);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
}

/* Typography */
body {
  font-family: 'Source Sans 3', system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3 {
  font-family: 'Merriweather', Georgia, 'Times New Roman', serif;
  color: var(--primary);
  line-height: 1.2;
  margin: 0 0 14px 0;
  text-wrap: balance;
}

h1 { font-size: 42px; font-weight: 900; letter-spacing: -0.5px; }
@media (min-width: 768px) { h1 { font-size: 52px; } }
@media (min-width: 1024px) { h1 { font-size: 60px; } }

h2 { font-size: 28px; font-weight: 900; letter-spacing: -0.2px; position: relative; }
@media (min-width: 768px) { h2 { font-size: 34px; } }

h3 { font-size: 20px; font-weight: 800; letter-spacing: 0; }
@media (min-width: 768px) { h3 { font-size: 22px; } }

.subheadline { font-size: 18px; color: var(--muted); max-width: 75ch; }

/* Bold geometric accent under headings */
h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 6px;
  background: var(--secondary);
  border-radius: 3px;
  margin-top: 10px;
}

/* Layout Containers – Flexbox only */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: flex-start;
}

/* General section spacing (mobile-first) */
section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0;
  margin-bottom: 60px; /* ensure spacing between sections */
  background: var(--white);
}

/* HERO highlight: first section */
main > section:first-of-type {
  background: var(--accent);
}
main > section:first-of-type .content-wrapper {
  padding: 20px;
  border-radius: var(--radius-lg);
}

/* Mandatory spacing and 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; }
@media (max-width: 768px) { .text-image-section { flex-direction: column; align-items: flex-start; } }

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--outline);
}
header .container {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 14px;
  padding-bottom: 14px;
}
header img { height: 36px; }

.main-nav {
  display: none; /* mobile hidden */
  align-items: center;
  gap: 16px;
}
.main-nav a {
  font-weight: 700;
  color: var(--primary);
  padding: 10px 12px;
  border-radius: 10px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.main-nav a:hover { background: var(--accent); color:#15A85C; }
.main-nav a:active { transform: translateY(1px); }

.cta-header {
  display: none;
  background: var(--secondary);
  color: var(--white);
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s ease, transform 0.15s ease;
}
.cta-header:hover { background: var(--primary); transform: translateY(-1px); color: white;}

.mobile-menu-toggle {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--primary);
  color: var(--white);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.mobile-menu-toggle:hover { background: var(--secondary); }

/* Desktop nav show */
@media (min-width: 1024px) {
  .main-nav { display: flex; }
  .cta-header { display: inline-flex; align-items: center; }
  .mobile-menu-toggle { display: none; }
}

/* Mobile Menu Overlay */
.mobile-menu {
  position: fixed; inset: 0;
  background: var(--white);
  transform: translateX(100%);
  transition: transform 0.35s ease;
  z-index: 1200;
  display: flex; flex-direction: column; padding: 20px; gap: 20px;
  box-shadow: -10px 0 24px rgba(12,60,102,0.15);
}
.mobile-menu.is-open { transform: translateX(0); }
body.menu-open { overflow: hidden; }

.mobile-menu-close {
  align-self: flex-end;
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--accent); color: var(--primary);
}
.mobile-nav { display: flex; flex-direction: column; gap: 8px; }
.mobile-nav a {
  padding: 14px 12px; border-radius: 10px;
  font-weight: 800; color: var(--primary);
  border: 1px solid var(--outline);
}
.mobile-nav a:hover { background: var(--accent); }

/* Links */
a { color: var(--secondary); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color:#15A85C; text-decoration: underline; }

/* CTAs */
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }

.cta-primary, .cta-button {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 18px; border-radius: 14px; font-weight: 900; letter-spacing: 0.2px;
  background: var(--primary); color: var(--white);
  box-shadow: var(--shadow-md);
  transition: transform 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.cta-primary:hover, .cta-button:hover { background: var(--secondary); transform: translateY(-2px); box-shadow: 0 12px 28px rgba(12,60,102,0.18); color: white; }

.cta-secondary {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 16px; border-radius: 12px; font-weight: 800;
  border: 2px solid var(--primary); color: var(--primary);
  background: var(--white);
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.cta-secondary:hover { background: var(--accent); color: var(--secondary); transform: translateY(-2px); }

.cta-inline { font-weight: 800; color: var(--primary); position: relative; padding-right: 26px; }
.cta-inline::after { content: '→'; position: relative; left: 8px; transition: left 0.2s ease; }
.cta-inline:hover::after { left: 12px; }

.secondary-link, .secondary-contact-option { font-weight: 700; }

.response-note { color: var(--muted); font-size: 14px; }

/* Lists */
ul li, ol li { margin-bottom: 8px; }
ul { list-style: disc; }
ol { list-style: decimal; }

/* Icon rows */
.benefit-icons, .trust-badges {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center;
}
.benefit-icons img, .trust-badges img { width: 36px; height: 36px; }

/* Feature Grid, Service Cards, Pricing, Country Panels */
.feature-grid, .service-cards, .pricing-cards, .country-panels, .testimonial-list {
  display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch;
}
.feature-grid > div, .service-cards > div, .pricing-cards > div, .country-panels > div {
  flex: 1 1 260px; min-width: 260px;
  background: var(--white);
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 10px; align-items: flex-start;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}
.feature-grid > div:hover,
.service-cards > div:hover,
.pricing-cards > div:hover,
.country-panels > div:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.feature-grid img { width: 42px; height: 42px; }

/* Service list */
.service-list { display: flex; flex-direction: column; gap: 14px; }
.service-list > li { list-style: none; border: 1px solid var(--outline); border-radius: var(--radius-md); padding: 16px; box-shadow: var(--shadow-sm); }

/* Testimonial cards – light background, dark text for readability */
.testimonial-list { align-items: stretch; }
.testimonial-card {
  flex: 1 1 300px; min-width: 280px; max-width: 100%;
  background: var(--accent); color: var(--ink);
  border: 1px solid var(--outline);
  border-left: 8px solid var(--secondary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.testimonial-card p { margin: 0; font-weight: 600; }
.testimonial-card span { color: var(--muted); font-size: 14px; font-weight: 700; }

.rating-summary {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 999px; background: var(--white);
  border: 1px solid var(--outline); box-shadow: var(--shadow-sm);
  font-weight: 800; color: var(--primary);
}
.rating-summary img { width: 20px; height: 20px; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-list details {
  border: 1px solid var(--outline);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq-list summary {
  cursor: pointer; list-style: none;
  padding: 14px 16px; font-weight: 800; color: var(--primary);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list details[open] summary { border-bottom: 1px solid var(--outline); }
.faq-list details > div { padding: 14px 16px; color: var(--ink); }

/* Location / Map snippet */
.location-snippet, .map-or-directions {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 14px; border: 1px solid var(--outline); border-radius: 999px;
  background: var(--white); color: var(--primary); box-shadow: var(--shadow-sm);
}
.location-snippet img, .map-or-directions img { width: 20px; height: 20px; }

/* Footer */
footer { background: var(--primary); color: var(--white); margin-top: 40px; }
footer .container { padding-top: 30px; padding-bottom: 30px; gap: 24px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.footer-nav nav { display: flex; flex-direction: column; gap: 8px; min-width: 220px; }
.footer-nav a { color: var(--white); opacity: 0.95; font-weight: 700; }
.footer-nav a:hover { opacity: 1; text-decoration: underline;}
.footer-contact p, .newsletter-optin p, .newsletter-optin h3 { margin: 0; }
.newsletter-optin {
  display: flex; flex-direction: column; gap: 8px; padding: 16px;
  background: rgba(255,255,255,0.06); border-radius: var(--radius-md);
}
.newsletter-optin h3 {
  color: white;
}
footer .copyright { opacity: 0.9; font-size: 14px; }

/* Tables (if any appear) */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; border: 1px solid var(--outline); text-align: left; }

/* Forms (generic) */
input, select, textarea { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--outline); font: inherit; }
label { font-weight: 700; color: var(--primary); }

/* Responsive layout tweaks */
@media (min-width: 768px) {
  .container { gap: 24px; }
}

/* Header container wider alignment on desktop */
@media (min-width: 1200px) {
  header .container { padding-left: 0; padding-right: 0; }
}

/* Utility classes */
.hidden { display: none !important; }
.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; }

/* Decorative geometric corners for bold style */
.feature-grid > div::before, .service-cards > div::before, .pricing-cards > div::before {
  content: ""; position: absolute; top: -1px; left: -1px; width: 24px; height: 24px;
  background: var(--secondary); border-bottom-right-radius: 12px; border-top-left-radius: var(--radius-sm);
}
.feature-grid > div, .service-cards > div, .pricing-cards > div { position: relative; }

/* Content emphasis in hero lists */
main > section:first-of-type ul { display: flex; flex-direction: column; gap: 8px; padding-left: 18px; }

/* Rating emphasis icon baseline */
.rating-summary img { filter: saturate(1.2); }

/* Page-specific niceties */
.package-comparison { display: flex; flex-direction: column; gap: 10px; }

/* Ensure adequate spacing between all cards */
.service-cards > div + div,
.pricing-cards > div + div,
.country-panels > div + div,
.feature-grid > div + div { margin-left: 0; }

/* Details/summary chevron */
.faq-list summary::after {
  content: '\25BC'; font-size: 12px; color: var(--secondary); transition: transform 0.2s ease;
}
.faq-list details[open] summary::after { transform: rotate(180deg); }

/* Strong paragraph within hero */
main > section:first-of-type .subheadline { font-weight: 600; color: var(--primary); }

/* Header nav scroll behavior for small screens */
@media (max-width: 360px) {
  header img { height: 30px; }
}

/* COOKIE CONSENT BANNER */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1400;
  display: flex; flex-direction: column; gap: 14px;
  background: var(--white); color: var(--ink);
  border-top: 2px solid var(--secondary);
  box-shadow: 0 -8px 20px rgba(12,60,102,0.12);
  padding: 16px 20px;
}
.cookie-banner .cookie-text { display: flex; flex-direction: column; gap: 8px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-btn { padding: 12px 16px; border-radius: 12px; font-weight: 800; }
.cookie-accept { background: var(--primary); color: var(--white); }
.cookie-accept:hover { background: var(--secondary); }
.cookie-reject { background: var(--accent); color: var(--primary); border: 1px solid var(--outline); }
.cookie-settings { background: var(--white); color: var(--primary); border: 2px solid var(--primary); }
.cookie-banner.is-hidden { display: none; }

/* COOKIE MODAL */
.cookie-overlay { position: fixed; inset: 0; background: rgba(15,23,32,0.55); z-index: 1490; display: none; }
.cookie-overlay.is-open { display: block; }
.cookie-modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(560px, 92vw);
  background: var(--white); color: var(--ink);
  border-radius: var(--radius-lg);
  border: 1px solid var(--outline);
  box-shadow: var(--shadow-md);
  z-index: 1500; display: none;
  padding: 20px; display: flex; flex-direction: column; gap: 16px;
}
.cookie-modal.is-open { display: flex; }
.cookie-modal .cookie-groups { display: flex; flex-direction: column; gap: 12px; }
.cookie-group { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--outline); border-radius: 12px; background: var(--accent); }
.cookie-modal .modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* Toggle switch */
.toggle { display: inline-flex; align-items: center; gap: 10px; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.switch {
  width: 46px; height: 26px; border-radius: 999px; background: #C9D6E2; position: relative; transition: background 0.2s ease;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); box-shadow: var(--shadow-sm); transition: transform 0.2s ease;
}
.toggle input:checked + .switch { background: var(--secondary); }
.toggle input:checked + .switch::after { transform: translateX(20px); }

/* Accessibility for cookie modal close etc. */
.cookie-close { align-self: flex-end; width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: var(--primary); }

/* HEADER NAV underline for current page (optional via [aria-current]) */
.main-nav a[aria-current="page"], .mobile-nav a[aria-current="page"] { background: var(--accent); color: var(--secondary); }

/* Fine-tuned spacing for text blocks */
.content-wrapper > p + ul, .content-wrapper > p + ol { margin-top: 6px; }
.content-wrapper > ul + p, .content-wrapper > ol + p { margin-top: 6px; }

/* Ensure all content cards have breathing room on small screens */
@media (max-width: 768px) {
  .feature-grid > div, .service-cards > div, .pricing-cards > div, .country-panels > div { width: 100%; }
}

/* Desktop enhancements */
@media (min-width: 1024px) {
  .content-wrapper { gap: 20px; }
}

/* Strong visual hierarchy: emphasize important inline strong tags */
strong { color: var(--primary); font-weight: 800; }

/* HR rule (if used) */
hr { border: none; height: 1px; background: var(--outline); margin: 24px 0; }

/* Ensure top alignment when needed */
.align-start { align-items: flex-start; }

/* High-contrast badges */
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 999px; background: var(--accent); color: var(--primary); font-weight: 800; border: 1px solid var(--outline); }

/* Make lists inside cards nicely spaced */
.feature-grid > div ul, .service-cards > div ul, .pricing-cards > div ul, .country-panels > div ul { padding-left: 18px; margin: 0; }

/* Prevent overlaps with adequate gaps */
.content-grid, .card-container, .testimonial-list { gap: 20px; }

/* Micro-interactions for icons */
.trust-badges img:hover, .benefit-icons img:hover { transform: scale(1.05); transition: transform 0.15s ease; }

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