/* BreezeSteer Rentenkompass – Minimalist Flexbox-Only UI System
   Author: Senior CSS Developer & UI Designer
   Notes: Mobile-first, minimalist, brand-consistent. Flexbox only. No CSS Grid/Columns.
*/

/* ------------------------------
   0) Reset & Base Normalize
------------------------------ */
* { box-sizing: border-box; }
*::before, *::after { box-sizing: inherit; }
html { line-height: 1.5; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Verdana, Geneva, Tahoma, sans-serif; color: #0A2E4E; background: #FFFFFF; }
img, svg { display: block; max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid #2D6A6A; outline-offset: 2px; }

/* Typography */
h1, h2, h3, h4, h5 { font-family: Georgia, 'Times New Roman', serif; color: #0A2E4E; line-height: 1.25; margin: 0 0 12px; }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px 20px; padding: 0; }
li { margin: 6px 0; }
strong { font-weight: 700; }
a { color: #0A2E4E; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Typographic scale */
h1 { font-size: 32px; }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
body, a, li, p { font-size: 16px; }
small { font-size: 14px; }

@media (min-width: 768px) {
  h1 { font-size: 40px; }
  h2 { font-size: 28px; }
  h3 { font-size: 20px; }
}
@media (min-width: 1024px) {
  h1 { font-size: 48px; }
  h2 { font-size: 32px; }
  h3 { font-size: 22px; }
}

/* ------------------------------
   1) Design Tokens (CSS variables with fallbacks)
------------------------------ */
:root {
  --color-primary: #0A2E4E; /* deep blue */
  --color-secondary: #2D6A6A; /* teal */
  --color-accent: #F4F7FA; /* light neutral */
  --color-text: #0A2E4E; /* dark text */
  --color-border: #E6EDF3; /* subtle border */
  --shadow-sm: 0 1px 3px rgba(10, 46, 78, 0.08);
  --shadow-md: 0 6px 16px rgba(10, 46, 78, 0.10);
  --radius: 10px;
  --radius-sm: 8px;
  --radius-lg: 14px;
}

/* ------------------------------
   2) Layout Helpers (Flexbox only)
------------------------------ */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex; /* flex container */
  flex-direction: column;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

/* Mandatory spacing & alignment patterns */
.section { margin-bottom: 60px; padding: 40px 20px; display: flex; flex-direction: column; gap: 16px; }
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: #FFFFFF; border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; display: flex; flex-direction: column; gap: 10px; transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.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; background: var(--color-accent); color: var(--color-text); border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* Generic section spacing for all <section> tags */
main > section { margin-bottom: 60px; padding: 40px 0; display: flex; }
main > section > .container { gap: 0; }

/* Hero - first section */
main > section:first-of-type { background: var(--color-accent); border-bottom: 1px solid var(--color-border); }
main > section:first-of-type .content-wrapper { padding: 20px 0; }

/* Lists inside content wrapper for better rhythm */
.content-wrapper ul, .content-wrapper ol { display: flex; flex-direction: column; gap: 8px; }

/* ------------------------------
   3) Header & Navigation
------------------------------ */
header { position: sticky; top: 0; z-index: 1000; background: #FFFFFF; border-bottom: 1px solid var(--color-border); box-shadow: 0 1px 0 rgba(10,46,78,0.03); }
header > .container { padding: 14px 20px; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
.logo img { height: 34px; width: auto; }

.main-nav { display: none; align-items: center; gap: 18px; }
.main-nav a { padding: 8px 10px; border-radius: 6px; color: var(--color-text); }
.main-nav a[aria-current="page"] { background: var(--color-accent); border: 1px solid var(--color-border); }
.main-nav a:hover { text-decoration: none; background: var(--color-accent); }

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

/* Mobile menu toggle */
.mobile-menu-toggle { background: transparent; border: 1px solid var(--color-border); border-radius: 8px; padding: 8px 12px; cursor: pointer; box-shadow: var(--shadow-sm); transition: background .2s ease, box-shadow .2s ease; }
.mobile-menu-toggle:hover { background: var(--color-accent); box-shadow: var(--shadow-md); }

/* Mobile menu overlay */
.mobile-menu { position: fixed; inset: 0; width: 100%; background: #FFFFFF; transform: translateX(100%); transition: transform .3s ease; z-index: 2000; display: flex; flex-direction: column; }
.mobile-menu.open, body.menu-open .mobile-menu { transform: translateX(0); }
.mobile-menu-close { align-self: flex-end; margin: 16px 20px 0 0; background: transparent; border: 1px solid var(--color-border); border-radius: 8px; padding: 8px 12px; cursor: pointer; }
.mobile-nav { display: flex; flex-direction: column; gap: 8px; padding: 20px; }
.mobile-nav a { padding: 14px 12px; border-radius: 8px; border: 1px solid var(--color-border); background: #FFFFFF; color: var(--color-text); box-shadow: var(--shadow-sm); }
.mobile-nav a[aria-current="page"] { background: var(--color-accent); }
.mobile-nav a:hover { background: var(--color-accent); text-decoration: none; }

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

/* ------------------------------
   4) Buttons & Interactive Elements
------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: background .2s ease, color .2s ease, box-shadow .2s ease, transform .1s ease; white-space: nowrap; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--color-primary); color: #FFFFFF; box-shadow: var(--shadow-sm); }
.btn.primary:hover { background: #083049; color: #FFFFFF; box-shadow: var(--shadow-md); }
.btn.secondary { background: #FFFFFF; color: var(--color-primary); border-color: var(--color-primary); }
.btn.secondary:hover { background: var(--color-accent); }
.btn:focus-visible { box-shadow: 0 0 0 3px rgba(45,106,106,0.35); }

/* Inline link styles in content */
.content-wrapper a:not(.btn) { text-decoration: underline; text-underline-offset: 2px; }
.content-wrapper a:not(.btn):hover { color: var(--color-secondary); }

/* ------------------------------
   5) Content Blocks & Components
------------------------------ */
/* Text-image sections */
.text-image-section > * { flex: 1 1 320px; }

/* Testimonials - ensure dark text on light background for readability */
.testimonial-card p { margin: 0; }
.testimonial-card p + p { opacity: 0.9; }

/* Ordered/Unordered list spacing inside sections */
.content-wrapper > ul, .content-wrapper > ol { margin-top: 4px; }

/* Emphasis boxes (if needed) */
.note, .info { display: flex; flex-direction: column; gap: 8px; background: var(--color-accent); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 16px; }

/* ------------------------------
   6) Footer
------------------------------ */
footer { background: #FFFFFF; border-top: 1px solid var(--color-border); }
footer .content-wrapper { flex-direction: column; gap: 20px; padding: 20px 0; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 18px; }
.footer-nav a { padding: 6px 8px; border-radius: 6px; color: var(--color-text); }
.footer-nav a:hover { background: var(--color-accent); text-decoration: none; }

@media (min-width: 992px) {
  footer .content-wrapper { flex-direction: row; justify-content: space-between; align-items: flex-start; gap: 32px; }
}

/* ------------------------------
   7) Forms (basic)
------------------------------ */
input[type="text"], input[type="email"], input[type="tel"], textarea { width: 100%; padding: 12px 14px; border-radius: 8px; border: 1px solid var(--color-border); background: #FFFFFF; color: var(--color-text); box-shadow: var(--shadow-sm) inset; }
input:focus, textarea:focus { border-color: var(--color-secondary); box-shadow: 0 0 0 3px rgba(45,106,106,0.15); }
label { display: flex; margin-bottom: 6px; font-weight: 600; }

/* ------------------------------
   8) Spacing Utilities
------------------------------ */
.mt-0 { margin-top: 0 !important; }
.mt-20 { margin-top: 20px !important; }
.mb-20 { margin-bottom: 20px !important; }
.mb-40 { margin-bottom: 40px !important; }
.py-20 { padding-top: 20px !important; padding-bottom: 20px !important; }

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

/* ------------------------------
   9) Responsive Behavior
------------------------------ */
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; align-items: center; }
}

/* Wider screens */
@media (min-width: 992px) {
  .content-grid > * { flex: 1 1 calc(50% - 20px); }
}
@media (min-width: 1200px) {
  .content-grid > * { flex: 1 1 calc(33% - 20px); }
}

/* ------------------------------
   10) Accessibility & States
------------------------------ */
[aria-current="page"] { font-weight: 700; }
:where(.btn, a, button) { transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .1s ease; }

/* ------------------------------
   11) Cookie Consent Banner & Modal
------------------------------ */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1500; background: #FFFFFF; border-top: 1px solid var(--color-border); box-shadow: 0 -6px 20px rgba(10,46,78,0.06); transform: translateY(100%); transition: transform .3s ease; display: flex; }
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .container { padding: 16px 20px; flex-direction: column; gap: 12px; }
.cookie-banner .cookie-row { display: flex; flex-direction: column; gap: 12px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .btn { padding: 10px 14px; }
.cookie-actions .btn.reject { background: #FFFFFF; border-color: var(--color-secondary); color: var(--color-secondary); }
.cookie-actions .btn.reject:hover { background: var(--color-accent); }

/* Cookie modal overlay */
.cookie-modal { display: none; position: fixed; inset: 0; z-index: 3000; background: rgba(10,46,78,0.45); align-items: center; justify-content: center; padding: 20px; }
.cookie-modal.show { display: flex; }
.cookie-modal .modal-content { background: #FFFFFF; border: 1px solid var(--color-border); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 20px; width: 100%; max-width: 640px; display: flex; flex-direction: column; gap: 16px; }
.cookie-modal .modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cookie-modal .modal-body { display: flex; flex-direction: column; gap: 12px; }
.cookie-modal .pref-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--color-border); }
.cookie-modal .modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* Toggle switch */
.toggle { position: relative; width: 46px; height: 26px; background: #D7E3EA; border-radius: 20px; border: 1px solid var(--color-border); display: inline-flex; align-items: center; padding: 2px; transition: background .2s ease; }
.toggle .knob { width: 20px; height: 20px; background: #FFFFFF; border-radius: 50%; box-shadow: var(--shadow-sm); transform: translateX(0); transition: transform .2s ease; }
.toggle.on { background: #2D6A6A; }
.toggle.on .knob { transform: translateX(20px); }

/* Visually hidden (for native inputs) */
.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; }

/* ------------------------------
   12) Cards & Micro-interactions
------------------------------ */
.shadow-hover { transition: transform .2s ease, box-shadow .2s ease; box-shadow: var(--shadow-sm); }
.shadow-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ------------------------------
   13) Page-specific subtle touches
------------------------------ */
/* Give additional breathing room to headline blocks */
main > section .content-wrapper h1 + p { margin-top: -4px; opacity: 0.95; }

/* Ensure testimonials are distinct and readable */
.content-wrapper .testimonial-card { margin-top: 6px; }

/* Footer logo size alignment */
footer img { height: 28px; width: auto; }

/* ------------------------------
   14) Print basics (optional minimal)
------------------------------ */
@media print {
  header, footer, .mobile-menu, .cookie-banner, .cookie-modal { display: none !important; }
  main > section { padding: 16px 0; margin-bottom: 24px; }
  a { text-decoration: underline; }
}
