/* ============================
   Sonnenfeld Rentenkompass
   Warm & Friendly UI – style.css
   Mobile-first • Flexbox-only • Accessible
   ============================ */

/* ----------------------------
   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, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; }
:focus-visible { outline: 3px solid rgba(255, 153, 102, 0.45); outline-offset: 2px; border-radius: 10px; }

/* ----------------------------
   THEME TOKENS (with fallbacks)
---------------------------- */
:root {
  --color-primary: #0B3D62; /* Brand primary */
  --color-primary-600: #0D4772; /* hover */
  --color-secondary: #2E7D6E; /* Brand secondary */
  --color-secondary-600: #296B5F; /* hover */
  --color-accent: #F5F7FA; /* Brand accent */
  /* Warm friendly complements */
  --color-warm-bg: #FFF7EE;
  --color-warm-100: #FFE8D6;
  --color-warm-200: #FFD8B5;
  --color-ink: #1F2D3D; /* Main text */
  --color-muted: #5B6775;
  --color-border: #E6E6E6;
  --color-white: #FFFFFF;
  --shadow-soft: 0 8px 24px rgba(11, 61, 98, 0.06), 0 2px 6px rgba(11, 61, 98, 0.05);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --space-8: 8px; --space-12: 12px; --space-16: 16px; --space-20: 20px; --space-24: 24px; --space-32: 32px; --space-40: 40px; --space-60: 60px;
  --transition-base: 200ms ease;
  --transition-slow: 320ms ease;
}

/* ----------------------------
   BASE TYPOGRAPHY
---------------------------- */
body {
  font-family: Verdana, Arial, sans-serif; /* Brand body */
  color: var(--color-ink);
  background: #FFFDFC;
  background: var(--color-accent, #F5F7FA);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; /* Brand display */ color: var(--color-primary); letter-spacing: 0.2px; }

h1 { font-size: 32px; line-height: 1.25; margin-bottom: var(--space-16); }
h2 { font-size: 24px; line-height: 1.3; margin-bottom: var(--space-16); }
h3 { font-size: 18px; line-height: 1.35; margin-bottom: var(--space-12); }

p { margin-bottom: var(--space-12); color: var(--color-ink); }
.small, .microcopy { font-size: 14px; color: var(--color-muted); }
strong { font-weight: 700; }

/* ----------------------------
   LAYOUT HELPERS (Flex only)
---------------------------- */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
}

.content-wrapper {
  display: flex; /* flex-only */
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-20);
}

main > section { margin-bottom: var(--space-60); padding: var(--space-40) 0; }

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

/* Extend common components in this design */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-20);
  box-shadow: var(--shadow-soft);
}

/* ----------------------------
   HEADER / NAVIGATION
---------------------------- */
header {
  position: sticky;
  top: 0; z-index: 1000;
  background: var(--color-white);
  box-shadow: 0 2px 14px rgba(11, 61, 98, 0.06);
}

header .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-16); padding: var(--space-16) 0; }

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

.main-nav {
  display: none; /* mobile-first: hidden */
  gap: var(--space-16);
  align-items: center;
}
.main-nav a {
  padding: 10px 12px;
  color: var(--color-primary);
  border-radius: var(--radius-sm);
  transition: background var(--transition-base), color var(--transition-base), transform var(--transition-base);
}
.main-nav a:hover { background: var(--color-accent); transform: translateY(-1px); }
.main-nav a[aria-current="page"] { background: var(--color-warm-100); color: var(--color-primary); font-weight: 700; }

.nav-ctas { display: none; gap: var(--space-12); align-items: center; }

.language-switcher { color: var(--color-muted); font-size: 14px; padding: 6px 10px; background: var(--color-accent); border-radius: var(--radius-sm); }

/* Mobile hamburger */
.mobile-menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 12px;
  background: var(--color-warm-100);
  box-shadow: var(--shadow-soft);
}
.mobile-menu-toggle:hover { background: var(--color-warm-200); }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; /* top:0 right:0 bottom:0 left:0 */
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-20);
  background: var(--color-white);
  padding: var(--space-24);
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  z-index: 1200;
}
.mobile-menu.open { transform: translateX(0); }

