/* ============================================
   LeadBridge Local — Base Template CSS
   BEM naming: block__element--modifier
   ============================================ */

/* ============================================
   BRAND TOKENS — Change these to rebrand a site.
   Everything below cascades from these variables.
   ============================================ */
:root {
  /* --- Spacing system --- */
  --section-padding-lg: 5rem;
  --section-padding-md: 3.5rem;
  --section-padding-sm: 2rem;
  --container-wide: 1200px;
  --container-default: 1000px;
  --container-narrow: 800px;
  --spacing-heading: 1.25rem;
  --spacing-paragraph: 1rem;

  /* --- Colors --- */
  --color-primary: #1a1a1a;
  --color-primary-light: #2d2d2d;
  --color-accent: #e67e22;          /* Brand color — borders, links, highlights. Per-site override. */
  --color-accent-button: #cf6d17;   /* Darker variant for white-text buttons (WCAG AA). Per-site override. */
  --color-accent-hover: #cf6d17;    /* Hover state for accent */
  --color-accent-light: rgba(230, 126, 34, 0.06); /* Light accent bg */
  --color-surface: #ffffff;         /* Page background */
  --color-surface-alt: #f7f7f5;    /* Alternating section bg */
  --color-surface-dark: #1a1a1a;   /* Footer / dark sections */
  --color-text: #1a1a1a;           /* Primary text */
  --color-text-muted: #6b6b6b;    /* Secondary text */
  --color-text-light: #ffffff;     /* Text on dark bg */
  --color-border: #e5e5e5;         /* Borders, dividers */

  /* --- Typography --- */
  --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  /* Heading sizes (visual scale, not semantic) */
  --text-h1: clamp(2rem, 5vw, 3rem);           /* 32–48px — page title */
  --text-h2-section: clamp(1.75rem, 4vw, 2.5rem); /* 28–40px — section headings */
  --text-h2-content: clamp(1.25rem, 2.5vw, 1.5rem); /* 20–24px — rich text headings */
  --text-h3: clamp(1.125rem, 2vw, 1.375rem);   /* 18–22px — card titles */
  --text-h3-content: 1rem;                       /* 16px — rich text h3 (smaller than h2 for visual hierarchy) */
  --text-body: 1rem;                             /* 16px */
  --text-small: 0.875rem;                        /* 14px */

  /* --- Spacing --- */
  --space-xs: 0.25rem;   /* 4px */
  --space-sm: 0.5rem;    /* 8px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  --space-3xl: 4rem;     /* 64px */
  --space-4xl: 6rem;     /* 96px */
  --space-section: 5rem; /* 80px — vertical section padding */

  /* --- Layout --- */
  --max-width: 72rem;        /* 1152px — main container */
  --max-width-narrow: 48rem; /* 768px — content/reading width */
  --border-radius: 0.5rem;
  --border-radius-lg: 0.75rem;

  /* --- Shadows --- */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-surface);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* --- Utilities --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}
.container--narrow {
  max-width: var(--max-width-narrow);
}
/* Rich text — long-form content with smaller headings and proper spacing */
.rich-text h2 {
  font-size: var(--text-h2-content);
  margin-top: var(--space-3xl);
  margin-bottom: var(--space-lg);
}
.rich-text h2:first-child {
  margin-top: 0;
}
.rich-text h3 {
  font-size: var(--text-h3-content);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
}
.rich-text p {
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
}
.rich-text p:last-child {
  margin-bottom: 0;
}
.rich-text ul, .rich-text ol {
  color: var(--color-text-muted);
  line-height: 1.8;
  margin-bottom: var(--space-lg);
  padding-left: var(--space-lg);
}
.rich-text li {
  margin-bottom: var(--space-sm);
}
.rich-text a:not(.btn),
.faq__answer a:not(.btn) {
  color: var(--color-accent-button);
  text-decoration: underline;
}
.rich-text a:not(.btn):hover,
.faq__answer a:not(.btn):hover {
  color: var(--color-accent-hover);
}
.section__banner {
  width: 100%;
  aspect-ratio: 21/9;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
  margin-bottom: var(--space-3xl);
}
.rich-text img {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
  margin: var(--space-xl) 0;
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* --- Typography --- */
.text-h1 { font-size: var(--text-h1); font-weight: 700; }
.text-h2 { font-size: var(--text-h2-section); font-weight: 700; }
.text-h3 { font-size: var(--text-h3); font-weight: 600; }
.text-body { font-size: var(--text-body); line-height: 1.7; color: var(--color-text-muted); }
.text-small { font-size: var(--text-small); color: var(--color-text-muted); }
.text-center { text-align: center; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 1rem 1.75rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--color-accent-button);
  color: var(--color-text-light);
}
.btn--primary:hover { background: var(--color-accent-hover); }
.btn--link {
  background: none;
  padding: 0;
  color: var(--color-accent-button);
  font-weight: 600;
}
.btn--link:hover { text-decoration: none; transform: none; box-shadow: none; }
.btn--link-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}
.btn--link:hover .btn--link-arrow {
  transform: translateX(4px);
}

