/*
 * ============================================================
 * KLINGENSTADT.DE – VOLLSTÄNDIGE STYLESHEET
 * ============================================================
 *
 * Enthalten:
 * - Design-System / Variablen
 * - Header / Navigation
 * - Hero / Startseite
 * - Suche
 * - Branchen / Kategorien-Karten
 * - vollständiger Kategorienbaum (#kategorien)
 * - Unternehmen-Karten
 * - Stadtteile
 * - Online-Shops
 * - Suchtreffer
 * - Firmenprofil
 * - Stadtteil-Detailseite
 * - Breadcrumbs
 * - Formulare
 * - Pagination
 * - Footer
 * - Responsive / Accessibility
 *
 * Die Kategorien- und Suchtreffer-Regeln stehen bewusst am Ende,
 * damit ältere Basisregeln sie nicht überschreiben.
 * ============================================================
 */


/* ==========================================================
   Klingenstadt.de – neues Portal-Design
   Ziel: modernes, responsives Branchenportal ohne Bootstrap
   ========================================================== */

:root {
  --ks-red: #b31f2b;
  --ks-red-dark: #8f1721;
  --ks-red-soft: #fff1f2;

  --ks-ink: #17202a;
  --ks-text: #334155;
  --ks-muted: #64748b;
  --ks-line: #e2e8f0;
  --ks-surface: #ffffff;
  --ks-surface-soft: #f8fafc;
  --ks-surface-alt: #f1f5f9;

  --ks-success: #16825d;
  --ks-warning: #b7791f;

  --ks-radius-sm: 10px;
  --ks-radius: 16px;
  --ks-radius-lg: 24px;
  --ks-radius-pill: 999px;

  --ks-shadow-sm: 0 4px 18px rgba(15, 23, 42, 0.06);
  --ks-shadow: 0 12px 34px rgba(15, 23, 42, 0.10);
  --ks-shadow-lg: 0 22px 60px rgba(15, 23, 42, 0.14);

  --ks-container: 1180px;
  --ks-header-height: 78px;

  --ks-transition: 180ms ease;
}

/* ----------------------------------------------------------
   Reset / Basis
   ---------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--ks-surface);
  color: var(--ks-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button,
input,
select,
textarea {
  color: inherit;
}

a {
  color: var(--ks-red);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--ks-red-dark);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.65em;
  color: var(--ks-ink);
  font-weight: 750;
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.35rem, 6vw, 4.8rem);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.18rem, 2.2vw, 1.45rem);
}

p {
  margin: 0 0 1.25rem;
}

ul,
ol {
  padding-left: 1.25rem;
}

hr {
  border: 0;
  border-top: 1px solid var(--ks-line);
  margin: 2rem 0;
}

::selection {
  background: var(--ks-red);
  color: #fff;
}

:focus-visible {
  outline: 3px solid rgba(179, 31, 43, 0.25);
  outline-offset: 3px;
}

/* ----------------------------------------------------------
   Hilfsklassen
   ---------------------------------------------------------- */

.container {
  width: min(calc(100% - 40px), var(--ks-container));
  margin-inline: auto;
}

.container--narrow {
  width: min(calc(100% - 40px), 820px);
  margin-inline: auto;
}

.section {
  padding: clamp(64px, 8vw, 112px) 0;
}

.section--compact {
  padding: clamp(44px, 6vw, 72px) 0;
}

.section--soft {
  background: var(--ks-surface-soft);
}

.section--dark {
  background: var(--ks-ink);
  color: rgba(255, 255, 255, 0.82);
}

.section--dark h1,
.section--dark h2,
.section--dark h3 {
  color: #fff;
}

.section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 34px;
}

.section-header__copy {
  max-width: 720px;
}

.section-header p {
  margin: 0;
  color: var(--ks-muted);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--ks-red);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 24px;
  height: 2px;
  background: currentColor;
  content: "";
}

.text-muted {
  color: var(--ks-muted);
}

.stack > * + * {
  margin-top: 1rem;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ----------------------------------------------------------
   Buttons
   ---------------------------------------------------------- */

.button,
button.button,
input[type="submit"].button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: var(--ks-radius-pill);
  background: var(--ks-red);
  color: #fff;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  transition:
    background var(--ks-transition),
    border-color var(--ks-transition),
    color var(--ks-transition),
    transform var(--ks-transition),
    box-shadow var(--ks-transition);
}

.button:hover,
button.button:hover,
input[type="submit"].button:hover {
  background: var(--ks-red-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(179, 31, 43, 0.18);
}

.button--secondary {
  border-color: var(--ks-line);
  background: #fff;
  color: var(--ks-ink);
}

.button--secondary:hover {
  border-color: #cbd5e1;
  background: var(--ks-surface-soft);
  color: var(--ks-ink);
  box-shadow: none;
}

.button--ghost {
  border-color: rgba(255, 255, 255, 0.24);
  background: transparent;
  color: #fff;
}

.button--small {
  min-height: 40px;
  padding: 9px 15px;
  font-size: 0.92rem;
}

.button--block {
  width: 100%;
}

/* ----------------------------------------------------------
   Header / Navigation
   ---------------------------------------------------------- */

.site-header {
  position: sticky;
  z-index: 1000;
  top: 0;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.site-header__inner {
  display: grid;
  min-height: var(--ks-header-height);
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 34px;
}

.site-brand {
  display: inline-flex;
  max-width: 235px;
  align-items: center;
  color: var(--ks-ink);
  text-decoration: none;
}

.site-brand img {
  max-height: 52px;
  width: auto;
}

.main-nav {
  justify-self: center;
}

.main-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.main-nav a {
  display: flex;
  min-height: 42px;
  align-items: center;
  padding: 9px 13px;
  border-radius: var(--ks-radius-pill);
  color: var(--ks-text);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: background var(--ks-transition), color var(--ks-transition);
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  background: var(--ks-surface-alt);
  color: var(--ks-red);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ks-line);
  border-radius: 50%;
  background: #fff;
}

/* ----------------------------------------------------------
   Hero
   ---------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 10vw, 140px) 0 clamp(72px, 9vw, 120px);
  background:
    radial-gradient(circle at 92% 12%, rgba(179, 31, 43, 0.11), transparent 28%),
    radial-gradient(circle at 8% 84%, rgba(15, 23, 42, 0.05), transparent 28%),
    linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
}

.hero::after {
  position: absolute;
  z-index: 0;
  right: -160px;
  bottom: -170px;
  width: 420px;
  height: 420px;
  border: 70px solid rgba(179, 31, 43, 0.045);
  border-radius: 50%;
  content: "";
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 980px;
}

.hero h1 {
  max-width: 900px;
  margin-bottom: 22px;
}

.hero h1 strong {
  color: var(--ks-red);
  font-weight: inherit;
}

.hero__intro {
  max-width: 690px;
  margin-bottom: 34px;
  color: var(--ks-muted);
  font-size: clamp(1.06rem, 2vw, 1.28rem);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 24px;
  color: var(--ks-muted);
  font-size: 0.92rem;
}

/* ----------------------------------------------------------
   Suche
   ---------------------------------------------------------- */

.portal-search {
  display: grid;
  max-width: 930px;
  grid-template-columns: minmax(0, 1.6fr) minmax(190px, 0.75fr) auto;
  gap: 0;
  padding: 8px;
  border: 1px solid var(--ks-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: var(--ks-shadow);
}

.portal-search__field {
  position: relative;
  display: flex;
  min-width: 0;
  align-items: center;
}

.portal-search__field + .portal-search__field {
  border-left: 1px solid var(--ks-line);
}

.portal-search__icon {
  position: absolute;
  left: 17px;
  pointer-events: none;
  color: var(--ks-muted);
}

.portal-search input,
.portal-search select {
  width: 100%;
  min-height: 58px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ks-ink);
}

.portal-search input {
  padding: 10px 18px 10px 46px;
}

.portal-search select {
  padding: 10px 38px 10px 18px;
}

.portal-search input::placeholder {
  color: #94a3b8;
}

.portal-search .button {
  min-width: 132px;
  min-height: 58px;
  border-radius: 16px;
}

.search-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.search-suggestions a {
  padding: 7px 12px;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius-pill);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ks-text);
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
}

.search-suggestions a:hover {
  border-color: rgba(179, 31, 43, 0.25);
  color: var(--ks-red);
}

/* ----------------------------------------------------------
   Kategorien / Branchen
   ---------------------------------------------------------- */

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.category-card {
  position: relative;
  display: flex;
  min-height: 168px;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius);
  background: #fff;
  color: var(--ks-ink);
  text-decoration: none;
  transition:
    transform var(--ks-transition),
    border-color var(--ks-transition),
    box-shadow var(--ks-transition);
}

