/* =========================================================
   Tangled Path – Internationale Rentenbegleitung
   Professional Corporate Theme (blue/gray, structured, business fonts)
   Mobile-first, Flexbox-only layouts, high contrast & accessibility
   ========================================================= */

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

/* ----------------------------
   2) Theme Variables & Base
   ---------------------------- */
:root {
  --color-primary: #1B3A5B; /* brand navy */
  --color-secondary: #1E5A4D; /* green accent */
  --color-accent: #F3F6FA; /* light background */
  --color-bg: #FFFFFF;
  --color-text: #1A2733; /* dark gray-blue for body text */
  --color-muted: #5C6B7A; /* muted gray-blue */
  --color-border: #D6DEE8; /* light border */
  --color-link: #1B3A5B;
  --color-link-hover: #142B44;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 6px 16px rgba(16, 30, 54, 0.12);
  --shadow-lg: 0 10px 30px rgba(16, 30, 54, 0.18);
  --radius-sm: 6px; --radius-md: 10px; --radius-lg: 14px;
}

body {
  font-family: Verdana, Segoe UI, Tahoma, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4 { font-family: Georgia, 'Times New Roman', serif; color: var(--color-primary); line-height: 1.25; }

h1 { font-size: 32px; margin-bottom: 12px; }
h2 { font-size: 24px; margin-bottom: 12px; }
h3 { font-size: 18px; margin-bottom: 8px; color: #22384F; }
@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }
}

p, li { font-size: 16px; color: var(--color-text); }
small { font-size: 14px; color: var(--color-muted); }

/* Links */
a { color: var(--color-link); }
a:hover { color: var(--color-link-hover); }
a:active { opacity: 0.9; }

