@font-face {
font-family: "Havelock Titling";
src:
url("../fonts/HavelockTitling-Black.woff2") format("woff2"),
url("../fonts/HavelockTitling-Black.woff") format("woff");
font-weight: 900;
font-style: normal;
font-display: swap;
}


@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/SourceSans3-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/SourceSans3-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/SourceSans3-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/SourceSans3-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --brand: #1f5e43;
  --accent: #b89b5e;

  --accent-rgb: 184, 155, 94;

  --text: #111111;
  --muted: #5b5b5b;

  --bg: #ffffff;
  --bg-alt: #f6f7f7;
  --bg-raise: #ffffff;

  --border: #e6e6e6;

  --container: 1160px;
  --reading-copy-size: 1.12rem;


  --radius-sm: 10px;
  --radius-md: 14px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 10px 30px rgba(0,0,0,.08);
  --shadow-xl: 0 25px 70px rgba(0,0,0,.12);

  --space-1: 6px;
  --space-2: 10px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 36px;
  --space-6: 56px;

  --focus: 0 0 0 3px rgba(31,94,67,.18);
  --ring: 0 0 0 4px rgba(184,155,94,.18);
}

@media (min-width: 981px) {
  :root {
  --container: 1840px;
  --reading-copy-size: 1.3rem;
  }
}

@media (min-width: 1800px) {
  :root {
  --container: 2320px;
  }

  html { font-size: 20.9px; }
}


*,
*::before,
*::after { box-sizing: border-box; }

html { font-size: 18px; }

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  line-height: 1.75;
  font-synthesis: none;

  font-family: "Source Sans 3", ui-sans-serif, system-ui, -apple-system,
               "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand);
  text-decoration: none;
}

/* Email addresses: prevent line breaks within the address */
a[href^="mailto:"] {
  white-space: nowrap;
  hyphens: none;
  overflow-wrap: normal;
  word-break: normal;
}

@media (max-width: 640px) {
  /* Mobile: display email addresses slightly smaller */
  a[href^="mailto:"] {
  font-size: 0.95em;
  }
}

a:hover {
  color: var(--accent);
}

.container {
  max-width: var(--container);
  margin: 0;
  padding: 0 var(--space-4);
}

@media (min-width: 981px) {
  .container {
  padding-inline: clamp(24px, 3vw, 64px);
  }
}

.section {
  padding: var(--space-6) 0;
}

.section--alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

h1,h2,h3,h4 {
  margin: 0 0 var(--space-3) 0;
  line-height: 1.25;
  font-weight: 600;
}

h1 { font-size: clamp(2.1rem,3.2vw,2.9rem); }
h2 { font-size: clamp(1.5rem,2.2vw,1.95rem); }
h3 { font-size: 1.2rem; }

p {
  margin: 0 0 var(--space-3) 0;
  max-width: none;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
}

.small {
  font-size: .95rem;
  color: var(--muted);
}


/* Apply to common text containers; prevents overflow with very long words */
body,
p, li, dt, dd,
h1, h2, h3, h4,
blockquote,
figcaption,
address,
/* Long text in form labels and checkboxes */
.bb-option .text,
.checkbox-with-label > span {
  -webkit-hyphens: auto; -ms-hyphens: auto; -moz-hyphens: auto; hyphens: auto;
  overflow-wrap: break-word; /* Fallback when hyphenation is unavailable */
}

/* Numeric readability: tabular figures in content/CTA areas */
.content, .contact-cta { font-variant-numeric: tabular-nums; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 60; /* Keep above the menu overlay */

                                background: rgba(255,255,255,.9);


backdrop-filter: blur(10px);

  border-bottom: 1px solid var(--border);


}

.header-inner {
  --wm-base-size: clamp(1.58rem, 2.35vw, 2.05rem); /* Keep the wordmark at about 71-75% of h1 */
  --ui-scale: 1.2; /* UI scaling factor for controls (e.g., menu button), enlarged by 20% */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);

  padding: calc(var(--space-4) * 0.875) var(--space-4) calc(var(--space-4) * 1.5); /* Header with more breathing room, without redesign */
}


/* Menu toggle (hamburger) */
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: calc(var(--wm-base-size) * 0.28 * var(--ui-scale)) calc(var(--wm-base-size) * 0.36 * var(--ui-scale));
  border-radius: clamp(8px, calc(var(--wm-base-size) * 0.45 * var(--ui-scale)), 12px);
  border: 1px solid rgba(31,94,67,.25);
  background: #fff;
  color: var(--brand);
    cursor: pointer;
  --btn-py: calc(var(--wm-base-size) * 0.28 * var(--ui-scale));
  --btn-icon: calc(var(--wm-base-size) * 0.8 * var(--ui-scale));
  --btn-h: calc(var(--btn-py) * 2 + var(--btn-icon));
  align-self: center;
  position: relative;
  top: auto;
  margin-top: 0;
}
.menu-toggle:hover { background: rgba(31,94,67,.06); }


.menu-toggle svg { display: block; width: calc(var(--wm-base-size) * 0.8 * var(--ui-scale)); height: calc(var(--wm-base-size) * 0.8 * var(--ui-scale)); }


/* Right-side navigation lightbox (compact panel extending into the hero) */
.main-nav {
  position: fixed;
  top: 100px;                /* Adjusted to the header bottom via JS when opened */
  right: 12px;
  width: clamp(320px, 36vw, 400px);
  max-height: 78vh;          /* Stay within the viewport height */
  background: #fff;

  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 60px rgba(0,0,0,.18);
  overflow: auto;
  z-index: 70;               /* Above header and content */

  /* Hidden in place to avoid horizontal page drift on mobile browsers */
  transform: translateX(24px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform .24s ease, opacity .2s ease, visibility 0s linear .24s;
}
.main-nav.is-open {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: transform .24s ease, opacity .2s ease;
}


/* Backdrop disabled for this variant (no fullscreen overlay) */
.nav-backdrop { display: none !important; }

/* primary navigation as vertical list */
.main-nav .primary-nav {
  display: flex;
  flex-direction: column;   /* vertical */
  align-items: flex-start;
  gap: var(--space-1);
  list-style: none;
  margin: 0;
  padding: var(--space-4); /* Even inner spacing inside the panel */
}

.main-nav .nav-group-heading {
  width: 100%;
  margin: var(--space-3) 0 6px;
  padding: 0 12px;
}

.main-nav .nav-group-heading:first-child {
  margin-top: 0;
}


.main-nav .nav-group-title {
  margin: 0;
  line-height: 1.3;
  color: var(--text);
}


/* Links as a clean list with hover effects */

.main-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  color: var(--text);
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease, transform .08s ease;
}
.main-nav a::after {
  content: "";
  font-size: 1.1em;
  line-height: 1;
  color: var(--muted);
  opacity: .7;
  transition: transform .15s ease, opacity .15s ease, color .15s ease;
}

/* Desktop: keep the button visible; show the menu only on click */
@media (min-width: 981px) {
  .menu-toggle {
  font-size: 1rem;
  }
}



/* Body: lock scrolling when the menu is open */
body.nav-open { overflow: hidden; }


.company-banner {
  --wm-base-size: clamp(1.58rem, 2.35vw, 2.05rem); /* Base size of the wordmark in a clear h1 hierarchy */
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  color: inherit;
}


.company-lines {
  display: flex;
  flex-direction: column;
  justify-content: center; /* center text block to match logo height */
  gap: 2px;
  padding-left: 0;

  border-left: 0; /* vertical divider removed */
  min-height: calc(var(--wm-base-size) * 1.92); /* Align the text block to the current logo height (~1.92x base) */

}