.category-card:hover {
  border-color: rgba(179, 31, 43, 0.25);
  color: var(--ks-ink);
  transform: translateY(-3px);
  box-shadow: var(--ks-shadow-sm);
}

.category-card__icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: var(--ks-red-soft);
  color: var(--ks-red);
  font-size: 1.35rem;
}

.category-card__title {
  margin: 22px 0 5px;
  font-size: 1.08rem;
  font-weight: 800;
}

.category-card__meta {
  color: var(--ks-muted);
  font-size: 0.88rem;
}

.category-card__arrow {
  position: absolute;
  top: 24px;
  right: 22px;
  color: #94a3b8;
  font-size: 1.15rem;
  transition: transform var(--ks-transition), color var(--ks-transition);
}

.category-card:hover .category-card__arrow {
  color: var(--ks-red);
  transform: translateX(3px);
}

/* ----------------------------------------------------------
   Firmenkarten
   ---------------------------------------------------------- */

.company-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.company-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius-lg);
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
  transition:
    transform var(--ks-transition),
    border-color var(--ks-transition),
    box-shadow var(--ks-transition);
}

.company-card:hover {
  border-color: #d7dee8;
  transform: translateY(-3px);
  box-shadow: var(--ks-shadow-sm);
}

.company-card__media {
  display: grid;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  background: var(--ks-surface-alt);
}

.company-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.company-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.company-card__category {
  margin-bottom: 9px;
  color: var(--ks-red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.company-card h3 {
  margin-bottom: 10px;
}

.company-card h3 a {
  color: var(--ks-ink);
  text-decoration: none;
}

.company-card h3 a:hover {
  color: var(--ks-red);
}

.company-card__description {
  margin-bottom: 18px;
  color: var(--ks-muted);
  font-size: 0.95rem;
}

.company-card__location {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: var(--ks-muted);
  font-size: 0.88rem;
}

.company-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 24px;
  border-top: 1px solid var(--ks-line);
}

.company-card__link {
  font-size: 0.92rem;
  font-weight: 800;
  text-decoration: none;
}

/* ----------------------------------------------------------
   Stadtteile / Chips
   ---------------------------------------------------------- */

.district-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.district-link {
  display: flex;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 17px;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius-sm);
  background: #fff;
  color: var(--ks-ink);
  font-weight: 700;
  text-decoration: none;
  transition:
    background var(--ks-transition),
    border-color var(--ks-transition),
    color var(--ks-transition);
}

.district-link:hover {
  border-color: rgba(179, 31, 43, 0.25);
  background: var(--ks-red-soft);
  color: var(--ks-red);
}

.district-link span:last-child {
  color: var(--ks-muted);
  font-size: 0.82rem;
  font-weight: 600;
}

/* ----------------------------------------------------------
   Breadcrumb
   ---------------------------------------------------------- */

.breadcrumb {
  padding: 20px 0;
  border-bottom: 1px solid var(--ks-line);
  background: #fff;
}

.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0;
  margin: 0;
  color: var(--ks-muted);
  font-size: 0.86rem;
  list-style: none;
}

.breadcrumb li:not(:last-child)::after {
  margin-left: 7px;
  color: #cbd5e1;
  content: "/";
}

.breadcrumb a {
  color: var(--ks-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--ks-red);
}

/* ----------------------------------------------------------
   Such- und Kategorie-Ergebnisse
   ---------------------------------------------------------- */

.results-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: 34px;
}

.filter-panel {
  position: sticky;
  top: calc(var(--ks-header-height) + 24px);
  padding: 22px;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius);
  background: #fff;
}

.filter-panel h2,
.filter-panel h3 {
  font-size: 1rem;
}

.filter-group + .filter-group {
  padding-top: 20px;
  margin-top: 20px;
  border-top: 1px solid var(--ks-line);
}

.filter-group label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 9px 0;
  color: var(--ks-text);
  font-size: 0.92rem;
}

.results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.results-toolbar__count {
  color: var(--ks-muted);
}

.results-list {
  display: grid;
  gap: 14px;
}

.result-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 20px;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius);
  background: #fff;
  transition:
    border-color var(--ks-transition),
    box-shadow var(--ks-transition),
    transform var(--ks-transition);
}

.result-card:hover {
  border-color: #d5dde7;
  transform: translateY(-2px);
  box-shadow: var(--ks-shadow-sm);
}

.result-card__logo {
  display: grid;
  width: 120px;
  height: 90px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  background: var(--ks-surface-alt);
}

.result-card__logo img {
  max-width: 88%;
  max-height: 72px;
  object-fit: contain;
}

.result-card__content {
  min-width: 0;
}

.result-card__content h2,
.result-card__content h3 {
  margin-bottom: 7px;
  font-size: 1.2rem;
}

.result-card__content h2 a,
.result-card__content h3 a {
  color: var(--ks-ink);
  text-decoration: none;
}

.result-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 14px;
  color: var(--ks-muted);
  font-size: 0.88rem;
}

/* ----------------------------------------------------------
   Formulare allgemein
   ---------------------------------------------------------- */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.form-field {
  display: grid;
  gap: 7px;
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-field label {
  color: var(--ks-ink);
  font-size: 0.9rem;
  font-weight: 750;
}

.form-field input,
.form-field select,
.form-field textarea,
.input {
  width: 100%;
  min-height: 50px;
  padding: 11px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  outline: 0;
  transition:
    border-color var(--ks-transition),
    box-shadow var(--ks-transition);
}

.form-field textarea {
  min-height: 140px;
  resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.input:focus {
  border-color: var(--ks-red);
  box-shadow: 0 0 0 4px rgba(179, 31, 43, 0.10);
}

/* ----------------------------------------------------------
   Firmendetail
   ---------------------------------------------------------- */

.company-hero {
  padding: clamp(44px, 7vw, 84px) 0;
  border-bottom: 1px solid var(--ks-line);
  background: var(--ks-surface-soft);
}

.company-hero__grid {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  align-items: center;
  gap: 30px;
}

.company-logo {
  display: grid;
  width: 150px;
  height: 150px;
  place-items: center;
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius-lg);
  background: #fff;
  box-shadow: var(--ks-shadow-sm);
}

.company-logo img {
  max-height: 112px;
  object-fit: contain;
}

.company-hero h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 5vw, 3.6rem);
}

.company-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--ks-muted);
}

.company-hero__actions {
  display: grid;
  min-width: 190px;
  gap: 9px;
}

.company-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 42px;
}

.content-card,
.contact-card {
  padding: 28px;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius-lg);
  background: #fff;
}

.contact-card {
  position: sticky;
  top: calc(var(--ks-header-height) + 24px);
  box-shadow: var(--ks-shadow-sm);
}

.contact-list {
  display: grid;
  padding: 0;
  margin: 0;
  list-style: none;
}

.contact-list li {
  display: grid;
  gap: 2px;
  padding: 13px 0;
  border-bottom: 1px solid var(--ks-line);
}

.contact-list li:last-child {
  border-bottom: 0;
}

.contact-list small {
  color: var(--ks-muted);
}

.contact-list a {
  overflow-wrap: anywhere;
  font-weight: 700;
  text-decoration: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: var(--ks-radius-pill);
  background: var(--ks-surface-alt);
  color: var(--ks-text);
  font-size: 0.78rem;
  font-weight: 750;
}

.badge--accent {
  background: var(--ks-red-soft);
  color: var(--ks-red);
}

/* ----------------------------------------------------------
   Pagination
   ---------------------------------------------------------- */

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  padding: 0;
  margin: 36px 0 0;
  list-style: none;
}

.pagination a,
.pagination span {
  display: grid;
  min-width: 42px;
  min-height: 42px;
  place-items: center;
  padding: 7px 11px;
  border: 1px solid var(--ks-line);
  border-radius: 10px;
  background: #fff;
  color: var(--ks-text);
  font-weight: 700;
  text-decoration: none;
}

.pagination a:hover,
.pagination .is-current {
  border-color: var(--ks-red);
  background: var(--ks-red);
  color: #fff;
}

/* ----------------------------------------------------------
   Empty / Hinweisboxen
   ---------------------------------------------------------- */

.notice,
.empty-state {
  padding: 28px;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius);
  background: var(--ks-surface-soft);
}

.notice--accent {
  border-color: rgba(179, 31, 43, 0.16);
  background: var(--ks-red-soft);
}

.empty-state {
  text-align: center;
}

.empty-state h2,
.empty-state h3 {
  margin-bottom: 8px;
}