/* --- Section base --- */
.section {
  padding: var(--space-section) 0;
}
.section--alt {
  background: var(--color-surface-alt);
}
.section__header {
  margin-bottom: var(--space-3xl);
}
.section__header h2 {
  font-size: var(--text-h2-section);
}
.section__header p {
  margin-top: var(--space-md);
  max-width: 40rem;
  color: var(--color-text-muted);
}
.section__action {
  margin-top: var(--space-2xl);
}

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}
.navbar__logo img {
  height: 2rem;
  width: auto;
}
.navbar__links {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}
.navbar__link {
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.15s;
}
.navbar__link:hover { color: var(--color-accent-button); }
.navbar__dropdown {
  position: relative;
}
.navbar__dropdown-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
  font-family: inherit;
}
.navbar__dropdown-toggle::after {
  content: '';
  display: inline-block;
  width: 0.45em;
  height: 0.45em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  margin-left: 0.3em;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.navbar__dropdown--open > .navbar__dropdown-toggle::after {
  transform: rotate(-135deg);
}
@media (min-width: 1025px) {
  .navbar__dropdown:hover .navbar__dropdown-toggle::after {
    transform: rotate(-135deg);
  }
}
.navbar__dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 14rem;
  padding: var(--space-sm) 0;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
@media (min-width: 1025px) {
  .navbar__dropdown:hover .navbar__dropdown-menu {
    opacity: 1;
    visibility: visible;
  }
}
.navbar__dropdown-item {
  display: block;
  padding: var(--space-sm) var(--space-md);
  margin: 0 var(--space-sm);
  font-size: 0.9375rem;
  border-radius: var(--border-radius);
  transition: background 0.15s ease;
}
.navbar__dropdown-item:hover { background: var(--color-surface-alt); }
.navbar__cta {
  margin-left: var(--space-md);
  padding: 0.625rem 1.25rem;
  font-size: 0.9375rem;
}

/* Mobile hamburger */
.navbar__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}
.navbar__toggle span {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}
.navbar__toggle--open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.navbar__toggle--open span:nth-child(2) {
  opacity: 0;
}
.navbar__toggle--open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav overlay */
.navbar__overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.33);
  z-index: 899;
}
.navbar__overlay--visible {
  display: block;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: var(--space-3xl) 0 var(--space-section);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}
.hero__title {
  margin-bottom: var(--space-md);
}
.hero__subtitle {
  color: var(--color-text-muted);
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: var(--space-xl);
}
.hero__content--centered {
  text-align: center;
  max-width: var(--max-width-narrow);
  margin: 0 auto;
}
.hero__content--centered .hero__subtitle {
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
}
.hero--compact {
  padding: var(--space-3xl) 0 var(--space-2xl);
}
/* hero checks removed — not used in current template */
.hero__trust {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  font-size: 1rem;
  color: var(--color-text-muted);
}
.hero__trust strong {
  color: var(--color-text);
}
.hero__trust-avatars {
  display: flex;
}
.hero__trust-avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 3px solid var(--color-surface);
  margin-right: -0.75rem;
  background: var(--color-border);
  overflow: hidden;
}
.hero__trust-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* ============================================
   FORM
   ============================================ */