.mobile-menu-close {
  position: absolute; top: 12px; right: 12px; /* allowed for interactive control */
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--color-accent);
}
.mobile-nav { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.mobile-nav a { padding: 12px 10px; border-radius: 12px; background: var(--color-accent); color: var(--color-primary); }
.mobile-nav a:hover { background: var(--color-warm-100); }

/* ----------------------------
   HERO SECTION
---------------------------- */
.hero { background: var(--color-warm-bg, #FFF7EE); }
.hero .content-wrapper { padding: var(--space-32) 0; }
.hero h1 { font-size: 30px; }
.hero p { font-size: 16px; color: var(--color-ink); }

/* Trust badges */
.trust-badges ul { display: flex; flex-wrap: wrap; gap: var(--space-12); }
.trust-badges li { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--color-white); border: 1px solid var(--color-border); border-radius: 999px; box-shadow: var(--shadow-soft); font-size: 14px; }

/* ----------------------------
   BREADCRUMBS
---------------------------- */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--color-muted); }

/* ----------------------------
   TEXT SECTIONS / LISTS
---------------------------- */
.text-section { display: flex; flex-direction: column; gap: 12px; }
.text-section ul, .text-section ol { display: flex; flex-direction: column; gap: 10px; padding-left: 0; }
.text-section li { display: flex; align-items: flex-start; gap: 10px; }
.text-section li img { width: 18px; height: 18px; margin-top: 2px; }

/* ----------------------------
   CTA ROW / BUTTONS
---------------------------- */
.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-12); align-items: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: var(--radius-md); border: 1px solid var(--color-border); background: var(--color-white); color: var(--color-primary); font-weight: 600; box-shadow: var(--shadow-soft); transition: transform var(--transition-base), background var(--transition-base), color var(--transition-base), box-shadow var(--transition-base); }
.btn:hover { transform: translateY(-2px); background: var(--color-accent); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--color-primary); color: var(--color-white); border-color: transparent; }
.btn-primary:hover { background: var(--color-primary-600); box-shadow: 0 10px 24px rgba(11,61,98,0.18); }

.btn-secondary { background: var(--color-secondary); color: var(--color-white); border-color: transparent; }
.btn-secondary:hover { background: var(--color-secondary-600); box-shadow: 0 10px 24px rgba(46,125,110,0.18); }

/* ----------------------------
   TESTIMONIALS (Readable: dark on light)
---------------------------- */
.testimonial-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}
.testimonial-card p { margin: 0; }