/* ----------------------------------------------------------
   Footer
   ---------------------------------------------------------- */

.site-footer {
  padding: 64px 0 28px;
  background: #111923;
  color: rgba(255, 255, 255, 0.68);
}

.site-footer a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 44px;
}

.site-footer__brand {
  max-width: 330px;
}

.site-footer__brand img,
.site-footer__logo {
  display: block;
  width: auto;
  max-width: 220px;
  height: auto;
  max-height: 64px;
  margin: 0 0 20px;
  object-fit: contain;
  filter: none;
}

.site-footer h2,
.site-footer h3 {
  margin-bottom: 16px;
  color: #fff;
  font-size: 0.96rem;
  letter-spacing: 0;
}

.footer-links {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 0;
  list-style: none;
  font-size: 0.92rem;
}

.site-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 24px;
  margin-top: 44px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
  font-size: 0.86rem;
}

/* ----------------------------------------------------------
   Kleine Animationen – respektiert Reduced Motion
   ---------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: ksFadeUp 520ms ease both;
  }

  @keyframes ksFadeUp {
    from {
      opacity: 0;
      transform: translateY(12px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */

@media (max-width: 1050px) {
  .site-header__inner {
    grid-template-columns: auto 1fr auto;
    gap: 20px;
  }

  .main-nav {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .company-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .district-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .site-footer__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  :root {
    --ks-header-height: 68px;
  }

  .container,
  .container--narrow {
    width: min(calc(100% - 28px), var(--ks-container));
  }

  .site-header__inner {
    min-height: var(--ks-header-height);
  }

  .site-brand {
    max-width: 190px;
  }

  .site-header__actions > .button {
    display: none;
  }

  .portal-search {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 7px;
    border-radius: 18px;
  }

  .portal-search__field + .portal-search__field {
    border-top: 1px solid var(--ks-line);
    border-left: 0;
  }

  .portal-search .button {
    width: 100%;
    margin-top: 7px;
  }

  .section-header {
    align-items: start;
    flex-direction: column;
    gap: 14px;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .results-layout {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
  }

  .company-hero__grid {
    grid-template-columns: 110px minmax(0, 1fr);
  }

  .company-logo {
    width: 110px;
    height: 110px;
  }

  .company-hero__actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .company-detail-layout {
    grid-template-columns: 1fr;
  }

  .contact-card {
    position: static;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 15px;
  }

  .section {
    padding: 58px 0;
  }

  .hero {
    padding: 58px 0 68px;
  }

  .hero__meta {
    display: grid;
    gap: 6px;
  }

  .category-grid,
  .company-grid,
  .district-grid,
  .form-grid,
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 145px;
  }

  .result-card {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 15px;
  }

  .result-card__logo {
    width: 76px;
    height: 76px;
  }

  .result-card__action {
    grid-column: 1 / -1;
  }

  .result-card__action .button {
    width: 100%;
  }

  .company-hero__grid {
    grid-template-columns: 1fr;
  }

  .company-logo {
    width: 96px;
    height: 96px;
  }

  .company-hero__actions {
    grid-template-columns: 1fr;
  }

  .content-card,
  .contact-card {
    padding: 22px;
  }

  .site-footer__bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* ----------------------------------------------------------
   Klingenstadt Mobile Navigation / Skip-Link
   ---------------------------------------------------------- */

.skip-link {
  position: fixed;
  z-index: 2000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: var(--ks-radius-sm);
  background: var(--ks-ink);
  color: #fff;
  font-weight: 750;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform var(--ks-transition);
}

.skip-link:focus {
  color: #fff;
  transform: translateY(0);
}

.nav-toggle__icon {
  display: block;
}

.mobile-nav {
  display: none;
}

@media (max-width: 1050px) {
  .site-header__inner {
    position: relative;
  }

  .mobile-nav:not([hidden]) {
    display: block;
    grid-column: 1 / -1;
    padding: 4px 0 20px;
    border-top: 1px solid var(--ks-line);
  }

  .mobile-nav__list {
    display: grid;
    gap: 2px;
    padding: 12px 0;
    margin: 0;
    list-style: none;
  }

  .mobile-nav__list a {
    display: block;
    padding: 11px 4px;
    border-radius: var(--ks-radius-sm);
    color: var(--ks-text);
    font-weight: 700;
    text-decoration: none;
  }

  .mobile-nav__list a:hover,
  .mobile-nav__list a:focus-visible {
    color: var(--ks-red);
  }

  .mobile-nav__cta {
    margin-top: 4px;
  }

  .site-header[data-nav-open="true"] .nav-toggle {
    border-color: rgba(179, 31, 43, 0.25);
    background: var(--ks-red-soft);
    color: var(--ks-red);
  }
}

@media (min-width: 1051px) {
  .mobile-nav {
    display: none !important;
  }
}


/* ----------------------------------------------------------
   Firmendetail – Ergänzungen
   ---------------------------------------------------------- */

.company-logo__fallback {
  display: grid;
  width: 86px;
  height: 86px;
  place-items: center;
  border-radius: 24px;
  background: var(--ks-red-soft);
  color: var(--ks-red);
  font-size: 1.65rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.company-hero__content {
  min-width: 0;
}

.company-hero__content > .badge {
  margin-bottom: 14px;
}

.company-hero__intro {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--ks-text);
  font-size: 1.05rem;
  line-height: 1.65;
}

.company-detail-main {
  display: grid;
  min-width: 0;
  gap: 24px;
}

.company-profile-card > h2,
.contact-card > h2,
.company-keywords > h2 {
  margin-bottom: 22px;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.company-profile-copy {
  color: var(--ks-text);
  font-size: 1.03rem;
  line-height: 1.8;
}

.company-profile-copy > :first-child {
  margin-top: 0;
}

.company-profile-copy > :last-child {
  margin-bottom: 0;
}

.company-profile-copy h2,
.company-profile-copy h3 {
  margin-top: 1.75em;
}

.company-profile-copy ul,
.company-profile-copy ol {
  padding-left: 1.25rem;
}

.company-profile-empty {
  padding: 18px 20px;
  border-radius: var(--ks-radius);
  background: var(--ks-surface-soft);
  color: var(--ks-muted);
}

.company-profile-empty p {
  margin: 0;
}

.company-keywords p {
  margin: 0;
  color: var(--ks-muted);
}

.company-related-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius-lg);
  background: var(--ks-surface-soft);
}

.company-related-cta h2 {
  margin-bottom: 8px;
  font-size: clamp(1.35rem, 3vw, 1.8rem);
}

.company-related-cta p {
  margin: 0;
  color: var(--ks-muted);
}

.contact-card > .eyebrow {
  margin-bottom: 10px;
}

.contact-card__subline {
  margin-top: 2px;
  color: var(--ks-muted);
  font-size: 0.88rem;
}

.contact-card__actions {
  display: grid;
  gap: 9px;
  margin-top: 22px;
}

.contact-card__note,
.contact-card__empty {
  margin: 22px 0 0;
  color: var(--ks-muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .company-related-cta {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .company-logo__fallback {
    width: 68px;
    height: 68px;
    border-radius: 19px;
    font-size: 1.35rem;
  }

  .company-hero__intro {
    font-size: 1rem;
  }

  .company-related-cta {
    padding: 22px;
  }

  .company-related-cta .button {
    width: 100%;
  }
}


/* ==========================================================
   Firmenprofil – exakte Objektstruktur
   ========================================================== */

.company-hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.badge--premium {
  background: #fff7df;
  color: #7a5400;
}

.company-logo__image {
  display: block;
  width: 100%;
  max-width: 180px;
  max-height: 110px;
  object-fit: contain;
}

.company-logo__fallback {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  border-radius: 24px;
  background: var(--ks-red-soft);
  color: var(--ks-red);
  font-size: 1.7rem;
  font-weight: 900;
}

.company-showcase {
  padding-top: 32px;
  padding-bottom: 0;
}

.company-showcase__link {
  position: relative;
  display: block;
  overflow: hidden;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius-lg);
  background: var(--ks-surface);
  box-shadow: var(--ks-shadow);
}

.company-showcase__image {
  display: block;
  width: 100%;
  max-height: 560px;
  object-fit: cover;
  object-position: top;
}

.company-showcase__overlay {
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 16px;
  border-radius: var(--ks-radius);
  background: rgba(17, 24, 39, 0.88);
  color: #fff;
  backdrop-filter: blur(8px);
}

.company-showcase__overlay strong {
  font-weight: 850;
}

.company-detail-main {
  display: grid;
  min-width: 0;
  gap: 24px;
}

.company-profile-copy {
  color: var(--ks-text);
  font-size: 1.02rem;
  line-height: 1.8;
}

.company-profile-copy > :first-child {
  margin-top: 0;
}

.company-profile-copy > :last-child {
  margin-bottom: 0;
}

.company-video__frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--ks-radius);
  background: #0f172a;
}

