:root {
  --bg: #f6f1e8;
  --surface: #fffdfa;
  --surface-soft: #f9f5ee;
  --surface-strong: rgba(255, 253, 250, 0.98);
  --text: #161311;
  --muted: #6c645c;
  --line: rgba(22, 19, 17, 0.1);
  --line-strong: rgba(22, 19, 17, 0.18);
  --brand: #8d1f2d;
  --brand-strong: #b31d2e;
  --shadow-soft: 0 10px 26px rgba(19, 14, 10, 0.06);
  --shadow-menu: 0 24px 60px rgba(19, 14, 10, 0.14);
  --radius-s: 12px;
  --radius-m: 18px;
  --radius-l: 28px;
  --header-width: 1180px;
  --content-width: 820px;
  --header-height: 82px;
  --menu-size: clamp(18px, 5.2vw, 28px);
  --menu-panel-width: min(390px, 88vw);
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(179, 29, 46, 0.04), transparent 22%),
    radial-gradient(circle at top right, rgba(0, 0, 0, 0.03), transparent 18%),
    var(--bg);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}


img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-m);
}

a {
  color: var(--brand);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.14em;
}

a:hover {
  color: var(--brand-strong);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1100;
  background: rgba(246, 241, 232, 0.84);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(22, 19, 17, 0.08);
}

.header-inner {
  max-width: var(--header-width);
  min-height: var(--header-height);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  flex: 0 0 auto;
  min-width: 0;
}

.brand a {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  color: var(--brand);
  text-decoration: none;
}

.site-title-text {
  font-size: 1.16rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-logo {
  display: block;
  max-height: 52px;
  max-width: 220px;
  width: auto;
  height: auto;
  border-radius: 0;
}

.site-nav {
  margin-left: auto;
  position: relative;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav > ul {
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-nav a,
.site-nav button {
  font: inherit;
}





.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.68rem 0.95rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 999px;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.site-nav > ul > li > a {
  font-size: 0.97rem;
  font-weight: 620;
  letter-spacing: 0.01em;
}

.site-nav > ul > li:hover > a,
.site-nav > ul > li:focus-within > a,
.site-nav > ul > li.submenu-open > a {
  color: var(--brand);
  background: rgba(141, 31, 45, 0.08);
}

.submenu-toggle {
  display: none;
}

.site-nav li {
  position: relative;
}

.site-nav li.has-children > a {
  position: relative;
  padding-right: 2.3rem;
}

/* Top-Level: Pfeil nach unten */
.site-nav > ul > li.has-children > a::after {
  position: absolute;
  content: "▼";
  right: 0.88rem;
  top: 50%;
  transform: translateY(-50%);
  color: currentColor;
  font-size: 0.68rem;
  line-height: 1;
}

/* Unterebenen: Pfeil nach rechts */
.site-nav ul ul li.has-children > a::after {
  position: absolute;
  content: "▶";
  right: 0.88rem;
  top: 50%;
  transform: translateY(-50%);
  color: currentColor;
  font-size: 0.68rem;
  line-height: 1;
}

.submenu-toggle {
  display: none;
}

.site-nav li > ul {
  position: absolute;
  min-width: 248px;
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  background: var(--surface-strong);
  border: 1px solid rgba(22, 19, 17, 0.08);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-menu);
}

/* H2: nach unten */
.site-nav > ul > li > ul {
  top: 100%;
  left: 0;
  right: auto;
}

/* H3 und tiefer: standardmäßig nach rechts */
.site-nav ul ul li {
  position: relative;
}

.site-nav ul ul li > ul {
  top: -10px;
  left: calc(100% - 6px);
  right: auto;
}

/* Wenn JS entscheidet: nach links öffnen */
.site-nav ul ul li.open-left > ul {
  left: auto;
  right: calc(100% - 6px);
}

.site-nav li:hover > ul,
.site-nav li:focus-within > ul,
.site-nav li.submenu-open > ul {
  display: flex;
}

.site-nav li > ul a {
  width: 100%;
  min-height: 40px;
  padding: 12px 6px;
  border-radius: 12px;
  font-size: 0.94rem;
  font-weight: 500;
}

.site-nav li > ul a:hover,
.site-nav li > ul a:focus-visible {
  background: rgba(141, 31, 45, 0.08);
  color: var(--brand);
}


.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  width: calc(var(--menu-size) + 1.4rem);
  height: calc(var(--menu-size) + 1.4rem);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 250, 0.88);
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.menu-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.menu-toggle-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: var(--menu-size);
  height: var(--menu-size);
}