.brand-mark {
height: calc(var(--wm-base-size, 1.75rem) * 2.25 * 0.95 * 0.95 * 0.945); /* Derived from wordmark size; +5% from the last step (effective ~1.92x base) */

width: auto;
display: block;
color: var(--brand); /* allow inline SVG to inherit brand color via currentColor */
}


.company-banner strong {
  font-family: "Havelock Titling", serif;
  font-size: var(--wm-base-size, 1.75rem);
  font-weight: 900;
  color: var(--brand);
  letter-spacing: .06em; /* Slightly subtler tracking for clearer word shapes */
  white-space: nowrap; /* Desktop level: keep on one line */
}

.company-banner span {
  font-size: .9rem;
  color: var(--muted);
}

/* Wordmark: second line (second <strong>) in the header relative to the base size */
.company-banner .company-lines strong:last-child {
  font-size: calc(var(--wm-base-size, 1.75rem) * 0.543);
}

/* Tighter wordmark line-height for exact vertical centering with the logo */
.company-banner .company-lines strong { line-height: 1.1; }


/* Hover/focus styles: gold text, no background */
.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--accent);
  outline: none;
  text-decoration: none;
}
.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  transform: translateX(2px);
  opacity: .95;
  color: var(--accent);
}

/* Match header padding with container spacing on small screens */
@media (max-width: 640px) {
  .header-inner {
  padding-left: var(--space-3);
  padding-right: var(--space-3);
  --wm-base-size: clamp(1.32rem, 4.2vw, 1.40rem); /* mobile: about 79-83% of h1 */
  --ui-scale: 1.104; /* slightly smaller controls on small screens, enlarged by 20% overall */
  }

  .menu-toggle {
  top: 2px; /* slight optical correction for mobile header centering */
  }
}



.hero {
  position: relative;
  padding: 72px 0;
  min-height: 520px; /* ensure enough canvas for the graphic */
  overflow: hidden; /* keep background contained */
  background: linear-gradient(to right, #ffffff 0%, #f6f7f7 40%, #f6f7f7 100%);
}

/* Ensure text/content sits above background */
.hero .container {
  position: relative;
  z-index: 1;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}


/* Hero subline: fine gold line on the left, half the headline font size */
.hero-subline {
  font-size: clamp(1.05rem, 1.6vw, 1.45rem); /* ~ 50% of h1 (2.1-2.9rem, 3.2vw) */
  line-height: 1.6;
  margin-top: var(--space-6);
  margin-bottom: 0; /* Spacing logic moves to the following elements */
  /* Full width for a right-aligned DEKRA seal despite the global p[max-width] */
  max-width: none;
  width: 100%;
  display: block;                /* Height follows only the text */
}

/* Only the actual text line gets the gold bar on the left */
.hero-subline__text {
  display: inline-block;
  border-left: 3px solid var(--accent);
  padding-left: var(--space-3);
}


/* Format the hero badge like an h3 */
.hero .badge {
  font-size: 1.2rem;    /* Matches h3 */
  font-weight: 600;     /* Matches h3 */
  line-height: 1.25;    /* Matches h3 */
  color: var(--text);
  margin: 0 0 var(--space-3) 0; /* h3-like spacing below */
}
.hero .badge strong { font-weight: 500; }

.trust-bar {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap; /* Single row on larger screens */
  align-items: flex-end; /* Align bottom edges */
  margin-top: var(--space-4);
  overflow-x: visible; /* No horizontal scrolling */
}

/* Hero stack: keep spacing consistent via the following elements' top margins */
.hero .trust-bar { margin-top: 0; }
.hero .hero-cta { margin-top: var(--space-4); }
/* Spacing above the DEKRA seal (below the subline) */
.hero .trust-seal { margin-top: var(--space-4); }

/* Header line in the hero without extra spacing below for clean centering */
.hero h1 { margin-bottom: 0; }
@media (max-width: 640px) {
  .trust-bar { flex-wrap: wrap; overflow-x: visible; } /* Wrap only on small screens */
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 7px 12px;

  border-radius: 999px;

  background: rgba(255,255,255,.85);
  border: 1px solid rgba(0,0,0,.08);

  box-shadow:
    0 1px 2px rgba(0,0,0,.05),
    0 6px 18px rgba(0,0,0,.06);

  font-size: var(--reading-copy-size);
  font-weight: 500;
  letter-spacing: .02em;

  color: var(--muted);
}

/* DEKRA seal: subtle, without pill background; aspect ratio stays intact */
.trust-seal { display: flex; align-items: center; justify-content: flex-start; width: 100%; line-height: 0; }
.trust-seal img {
  width: 110px; /* Reduced for a subtler appearance */
  height: auto; /* Aspect ratio remains untouched */
  display: block;
}

.trust-dot {
  width: 10px;
  height: 10px;

  border-radius: 50%;

  background: var(--brand);

  box-shadow:
    0 0 0 3px rgba(31,94,67,.14);
}

.trust-dot--gold {
  background: var(--accent);

  box-shadow:
    0 0 0 3px rgba(184,155,94,.18);
}

/* Clickable DEKRA seal: lightbox trigger without pill styling */
.trust-seal__image.credential-item {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
  display: inline-block;
}
.trust-seal__image:hover { filter: brightness(0.98); }

/* Second row: credentials - factual, without CTA styling */
.trust-bar-secondary {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-3);
  margin-top: var(--space-2);
}


/* Team section: style trust pills exactly like credential buttons */
.team-with-expertise .trust-bar .credential-item {
  padding: 4px 12px;  /* Relatively wider, same height */
  line-height: 1.75;  /* Identical to the reference height */
  border-radius: 8px; /* More angular, not pill-shaped */
  box-shadow: none;   /* Calmer, like the credential buttons below */
}

/* Make credentials visually match the trust pills */
.credential-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;            /* Matches .trust-item */
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(0,0,0,.08);
  box-shadow:
    0 1px 2px rgba(0,0,0,.05),
    0 6px 18px rgba(0,0,0,.06);
  font-size: var(--reading-copy-size);            /* Matches .trust-item */
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;           /* Keep on one line for equal height */
  line-height: 1.25;             /* Stabilizes the pill height */
  transition: background-color .15s ease, border-color .15s ease;
}
.credential-item:hover,
.credential-item:focus-visible {
  background-color: #fafafa; /* Subtle hover */
  border-color: rgba(0,0,0,.14);
  outline: none;
}

@media (max-width: 980px) {
  .trust-bar-secondary { gap: var(--space-2); }
}

@media (max-width: 640px) {
  .trust-bar-secondary,
  .team-hero-credentials .trust-bar-secondary {
  flex-direction: column;
  align-items: stretch;
  }

  .credential-item { white-space: normal; }
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  border-radius: 12px;
  padding: 12px 16px;

  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.1; /* Robust, compact line-height for buttons */

  border: 1px solid transparent;

  cursor: pointer;

  transition:
    transform .08s ease,
    box-shadow .2s ease,
    background-color .2s ease,
    color .2s ease,
    border-color .2s ease;
}

/* Hero CTA: align button radius with system token for coherence */
.hero .btn { border-radius: var(--radius-md); }

.btn:focus {
  outline: none;
  box-shadow: var(--focus);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--brand);
  color: #fff;

  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}


.btn--secondary {
  background: transparent;
  color: var(--brand);

  border-color: rgba(31,94,67,.35);
}

.btn--secondary:hover {
  background: rgba(31,94,67,.06);
}

/* Accent button in gold */
.btn--accent {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-sm);
}
.btn--accent:hover {
  background: #a8894f; /* Slightly darkened gold */
  color: #fff;
}

.btn--link {
  padding: 0;
  border: 0;
  background: transparent;

  color: var(--brand);
  text-decoration: underline;

  font-weight: 600;
}

