/* =====================================
   Reset & Normalize
===================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: #1E2A38; background: #FAFBFD; line-height: 1.6; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: #133B5C; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
ul, ol { margin: 0 0 16px 20px; padding: 0; }
li { margin-bottom: 8px; }
small { font-size: 14px; color: #3A4A5A; }

/* =====================================
   Theme Variables (Soft Pastel)
===================================== */
:root {
  --primary: #133B5C;
  --secondary: #246A4A;
  --accent: #F3F7FA;
  --bg: #FAFBFD;
  --ink: #1E2A38;
  --muted: #6B7A8C;
  --border: #E6ECF2;
  --shadow: 0 6px 18px rgba(19, 59, 92, 0.08);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  /* Pastel palette */
  --p-blue: #E7F0FA;
  --p-mint: #EAF6EF;
  --p-pink: #FCE7F3;
  --p-lavender: #EFE7FB;
  --p-peach: #FFE9E3;
  --p-butter: #FFF7DA;
}

/* =====================================
   Typography Scale (Soft, airy)
===================================== */
h1, h2, h3, h4, h5, h6 { color: var(--primary); margin: 0 0 12px; font-family: Georgia, Times New Roman, serif; letter-spacing: 0.2px; }
h1 { font-size: 32px; line-height: 1.2; }
h2 { font-size: 24px; line-height: 1.3; }
h3 { font-size: 20px; line-height: 1.3; }
p { margin: 0 0 16px; }

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

/* =====================================
   Global Containers & Sections
===================================== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.content-wrapper { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; width: 100%; }

/* Mandatory section pattern */
.section { margin-bottom: 60px; padding: 40px 20px; }
/* Apply consistent spacing to all sections in HTML */
section { margin-bottom: 60px; padding: 40px 20px; }