.menu-toggle-line {
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.menu-toggle-line:first-child {
  margin-top: 0;
}

.site-nav.menu-visible .menu-toggle-line:nth-child(1) {
  transform: translateY(6px) rotate(45deg) scaleX(0.72);
}

.site-nav.menu-visible .menu-toggle-line:nth-child(2) {
  opacity: 0;
}

.site-nav.menu-visible .menu-toggle-line:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg) scaleX(0.72);
}

.menu-overlay {
  display: none;
}

.breadcrumb {
  max-width: var(--header-width);
  margin: 0 auto;
  padding: 12px 24px 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.breadcrumb a {
  color: inherit;
}

.content {
  max-width: calc(var(--content-width) + 64px);
  margin: 0 auto;
  padding: 38px 24px 88px;
}

.content > * {
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
}

.content h1 {
  margin-top: 0;
  margin-bottom: 0.9rem;
  color: var(--brand);
  font-size: clamp(2.1rem, 4vw, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.content h2 {
  margin-top: 3.5rem;
  margin-bottom: 1rem;
  color: var(--text);
  font-size: clamp(1.55rem, 2.4vw, 2.1rem);
  line-height: 1.16;
}

.content h3 {
  margin-top: 2.25rem;
  margin-bottom: 0.8rem;
  color: var(--brand);
}

.content p,
.content ul,
.content ol,
.content blockquote {
  margin-top: 0;
  margin-bottom: 1.15rem;
  font-size: 1.02rem;
  hyphens: auto;
}

.content p.text-large {
  font-size: 1.5rem;
}

.content p.text-small {
  font-size: 0.94rem;
}

.content p:not([style*="text-align"]) {
  text-align: justify;
}

.content ul,
.content ol {
  padding-left: 1.3rem;
}

blockquote {
  padding: 1rem 1.2rem;
  background: rgba(255, 255, 255, 0.58);
  border-left: 4px solid rgba(141, 31, 45, 0.32);
  border-radius: 0 14px 14px 0;
}

footer {
  padding: 28px 24px 42px;
  border-top: 1px solid rgba(22, 19, 17, 0.08);
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

footer p {
  margin: 0;
}

@media (max-width: 980px) {
  .header-inner {
    gap: 14px;
    padding: 14px 18px;
  }

  .brand {
    flex: 1 1 auto;
  }

  .brand a {
    font-size: 1.04rem;
    letter-spacing: 0.08em;
  }

  .site-header {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(246, 241, 232, 0.96);
  }

  .site-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
  }

  .menu-toggle {
    display: inline-flex;
    position: relative;
    z-index: 1110;
  }

  .menu-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(22, 19, 17, 0.32);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
    z-index: 1085;
  }

  body.menu-open .menu-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .site-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    position: relative;
  }

  .site-nav > ul {
    position: fixed;
    top: 0;
    right: 0;
    width: var(--menu-panel-width);
    max-height: 100dvh;
    padding: 18px 18px 24px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: rgba(255, 253, 250, 0.985);
    border: 1px solid rgba(22, 19, 17, 0.08);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-menu);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    transform: translateX(calc(100% + 18px));
    transition: transform 0.24s ease;
    z-index: 1095;
  }

  .site-nav > ul.show {
    transform: translateX(0);
  }

  .site-nav > ul > li {
    width: 100%;
    padding: 0.1rem 0 0.45rem;
    border-bottom: 1px solid rgba(22, 19, 17, 0.08);
  }

  .site-nav > ul > li:last-child {
    border-bottom: 0;
  }

  .site-nav > ul > li > a {
    display: flex;
    width: calc(100% - 44px);
    min-height: 48px;
    padding: 0.8rem 0;
    border-radius: 0;
    background: transparent !important;
    font-size: 1rem;
  }

  .site-nav li.has-children > a {
    padding-right: 0;
  }

  .site-nav li.has-children > a::after {
    display: none;
  }

.submenu-toggle {
  display: inline-flex;
  position: absolute;
  top: 6px;
  right: 0;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  z-index: 2;
}

  .submenu-toggle span::before {
    content: "▶";
    font-size: 0.82rem;
    line-height: 1;
  }

  .submenu-open > .submenu-toggle span::before {
    content: "▼";
  }

.site-nav li > ul {
  position: static;
  min-width: 0;
  margin: 0.15rem 0 0.35rem;
  padding: 0 0 0 1rem;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  border: 1px solid rgba(22, 19, 17, 0.08);
}

  .site-nav li:hover > ul,
  .site-nav li:focus-within > ul {
    display: none;
  }

  .site-nav li.submenu-open > ul {
    display: flex;
  }

.site-nav li > ul a {
  display: flex;
  width: calc(100% - 40px);
  min-height: 36px;
  padding: 0.62rem 0;
  border-radius: 0;
  font-size: 0.96rem;
}

.site-nav li > ul > li {
  width: 100%;
  padding: 0.05rem 0;
}

.site-nav li > ul > li > ul {
  padding-left: 1rem;
  margin-top: 0.1rem;
}

.site-nav ul ul a {
  font-size: 0.95rem;
}

.site-nav ul ul ul a {
  font-size: 0.92rem;
  color: var(--muted);
}

  .breadcrumb,
  .content,
  footer {
    padding-left: 18px;
    padding-right: 18px;
  }
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 2rem 0;
}