.hero-cta {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;          /* Align bottom edges */
  gap: 12px;
  flex-wrap: wrap;                /* Buttons may wrap */
  margin-top: 18px; /* Base value, overridden in the hero via .hero .hero-cta */
  margin-bottom: 18px;
}
.hero-cta__buttons { display: flex; gap: 12px; flex-wrap: wrap; }

.team-with-expertise {
  position: relative;
  padding: var(--space-6) 0;
  background: linear-gradient(to right, #ffffff 0%, var(--bg-alt) 55%);
  border-top: 1px solid var(--border);
  overflow: hidden;
}

/* Ensure content sits above decorative bg */
.team-with-expertise .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-4);
  align-items: start;
  justify-items: start;
}
/* Place the trust-pill row in the team section across the full width */
.team-with-expertise .trust-bar { grid-column: 1 / -1; align-items: center; justify-content: flex-start; gap: var(--space-3); margin-top: var(--space-3); }
.team-with-expertise .trust-bar .credential-item:last-child { white-space: nowrap; }

.team-photos {
  grid-column: span 6;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  order: 2;
}

.photo {
  text-align: center;
}

/* Make the photo visually match the tiles (outline, radius, subtle shadow) */
.team-with-expertise .photo {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(0,0,0,.05);
  overflow: hidden; /* Let the image inherit the rounded corners */
  aspect-ratio: 3 / 2; /* Stabilize the placeholder: 3:2 aspect ratio */
}

.photo img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
}

/* Team photo: fill the ratio container fully at all breakpoints */
.team-with-expertise .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;      /* Rounding comes from the container */
  margin-bottom: 0;      /* No extra gap inside the container */
  display: block;
}

.photo p {
  margin: var(--space-2) 0;
}

.tile-expertise {
  grid-column: span 6;
  grid-row: 1;
  height: fit-content;
  order: 1;
}

/* Second tile in the team section (costs): base layout matches Wertexpertise */
.tile-kosten {
  grid-column: span 6;
  height: fit-content;
  order: 1;
}