.company-video__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.company-links__list {
  display: grid;
  gap: 10px;
}

.company-links__list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 15px;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius-sm);
  background: var(--ks-surface);
  color: var(--ks-ink);
  font-weight: 700;
  text-decoration: none;
}

.company-links__list a::after {
  content: "↗";
  flex: 0 0 auto;
  color: var(--ks-red);
}

.company-links__list a:hover,
.company-links__list a:focus-visible {
  border-color: var(--ks-red);
  color: var(--ks-red);
}

.company-keywords p {
  margin: 0;
  color: var(--ks-text);
  line-height: 1.7;
}

.contact-card__actions {
  display: grid;
  gap: 9px;
  margin-top: 22px;
}

.contact-card__subline {
  display: block;
  margin-top: 5px;
  color: var(--ks-muted);
  font-size: 0.88rem;
}

.company-social {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--ks-line);
}

.company-social a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--ks-line);
  border-radius: 999px;
  color: var(--ks-muted);
  font-size: 0.8rem;
  font-weight: 750;
  text-decoration: none;
}

.company-social a:hover,
.company-social a:focus-visible {
  border-color: var(--ks-red);
  color: var(--ks-red);
}

.company-related-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius-lg);
  background: var(--ks-surface-soft);
}

.company-related-cta h2 {
  margin-bottom: 8px;
}

.company-related-cta p {
  margin: 0;
  color: var(--ks-muted);
}

@media (max-width: 900px) {
  .company-related-cta {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .company-logo__fallback {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    font-size: 1.35rem;
  }

  .company-showcase__overlay {
    position: static;
    border-radius: 0;
  }

  .company-related-cta {
    padding: 22px;
  }

  .company-related-cta .button {
    width: 100%;
  }
}


/* ==========================================================
   Stadtteilseite
   ========================================================== */

.district-hero {
  padding: clamp(48px, 8vw, 88px) 0;
  border-bottom: 1px solid var(--ks-line);
  background:
    radial-gradient(circle at 85% 15%, var(--ks-red-soft), transparent 34%),
    var(--ks-surface);
}

.district-hero__content {
  max-width: 860px;
}

.district-hero h1 {
  margin-bottom: 14px;
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  letter-spacing: -0.055em;
}

.district-hero__lead {
  max-width: 720px;
  margin: 0;
  color: var(--ks-text);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.65;
}

.district-hero__description {
  max-width: 800px;
  margin-top: 24px;
  color: var(--ks-muted);
  line-height: 1.75;
}

.district-hero__description > :first-child {
  margin-top: 0;
}

.district-hero__description > :last-child {
  margin-bottom: 0;
}

.district-search {
  max-width: 760px;
  margin-top: 30px;
}

.company-grid--district {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.company-card__placeholder {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  border-radius: 18px;
  background: var(--ks-red-soft);
  color: var(--ks-red);
  font-weight: 900;
}

.company-card__logo {
  display: block;
  width: 100%;
  max-width: 140px;
  max-height: 76px;
  object-fit: contain;
}

.district-company-list {
  overflow: hidden;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius-lg);
  background: var(--ks-surface);
}

.district-company-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--ks-line);
}

.district-company-row:last-child {
  border-bottom: 0;
}

.district-company-row__main {
  min-width: 0;
}

.district-company-row__category {
  margin-bottom: 5px;
  color: var(--ks-red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.district-company-row h3 {
  margin: 0;
  font-size: 1.08rem;
}

.district-company-row h3 a {
  color: var(--ks-ink);
  text-decoration: none;
}

.district-company-row h3 a:hover,
.district-company-row h3 a:focus-visible {
  color: var(--ks-red);
}

.district-company-row p {
  max-width: 720px;
  margin: 7px 0 0;
  color: var(--ks-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.district-company-row__action a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--ks-line);
  border-radius: 999px;
  color: var(--ks-ink);
  font-size: 0.84rem;
  font-weight: 750;
  text-decoration: none;
}

.district-company-row__action a::after {
  content: " →";
}

.district-company-row__action a:hover,
.district-company-row__action a:focus-visible {
  border-color: var(--ks-red);
  color: var(--ks-red);
}

.district-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.district-card {
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius);
  background: var(--ks-surface);
  color: var(--ks-ink);
  font-weight: 800;
  text-decoration: none;
  transition:
    border-color var(--ks-transition),
    color var(--ks-transition),
    transform var(--ks-transition),
    box-shadow var(--ks-transition);
}

.district-card:hover,
.district-card:focus-visible {
  border-color: var(--ks-red);
  color: var(--ks-red);
  transform: translateY(-2px);
  box-shadow: var(--ks-shadow-sm);
}

@media (max-width: 980px) {
  .company-grid--district {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .district-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .company-grid--district {
    grid-template-columns: 1fr;
  }

  .district-company-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .district-company-row__action a {
    width: 100%;
    justify-content: center;
  }

  .district-grid {
    grid-template-columns: 1fr;
  }
}


/* ===== KATEGORIEN – AKTUELLES DESIGN ===== */


/* ==========================================================
   Kategorien – moderne Startseiten-Darstellung
   Passend zu kategorien-select-basiert.tmpl
   ========================================================== */

#kategorien {
  position: relative;
  overflow: hidden;
  padding-block: clamp(64px, 8vw, 104px);
  background:
    radial-gradient(circle at 8% 0%, rgba(179, 31, 43, 0.07), transparent 28%),
    linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  scroll-margin-top: calc(var(--ks-header-height, 80px) + 20px);
}

#kategorien .section-header {
  max-width: 760px;
  margin-bottom: clamp(32px, 5vw, 52px);
}

#kategorien .section-header__copy > p {
  max-width: 680px;
  color: var(--ks-muted);
  font-size: 1.03rem;
  line-height: 1.7;
}


/* ----------------------------------------------------------
   Haupt-Grid
   ---------------------------------------------------------- */

.category-directory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}


/* ----------------------------------------------------------
   Hauptkategorie
   ---------------------------------------------------------- */

.category-group {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ks-line);
  border-radius: 24px;
  background: var(--ks-surface);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.03),
    0 12px 30px rgba(15, 23, 42, 0.05);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.category-group::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--ks-red);
  opacity: 0.92;
}

.category-group:hover {
  border-color: rgba(179, 31, 43, 0.22);
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.04),
    0 18px 42px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}


/* ----------------------------------------------------------
   Hauptkategorie – Kopf
   ---------------------------------------------------------- */

.category-group__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 24px 26px 20px 28px;
  border-bottom: 1px solid var(--ks-line);
  background:
    linear-gradient(
      135deg,
      rgba(179, 31, 43, 0.045),
      rgba(255, 255, 255, 0)
    );
}

.category-group__heading {
  min-width: 0;
}

.category-group__title {
  margin: 0;
  font-size: clamp(1.18rem, 2vw, 1.42rem);
  font-weight: 850;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.category-group__title a {
  color: var(--ks-ink);
  text-decoration: none;
}

.category-group__title a:hover,
.category-group__title a:focus-visible {
  color: var(--ks-red);
}

.category-group__all {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--ks-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--ks-muted);
  font-size: 0.79rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease;
}

.category-group__all:hover,
.category-group__all:focus-visible {
  border-color: var(--ks-red);
  background: var(--ks-red-soft);
  color: var(--ks-red);
}


/* ----------------------------------------------------------
   Unterkategorien – Ebene 2
   ---------------------------------------------------------- */

.category-group__items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 18px;
}

.category-directory__branch {
  min-width: 0;
  padding: 2px;
}

.category-directory__item {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 12px 13px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--ks-surface-soft);
  color: var(--ks-text);
  text-decoration: none;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.category-directory__item:hover,
.category-directory__item:focus-visible {
  border-color: rgba(179, 31, 43, 0.16);
  background: var(--ks-red-soft);
  color: var(--ks-red);
  transform: translateX(2px);
}

.category-directory__content {
  min-width: 0;
}