.gallery a,
.gallery .gallery-item {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
}


.gallery img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  display: block;
  border-radius: 0;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.lightbox-inner {
  width: min(1000px, 100vmin);
  height: min(1000px, 100vmin);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-inner img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 18px;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  width: 52px;
  height: 52px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-prev {
  left: 18px;
}

.lightbox-next {
  right: 18px;
}

.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-prev:focus-visible,
.lightbox-next:focus-visible {
  background: rgba(255, 255, 255, 0.2);
}

.search {
  margin-bottom: 2rem;
}

#search {
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  font-size: 1rem;
  margin-bottom: 1rem;
}

#results-count {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

#results {
  list-style: none;
  padding: 0;
  margin: 0;
}

#results li {
  margin-bottom: 0.5rem;
}

.search-result {
  margin-bottom: 1rem;
}

.search-result-link {
  display: block;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.search-result-link:hover,
.search-result-link:focus-visible {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 14px 30px rgba(19, 14, 10, 0.08);
}

.search-result-title {
  display: block;
  color: var(--brand);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.search-result-url {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  margin-bottom: 0.45rem;
}

.search-result-snippet {
  display: block;
  color: var(--text);
  line-height: 1.6;
}

.search-empty {
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--surface);
  color: var(--muted);
}

mark {
  background: rgba(217, 0, 0, 0.16);
  color: inherit;
  padding: 0.04em 0.14em;
  border-radius: 0.22em;
}

.search-form {
  flex: 1 1 auto;
  max-width: 260px;
}

.search-form input {
  width: 100%;
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 0.9rem;
  background: var(--surface);
}

.hero-media {
  max-width: min(1180px, calc(100vw - 48px));
  margin: 0 auto 2rem;
}

.hero-image {
  width: 100%;
  max-width: none;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-soft);
}

.content-image {
  margin: 2rem auto;
}

.content-image img {
  width: 100%;
  max-width: var(--content-width);

  aspect-ratio: 16 / 9;
  object-fit: cover;

  height: auto;
}

.gallery {
  max-width: var(--content-width);
}

/* =========================================================
   iFrame – responsive & robust
   ========================================================= */

.iframe-wrapper {
  position: relative;
  margin: 2rem 0;
  border-radius: var(--radius-m);
  overflow: hidden;
  background: #000;
  box-shadow: var(--shadow-soft);
}

.iframe-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  aspect-ratio: 16 / 9;
  padding: 1rem;

  background:
    linear-gradient(rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.38)),
    var(--surface-soft);
}

.iframe-consent {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;

  width: 100%;
  max-width: 520px;
  padding: 1.25rem;
  text-align: center;

  box-sizing: border-box;
}

.iframe-load-button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  padding: 0.75rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  transition: background-color 0.2s ease, transform 0.2s ease;

  max-width: 100%;
}