/* Closing section on the homepage: calm, premium, clear */
.closing-block {
  background: linear-gradient(to right, #ffffff 0%, #f6f7f7 40%, #f6f7f7 100%);
  border-top: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.closing-block .container {
  padding-top: var(--space-6);
  padding-bottom: var(--space-5);
  position: relative;
  z-index: 1;
}

/* Two-column grid on desktop, single column on mobile */
.closing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: stretch;
  justify-items: stretch;
}

@media (max-width: 900px) {
  .closing-grid {
  grid-template-columns: 1fr;
  }
}
/* Use the full column width in the closing section and visually align it with the reading cards */
.closing__section {
  max-width: none;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.closing__card {
  min-width: 0;
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: none;
}
/* No horizontal divider in the two-column layout */
.closing__section + .closing__section {
  border-top: none;
  padding-top: 0;
}
/* Keep the standard h2 size in the closing section */
.closing-block h2 {
  margin-bottom: var(--space-2);
}
.closing__card > h2,
.closing__card > p {
  max-width: none;
}
.closing__card > :last-child {
  margin-bottom: 0;
}


/* Place the CTA clearly at the end without making it look promotional */
.closing-cta {
  margin-top: var(--space-4);
  padding-top: 0;
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.closing-cta .btn {
  width: auto;
  max-width: 100%;
}

/* In the closing section, keep it calm and factual without a strong shadow */
.closing-block .btn--primary {
  box-shadow: none;
}

@media (max-width: 640px) {
  .closing__card {
    padding: var(--space-4) var(--space-3);
  }
}



/* Body text in the closing section: justified text + hyphenation */
.closing-block p {
  text-align: justify;
  text-justify: inter-word;      /* Edge/IE: harmless addition */
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;     /* Prevents overflow with long words/URLs */
  text-align-last: left;         /* Do not stretch the last line */
  max-width: none;               /* Full column width in the two-column layout */
}

/* Positioning and difficult properties: direct p children of the container
   + regional expertise: p elements inside nested wrappers in the container */
.content > .container > p,
.content.content-light .container p {
  text-align: justify;
  text-justify: inter-word;      /* Edge/IE: harmless addition */
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;     /* Prevents overflow with long words/URLs */
  max-width: none;               /* Full container width for a clean right edge */
  text-align-last: left;         /* Do not stretch the last line */
}

@media (max-width: 980px) {
  .team-tiles {
  grid-column: span 12;
  display: grid;
  gap: var(--space-4);
  width: 100%;
  }
}


/* Subtle subheadings in content sections */
.content h3 {
  font-size: 1.12rem; /* Aligned with body text */
  font-weight: 600;
  color: var(--text);
  margin-top: calc(var(--space-4) + 4px);
  margin-bottom: var(--space-3); /* Global default for h3 (16px) */
  line-height: 1.3;
}

/* Main text: decorative background illustration on the right (facade-variant.svg) */
.content {
  position: relative;
  overflow: hidden; /* Keep the illustration inside the section */
}
.content .container { position: relative; z-index: 1; }



/* Content sections (homepage): define vertical seams via section padding,
   not via child margins or margin collapse */
.content { padding-top: var(--space-6); padding-bottom: 0; }
/* Tiles to content: keep the visual spacing (56px); remove extra top padding from the first .content after .tiles */
.tiles + .content { padding-top: 0; }
/* Last child in content sections: no extra bottom margin for seam formation */
.content .container > :last-child { margin-bottom: 0; }
/* Content-light to closing block: keep the existing 72px seam (16px + 56px) via section bottom padding */
.content.content-light { padding-bottom: var(--space-3); }

/* Content section: consistent spacing for h2 and address */
.content .container > h2 { margin-top: var(--space-4); }
.content .container > h2:first-child { margin-top: 0; }
.content address { font-style: normal; margin: 0 0 var(--space-3) 0; }

/* Global content modules: stacked reading cards */
.content-stack {
  display: grid;
  gap: var(--space-5);
  width: 100%;
  max-width: none;
  margin: 0;
}

.content-card {
  min-width: 0;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: none;
}

.content-stack + .hero-cta {
  margin-top: var(--space-4);
}


.content-card--accent {
  border-left: 2px solid rgba(var(--accent-rgb), .45);
}

.content-note {
  display: block;
  margin: var(--space-4) 0;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: calc(var(--radius-md) - 4px);
  background: #fcfcfa;
}

.content-note--accent {
  border-left-color: var(--accent);
}

.content-card > h2,
.content-card > h3,
.content-card > p,
.content-card > ul,
.content-card > ol,
.content-card > .content-note {
  max-width: none;
}

.content-card > h2 {
  margin: 0 0 var(--space-3) 0;
}

.content-card h2[id] {
  scroll-margin-top: 160px;
}

.jump-nav {
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(91, 114, 79, 0.06);
  font-size: var(--reading-copy-size);
}

.jump-nav__title {
  margin: 0 0 var(--space-2) 0;
  font-size: clamp(1.5rem,2.2vw,1.95rem);
  font-weight: 600;
  color: var(--brand);
}

.jump-nav__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.jump-nav__list li {
  margin: 0;
}

.jump-nav__list li + li {
  margin-top: 0.45rem;
}

.jump-nav__list a {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.45rem;
  color: var(--brand);
  text-decoration: none;
  transition: color 160ms ease;
}

.jump-nav__list a::before {
  content: "→";
  flex: 0 0 auto;
  color: var(--accent);
  line-height: 1.4;
  transition: transform 160ms ease;
}

.jump-nav__list a:hover,
.jump-nav__list a:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.jump-nav__list a:active {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.jump-nav__list a:hover::before,
.jump-nav__list a:focus-visible::before,
.jump-nav__list a:active::before {
  transform: translateX(2px);
}

.content-card > h3 {
  margin-top: var(--space-4);
  margin-bottom: var(--space-3);
}

.content-card > h2:first-child,
.content-card > h3:first-child {
  margin-top: 0;
}

.content-card > p,
.content-card > ul,
.content-card > ol,
.content-card > .content-note {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  overflow-wrap: break-word;
  text-align-last: left;
}

.content-card > p,
.content-card > ul,
.content-card > ol {
  margin: 0 0 var(--space-3) 0;
}

.content-card > ul,
.content-card > ol {
  padding-left: 1.25em;
}

.content-card > li {
  margin: 0;
}

.content-card > :last-child {
  margin-bottom: 0;
}

@media (min-width: 1160px) {
  .content > .container > .content-stack,
  .content.content-light > .container > .content-stack {
    grid-column: 2;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
  }
}

@media (min-width: 641px) {
  .content-card {
    padding: var(--space-5);
  }
}

@media (max-width: 640px) {
  .content-card {
    padding: var(--space-4) var(--space-3);
  }

  .content-note {
    padding: var(--space-3);
  }
}

.tiles {

  position: relative;
  background: #ffffff; /* clean surface distinct from hero */
  border-top: 1px solid var(--border);
  padding: var(--space-6) 0;
  overflow: visible; /* allow facade bg to extend beyond section vertically */
}

.tiles--orientation {
  background: #f7f7f4;
  border-bottom: 1px solid var(--border);
}

.tiles--orientation + .tiles {
  border-top: 0;
}

.tiles--orientation .tile-title-accent {
  color: #1f5e43;
}

.tiles--orientation .tile:hover .tile-title-accent,
.tiles--orientation .tile:focus-visible .tile-title-accent {
  color: var(--accent);
}

.tiles .container {


  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(12,1fr);
  gap: var(--space-4);
}

@media (min-width: 641px) {
  .tiles .container {
  grid-auto-rows: 1fr;
  }

  .tiles .container > .tile {
  height: 100%;
  }
}

.tile {
  grid-column: span 6;

  display: grid;
  grid-template-columns: 1fr; /* Icon, title, and text stacked vertically */
  grid-auto-rows: min-content;
  row-gap: var(--space-2);
  align-content: center; /* Vertically center content when tiles share the same height */
  align-items: start;
  justify-items: start;

  background: #fbfbfa;
  background-clip: padding-box;

  border: 1px solid var(--border);
  border-radius: var(--radius-md);

  /* Very subtle separation */
  box-shadow: 0 4px 14px rgba(0,0,0,.05);

  padding: var(--space-4);
  color: inherit;
  text-decoration: none; /* Entire tile remains clickable without underlining */
  transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

.tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.07); /* Slightly stronger hover */
}

.tile img {
  grid-column: auto;
  grid-row: auto;
  width: 72px;  /* Larger than before */
  height: 72px; /* Larger than before */
  object-fit: contain;
  margin: 0; /* Spacing is controlled via grid gaps */
  align-self: start;
}

/* If inline SVG is used instead of <img>, keep the same size and placement */
.tile svg {
  grid-column: auto;
  grid-row: auto;
  width: 72px;
  height: 72px;
  margin: 0;
  color: var(--text); /* Enables currentColor in SVG */
  align-self: start;
}

/* Place tile text areas below the icon */
.tile h3 {
  grid-column: auto;
  margin: 0;
  font-weight: 700;
  font-size: 1.12rem; /* Aligned with body text */
  color: var(--text);
  /* Limit the title to max. 2 lines to stabilize height */
  display: -webkit-box;
  -webkit-line-clamp: 2; /* WebKit/Chromium */
  line-clamp: 2;          /* Standard property for compatibility */
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tile p  { grid-column: auto; margin: 0; color: #222; line-height: 1.65; font-size: 1.12rem; }

/* Hover/focus: text and pictogram turn gold */
.tile:hover h3,
.tile:hover p,
.tile:hover svg,
.tile:focus-visible h3,
.tile:focus-visible p,
.tile:focus-visible svg { color: var(--accent); }

/* Focus state for keyboard users */
.tile:focus-visible {
  outline: 2px solid #0B0B0B; /* Clear contrast edge for AA */
  outline-offset: 2px;
  box-shadow: 0 6px 18px rgba(0,0,0,.06); /* Neutral gray shadow */
}

/* Wertexpertise tile: safe stacking without the watermark */
.tile-expertise .tile { position: relative; z-index: 1; }

/* Uniform height: team tiles like the service tiles (e.g. "Scheidung") */
.team-with-expertise .tile-expertise .tile,
.team-with-expertise .tile-kosten .tile {
  min-height: 168px;
  row-gap: 0;
  padding: var(--space-3);
}

.team-with-expertise .tile-expertise .tile h3,
.team-with-expertise .tile-kosten .tile h3 {
  margin-top: 3px;
}

.team-with-expertise .tile-expertise .tile p,
.team-with-expertise .tile-kosten .tile p {
  margin-top: var(--space-1);
}

/* Keep the base layout outside desktop */

/* Team section: left column wrapper with two equal-height tiles, photo on the right - desktop */
@media (min-width: 981px) {
  .team-with-expertise .container {
  grid-template-rows: auto auto; /* Top row: trust pills, below: two-column layout */
  align-items: stretch;
  }

  /* Left column: wrapper with two stacked tiles (no forced height) */
    .team-with-expertise .team-tiles {
  grid-column: 1 / 7;
  order: 1;
  width: 100%;
  min-height: calc((2 * 168px) + var(--space-4));
  align-self: stretch;
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  aspect-ratio: 3 / 2;
  }

  /* Right column: photo stretches across the full column height if needed */
  .team-with-expertise .team-photos {
  grid-column: 7 / -1;
  order: 2;
  width: 100%;
  align-self: stretch; /* Stretch the photo column to the same height as the tiles */
  }
  .team-with-expertise .tile-expertise,
  .team-with-expertise .tile-kosten {
  height: 100%;
  }
  .team-with-expertise .tile-expertise .tile,
  .team-with-expertise .tile-kosten .tile {
  min-height: 0;
  height: 100%;
  }
  .team-with-expertise .photo { width: 100%; height: 100%; }
  .team-with-expertise .photo > a {
  display: block;
  width: 100%;
  height: 100%;
  }
  .team-with-expertise .photo img {
  width: 100%;
  height: 100%;          /* Fill the full column height */
  object-fit: cover;     /* Clean cropping when proportions differ */
  margin-bottom: 0;      /* End flush with the tiles */
  border-radius: 0;      /* Rounding comes from the wrapper */
  display: block;        /* No gaps below images */
  }
}

/* New wrapper class: hero-like credentials below the team section */
.team-with-expertise .team-hero-credentials {
  grid-column: 1 / -1;              /* Full width beneath both columns */
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
  order: 3;                         /* in der Grid-Reihenfolge NACH Tiles & Foto */
}
.team-hero-credentials .trust-bar-secondary {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;                         /* wie im Hero */
  width: 100%;
}


.team-hero-credentials .credential-item {
  padding: 4px 8px;                 /* wie im Hero */
  border-radius: 8px;               /* wie im Hero */
  box-shadow: none;                 /* wie im Hero */
  line-height: 1.75;                /* Same visual height as the first trust bar */
}
/* Subtle prioritization: first credential weighted slightly more while keeping a uniform look */
.team-hero-credentials .credential-item:first-child { font-weight: 600; }
/* Geometrically align trust pills in the team section to the secondary trust bar */
.team-hero-credentials .trust-item {
  padding: 4px 8px;                 /* Like .credential-item */
  border-radius: 8px;               /* Use 8px instead of 999px to avoid a pill shape */
  box-shadow: none;                 /* Like .credential-item */
}

@media (max-width: 980px) {
  .team-with-expertise .trust-bar {
  flex-wrap: wrap;
  }


  .team-with-expertise .trust-bar .credential-item,
  .team-with-expertise .trust-bar .credential-item:last-child,
  .team-hero-credentials .credential-item {
  white-space: normal;
  }

    .team-hero-credentials .credential-item {
  align-items: flex-start;
  line-height: 1.45;
  }
}


form { max-width: none; width: 100%; }

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

input, select, textarea {
  width: 100%;
  padding: 12px;

  border-radius: 12px;
  border: 1px solid var(--border);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
  font-family: inherit; /* Use the body-text font in form controls as well (including select) */
}

/* Uniform field background: required fields gray, optional fields white */
/* Base: all fields light gray */
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  background-color: #ececec;
}
/* Optional fields (without required) are overridden to white */
input:not([type="checkbox"]):not([type="radio"]):not([required]),
select:not([required]),
textarea:not([required]) {
  background-color: #ffffff;
}

textarea { min-height: 140px; }

/* Placeholder styling: Source Sans 3 Italic in subtle gray */
input::placeholder,
textarea::placeholder {
  font-family: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  font-style: italic;
  font-weight: 400;
  color: #6f6f6f; /* Subtle but clearly readable */
  opacity: 1;     /* Safari/Firefox: full opacity for the defined color */
}
/* WebKit/Safari Fallback */
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
  font-family: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  font-style: italic;
  font-weight: 400;
  color: #6f6f6f;
  opacity: 1;
}
/* Older Firefox */
input::-moz-placeholder,
textarea::-moz-placeholder {
  font-family: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  font-style: italic;
  font-weight: 400;
  color: #6f6f6f;
  opacity: 1;
}
/* IE/Edge Legacy */
input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
  font-family: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  font-style: italic;
  font-weight: 400;
  color: #6f6f6f;
}

/* Hover effects for input fields (except checkboxes/radios) */
input:not([type="checkbox"]):not([type="radio"]):hover,
select:hover,
textarea:hover {
  border-color: rgba(31,94,67,.35); /* Subtle greenish border */
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .12); /* Fine gold shimmer */
}

/* Light hover for checkboxes: soft outline that does not interfere with focus */
input[type="checkbox"]:hover:not(:disabled):not(:focus-visible) {
  outline: 2px solid rgba(var(--accent-rgb), .35);
  outline-offset: 2px;
}

/* Custom select: system-neutral styling with a custom arrow */
form select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  /* Custom arrow, subtle in muted gray */
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235b5b5b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px 14px;

  /* Create space on the right for the arrow */
  padding-right: 40px;
}
/* IE/Edge Legacy: hide the native expand arrow */
form select::-ms-expand { display: none; }