.category-directory__name {
  display: block;
  overflow: hidden;
  font-size: 0.94rem;
  font-weight: 760;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.category-directory__arrow {
  flex: 0 0 auto;
  color: #94a3b8;
  font-size: 0.95rem;
  transition:
    color 160ms ease,
    transform 160ms ease;
}

.category-directory__item:hover .category-directory__arrow,
.category-directory__item:focus-visible .category-directory__arrow,
.category-directory__child-link:hover .category-directory__arrow,
.category-directory__child-link:focus-visible .category-directory__arrow {
  color: var(--ks-red);
  transform: translateX(2px);
}


/* ----------------------------------------------------------
   Tiefere Ebenen – kompakter als Chips
   ---------------------------------------------------------- */

.category-directory__children {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 9px 0 2px;
  padding: 0 2px;
  list-style: none;
}

.category-directory__node {
  margin: 0;
  padding: 0;
}

.category-directory__child-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 31px;
  padding: 6px 9px;
  border: 1px solid var(--ks-line);
  border-radius: 999px;
  background: #fff;
  color: var(--ks-muted);
  font-size: 0.76rem;
  font-weight: 680;
  line-height: 1.2;
  text-decoration: none;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease;
}

.category-directory__child-link .category-directory__arrow {
  font-size: 0.76rem;
}

.category-directory__child-link:hover,
.category-directory__child-link:focus-visible {
  border-color: rgba(179, 31, 43, 0.26);
  background: var(--ks-red-soft);
  color: var(--ks-red);
}


/* ----------------------------------------------------------
   Noch tiefere Ebenen optisch einrücken
   ---------------------------------------------------------- */

.category-directory__children--level-4,
.category-directory__children--level-5,
.category-directory__children--level-6 {
  width: 100%;
  margin-top: 5px;
  padding-left: 10px;
}

.category-directory__children--level-4
  .category-directory__child-link,
.category-directory__children--level-5
  .category-directory__child-link,
.category-directory__children--level-6
  .category-directory__child-link {
  background: #f8fafc;
  font-size: 0.72rem;
}


/* ----------------------------------------------------------
   Leere Hauptgruppe
   ---------------------------------------------------------- */

.category-group__empty {
  padding: 18px 22px 22px 28px;
}

.category-group__empty a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ks-red);
  font-size: 0.9rem;
  font-weight: 780;
  text-decoration: none;
}


/* ----------------------------------------------------------
   Unsichtbare Datenquelle
   ---------------------------------------------------------- */

.ks-category-source[hidden] {
  display: none !important;
}


/* ----------------------------------------------------------
   Responsive
   ---------------------------------------------------------- */

@media (max-width: 980px) {
  .category-directory {
    grid-template-columns: 1fr;
  }

  .category-group__items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  #kategorien {
    padding-block: 56px 64px;
  }

  .category-group {
    border-radius: 18px;
  }

  .category-group__header {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 20px 20px 17px 22px;
  }

  .category-group__all {
    align-self: flex-start;
  }

  .category-group__items {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 12px;
  }

  .category-directory__item {
    min-height: 48px;
  }

  .category-directory__children {
    gap: 6px;
  }

  .category-directory__child-link {
    min-height: 30px;
    padding: 6px 8px;
  }
}


/* ----------------------------------------------------------
   Accessibility
   ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .category-group,
  .category-directory__item,
  .category-directory__arrow,
  .category-directory__child-link,
  .category-group__all {
    transition: none;
  }
}



/* ==========================================================
   Kategorien – Kompatibilitätsklassen
   Für ältere/alternative Varianten der Kategorienvorlage
   ========================================================== */

.category-group__meta {
  margin-top: 5px;
  color: var(--ks-muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.category-directory__path {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--ks-muted);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
}


/* ===== SUCHTREFFER – AKTUELLES DESIGN ===== */



/* ==========================================================
   Suchtreffer – modern
   ========================================================== */

.search-results-hero {
  padding: clamp(42px, 6vw, 72px) 0 30px;
  border-bottom: 1px solid var(--ks-line);
  background:
    radial-gradient(circle at 10% 0%, rgba(179, 31, 43, 0.08), transparent 34%),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.search-results-hero__content {
  max-width: 760px;
  margin-bottom: 26px;
}

.search-results-hero__content h1 {
  margin: 8px 0 12px;
}

.search-results-hero__content p {
  max-width: 680px;
  margin: 0;
  color: var(--ks-muted);
  line-height: 1.7;
}

.portal-search--results {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(250px, 0.85fr) auto;
  gap: 10px;
  align-items: stretch;
  padding: 10px;
  border: 1px solid var(--ks-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--ks-shadow-sm, 0 8px 24px rgba(15, 23, 42, 0.06));
}

.portal-search--results .portal-search__field {
  min-width: 0;
}

.portal-search--results input,
.portal-search--results select {
  width: 100%;
  min-height: 50px;
  border: 1px solid var(--ks-line);
  border-radius: 12px;
  background: var(--ks-surface-soft);
}

.portal-search__submit {
  min-height: 50px;
  white-space: nowrap;
}

.search-active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}

.search-active-filters__label {
  margin-right: 2px;
  color: var(--ks-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.search-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid rgba(179, 31, 43, 0.15);
  border-radius: 999px;
  background: var(--ks-red-soft);
  color: var(--ks-text);
  font-size: 0.8rem;
}

.search-filter-chip strong {
  color: var(--ks-red);
}

.search-active-filters__reset {
  margin-left: 4px;
  color: var(--ks-muted);
  font-size: 0.8rem;
  font-weight: 750;
  text-decoration: none;
}

.search-active-filters__reset:hover {
  color: var(--ks-red);
}

.search-debug {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px dashed var(--ks-line);
  border-radius: 12px;
  background: #fff;
  color: var(--ks-muted);
  font: 0.8rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.search-results-section {
  min-height: 360px;
}

.results-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
}

.results-toolbar__eyebrow {
  display: block;
  margin-bottom: 3px;
  color: var(--ks-muted);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.results-toolbar__count,
.results-toolbar__category {
  display: block;
  color: var(--ks-ink);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
}

.results-toolbar__page {
  color: var(--ks-muted);
  font-size: 0.84rem;
}

.results-list {
  display: grid;
  gap: 14px;
}

.result-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--ks-line);
  border-radius: 18px;
  background: var(--ks-surface);
  box-shadow: 0 5px 20px rgba(15, 23, 42, 0.035);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.result-card:hover {
  border-color: rgba(179, 31, 43, 0.2);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
  transform: translateY(-1px);
}

.result-card__logo {
  display: grid;
  min-height: 90px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--ks-line);
  border-radius: 14px;
  background: #fff;
}

.result-card__logo img,
.result-card__logo-image {
  display: block;
  max-width: 100%;
  max-height: 82px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.result-card__placeholder {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 14px;
  background: var(--ks-red-soft);
  color: var(--ks-red);
  font-weight: 850;
}

.result-card__content {
  min-width: 0;
}

.result-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 6px;
  color: var(--ks-muted);
  font-size: 0.79rem;
  font-weight: 700;
}

.result-card__meta span + span::before {
  content: "•";
  margin-right: 12px;
  color: #cbd5e1;
}

.result-card__title {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.32rem);
  line-height: 1.25;
}

.result-card__title a {
  color: var(--ks-ink);
  text-decoration: none;
}

.result-card__title a:hover,
.result-card__title a:focus-visible {
  color: var(--ks-red);
}

.result-card__description {
  max-width: 760px;
  margin: 8px 0 0;
  color: var(--ks-muted);
  line-height: 1.6;
}

.result-card__address {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin-top: 10px;
  color: var(--ks-muted);
  font-size: 0.8rem;
}