.iframe-load-button:hover,
.iframe-load-button:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.iframe-note {
  margin: 0;
  width: 100%;
  max-width: 100%;

  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);

  overflow-wrap: anywhere;   /* 🔥 FIX */
  word-break: break-word;    /* 🔥 FIX */
  hyphens: auto;
}

.iframe-note a,
.iframe-domain-link {
  color: #fff;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;

  overflow-wrap: anywhere;   /* 🔥 FIX */
  word-break: break-word;    /* 🔥 FIX */
}

.iframe-note a:hover,
.iframe-note a:focus-visible,
.iframe-domain-link:hover,
.iframe-domain-link:focus-visible {
  color: #fff;
  text-decoration-thickness: 0.12em;
}

.iframe-wrapper iframe {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 320px;
  border: 0;
}

/* Mobile Optimierung */
@media (max-width: 640px) {
  .iframe-placeholder {
    min-height: 240px;
    padding: 0.85rem;
  }

  .iframe-consent {
    padding: 1rem 0.9rem;
  }

  .iframe-note {
    font-size: 0.88rem;
    line-height: 1.45;
  }

  .iframe-load-button {
    width: 100%;
    justify-content: center;
  }
}

.iframe-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.6);
  z-index: 2;
  transition: opacity 0.3s ease;
}

.iframe-loader.loaded {
  opacity: 0;
}

.iframe-spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: iframe-spin 0.8s linear infinite;
}

@keyframes iframe-spin {
  to {
    transform: rotate(360deg);
  }
}

.button-wrapper {
  max-width: var(--content-width);
  margin: 2rem auto;
}

.content h2 + .button-wrapper,
.content h3 + .button-wrapper {
  margin-top: 1rem;
}

.content-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.82rem 1.3rem;
  border-radius: 999px;
  background: var(--brand-strong);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  box-shadow: var(--shadow-soft);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.content-button:hover,
.content-button:focus-visible {
  background: var(--brand);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(19, 14, 10, 0.12);
}

.content-button:focus-visible {
  outline: 2px solid rgba(141, 31, 45, 0.28);
  outline-offset: 3px;
}

.table-responsive {
  max-width: var(--content-width);
  margin: 2rem auto;
}

.table-responsive-desktop {
  display: block;
}

.table-responsive-mobile {
  display: none;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-m);
}

.table-scroll table {
  width: max-content;
  min-width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.table-scroll thead th {
  background: var(--surface-soft);
  color: var(--brand);
  font-weight: normal;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
}

.table-scroll th {
  font-weight: normal;
}

.table-scroll th,
.table-scroll td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.98rem;
  line-height: 1.55;
  min-width: 10rem;
  max-width: 18rem;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: normal;
}


.table-scroll th:last-child,
.table-scroll td:last-child {
  border-right: 0;
}

.table-scroll tbody tr:last-child td {
  border-bottom: 0;
}

.table-scroll tbody tr:nth-child(even) td {
  background: rgba(245, 240, 230, 0.45);
}

.table-scroll td p:last-child,
.table-scroll th p:last-child {
  margin-bottom: 0;
}

.table-cards {
  display: grid;
  gap: 1rem;
}

.table-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-soft);
  padding: 1rem 1.1rem;
}

.table-card-row + .table-card-row {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.table-card-label {
  margin-bottom: 0.22rem;
  color: var(--brand);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.table-card-value {
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.55;
}

.table-card-value > *:first-child {
  margin-top: 0;
}

.table-card-value > *:last-child {
  margin-bottom: 0;
}

.table-card-value p,
.table-card-value ul,
.table-card-value ol {
  text-align: left;
  hyphens: auto;
}

@media (max-width: 760px) {
  .table-responsive-desktop {
    display: none;
  }

  .table-responsive-mobile {
    display: block;
  }

  .table-responsive {
    margin: 1.5rem auto 1.8rem;
  }

  .table-cards {
    gap: 0.85rem;
  }

  .table-card {
    padding: 0.95rem 1rem;
    border-radius: 16px;
  }

  .table-card-row + .table-card-row {
    margin-top: 0.7rem;
    padding-top: 0.7rem;
  }

  .table-card-label {
    font-size: 0.78rem;
  }

  .table-card-value {
    font-size: 0.95rem;
  }
}

.hint-box {
  max-width: var(--content-width);
  margin: 1.8rem auto;
  padding: 1rem 1.2rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-soft);
}

.hint-box p:last-child {
  margin-bottom: 0;
}

.hint-box em,
.hint-box i {
  font-style: normal;
}

.hint-box ul,
.hint-box ol {
  margin: 0;
  padding-left: 1.2rem;
}

.hint-box li:last-child {
  margin-bottom: 0;
}

.site-footer {
  margin-top: 4rem;
  padding: 1.5rem 1.25rem 2.5rem;
  border-top: 1px solid var(--line);
}

.site-footer-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.site-footer-copy {
  margin: 0;
}

.site-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.site-footer-nav a {
  text-decoration: none;
}

.site-footer-nav a:hover,
.site-footer-nav a:focus-visible {
  text-decoration: underline;
}

.table-scroll {
  position: relative;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-m);
  scrollbar-width: thin;
  scrollbar-color: rgba(141, 31, 45, 0.45) rgba(22, 19, 17, 0.08);
  padding-bottom: 0.35rem;
}