.site-footer {
  margin-top: var(--space-6);

  background: #313934; /* Medium-dark, desaturated green-gray */
  color: rgba(245,242,236,.88);  /* Warm light gray for text */
  border-top: 1px solid rgba(255,255,255,.06); /* Very fine top divider */
}

.site-footer .container {
  padding: var(--space-4);
  font-size: .9rem;
}

.site-footer a {
  color: rgba(250,247,242,.92); /* Links: light and calm, not a harsh white */
}

.site-footer a:hover {
  color: var(--accent);
}

/* Footer main: responsive grid (1 / 2 / 4 columns) */
.site-footer .footer-main {
  display: grid;
  grid-template-columns: 1fr;   /* mobile: single column */
  gap: var(--space-4);          /* equal spacing between items */
  align-items: start;
  justify-items: stretch;
}
@media (min-width: 641px) {
  .site-footer .footer-main {
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* tablet: two columns */
  gap: var(--space-4);
  }
}
@media (min-width: 981px) {
  .site-footer .footer-main {
  grid-template-columns: repeat(4, minmax(0, 1fr)); /* desktop: four columns with equal widths */
  gap: var(--space-5);
  }
}


/* Footer sections behave as clean columns */
.site-footer .footer-section {
  min-width: 0;
  width: 100%;
}


/* Lists in footer: no bullets, clean spacing */
.site-footer .footer-nav ul,
.site-footer .footer-legal ul,
.site-footer .footer-services ul,
.site-footer .footer-cases ul,
.site-footer .footer-company ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer .footer-nav li + li,
.site-footer .footer-legal li + li,
.site-footer .footer-services li + li,
.site-footer .footer-cases li + li,
.site-footer .footer-company li + li {
  margin-top: var(--space-1);
}


/* Address: normal font style, tidy spacing */
.site-footer address {
  font-style: normal;
  margin: 0;
}
.site-footer address p {
  margin: 0 0 var(--space-1) 0;
}
.site-footer address p:last-child { margin-bottom: 0; }

/* Footer headings */
.site-footer .footer-heading {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 var(--space-2) 0;
  color: rgba(255,255,255,.94); /* Headings slightly lighter than body text */
}

/* Footer bottom: clearly separated bar */
.site-footer .footer-bottom {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255,255,255,.12); /* Subtle, not harsh */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.site-footer .footer-bottom p { margin: 0; }
@media (max-width: 640px) {
  .site-footer .footer-bottom {
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  }
}

/* Lightbox (PDF Overlay) */
.lightbox { position: fixed; inset: 0; z-index: 100; display: none; }
.lightbox.is-open { display: block; }
.lightbox__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.lightbox__dialog {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: min(960px, 92vw); height: min(80vh, 820px);
  background: #fff; border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  overflow: hidden; /* No hard edges, calmer look */
}
.lightbox__close {
  position: absolute; top: 8px; right: 10px;
  background: #fff; color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 32px; height: 32px; line-height: 30px; text-align: center;
  cursor: pointer; font-weight: 700;
}
.lightbox__content { position: absolute; inset: 42px 0 34px 0; }
.lightbox__content iframe { width: 100%; height: 100%; border: 0; }
.lightbox__fallback { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; }

body.has-contact-confirm { overflow: hidden; }
.lightbox--confirm .lightbox__dialog {
  width: min(760px, 92vw);
  height: auto;
  max-height: calc(100vh - 2rem);
  overflow: auto;
}
.lightbox--confirm .lightbox__content {
  position: static;
  inset: auto;
  padding: 24px;
}
.lightbox--confirm .lightbox__close {
  text-decoration: none;
}
.lightbox--confirm .lightbox__summary {
  margin: 0 0 1rem 1rem;
}
.lightbox--confirm .lightbox__summary li + li {
  margin-top: 0.35rem;
}
.lightbox--confirm .lightbox__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}


@media (min-width: 981px) {
  /* Body text in main sections after the hero and in the closing section */
    .hero ~ .content p,
  .hero ~ * .content p,
  .closing-block p,
  .content h3,
  .tile h3,
  .tile p { font-size: var(--reading-copy-size); }

  /* Buttons on the homepage (hero + closing section) */
  .hero .btn,
  .closing-block .btn { font-size: 1.30rem; }

/* Trust pills and credentials in the hero and in the duplicated team section */
    .hero .trust-item,
  .hero .credential-item,
  .team-hero-credentials .credential-item,
  .team-hero-credentials .trust-item,
  .team-with-expertise .trust-bar .credential-item { font-size: var(--reading-copy-size); }
}

@media (max-width: 980px) {
  /* Larger type on mobile/tablet, but more moderate than on desktop */
    .hero ~ .content p,
  .hero ~ * .content p,
  .closing-block p,
  .content h3,
  .tile h3,
  .tile p { font-size: var(--reading-copy-size); }

  .hero .btn,
  .closing-block .btn { font-size: 1.16rem; }

    .hero .trust-item,
  .hero .credential-item,
  .team-hero-credentials .credential-item,
  .team-hero-credentials .trust-item,
  .team-with-expertise .trust-bar .credential-item { font-size: var(--reading-copy-size); }
}