.form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-md);
  color: var(--color-text);
}
.form__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-lg);
  color: var(--color-text);
}
.form__promise {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  margin-top: var(--space-md);
  font-size: var(--text-small);
  color: var(--color-text-muted);
  line-height: 1.4;
}
.form__promise-icon {
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  margin-top: 2px;
}
.form__group {
  margin-bottom: var(--space-md);
}
.form__input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius);
  background: var(--color-surface-alt);
  transition: border-color 0.15s;
}
.form__input:focus {
  outline: none;
  border-color: var(--color-accent);
}
.form__input::placeholder { color: var(--color-text-muted); }
.form__submit {
  width: 100%;
  margin-top: var(--space-sm);
  padding: 1.125rem 1.75rem;
  font-size: 1.0625rem;
}
.form__input--error {
  border-color: #c62828 !important;
  box-shadow: 0 0 0 1px #c62828;
}
.form__hint {
  font-size: 0.8125rem;
  color: #c62828;
  margin-top: var(--space-xs);
}
.form__success, .form__error {
  padding: var(--space-md);
  border-radius: var(--border-radius);
  margin-top: var(--space-md);
  font-weight: 500;
}
.form__success { background: #e8f5e9; color: #2e7d32; }
.form__error { background: #fce4ec; color: #c62828; }

/* ============================================
   TESTIMONIALS (horizontal slider)
   ============================================ */
.testimonials__wrapper {
  position: relative;
}
.testimonials__slider {
  display: flex;
  gap: var(--space-lg);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: var(--space-sm);
}
.testimonials__slider::-webkit-scrollbar { display: none; }
.testimonials__card {
  flex: 0 0 100%;
  scroll-snap-align: start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: var(--space-xl);
}
.testimonials__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--color-text);
}
.testimonials__arrow::after {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}
.testimonials__arrow--prev::after {
  transform: rotate(135deg);
  margin-left: 3px;
}
.testimonials__arrow--next::after {
  transform: rotate(-45deg);
  margin-right: 3px;
}
.testimonials__arrow:hover {
  background: var(--color-surface-alt);
  box-shadow: var(--shadow-lg);
}
.testimonials__arrow--prev { left: -1.375rem; }
.testimonials__arrow--next { right: -1.375rem; }
@media (max-width: 768px) {
  .testimonials__wrapper {
    padding-bottom: var(--space-3xl);
  }
  .testimonials__arrow {
    top: auto;
    bottom: 0;
    transform: none;
  }
  .testimonials__arrow--prev {
    left: auto;
    right: 4rem;
  }
  .testimonials__arrow--next {
    right: 0;
  }
}
.testimonials__stars {
  color: var(--color-accent-button);
  font-size: 1.125rem;
  letter-spacing: 2px;
  margin-bottom: var(--space-md);
}
.testimonials__text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text-muted);
  margin-bottom: var(--space-lg);
}
.testimonials__author {
  font-weight: 600;
  font-size: 0.9375rem;
}
.testimonials__location {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}
@media (min-width: 768px) {
  .testimonials__card { flex: 0 0 calc(50% - var(--space-lg) / 2); }
}
@media (min-width: 992px) {
  .testimonials__card { flex: 0 0 calc(33.333% - var(--space-lg) * 2 / 3); }
}

/* ============================================
   SERVICES (card grid)
   ============================================ */
.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: var(--space-xl);
}
.services__card {
  display: block;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: inherit;
  text-decoration: none;
}
.services__card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.services__card-image {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}
.services__card-body {
  padding: var(--space-lg);
}
.services__card-title {
  margin-bottom: var(--space-sm);
}
.services__card-text {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: var(--space-md);
}
.services__card-link {
  color: var(--color-accent-button);
  font-weight: 600;
  font-size: 0.9375rem;
}
.services__card-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}
.services__card:hover .services__card-arrow {
  transform: translateX(4px);
}

/* ============================================
   WHY CHOOSE US (image left, content right)
   ============================================ */
.whychoose__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: stretch;
}
.whychoose__image {
  width: 100%;
  height: 100%;
  border-radius: var(--border-radius-lg);
  object-fit: cover;
  min-height: 100%;
}
.whychoose__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}
.whychoose__item {
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}
.whychoose__icon {
  width: 2.25rem;
  height: 2.25rem;
  min-width: 2.25rem;
  background: var(--color-accent);
  color: var(--color-text-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
}
.whychoose__icon::after {
  content: '';
  display: block;
  width: 0.55rem;
  height: 0.9rem;
  border-right: 3px solid var(--color-surface);
  border-bottom: 3px solid var(--color-surface);
  transform: rotate(45deg);
  margin-top: -2px;
}
.whychoose__item-content {
  flex: 1;
}
.whychoose__title {
  margin-bottom: var(--space-xs);
}
.whychoose__text {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ============================================
   PROJECTS (image grid)
   ============================================ */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}
.projects__item {
  overflow: hidden;
  border-radius: var(--border-radius-lg);
}
.projects__image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform 0.3s;
}
.projects__item:hover .projects__image {
  transform: scale(1.05);
}
@media (max-width: 768px) {
  .projects__grid { grid-template-columns: 1fr; }
}