/* Chrome, Edge, Safari */
.table-scroll::-webkit-scrollbar {
  height: 10px;
}

.table-scroll::-webkit-scrollbar-track {
  background: rgba(22, 19, 17, 0.08);
  border-radius: 999px;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: rgba(141, 31, 45, 0.45);
  border-radius: 999px;
}

.table-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(141, 31, 45, 0.65);
}

/* sanfter Hinweis rechts: hier geht es weiter */
.table-scroll::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 42px;
  height: calc(100% - 0.35rem);
  pointer-events: none;
  background: linear-gradient(
    to left,
    rgba(246, 241, 232, 0),
    rgba(246, 241, 232, 0)
  );
  border-top-right-radius: var(--radius-m);
  border-bottom-right-radius: var(--radius-m);
}

.table-responsive {
  position: relative;
  max-width: var(--content-width);
  margin: 2rem auto;
}

.table-responsive::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 42px;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(
    to left,
    rgba(246, 241, 232, 0.95),
    rgba(246, 241, 232, 0)
  );
  border-top-right-radius: var(--radius-m);
  border-bottom-right-radius: var(--radius-m);
}

.header-cart-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
}

.header-cart-link:hover,
.header-cart-link:focus-visible {
  color: var(--brand);
  border-color: var(--line-strong);
  background: var(--surface-strong);
  transform: translateY(-1px);
}

.header-cart-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.header-cart-svg {
  width: 100%;
  height: 100%;
}

.header-cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--brand-strong);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  box-shadow: var(--shadow-soft);
}

.language-switch {
  position: relative;
  flex: 0 0 auto;
}

.language-switch-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition:
    color 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
}

.language-switch-toggle:hover,
.language-switch-toggle:focus-visible,
.language-switch.is-open .language-switch-toggle {
  color: var(--brand);
  border-color: var(--line-strong);
  background: var(--surface-strong);
  transform: translateY(-1px);
}

.language-switch-toggle:focus-visible {
  outline: 2px solid rgba(141, 31, 45, 0.22);
  outline-offset: 3px;
}

.language-switch-toggle::after {
  content: "▼";
  position: absolute;
  right: 5px;
  bottom: 4px;
  font-size: 0.5rem;
  line-height: 1;
  opacity: 0.72;
}

.language-switch-toggle-code {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.language-switch-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 190px;
  padding: 10px;
  display: grid;
  gap: 6px;
  background: var(--surface-strong);
  border: 1px solid rgba(22, 19, 17, 0.08);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-menu);
  z-index: 1200;
}

.language-switch-dropdown[hidden] {
  display: none !important;
}

.language-switch-dropdown-link {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.language-switch-dropdown-link:hover,
.language-switch-dropdown-link:focus-visible {
  background: rgba(141, 31, 45, 0.08);
  color: var(--brand);
}

.language-switch-dropdown-link.is-active {
  background: rgba(141, 31, 45, 0.1);
  color: var(--brand);
  cursor: default;
}

.language-switch-dropdown-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 30px;
  padding: 0 0.5rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.language-switch-dropdown-label {
  font-size: 0.94rem;
  font-weight: 600;
  line-height: 1.2;
}

@media (max-width: 980px) {
  .language-switch {
    order: 3;
  }

  .language-switch-dropdown {
    right: 0;
    left: auto;
    min-width: 180px;
  }
}

.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;
}