.pagination-wrapper {
  margin-top: 28px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.pagination a,
.pagination__status {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border: 1px solid var(--ks-line);
  border-radius: 10px;
  background: #fff;
  color: var(--ks-text);
  font-size: 0.84rem;
  font-weight: 750;
  text-decoration: none;
}

.pagination a:hover,
.pagination a:focus-visible {
  border-color: var(--ks-red);
  color: var(--ks-red);
}

.pagination__status {
  color: var(--ks-muted);
  font-weight: 600;
}

.empty-state--search {
  max-width: 680px;
  margin-inline: auto;
  padding: clamp(34px, 6vw, 54px);
  text-align: center;
}

.empty-state__hint {
  color: var(--ks-muted);
  font-size: 0.88rem;
}

.search-start-state {
  display: flex;
  max-width: 700px;
  align-items: center;
  gap: 20px;
  margin-inline: auto;
  padding: 34px;
  border: 1px solid var(--ks-line);
  border-radius: 20px;
  background: var(--ks-surface-soft);
}

.search-start-state__icon {
  display: grid;
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  background: var(--ks-red-soft);
  color: var(--ks-red);
  font-size: 1.8rem;
}

.search-start-state h2 {
  margin: 0 0 6px;
}

.search-start-state p {
  margin: 0;
  color: var(--ks-muted);
}

@media (max-width: 820px) {
  .portal-search--results {
    grid-template-columns: 1fr;
  }

  .portal-search__submit {
    width: 100%;
  }

  .results-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

@media (max-width: 620px) {
  .result-card {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
    padding: 15px;
  }

  .result-card__logo {
    min-height: 68px;
  }

  .result-card__logo img,
  .result-card__logo-image {
    max-height: 60px;
  }

  .result-card__description {
    font-size: 0.9rem;
  }

  .pagination {
    flex-wrap: wrap;
  }

  .search-start-state {
    align-items: flex-start;
    padding: 24px;
  }
}


/* ==========================================================
   SUCHTREFFER – PAGINATION FINAL
   Muss am Ende von /klingenstadt.css stehen.
   Überschreibt ältere allgemeine .pagination-Regeln.
   ========================================================== */

.search-results-section .pagination-wrapper {
  display: flex;
  justify-content: center;
  margin-top: clamp(28px, 5vw, 42px);
}

.search-results-section .pagination {
  display: inline-grid;
  grid-template-columns: minmax(112px, auto) auto minmax(112px, auto);
  align-items: center;
  justify-content: center;
  gap: 8px;

  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 6px;

  border: 1px solid var(--ks-line);
  border-radius: 16px;
  background: var(--ks-surface);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);

  list-style: none;
}


/* Zurück / Weiter */
.search-results-section .pagination > a,
.search-results-section .pagination li > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  min-width: 112px;
  min-height: 44px;
  padding: 10px 15px;

  border: 1px solid transparent;
  border-radius: 11px;

  background: transparent;
  color: var(--ks-text);

  font-size: 0.84rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;

  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.search-results-section .pagination > a:first-child,
.search-results-section .pagination li:first-child > a {
  justify-self: start;
}

.search-results-section .pagination > a:last-child,
.search-results-section .pagination li:last-child > a {
  justify-self: end;
}

.search-results-section .pagination > a:hover,
.search-results-section .pagination > a:focus-visible,
.search-results-section .pagination li > a:hover,
.search-results-section .pagination li > a:focus-visible {
  border-color: rgba(179, 31, 43, 0.14);
  background: var(--ks-red-soft);
  color: var(--ks-red);
  transform: translateY(-1px);
}


/* Seitenstatus – bewusst alle alten .pagination span-Regeln resetten */
.search-results-section .pagination .pagination__status,
.search-results-section .pagination > span.pagination__status {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;

  min-width: 118px;
  min-height: 44px;
  padding: 10px 14px;

  border: 0;
  border-radius: 10px;

  background: var(--ks-surface-soft);
  color: var(--ks-muted);

  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.search-results-section .pagination .pagination__status strong {
  color: var(--ks-ink);
  font-size: 0.88rem;
  font-weight: 850;
}


/* Falls die ältere Template-Version .is-current verwendet */
.search-results-section .pagination .is-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 44px;
  min-width: 118px;
  padding: 10px 14px;

  border: 0;
  border-radius: 10px;

  background: var(--ks-surface-soft);
  color: var(--ks-ink);

  font-size: 0.82rem;
  font-weight: 800;
}


/* Listen-Markup älterer Suchtreffer-Templates neutralisieren */
.search-results-section .pagination > li {
  display: contents;
  margin: 0;
  padding: 0;
}


/* Tablet */
@media (max-width: 620px) {
  .search-results-section .pagination {
    grid-template-columns: 1fr 1fr;
    width: min(100%, 430px);
    gap: 6px;
  }

  .search-results-section .pagination .pagination__status,
  .search-results-section .pagination > span.pagination__status,
  .search-results-section .pagination .is-current {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    min-width: 0;
  }

  .search-results-section .pagination > a,
  .search-results-section .pagination li > a {
    width: 100%;
    min-width: 0;
  }
}


/* Sehr schmale Displays */
@media (max-width: 390px) {
  .search-results-section .pagination {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }

  .search-results-section .pagination .pagination__status,
  .search-results-section .pagination > span.pagination__status,
  .search-results-section .pagination .is-current {
    order: -1;
    flex: 0 0 100%;
  }

  .search-results-section .pagination > a,
  .search-results-section .pagination li > a {
    flex: 1 1 calc(50% - 4px);
  }
}


/* Bewegungsreduktion */
@media (prefers-reduced-motion: reduce) {
  .search-results-section .pagination > a,
  .search-results-section .pagination li > a {
    transition: none;
  }
}

/* ==========================================================
   Klingenstadt.de – Datenschutzerklärung
   ========================================================== */

.privacy-page {
  background: var(--ks-surface-soft);
}

.privacy-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 6vw, 72px) 0 clamp(38px, 7vw, 82px);
  border-bottom: 1px solid var(--ks-line);
  background:
    radial-gradient(circle at 88% 20%, rgba(179, 31, 43, 0.10), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.privacy-hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  margin-top: clamp(24px, 4vw, 42px);
}

.privacy-hero__copy {
  max-width: 780px;
}

.privacy-hero h1 {
  margin-bottom: 18px;
  font-size: clamp(2.2rem, 5vw, 4.15rem);
}

.privacy-hero__lead {
  max-width: 720px;
  margin: 0;
  color: var(--ks-muted);
  font-size: clamp(1rem, 1.8vw, 1.16rem);
  line-height: 1.75;
}

.privacy-hero__badge {
  display: grid;
  width: 86px;
  height: 86px;
  flex: 0 0 86px;
  place-items: center;
  border: 1px solid rgba(179, 31, 43, 0.16);
  border-radius: 24px;
  background: var(--ks-red-soft);
  color: var(--ks-red);
  box-shadow: var(--ks-shadow-sm);
}

.privacy-section {
  padding: clamp(34px, 6vw, 72px) 0 clamp(60px, 8vw, 100px);
}

.privacy-layout {
  display: grid;
  grid-template-columns: minmax(230px, 285px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(28px, 5vw, 64px);
}

.privacy-sidebar {
  position: sticky;
  top: calc(var(--ks-header-height) + 24px);
}

.privacy-sidebar__card {
  overflow: hidden;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius);
  background: var(--ks-surface);
  box-shadow: var(--ks-shadow-sm);
}

.privacy-sidebar__eyebrow {
  display: block;
  padding: 17px 18px 13px;
  border-bottom: 1px solid var(--ks-line);
  color: var(--ks-muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.privacy-toc {
  max-height: min(66vh, 620px);
  overflow-y: auto;
  scrollbar-width: thin;
}

.privacy-toc__loading {
  margin: 0;
  padding: 16px 18px;
  color: var(--ks-muted);
  font-size: 0.84rem;
}

.privacy-toc__list {
  margin: 0;
  padding: 8px;
  list-style: none;
  counter-reset: none;
}

.privacy-toc__list li {
  margin: 0;
  padding: 0;
}

.privacy-toc__list a {
  display: block;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--ks-text);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.4;
  text-decoration: none;
  transition:
    background var(--ks-transition),
    color var(--ks-transition);
}

.privacy-toc__list a:hover,
.privacy-toc__list a:focus-visible {
  background: var(--ks-red-soft);
  color: var(--ks-red-dark);
}

.privacy-main {
  min-width: 0;
}

.privacy-content {
  padding: clamp(24px, 4.5vw, 54px);
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius-lg);
  background: var(--ks-surface);
  box-shadow: var(--ks-shadow-sm);
}

.privacy-content > p:first-child {
  font-size: 1.06rem;
}

.privacy-content p {
  max-width: 82ch;
  margin: 0 0 1.15rem;
  color: var(--ks-text);
  line-height: 1.78;
  overflow-wrap: anywhere;
}

.privacy-content h4 {
  scroll-margin-top: calc(var(--ks-header-height) + 26px);
}

.privacy-content > h4 {
  position: relative;
  margin: 3rem 0 1.05rem;
  padding-top: 1.65rem;
  border-top: 1px solid var(--ks-line);
  color: var(--ks-ink);
  font-size: clamp(1.18rem, 2.3vw, 1.52rem);
  line-height: 1.3;
}

.privacy-content > h4:first-of-type {
  margin-top: 2.4rem;
}

.privacy-definition-list {
  margin: 1.2rem 0 2rem;
  padding: 0 !important;
}

.privacy-definition-list > li {
  margin: 0 0 10px;
  padding: 17px 18px;
  border: 1px solid var(--ks-line);
  border-radius: 13px;
  background: var(--ks-surface-soft);
}

