/* Shared layout repairs. Brand colours, hero variants, fonts and imagery remain local to each brand. */
body.brand-public {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding-bottom: 0;
}
.brand-public > header { flex-shrink: 0; }
.brand-public > #main { flex: 1 0 auto; width: 100%; min-width: 0; }
.brand-public .reference-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, .85fr);
  gap: 24px 40px;
  align-items: end;
  margin-bottom: 30px;
}
.brand-public .reference-heading > *,
.brand-public .reference-card > div,
.brand-public .reference-card h3 { min-width: 0; }
.brand-public .reference-heading h2 {
  font-size: clamp(28px, 3.1vw, 43px);
  line-height: 1.15;
  max-width: 26ch;
  overflow-wrap: normal;
  hyphens: auto;
  text-wrap: balance;
}
.brand-public .reference-heading > p {
  max-width: 48ch;
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  overflow-wrap: normal;
}
.brand-public:is(.brand-sorglos, .brand-mein, .brand-profis) .reference-heading {
  display: block;
  text-align: center;
}
.brand-public:is(.brand-sorglos, .brand-mein, .brand-profis) .reference-heading h2,
.brand-public:is(.brand-sorglos, .brand-mein, .brand-profis) .reference-heading > p {
  margin-inline: auto;
}
.brand-public:is(.brand-sorglos, .brand-mein, .brand-profis) .reference-heading > p { margin-top: 16px; }
/* Text-only card headings must span the former icon column as well. */
.brand-public .reference-card > div > h3:first-child { grid-column: 1 / -1; width: 100%; max-width: none; }
.brand-public .reference-card h3 { overflow-wrap: normal; hyphens: auto; text-wrap: pretty; line-height: 1.3; }

/* Purpose-built editorial cards: no icon columns or clipped image overlays. */
.brand-public .nationwide-entry { padding-top: clamp(36px, 5vw, 68px); padding-bottom: clamp(40px, 5vw, 72px); }
.brand-public .entry-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.brand-public .entry-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  color: var(--brand-ink);
  background: #fff;
  border: 1px solid #dfe5df;
  border-radius: var(--radius, 8px);
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 6px 24px #18352f08;
  transition: box-shadow .18s ease, transform .18s ease;
}
.brand-public .entry-card:hover { text-decoration: none; box-shadow: 0 12px 32px #18352f15; transform: translateY(-3px); }
.brand-public .entry-card > img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.brand-public .entry-card > div {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 26px;
  gap: 16px;
}
.brand-public .entry-card h3 {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  color: inherit;
  font-family: var(--heading);
  font-size: clamp(23px, 2.15vw, 29px);
  line-height: 1.22;
  overflow-wrap: normal;
  hyphens: auto;
  text-wrap: balance;
}
.brand-public .entry-card p { display: block; max-width: 52ch; margin: 0; font-size: 15px; line-height: 1.75; color: inherit; }
.brand-public .entry-arrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 10px;
  color: var(--brand-ink);
  font: 700 13px/1.5 Arial, sans-serif;
}
.brand-public .entry-arrow b { color: var(--brand); font-size: 25px; line-height: 1; }
.brand-public .brand-subpage .page-hero h1 {
  max-width: 25ch;
  font-size: clamp(30px, 3.5vw, 48px);
  line-height: 1.14;
  letter-spacing: -.6px;
  overflow-wrap: normal;
  hyphens: auto;
  text-wrap: balance;
}
.brand-public .brand-subpage :is(.detail-grid, .regional-detail, .partner-intro) > * { min-width: 0; }
.brand-public .brand-subpage :is(article, aside) > :is(h2, h3) { line-height: 1.25; overflow-wrap: normal; hyphens: auto; text-wrap: balance; }
.brand-public .brand-subpage :is(p, li) { line-height: 1.75; }
.brand-public .brand-subpage .catalog-links > a { min-width: 0; }
.brand-public .brand-subpage .catalog-links :is(strong, span) { overflow-wrap: anywhere; }

/* The footer is the final normal-flow element, including on short pages. */
.brand-public .reference-footer {
  flex-shrink: 0;
  margin-top: auto;
  padding: 48px 0 24px;
  background: var(--brand-ink);
  color: #fff;
  border-top: 1px solid #ffffff20;
}
.brand-public.has-whatsapp .reference-footer { padding-bottom: calc(106px + env(safe-area-inset-bottom, 0px)); }
.brand-public .reference-footer .footer-primary {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.45fr) minmax(140px, .55fr);
  gap: 28px 48px;
  align-items: start;
}
.brand-public .reference-footer .footer-primary > * { min-width: 0; }
.brand-public .reference-footer .logo { display: inline-flex; align-items: baseline; flex-wrap: wrap; white-space: normal; font-size: clamp(23px, 2.4vw, 29px); line-height: 1.15; }
.brand-public .reference-footer p { max-width: 36ch; margin-top: 16px; color: inherit; font-size: 13px; line-height: 1.65; opacity: .8; }
.brand-public .reference-footer .footer-primary > nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 24px;
  width: auto;
  margin: 0;
  padding: 0;
  align-content: start;
  align-items: start;
  font-size: 14px;
}
.brand-public .reference-footer .footer-primary > nav.footer-legal { grid-template-columns: minmax(0, 1fr); }
.brand-public .reference-footer nav a { display: flex; align-items: center; min-height: 36px; padding: 5px 0; line-height: 1.5; overflow-wrap: anywhere; }
.brand-public .reference-footer nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.brand-public .reference-footer .footer-network { margin-top: 32px !important; padding-top: 18px; font-size: 12px; }
.brand-public .reference-footer .footer-network summary { min-height: 44px; padding: 10px 0; }
.brand-public .reference-footer .footer-network nav { gap: 8px 24px; font-size: 12px; }
.brand-public :is(.entry-card, .reference-footer a, .reference-footer summary):focus-visible { outline: 3px solid var(--brand); outline-offset: 5px; }

@media (max-width: 1000px) {
  .brand-public .reference-heading { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .brand-public .reference-heading > p { max-width: 72ch; }
  .brand-public .entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .brand-public .entry-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .brand-public .entry-grid > :last-child:nth-child(odd) > img { max-height: 280px; }
  .brand-public .reference-footer .footer-primary { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px 36px; }
  .brand-public .reference-footer .footer-primary > div { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .brand-public .entry-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .brand-public .entry-grid > :last-child:nth-child(odd) { grid-column: auto; }
  .brand-public .entry-card > div { padding: 23px 22px; gap: 14px; }
  .brand-public .entry-card h3 { font-size: 26px; }
  .brand-public .entry-card p { font-size: 15px; line-height: 1.7; }
  .brand-public .reference-heading h2 { font-size: clamp(27px, 7.5vw, 34px); }
  .brand-public .reference-heading > p { font-size: 14px; }
  .brand-public .brand-subpage .page-hero h1 { font-size: clamp(29px, 8vw, 36px); }
  .brand-public .reference-footer { padding-top: 36px; }
  .brand-public .reference-footer .footer-primary { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .brand-public .reference-footer .footer-primary > div { grid-column: auto; }
  .brand-public .reference-footer .footer-primary > nav.footer-legal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand-public .reference-footer nav a { min-height: 44px; }
  .brand-public .reference-footer .footer-network { margin-top: 24px !important; }
  .brand-public.has-whatsapp .reference-footer { padding-bottom: calc(108px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  .brand-public .entry-card { transition: none; }
  .brand-public .entry-card:hover { transform: none; }
}