.product-box {
  max-width: var(--content-width);
  margin: 2.5rem auto 0;
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-soft);
}

.product-box-header h2 {
  margin-top: 0;
  margin-bottom: 0.9rem;
}

.product-price {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 1rem;
}

.product-meta {
  display: grid;
  gap: 0.7rem;
  margin-bottom: 1.2rem;
}

.product-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}

.product-meta-label {
  color: var(--muted);
}

.product-meta-value {
  text-align: right;
}

.product-meta-row-variant {
  align-items: center;
}

.product-variant-select {
  width: 100%;
  min-width: 220px;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  font: inherit;
  color: var(--text);
}

.cart-item-variant,
.cart-item-variant-delta {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.product-price small {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
  margin-left: 0.4rem;
}

.add-to-cart-button,
.cart-link-button,
.cart-item-remove button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.82rem 1.3rem;
  border-radius: 999px;
  border: 0;
  background: var(--brand-strong);
  color: #fff;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.cart-link-button {
  background: var(--text);
}

.product-note {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.cart-section {
  max-width: var(--content-width);
  margin: 0 auto;
}

.cart-list {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 1.8fr 0.8fr 0.6fr 0.8fr 0.7fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-soft);
}

.cart-item-title {
  font-weight: 700;
  text-decoration: none;
}

.cart-item-sku {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.cart-item-qty input {
  width: 80px;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--line);
}

.cart-summary {
  margin: 1.5rem 0 2rem;
  padding: 1rem 1.2rem;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
}

.cart-summary-row:last-child {
  margin-bottom: 0;
}

.cart-summary-total {
  font-size: 1.08rem;
  color: var(--brand);
}

.order-form-section {
  margin-top: 2rem;
}

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

.form-grid label,
.form-message {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-grid input,
.form-message textarea {
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  font: inherit;
  background: var(--surface);
}

.form-message {
  margin-top: 1rem;
}

.checkbox-row {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin-top: 1rem;
}

.form-actions {
  margin-top: 1.2rem;
}

.cart-empty {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
}

.honeypot {
  position: absolute !important;
  left: -9999px !important;
}

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

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

.cart-toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -40%);
  z-index: 3000;

  min-width: 260px;
  max-width: 420px;

  padding: 1.2rem 1.6rem;
  border-radius: 18px;

  background: var(--brand-strong);
  color: white;

  text-align: center;
  font-size: 1.1rem;
  font-weight: 500;

  box-shadow: 0 10px 30px rgba(0,0,0,0.2);

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.25s ease, transform 0.25s ease;
}

.cart-toast.visible {
  opacity: 1;
  transform: translate(-50%, -50%);
}

/* =========================================================
   404-Seite
   Ergänzung für intelligente Fehlervorschläge
   ========================================================= */

.error-page {
  max-width: var(--content-width);
  margin: 0 auto;
  padding-top: 1rem;
}

.error-page-path-label {
  margin-bottom: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.error-page-path {
  margin-bottom: 1.2rem;
  padding: 0.8rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  color: var(--brand-strong);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.95rem;
  line-height: 1.45;
  word-break: break-word;
  box-shadow: var(--shadow-soft);
}

.error-suggestions {
  max-width: var(--content-width);
  margin: 2.2rem auto 0;
}

.error-suggestions h2 {
  margin-top: 0;
  margin-bottom: 1rem;
}

#error-suggestions {
  display: grid;
  gap: 1rem;
}

#error-redirect-note {
  margin-top: 1.2rem;
  margin-bottom: 0;
  border-left-color: var(--brand-strong);
}

/* Wenn auf der 404-Seite keine Vorschläge vorhanden sind */
.error-page .search-empty {
  margin-top: 0;
}

/* Etwas mehr Luft zwischen Erklärung und Vorschlägen */
.error-page .text-large {
  margin-bottom: 1.4rem;
}

/* =========================================================
   Kleine Feinschliffe für Suche / 404 / Header
   ========================================================= */