.privacy-definition-list > li > h4 {
  margin: 0 0 8px;
  color: var(--ks-ink);
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.privacy-definition-list > li > p:last-child {
  margin-bottom: 0;
}

.privacy-content ul:not(.privacy-definition-list) {
  max-width: 82ch;
  margin: 0 0 1.35rem;
  padding-left: 1.35rem;
}

.privacy-content ul:not(.privacy-definition-list) li {
  margin: 0 0 0.48rem;
  line-height: 1.7;
}

.privacy-content a {
  overflow-wrap: anywhere;
}

.privacy-content a[href^="mailto:"] {
  font-weight: 700;
}

.privacy-backtop {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.privacy-backtop a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius-pill);
  background: var(--ks-surface);
  color: var(--ks-text);
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
}

.privacy-backtop a:hover {
  border-color: rgba(179, 31, 43, 0.28);
  color: var(--ks-red);
}

@media (max-width: 900px) {
  .privacy-layout {
    grid-template-columns: 1fr;
  }

  .privacy-sidebar {
    position: static;
    order: 0;
  }

  .privacy-toc {
    max-height: 280px;
  }

  .privacy-main {
    order: 1;
  }
}

@media (max-width: 640px) {
  .privacy-hero__badge {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
    border-radius: 18px;
  }

  .privacy-hero__badge svg {
    width: 28px;
    height: 28px;
  }

  .privacy-content {
    padding: 22px 18px;
    border-radius: var(--ks-radius);
  }

  .privacy-content > h4 {
    margin-top: 2.4rem;
    font-size: 1.18rem;
  }

  .privacy-definition-list > li {
    padding: 15px;
  }
}

/* ==========================================================
   Klingenstadt.de – Branchen-/Auswahlseite
   ========================================================== */

.directory-page {
  background: var(--ks-surface-soft);
}

.directory-hero {
  padding: clamp(32px, 6vw, 70px) 0 clamp(36px, 6vw, 72px);
  border-bottom: 1px solid var(--ks-line);
  background:
    radial-gradient(circle at 88% 15%, rgba(179, 31, 43, 0.11), transparent 28rem),
    linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}

.directory-hero__grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  margin-top: clamp(24px, 4vw, 42px);
}

.directory-hero__copy {
  max-width: 820px;
}

.directory-hero h1 {
  margin: 8px 0 16px;
  font-size: clamp(2rem, 4.7vw, 3.8rem);
  line-height: 1.04;
}

.directory-hero__description {
  max-width: 760px;
  color: var(--ks-muted);
  font-size: clamp(1rem, 1.7vw, 1.14rem);
  line-height: 1.72;
}

.directory-hero__description:empty {
  display: none;
}

.directory-hero__icon {
  display: grid;
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
  place-items: center;
  border: 1px solid rgba(179, 31, 43, 0.14);
  border-radius: 24px;
  background: var(--ks-red-soft);
  color: var(--ks-red);
  box-shadow: var(--ks-shadow-sm);
}

.directory-filter-section {
  padding: 30px 0 0;
}

.directory-filter-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, .9fr);
  align-items: center;
  gap: clamp(24px, 5vw, 60px);
  padding: clamp(22px, 4vw, 38px);
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius-lg);
  background: var(--ks-surface);
  box-shadow: var(--ks-shadow-sm);
}

.directory-filter-card__eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--ks-red);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.directory-filter-card h2 {
  margin: 0 0 9px;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
}

.directory-filter-card p {
  max-width: 650px;
  margin: 0;
  color: var(--ks-muted);
  line-height: 1.65;
}

.directory-filter-label {
  display: block;
  margin-bottom: 7px;
  color: var(--ks-ink);
  font-size: .82rem;
  font-weight: 800;
}

.directory-filter-card select {
  width: 100%;
  min-height: 52px;
  padding: 10px 42px 10px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  color: var(--ks-text);
  font: inherit;
  cursor: pointer;
}

.directory-filter-card select:focus {
  border-color: var(--ks-red);
  outline: 3px solid rgba(179, 31, 43, .10);
}

.directory-filter-submit {
  min-height: 44px;
  margin-top: 10px;
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--ks-red);
  color: #fff;
  font: inherit;
  font-weight: 800;
}

.directory-results-section {
  padding: clamp(34px, 5vw, 62px) 0 clamp(62px, 8vw, 100px);
}

.directory-results-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.directory-results-header h2 {
  margin: 7px 0 0;
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.directory-reset-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 8px 13px;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius-pill);
  background: var(--ks-surface);
  color: var(--ks-text);
  font-size: .8rem;
  font-weight: 750;
  text-decoration: none;
}

.directory-reset-link:hover {
  border-color: rgba(179, 31, 43, .3);
  color: var(--ks-red);
}

.directory-results-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border: 1px solid var(--ks-line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .72);
  color: var(--ks-muted);
  font-size: .78rem;
}

.directory-results-toolbar strong {
  color: var(--ks-ink);
}

.directory-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.directory-result-card {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 18px;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius);
  background: var(--ks-surface);
  box-shadow: var(--ks-shadow-sm);
  transition:
    transform var(--ks-transition),
    border-color var(--ks-transition),
    box-shadow var(--ks-transition);
}

.directory-result-card:hover {
  transform: translateY(-2px);
  border-color: rgba(179, 31, 43, .22);
  box-shadow: var(--ks-shadow);
}

.directory-result-card__logo {
  position: relative;
  display: grid;
  width: 104px;
  height: 82px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--ks-line);
  border-radius: 12px;
  background: var(--ks-surface-soft);
  color: var(--ks-red);
  font-size: .9rem;
  font-weight: 900;
  letter-spacing: .06em;
}

.directory-result-card__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}

.directory-result-card__logo-img {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 88px;
  max-height: 66px;
  width: auto;
  height: auto;
  object-fit: contain;
  background: var(--ks-surface-soft);
}

.directory-result-card__body {
  min-width: 0;
}

.directory-result-card__body h3 {
  margin: 0 0 6px;
  font-size: 1.06rem;
  line-height: 1.35;
}

.directory-result-card__body h3 a {
  color: var(--ks-ink);
  text-decoration: none;
}

.directory-result-card__body h3 a:hover {
  color: var(--ks-red);
}

.directory-result-card__category {
  margin-bottom: 9px;
  color: var(--ks-red);
  font-size: .72rem;
  font-weight: 800;
}

.directory-result-card__body p {
  margin: 0;
  color: var(--ks-muted);
  font-size: .86rem;
  line-height: 1.58;
}

.directory-result-card--authority .directory-result-card__logo {
  background: var(--ks-red-soft);
}

.directory-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
  padding: 8px;
  border: 1px solid var(--ks-line);
  border-radius: 14px;
  background: var(--ks-surface);
}

.directory-pagination > span {
  color: var(--ks-muted);
  font-size: .78rem;
  font-weight: 700;
  text-align: center;
}

.directory-pagination a {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 9px;
  color: var(--ks-text);
  font-size: .8rem;
  font-weight: 800;
  text-decoration: none;
}

.directory-pagination a:hover {
  background: var(--ks-red-soft);
  color: var(--ks-red);
}

.directory-pagination > *:last-child {
  justify-self: end;
}

.directory-start-state,
.directory-empty-state {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px dashed #cbd5e1;
  border-radius: var(--ks-radius);
  background: rgba(255, 255, 255, .68);
}

.directory-start-state__icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 14px;
  background: var(--ks-red-soft);
  color: var(--ks-red);
  font-size: 1.15rem;
  font-weight: 900;
}

.directory-start-state strong,
.directory-empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ks-ink);
  font-size: 1rem;
}

.directory-start-state p,
.directory-empty-state p {
  margin: 0;
  color: var(--ks-muted);
  line-height: 1.55;
}

.directory-empty-state {
  display: block;
  border-style: solid;
  background: var(--ks-surface);
}

@media (max-width: 900px) {
  .directory-filter-card {
    grid-template-columns: 1fr;
  }

  .directory-result-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .directory-hero__icon {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
    border-radius: 18px;
  }

  .directory-hero__icon svg {
    width: 28px;
    height: 28px;
  }

  .directory-results-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .directory-results-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .directory-result-card {
    grid-template-columns: 72px minmax(0, 1fr);
    padding: 16px;
  }

  .directory-result-card__logo {
    width: 72px;
    height: 64px;
  }

  .directory-result-card__logo-img {
    max-width: 62px;
    max-height: 52px;
  }

  .directory-pagination {
    grid-template-columns: 1fr 1fr;
  }

  .directory-pagination > span {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .directory-pagination > *:last-child {
    justify-self: stretch;
  }

  .directory-pagination a {
    width: 100%;
  }
}

/* ==========================================================
   Kategorien – Beschreibungstexte
   ========================================================== */

#kategorien .category-group__description {
  max-width: 52ch;
  margin: 8px 0 0;
  color: var(--ks-muted);
  font-size: 0.88rem;
  font-weight: 450;
  line-height: 1.58;
}