/* ============================================
   PROCESS (2x2 grid)
   ============================================ */
.process__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-xl);
}
.process__card {
  padding: var(--space-xl);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
}
.process__number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-text-light);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: var(--space-md);
}
.process__title {
  margin-bottom: var(--space-sm);
}
.process__text {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}
@media (max-width: 768px) {
  .process__grid { grid-template-columns: 1fr; }
}

/* ============================================
   FAQ (accordion)
   ============================================ */
.faq__list {
  width: 100%;
  columns: 2;
  column-gap: var(--space-3xl);
}
@media (max-width: 768px) {
  .faq__list { columns: 1; }
}
.faq__item {
  break-inside: avoid;
  border-bottom: 1px solid var(--color-border);
}
.faq__question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) 0;
  background: none;
  border: none;
  font-size: 1.0625rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--color-text);
  cursor: pointer;
  text-align: left;
  gap: var(--space-md);
}
.faq__question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  flex-shrink: 0;
  transition: transform 0.2s;
}
.faq__item--open .faq__question::after {
  transform: rotate(45deg);
}
.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding-bottom: 0;
}
.faq__item--open .faq__answer {
  max-height: 20rem;
  padding-bottom: var(--space-lg);
}
.faq__answer p {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ============================================
   CTA (bottom form section)
   ============================================ */
.section--cta {
  background: var(--color-surface);
  padding: var(--space-section) 0;
}
.cta__card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.cta__content {
  padding: var(--space-3xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.cta__content h2 {
  font-size: var(--text-h2-section);
  margin-bottom: var(--space-md);
}
.cta__content > p {
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-xl);
}
.cta__content .form {
  border: none;
  padding: 0;
  box-shadow: none;
}
.cta__image-wrapper {
  position: relative;
  min-height: 100%;
}
.cta__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}

/* ============================================
   STATS
   ============================================ */
.stats__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  text-align: center;
}
.stats__number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-accent-button);
  line-height: 1;
  margin-bottom: var(--space-sm);
}
.stats__label {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}
@media (max-width: 768px) {
  .stats__grid { grid-template-columns: 1fr; gap: var(--space-lg); }
}

/* ============================================
   PORTFOLIO (projekte page)
   ============================================ */
.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3xl);
}
.portfolio__card {
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
}
.portfolio__body {
  padding: var(--space-lg) var(--space-xl) var(--space-xl);
}
.portfolio__title {
  margin-bottom: var(--space-sm);
}
.portfolio__text {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-lg);
}
.portfolio__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}
.portfolio__tag {
  font-size: 0.75rem;
  padding: var(--space-xs) var(--space-sm);
  background: var(--color-surface-alt);
  border-radius: 1rem;
  color: var(--color-text-muted);
}

/* Before/After slider */
.ba-slider {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
}
.ba-slider img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.ba-slider__after {
  clip-path: inset(0 0 0 0);
}
.ba-slider__before {
  clip-path: inset(0 0 0 50%);
}
.ba-slider__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: var(--color-surface);
  box-shadow: 0 0 6px rgba(0,0,0,0.3);
  z-index: 2;
  transform: translateX(-50%);
  pointer-events: none;
}
.ba-slider__handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2.5rem;
  height: 2.5rem;
  background: var(--color-surface);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.ba-slider__handle-arrows {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  width: 2.5rem;
  height: 2.5rem;
  pointer-events: none;
}
.ba-slider__handle-arrows::before,
.ba-slider__handle-arrows::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 0.45rem;
  height: 0.45rem;
  border-top: 2.5px solid var(--color-text);
  border-left: 2.5px solid var(--color-text);
}
.ba-slider__handle-arrows::before {
  left: 0.55rem;
  transform: translateY(-50%) rotate(-45deg);
}
.ba-slider__handle-arrows::after {
  right: 0.55rem;
  transform: translateY(-50%) rotate(135deg);
}
.ba-slider__label {
  position: absolute;
  bottom: var(--space-md);
  padding: var(--space-xs) var(--space-sm);
  background: rgba(0,0,0,0.6);
  color: var(--color-text-light);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  z-index: 1;
  pointer-events: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.ba-slider__label--after { left: var(--space-md); }
.ba-slider__label--before { right: var(--space-md); }

@media (max-width: 768px) {
  .portfolio__grid { grid-template-columns: 1fr; }
}

/* ============================================
   DISTRICT (local authority pages — stadtteil)
   ============================================ */
.district__heading {
  text-align: center;
  margin-bottom: var(--space-2xl);
}
.district__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}
.district__grid--reversed .district__image-wrapper {
  order: -1;
}
.district__content p {
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}
.district__content a {
  color: var(--color-accent-button);
  text-decoration: underline;
}
.district__content a:hover {
  color: var(--color-accent-hover);
}
.district__image {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
}
.district__text-columns {
  columns: 2;
  column-gap: var(--space-3xl);
  color: var(--color-text-muted);
  line-height: 1.7;
}
.district__text-columns p {
  margin-bottom: var(--space-md);
  break-inside: avoid;
}
@media (max-width: 1024px) {
  .district__grid { grid-template-columns: 1fr; }
  .district__grid--reversed .district__image-wrapper { order: 0; }
  .district__text-columns { columns: 1; }
}