/* ----------------------------
   FOOTER
---------------------------- */
footer { background: var(--color-primary); color: var(--color-white); }
footer .content-wrapper { padding: var(--space-32) 0; }
.footer-top { display: flex; flex-wrap: wrap; gap: var(--space-20); align-items: center; justify-content: space-between; width: 100%; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-24); align-items: flex-start; justify-content: space-between; width: 100%; }
.footer-links > div { display: flex; flex-direction: column; gap: 10px; min-width: 220px; }
footer h3 { color: #FCEFE6; font-size: 16px; margin-bottom: 4px; }
footer nav { display: flex; flex-direction: column; gap: 8px; }
footer nav a { color: #EAF2F7; font-size: 14px; padding: 6px 0; }
footer nav a:hover { color: #FFFFFF; text-decoration: underline; }
footer address { font-style: normal; font-size: 14px; color: #EAF2F7; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: var(--space-12); align-items: center; justify-content: space-between; padding-top: var(--space-20); border-top: 1px solid rgba(255,255,255,0.2); font-size: 14px;  }
    .footer-bottom p {
        color: #fff;
    }
    /* ----------------------------
   LINKS
---------------------------- */
    a {
        color: var(--color-secondary);
    }


/* ----------------------------
   UTILITIES & GENERIC SECTIONS
---------------------------- */
.text-image-section > * { flex: 1 1 320px; }
.content-grid > * { flex: 1 1 300px; min-width: 260px; }
.card-container > .card { flex: 1 1 300px; }

/* Ensure minimum spacing between blocks */
section .card, section .testimonial-card, section .feature-item { margin-bottom: 20px; }

/* ----------------------------
   TABLES (if any appear in guides)
---------------------------- */
table { width: 100%; border-collapse: collapse; border: 1px solid var(--color-border); border-radius: var(--radius-sm); overflow: hidden; display: block; }
tr { display: flex; flex-wrap: nowrap; width: 100%; }
th, td { flex: 1 1 0; padding: 12px; border-bottom: 1px solid var(--color-border); font-size: 14px; }
th { background: var(--color-accent); text-align: left; font-family: Georgia, "Times New Roman", serif; color: var(--color-primary); }

/* ----------------------------
   COOKIE CONSENT
---------------------------- */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px;
  display: flex; flex-direction: column; gap: 12px; align-items: flex-start;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 16px;
  transform: translateY(120%);
  transition: transform var(--transition-slow), opacity var(--transition-slow);
  opacity: 0;
  z-index: 1600;
}
.cookie-banner.show { transform: translateY(0); opacity: 1; }
.cookie-banner p { font-size: 14px; color: var(--color-ink); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .btn { padding: 10px 14px; font-size: 14px; }
.cookie-actions .btn-accept { background: var(--color-secondary); color: #fff; border-color: transparent; }
.cookie-actions .btn-accept:hover { background: var(--color-secondary-600); }
.cookie-actions .btn-reject { background: var(--color-accent); color: var(--color-primary); }
.cookie-actions .btn-settings { background: var(--color-warm-100); color: var(--color-primary); }

/* Cookie settings modal */
.cookie-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity var(--transition-slow);
  z-index: 1700;
}
.cookie-modal-backdrop.open { opacity: 1; pointer-events: auto; }
.cookie-modal {
  background: var(--color-white);
  width: 100%; max-width: 720px; margin: 16px; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  display: flex; flex-direction: column; gap: 16px; padding: 20px;
}
.cookie-modal h3 { margin-bottom: 4px; }
.cookie-category { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-accent); }
.cookie-modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; }

/* Simple toggle style (if used) */
.toggle { display: flex; align-items: center; gap: 10px; }
.toggle-switch { width: 44px; height: 26px; border-radius: 999px; background: #D1D5DB; position: relative; transition: background var(--transition-base); }
.toggle-switch::after { content: ""; width: 20px; height: 20px; border-radius: 50%; background: #fff; position: absolute; left: 3px; top: 3px; transition: transform var(--transition-base); box-shadow: var(--shadow-soft); }
.toggle input:checked + .toggle-switch { background: var(--color-secondary); }
.toggle input:checked + .toggle-switch::after { transform: translateX(18px); }

/* ----------------------------
   ACCESSIBILITY / STATES
---------------------------- */
[aria-current="page"], .active { font-weight: 700; }

/* ----------------------------
   RESPONSIVE BREAKPOINTS
---------------------------- */
@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; }
  .nav-ctas { display: flex; }
  .mobile-menu-toggle { display: none; }

  .hero .content-wrapper { padding: var(--space-40) 0; }

  .content-wrapper { flex-direction: row; align-items: center; justify-content: space-between; }

  /* text-image sections become side-by-side */
  .text-image-section { flex-direction: row; }
}

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

/* ----------------------------
   PAGE-SPECIFIC POLISH
---------------------------- */
/* Hero spacing and rounded container feel */
.hero .container { display: flex; }
.hero .container .content-wrapper { width: 100%; background: var(--color-white); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-24); box-shadow: var(--shadow-soft); }

/* Breadcrumb subtle chip */
.breadcrumbs { background: var(--color-accent); padding: 6px 10px; border-radius: 999px; }

/* Lists inside text sections use warm bullets when no icons are present */
.text-section ul li::before { content: "•"; color: #F2994A; margin-right: 8px; line-height: 1; transform: translateY(1px); }
.text-section ul li { position: relative; padding-left: 0; }

/* Contact info rows */
.text-section li img + span, .text-section li img + p { margin-left: 6px; }

/* CTA Buttons alignment in footers or cards */
.footer .btn { background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.2); }
.footer .btn:hover { background: rgba(255,255,255,0.18); }

/* Language switcher in footer-top (home page) */
.footer-top .language-switcher { background: rgba(255,255,255,0.15); color: #fff; }

/* ----------------------------
   SAFETY GAPS TO PREVENT OVERLAPS
---------------------------- */
header .container, footer .container { padding-top: 6px; padding-bottom: 6px; }
section .container { display: flex; flex-direction: column; gap: var(--space-20); }
section .content-wrapper { width: 100%; }

/* Ensure minimum gap between stacked sections */
main > section + section { margin-top: 0; }

/* ----------------------------
   PRINT (basic)
---------------------------- */
@media print {
  header, footer, .mobile-menu, .cookie-banner, .cookie-modal-backdrop { display: none !important; }
  body { background: #fff; }
}