@media (max-width: 640px) {
  #kategorien .category-group__description {
    max-width: none;
    font-size: 0.84rem;
  }
}

/* ==========================================================
   Branchen-Auswahl – robuste webEdition categorySelect Styles
   ========================================================== */

.directory-filter-card__form,
.directory-filter-card__form form {
  width: 100%;
  margin: 0;
}

.directory-filter-card__form form {
  position: relative;
}

.directory-filter-card__form select,
#ks-directory-category-services,
#ks-directory-category-crafts,
#ks-directory-category-industry,
#ks-directory-category-authorities {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 56px;
  margin: 0;
  padding: 12px 52px 12px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  outline: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%),
    linear-gradient(to right, #e2e8f0, #e2e8f0);
  background-position:
    calc(100% - 21px) 24px,
    calc(100% - 15px) 24px,
    calc(100% - 42px) 0;
  background-size:
    6px 6px,
    6px 6px,
    1px 100%;
  background-repeat: no-repeat;

  color: var(--ks-ink);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);

  font-size: 0.96rem;
  font-weight: 650;
  line-height: 1.35;

  cursor: pointer;
  transition:
    border-color var(--ks-transition),
    box-shadow var(--ks-transition),
    background-color var(--ks-transition);
}

.directory-filter-card__form select:hover,
#ks-directory-category-services:hover,
#ks-directory-category-crafts:hover,
#ks-directory-category-industry:hover,
#ks-directory-category-authorities:hover {
  border-color: #aeb8c5;
  background-color: #fefefe;
}

.directory-filter-card__form select:focus,
#ks-directory-category-services:focus,
#ks-directory-category-crafts:focus,
#ks-directory-category-industry:focus,
#ks-directory-category-authorities:focus {
  border-color: var(--ks-red);
  box-shadow:
    0 0 0 4px rgba(179, 31, 43, 0.10),
    0 6px 18px rgba(15, 23, 42, 0.06);
}

.directory-filter-card__form select option {
  background: #ffffff;
  color: var(--ks-ink);
  font-weight: 500;
}

.directory-filter-label {
  margin-bottom: 9px;
  color: var(--ks-ink);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.025em;
}

.directory-filter-card__form::before {
  content: "";
  display: block;
  width: 42px;
  height: 4px;
  margin: 0 0 16px;
  border-radius: 999px;
  background: var(--ks-red);
}

@media (max-width: 640px) {
  .directory-filter-card__form select,
  #ks-directory-category-services,
  #ks-directory-category-crafts,
  #ks-directory-category-industry,
  #ks-directory-category-authorities {
    min-height: 54px;
    padding-left: 14px;
    font-size: 0.92rem;
  }
}

.site-footer__brand > a {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  line-height: 0;
}

.site-footer__brand > a:hover .site-footer__logo {
  opacity: 0.92;
}

/* ==========================================================
   Klingenstadt.de – Anbieterkennzeichnung / Rechtliches
   ========================================================== */

.legal-page {
  background: var(--ks-surface-soft);
}

.legal-hero {
  padding: clamp(32px, 6vw, 70px) 0 clamp(38px, 7vw, 78px);
  border-bottom: 1px solid var(--ks-line);
  background:
    radial-gradient(circle at 88% 18%, rgba(179, 31, 43, 0.11), transparent 28rem),
    linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.legal-hero__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 34px;
  margin-top: clamp(24px, 4vw, 42px);
}

.legal-hero__copy {
  max-width: 780px;
}

.legal-hero h1 {
  margin: 8px 0 16px;
  font-size: clamp(2.15rem, 5vw, 4rem);
  line-height: 1.04;
}

.legal-hero__lead {
  max-width: 720px;
  margin: 0;
  color: var(--ks-muted);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.72;
}

.legal-hero__icon {
  display: grid;
  width: 86px;
  height: 86px;
  flex: 0 0 86px;
  place-items: center;
  border: 1px solid rgba(179, 31, 43, 0.15);
  border-radius: 24px;
  background: var(--ks-red-soft);
  color: var(--ks-red);
  box-shadow: var(--ks-shadow-sm);
}

.legal-section {
  padding: clamp(36px, 6vw, 70px) 0 clamp(64px, 8vw, 100px);
}

.legal-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 30px);
}

.legal-card {
  overflow: hidden;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius-lg);
  background: var(--ks-surface);
  box-shadow: var(--ks-shadow-sm);
}

.legal-card__header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 22px 24px 20px;
  border-bottom: 1px solid var(--ks-line);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}

.legal-card__number {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--ks-red-soft);
  color: var(--ks-red);
  font-size: .78rem;
  font-weight: 900;
}

.legal-card__eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--ks-muted);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .075em;
  text-transform: uppercase;
}

.legal-card h2 {
  margin: 0;
  font-size: clamp(1.22rem, 2.3vw, 1.55rem);
  line-height: 1.25;
}

.legal-card__body {
  padding: clamp(22px, 4vw, 32px);
}

.legal-intro {
  margin: 0 0 22px;
  color: var(--ks-muted);
  line-height: 1.65;
}

.legal-address {
  margin: 0 0 26px;
  padding: 18px 20px;
  border-left: 4px solid var(--ks-red);
  border-radius: 0 12px 12px 0;
  background: var(--ks-surface-soft);
  color: var(--ks-text);
  font-style: normal;
  line-height: 1.72;
}

.legal-address strong {
  color: var(--ks-ink);
  font-size: 1.03rem;
}

.legal-contact-list {
  margin: 0;
}

.legal-contact-list > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--ks-line);
}

.legal-contact-list > div:first-child {
  border-top: 0;
}

.legal-contact-list dt {
  color: var(--ks-muted);
  font-size: .78rem;
  font-weight: 800;
}

.legal-contact-list dd {
  min-width: 0;
  margin: 0;
  color: var(--ks-ink);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.legal-contact-list a {
  color: var(--ks-red);
  text-decoration: none;
}

.legal-contact-list a:hover {
  text-decoration: underline;
}

.legal-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
  padding: 18px 20px;
  border: 1px solid var(--ks-line);
  border-radius: var(--ks-radius);
  background: var(--ks-surface);
  box-shadow: var(--ks-shadow-sm);
}

.legal-note__icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--ks-red-soft);
  color: var(--ks-red);
  font-weight: 900;
}

.legal-note strong {
  display: block;
  margin-bottom: 3px;
  color: var(--ks-ink);
}

.legal-note p {
  margin: 0;
  color: var(--ks-muted);
  font-size: .86rem;
  line-height: 1.5;
}

.legal-note__link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border: 1px solid rgba(179, 31, 43, .2);
  border-radius: var(--ks-radius-pill);
  background: var(--ks-red-soft);
  color: var(--ks-red);
  font-size: .8rem;
  font-weight: 800;
  text-decoration: none;
}

.legal-note__link:hover {
  border-color: var(--ks-red);
}

@media (max-width: 800px) {
  .legal-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .legal-hero__icon {
    width: 62px;
    height: 62px;
    flex-basis: 62px;
    border-radius: 18px;
  }

  .legal-hero__icon svg {
    width: 28px;
    height: 28px;
  }

  .legal-card__header,
  .legal-card__body {
    padding-left: 18px;
    padding-right: 18px;
  }

  .legal-contact-list > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .legal-note {
    grid-template-columns: auto 1fr;
  }

  .legal-note__link {
    grid-column: 1 / -1;
    width: 100%;
  }
}

/* ==========================================================
   Anbieterkennzeichnung – finale Ergänzungen
   ========================================================== */

.legal-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.legal-layout .legal-card:nth-child(3) {
  grid-column: 1 / -1;
}

.legal-tax-id {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid var(--ks-line);
  border-radius: 12px;
  background: var(--ks-surface-soft);
}

.legal-tax-id__label {
  color: var(--ks-muted);
  font-size: .79rem;
  font-weight: 750;
  line-height: 1.45;
}

.legal-tax-id strong {
  flex: 0 0 auto;
  color: var(--ks-ink);
  font-size: .96rem;
  letter-spacing: .02em;
}

@media (max-width: 800px) {
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-layout .legal-card:nth-child(3) {
    grid-column: auto;
  }
}

@media (max-width: 520px) {
  .legal-tax-id {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
}