/* ============================================
   CONTENT (rich text sections — ueber-uns, kosten)
   ============================================ */
.content__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: start;
}
.content__text h2 {
  font-size: var(--text-h2-section);
  font-weight: 700;
  margin-bottom: var(--space-lg);
}
.content__text p {
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}
.content__image {
  width: 100%;
  border-radius: var(--border-radius-lg);
  aspect-ratio: 4/3;
  object-fit: cover;
  overflow: hidden;
}

/* ============================================
   STICKY CTA BAR
   ============================================ */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  padding: var(--space-md);
  z-index: 900;
  pointer-events: none;
  transform: translateY(100%);
  transition: transform 0.35s ease;
}
.sticky-cta--visible {
  transform: translateY(0);
  pointer-events: auto;
}
.sticky-cta__btn {
  padding: 0.875rem 2rem;
  font-size: 1rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
}
.sticky-cta__btn--mobile { display: none; }
@media (max-width: 768px) {
  .sticky-cta__btn--desktop { display: none; }
  .sticky-cta__btn--mobile { display: inline-flex; }
}

/* ============================================
   CALCULATOR (kostenrechner page)
   ============================================ */
.calc {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  padding: var(--space-2xl) var(--space-3xl);
  box-shadow: var(--shadow-md);
}
.calc__progress {
  height: 4px;
  background: var(--color-surface-alt);
  border-radius: 2px;
  margin-bottom: var(--space-sm);
  overflow: hidden;
}
.calc__progress-bar {
  height: 100%;
  background: var(--color-accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}
.calc__step-label {
  font-size: var(--text-small);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2xl);
}
.calc__step {
  display: none;
}
.calc__step--active {
  display: block;
}
.calc__question {
  margin-bottom: var(--space-xl);
}
.calc__options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}
.calc__option {
  cursor: pointer;
}
.calc__option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.calc__option-label {
  display: block;
  padding: var(--space-lg) var(--space-xl);
  border: 2px solid var(--color-border);
  border-radius: var(--border-radius-lg);
  font-weight: 500;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.calc__option-label:hover {
  border-color: var(--color-accent);
}
.calc__option input:checked + .calc__option-label {
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}
.calc__nav {
  display: flex;
  justify-content: space-between;
  margin-top: var(--space-2xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-border);
}
.calc__btn-back {
  background: none;
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}
.calc__btn-back:hover {
  background: var(--color-surface-alt);
  transform: none;
  box-shadow: none;
}
.calc__btn-back:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
@media (max-width: 768px) {
  .calc {
    padding: var(--space-xl) var(--space-lg);
  }
  .calc__options {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--color-surface-dark);
  color: var(--color-text-light);
  padding: var(--space-3xl) 0 var(--space-4xl);
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}
.footer__brand-text {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-top: var(--space-md);
  max-width: 24rem;
}
.footer__heading {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-lg);
  color: rgba(255,255,255,0.5);
}
.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}
.footer__link {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.7);
  transition: color 0.15s;
}
.footer__link:hover { color: var(--color-text-light); }
.footer__contact-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: var(--space-sm);
}
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.6);
}
.footer__bottom a {
  color: rgba(255,255,255,0.6);
  transition: color 0.15s;
}
.footer__bottom a:hover { color: rgba(255,255,255,0.7); }
@media (max-width: 768px) {
  .footer__grid { grid-template-columns: 1fr; gap: var(--space-xl); }
  .footer__bottom { flex-direction: column; gap: var(--space-sm); }
}