/* Hero CTA sizing: consolidated overrides matching current optics */
@media (min-width: 981px) { .hero .btn { font-size: 1.26rem; } }

@media (max-width: 640px) { .hero .btn { font-size: 1.12rem; padding: 10px 16px; } }

.hero .trust-bar-secondary { gap: 8px; }
.hero .credential-item {
  padding: 4px 8px;            /* Less vertical and horizontal padding */
  border-radius: 8px;           /* Less pill/button-like */
  box-shadow: none;             /* Remove the shadow */
}
/* First trust bar: same geometry as credential buttons */
.hero .trust-item {
  padding: 4px 8px;            /* Same as .hero .credential-item */
  border-radius: 8px;          /* Same as .hero .credential-item */
  box-shadow: none;            /* Same as .hero .credential-item */
}

@media (min-width: 981px) and (max-width: 1799px) {
  .team-with-expertise .tile h3 {
  font-size: 1.16rem;
  line-height: 1.35;
  hyphens: auto;
  }

  .team-with-expertise .tile p {
  font-size: 1.12rem;
  line-height: 1.6;
  }
}

/* Desktop on very wide containers: slightly larger base type */
@media (min-width: 1800px) {
  :root { --reading-copy-size: 1.38rem; }
  h1 { font-size: clamp(2.3rem,3vw,3.15rem); }
  h2,
  .jump-nav__title { font-size: clamp(1.62rem,2vw,2.08rem); }
  h3,
  .content h3,
  .tile h3,
  .content.content-light form h3 { font-size: var(--reading-copy-size); }
}


/* Very small devices: slightly smaller to avoid unwanted wrapping */
@media (max-width: 360px) {
  html { font-size: 17px; }
}




@media (min-width: 981px) and (max-width: 1159px) {
  .team-with-expertise .team-tiles {
  grid-column: 1 / 8;
  }

  .team-with-expertise .team-photos {
  grid-column: 8 / -1;
  }
}

@media (max-width:980px){

.team-photos {
  grid-column: span 12;
}

.team-tiles,
.tile-expertise,
.tile-kosten {
  grid-column: 1 / -1;
}

}

@media (max-width:640px){

.container {
  padding: 0 var(--space-3);
}

/* Mobile stacked layout: icon on top, text below */
.tile {
  grid-column: span 12;
  grid-template-columns: 1fr; /* Stack */
}
.tile img,
.tile svg {
  grid-column: auto;
  grid-row: auto;
  width: 56px;  /* Larger on mobile */
  height: 56px; /* Larger on mobile */
  margin: 0 0 var(--space-3) 0; /* Space below the icon */
}
.tile h3, .tile p { grid-column: auto; }

.logo img {
  height:52px;
}


.hero-cta {
  flex-direction: column;
  align-items: stretch;
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
}
/* Mobile: seal below the subline, buttons below it - without order changes */
.trust-seal { margin-left: 0; }
/* Size adjustments on mobile */
.trust-seal img { width: 72px; height: auto; }
/* Reduce and center the team photo on mobile */
.team-with-expertise .photo { width: 100%; max-width: none; margin: 0; }
/* Trust pills: left-aligned on small screens and allowed to wrap */
.team-with-expertise .trust-bar { justify-content: flex-start; gap: var(--space-3); }


/* Mobile fix: wordmark limited to two lines (each strong kept to one line), no hyphenation,
   font size becomes dynamically smaller only on mobile */
.company-banner strong {
  white-space: nowrap;
  letter-spacing: .05em; /* Same as before on mobile */
  hyphens: none;
  -webkit-hyphens: none;
  -ms-hyphens: none;
  -moz-hyphens: none;
  overflow-wrap: normal;
  word-break: keep-all;
}
.company-banner { --wm-base-size: clamp(1.32rem, 4.2vw, 1.40rem); }


}

/* Active menu item: subtle highlighting for aria-current */
.main-nav a[aria-current="page"] {
  color: var(--brand);
  background: rgba(31,94,67,.06);
  border-color: rgba(31,94,67,.25);
}

/* Mobile: h1 20% smaller */
@media (max-width: 640px) {
  h1 { font-size: 1.68rem; }
}
@media (max-width: 640px) {
  .hero-subline { font-size: clamp(1.05rem, 1.6vw, 1.40rem); }
}

/* Content: horizontal divider */
.content .container hr[aria-hidden="true"] {
  border: 0;
  border-top: 1px solid #e5e7eb;
  margin: 1rem 0 1.25rem;
}

/* ===== Contact form page - moved out of ONLINE/kontakt/index.php ===== */
/* Scope: .content.content-light form ..., .contact-form-card, custom select, error states */
/* Note: tokens (var(--brand), var(--accent-rgb), var(--space-*), var(--radius-md)) are used. */

/* Labels only in this form: not bold */
.content.content-light form label { font-weight: 400; }
/* Only in this form: visually hidden labels for accessibility */
.content.content-light form .visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0; left: -9999px;
}
/* Checkbox alignment to the left of the text in the special-features area and for additional details */
.content.content-light form .bb-option,
.content.content-light form .checkbox-with-label {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.5rem;
  text-align: left;
  width: 100%;
}
.content.content-light form .bb-option .text { flex: 1; }
.content.content-light form .bb-option input[type="checkbox"],
.content.content-light form .checkbox-with-label input[type="checkbox"],
.content.content-light form #ergaenzende-angaben-group input[type="checkbox"] { margin-top: 8px; }
/* Keep everything left-aligned in the special-features area */
.content.content-light form,
.content.content-light form #rechte-und-lasten-einfach,
.content.content-light form #rechte-und-lasten-einfach > div,
.content.content-light form #ergaenzende-angaben-group { text-align: left; }
/* Checkbox override: undo the global 100% width for checkbox inputs */
.content.content-light form input[type="checkbox"] { width: auto; height: auto; display: inline-block; }
/* Ensure that checkbox and text stay on one line */
.content.content-light form .bb-option { flex-direction: row; }
.content.content-light form .bb-option input[type="checkbox"] { flex: 0 0 auto; }

/* Bring checkboxes into the color scheme (green/gold) and make them larger for better clickability */
.content.content-light form input[type="checkbox"] {
  accent-color: var(--brand); /* Dark green */
  width: 22px;
  height: 22px;
}
.content.content-light form input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent); /* Gold focus ring */
  outline-offset: 2px;
}
/* Dark green text for the "no special features known" option */
.content.content-light form #keine-rechte-und-lasten-group .text { color: var(--brand); }

/* Vertical rhythm for fields */
.content.content-light form .form-group { margin-bottom: var(--space-4); }
.content.content-light form .form-group:last-child { margin-bottom: 0; }

/* Heading spacing in the form area + global h3 size in the form */
.content.content-light form h3 {
  margin-top: var(--space-5);
  margin-bottom: var(--space-3); /* globaler Default (16px) */
  font-size: 1.2rem; /* entspricht globalem h3 */
}

/* Color selected headings in the contact form green */
.content.content-light form h3.form-heading--green {
  color: var(--brand);
}

/* Uniform font size in the form: aligned with body text (1.12rem); .btn buttons follow global sizes */
.content.content-light form label,
.content.content-light form input,
.content.content-light form select,
.content.content-light form textarea,
.content.content-light form .bb-option .text,
.content.content-light form .checkbox-with-label > span {
  font-size: 1.12rem;
}

/* Checkbox groups: no additional lower edge from the global label margin */
.content.content-light form .bb-option,
.content.content-light form .checkbox-with-label { margin-bottom: 0; }

/* Spacing between the two special-feature options */
.content.content-light form #rechte-und-lasten-einfach > div + div { margin-top: var(--space-3); }