/* Accent sections (soft pastel backgrounds) */
section.accent { background: var(--accent); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

/* =====================================
   Header & Navigation
===================================== */
header { position: relative; background: #FFFFFF; box-shadow: 0 2px 12px rgba(19,59,92,0.05); z-index: 1000; }
header .container { min-height: 64px; }
header a img { height: 36px; width: auto; }

/* Desktop main nav */
.main-nav { display: none; align-items: center; gap: 16px; flex-wrap: wrap; }
.main-nav a { color: var(--primary); padding: 8px 10px; border-radius: var(--radius-sm); transition: background-color 0.2s ease, color 0.2s ease; }
.main-nav a:hover { background: var(--p-blue); text-decoration: none; }

/* Header CTAs */
header .button-primary, header .button-secondary { display: none; }

/* Mobile burger */
.mobile-menu-toggle { position: fixed; right: 16px; top: 14px; z-index: 1100; border: none; background: #FFFFFF; color: var(--primary); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); transition: transform 0.2s ease; }
.mobile-menu-toggle:hover { transform: translateY(-2px); }

/* Mobile slide-in menu */
.mobile-menu { position: fixed; top: 0; right: 0; bottom: 0; width: 82%; max-width: 360px; background: #FFFFFF; box-shadow: -10px 0 24px rgba(19,59,92,0.15); transform: translateX(100%); transition: transform 0.3s ease; z-index: 1090; display: flex; flex-direction: column; padding: 20px; gap: 16px; }
.mobile-menu.open { transform: translateX(0); }
/* Dim backdrop via pseudo-element */
.mobile-menu::after { content: ""; position: fixed; inset: 0; right: 82%; background: rgba(17, 24, 39, 0.35); opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.mobile-menu.open::after { opacity: 1; pointer-events: auto; }
.mobile-menu-close { align-self: flex-end; border: none; background: var(--p-blue); color: var(--primary); border-radius: 10px; padding: 8px 10px; }
.mobile-nav { display: flex; flex-direction: column; gap: 10px; }
.mobile-nav a { padding: 12px 10px; border-radius: 12px; background: var(--p-blue); color: var(--primary); font-weight: 600; }
.mobile-nav a:hover { background: #d9e7f8; text-decoration: none; }

/* Desktop breakpoint */
@media (min-width: 992px) {
  .mobile-menu-toggle { display: none; }
  .mobile-menu { display: none; }
  .main-nav { display: flex; }
  header .button-primary, header .button-secondary { display: inline-flex; }
  header .container { gap: 18px; }
}

/* =====================================
   Buttons & Links
===================================== */
.button-primary, .button-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 14px; transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, color 0.15s ease; text-decoration: none; }
.button-primary { background: var(--primary); color: #FFFFFF; box-shadow: var(--shadow); }
.button-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(19,59,92,0.18); text-decoration: none; }
.button-primary:focus { outline: 3px solid var(--p-blue); outline-offset: 2px; }

.button-secondary { background: var(--p-mint); color: var(--secondary); border: 1px solid #CFE9DB; }
.button-secondary:hover { background: #DFF3E7; text-decoration: none; }
.button-secondary:focus { outline: 3px solid #D8F1E4; outline-offset: 2px; }

/* Text links */
a.button-link { color: var(--primary); border-bottom: 1px dashed var(--primary); padding-bottom: 2px; }
a.button-link:hover { color: #0e2e49; }

/* =====================================
   Hero Sections (dreamy, pastel)
===================================== */
.hero { background: var(--p-blue); border-bottom: 1px solid var(--border); }
.hero .content-wrapper { max-width: 920px; }
.hero p { color: #2F4356; }
.trust-badges { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.trust-badges img { width: 36px; height: 36px; filter: saturate(0.9); opacity: 0.9; }

/* =====================================
   Feature Blocks & Services
===================================== */
.features .feature-grid { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; }
.features .feature-grid > div { flex: 1 1 260px; background: #FFFFFF; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.features .feature-grid > div:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(19,59,92,0.12); }
.features .feature-grid img { width: 40px; height: 40px; }

.features.accent { background: var(--accent); }
.services { background: #FFFFFF; }
.services.accent { background: var(--p-mint); }
.services ol, .services ul { margin-left: 18px; }

/* District cards (Lagen in Berlin) */
.district-cards { display: flex; flex-wrap: wrap; gap: 20px; }
.district-cards > div { flex: 1 1 260px; background: #FFFFFF; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); }

/* =====================================
   Testimonials (high contrast, soft cards)
===================================== */
.testimonial-list { display: flex; flex-wrap: wrap; gap: 20px; }
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; background: #FFFFFF; color: var(--ink); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); flex: 1 1 280px; }
.testimonial-card p { margin: 0; color: #122032; }
.testimonial-card strong { color: var(--primary); }
.testimonials.accent { background: var(--p-lavender); }

.rating-summary { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--p-butter); border: 1px solid #F4E7A3; border-radius: 12px; width: max-content; }
.rating-summary img { width: 100px; height: auto; }

/* =====================================
   About & Values
===================================== */
.about { background: #FFFFFF; }
.values-list { display: flex; flex-wrap: wrap; gap: 10px 16px; list-style: none; margin: 0; padding: 0; }
.values-list li { padding: 10px 12px; background: var(--p-peach); border: 1px solid #FFD3C7; border-radius: 12px; color: #6F3023; }
.tagline { font-weight: 600; color: var(--secondary); }

/* =====================================
   Contact Details
===================================== */
.contact { background: var(--p-blue); }
.contact .contact-details { display: flex; flex-wrap: wrap; gap: 12px 20px; list-style: none; padding: 0; margin: 0 0 8px; }
.contact .contact-details li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #FFFFFF; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); color: var(--ink); }
.contact .contact-details img { width: 20px; height: 20px; }

/* =====================================
   Footer
===================================== */
footer { background: var(--accent); border-top: 1px solid var(--border); padding: 30px 0; }
footer .content-wrapper { display: flex; flex-wrap: wrap; gap: 16px 24px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); }
.footer-nav a { color: var(--primary); }
.footer-contact ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-contact li { display: flex; align-items: center; gap: 10px; color: #2F4356; }
.footer-contact img { width: 18px; height: 18px; }
.footer-social { display: flex; gap: 12px; align-items: center; }
.footer-social img { width: 24px; height: 24px; opacity: 0.85; transition: opacity 0.2s ease; }
.footer-social img:hover { opacity: 1; }
.newsletter-signup h3 { margin-bottom: 4px; }

/* =====================================
   Lists and Utility Blocks
===================================== */
.press-mentions-list, .values-list, .contact-details { margin-top: 8px; }
blockquote { margin: 0; padding: 16px 18px; background: var(--p-butter); border: 1px solid #F4E7A3; border-radius: 12px; color: #5a4a1a; }
.reference-id { background: #FFFFFF; color: var(--primary); border: 1px dashed var(--primary); padding: 4px 8px; border-radius: 8px; }

/* =====================================
   Tables (Cookie page)
===================================== */
table { width: 100%; border-collapse: collapse; background: #FFFFFF; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: table; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
th { background: var(--p-blue); color: var(--primary); font-weight: 700; }
tr:nth-child(even) td { background: #FAFDFF; }

/* =====================================
   Forms (generic future-proof)
===================================== */
input[type="text"], input[type="email"], textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: #FFFFFF; }
input:focus, textarea:focus { outline: 3px solid var(--p-blue); border-color: var(--primary); }

/* =====================================
   Cookie Consent Banner & Modal
===================================== */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; background: #FFFFFF; border-top: 1px solid var(--border); box-shadow: 0 -10px 26px rgba(19,59,92,0.12); padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; z-index: 1080; transform: translateY(100%); transition: transform 0.35s ease; }
.cookie-banner.show { transform: translateY(0); }
.cookie-banner .cookie-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.cookie-banner p { margin: 0; color: #2F4356; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cookie-actions .btn { padding: 10px 14px; border-radius: 12px; border: 1px solid transparent; }
.cookie-actions .btn-accept { background: var(--primary); color: #FFFFFF; box-shadow: var(--shadow); }
.cookie-actions .btn-accept:hover { box-shadow: 0 10px 22px rgba(19,59,92,0.18); }
.cookie-actions .btn-reject { background: var(--p-blue); color: var(--primary); border-color: #D7E6F5; }
.cookie-actions .btn-settings { background: var(--p-mint); color: var(--secondary); border-color: #CFE9DB; }

/* Modal */
.cookie-backdrop { position: fixed; inset: 0; background: rgba(17,24,39,0.45); opacity: 0; pointer-events: none; transition: opacity 0.3s ease; z-index: 1095; }
.cookie-backdrop.show { opacity: 1; pointer-events: auto; }
.cookie-modal { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 1100; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.cookie-modal.show { opacity: 1; pointer-events: auto; }
.cookie-modal .modal-box { width: 100%; max-width: 720px; background: #FFFFFF; border-radius: 16px; border: 1px solid var(--border); box-shadow: 0 24px 48px rgba(19,59,92,0.18); display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.cookie-modal .modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cookie-modal .modal-content { display: flex; flex-direction: column; gap: 10px; }
.cookie-modal .category { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--accent); }
.cookie-modal .modal-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* =====================================
   Accessibility Focus Styles
===================================== */
:focus-visible { outline: 3px dashed var(--p-blue); outline-offset: 2px; }

/* =====================================
   Animations (subtle)
===================================== */
@keyframes floatIn { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.hero .content-wrapper, .features .content-wrapper, .services .content-wrapper, .testimonials .content-wrapper, .about .content-wrapper, .contact .content-wrapper { animation: floatIn 0.4s ease both; }

/* =====================================
   Responsive Layout Tweaks
===================================== */
/* Mobile-first: column stacking already by default */

@media (min-width: 768px) {
  .content-wrapper { gap: 18px; }
  .rating-summary { padding: 12px 16px; }
}

@media (min-width: 992px) {
  .content-wrapper { max-width: 1000px; }
  .footer .content-wrapper, footer .content-wrapper { align-items: flex-start; }
}

/* =====================================
   Mandatory Flex Patterns (as required)
===================================== */
.card-container { display: flex; flex-wrap: wrap; gap: 24px; }
.card { margin-bottom: 20px; position: relative; background: #FFFFFF; border: 1px solid var(--border); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.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; }
@media (max-width: 768px) {
  .text-image-section { flex-direction: column; align-items: flex-start; }
}
.testimonial-card { display: flex; align-items: center; gap: 20px; padding: 20px; }
.feature-item { display: flex; flex-direction: column; align-items: flex-start; gap: 15px; }

/* =====================================
   Hero/Section-specific color accents per page (optional variety)
===================================== */
/* Keep to solid pastels for compatibility */
.index .hero, body.index .hero { background: var(--p-blue); }
body.kaufleitfaden .hero { background: var(--p-mint); }
body.kaufprozess .hero { background: var(--p-peach); }
body.lagen_berlin .hero { background: var(--p-blue); }
body.marktanalysen .hero { background: var(--p-lavender); }
body.ueber_uns .hero { background: var(--p-butter); }
body.kontakt .hero { background: var(--p-pink); }

/* =====================================
   Header spacing safeguards
===================================== */
main { display: flex; flex-direction: column; gap: 0; }

/* =====================================
   Additional helpers
===================================== */
.hidden { display: none !important; }
.centered { display: flex; align-items: center; justify-content: center; }

/* =====================================
   Ensure no overlaps: generous spacing
===================================== */
.features .content-wrapper > *:not(:last-child),
.services .content-wrapper > *:not(:last-child),
.about .content-wrapper > *:not(:last-child),
.testimonials .content-wrapper > *:not(:last-child),
.contact .content-wrapper > *:not(:last-child) { margin-bottom: 8px; }

/* =====================================
   Desktop layout enhancements using flex only
===================================== */
@media (min-width: 992px) {
  header .container { flex-wrap: nowrap; }
  footer .content-wrapper { flex-wrap: wrap; }
  .footer-nav, .footer-contact, .footer-social, .newsletter-signup { flex: 1 1 220px; }
}

/* =====================================
   Link and CTA clarity
===================================== */
.hero a.button-secondary,
.features a.button-secondary,
.services a.button-primary { align-self: flex-start; }

/* =====================================
   Specific element refinements
===================================== */
.press-mentions-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; color: #2F4356; }
.rating-summary span { font-weight: 600; color: #2F4356; }

/* Keep interactive elements clearly visible */
a, button { transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease; }

/* =====================================
   Page-specific minor styles
===================================== */
.hero small { opacity: 0.9; }

/* =====================================
   Safety: prevent unexpected absolute layouts for content
===================================== */
/* We allow absolute/fixed only for navigation toggles and overlays; cards remain relatively positioned */