/* Selection */
::selection { background: #DCE8F8; color: #0E2A47; }

/* ----------------------------
   3) Global Layout Helpers (Flexbox only)
   ---------------------------- */
.container {
  width: 100%;
  max-width: 1160px;
  padding: 0 20px;
  margin: 0 auto;
  display: flex; /* flexbox-only layout */
  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; }

/* Page sections default rhythm (also applied to raw section elements) */
main section { padding: 40px 0; }
main section + section { border-top: 1px solid var(--color-accent); }

/* Alternate subtle backgrounds for rhythm */
main section:nth-of-type(even) { background: var(--color-accent); }

/* Content wrappers */
.content-wrapper { display: flex; flex-direction: column; gap: 16px; }
.text-section { display: flex; flex-direction: column; gap: 14px; }
.content-grid > * { flex: 1 1 280px; }

/* Lists spacing */
ul, ol { display: block; }
ul li, ol li { margin-bottom: 8px; }
ul li::marker { color: var(--color-secondary); }
ol { padding-left: 22px; }

/* Subheadline */
.subheadline { color: var(--color-muted); font-size: 18px; }
@media (min-width: 768px) { .subheadline { font-size: 20px; } }

/* Inline icon alignment in paragraphs */
p img[alt] { display: inline-block; vertical-align: middle; margin-right: 8px; width: 18px; height: 18px; }

/* ----------------------------
   4) Header & Navigation
   ---------------------------- */
header { position: relative; background: #FFFFFF; border-bottom: 1px solid var(--color-accent); box-shadow: var(--shadow-sm); }
header .container { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }

.logo { display: flex; align-items: center; }
.logo img { height: 38px; width: auto; }

.main-nav { display: none; align-items: center; gap: 18px; flex-wrap: wrap; }
.main-nav a { color: #22384F; padding: 8px 4px; border-radius: 6px; transition: color .2s ease, background-color .2s ease; }
.main-nav a:hover { background: var(--color-accent); color: var(--color-primary); }
.main-nav a[aria-current="page"] { color: var(--color-primary); font-weight: bold; }

.header-cta { display: none; align-items: center; gap: 10px; flex-wrap: wrap; }
.header-cta a { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--color-primary); background: var(--color-primary); color: #fff; transition: transform .1s ease, background-color .2s ease, border-color .2s ease; }
.header-cta a:hover { background: #16314D; border-color: #16314D; }
.header-cta a:active { transform: scale(0.98); }
.header-cta a + a { background: #fff; color: var(--color-primary); border-color: var(--color-primary); }
.header-cta a + a:hover { background: var(--color-accent); }

/* Mobile menu toggle */
.mobile-menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 8px; border: 1px solid var(--color-border); background: #fff; transition: background-color .2s ease, border-color .2s ease; }
.mobile-menu-toggle:hover { background: var(--color-accent); border-color: #C8D4E2; }

/* Mobile menu overlay */
.mobile-menu {
  position: fixed; inset: 0; background: #FFFFFF; z-index: 2000;
  transform: translateX(100%);
  transition: transform .35s ease;
  display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch; gap: 20px; padding: 20px;
  box-shadow: var(--shadow-lg);
}
.mobile-menu.open { transform: translateX(0); }
body.menu-open { overflow: hidden; }

.mobile-menu-close { align-self: flex-end; width: 42px; height: 42px; border: 1px solid var(--color-border); border-radius: 8px; background: #fff; }
.mobile-nav { display: flex; flex-direction: column; gap: 10px; }
.mobile-nav a { padding: 12px 8px; border-radius: 8px; color: #1A2733; border: 1px solid transparent; }
.mobile-nav a:hover { background: var(--color-accent); border-color: var(--color-border); }
.mobile-nav a[aria-current="page"] { color: var(--color-primary); font-weight: bold; }

/* Show desktop nav on >=768px */
@media (min-width: 768px) {
  .main-nav { display: flex; }
  .header-cta { display: flex; }
  .mobile-menu-toggle { display: none; }
}

/* ----------------------------
   5) Breadcrumbs
   ---------------------------- */
.breadcrumbs { background: var(--color-accent); border-bottom: 1px solid var(--color-border); font-size: 14px; }
.breadcrumbs .container { flex-direction: row; align-items: center; justify-content: flex-start; padding-top: 8px; padding-bottom: 8px; }
.breadcrumbs a { color: var(--color-primary); text-decoration: underline; }

/* ----------------------------
   6) CTA Buttons & Groups
   ---------------------------- */
.cta-group { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cta-group a { display: inline-flex; align-items: center; justify-content: center; padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid var(--color-primary); transition: transform .1s ease, background-color .2s ease, color .2s ease, border-color .2s ease; }
.cta-group a:first-child { background: var(--color-primary); color: #fff; }
.cta-group a:first-child:hover { background: #16314D; border-color: #16314D; }
.cta-group a:last-child { background: #fff; color: var(--color-primary); }
.cta-group a:last-child:hover { background: var(--color-accent); }
.cta-group a:active { transform: scale(0.98); }

/* Links in text sections that should look like buttons */
.text-section a, .content-wrapper > a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--color-primary); border-radius: var(--radius-sm); background: #fff; color: var(--color-primary); transition: background-color .2s ease, transform .1s ease; }
.text-section a:hover, .content-wrapper > a:hover { background: var(--color-accent); }
.text-section a:active, .content-wrapper > a:active { transform: scale(0.98); }

/* ----------------------------
   7) Trust & Stats Blocks
   ---------------------------- */
.trust-badges, .stats { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; color: var(--color-muted); }
.trust-badges p, .stats p { margin: 0; }
.trust-badges img, .stats img { width: 18px; height: 18px; margin-right: 6px; }
.stats strong { color: var(--color-primary); }

/* ----------------------------
   8) Testimonials (High Contrast, light background)
   ---------------------------- */
.testimonial-card { background: #FFFFFF; border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-md); color: #0F2236; }
.testimonial-card p { margin: 0; }
.testimonial-card p + p { color: #29455F; }

/* ----------------------------
   9) Footer
   ---------------------------- */
footer { background: #0F2236; color: #E6EDF5; margin-top: 40px; }
footer .container { padding-top: 32px; padding-bottom: 32px; }
footer .content-wrapper { display: flex; flex-wrap: wrap; gap: 24px; }
footer .content-wrapper > * { flex: 1 1 240px; }
footer h3 { color: #C3D3E6; font-size: 16px; margin-bottom: 10px; }
footer nav { display: flex; flex-direction: column; gap: 8px; }
footer a { color: #E6EDF5; }
footer a:hover { color: #FFFFFF; text-decoration: underline; }
.brand-block { display: flex; flex-direction: column; gap: 10px; }
.brand-block img { width: 44px; height: auto; }
.language-switcher { display: flex; align-items: center; }
footer p { margin: 0; }

/* ----------------------------
   10) Responsive Text-Image Section (if used)
   ---------------------------- */
.text-image-section { align-items: center; }
.text-image-section > * { flex: 1 1 320px; }
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; }
}

/* ----------------------------
   11) Generic Cards (for future content)
   ---------------------------- */
.card { background: #FFFFFF; border: 1px solid var(--color-border); border-radius: var(--radius-md); box-shadow: var(--shadow-sm); padding: 18px; transition: box-shadow .2s ease, transform .1s ease; }
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }

/* ----------------------------
   12) Tables & Code (basic)
   ---------------------------- */
table { width: 100%; border-collapse: collapse; }
th, td { border: 1px solid var(--color-border); padding: 10px; text-align: left; }
th { background: var(--color-accent); }
code, pre { font-family: Consolas, Monaco, monospace; background: #F7FAFD; border: 1px solid var(--color-border); border-radius: 6px; padding: 2px 6px; }

/* ----------------------------
   13) Accessibility & Micro-interactions
   ---------------------------- */
[aria-current="page"] { position: relative; }
[aria-current="page"]::after { content: ""; display: block; height: 2px; background: var(--color-secondary); margin-top: 4px; border-radius: 2px; }

/* ----------------------------
   14) Mobile-first adjustments
   ---------------------------- */
@media (min-width: 992px) {
  .container { gap: 24px; }
  main section { padding: 56px 0; }
}

/* ----------------------------
   15) Cookie Consent Banner & Modal
   ---------------------------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 2500;
  background: #FFFFFF; border-top: 1px solid var(--color-border);
  box-shadow: 0 -6px 16px rgba(16,30,54,0.12);
  transform: translateY(100%); opacity: 0; transition: transform .35s ease, opacity .35s ease;
}
.cookie-banner.show { transform: translateY(0); opacity: 1; }
.cookie-banner .container { flex-direction: column; gap: 12px; padding-top: 16px; padding-bottom: 16px; }
.cookie-text { color: #1A2733; font-size: 14px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.cookie-btn { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--color-border); background: #fff; color: var(--color-primary); transition: background-color .2s ease, transform .1s ease; }
.cookie-btn:hover { background: var(--color-accent); }
.cookie-accept { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.cookie-accept:hover { background: #16314D; border-color: #16314D; }
.cookie-reject { border-color: #C8D4E2; color: #0F2236; }
.cookie-settings { border-color: var(--color-secondary); color: var(--color-secondary); }

/* Cookie Modal */
.cookie-modal { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(10,20,30,0.55); opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.cookie-modal.open { opacity: 1; pointer-events: auto; }
.cookie-modal-content {
  width: 100%; max-width: 680px; background: #FFFFFF; border-radius: 12px; border: 1px solid var(--color-border); box-shadow: var(--shadow-lg);
  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: 14px; }
.cookie-pref-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--color-border); border-radius: 10px; background: #FAFCFF; }
.cookie-pref-left { display: flex; flex-direction: column; gap: 4px; }

/* Toggle switch */
.toggle { position: relative; width: 46px; height: 26px; background: #C9D6E5; border-radius: 26px; transition: background-color .2s ease; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; background: #fff; border-radius: 50%; box-shadow: var(--shadow-sm); transition: transform .2s ease; }
.toggle.on { background: var(--color-secondary); }
.toggle.on::after { transform: translateX(20px); }
.toggle.disabled { opacity: 0.6; }

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

/* ----------------------------
   16) Forms (basic, if added later)
   ---------------------------- */
.form-row { display: flex; flex-wrap: wrap; gap: 16px; }
.input { display: flex; flex-direction: column; gap: 6px; flex: 1 1 240px; }
input[type="text"], input[type="email"], input[type="tel"], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--color-border); border-radius: 8px; background: #fff; transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus, textarea:focus, select:focus { border-color: #96B1CF; box-shadow: 0 0 0 3px rgba(150,177,207,0.25); }

/* ----------------------------
   17) Utility classes
   ---------------------------- */
.hidden { display: none !important; }
.muted { color: var(--color-muted); }
.center { display: flex; align-items: center; justify-content: center; }
.space-between { display: flex; align-items: center; justify-content: space-between; }

/* ----------------------------
   18) Page-specific fine-tuning
   ---------------------------- */
/* Hero-like first section headlines */
main section:first-of-type h1 { letter-spacing: 0.2px; }

/* Lists in "FAQ" and similar text sections get more breathing room */
.text-section ul li { margin-bottom: 10px; }
.text-section ol li { margin-bottom: 10px; }

/* Emphasis in informational blocks */
strong { color: #132A44; }

/* ----------------------------
   19) Desktop enhancements
   ---------------------------- */
@media (min-width: 768px) {
  .breadcrumbs .container { padding-top: 10px; padding-bottom: 10px; }
  .cta-group { gap: 12px; }
  footer .content-wrapper { gap: 32px; }
}

/* ----------------------------
   20) Print basics
   ---------------------------- */
@media print {
  .mobile-menu-toggle, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  a { text-decoration: underline; }
  header, footer { box-shadow: none; border: none; }
}