/* Spacing before the "no special features" group */
.content.content-light form #keine-rechte-und-lasten-group { margin-top: var(--space-3); }

/* Spacing between the "Additional details" toggle and the textarea */
.content.content-light form #ergaenzende-angaben-group textarea { margin-top: var(--space-2); }

/* Spacing above the submit button */
.content.content-light form button[type="submit"] { margin-top: var(--space-3); }


/* Inline labels (not flex): right-side spacing plus slight lowering */
.content.content-light form label:not(.bb-option):not(.checkbox-with-label) > input[type="checkbox"] {
  margin-right: 0.5rem;
  vertical-align: text-bottom; /* Visually slightly lower than the baseline */
  position: relative;
  top: 6px; /* Positioned a bit lower so the top edge does not protrude */
}

/* Placeholder-like marker inside the checkbox label */
.content.content-light form .checkbox-with-label .placeholder-note {
  color: var(--muted);
  opacity: .8;
  font-style: italic;
  font-weight: 400;
  font-size: .95em;
  margin-left: .35rem;
}

/* Row layout for proportional field widths */
.content.content-light form .form-row {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  flex-wrap: nowrap;
  margin-bottom: var(--space-4);
}
.content.content-light form .form-row .form-group {
  margin-bottom: 0;
  flex: 1 1 0;
}
.content.content-light form .col-1 { flex: 1 1 0; }
.content.content-light form .col-2 { flex: 2 1 0; }
.content.content-light form .col-3 { flex: 3 1 0; }

@media (max-width: 980px) {
  .content.content-light form .form-row {
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  }

  .content.content-light form .form-row .form-group,
  .content.content-light form .col-1,
  .content.content-light form .col-2,
  .content.content-light form .col-3 {
  flex: 1 1 100%;
  min-width: 0;
  }
}


/* Custom select property type: strict typography also in the open menu */
.content.content-light form .custom-select { position: relative; }
.content.content-light form .custom-select__button {
  width: 100%;
  text-align: left;
  padding: 12px 40px 12px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font-family: inherit;
  font-size: 1.12rem;
  line-height: normal; /* Same line height as the input for an identical overall height */
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.content.content-light form .custom-select__button::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235b5b5b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-size: 14px 14px;
  opacity: .9;
  pointer-events: none;
}
.content.content-light form .custom-select__button:hover {
  border-color: rgba(31,94,67,.35);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .12);
}
.content.content-light form .custom-select__button:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.content.content-light form .custom-select__menu[hidden] { display: none; }
.content.content-light form .custom-select__menu {
  position: absolute;
  left: 0; top: calc(100% + 6px);
  width: max-content;
  min-width: 100%;
  max-width: calc(100vw - 48px);
  white-space: nowrap;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  max-height: none; /* Enough space for all options - no internal scrolling */
  overflow: visible; /* No internal scrolling */
  padding: 4px 0;
  z-index: 60;
}
.content.content-light form .custom-select__option {
  padding: 8px 12px; /* Slightly tighter line spacing */
  cursor: pointer;
  font-family: inherit;
  font-size: 1.12rem;
  line-height: 1.32; /* kompakter */
  color: var(--text);
  white-space: nowrap;
}
.content.content-light form .custom-select__option:hover,
.content.content-light form .custom-select__option.is-active {
  background: #f3f4f4;
}
.content.content-light form .custom-select__option.is-selected {
  color: var(--brand);
  font-weight: 600;
}

/* Form card (variant B): neutral card with a gold accent bar on the left */
.content.content-light .contact-form-card {
  border: 1px solid var(--border);
  border-left: 2px solid rgba(var(--accent-rgb), .6);
  border-radius: var(--radius-md);
  background: #fff;
  padding: var(--space-5) var(--space-4);
  box-shadow: 0 4px 14px rgba(0,0,0,.04);
  margin-top: var(--space-4);
}
@media (max-width: 640px) {
  .content.content-light .contact-form-card { padding: var(--space-4) var(--space-3); }
}

/* Keyboard focus: subtle gold shimmer when the form is focused */
.content.content-light .contact-form-card:focus-within {
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .08), 0 4px 14px rgba(0,0,0,.04);
}

/* Rights and encumbrances: round the fieldset like the input fields and frame it cleanly */
.content.content-light form #rechte-und-lasten-fieldset {
  margin: 0; /* Remove browser default */
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border);
  border-radius: 12px; /* Same as input/select/textarea */
  background: #fff; /* Calm background */
}

/* Error display: red marking + error message below the field */
.content.content-light form .error-message {
  color: #b00020; /* Readable red */
  font-size: 0.95rem;
  margin-top: 6px;
}
.content.content-light form input.is-invalid,
.content.content-light form select.is-invalid,
.content.content-light form textarea.is-invalid {
  border-color: #d93025 !important;
  background-color: #fff5f5;
  box-shadow: 0 0 0 3px rgba(217,48,37,.12);
}
.content.content-light form input[type="checkbox"].is-invalid {
  outline: 2px solid #d93025;
  outline-offset: 2px;
}

/* Mobile: more compact spacing */
@media (max-width: 640px) {
  .content.content-light form .form-group { margin-bottom: var(--space-3); }
  .content.content-light form h3 { margin-top: var(--space-4); /* margin-bottom stays global at var(--space-3) */ }
  .content.content-light form #rechte-und-lasten-einfach > div + div { margin-top: var(--space-2); }
}

/* Contact page: compact hero - migrated from the previous inline styles */
.hero.hero--compact { padding: 2rem 0; min-height: 0; }

.contact-intro-meta {
  margin-top: var(--space-3);
  font-size: clamp(1.2rem, 1.75vw, 1.5rem);
  font-weight: 600;
  line-height: 1.35;
  color: var(--brand);
}

.contact-intro-meta a {
  color: inherit;
  text-decoration: none;
}

.contact-intro-meta a:hover,
.contact-intro-meta a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.12em;
}


/* Privacy page: compact hero - migrated from the page's previous inline styles */
.hero.hero--legal { padding: 2rem 1.5rem; min-height: 200px; display: flex; align-items: center; }

/* Privacy page: note paragraph */
.legal-note { margin-top: 2rem; font-size: 0.95rem; color: #555; }

/* Privacy page: make body text typographically consistent */
.page-legal .content p,
.page-legal .content li,
.page-legal .content address,
.page-legal .content address p,
.page-legal .content .legal-note {
  font-size: var(--reading-copy-size);
  line-height: 1.65;
}

@media (min-width: 1160px) {
  .content > .container,
  .content.content-light > .container,
  .page-legal .content .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 125ch) minmax(0, 1fr);
  }

  .content > .container > *,
  .content.content-light > .container > *,
  .page-legal .content .container > * {
  grid-column: 1 / -1;
  }

    .content > .container > h2,
  .content > .container > h3,
  .content > .container > p,
  .content > .container > ul,
  .content > .container > address,
  .content > .container > .hero-cta,
  .content.content-light > .container > h2,
  .content.content-light > .container > h3,
  .content.content-light > .container > p,
  .content.content-light > .container > .hero-cta,
  .page-legal .content .container > h2,
  .page-legal .content .container > h3,
  .page-legal .content .container > p,
  .page-legal .content .container > ul,
  .page-legal .content .container > address,
  .page-legal .content .container > .hero-cta,
  .page-legal .content .container > .legal-note {
  grid-column: 2;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  }

  .content > .container > h2,
  .content > .container > h3,
  .content.content-light > .container > h2,
  .content.content-light > .container > h3,
  .page-legal .content .container > h2,
  .page-legal .content .container > h3 {
  text-align: left;
  }

  .content > .container > p,
  .content > .container > address,
  .content.content-light > .container > p,
  .page-legal .content .container > p,
  .page-legal .content .container > address,
  .page-legal .content .container > .legal-note {
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
  text-align-last: left;
  }

    .content > .container > .ueber-uns-profiles {
  grid-column: 2;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
  }
}


