/* =========================
   Rohrhelden Genf - style.css
   Soft Pastel UI • Mobile-first • Flexbox-only
   ========================= */

/* ---------- CSS Reset & Base Normalize ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { line-height: 1.4; -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img, picture, svg, video { max-width: 100%; height: auto; display: block; }
input, button, textarea, select { font: inherit; }
button { border: none; background: none; cursor: pointer; }
:focus { outline: none; }
:focus-visible { outline: 2px dashed #0A66A3; outline-offset: 2px; }

/* ---------- Theme Variables (with fallbacks) ---------- */
:root {
  --primary: #0A66A3;
  --secondary: #1B3A4B;
  --accent: #F3F8FD;
  --bg: #FCFDFF;
  --text: #243B53;
  --muted: #6B7C93;
  --pastel-blue: #E6F1FB;
  --pastel-mint: #EAF7F2;
  --pastel-lilac: #F3EAFB;
  --pastel-peach: #FFEFE7;
  --pastel-yellow: #FFF9DB;
  --shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
  --shadow-sm: 0 4px 14px rgba(16, 24, 40, 0.06);
  --radius: 14px;
  --radius-sm: 10px;
}

/* ---------- Base Typography ---------- */
body {
  background: #FCFDFF; background: var(--bg);
  color: #243B53; color: var(--text);
  font-family: Trebuchet MS, Arial, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3 { color: #1B3A4B; color: var(--secondary); margin: 0 0 12px 0; letter-spacing: 0.2px; }
h1 { font-size: 32px; line-height: 1.2; }
h2 { font-size: 24px; line-height: 1.25; }
h3 { font-size: 18px; line-height: 1.3; }
p { margin: 0 0 14px 0; color: #243B53; }
small, .muted { color: #6B7C93; color: var(--muted); }

ul, ol { margin: 0 0 14px 20px; padding-left: 16px; }
li { margin: 6px 0; }

a { color: #0A66A3; color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

.subheadline { color: #455A6D; font-size: 16px; margin-top: 6px; }

/* ---------- Layout Helpers (Flexbox Only) ---------- */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex; flex-direction: column; gap: 20px;
}
.content-wrapper { display: flex; flex-direction: column; gap: 16px; }
.text-section { display: flex; flex-direction: column; gap: 10px; }
.cta-group { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

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

/* ---------- Pastel Surfaces & Sections ---------- */
section { padding: 40px 0; }
.hero {
  background: #E6F1FB; background: var(--pastel-blue);
  border-bottom: 1px solid #E3ECF7;
}
.hero .content-wrapper { padding: 10px 0; }

/* alternating subtle pastel backgrounds for long pages */
section:nth-of-type(2n) { background: #F3F8FD; background: var(--accent); }

.map-placeholder {
  display: flex; align-items: center; justify-content: center;
  min-height: 180px; border-radius: var(--radius);
  background: #EAF7F2; background: var(--pastel-mint);
  color: #1B3A4B; padding: 16px; text-align: center;
  box-shadow: var(--shadow-sm);
}

/* ---------- Header & Navigation ---------- */
header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.86);
  backdrop-filter: saturate(150%) blur(6px);
  border-bottom: 1px solid #E9EEF5;
}
header > .container { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; }
.logo img { height: 40px; width: auto; }

.main-nav { display: none; align-items: center; gap: 16px; }
.main-nav a {
  color: #1B3A4B; color: var(--secondary);
  padding: 10px 12px; border-radius: 10px; transition: background-color 0.25s ease, color 0.25s ease, transform 0.15s ease;
}
.main-nav a:hover { background: #E6F1FB; background: var(--pastel-blue); text-decoration: none; }
.main-nav a[aria-current="page"] { color: #0A66A3; color: var(--primary); background: #EAF2FA; font-weight: 700; }

.header-cta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.header-cta img { height: 18px; width: 18px; margin-right: 6px; }

/* Mobile burger button */
.mobile-menu-toggle {
  position: fixed; right: 16px; bottom: 16px; z-index: 60;
  width: 52px; height: 52px; border-radius: 50%;
  background: #0A66A3; background: var(--primary);
  color: #fff; box-shadow: var(--shadow);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.mobile-menu-toggle:hover { transform: translateY(-2px); background: #084F80; }

/* Mobile full-screen menu */
.mobile-menu {
  position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; gap: 20px;
  background: #F3EAFB; background: var(--pastel-lilac);
  transform: translateX(100%); transition: transform 0.35s ease;
}
.mobile-menu[aria-hidden="false"], .mobile-menu.active { transform: translateX(0); }
.mobile-menu-close {
  align-self: flex-end; margin: 16px; width: 44px; height: 44px; border-radius: 50%;
  background: #fff; color: #1B3A4B; box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.mobile-nav { display: flex; flex-direction: column; gap: 8px; padding: 0 24px 24px 24px; }
.mobile-nav a {
  display: flex; align-items: center; min-height: 48px;
  background: #FFFFFF; border-radius: 12px; padding: 12px 16px;
  color: #1B3A4B; text-decoration: none; box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, background 0.2s ease;
}
.mobile-nav a:hover { transform: translateX(4px); background: #E6F1FB; }
.mobile-nav a[aria-current="page"] { border: 2px solid #0A66A3; color: #0A66A3; font-weight: 700; }

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

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--radius-sm); padding: 12px 16px; font-weight: 700; line-height: 1; text-decoration: none; transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.12s ease; box-shadow: var(--shadow-sm); }
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: #0A66A3; background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: #084F80; }

.btn-secondary {
  background: #FFFFFF; color: #0A66A3; border: 2px solid #0A66A3; border-color: var(--primary);
}
.btn-secondary:hover { background: #E6F1FB; background: var(--pastel-blue); }

.btn-ghost { background: transparent; color: #1B3A4B; }

/* Icons inside buttons */
.btn img { height: 18px; width: 18px; }

/* ---------- Cards & Testimonials ---------- */
.testimonial-card {
  background: #FFFFFF; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); border: 1px solid #E9EEF5;
  color: #1B3A4B; /* dark text on light bg for readability */
}
.testimonial-card p { margin: 0; }
.testimonial-card p + p { color: #243B53; font-weight: 700; }

/* Generic card style if used */
.card {
  background: #FFFFFF; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 20px; border: 1px solid #E9EEF5;
}

/* ---------- Footer ---------- */
footer { background: #FDF7FB; background: var(--pastel-lilac); border-top: 1px solid #EADFF7; }
footer .container { padding: 24px 20px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 24px; }
.footer-nav > div { display: flex; flex-direction: column; gap: 8px; min-width: 220px; }
.footer-nav h3 { font-size: 16px; margin-bottom: 4px; color: #1B3A4B; }
.footer-nav a { color: #1B3A4B; padding: 6px 0; }
.footer-nav a:hover { color: #0A66A3; }
.mini-contact { display: flex; flex-direction: column; gap: 6px; color: #243B53; }
.mini-contact a { color: #0A66A3; }

/* ---------- Accessibility cues ---------- */
a[aria-current="page"] { font-weight: 700; }

/* ---------- FAQ / Lists spacing enhancements ---------- */
.content-wrapper > h2 + ul,
.content-wrapper > h2 + ol { margin-top: 8px; }
.content-wrapper ul, .content-wrapper ol { display: flex; flex-direction: column; gap: 6px; }

/* ---------- Forms (if added later) ---------- */
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid #D8E2EE; background: #FFFFFF; color: #243B53;
}
input:focus, textarea:focus { border-color: #0A66A3; box-shadow: 0 0 0 3px rgba(10,102,163,0.15); }
label { font-size: 14px; color: #1B3A4B; margin-bottom: 6px; display: block; }

/* ---------- Cookie Consent Banner ---------- */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  display: flex; flex-direction: column; gap: 12px; align-items: stretch;
  background: #FFF9DB; background: var(--pastel-yellow);
  border-top: 1px solid #F0E7B3; box-shadow: 0 -8px 24px rgba(16,24,40,0.08);
  padding: 14px 16px; transform: translateY(100%); transition: transform 0.35s ease;
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .cookie-content { display: flex; flex-direction: column; gap: 10px; color: #1B3A4B; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .btn { box-shadow: none; }
.cookie-actions .btn-primary { background: #0A66A3; }
.cookie-actions .btn-secondary { border-color: #0A66A3; }

/* Cookie settings modal */
.cookie-modal {
  position: fixed; inset: 0; z-index: 90; display: none; align-items: center; justify-content: center; padding: 20px;
  background: rgba(16,24,40,0.45);
}
.cookie-modal.open { display: flex; }
.cookie-modal .modal-content {
  display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 560px;
  background: #FFFFFF; border-radius: 16px; box-shadow: var(--shadow); padding: 20px; border: 1px solid #E9EEF5;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; }
.modal-body { display: flex; flex-direction: column; gap: 12px; }
.cookie-category { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid #E9EEF5; border-radius: 12px; background: #F3F8FD; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* Toggle switch */
.toggle-switch { position: relative; width: 46px; height: 26px; border-radius: 26px; background: #D9E6F2; transition: background 0.2s ease; display: flex; align-items: center; padding: 3px; }
.toggle-switch::after { content: ""; width: 20px; height: 20px; border-radius: 50%; background: #FFFFFF; box-shadow: var(--shadow-sm); transform: translateX(0); transition: transform 0.2s ease; }
.toggle-switch.on { background: #0A66A3; }
.toggle-switch.on::after { transform: translateX(20px); }

/* ---------- Micro-animations ---------- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.hero .content-wrapper > * { animation: fadeInUp 0.5s ease both; }
.hero .content-wrapper > *:nth-child(2) { animation-delay: 0.05s; }
.hero .content-wrapper > *:nth-child(3) { animation-delay: 0.1s; }

/* ---------- Tables (if appear) ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid #E9EEF5; }
th { background: #F3F8FD; color: #1B3A4B; }

/* ---------- Utility badges (optional) ---------- */
.badge { display: inline-flex; align-items: center; border-radius: 999px; background: #EAF7F2; color: #1B3A4B; padding: 6px 10px; font-size: 12px; }

/* ---------- Special blocks ---------- */
.alert { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: #FFEFE7; color: #1B3A4B; border: 1px solid #FFD7C7; }

/* ---------- Images in text ---------- */
.text-section img { width: 18px; height: 18px; display: inline-flex; vertical-align: text-bottom; margin-right: 6px; }

/* ---------- Responsive Rules ---------- */
@media (min-width: 600px) {
  h1 { font-size: 36px; }
  h2 { font-size: 26px; }
}
@media (min-width: 768px) {
  .text-image-section { flex-direction: row; }
  .container { gap: 24px; }
  h1 { font-size: 40px; }
}
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; align-items: center; }
}

/* ---------- Page-specific gentle accents ---------- */
/* Index page hero emphasizes trustworthy pastel blue */
.hero .cta-group .btn-primary { box-shadow: 0 10px 24px rgba(10,102,163,0.25); }

/* Pricing page callouts (if any) */
.price-card { display: flex; flex-direction: column; gap: 10px; background: #FFFFFF; border: 1px solid #E9EEF5; border-radius: 16px; padding: 18px; box-shadow: var(--shadow-sm); }

/* ---------- Ensure adequate spacing between sections & elements ---------- */
main > section + section { margin-top: 10px; }
.content-wrapper > * + * { margin-top: 4px; }

/* ---------- Prevent overlaps & maintain z-index layers ---------- */
header { z-index: 50; }
.mobile-menu { z-index: 70; }
.mobile-menu-toggle { z-index: 60; }
.cookie-banner { z-index: 80; }
.cookie-modal { z-index: 90; }

/* ---------- Accessibility: high-contrast in testimonials/reviews ---------- */
/* Dark text, light background already enforced. Add link color override if present */
.testimonial-card a { color: #0A66A3; }

/* ---------- Additional layout utilities (Flexbox-only) ---------- */
.row { display: flex; flex-wrap: wrap; gap: 20px; }
.col { display: flex; flex-direction: column; gap: 12px; flex: 1 1 260px; }

/* ---------- Header spacing on small screens ---------- */
@media (max-width: 991px) {
  header > .container { flex-wrap: wrap; }
  .header-cta { width: 100%; justify-content: flex-start; }
}

/* ---------- Link buttons inside text ---------- */
.text-section .btn { align-self: flex-start; }

/* ---------- ARIA & state helpers ---------- */
.is-hidden { display: none !important; }
.is-visible { display: flex !important; }

/* ---------- Soft Pastel visual identity accents ---------- */
.pastel-strip { display: flex; gap: 6px; }
.pastel-strip > span { display: flex; width: 20px; height: 6px; border-radius: 6px; }
.pastel-blue { background: #E6F1FB; }
.pastel-mint { background: #EAF7F2; }
.pastel-lilac { background: #F3EAFB; }
.pastel-peach { background: #FFEFE7; }
.pastel-yellow { background: #FFF9DB; }

/* ---------- Header spacing for large screens ---------- */
@media (min-width: 1100px) {
  header > .container { padding-top: 8px; padding-bottom: 8px; }
}

/* ---------- Ensure interactive elements are clearly visible ---------- */
.btn:hover, .main-nav a:hover, .mobile-nav a:hover { filter: brightness(0.98); }

/* ---------- Ensure all navs use flex (no grid) ---------- */
nav { display: flex; flex-wrap: wrap; gap: 10px; }
nav.main-nav, nav.footer-nav, nav.mobile-nav { gap: 12px; }

/* ---------- Hero content balances spacing ---------- */
.hero .container { padding-top: 24px; padding-bottom: 24px; }

/* ---------- Icons list alignment ---------- */
.text-section[aria-label="Schnellkontakt"] { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.text-section[aria-label="Schnellkontakt"] img { margin-right: 4px; }

/* ---------- Badge-like phone highlight ---------- */
.phone-highlight { display: inline-flex; align-items: center; gap: 8px; background: #FFF9DB; color: #1B3A4B; border: 1px solid #F0E7B3; border-radius: 999px; padding: 8px 12px; }

/* ---------- Prevent absolute on content elements (use relative only if decorative) ---------- */
.card, .testimonial-card { position: relative; }

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