/* Suchfeld im Header visuell sauberer und in gleicher Höhe wie der Warenkorb-Link */
.search-form input {
  min-height: 42px;
  padding: 0.55rem 0.95rem;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.search-form input:hover,
.search-form input:focus-visible {
  border-color: var(--line-strong);
  background: var(--surface-strong);
  outline: none;
  box-shadow: 0 14px 30px rgba(19, 14, 10, 0.08);
}

.header-cart-link {
  box-shadow: var(--shadow-soft);
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease;
}

.header-cart-link:hover,
.header-cart-link:focus-visible {
  transform: translateY(-1px);
  background: var(--surface-strong);
}

/* Vorschlagskarten auf 404 und Suche bleiben einheitlich */
.search-result:last-child {
  margin-bottom: 0;
}

/* Externe Button-Links bleiben ruhig, aber klar fokussierbar */
.add-to-cart-button:hover,
.add-to-cart-button:focus-visible,
.cart-link-button:hover,
.cart-link-button:focus-visible,
.cart-item-remove button:hover,
.cart-item-remove button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(0.98);
}

/* Entfernen-Button im Warenkorb optisch etwas weicher */
.cart-item-remove button {
  box-shadow: var(--shadow-soft);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.cart-item-remove button:hover,
.cart-item-remove button:focus-visible {
  box-shadow: 0 14px 30px rgba(19, 14, 10, 0.12);
}

/* =========================================================
   Mobile Anpassungen für 404
   ========================================================= */

@media (max-width: 760px) {
  .error-page-path {
    font-size: 0.9rem;
    padding: 0.75rem 0.9rem;
  }

  .error-suggestions {
    margin-top: 1.8rem;
  }
}

/* =========================================================
   Überblicksseiten / Unterseiten-Teaser
   ========================================================= */

.overview-teasers {
  max-width: var(--content-width);
  margin: 3rem auto 0;
}

.overview-teasers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.overview-teaser-card {
  min-width: 0;
}

.overview-teaser-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

/* Kachel */
.overview-teaser-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--surface-soft);

  border-radius: var(--radius-l);
  transition: transform 0.18s ease;
}

/* Bild */
.overview-teaser-image {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;

  border-radius: inherit;
  transition: transform 0.22s ease;
}

.overview-teaser-image-placeholder {
  width: 100%;
  height: 100%;
  background: var(--surface-soft);
  border-radius: inherit;
}

/* Hover */
.overview-teaser-link:hover .overview-teaser-media,
.overview-teaser-link:focus-visible .overview-teaser-media {
  transform: translateY(-2px);
}

.overview-teaser-link:hover .overview-teaser-image,
.overview-teaser-link:focus-visible .overview-teaser-image {
  transform: scale(1.03);
}

/* Overlay oben */
.overview-teaser-overlay {
  position: absolute;
  inset: 0; /* 🔥 komplett über die Kachel */

  padding: 0.9rem;

  display: flex;
  align-items: flex-start;
  justify-content: flex-start;

  border-radius: inherit;

  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.65) 0%,
    rgba(0, 0, 0, 0.35) 40%,
    rgba(0, 0, 0, 0.15) 70%,
    rgba(0, 0, 0, 0.05) 100%
  );
}

/* 🔥 WICHTIG: überschreibt dein globales .content h2 */
.content h2.overview-teaser-title,
.overview-teaser-title {
  margin: 0;
  color: var(--surface);
  font-size: 1rem;
  line-height: 1.25;

  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* Tablet */
@media (max-width: 980px) {
  .overview-teasers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 640px) {
  .overview-teasers-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .overview-teasers {
    margin-top: 2.4rem;
  }

  .overview-teaser-overlay {
    padding: 0.8rem 0.75rem 0.75rem;
  }

  .content h2.overview-teaser-title,
  .overview-teaser-title {
    font-size: 0.94rem;
  }
  .lightbox {
    padding: 10px;
  }

  .lightbox-close {
    top: 10px;
    right: 12px;
    font-size: 1.8rem;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 44px;
    height: 44px;
    font-size: 1.6rem;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }
}

.page-protection {
  max-width: 420px;
  margin: 80px auto;
  padding: 1.4rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-soft);
}

.page-protection input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 12px;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  font: inherit;
  color: var(--text);
}

.page-protection button {
  margin-top: 12px;
  padding: 0.82rem 1.3rem;
  border-radius: 999px;
  border: 0;
  background: var(--brand-strong);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.page-protection-error {
  margin-top: 12px;
  color: var(--brand-strong);
}