/* About page: compact hero as a calm page header */
.hero.hero--about {
  padding: 2.5rem 0 1.5rem;
  min-height: 0;
}

.hero.hero--about .hero-subline {
  margin-top: var(--space-3);
}

.hero.hero--about + .content,
.hero.hero--about + * .content:first-child {
  padding-top: var(--space-5);
}
/* About page: image block (profiles) */
.content .container > .ueber-uns-profiles {
  margin: 0 0 var(--space-3) 0;
}

.ueber-uns-profiles .profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  max-width: none;
  margin: 0;
  align-items: stretch;
  justify-items: stretch;
}

.ueber-uns-profiles .profile-grid .photo-card {
  max-width: 360px;
  margin: 0;
  padding: var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(0,0,0,.05);
  background: #fff;
  overflow: hidden;
}

.ueber-uns-profiles .profile-grid .photo-card img {
  display: block;
  width: 100%;
  height: auto;
  margin-bottom: var(--space-2);
  border-radius: calc(var(--radius-md) - 2px);
}

.ueber-uns-profiles .profile-grid .photo-card figcaption {
  margin: 0;
  line-height: 1.35;
}

@media (max-width: 900px) {
  .ueber-uns-profiles .profile-grid {
  grid-template-columns: 1fr;
  max-width: none;
  gap: var(--space-3);
  }
}

/* About-page-specific image cards */
.ueber-uns-profiles .profile-text .ueber-uns-profile-photo-card {
  float: left;
  width: 216px;
  max-width: 216px;
  margin: 9px var(--space-3) var(--space-3) 0;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(0,0,0,.05);
  background: #fff;
  overflow: hidden;
  text-align: center;
}

.ueber-uns-profile-photo-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: calc(var(--radius-md) - 2px);
  margin: 0 auto;
  display: block;
}

.ueber-uns-profile-photo-caption {
  display: block;
  width: 100%;
  font-size: .78rem;
  line-height: 1.25;
  color: #8f8f8f;
  white-space: nowrap;
  margin-top: 6px;
  text-align: center;
  text-align-last: center;
}

.ueber-uns-org-photo-card {
  width: 130px;
  max-width: 130px;
  margin: 0 0 var(--space-3) var(--space-3);
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px rgba(0,0,0,.05);
  background: #fff;
  overflow: hidden;
  text-align: center;
  height: auto;
}

.ueber-uns-org-photo-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  border-radius: calc(var(--radius-md) - 2px);
  margin: 0 auto;
  display: block;
}

.ueber-uns-org-photo-caption {
  display: block;
  width: 100%;
  font-size: .46rem;
  line-height: 1.15;
  color: #8f8f8f;
  white-space: normal;
  margin-top: -3px;
  text-align: center;
  text-align-last: center;
}

.ueber-uns-profile-photo-caption-span {
  font-weight: 400;
}

.ueber-uns-org-photo-caption-span {
  font-weight: 400;
}

@media (max-width: 640px) {
  .company-banner { gap: 14px; }
}

@media (max-width: 480px) {
  .company-banner { gap: 10px; }
  .header-inner { --ui-scale: 1.032; } /* downscale controls a bit more on very small phones, enlarged by 20% overall */
}

@media (max-width: 390px) {
  .header-inner {
  padding-left: 12px;
  padding-right: 12px;
  gap: 8px;
  }
  .company-banner { gap: 8px; }
  .menu-toggle {
  flex: 0 0 auto;
  align-self: center;
  margin-top: 0;
  }
}

@media (max-width: 360px) {
  /* Set UI scale so button height equals h3 height (~1.5rem) */
  .header-inner {
  --ui-scale: 0.882; /* extra-small devices, enlarged by 20% overall */
  --wm-base-size: clamp(1.12rem, 4.6vw, 1.24rem);
  }
  .company-banner {
  --wm-base-size: clamp(1.12rem, 4.6vw, 1.24rem);
  gap: 6px;
  }
  .company-banner strong { letter-spacing: .035em; }
}


/* Enlarge menu button on extra-wide desktops */
@media (min-width: 1800px) {
  .header-inner { --ui-scale: 1.44; } /* +20% larger than the current maximal view */
}



/* === Telephone consultation - small popover above the CTA button === */
.phone-advice-wrap { position: relative; display: flex; }
.hero-cta__buttons > .hero-cta__item { display: flex; }
.hero-cta__buttons > .hero-cta__item > .btn { width: 100%; }
.phone-advice-popover[hidden] { display: none; }
.phone-advice-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 50; /* Below the fixed header, but above hero content */
  background: var(--bg-raise);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: var(--space-3);
  width: max-content;
  min-width: 260px;
  max-width: calc(100vw - 48px);
}
.phone-advice-popover__title {
  margin: 0 0 var(--space-2) 0;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
}
.phone-advice-popover__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.phone-advice-popover__list li + li { margin-top: 6px; }
.phone-advice-popover a { text-decoration: none; }
.phone-advice-popover a:hover { text-decoration: underline; }

@media (min-width: 641px) {
  .hero-cta__buttons > .hero-cta__item:last-child .phone-advice-popover {
  left: auto;
  right: 0;
  }
}

@media (max-width: 980px) and (min-width: 641px) {
  .hero-cta__buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  width: 100%;
  }

    .hero-cta__buttons > .hero-cta__item,
  .hero-cta__buttons > .hero-cta__item > .btn {
  width: 100%;
  }
}


@media (max-width: 640px) {
  .phone-advice-popover {
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 48px);
  }
}

/* Trust pills: vertically center them even if individual pills wrap to two lines */
.trust-bar {
  align-items: center;
}

.trust-bar-secondary {
  align-items: center;
}

@media (max-width: 640px) {
  .trust-bar {
  align-items: center;
  }
}

@media (max-width: 640px) {
  .hero-cta__buttons {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  }

    .hero-cta__buttons > .hero-cta__item,
  .hero-cta__buttons > .hero-cta__item > .btn {
  width: 100%;
  }
}

@media (max-width: 390px) {
  .hero {
  padding: 56px 0;
  min-height: 0;
  }

  .hero-subline {
  margin-top: var(--space-4);
  }

  .team-with-expertise .trust-bar {
  gap: var(--space-2);
  }

  .team-with-expertise .trust-bar .credential-item {
  max-width: 100%;
  padding: 4px 10px;
  line-height: 1.5;
  }

  .team-with-expertise .trust-bar .credential-item:last-child {
  white-space: normal;
  }

  .phone-advice-popover {
  min-width: 0;
  width: min(320px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  padding: 12px;
  }

  .phone-advice-popover__list {
  font-size: 0.98rem;
  line-height: 1.45;
  }
}

@media (max-width: 390px) {
  .site-footer .container {
  padding: var(--space-3);
  }

  .site-footer .footer-bottom nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  }

  .site-footer .footer-bottom nav span[aria-hidden="true"] {
  display: none;
  }
}

/* Prevent horizontal layout drift on zoomed mobile and tablet viewports */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

@supports not (overflow: clip) {
  html,
  body {
    overflow-x: hidden;
  }
}

@media (max-width: 980px) {
  .header-inner {
    min-width: 0;
  }

  .company-banner {
    flex: 1 1 auto;
    min-width: 0;
  }

  .company-lines {
    min-width: 0;
    overflow: hidden;
  }

  .company-banner strong {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .menu-toggle {
    flex: 0 0 auto;
  }

    .main-nav {
    left: auto;
    right: 12px;
    width: min(320px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
  }


  a[href^="mailto:"] {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}