/* ============================================
   IMPRESSUM
   ============================================ */
.legal h2 {
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
}
.legal h3 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-sm);
}
.legal p {
  color: var(--color-text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-md);
}
.legal a {
  color: var(--color-accent-button);
  text-decoration: underline;
}

/* ============================================
   404
   ============================================ */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.error-page__title {
  font-size: clamp(2.5rem, 8vw, 4rem);
  margin-bottom: var(--space-md);
}
.error-page__text {
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
}

/* ============================================
   TABLET BREAKPOINT (iPads portrait ≤ 1024px)
   Stack all two-column content layouts, switch to mobile nav
   ============================================ */
@media (max-width: 1024px) {
  /* Navbar — switch to hamburger */
  .navbar__links { display: none; }
  .navbar__links--open {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: absolute;
    top: 4rem;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-xl) var(--space-lg);
    gap: var(--space-sm);
  }
  .navbar__toggle { display: flex; }
  .navbar__link {
    font-size: 1.125rem;
    padding: var(--space-sm) 0;
    width: 100%;
    display: block;
    text-align: center;
  }
  .navbar__dropdown {
    width: 100%;
    text-align: center;
  }
  .navbar__dropdown-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.125rem;
    padding: var(--space-sm) 0;
    width: 100%;
  }
  .navbar__dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease, visibility 0.2s ease;
  }
  .navbar__dropdown.navbar__dropdown--open .navbar__dropdown-menu {
    opacity: 1;
    visibility: visible;
    max-height: 20rem;
  }
  .navbar__dropdown-item {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    padding: var(--space-xs) 0;
    margin: 0;
  }
  .navbar__cta {
    margin-left: 0;
    margin-top: var(--space-sm);
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Hero — stack content above form */
  .hero__grid { grid-template-columns: 1fr; gap: var(--space-xl); }

  /* Why Choose Us — stack */
  .whychoose__layout { grid-template-columns: 1fr; }

  /* CTA — stack image above form */
  .cta__card { grid-template-columns: 1fr; }
  .cta__image-wrapper { order: -1; min-height: 16rem; position: relative; }
  .cta__image { position: absolute; }
  .cta__content { padding: var(--space-xl); }

  /* Content grid (about page) — stack */
  .content__grid { grid-template-columns: 1fr; }

  /* Footer — 2x2 grid */
  .footer__grid { grid-template-columns: 1fr 1fr; }

  /* Tighter section spacing */
  .section { padding: var(--space-3xl) 0; }
  .hero { padding: var(--space-2xl) 0 var(--space-3xl); }
  .hero--compact { padding: var(--space-2xl) 0 var(--space-xl); }
  .section--cta { padding: var(--space-3xl) 0; }
  .section__header { margin-bottom: var(--space-2xl); }
  .section__banner { margin-bottom: var(--space-2xl); }
}

/* ============================================
   MOBILE FIXES — applied 2026-05-19 (session feedback)
   ============================================ */

/* CTA image: keep face visible when object-fit: cover crops */
.cta__image { object-position: center 22%; }

@media (max-width: 768px) {
  /* A) Hero trust row stacks vertically (avatars on top, text below) */
  .hero__trust {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }
  .hero__content--centered .hero__trust { align-items: center; text-align: center; }

  /* B) Portfolio grid becomes a horizontal swipe slider */
  .portfolio__grid {
    display: flex;
    overflow-x: auto;
    gap: var(--space-lg);
    scroll-snap-type: x mandatory;
    padding-bottom: var(--space-md);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .portfolio__grid::-webkit-scrollbar { display: none; }
  .portfolio__card { flex: 0 0 85vw; scroll-snap-align: center; }

  /* D) Section headers center on mobile (matches centered heroes) */
  .section__header { text-align: center; }
  .section__header p { margin-left: auto; margin-right: auto; }
}


/* About-page alternating layout: every other content__grid flips image to the left */
.content__grid--reverse .content__image { order: -1; }
@media (max-width: 768px) {
  .content__grid--reverse .content__image { order: 0; }  /* keep text-first stacking on mobile */
}

