/* =============================
   Design Tokens
   ============================= */
:root {
  /* Colors */
  --color-primary: #1e293b; /* text on light */
  --color-hero-base: #9cab9a; /* hero pastel sage green */
  --color-primary-light: #334155;
  --color-accent-primary: #709932; /* brand */
  --color-accent-secondary: #5a7a28;
  --color-neutral-50: #f8fafc;
  --color-neutral-100: #f1f5f9;
  --color-neutral-200: #e2e8f0;
  --color-neutral-300: #cbd5e1;
  --color-neutral-400: #94a3b8;
  --color-neutral-500: #64748b;
  --color-neutral-600: #475569;
  --color-neutral-700: #334155;
  --color-neutral-800: #1e293b;
  --color-neutral-900: #0f172a;

  --color-success: #709932;
  --color-warning: #f59e0b;
  --color-error: #ef4444;

  /* Typography */
  --font-headline: 'Oswald', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Layout */
  --container-max-width: 1200px;
  --container-padding: var(--space-4);

  /* Motion */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 250ms ease-in-out;
  --transition-slow: 350ms ease-in-out;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

  /* Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
}

/* Dark Mode (only tokens that differ) */
[data-theme="dark"] {
  --color-primary: #f8fafc;
  --color-primary-light: #e2e8f0;
  --color-neutral-50: #0f172a;
  --color-neutral-100: #1e293b;
  --color-neutral-200: #334155;
  --color-neutral-300: #475569;
  --color-neutral-400: #64748b;
  --color-neutral-500: #94a3b8;
  --color-neutral-600: #cbd5e1;
  --color-neutral-700: #e2e8f0;
  --color-neutral-800: #f1f5f9;
  --color-neutral-900: #f8fafc;
}

/* =============================
   Reset & Base
   ============================= */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-primary);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

/* Globale Schrift-Overrides für Konsistenz */
body,
body *:not(i):not(.fa):not(.fas):not(.far):not(.fab):not([class*="icon"]) {
  font-family: var(--font-body) !important;
}

h1, h2, h3, h4, h5, h6,
.elementor-heading-title,
.header__nav-link,
.nav-menu__title,
.breadcrumb__link,
.breadcrumb__current {
  font-family: var(--font-headline) !important;
}

/* Body Text explizit */
p, span, a, li, td, th, label, input, textarea, select, button {
  font-family: var(--font-body) !important;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* Accessibility */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
*:focus-visible { outline: 2px solid var(--color-accent-primary); outline-offset: 2px; }

/* Astra Theme Overrides */
#page, .hfeed.site { display: flex; flex-direction: column; min-height: 100vh; }
#content.site-content { flex: 1; }
.ast-container { max-width: 100%; padding: 0; }
#masthead, header.site-header { display: none !important; }
.site-footer, footer.site-footer, #colophon { display: none !important; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =============================
   Typography
   ============================= */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headline);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--space-4);
}
h1 { font-size: clamp(1.75rem, 4vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }
p { margin-bottom: var(--space-4); }

/* Container */
.container { max-width: var(--container-max-width); margin: 0 auto; padding: 0 var(--container-padding); }

/* =============================
   Breadcrumb Navigation
   ============================= */

/* Standalone Breadcrumb Container (für Elementor-Seiten) - schwebt über Hero */
#breadcrumb-container {
    position: relative;
    z-index: 15;
    background: transparent;
    padding: 0;
    margin-bottom: -48px;
    pointer-events: none;
}

#breadcrumb-container * {
    pointer-events: auto;
}

#breadcrumb-container .breadcrumb {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    background: transparent !important;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    height: 48px !important;
    display: flex;
    align-items: center;
}

#breadcrumb-container .breadcrumb__container {
    padding: 0;
}

#breadcrumb-container .breadcrumb__list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0 !important;
    gap: 0;
    flex-wrap: wrap;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

#breadcrumb-container .breadcrumb__link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.8rem;
    transition: color 0.2s ease;
}

#breadcrumb-container .breadcrumb__link:hover {
    color: #fff;
}

#breadcrumb-container .breadcrumb__icon {
    stroke: rgba(255, 255, 255, 0.8);
    width: 14px;
    height: 14px;
}

#breadcrumb-container .breadcrumb__current {
    color: #fff;
    font-size: 0.8rem;
    font-weight: 500;
}

#breadcrumb-container .breadcrumb__separator {
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0 0.125rem;
}

#breadcrumb-container .breadcrumb__separator svg {
    stroke: rgba(255, 255, 255, 0.5);
    width: 14px;
    height: 14px;
}

/* Hero Breadcrumb (bestehend)
   NUR innerhalb der Hero-Container. Die Regel lag frueher auf `.breadcrumb`
   allein und riss damit JEDE Brotkrume aus dem Textfluss — auch die, die
   andere Plugins mit derselben Klasse im normalen Fluss ausgeben. Ohne
   positionierten Vorfahren verankert sie sich dann am Seitenanfang und steht
   ueber dem Header (aufgetreten in der Marktplatz-Einzelansicht). */
.archive-hero-container .breadcrumb,
.article-hero-container .breadcrumb {
    background: transparent;
    border-bottom: none;
    box-shadow: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 15;
    padding: 0;
    display: flex;
    align-items: center;
    height: 48px;
    overflow: visible;
}

.breadcrumb__container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
    width: 100%;
    display: flex;
    align-items: center;
    height: 100%;
}

.breadcrumb__list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
    flex-wrap: wrap;
}

.breadcrumb__item {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 11;
}

.breadcrumb__link {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: calc(0.5rem - 8px) calc(1rem - 8px);
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    z-index: 12;
    cursor: pointer;
}

.breadcrumb__link:hover {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.6);
    color: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    z-index: 13;
}

.breadcrumb__icon {
    width: 14px;
    height: 14px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

.breadcrumb__separator {
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.4);
    margin: 0 0.125rem;
    position: relative;
    z-index: 0;
    pointer-events: none;
}

.breadcrumb__separator svg {
    width: 14px;
    height: 14px;
}

.breadcrumb__item--active .breadcrumb__current {
    display: inline-flex;
    align-items: center;
    padding: calc(0.5rem - 8px) calc(1.25rem - 8px);
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.8rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .breadcrumb {
        height: auto;
        padding: 0.5rem 0;
    }
    .breadcrumb__list {
        flex-wrap: nowrap;
        overflow: hidden;
    }
    .breadcrumb__link {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
        white-space: nowrap;
    }
    .breadcrumb__link span {
        display: none;
    }
    .breadcrumb__link .breadcrumb__icon {
        width: 12px;
        height: 12px;
    }
    .breadcrumb__separator svg {
        width: 10px;
        height: 10px;
    }
    .breadcrumb__item--active {
        min-width: 0;
        flex: 1;
        overflow: hidden;
    }
    .breadcrumb__item--active .breadcrumb__current {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
        max-width: 100%;
    }
}

/* =============================
   Header
   ============================= */
.header { background: var(--color-neutral-50); border-bottom: 1px solid var(--color-neutral-200); position: relative; z-index: 100; backdrop-filter: blur(10px); }
.header__container { max-width: var(--container-max-width); margin: 0 auto; padding: 0 var(--container-padding); display: flex; align-items: center; justify-content: space-between; height: 4rem; }
.header__brand { flex-shrink: 0; }
.logo { display: flex; align-items: center; color: var(--color-primary); font-weight: 700; transition: color var(--transition-fast); }
.logo img { height: 60px; width: auto; padding-top: 4px; }
/* Inline-Wortmarke: Schrift = currentColor, Signet bleibt im SVG fest #709932.
   Light auf hellem Header -> #4a4a49, Dark auf dunklem Header -> #fff. */
.logo__svg { height: 60px; width: auto; padding-top: 4px; color: #4a4a49; }
[data-theme="dark"] .logo__svg { color: #fff; }
.logo--desktop { display: flex; }
.logo--mobile { display: none; }
.hero__button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-lg);
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  font-size: 1rem;
  min-height: 48px;
  position: relative;
  overflow: hidden;
}

/* Article Actions Button Styles */
.article-actions {
  display: flex;
  gap: var(--space-4);
  margin-top: var(--space-6);
  align-items: center;
}

.article-actions .btn-primary,
.article-actions .btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.625rem 1.25rem;
  border-radius: 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.article-actions .btn-primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, #1e40af 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.article-actions .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
  background: linear-gradient(135deg, #1e40af 0%, var(--color-primary) 100%);
}

.article-actions .btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

.article-actions .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.article-actions .btn-primary svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.article-actions .btn-primary:hover svg {
  transform: scale(1.1);
}

@media (max-width: 768px) {
  .logo--desktop { display: none; }
  .logo--mobile { display: flex; margin-left: 0.5rem; }

  .article-actions {
    flex-direction: column;
    gap: var(--space-2);
  }

  .article-actions .btn-primary,
  .article-actions .btn-ghost {
    justify-content: center;
    padding: 0.75rem 1.5rem;
  }
  flex-wrap: wrap;
}

.article-actions a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 48px;
  position: relative;
  overflow: hidden;
}

/* Primary Button (first link) */
.article-actions a:first-child {
  background: linear-gradient(135deg, var(--color-primary) 0%, #0066cc 100%);
  color: white;
  border: 2px solid transparent;
  box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.article-actions a:first-child:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 102, 204, 0.4);
  background: linear-gradient(135deg, #0066cc 0%, var(--color-primary) 100%);
}

/* Secondary Button (second link) */
.article-actions a:last-child {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.article-actions a:last-child:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Button Icons */
.article-actions a svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.article-actions a:hover svg {
  transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .article-actions {
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
  }
  
  .article-actions a {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

.hero__button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.hero__button:hover::before {
  left: 100%;
}

.hero__button--primary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  backdrop-filter: blur(10px);
  border-color: rgba(255, 255, 255, 0.3);
}

.hero__button--primary:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.hero__button--secondary {
  background: transparent;
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
}

.hero__button--secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.hero__button svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.hero__button:hover svg {
  transform: scale(1.1);
}

/* Responsive button adjustments */
@media (max-width: 768px) {
  .hero__actions {
    flex-direction: column;
    align-items: center;
  }
  
  .hero__button {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

.logo:hover { color: var(--color-accent-primary); }
.header__search { flex: 1; max-width: 400px; margin: 0 var(--space-8); }
.header__search .search-form { position: relative; margin: 0; padding: 0; }
.header__search .search-input,
.header__search input[type="search"] {
  width: 100%;
  padding: 0.875rem var(--space-12) 0.875rem var(--space-4);
  border: 1px solid var(--color-neutral-300);
  border-radius: var(--radius-lg);
  background: var(--color-neutral-50);
  font-size: 0.875rem;
  transition: all var(--transition-fast);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  outline: none;
  box-shadow: none;
  margin: 0;
  height: auto;
  line-height: normal;
}
.header__search .search-input:focus,
.header__search input[type="search"]:focus {
  border-color: var(--color-accent-primary);
  box-shadow: 0 0 0 3px rgb(112 153 50 / 0.15);
  outline: none;
}
.header__search .search-button,
.header__search button[type="submit"] {
  position: absolute;
  right: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-neutral-500);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  transition: color var(--transition-fast);
  background: transparent;
  border: none;
  cursor: pointer;
  margin: 0;
}
.header__search .search-button:hover,
.header__search button[type="submit"]:hover { color: var(--color-accent-primary); }

/* Live Search Dropdown */
.search-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--color-neutral-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 1000;
  max-height: 480px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition-fast);
}

.search-suggestions.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Search Loading State */
.search-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-6);
  color: var(--color-neutral-500);
  font-size: 0.875rem;
}

.search-loading__spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-neutral-200);
  border-top-color: var(--color-accent-primary);
  border-radius: 50%;
  animation: search-spin 0.8s linear infinite;
}

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

/* Search Results (Dropdown der Live-Suche)
   ACHTUNG: muss auf .search-suggestions eingeschraenkt bleiben — WordPress
   vergibt auf der Suchergebnis-Seite die Body-Klasse `search-results`, ein
   ungescoptes `.search-results` wuerde sonst den <body> mit Padding versehen. */
.search-suggestions .search-results {
  padding: var(--space-2);
}

.search-result-item {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: inherit;
  transition: background var(--transition-fast);
}

.search-result-item:hover,
.search-result-item--active {
  background: var(--color-neutral-100);
}

.search-result-item__image {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-neutral-100);
}

.search-result-item__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-result-item__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-neutral-400);
}

.search-result-item__placeholder svg {
  width: 24px;
  height: 24px;
}

.search-result-item__content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.search-result-item__type {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-accent-primary);
}

.search-result-item__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-item__excerpt {
  font-size: 0.8125rem;
  color: var(--color-neutral-500);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Search Highlight */
.search-highlight {
  background: rgba(112, 153, 50, 0.2);
  color: var(--color-accent-secondary);
  padding: 0 2px;
  border-radius: 2px;
}

/* View All Results Link */
.search-results__view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-2);
  margin-top: 0;
  background: var(--color-neutral-100);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-accent-primary);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.search-results__view-all:hover,
.search-results__view-all--active {
  background: var(--color-accent-primary);
  color: #fff;
}

.search-results__view-all svg {
  width: 16px;
  height: 16px;
}

.search-results__view-all svg:last-child {
  margin-left: auto;
}

/* No Results State */
.search-no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-8) var(--space-4);
  text-align: center;
  color: var(--color-neutral-500);
}

.search-no-results svg {
  width: 40px;
  height: 40px;
  color: var(--color-neutral-400);
  margin-bottom: var(--space-2);
}

.search-no-results span {
  font-size: 0.9375rem;
}

.search-no-results strong {
  color: var(--color-primary);
}

.search-no-results small {
  font-size: 0.8125rem;
  color: var(--color-neutral-400);
}

/* Search Error State */
.search-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-4);
  text-align: center;
  color: var(--color-error);
}

.search-error svg {
  width: 32px;
  height: 32px;
}

/* Dark Mode Search */
[data-theme="dark"] .search-suggestions {
  background: var(--color-neutral-100);
  border-color: var(--color-neutral-300);
}

[data-theme="dark"] .search-result-item:hover,
[data-theme="dark"] .search-result-item--active {
  background: var(--color-neutral-200);
}

[data-theme="dark"] .search-result-item__image {
  background: var(--color-neutral-200);
}

[data-theme="dark"] .search-results__view-all {
  background: var(--color-neutral-200);
}

[data-theme="dark"] .search-highlight {
  background: rgba(112, 153, 50, 0.3);
}

.header__actions { display: flex; align-items: center; gap: var(--space-4); }
.zoom-controls { display: flex; align-items: center; gap: 2px; }
.zoom-btn { padding: var(--space-2); border-radius: var(--radius-md); color: var(--color-neutral-600); transition: all var(--transition-fast); }
.zoom-btn:hover { color: var(--color-accent-primary); background: var(--color-neutral-100); }
.zoom-btn.zoom-btn--active { color: var(--color-accent-primary); }
.theme-toggle { padding: var(--space-2); border-radius: var(--radius-md); color: var(--color-neutral-600); transition: all var(--transition-fast); }
.theme-toggle:hover { color: var(--color-accent-primary); background: var(--color-neutral-100); }
.theme-icon--dark { display: none; }
[data-theme="dark"] .theme-icon--light { display: none; }
[data-theme="dark"] .theme-icon--dark { display: block; }
.language-select { padding: var(--space-2) var(--space-3); border: 1px solid var(--color-neutral-300); border-radius: var(--radius-md); background: var(--color-neutral-50); font-size: 0.875rem; font-weight: 500; }
.hvt-logo-link { display: flex; align-items: center; }
.hvt-logo { height: 60px; width: auto; transition: opacity var(--transition-fast); }
.hvt-logo-link:hover .hvt-logo { opacity: 0.8; }
.menu-toggle { display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px; padding: var(--space-2); border-radius: var(--radius-md); width: 44px; height: 44px; cursor: pointer; }
.menu-toggle__line { width: 22px; height: 2px; background: var(--color-primary); border-radius: 2px; transition: transform var(--transition-fast), opacity var(--transition-fast); }

/* Dark Mode: Hintergrund liegt auf dem aeusseren <main class="main">, NICHT auf
   dem inneren .portal-container. Sonst malt der opake Container-Gradient (durch
   den -160px-Pull der .archive-content-section) ueber den Hero und es bleibt ein
   heller .main-Bereich vor dem Footer stehen. .portal-container bleibt im
   Darkmode transparent — analog zu den Elementor-Seiten unter #main-content. */
[data-theme="dark"] .portal-container { background: transparent; }

[data-theme="dark"] .main {
  background:
    radial-gradient(ellipse 800px 600px at 20% 80%, rgb(112 153 50 / 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 600px 800px at 80% 20%, rgb(112 153 50 / 0.06) 0%, transparent 50%),
    radial-gradient(circle 400px at 60% 60%, rgb(255 255 255 / 0.02) 0%, transparent 70%),
    conic-gradient(from 45deg at 30% 70%, transparent 0deg, rgb(112 153 50 / 0.02) 90deg, transparent 180deg),
    linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #334155 50%, #1e293b 75%, #0f172a 100%);
}

[data-theme="dark"] .main:not(.marktplatz-archive)::before {
  background:
    linear-gradient(45deg, transparent 48%, rgb(112 153 50 / 0.02) 49%, rgb(112 153 50 / 0.04) 50%, rgb(112 153 50 / 0.02) 51%, transparent 52%),
    linear-gradient(-45deg, transparent 48%, rgb(112 153 50 / 0.015) 49%, rgb(112 153 50 / 0.025) 50%, rgb(112 153 50 / 0.015) 51%, transparent 52%),
    radial-gradient(circle at 25% 25%, rgb(112 153 50 / 0.01) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgb(112 153 50 / 0.01) 0%, transparent 50%);
  opacity: 0.4;
}

[data-theme="dark"] .main:not(.marktplatz-archive)::after {
  background:
    linear-gradient(90deg, transparent 0%, rgb(112 153 50 / 0.005) 50%, transparent 100%),
    linear-gradient(0deg, transparent 0%, rgb(0 0 0 / 0.2) 50%, transparent 100%);
  opacity: 0.6;
}

/* =============================
   Navigation
   ============================= */
.nav { background: var(--color-neutral-100); border-bottom: 1px solid var(--color-neutral-200); position: sticky; top: 0; z-index: 99; }
.nav__container { max-width: var(--container-max-width); margin: 0 auto; padding: 0 var(--container-padding); }
.nav__list { display: flex; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav__item { position: relative; list-style: none; margin: 0; padding: 0; }
.nav__dropdown-section ul { display: flex; flex-direction: column; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.nav__dropdown-section li { list-style: none; margin: 0; padding: 0; }
.nav__link { display: block; padding: var(--space-4) var(--space-5); font-weight: 500; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-neutral-700); transition: all var(--transition-fast); border-bottom: 2px solid transparent; }
.nav__link:hover, .nav__link:focus { color: var(--color-accent-primary); border-bottom-color: var(--color-accent-primary); }
.nav__link--active { color: var(--color-accent-primary); border-bottom-color: var(--color-accent-primary); font-weight: 700; }
.nav__dropdown { position: absolute; top: 100%; left: 0; background: var(--color-neutral-50); border: 1px solid var(--color-neutral-200); border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); min-width: 250px; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all var(--transition-normal); z-index: 50; }
.nav__item:hover .nav__dropdown, .nav__item:focus-within .nav__dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav__dropdown-content { padding: var(--space-6); display: flex; gap: 3rem; }
.nav__dropdown-section { flex: 0 0 280px; min-width: 280px; }
.nav__dropdown-section + .nav__dropdown-section { border-left: 1px solid var(--color-neutral-200); padding-left: 3rem; }
.nav__dropdown-section h3 { font-size: 0.875rem; font-weight: 600; color: var(--color-neutral-500); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--space-3); }
.nav__dropdown-section ul { display: flex; flex-direction: column; gap: var(--space-2); list-style: none; margin: 0; padding: 0; }
.nav__dropdown-section li { margin: 0; padding: 0; }
.nav__dropdown-section a { padding: var(--space-2) 0; color: var(--color-neutral-700); transition: color var(--transition-fast); }
.nav__dropdown-section a:hover { color: var(--color-accent-primary); }
.nav__dropdown-section a.is-active { color: var(--color-accent-primary); font-weight: 600; }
.nav__item:nth-last-child(-n+2) .nav__dropdown { right: 0; left: auto; }

/* Nav link row (desktop: transparent wrapper) */
.nav__link-row { display: contents; }
.nav__toggle { display: none; }

/* Mobile-only elements (hidden on desktop) */
.nav__mobile-header { display: none; }
.nav__mobile-search { display: none; }
.nav__mobile-controls { display: none; }
.nav__backdrop { display: none; }

/* Body scroll lock */
body.nav-open { overflow: hidden; }

/* =============================
   News Ticker
   ============================= */
/* --ticker-speed = Pixel pro Sekunde. Die Laufzeit rechnet main.js aus der
   tatsächlich gemessenen Bandbreite (Breite / Tempo) und schreibt sie nach
   --ticker-duration — so bleibt das Tempo gleich, egal wie viele Meldungen
   anstehen. Der Startwert unten greift, solange JS noch nicht gelaufen ist. */
.news-ticker { background: var(--color-primary); color: var(--color-neutral-50); overflow: hidden; position: relative; --ticker-speed: 80; --ticker-duration: 90s; }
.news-ticker__container { max-width: var(--container-max-width); margin: 0 auto; padding: 0 var(--container-padding); display: flex; align-items: center; height: 3rem; }
.news-ticker__label { background: var(--color-error); color: #fff; padding: var(--space-1) var(--space-3); border-radius: var(--radius-md); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; flex-shrink: 0; margin-right: var(--space-4); }
.news-ticker__content { flex: 1; overflow: hidden; }
/* width: max-content ist Pflicht: als Flex-Kind würde das Band auf die
   Container-Breite schrumpfen, und translateX(-50%) bezieht sich immer auf die
   eigene Breite — das Band sprang deshalb mitten in einer Meldung zurück. */
.news-ticker__items { display: flex; flex: none; width: max-content; animation: ticker var(--ticker-duration) linear infinite; }
.news-ticker__items:hover { animation-play-state: paused; }
.news-ticker__group { display: flex; }
.news-ticker__item { display: flex; align-items: center; gap: var(--space-3); white-space: nowrap; margin-right: var(--space-12); font-size: 0.875rem; }
.news-ticker__time { color: var(--color-accent-primary); font-weight: 600; font-variant-numeric: tabular-nums; }
.news-ticker__category { background: var(--color-neutral-700); color: var(--color-neutral-200); padding: var(--space-1) var(--space-2); border-radius: var(--radius-sm); font-size: 0.75rem; font-weight: 500; text-transform: uppercase; }
.news-ticker__pause { color: var(--color-neutral-300); padding: var(--space-2); border-radius: var(--radius-md); margin-left: var(--space-4); transition: color var(--transition-fast); }
.news-ticker__pause:hover { color: var(--color-neutral-50); }
.news-ticker__link { color: inherit; text-decoration: none; transition: color var(--transition-fast); }
.news-ticker__link:hover { color: var(--color-accent-primary); text-decoration: underline; text-underline-offset: 2px; }
/* -50% = exakt eine der beiden identischen Gruppen — der Sprung an dieser
   Stelle ist unsichtbar, weil dort wieder dieselbe Meldung steht. */
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* News Ticker - Mobile */
@media (max-width: 768px) {
    .news-ticker__label-text { display: none; }
    .news-ticker__label { padding: var(--space-1) var(--space-2); margin-right: var(--space-2); }
    .news-ticker { --ticker-speed: 60; --ticker-duration: 120s; }
    .news-ticker__item { margin-right: var(--space-6); font-size: 0.8125rem; gap: var(--space-2); }
    .news-ticker__category { display: none; }
    .news-ticker__pause { margin-left: var(--space-2); }
}

/* =============================
   Hero & News Layout
   ============================= */
.main {
  min-height: calc(100vh - 200px);
  padding-bottom: var(--space-16);
  position: relative;
  background:
    radial-gradient(ellipse 800px 600px at 20% 80%, rgb(112 153 50 / 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 600px 800px at 80% 20%, rgb(112 153 50 / 0.06) 0%, transparent 50%),
    radial-gradient(circle 400px at 60% 60%, rgb(255 255 255 / 0.4) 0%, transparent 70%),
    conic-gradient(from 45deg at 30% 70%, transparent 0deg, rgb(112 153 50 / 0.02) 90deg, transparent 180deg),
    linear-gradient(135deg, #f8fafc 0%, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%, #f8fafc 100%);
}

.main:not(.marktplatz-archive)::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(45deg, transparent 48%, rgb(112 153 50 / 0.04) 49%, rgb(112 153 50 / 0.06) 50%, rgb(112 153 50 / 0.04) 51%, transparent 52%),
    linear-gradient(-45deg, transparent 48%, rgb(112 153 50 / 0.03) 49%, rgb(112 153 50 / 0.05) 50%, rgb(112 153 50 / 0.03) 51%, transparent 52%),
    radial-gradient(circle at 25% 25%, rgb(112 153 50 / 0.02) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgb(112 153 50 / 0.02) 0%, transparent 50%);
  background-size: 80px 80px, 120px 120px, 200px 200px, 200px 200px;
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

.main:not(.marktplatz-archive)::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0%, rgb(112 153 50 / 0.01) 50%, transparent 100%),
    linear-gradient(0deg, transparent 0%, rgb(255 255 255 / 0.3) 50%, transparent 100%);
  pointer-events: none;
  opacity: 0.8;
  z-index: 0;
}

/* Main Content - Kachelhintergrund für Elementor-Seiten */
/* Elementor Typography Override - einheitliche Schriften */
#main-content,
#main-content .elementor-widget-container,
#main-content .elementor-element {
  font-family: var(--font-body);
}

#main-content h1,
#main-content h2,
#main-content h3,
#main-content h4,
#main-content h5,
#main-content h6,
#main-content .elementor-heading-title,
#main-content .elementor-widget-heading .elementor-heading-title {
  font-family: var(--font-headline) !important;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

#main-content p,
#main-content .elementor-widget-text-editor,
#main-content .elementor-text-editor {
  font-family: var(--font-body);
  line-height: 1.6;
}

#main-content a {
  text-decoration: none;
  transition: color 0.2s ease;
}

#main-content a:hover {
}

#main-content {
  min-height: calc(100vh - 200px);
  position: relative;
  background:
    radial-gradient(ellipse 800px 600px at 20% 80%, rgb(112 153 50 / 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 600px 800px at 80% 20%, rgb(112 153 50 / 0.06) 0%, transparent 50%),
    radial-gradient(circle 400px at 60% 60%, rgb(255 255 255 / 0.4) 0%, transparent 70%),
    conic-gradient(from 45deg at 30% 70%, transparent 0deg, rgb(112 153 50 / 0.02) 90deg, transparent 180deg),
    linear-gradient(135deg, #f8fafc 0%, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%, #f8fafc 100%);
  overflow: hidden;
}

#main-content::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(45deg, transparent 48%, rgb(112 153 50 / 0.04) 49%, rgb(112 153 50 / 0.06) 50%, rgb(112 153 50 / 0.04) 51%, transparent 52%),
    linear-gradient(-45deg, transparent 48%, rgb(112 153 50 / 0.03) 49%, rgb(112 153 50 / 0.05) 50%, rgb(112 153 50 / 0.03) 51%, transparent 52%),
    radial-gradient(circle at 25% 25%, rgb(112 153 50 / 0.02) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgb(112 153 50 / 0.02) 0%, transparent 50%);
  background-size: 80px 80px, 120px 120px, 200px 200px, 200px 200px;
  opacity: 0.6;
  pointer-events: none;
  z-index: 0;
}

#main-content::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 0%, rgb(112 153 50 / 0.01) 50%, transparent 100%),
    linear-gradient(0deg, transparent 0%, rgb(255 255 255 / 0.3) 50%, transparent 100%);
  pointer-events: none;
  opacity: 0.8;
  z-index: 0;
}

#main-content > * {
  position: relative;
  z-index: 1;
}

/* Dark Mode Main Content */
[data-theme="dark"] #main-content {
  background:
    radial-gradient(ellipse 800px 600px at 20% 80%, rgb(112 153 50 / 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 600px 800px at 80% 20%, rgb(112 153 50 / 0.06) 0%, transparent 50%),
    radial-gradient(circle 400px at 60% 60%, rgb(255 255 255 / 0.02) 0%, transparent 70%),
    conic-gradient(from 45deg at 30% 70%, transparent 0deg, rgb(112 153 50 / 0.02) 90deg, transparent 180deg),
    linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #334155 50%, #1e293b 75%, #0f172a 100%);
}

[data-theme="dark"] #main-content::before {
  background:
    linear-gradient(45deg, transparent 48%, rgb(112 153 50 / 0.02) 49%, rgb(112 153 50 / 0.04) 50%, rgb(112 153 50 / 0.02) 51%, transparent 52%),
    linear-gradient(-45deg, transparent 48%, rgb(112 153 50 / 0.015) 49%, rgb(112 153 50 / 0.025) 50%, rgb(112 153 50 / 0.015) 51%, transparent 52%),
    radial-gradient(circle at 25% 25%, rgb(112 153 50 / 0.01) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgb(112 153 50 / 0.01) 0%, transparent 50%);
  opacity: 0.4;
}

[data-theme="dark"] #main-content::after {
  background:
    linear-gradient(90deg, transparent 0%, rgb(112 153 50 / 0.02) 50%, transparent 100%),
    linear-gradient(0deg, transparent 0%, rgb(0 0 0 / 0.2) 50%, transparent 100%);
  opacity: 0.6;
}

.hero-container { position: relative; height: 600px; width: 100%; color: #fff; overflow-x: hidden; }
.news-layout { position: relative; width: 100%; height: 600px; display: flex; align-items: stretch; justify-content: center; gap: 0; margin-top: 0; }

/* Left (Previous) */
.article-prev { position: relative; flex: 0 0 calc((100% - 1200px) / 2); min-width: 350px; cursor: pointer; overflow: visible; transition: flex 0.6s cubic-bezier(0.4,0,0.2,1); }
.article-prev:hover { flex: 0 0 calc((100% - 1200px) / 2 + 200px); z-index: 20; }
.article-prev-image-wrapper { position: relative; width: 100%; height: 100%; overflow: hidden; transition: all 0.6s cubic-bezier(0.4,0,0.2,1); }
.article-prev:hover .article-prev-image-wrapper { width: calc(100% + 200px); box-shadow: 20px 0 60px rgba(0,0,0,0.8); }
.article-prev .expand-indicator { position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-size: 2rem; color: rgba(34, 197, 94, 0.5); z-index: 15; transition: all 0.6s cubic-bezier(0.4,0,0.2,1); opacity: 0.7; pointer-events: none; }
.article-prev:hover .expand-indicator { opacity: 1; color: var(--color-accent-primary); transform: translateY(-50%) translateX(200px) scale(1.3); }
.article-prev .article-image { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%) brightness(0.7); transition: all 0.6s cubic-bezier(0.4,0,0.2,1); }
.article-prev:hover .article-image { filter: grayscale(0%) brightness(1); }
.article-prev::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 30%, rgba(0,0,0,0.5) 60%, rgba(0,0,0,0.2) 90%, transparent 100%); transition: all 0.6s ease; pointer-events: none; }
.article-prev:hover::after { background: linear-gradient(90deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 30%, rgba(0,0,0,0.1) 60%, transparent 90%); }

/* Center (Main) */
.article-main-wrapper { position: relative; flex: 0 0 1200px; max-width: 1200px; height: 100%; z-index: 10; }
.article-main { position: relative; height: 100%; overflow: hidden; box-shadow: 0 0 120px rgba(0,0,0,0.9); }
.article-main .article-image { width: 100%; height: 100%; object-fit: cover; }
.article-main::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #1e293b 0%, rgba(30,41,59,0.85) 30%, rgba(30,41,59,0.4) 60%, transparent 100%); z-index: 1; }

/* Right (Special) */
.article-special { position: relative; flex: 0 0 calc((100% - 1200px) / 2); min-width: 350px; cursor: pointer; overflow: visible; transition: flex 0.6s cubic-bezier(0.4,0,0.2,1); }
.article-special:hover { flex: 0 0 calc((100% - 1200px) / 2 + 200px); z-index: 20; }
.article-special-image-wrapper { position: relative; width: 100%; height: 100%; overflow: hidden; transition: all 0.6s cubic-bezier(0.4,0,0.2,1); }
.article-special:hover .article-special-image-wrapper { position: absolute; width: calc(100% + 200px); right: 0; box-shadow: -20px 0 60px rgba(0,0,0,0.8); }
.article-special .expand-indicator { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); font-size: 2rem; color: rgba(245,158,11,0.5); z-index: 15; transition: all 0.6s ease; opacity: 0.7; pointer-events: none; }
.article-special:hover .expand-indicator { opacity: 1; color: var(--color-warning); transform: translateY(-50%) translateX(-200px) scale(1.3); }
.article-special .article-image { width: 100%; height: 100%; object-fit: cover; filter: grayscale(70%) brightness(0.6); transition: all 0.6s cubic-bezier(0.4,0,0.2,1); }
.article-special:hover .article-image { filter: grayscale(10%) brightness(0.95); }
.article-special::after { content: ''; position: absolute; inset: 0; background: linear-gradient(270deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.7) 30%, rgba(0,0,0,0.5) 60%, rgba(0,0,0,0.2) 90%, transparent 100%); transition: all 0.6s ease; pointer-events: none; }
.article-special:hover::after { background: linear-gradient(270deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 30%, rgba(0,0,0,0.1) 60%, transparent 90%); }

/* Card Content (sides) */
.article-prev .article-content { position: absolute; bottom: 2.5rem; right: 20px; width: 280px; z-index: 10; opacity: 0.9; transition: opacity 0.6s ease; }
.article-prev:hover .article-content { opacity: 1; }
.prev-indicator { display: inline-block; padding: 0.25rem 0.7rem; background: rgb(112 153 50 / 0.8); border: 1px solid rgb(112 153 50 / 0.9); border-radius: 50px; font-size: 0.6rem; font-weight: 700; letter-spacing: 1px; margin-bottom: 0.8rem; color: #fff; transition: all 0.6s ease; }
.article-prev:hover .prev-indicator { background: rgb(112 153 50 / 0.9); border-color: var(--color-accent-secondary); }
.article-prev .article-title { font-size: 1.5rem; font-weight: 800; line-height: 1.2; margin-bottom: 0.4rem; text-shadow: 2px 2px 10px rgba(0,0,0,0.9); }
.article-prev .article-meta { font-size: 0.75rem; color: rgba(255,255,255,0.7); text-shadow: 1px 1px 5px rgba(0,0,0,0.9); }
.article-prev:hover .article-meta { color: rgba(255,255,255,0.9); }

/* Main article content area */
.article-main .article-content { position: absolute; top: 2.5rem; bottom: 2.5rem; left: 3rem; right: 3rem; z-index: 10; display: flex; flex-direction: column; justify-content: space-between; }
.article-header { flex: 1; }
.article-header-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: 1.2rem; }
.article-tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tag { padding: 0.35rem 0.8rem; background: rgb(255 255 255 / 0.1); backdrop-filter: blur(20px); border: 1px solid rgb(255 255 255 / 0.2); border-radius: 50px; font-size: 0.65rem; font-weight: 600; letter-spacing: 0.5px; transition: all 0.3s ease; display: inline-flex; align-items: center; gap: 0.35rem; }
.tag:hover { background: rgb(255 255 255 / 0.15); transform: translateY(-2px); }
.tag-icon { width: 11px; height: 11px; }
.tag-breaking { background: rgb(239 68 68 / 0.2); border-color: rgb(239 68 68 / 0.4); color: #ff6b6b; }
.tag-category { background: rgb(112 153 50 / 0.2); border-color: rgb(112 153 50 / 0.4); color: #fff; }
.tag-location { background: rgb(59 130 246 / 0.2); border-color: rgb(59 130 246 / 0.4); color: #93bbf5; }
.hero-archive-link { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: rgb(255 255 255 / 0.1); backdrop-filter: blur(20px); border: 1px solid rgb(255 255 255 / 0.2); border-radius: 50px; font-size: 0.75rem; font-weight: 600; color: #fff; text-decoration: none; transition: all 0.3s ease; white-space: nowrap; }
.hero-archive-link:hover { background: rgb(255 255 255 / 0.25); border-color: rgb(255 255 255 / 0.4); }
.hero-archive-link svg { transition: transform 0.3s ease; }
.hero-archive-link:hover svg { transform: translateX(2px); }
.article-main .article-title { font-size: clamp(2.3rem, 4vw, 3.5rem); font-weight: 900; line-height: 1.05; letter-spacing: -2px; margin-bottom: 0.9rem; text-shadow: 2px 2px 30px rgba(0,0,0,0.9); max-width: 55%; }
.article-main .article-excerpt { font-size: 1.08rem; line-height: 1.6; color: rgb(255 255 255 / 0.85); max-width: 50%; margin-bottom: 1.6rem; }
.article-actions { display: flex; gap: 0.9rem; align-items: center; }

/* Right card content */
.article-special .article-content { position: absolute; bottom: 2.5rem; left: 2rem; right: auto; max-width: 280px; z-index: 10; text-align: left; opacity: 0.9; transition: opacity 0.6s, left 0.6s cubic-bezier(0.4,0,0.2,1); }
.article-special:hover .article-content { opacity: 1; left: 2.5rem; }
.special-badge { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.9rem; background: linear-gradient(135deg, rgb(245 158 11 / 0.8), rgb(245 158 11 / 0.7)); border: 1px solid rgb(245 158 11 / 0.9); border-radius: 50px; font-size: 0.6rem; font-weight: 700; letter-spacing: 1px; margin-bottom: 0.8rem; color: #fff; transition: all 0.6s ease; }
.article-special:hover .special-badge { background: linear-gradient(135deg, rgb(245 158 11 / 0.9), rgb(245 158 11 / 0.8)); border-color: var(--color-warning); }
.special-badge .badge-icon { width: 13px; height: 13px; }
.article-special .article-category { font-size: 0.65rem; font-weight: 700; letter-spacing: 2px; color: rgb(255 255 255 / 0.6); margin-bottom: 0.4rem; text-shadow: 1px 1px 5px rgba(0,0,0,0.9); }
.article-special:hover .article-category { color: rgb(255 255 255 / 0.9); }
.article-special .article-title { font-size: 1.65rem; font-weight: 800; line-height: 1.1; margin-bottom: 0.4rem; text-shadow: 2px 2px 10px rgba(0,0,0,0.9); }
.article-special .article-price { font-size: 1.4rem; font-weight: 700; color: #fbbf24; margin-bottom: 0.25rem; text-shadow: 2px 2px 10px rgba(0,0,0,0.9); }
.article-special:hover .article-price { font-size: 1.6rem; color: var(--color-warning); }
.article-special .article-meta { font-size: 0.7rem; color: rgb(255 255 255 / 0.7); text-shadow: 1px 1px 5px rgba(0,0,0,0.9); }
.article-special:hover .article-meta { color: rgb(255 255 255 / 0.9); }

/* Article footer (time & share) */
.article-footer { display: flex; justify-content: space-between; align-items: center; }
.article-time { font-size: 0.8rem; color: rgb(255 255 255 / 0.6); }

/* Hero Share Button */
.hero-share { position: relative; }
.hero-share__toggle { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; background: rgb(255 255 255 / 0.1); backdrop-filter: blur(20px); border: 1px solid rgb(255 255 255 / 0.2); border-radius: 50px; color: #fff; font-size: 0.8rem; font-weight: 600; cursor: pointer; transition: all 0.25s ease; }
.hero-share__toggle:hover { background: rgb(255 255 255 / 0.25); border-color: rgb(255 255 255 / 0.4); }
.hero-share__menu { position: absolute; bottom: calc(100% + 0.5rem); right: 0; display: flex; gap: 0.4rem; padding: 0.4rem; background: rgb(0 0 0 / 0.7); backdrop-filter: blur(20px); border: 1px solid rgb(255 255 255 / 0.15); border-radius: var(--radius-lg); animation: shareIn 0.2s ease; }
.hero-share__menu[hidden] { display: none; }
.hero-share__item { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: var(--radius-md); color: #fff; background: transparent; border: none; cursor: pointer; transition: all 0.2s ease; text-decoration: none; }
.hero-share__item:hover { background: rgb(255 255 255 / 0.15); color: var(--color-accent-primary); transform: scale(1.1); }
@keyframes shareIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* =============================
   Hero Fullwidth (Demostart)
   ============================= */
.hero-container--fullwidth { height: calc(100svh - var(--header-total-height, 10rem)); min-height: 400px; }
.hero-container--fullwidth .news-layout { height: 100%; }
.hero-container--fullwidth .article-main-wrapper { flex: 1 1 100%; max-width: 100%; }
.hero-container--fullwidth .article-main { box-shadow: none; }
.hero-container--fullwidth .article-main .article-content { left: calc((100% - 1200px) / 2); right: calc((100% - 1200px) / 2); padding-left: 16px; padding-right: 16px; }
.hero-container--fullwidth .article-header { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-bottom: 20%; }

/* Scroll-Indikator Pfeil */
.hero-scroll-indicator { position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%); z-index: 20; display: flex; flex-direction: column; align-items: center; gap: 0.75rem; color: #fff; text-decoration: none; transition: all 0.3s ease; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5)); }
.hero-scroll-indicator:hover { transform: translateX(-50%) scale(1.1); }
.hero-scroll-indicator__text { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6); }
.hero-scroll-indicator__arrow { width: 40px; height: 40px; animation: scrollBounce 1.8s ease-in-out infinite; }
.hero-scroll-indicator__ring { width: 56px; height: 56px; border: 2px solid rgba(255, 255, 255, 0.4); border-radius: 50%; display: flex; align-items: center; justify-content: center; animation: scrollPulse 1.8s ease-in-out infinite; backdrop-filter: blur(4px); background: rgba(255, 255, 255, 0.08); }
.hero-scroll-indicator:hover .hero-scroll-indicator__ring { border-color: rgba(255, 255, 255, 0.8); background: rgba(255, 255, 255, 0.15); }
@keyframes scrollBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@keyframes scrollPulse { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.08); opacity: 1; } }

/* =============================
   Generic Buttons (unified)
   ============================= */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: var(--space-3) var(--space-6); border-radius: var(--radius-lg); font-size: 0.875rem; font-weight: 600; text-decoration: none; transition: all var(--transition-fast); cursor: pointer; border: 1px solid transparent; min-height: 44px; }
.btn--primary { background: var(--color-accent-primary); color: #fff; border-color: var(--color-accent-primary); }
.btn--primary:hover { background: var(--color-accent-secondary); border-color: var(--color-accent-secondary); transform: translateY(-1px); }
.btn--secondary { background: transparent; color: var(--color-accent-primary); border-color: var(--color-accent-primary); }
.btn--secondary:hover { background: var(--color-accent-primary); color: #fff; }
.btn--ghost { background: rgb(255 255 255 / 0.1); backdrop-filter: blur(10px); color: #fff; border: 1px solid rgb(255 255 255 / 0.2); }
.btn--ghost:hover { background: rgb(255 255 255 / 0.15); transform: translateY(-2px); }
.btn--small { padding: var(--space-2) var(--space-4); font-size: 0.75rem; min-height: 36px; }

/* =============================
   Portal / Dashboard Area
   ============================= */
.portal-container {
  margin: 0;
  background: transparent;
  position: relative;
}
.portal-wrapper { max-width: var(--container-max-width); margin: 0 auto; padding: 0 var(--container-padding); padding-bottom: var(--space-24); }
.portal-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-10);
  align-items: start;
  padding-top: var(--space-8);
}

/* Ansichten ohne Sidebar (z. B. Siegerlisten gehobene Rennen):
   Content nutzt die volle Breite */
.portal-grid--no-sidebar {
  grid-template-columns: 1fr;
}

/* Section header (single source of truth) */
.section-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
}
.section-header .section-icon {
    width: 70px;
    height: 70px;
    padding: 18px;
    background: linear-gradient(135deg, var(--color-accent-secondary), var(--color-accent-primary));
    color: white;
    border-radius: 20px;
    flex-shrink: 0;
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.3);
}
.section-header h2.guide-section-title {
    font-size: 1.9rem;
    font-weight: 800;
    color: var(--color-primary);
    line-height: 1.2;
    margin: 0;
}
.view-all { color: var(--color-accent-secondary); font-weight: 600; font-size: 0.9rem; transition: color var(--transition-fast); }
.view-all:hover { color: var(--color-accent-primary); }

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Latest Articles Section Header Override */

/* Sidebar Section Headers - ensure consistent color */
.sidebar-card .section-header h2 { color: var(--color-primary); }

/* =============================
   Modern Articles
   ============================= */
.articles-modern-grid { display: grid; grid-template-columns: 2fr 1fr; gap: var(--space-8); margin-bottom: var(--space-8); }

/* Featured */
.article-featured { position: relative; border-radius: var(--radius-xl); overflow: hidden; background: linear-gradient(145deg, #ffffff 0%, #fafbfc 100%); box-shadow: 0 4px 20px rgb(0 0 0 / 0.08); transition: all var(--transition-normal); }
.article-featured:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgb(0 0 0 / 0.15); }
.article-featured-image { width: 100%; height: 300px; object-fit: cover; transition: transform var(--transition-slow); }
.article-featured:hover .article-featured-image { transform: scale(1.05); }
.article-featured-content { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,0.8)); color: #fff; padding: var(--space-8); }
.article-featured-badge { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-4); background: linear-gradient(135deg, #ef4444, #dc2626); border-radius: var(--radius-lg); font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--space-4); box-shadow: 0 4px 12px rgb(239 68 68 / 0.4); }
.article-featured-title { font-size: 1.75rem; font-weight: 700; line-height: 1.2; margin-bottom: var(--space-3); text-shadow: 0 2px 8px rgb(0 0 0 / 0.5); }
.article-featured-excerpt { font-size: 1rem; line-height: 1.5; color: rgb(255 255 255 / 0.9); margin-bottom: var(--space-4); text-shadow: 0 1px 4px rgb(0 0 0 / 0.5); }
.article-featured-meta { display: flex; align-items: center; justify-content: space-between; }
.article-author { display: flex; align-items: center; gap: var(--space-3); }
.article-author-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, #5a7a28, #709932); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; color: #fff; }
.article-author-info { display: flex; flex-direction: column; }
.article-author-name { font-weight: 600; font-size: 0.875rem; }
.article-author-time { font-size: 0.75rem; color: rgb(255 255 255 / 0.7); }
.article-stat { display: inline-flex; align-items: center; gap: var(--space-1); font-size: 0.75rem; color: rgb(255 255 255 / 0.8); }

/* Regular list */
.articles-regular { display: flex; flex-direction: column; gap: var(--space-4); }
.article-modern { display: flex; gap: var(--space-4); background: linear-gradient(145deg, #ffffff 0%, #fafbfc 100%); border: 1px solid var(--color-neutral-200); border-radius: var(--radius-lg); padding: var(--space-4); transition: all var(--transition-normal); box-shadow: 0 2px 8px rgb(0 0 0 / 0.04); }
.article-modern:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgb(0 0 0 / 0.1); border-color: var(--color-accent-secondary); }
.article-modern-image { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius-md); flex-shrink: 0; transition: transform var(--transition-fast); }
.article-modern:hover .article-modern-image { transform: scale(1.05); }
.article-modern-content { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.article-modern-category { display: inline-block; padding: var(--space-1) var(--space-2); background: linear-gradient(135deg, var(--color-accent-secondary), var(--color-accent-primary)); color: #fff; border-radius: var(--radius-sm); font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: var(--space-2); width: fit-content; }
.article-modern-category--breaking { background: linear-gradient(135deg, #ef4444, #dc2626); }
.article-modern-category--market { background: linear-gradient(135deg, #f59e0b, #d97706); }
.article-modern-category--training { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.article-modern-title { font-size: 0.875rem; font-weight: 600; line-height: 1.3; color: var(--color-primary); margin-bottom: var(--space-2); }
.article-modern-meta { font-size: 0.75rem; color: var(--color-neutral-500); display: flex; align-items: center; gap: var(--space-2); }
.article-modern-time { font-variant-numeric: tabular-nums; }
.article-modern-views { display: inline-flex; align-items: center; gap: var(--space-1); }

/* Latest Articles — News Blocks */
.latest-articles { background: transparent; padding: 0; border: none; border-radius: 0; margin-bottom: var(--space-12); }

/* News Block (per Kategorie) */
.news-block { margin-bottom: var(--space-10); }
.news-block:last-child { margin-bottom: 0; }
.news-block__header { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: var(--space-6); }
.news-block__title { font-size: 1.5rem; font-weight: 800; color: var(--color-primary); margin: 0; line-height: 1.2; }
.news-block__archive { color: var(--color-accent-secondary); font-weight: 600; font-size: 0.875rem; transition: color var(--transition-fast); white-space: nowrap; }
.news-block__archive:hover { color: var(--color-accent-primary); }
.news-block__subtitle { font-size: 1.1rem; font-weight: 700; color: var(--color-neutral-600); margin: 0; }

/* News Cards Grid — 2 per row */
.news-block__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }

/* News Card */
.news-card { background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04); transition: box-shadow 0.3s ease, transform 0.3s ease; display: flex; flex-direction: column; }
.news-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.12), 0 12px 32px rgba(0,0,0,0.08); transform: translateY(-2px); }

/* Card Image Area */
.news-card__image-link { position: relative; display: block; overflow: hidden; }
.news-card__image { width: 100%; height: 200px; object-fit: cover; transition: transform 0.4s ease; }
.news-card:hover .news-card__image { transform: scale(1.04); }
.news-card__flag { position: absolute; top: 0.75rem; right: 0.75rem; width: 36px; height: 36px; border-radius: 50%; object-fit: cover; box-shadow: 0 2px 8px rgba(0,0,0,0.25); border: 2px solid #fff; }

/* Card Body */
.news-card__body { padding: var(--space-5); display: flex; flex-direction: column; flex: 1; }
.news-card__title { font-size: 1.1rem; font-weight: 700; color: var(--color-primary); line-height: 1.35; margin: 0 0 var(--space-3) 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-card__title a { color: inherit; text-decoration: none; }
.news-card__title a:hover { color: var(--color-accent-secondary); }
.news-card__date { font-size: 0.8125rem; color: var(--color-neutral-500); margin-bottom: var(--space-4); }
.news-card__excerpt { font-size: 0.875rem; color: var(--color-neutral-600); line-height: 1.5; margin-bottom: var(--space-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-card__badge { position: absolute; top: 0.75rem; right: 0.75rem; background: linear-gradient(135deg, #6e972f, #9fc54a); color: #fff; padding: 0.2rem 0.7rem; border-radius: 50px; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.03em; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.news-card__more { margin-top: auto; display: inline-flex; align-items: center; font-size: 0.875rem; font-weight: 600; color: var(--color-accent-secondary); transition: color var(--transition-fast); }
.news-card__more:hover { color: var(--color-accent-primary); }
.news-card__image--placeholder { width: 100%; height: 200px; background: var(--color-neutral-200); }

/* =============================
   Sidebar
   ============================= */
.sidebar { display: flex; flex-direction: column; gap: var(--space-6); }
.sidebar-card { background: linear-gradient(145deg, #ffffff 0%, #fafbfc 100%); border: 1px solid var(--color-neutral-300); border-radius: var(--radius-xl); padding: var(--space-6); box-shadow: 0 2px 8px rgb(0 0 0 / 0.04); transition: all var(--transition-normal); }
.sidebar-card:hover { box-shadow: 0 8px 24px rgb(0 0 0 / 0.08); transform: translateY(-2px); }
.sidebar-card h3 { display: flex; align-items: center; gap: var(--space-3); font-size: 1.125rem; font-weight: 600; margin-bottom: var(--space-5); color: var(--color-primary); padding-bottom: var(--space-3); border-bottom: 2px solid var(--color-neutral-200); position: relative; }
.sidebar-card h3 { color: var(--color-primary); }
.sidebar-card h3 .section-icon {
    width: 24px;
    height: 24px;
    padding: 0;
    background: none;
    color: var(--color-accent-secondary);
    border-radius: 0;
    box-shadow: none;
}
.sidebar-card h3::after { content: ''; position: absolute; bottom: -2px; left: 0; width: 40px; height: 2px; background: var(--color-accent-secondary); border-radius: 1px; }
/* Verlinkte Karten-Kopfzeile: Der Titel ist klickbar, sieht aber exakt aus wie
   zuvor — keine Unterstreichung, keine eigene Farbe, auch nicht im Hover. Die
   sichtbare Einladung zum Klicken ist allein das Pfeil-Symbol rechts. */
.sidebar-card h3 .sidebar-card__title { display: inline-flex; align-items: center; gap: var(--space-3); min-width: 0; color: inherit; text-decoration: none; }
.sidebar-card h3 .sidebar-card__title:hover,
.sidebar-card h3 .sidebar-card__title:focus,
.sidebar-card h3 .sidebar-card__title:active { color: inherit; text-decoration: none; }
.sidebar-card h3 .sidebar-card__title:focus-visible { outline: 2px solid var(--color-accent-secondary); outline-offset: 3px; border-radius: var(--radius-sm); }
.sidebar-card h3 .sidebar-card__more { margin-left: auto; flex-shrink: 0; display: inline-flex; align-items: center; color: var(--color-accent-secondary); opacity: 0.55; text-decoration: none; transition: opacity var(--transition-fast), transform var(--transition-fast); }
.sidebar-card h3 .sidebar-card__more svg { width: 18px; height: 18px; display: block; }
.sidebar-card:hover h3 .sidebar-card__more { opacity: 1; }
.sidebar-card h3 .sidebar-card__more:hover { opacity: 1; transform: translateX(2px); }
.sidebar-card h3 .sidebar-card__more:focus-visible { opacity: 1; outline: 2px solid var(--color-accent-secondary); outline-offset: 3px; border-radius: var(--radius-sm); }
.sidebar-item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) 0; border-bottom: 1px solid var(--color-neutral-200); transition: all var(--transition-fast); }
.sidebar-item:hover { background: linear-gradient(90deg, rgb(34 197 94 / 0.03) 0%, transparent 100%); padding-left: var(--space-2); border-radius: var(--radius-md); }
.sidebar-item:last-child { border-bottom: none; }
.sidebar-item-image { width: 60px; height: 60px; object-fit: cover; border-radius: var(--radius-lg); flex-shrink: 0; box-shadow: 0 2px 8px rgb(0 0 0 / 0.1); transition: all var(--transition-fast); }
.sidebar-item:hover .sidebar-item-image { transform: scale(1.05); box-shadow: 0 4px 12px rgb(0 0 0 / 0.15); }
.sidebar-item-content { flex: 1; }
.sidebar-item-title { font-weight: 600; font-size: 0.875rem; line-height: 1.3; margin-bottom: var(--space-1); color: var(--color-primary); }
.sidebar-item-meta { font-size: 0.75rem; color: var(--color-neutral-500); }
.sidebar-item-price { font-weight: 700; font-size: 1rem; color: var(--color-accent-secondary); background: linear-gradient(135deg, var(--color-accent-secondary), var(--color-accent-primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Sidebar Rennkalender */
.sidebar-rennkalender__subtitle { margin: calc(var(--space-4) * -1 + 2px) 0 var(--space-4); font-size: 0.8125rem; color: var(--color-neutral-500); }
.rennkalender-list { list-style: none; margin: 0 0 var(--space-4); padding: 0; }
.rennkalender-item { margin: 0; padding: 0; border-bottom: 1px solid var(--color-neutral-200); }
.rennkalender-item:last-child { border-bottom: none; }
.rennkalender-item__link { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; border-radius: var(--radius-md); transition: all var(--transition-fast); }
.rennkalender-item__link:hover { background: linear-gradient(90deg, rgb(34 197 94 / 0.05) 0%, transparent 100%); padding-left: var(--space-2); }
.rennkalender-item__date { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 48px; padding: var(--space-2) 0; border-radius: var(--radius-lg); background: linear-gradient(145deg, var(--color-primary) 0%, #2b3340 100%); color: #fff; line-height: 1.1; box-shadow: 0 2px 6px rgb(0 0 0 / 0.12); transition: all var(--transition-fast); }
.rennkalender-item__link:hover .rennkalender-item__date { background: linear-gradient(145deg, var(--color-accent-primary) 0%, var(--color-accent-secondary) 100%); transform: scale(1.05); }
.rennkalender-item__weekday { font-size: 0.625rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.85; }
.rennkalender-item__day { font-size: 1.25rem; font-weight: 800; }
.rennkalender-item__month { font-size: 0.625rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.85; }
.rennkalender-item__body { flex: 1; min-width: 0; }
.rennkalender-item__title { display: block; font-weight: 600; font-size: 0.875rem; line-height: 1.3; color: var(--color-primary); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.rennkalender-item__meta { display: block; margin-top: var(--space-1); font-size: 0.75rem; color: var(--color-neutral-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rennkalender-cta { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: 600; font-size: 0.875rem; color: var(--color-accent-primary); transition: gap var(--transition-fast), color var(--transition-fast); }
.rennkalender-cta:hover { color: var(--color-accent-secondary); gap: var(--space-3); }
.rennkalender-cta svg { flex-shrink: 0; }
/* Dark Mode: Datums-Badge unabhaengig von --color-primary dunkel halten (weisse Schrift) */
[data-theme="dark"] .rennkalender-item__date { background: linear-gradient(145deg, #334155 0%, #1e293b 100%); }

/* =============================
   Changes / Results / Marketplace
   ============================= */
.changes-section {
  background: linear-gradient(145deg, #fef2f2 0%, #fef7f7 100%) !important;
  border: 1px solid #fecaca !important;
  box-shadow: 0 2px 8px rgb(239 68 68 / 0.1) !important;
}

.changes-section:hover {
  box-shadow: 0 8px 24px rgb(239 68 68 / 0.15) !important;
  border-color: #f87171 !important;
}

.changes-section h3 {
  color: #dc2626 !important;
  border-bottom-color: #fecaca !important;
}

.changes-section h3::after {
  background: #ef4444 !important;
}

.changes-section .change-item { display: flex; justify-content: space-between; align-items: center; padding: var(--space-3) 0; border-bottom: 1px solid #fecaca; }
.changes-section .change-item:last-child { border-bottom: none; }
.change-info { flex: 1; }
.change-track { font-weight: 600; font-size: 0.875rem; color: var(--color-primary); margin-bottom: var(--space-1); }
.change-time { font-size: 0.75rem; color: var(--color-neutral-500); }
.change-status { padding: var(--space-1) var(--space-3); border-radius: var(--radius-md); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; background: linear-gradient(135deg, var(--color-error), #dc2626); color: #fff; box-shadow: 0 2px 4px rgb(239 68 68 / 0.3); }

.results-section { margin-bottom: var(--space-16); }
.results-section__container, .marketplace-section__container, .race-day-widget__container { max-width: var(--container-max-width); margin: 0 auto; padding: 0 var(--container-padding); }
.results-section__header, .marketplace-section__header, .race-day-widget__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-6); }
.results-section__link, .marketplace-section__link { color: var(--color-accent-primary); font-weight: 500; transition: color var(--transition-fast); }
.results-section__link:hover, .marketplace-section__link:hover { color: var(--color-accent-secondary); }
.results-table-container { overflow-x: auto; border-radius: var(--radius-xl); border: 1px solid var(--color-neutral-200); }
.results-table { width: 100%; border-collapse: collapse; background: var(--color-neutral-50); }
.results-table th, .results-table td { padding: var(--space-4); text-align: left; border-bottom: 1px solid var(--color-neutral-200); }
.results-table th { background: var(--color-neutral-100); font-weight: 600; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-neutral-700); }
.results-table td { font-variant-numeric: tabular-nums; }
.results-table tbody tr:hover { background: var(--color-neutral-100); }

.marketplace-section { margin-bottom: var(--space-16); }
.marketplace-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--space-6); }
.horse-card { background: var(--color-neutral-50); border: 1px solid var(--color-neutral-200); border-radius: var(--radius-xl); overflow: hidden; transition: all var(--transition-normal); }
.horse-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); }
.horse-card__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.horse-card__image { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.horse-card:hover .horse-card__image { transform: scale(1.05); }
.horse-card__media .badge { position: absolute; top: var(--space-3); right: var(--space-3); }
.horse-card__content { padding: var(--space-6); }
.horse-card__name { font-size: 1.25rem; font-weight: 600; margin-bottom: var(--space-3); }
.horse-card__details { display: flex; gap: var(--space-4); margin-bottom: var(--space-3); font-size: 0.875rem; color: var(--color-neutral-600); }
.horse-card__pedigree { font-style: italic; color: var(--color-neutral-600); margin-bottom: var(--space-2); font-size: 0.875rem; }
.horse-card__location { color: var(--color-neutral-500); font-size: 0.875rem; margin-bottom: var(--space-4); }
.horse-card__price { font-size: 1.25rem; font-weight: 700; color: var(--color-accent-primary); margin-bottom: var(--space-4); font-variant-numeric: tabular-nums; }

/* =============================
   Race Day Widget
   ============================= */
.race-day-widget { margin-bottom: 0; padding: var(--space-16) 0 var(--space-8); }
.race-day-widget__title { margin-bottom: 0; }
.race-day-widget__date { color: var(--color-neutral-600); font-size: 0.875rem; font-weight: 500; }
.race-day-widget__tracks { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-6); margin-bottom: var(--space-8); }
.track-card { background: var(--color-neutral-50); border: 1px solid var(--color-neutral-200); border-radius: var(--radius-xl); padding: var(--space-6); transition: all var(--transition-normal); }
.track-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.track-card__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.track-card__name { font-size: 1.25rem; font-weight: 600; margin-bottom: 0; }
.track-card__condition { padding: var(--space-1) var(--space-3); border-radius: var(--radius-md); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; }
.track-card__condition--fast { background: var(--color-success); color: #fff; }
.track-card__condition--good { background: var(--color-warning); color: #fff; }
.track-card__condition--sloppy { background: var(--color-error); color: #fff; }
.track-card__details { display: flex; justify-content: space-between; margin-bottom: var(--space-4); font-size: 0.875rem; color: var(--color-neutral-600); }
.track-card__time { font-variant-numeric: tabular-nums; }
.track-card__changes { display: flex; gap: var(--space-2); }
.race-day-widget__actions { display: flex; gap: var(--space-4); justify-content: center; }

/* =============================
   Badges
   ============================= */
.badge { display: inline-flex; align-items: center; padding: var(--space-1) var(--space-3); border-radius: var(--radius-md); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.badge--live { background: var(--color-error); color: #fff; animation: pulse 2s infinite; }
.badge--category { background: var(--color-neutral-800); color: var(--color-neutral-100); }
.badge--new { background: var(--color-accent-primary); color: #fff; }
.badge--featured { background: var(--color-accent-primary); color: #fff; }
.badge--warning { background: var(--color-warning); color: #fff; }
.badge--error { background: var(--color-error); color: #fff; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

/* =============================
   Newsletter
   ============================= */
.newsletter-section { background: var(--color-primary); color: var(--color-neutral-50); padding: var(--space-16) 0; }
.newsletter-section__container { max-width: var(--container-max-width); margin: 0 auto; padding: 0 var(--container-padding); display: grid; grid-template-columns: 1fr; gap: var(--space-8); align-items: start; }
.newsletter-section__title { color: var(--color-neutral-50); font-size: 2rem; font-weight: 600; margin-bottom: var(--space-4); }
.newsletter-section__description { font-size: 1.125rem; line-height: 1.6; color: var(--color-neutral-300); margin-bottom: var(--space-6); }
.newsletter-form__group { display: flex; gap: var(--space-3); margin-bottom: var(--space-3); }
.newsletter-form__input { flex: 1; padding: var(--space-4); border: 1px solid var(--color-neutral-600); border-radius: var(--radius-lg); background: var(--color-neutral-800); color: var(--color-neutral-50); font-size: 1rem; height: 56px; }
.newsletter-form__input::placeholder { color: var(--color-neutral-400); }
.newsletter-form__privacy { font-size: 0.875rem; color: var(--color-neutral-400); }
.newsletter-form__privacy a { color: var(--color-accent-primary); text-decoration: underline; }
.newsletter-app { display: flex; flex-direction: column; justify-content: flex-start; }
.newsletter-app__content { margin-bottom: var(--space-2); }
.newsletter-app__title { color: var(--color-neutral-50); font-size: 2rem; font-weight: 600; margin-bottom: var(--space-4); }
.newsletter-app__description { color: var(--color-neutral-300); font-size: 1.125rem; line-height: 1.6; margin-bottom: 0; }
.app-download-btn { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-6); background: var(--color-neutral-800); border: 1px solid var(--color-neutral-700); border-radius: var(--radius-lg); color: var(--color-neutral-200); text-decoration: none; transition: all var(--transition-normal); width: fit-content; height: 56px; margin-top: var(--space-4); }
.app-download-btn:hover { background: var(--color-neutral-700); border-color: var(--color-accent-primary); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.app-download-btn__icon { font-size: 1.5rem; flex-shrink: 0; }
.app-download-btn__text { display: flex; flex-direction: column; gap: 0; }
.app-download-btn__label { font-size: 0.875rem; font-weight: 600; color: var(--color-neutral-200); line-height: 1.2; }
.app-download-btn__subtitle { font-size: 0.75rem; color: var(--color-neutral-400); line-height: 1; }

/* =============================
   Footer
   ============================= */
.footer {
  background: var(--color-neutral-900);
  color: var(--color-neutral-300);
  padding: var(--space-16) 0 var(--space-8);
  width: 100%;
  clear: both;
  float: none;
  position: relative;
}
.footer__container { max-width: var(--container-max-width); margin: 0 auto; padding: 0 var(--container-padding); }
/* Footer-Logo: Footer ist in Light wie Dark dunkel -> Schrift immer #fff,
   Signet bleibt im SVG fest #709932. */
.footer__logo { height: 40px; width: auto; display: block; color: #fff; margin-bottom: var(--space-4); }
.footer__content { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: var(--space-8); margin-bottom: var(--space-12); align-items: start; }
.footer__section:first-child { padding-right: var(--space-6); }
.footer__section:nth-child(2), .footer__section:nth-child(3), .footer__section:nth-child(4) { margin-top: var(--space-4); }
.footer__title { color: var(--color-neutral-50); font-size: 0.875rem; font-weight: 600; margin-bottom: var(--space-3); text-transform: uppercase; letter-spacing: 0.05em; }
.footer__description { font-size: 0.875rem; line-height: 1.6; color: var(--color-neutral-400); margin-bottom: var(--space-4); }
.footer__social { margin-top: var(--space-4); }
.social-links { display: flex; gap: var(--space-4); }
.footer__links { display: flex; flex-direction: column; gap: var(--space-1); list-style: none; margin: 0; padding: 0; }
.footer__links li { list-style: none; margin: 0; padding: 0; line-height: 1; }
.footer__links a { color: var(--color-neutral-400); transition: color var(--transition-fast); padding: var(--space-2) 0; font-size: 0.875rem; line-height: 1.4; }
.footer__links a:hover { color: var(--color-accent-primary); }
.social-link { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius-lg); background: var(--color-neutral-800); color: var(--color-neutral-400); transition: all var(--transition-fast); }
.social-link:hover { background: var(--color-accent-primary); color: #fff; transform: translateY(-2px); }
.footer__sponsors { padding: var(--space-8) 0; border-top: 1px solid var(--color-neutral-800); margin-bottom: var(--space-8); }
.footer__sponsors-title { font-size: 1rem; font-weight: 600; color: var(--color-neutral-400); margin-bottom: var(--space-4); text-align: center; }
.sponsor-logos { display: flex; justify-content: center; align-items: center; gap: var(--space-6); flex-wrap: wrap; }
.sponsor-logo { color: var(--color-neutral-500); font-size: 0.875rem; font-weight: 500; padding: var(--space-2) var(--space-4); border: 1px solid var(--color-neutral-700); border-radius: var(--radius-md); transition: all var(--transition-fast); }
.sponsor-logo:hover { color: var(--color-neutral-300); border-color: var(--color-neutral-600); }
.footer__bottom { text-align: center; padding-top: var(--space-8); border-top: 1px solid var(--color-neutral-800); }
.footer__legal { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); }
.footer__legal p { color: var(--color-neutral-400); font-size: 0.875rem; margin: 0; }
.footer__legal-links { display: flex; align-items: center; gap: 0; margin-top: var(--space-2); }
.footer__legal-links a {
  color: var(--color-neutral-500);
  font-size: 0.875rem;
  text-decoration: none;
  padding: var(--space-1) var(--space-3);
  transition: color var(--transition-fast);
  position: relative;
}
.footer__legal-links a:hover {
  color: var(--color-neutral-300);
}
.footer__legal-links a:not(:last-child)::after {
  content: '|';
  position: absolute;
  right: 0;
  color: var(--color-neutral-600);
  pointer-events: none;
}
[data-theme="dark"] .footer {
  background: var(--color-surface-dark);
  border-color: var(--color-border-dark);
  color: var(--color-text-dark);
}

[data-theme="dark"] .footer__legal p {
  color: var(--color-neutral-500);
}

[data-theme="dark"] .footer__legal-links a {
  color: var(--color-neutral-400);
}

[data-theme="dark"] .footer__legal-links a:hover {
  color: var(--color-neutral-200);
}

[data-theme="dark"] .footer__legal-links a:not(:last-child)::after {
  color: var(--color-neutral-500);
}

/* =============================
   Single News / Article
   ============================= */
.article-hero-container {
    position: relative;
    z-index: 1;
    height: 648px;
    width: 100%;
    color: #fff;
    overflow: visible;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #9cab9ab8;
}

.article-hero-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.5) 40%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
}

.article-hero-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 800px 600px at 50% 50%, rgba(34, 197, 94, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse 400px 300px at 30% 70%, rgba(34, 197, 94, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.article-hero-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.article-hero-tags {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.article-hero-title,
.archive-hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 50%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.article-hero-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* =============================
   Bildnachweis
   =============================

   Zwei Auftritte, ein Prinzip: sichtbar, aber nie im Weg.

   1. --vertical: an Hero-Bildern. Steht hochkant an der Bildkante, vertikal
      zentriert, Leserichtung von unten nach oben. `writing-mode` statt eines
      rotierten Blocks, damit die Zeilenlänge begrenzbar bleibt (max-height +
      ellipsis); das zusätzliche `rotate(180deg)` dreht `vertical-rl` von
      oben-nach-unten auf unten-nach-oben. `writing-mode: sideways-lr` täte
      dasselbe direkt, wird aber nicht von allen Browsern unterstützt.
   2. Overlay-figcaption: an Bildern im Fließtext und in Galerien. Liegt
      horizontal zentriert am unteren Bildrand auf dem Bild. */

.image-credit--vertical {
    position: absolute;
    top: 50%;
    right: 0.85rem;
    left: auto;
    transform: translateY(-50%) rotate(180deg);
    z-index: 12;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    max-height: 68%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 0.66rem;
    font-weight: 500;
    font-style: normal;
    letter-spacing: 0.08em;
    line-height: 1;
    color: rgba(255, 255, 255, 0.72);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95), 0 0 12px rgba(0, 0, 0, 0.6);
    pointer-events: none;
}

/* Galerie-Kacheln sind quadratisch beschnitten und stapeln Bild + Nachweis
   übereinander — ohne `position: relative` säße das Overlay am Dokument. */
.content-block-image,
.gallery-item {
    position: relative;
}

.content-block-image figcaption,
.gallery-item figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    margin: 0;
    padding: 1.5rem 0.75rem 0.5rem;
    text-align: center;
    font-size: 0.72rem;
    font-style: italic;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.88);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.3) 55%, transparent 100%);
    border-radius: 0 0 12px 12px;
    pointer-events: none;
    /* Lange Nachweise nach zwei Zeilen kappen, damit das Bild nicht zugedeckt wird */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-content-section {
    position: relative;
    z-index: 10;
    margin-top: -160px;
}

.news-article {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.news-description {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--color-neutral-800);
    overflow: hidden;
    max-width: 100%;
}

.news-description p { margin-bottom: 1.5rem; }
.news-description p:last-child { margin-bottom: 0; }
.news-description b, .news-description strong { font-weight: 700; color: var(--color-primary); }
.news-description a { color: var(--color-accent-secondary); text-decoration: underline; transition: color 0.2s ease; }
.news-description a:hover { color: var(--color-accent-primary); }

/* Content Blocks */
.content-block { margin-bottom: 2rem; overflow: hidden; }
.content-block:last-child { margin-bottom: 0; }
.content-block-image { margin: 0 0 1rem 0; max-width: 45%; }
.content-block.img-left .content-block-image { float: left; margin-right: 2rem; margin-bottom: 1rem; }
.content-block.img-right .content-block-image { float: right; margin-left: 2rem; margin-bottom: 1rem; }
.content-block.img-center .content-block-image { float: none; max-width: 100%; margin: 0 auto 1.5rem auto; }
.content-block-image img { width: 100%; height: auto; border-radius: 12px; display: block; }
/* figcaption = Bildnachweis-Overlay, siehe Abschnitt „Bildnachweis" weiter oben */
.content-block-text { overflow-wrap: break-word; word-wrap: break-word; }

/* Legacy Content aus eZ Publish */
.news-description table { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; width: 100% !important; max-width: 100%; table-layout: fixed; border-collapse: collapse; }
.news-description table tbody { display: contents; }
.news-description table tr { display: contents; }
.news-description table td { padding: 0; vertical-align: top; word-wrap: break-word; overflow-wrap: break-word; }
.news-description table img { max-width: 100%; height: auto; display: block; }
.news-description .image { max-width: 100%; }
.news-description .image img { max-width: 100%; height: auto; }
.news-description td .content-block { display: block; margin-bottom: 0; }
.news-description td .content-block.has-image { display: block; }
.news-description td .content-block-image { float: none; max-width: 100%; margin: 0; aspect-ratio: 4/3; overflow: hidden; border-radius: 12px; }
.news-description td .content-block-image img { width: 100%; height: 100%; object-fit: cover; }
.news-description td .content-block-text { display: block; }
.news-description table td .content-block-text:empty { display: none; }

/* Medien-Zeilen — aus eZ-Layouttabellen (Bild | Text) umgebaut.
   Die Tabellen von damals waren auf eine feste Desktop-Breite gerechnet
   (Bildzelle 400px). Als Grid-Zellen behandelt (siehe .news-description table
   oben) verlieren sie ihre Zeilenbindung und stehen versetzt und gestaucht
   nebeneinander. Deshalb baut plus_trab_build_media_rows() sie in diese
   Struktur um: Bild und zugehöriger Text bleiben ein Paar. */
.content-media-rows { display: flex; flex-direction: column; gap: 2rem; margin: 1.5rem 0; }
.content-media-row { display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.content-media-row--media-right { grid-template-columns: minmax(0, 1fr) minmax(0, 38%); }
.content-media-row--media-right .content-media-row__media { order: 2; }
.content-media-row__media { margin: 0; }
.content-media-row__media img { width: 100%; height: auto; display: block; border-radius: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }
.content-media-row__media img + img { margin-top: 1rem; }
.content-media-row__text > *:first-child { margin-top: 0; }
.content-media-row__text > *:last-child { margin-bottom: 0; }

@media (max-width: 900px) {
    .content-media-row,
    .content-media-row--media-right { grid-template-columns: 1fr; gap: 1rem; }
    .content-media-row--media-right .content-media-row__media { order: 0; }
}

/* Gallery */
.content-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.gallery-item { margin: 0; aspect-ratio: 4/3; overflow: hidden; border-radius: 12px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.gallery-item:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-item, .content-block-image { cursor: zoom-in; }
.gallery-item:hover img, .content-block-image:hover img { transform: scale(1.02); transition: transform 0.3s ease; }

/* Lightbox */
.lightbox { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.95); z-index: 10000; opacity: 0; transition: opacity 0.3s ease; }
.lightbox.active { display: flex; align-items: center; justify-content: center; opacity: 1; }
.lightbox-content { position: relative; max-width: 90%; max-height: 90%; display: flex; align-items: center; justify-content: center; }
.lightbox-image { max-width: 100%; max-height: 85vh; object-fit: contain; border-radius: 8px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); transform: scale(0.9); transition: transform 0.3s ease; }
.lightbox.active .lightbox-image { transform: scale(1); }
.lightbox-close { position: absolute; top: 20px; right: 20px; width: 50px; height: 50px; background: rgba(255, 255, 255, 0.1); border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; z-index: 10001; }
.lightbox-close:hover { background: rgba(255, 255, 255, 0.2); transform: scale(1.1); }
.lightbox-close svg { width: 24px; height: 24px; stroke: white; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; background: rgba(255, 255, 255, 0.1); border: none; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.3s ease; }
.lightbox-nav:hover { background: rgba(255, 255, 255, 0.2); transform: translateY(-50%) scale(1.1); }
.lightbox-nav svg { width: 24px; height: 24px; stroke: white; }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-counter { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); color: rgba(255, 255, 255, 0.8); font-size: 0.9rem; background: rgba(0, 0, 0, 0.5); padding: 0.5rem 1rem; border-radius: 20px; }
.lightbox-caption { position: absolute; bottom: 60px; left: 50%; transform: translateX(-50%); color: white; font-size: 0.95rem; text-align: center; max-width: 80%; background: rgba(0, 0, 0, 0.7); padding: 0.75rem 1.5rem; border-radius: 8px; }

/* Sidebar News */
.sidebar-news-item { display: block; padding: 0; margin-bottom: 1.5rem; }
.sidebar-news-item:last-child { margin-bottom: 0; }
.sidebar-news-image { width: 100%; height: 180px; object-fit: cover; border-radius: 12px; margin-bottom: 1rem; }
.sidebar-news-category { display: inline-block; padding: 0.25rem 0.75rem; background: rgba(34, 197, 94, 0.1); color: var(--color-accent-secondary); border-radius: 50px; font-size: 0.75rem; font-weight: 600; margin-bottom: 0.5rem; }
.sidebar-news-title { font-size: 1rem; font-weight: 700; color: var(--color-primary); line-height: 1.4; margin-bottom: 0.5rem; }
.sidebar-news-meta { font-size: 0.8rem; color: var(--color-neutral-600); }

/* =============================
   News Archive
   ============================= */
.archive-hero-container {
    position: relative;
    z-index: 1;
    width: 100%;
    color: #fff;
    overflow: visible;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #9cab9ab8;
}

.archive-hero-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.5) 40%, rgba(0, 0, 0, 0.6) 100%);
    pointer-events: none;
}

.archive-hero-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 800px 600px at 50% 50%, rgba(34, 197, 94, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse 400px 300px at 30% 70%, rgba(34, 197, 94, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.archive-hero-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    /* ACHTUNG: Klasse wird auch von Elementor-Seiten als aeusserer e-con-Container
       genutzt — Elementor-Padding liegt dort auf dem INNEREN .e-con-inner und
       wuerde sich mit Werten hier addieren. Deshalb hier kein Top-Padding. */
    padding: 0 2rem 160px;
}

/* Nur Custom-Code-Templates (News/Meisterschaften/Championate):
   Top-Abstand des Nur-Headline-Heros */
.archive-hero-content--standalone { padding-top: 150px; }

/* Elementor-Seiten (body.page): auf Tablet/Mobil das INNERE Elementor-Padding
   (liegt auf .e-con-inner, gespeist aus --padding-bottom) auf 0 kappen.
   Hero-Balance auf allen Elementor-Seiten: aeusseres Bottom-Padding 160px
   minus -128px Content-Pull = 32px sichtbarer Abstand (= Desktop-Look).
   Inneres Padding (mobil meist 120, Tablet 140) addierte sich da drauf —
   daher die grossen Loecher. Das aeussere 160px-Padding NICHT antasten,
   sonst ueberlappt der -128px-Pull die Headline. */
@media (max-width: 1024px) {
    /* .e-con noetig: hebt die Spezifitaet ueber Elementors
       Element-Regeln (.elementor-NNNN .elementor-element.elementor-element-xxx) */
    body.page .archive-hero-content.e-con,
    .archive-hero-content--tight.e-con {
        --padding-bottom: 0px;
    }
}

/* Sonderfall: Hero ohne Subline (nur .hero-title, z. B. Impressum/Datenschutz).
   Standard-Heros haben Elementor-Padding-Bottom 0 — die Subline (+ Gap) fuellt
   den Raum unter der Headline (~50px). Headline-only-Seiten tragen stattdessen
   150px Padding, das den Platz der fehlenden Subline reserviert — die Headline
   rutscht aus der optischen Mitte. Hier auf das Subline-Aequivalent reduzieren;
   fuer Tablet/Mobil kappt die Regel oben das Padding ohnehin auf 0. */
@media (min-width: 1025px) {
    body.page .archive-hero-content.e-con:has(> .e-con-inner > .hero-title:only-child) {
        --padding-bottom: 50px;
    }
}

.archive-hero-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    line-height: 1.6;
    padding-bottom: 55px;
}

.archive-content-section {
    position: relative;
    z-index: 10;
    margin-top: -160px;
}

.archive-container {
    padding-bottom: 4rem;
    position: relative;
}

/* Archive Filter */
.archive-filter {
    background: var(--color-neutral-50); /* flippt im Dark Mode automatisch (wie marktplatz --marktplatz-white) */
    border-radius: 24px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Filter Row */
.filter-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }

/* Filter Tags */
.filter-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.filter-tag { display: inline-flex; align-items: center; padding: 0.5rem 1rem; background: var(--color-neutral-100); color: var(--color-neutral-700); border-radius: 50px; font-size: 0.85rem; font-weight: 500; text-decoration: none; transition: all 0.2s ease; border: 1px solid transparent; }
.filter-tag:hover { background: var(--color-neutral-200); color: var(--color-neutral-800); }
.filter-tag.active { background: var(--color-accent-secondary); color: white; border-color: var(--color-accent-secondary); }

.archive-filter-form { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.archive-filter-form .filter-label { font-size: 0.85rem; font-weight: 500; color: var(--color-neutral-600); }

/* Datumsfelder mit sichtbarem Label (type=date zeigt v. a. auf iOS keinen Platzhalter) */
.filter-date-field { display: flex; align-items: center; gap: 0.4rem; cursor: pointer; }
.filter-date-label { font-size: 0.85rem; font-weight: 600; color: var(--color-neutral-600); }

/* Mobile-Filter-Toggle: nur auf kleinen Screens sichtbar */
.archive-filter__toggle { display: none; }
.archive-filter__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5em;
    height: 1.5em;
    padding: 0 0.4em;
    border-radius: 999px;
    background: var(--color-accent-secondary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
}
.archive-filter-form input[type="date"] { padding: 0.5rem 0.75rem; border: 1px solid var(--color-neutral-300); border-radius: 8px; font-size: 0.85rem; color: var(--color-neutral-800); background: white; cursor: pointer; transition: all 0.2s ease; }
.archive-filter-form input[type="date"]:hover { border-color: var(--color-accent-secondary); }
.archive-filter-form input[type="date"]:focus { outline: none; border-color: var(--color-accent-secondary); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1); }

.filter-group { flex: 1; min-width: 150px; }
.filter-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--color-neutral-700); margin-bottom: 0.5rem; }
.filter-group select, .filter-group input[type="date"] { width: 100%; padding: 0.75rem 1rem; border: 1px solid var(--color-neutral-300); border-radius: 8px; font-size: 0.9rem; color: var(--color-neutral-800); background: white; cursor: pointer; transition: all 0.2s ease; }
.filter-group select:hover, .filter-group input[type="date"]:hover { border-color: var(--color-accent-secondary); }
.filter-group select:focus, .filter-group input[type="date"]:focus { outline: none; border-color: var(--color-accent-secondary); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1); }
.filter-actions { display: flex; gap: 0.75rem; }
.filter-btn { padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: all 0.2s ease; border: none; }
.filter-btn-primary { background: var(--color-accent-secondary); color: white; }
.filter-btn-primary:hover { background: var(--color-accent-primary); transform: translateY(-2px); }
.filter-btn-secondary { background: var(--color-neutral-100); color: var(--color-neutral-700); text-decoration: none; display: inline-flex; align-items: center; }
.filter-btn-secondary:hover { background: var(--color-neutral-200); }
.filter-active-info { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; background: rgba(34, 197, 94, 0.1); border-radius: 8px; font-size: 0.85rem; color: var(--color-accent-secondary); margin-top: 1rem; }
.filter-active-info svg { width: 16px; height: 16px; }

/* Archive Grid */
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }

/* Archive News Card (scoped to archive grid) */
.archive-grid .news-card { background: white; border-radius: 24px; overflow: hidden; box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); transition: all 0.3s ease; display: flex; flex-direction: column; }
.archive-grid .news-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15); }
.news-card-image { width: 100%; height: 200px; object-fit: cover; }
.news-card-image.news-card-image--placeholder { display: flex; align-items: center; justify-content: center; background: var(--color-neutral-100, #f1f5f9); }
.news-card-image--placeholder svg { width: 64px; height: 64px; color: var(--color-neutral-400, #94a3b8); }
.news-card-content { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
/* inline-flex + nowrap: Icon und Label (z. B. Siegerliste/Meisterschaft) duerfen nicht getrennt umbrechen */
.news-card-category { display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; padding: 0.25rem 0.75rem; background: rgba(34, 197, 94, 0.1); color: var(--color-accent-secondary); border-radius: 50px; font-size: 0.75rem; font-weight: 600; margin-bottom: 0.75rem; width: fit-content; }
.news-card-category svg { flex-shrink: 0; }
.news-card-title { font-size: 1.25rem; font-weight: 700; color: var(--color-primary); line-height: 1.3; margin-bottom: 0.75rem; }
.news-card-title a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
.news-card-title a:hover { color: var(--color-accent-secondary); }
.news-card-excerpt { font-size: 0.9rem; color: var(--color-neutral-600); line-height: 1.6; margin-bottom: 1rem; flex: 1; }
.news-card-meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--color-neutral-500); }
.news-card-meta .meta-dot { width: 3px; height: 3px; background: var(--color-neutral-400); border-radius: 50%; }

/* Pagination */
.archive-pagination { display: flex; justify-content: center; align-items: center; gap: 0.5rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--color-neutral-200); }
.archive-pagination a, .archive-pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 0.75rem; border-radius: 8px; font-size: 0.9rem; font-weight: 500; text-decoration: none; transition: all 0.2s ease; }
.archive-pagination a { color: var(--color-neutral-700); background: var(--color-neutral-100); }
.archive-pagination a:hover { background: var(--color-accent-secondary); color: white; }
.archive-pagination .current { background: var(--color-accent-secondary); color: white; }
.archive-pagination .dots { background: none; color: var(--color-neutral-500); }

/* No Results */
.no-results { text-align: center; padding: 4rem 2rem; color: var(--color-neutral-600); }
.no-results h2 { font-size: 1.5rem; margin-bottom: 1rem; color: var(--color-primary); }

/* Dark Mode for Articles */
[data-theme="dark"] .article-content-section {
    background:
        radial-gradient(ellipse 800px 600px at 20% 80%, rgba(34, 197, 94, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 600px 800px at 80% 20%, rgba(34, 197, 94, 0.04) 0%, transparent 50%),
        linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #334155 50%, #1e293b 75%, #0f172a 100%);
}

[data-theme="dark"] .news-article {
    background: linear-gradient(145deg, var(--color-neutral-100) 0%, var(--color-neutral-200) 100%);
    border: 1px solid var(--color-neutral-300);
}

[data-theme="dark"] .news-description {
    color: var(--color-neutral-600);
}

/* =============================
   Responsive
   ============================= */
@media (max-width: 480px) {
    .content-gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .lightbox-nav { width: 40px; height: 40px; }
    .lightbox-prev { left: 10px; }
    .lightbox-next { right: 10px; }
    .lightbox-close { top: 10px; right: 10px; width: 40px; height: 40px; }

    .content-block.img-left .content-block-image,
    .content-block.img-right .content-block-image { float: none; max-width: 100%; margin: 0 0 1.5rem 0; }

    .news-description table, .news-description tbody, .news-description tr, .news-description td { display: block; width: 100% !important; }
    .news-description tr { margin-bottom: 1rem; }

    .article-hero-container { height: 70vh; min-height: 400px; padding-top: 60px; }
    .article-hero-content { padding: 1.25rem 1rem; }
    .archive-hero-content--standalone { padding-top: 60px; }
    .article-hero-title { font-size: 1.5rem; margin-bottom: 0.75rem; line-height: 1.2; }
    .article-hero-meta { flex-direction: row; flex-wrap: wrap; gap: 0.5rem; font-size: 0.8rem; }
    .article-hero-meta-item { gap: 0.35rem; }
    .article-hero-meta-item svg { width: 14px; height: 14px; }
    /* Hero-Bildnachweis rückt näher an die Kante, damit auf schmalen Displays
       zwischen Titel und Bildrand noch Luft bleibt. */
    .image-credit--vertical { right: 0.4rem; font-size: 0.6rem; max-height: 55%; }
    .article-content-section { margin-top: -80px; }
    .single-news .portal-wrapper { padding: 1.5rem 0.75rem; }
    .single-news .portal-grid { gap: var(--space-6); padding-top: var(--space-4); }
    .news-article { padding: 1.25rem 1rem; border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); overflow: hidden; }
    .news-description { font-size: 0.9375rem; line-height: 1.7; overflow: hidden; }
    .news-description img,
    .news-description table,
    .news-description iframe,
    .news-description video,
    .news-description embed,
    .news-description object { max-width: 100% !important; }
    .news-description img { width: auto !important; height: auto !important; }
    .content-block-image { max-width: 100%; }
    .content-block-image img { border-radius: 8px; }
    .portal-wrapper { overflow: hidden; }
    .main-content { min-width: 0; }
    .news-description p { margin-bottom: 1rem; }
    .content-block { margin-bottom: 1.25rem; }
    /* Bildradius ist mobil 8px (siehe .content-block-image img oben) — das
       Overlay muss den gleichen Radius tragen, sonst steht es an den Ecken über. */
    .content-block-image figcaption,
    .gallery-item figcaption { font-size: 0.68rem; padding: 1.1rem 0.5rem 0.4rem; border-radius: 0 0 8px 8px; }
    .content-gallery { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .sidebar-card { padding: var(--space-4); }
    .sidebar-card h3 { font-size: 1rem; margin-bottom: var(--space-3); }
    .sidebar-news-image { height: 140px; border-radius: 10px; margin-bottom: 0.75rem; }
    .sidebar-news-item { margin-bottom: 1rem; }
    .sidebar-item-content .sidebar-news-title { font-size: 0.875rem; }
    .sidebar-news-meta { font-size: 0.7rem; }
    .sidebar-news-category { font-size: 0.65rem; }

    /* Mobiltypischer Filter: zugeklapptes Panel hinter einem Filter-Button */
    .archive-filter__toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
        padding: 0.75rem 1rem;
        border: 1px solid var(--color-neutral-300);
        border-radius: 10px;
        background: white;
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--color-neutral-700);
        cursor: pointer;
    }
    .archive-filter__toggle svg { width: 18px; height: 18px; }
    .archive-filter.is-open .archive-filter__toggle {
        border-color: var(--color-accent-secondary);
        color: var(--color-accent-secondary);
    }
    .archive-filter__body { display: none; margin-top: 1rem; }
    .archive-filter.is-open .archive-filter__body { display: block; }

    .filter-row { flex-direction: column; align-items: stretch; gap: 1.25rem; }

    .archive-filter-form { flex-direction: column; align-items: stretch; }
    .filter-date-field { flex-direction: column; align-items: stretch; gap: 0.35rem; cursor: default; }
    .filter-date-label { font-size: 0.8rem; }
    .archive-filter-form input[type="date"] {
        width: 100%;
        min-height: 44px;          /* Touch-Target */
        font-size: 16px;           /* verhindert iOS-Auto-Zoom beim Fokussieren */
        -webkit-appearance: none;  /* iOS rendert sonst zentrierten Mini-Text */
        appearance: none;
        text-align: left;
    }
    .archive-filter-form .filter-btn { width: 100%; min-height: 44px; font-size: 0.95rem; }

    .filter-group { width: 100%; }
    .filter-actions { width: 100%; justify-content: stretch; }
    .filter-btn { flex: 1; text-align: center; }
    .archive-grid { grid-template-columns: 1fr; }
    .archive-header { padding: 3rem 1rem; }
}

@media (max-width: 1800px) {
  .article-prev, .article-special { flex: 0 0 calc((100% - 1000px) / 2); min-width: 300px; }
  .article-main-wrapper { flex: 0 0 1000px; }
  .article-prev:hover .article-prev-image-wrapper { width: calc(100% + 150px); }
  .article-prev:hover .expand-indicator { transform: translateY(-50%) translateX(150px) scale(1.3); }
  .article-special:hover { flex: 0 0 calc((100% - 1000px) / 2 + 150px); }
  .article-special:hover .article-special-image-wrapper { width: calc(100% + 150px); }
  .article-special:hover .expand-indicator { transform: translateY(-50%) translateX(-150px) scale(1.3); }
}

@media (max-width: 1600px) {
  .article-prev, .article-special { flex: 0 0 calc((100% - 900px) / 2); min-width: 250px; }
  .article-main-wrapper { flex: 0 0 900px; }
  .article-prev:hover .article-prev-image-wrapper { width: calc(100% + 100px); }
  .article-prev:hover .expand-indicator { transform: translateY(-50%) translateX(100px) scale(1.3); }
  .article-special:hover { flex: 0 0 calc((100% - 900px) / 2 + 100px); }
  .article-special:hover .article-special-image-wrapper { width: calc(100% + 100px); }
  .article-special:hover .expand-indicator { transform: translateY(-50%) translateX(-100px) scale(1.3); }
}

@media (max-width: 1400px) {
  .article-prev .article-content, .article-special .article-content { transform: scale(0.9); }
  .article-prev:hover .article-content, .article-special:hover .article-content { transform: scale(1); }
}

@media (max-width: 1200px) {
  .news-layout { justify-content: center; }
  .article-prev, .article-special { display: none; }
  .article-main-wrapper { flex: 0 0 100%; max-width: 100%; }
  .article-main { border-radius: 0; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  /* Tablet: show hamburger, keep search visible */
  .nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    background: var(--color-neutral-50);
    border-left: 1px solid var(--color-neutral-200);
    box-shadow: var(--shadow-xl);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-bottom: none;
  }
  .nav.nav--open { transform: translateX(0); }
  .nav__backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 999; opacity: 0; transition: opacity 0.3s ease; }
  .nav__backdrop.nav__backdrop--visible { display: block; opacity: 1; }
  .nav__mobile-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--color-neutral-200); flex-shrink: 0; }
  .nav__mobile-title { font-family: var(--font-headline); font-size: 1.125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-primary); }
  .nav__mobile-close { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--radius-md); color: var(--color-neutral-600); cursor: pointer; background: none; border: none; }
  .nav__mobile-close:hover { background: var(--color-neutral-200); color: var(--color-primary); }
  .nav__mobile-search { display: none; } /* Tablet still has header search */
  .nav__container { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 0; max-width: none; margin: 0; }
  .nav__list { flex-direction: column; align-items: stretch; padding: 0; }
  .nav__link-row { display: flex; align-items: stretch; }
  .nav__link { flex: 1; padding: var(--space-4) var(--space-5); font-size: 0.9375rem; border-bottom: 1px solid var(--color-neutral-200); text-transform: none; letter-spacing: normal; font-weight: 600; color: var(--color-primary); text-align: left; }
  .nav__toggle { display: flex; align-items: center; justify-content: center; width: 52px; border: none; background: none; border-bottom: 1px solid var(--color-neutral-200); border-left: 1px solid var(--color-neutral-200); color: var(--color-neutral-500); cursor: pointer; flex-shrink: 0; }
  .nav__toggle:hover { background: var(--color-neutral-200); color: var(--color-accent-primary); }
  .nav__toggle svg { transition: transform 0.25s ease; }
  .nav__toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
  .nav__toggle[aria-expanded="true"] { color: var(--color-accent-primary); background: var(--color-neutral-100); }
  .nav__dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; border-radius: 0; min-width: 0; max-height: 0; overflow: hidden; transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1); background: var(--color-neutral-100); }
  .nav__item--expanded .nav__dropdown { max-height: 600px; }
  .nav__dropdown-content { padding: var(--space-3) var(--space-5) var(--space-4); flex-direction: column; gap: var(--space-3); }
  .nav__dropdown-section { flex: none; min-width: 0; }
  .nav__dropdown-section + .nav__dropdown-section { border-left: none; padding-left: 0; padding-top: var(--space-3); border-top: 1px solid var(--color-neutral-200); }
  .nav__dropdown-section a { display: block; padding: var(--space-2) var(--space-3); font-size: 0.875rem; border-radius: var(--radius-md); }
  .nav__dropdown-section a:hover { background: var(--color-neutral-200); color: var(--color-accent-primary); }
  .nav__mobile-controls { display: flex; align-items: center; justify-content: space-around; padding: var(--space-3) var(--space-4); border-top: 1px solid var(--color-neutral-200); background: var(--color-neutral-100); flex-shrink: 0; gap: var(--space-2); }
  .nav__mobile-control { display: flex; flex-direction: column; align-items: center; gap: var(--space-1); padding: var(--space-2); border-radius: var(--radius-md); color: var(--color-neutral-600); font-size: 0.6875rem; font-weight: 500; text-decoration: none; cursor: pointer; background: none; border: none; min-width: 60px; }
  .nav__mobile-control:hover { background: var(--color-neutral-200); color: var(--color-accent-primary); }
  .nav__mobile-zoom { flex-direction: row; gap: var(--space-2); cursor: default; }
  .nav__mobile-zoom-btn { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--color-neutral-300); background: var(--color-neutral-50); color: var(--color-neutral-600); cursor: pointer; }
  .nav__mobile-zoom-btn:hover { background: var(--color-accent-primary); color: #fff; border-color: var(--color-accent-primary); }
  .nav__mobile-zoom-label { font-size: 0.6875rem; font-weight: 500; color: var(--color-neutral-500); }
  .nav__mobile-controls .nav__mobile-hvt-btn { display: inline-block; padding: 8px 16px; background: #709932; color: #fff; font-size: 0.75rem; font-weight: 600; text-decoration: none; border-radius: 999px; }
  .menu-toggle { display: flex; }
  .zoom-controls { display: none; }
  .theme-toggle { display: none; }
  .hvt-logo-link { display: none; }
}

@media (min-width: 769px) {
  .newsletter-section__container { grid-template-columns: 2fr 1fr; align-items: start; }
  .newsletter-form__group { flex-direction: row; }
  .newsletter-content { padding-right: var(--space-4); }
}

@media (max-width: 768px) {
  /* Hero Section Mobile
     100svh - Header(4rem) - Ticker(3rem) = exakt bündig zur Unterkante */
  .hero-container { height: calc(100svh - 7rem); min-height: 0; overflow: hidden; }
  .news-layout { height: 100%; min-height: 0; }
  .article-main-wrapper { flex: 1 1 100%; height: 100%; }
  .article-main { height: 100%; min-height: 0; }
  .article-main .article-image { position: absolute; inset: 0; width: 100%; height: 100%; }
  .article-main .article-content {
    position: relative;
    inset: auto;
    width: 100%;
    max-width: none;
    padding: 1.25rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    z-index: 10;
  }
  .article-header-top {
    position: absolute;
    top: 1.25rem;
    left: 1.25rem;
    right: 1.25rem;
  }
  .article-main::before { background: linear-gradient(0deg, #1e293b 0%, rgba(30,41,59,0.9) 30%, rgba(30,41,59,0.4) 60%, transparent 100%); z-index: 1; }
  .article-header { flex: 0; }
  .article-header-top { flex-direction: row; align-items: flex-start; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.8rem; }
  .article-header { display: flex; flex-direction: column; }
  .article-header-top { order: -1; }
  .hero-archive-link { font-size: 0.7rem; padding: 0.35rem 0.7rem; background: rgba(0,0,0,0.55); backdrop-filter: blur(12px); border-color: rgba(255,255,255,0.3); }
  .article-main .tag { font-size: 0.7rem; padding: 0.35rem 0.7rem; }
  .article-main .tag-breaking { background: rgb(239 68 68 / 0.45); border-color: rgb(239 68 68 / 0.6); color: #fff; }
  .article-main .tag-category { background: rgb(112 153 50 / 0.45); border-color: rgb(112 153 50 / 0.6); color: #fff; }
  .article-main .article-title {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
    margin-bottom: 0.6rem;
    line-height: 1.15;
    max-width: none;
  }
  .article-main .article-excerpt {
    font-size: 0.875rem;
    line-height: 1.45;
    margin-bottom: 1rem;
    max-width: none !important;
  }
  .article-actions {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }
  .article-actions a,
  .article-actions .btn-primary,
  .article-actions .btn-ghost {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 0.7rem 1.2rem;
    font-size: 0.8125rem;
  }
  .article-footer {
    margin-top: 0.8rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgb(255 255 255 / 0.15);
  }
  .article-time { font-size: 0.75rem; }
  .hero-share__toggle { padding: 0.4rem 0.8rem; font-size: 0.75rem; }
  .hero-share__menu { bottom: auto; top: calc(100% + 0.4rem); }
  .portal-grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .articles-modern-grid { grid-template-columns: 1fr; gap: var(--space-6); }
  .article-featured-image { height: 200px; }
  .article-modern { flex-direction: column; }
  .article-modern-image { width: 100%; height: 160px; }
  .article-modern-content { padding: var(--space-4); }
  .footer__content { grid-template-columns: 1fr; gap: var(--space-6); }

  .header__search { display: none; }
  .header__actions { gap: var(--space-1); }
  .hvt-logo { height: 32px; }
  .hvt-logo-link { display: none; }
  .language-select { display: none; }
  .zoom-controls { display: none; }
  .theme-toggle { display: none; }
  .menu-toggle { display: flex; }

  /* ===== Mobile Fullscreen Overlay Nav ===== */
  .nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 400px;
    background: var(--color-neutral-50);
    border-left: 1px solid var(--color-neutral-200);
    box-shadow: var(--shadow-xl);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-bottom: none;
  }
  .nav.nav--open {
    transform: translateX(0);
  }

  /* Backdrop */
  .nav__backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  .nav__backdrop.nav__backdrop--visible {
    display: block;
    opacity: 1;
  }

  /* Mobile Header inside nav */
  .nav__mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--color-neutral-200);
    flex-shrink: 0;
  }
  .nav__mobile-title {
    font-family: var(--font-headline);
    font-size: 1.125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-primary);
  }
  .nav__mobile-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    color: var(--color-neutral-600);
    transition: background var(--transition-fast), color var(--transition-fast);
    cursor: pointer;
    background: none;
    border: none;
  }
  .nav__mobile-close:hover,
  .nav__mobile-close:active {
    background: var(--color-neutral-200);
    color: var(--color-primary);
  }

  /* Mobile Search inside nav */
  .nav__mobile-search {
    display: block;
    padding: var(--space-3) var(--space-5);
    border-bottom: 1px solid var(--color-neutral-200);
    flex-shrink: 0;
  }
  .nav__mobile-search .search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    position: relative;
  }
  .nav__mobile-search .search-input {
    flex: 1;
    border: 1px solid var(--color-neutral-300);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    border-right: none;
    font-size: 0.9375rem;
    padding: var(--space-3) var(--space-4);
    background: var(--color-neutral-50);
    outline: none;
    -webkit-appearance: none;
  }
  .nav__mobile-search .search-input:focus {
    border-color: var(--color-accent-primary);
  }
  .nav__mobile-search .search-button {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-neutral-300);
    border-left: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: var(--space-3);
    background: var(--color-neutral-100);
    color: var(--color-neutral-500);
    cursor: pointer;
  }
  .nav__mobile-search .search-input:focus + .search-button {
    border-color: var(--color-accent-primary);
    color: var(--color-accent-primary);
  }
  .nav__mobile-search .search-suggestions {
    position: static;
    transform: none;
    display: none;
    width: 100%;
    max-height: 50vh;
    border: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: none;
    background: var(--color-neutral-50);
    border-top: 1px solid var(--color-neutral-200);
    margin-top: var(--space-2);
  }
  .nav__mobile-search .search-suggestions.active {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  /* Scrollable nav container */
  .nav__container {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 0;
    max-width: none;
    margin: 0;
  }

  /* Nav list vertical */
  .nav .nav__list {
    display: flex;
    flex-direction: column;
    align-items: stretch !important;
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
  }

  .nav .nav__item {
    display: block;
    width: 100%;
    text-align: left;
  }

  /* Nav link row with toggle */
  .nav__link-row {
    display: flex;
    align-items: stretch;
    width: 100%;
  }

  .nav__link {
    display: block;
    flex: 1;
    padding: var(--space-4) var(--space-5);
    font-size: 0.9375rem;
    border-bottom: 1px solid var(--color-neutral-200);
    border-right: none;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 600;
    color: var(--color-primary);
    text-align: left;
  }
  .nav__link:hover,
  .nav__link:active {
    color: var(--color-accent-primary);
    border-bottom-color: var(--color-neutral-200);
    background: var(--color-neutral-100);
  }

  /* Accordion toggle button */
  .nav__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    border: none;
    background: none;
    border-bottom: 1px solid var(--color-neutral-200);
    border-left: 1px solid var(--color-neutral-200);
    color: var(--color-neutral-500);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
    flex-shrink: 0;
  }
  .nav__toggle:hover,
  .nav__toggle:active {
    background: var(--color-neutral-200);
    color: var(--color-accent-primary);
  }
  .nav__toggle svg {
    transition: transform 0.25s ease;
  }
  .nav__toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
  }
  .nav__toggle[aria-expanded="true"] {
    color: var(--color-accent-primary);
    background: var(--color-neutral-100);
  }

  /* Dropdown as accordion */
  .nav__dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    min-width: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--color-neutral-100);
  }
  .nav__item--expanded .nav__dropdown {
    max-height: 600px;
  }

  .nav__dropdown-content {
    padding: var(--space-3) var(--space-5) var(--space-4);
    flex-direction: column;
    gap: var(--space-3);
  }

  .nav__dropdown-section {
    flex: none;
    min-width: 0;
  }
  .nav__dropdown-section + .nav__dropdown-section {
    border-left: none;
    padding-left: 0;
    padding-top: var(--space-3);
    border-top: 1px solid var(--color-neutral-200);
  }

  .nav__dropdown-section h3 {
    font-size: 0.75rem;
    margin-bottom: var(--space-2);
    color: var(--color-accent-primary);
    text-align: left;
  }

  .nav__dropdown-section a {
    display: block;
    padding: var(--space-2) var(--space-3);
    font-size: 0.875rem;
    border-radius: var(--radius-md);
    color: var(--color-neutral-700);
    text-align: left;
    transition: background var(--transition-fast), color var(--transition-fast);
  }
  .nav__dropdown-section a:hover,
  .nav__dropdown-section a:active {
    background: var(--color-neutral-200);
    color: var(--color-accent-primary);
  }

  /* Mobile Controls Footer */
  .nav__mobile-controls {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: var(--space-3) var(--space-4);
    border-top: 1px solid var(--color-neutral-200);
    background: var(--color-neutral-100);
    flex-shrink: 0;
    gap: var(--space-2);
  }
  .nav__mobile-control {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2);
    border-radius: var(--radius-md);
    color: var(--color-neutral-600);
    font-size: 0.6875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    background: none;
    border: none;
    transition: background var(--transition-fast), color var(--transition-fast);
    min-width: 60px;
  }
  .nav__mobile-control:hover,
  .nav__mobile-control:active {
    background: var(--color-neutral-200);
    color: var(--color-accent-primary);
  }
  .nav__mobile-zoom {
    flex-direction: row;
    gap: var(--space-2);
    cursor: default;
  }
  .nav__mobile-hvt-btn {
    display: inline-block;
    padding: 8px 16px;
    background: #709932;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 999px;
  }
  .nav__mobile-zoom-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--color-neutral-300);
    background: var(--color-neutral-50);
    color: var(--color-neutral-600);
    cursor: pointer;
    transition: all var(--transition-fast);
  }
  .nav__mobile-zoom-btn:hover,
  .nav__mobile-zoom-btn:active {
    background: var(--color-accent-primary);
    color: #fff;
    border-color: var(--color-accent-primary);
  }
  .nav__mobile-zoom-label {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--color-neutral-500);
  }

  .results-table { font-size: 0.875rem; }
  .results-table th, .results-table td { padding: var(--space-2); }
  .results-table td { display: block; text-align: right; border-bottom: none; padding: var(--space-1) var(--space-2); }
  .results-table td::before { content: attr(data-label) ": "; float: left; font-weight: 600; color: var(--color-neutral-600); }

  .footer__bottom { text-align: center; }
  .footer__legal { gap: var(--space-4); }
  .footer__legal-links { flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 480px) {
  .news-block__grid { grid-template-columns: 1fr; }
  .race-day-widget__tracks { grid-template-columns: 1fr; }
  .marketplace-grid { grid-template-columns: 1fr; }
  .newsletter-form__group { flex-direction: column; }

  /* Full-width mobile nav on small screens */
  .nav { max-width: 100%; border-left: none; }
  .nav__link { padding: var(--space-3) var(--space-4); font-size: 0.875rem; }
  .nav__toggle { width: 48px; }
  .nav__mobile-header { padding: var(--space-3) var(--space-4); }
  .nav__mobile-search { padding: var(--space-2) var(--space-4); }
  .nav__dropdown-content { padding: var(--space-2) var(--space-4) var(--space-3); }
  .nav__dropdown-section a { font-size: 0.8125rem; padding: var(--space-2); }
  .nav__mobile-controls { padding: var(--space-2) var(--space-3); }

  /* Hero extra small */
  .article-main .article-content { padding: 1rem; }
  .article-main .article-title { font-size: 1.25rem; letter-spacing: -0.3px; }
  .article-main .article-excerpt { font-size: 0.8125rem; padding: 0.6rem 0.8rem; margin-bottom: 0.8rem; }
  .tag { font-size: 0.6rem; padding: 0.25rem 0.6rem; }
}

/* =============================
   Dark Mode Fixes
   ============================= */

/* News Ticker Dark Mode */
[data-theme="dark"] .news-ticker {
background: radial-gradient(ellipse 800px 600px at 20% 80%, rgb(34 197 94 / 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 600px 800px at 80% 20%, rgb(34 197 94 / 0.06) 0%, transparent 50%),
    radial-gradient(circle 400px at 60% 60%, rgb(255 255 255 / 0.02) 0%, transparent 70%),
    conic-gradient(from 45deg at 30% 70%, transparent 0deg, rgb(34 197 94 / 0.02) 90deg, transparent 180deg),
    linear-gradient(135deg, #0f172a 0%, #1e293b 25%, #334155 50%, #1e293b 75%, #0f172a 100%);
    color:#fefefe;
}

[data-theme="dark"] .news-ticker__label {
  background: #dc2626;
}

[data-theme="dark"] .news-ticker__category {
  background: var(--color-neutral-700);
  color: var(--color-neutral-300);
}

[data-theme="dark"] .news-ticker__time {
  color: var(--color-accent-primary);
}

[data-theme="dark"] .news-ticker__pause {
  color: var(--color-neutral-400);
}

[data-theme="dark"] .news-ticker__pause:hover {
  color: var(--color-neutral-200);
}

/* Sidebar Cards Dark Mode */
[data-theme="dark"] .sidebar-card {
  background: linear-gradient(145deg, var(--color-neutral-100) 0%, var(--color-neutral-200) 100%);
  border: 1px solid var(--color-neutral-300);
}

[data-theme="dark"] .sidebar-card:hover {
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.3);
}

[data-theme="dark"] .sidebar-card h3 {
  color: var(--color-primary);
  border-bottom-color: var(--color-neutral-300);
}

[data-theme="dark"] .sidebar-card h3::after {
  background: var(--color-accent-primary);
}

/* Pfeil-Symbol folgt im Dark Mode derselben Akzentfarbe wie die Trennlinie.
   Der Titel-Link braucht keine eigene Regel — er erbt per color: inherit. */
[data-theme="dark"] .sidebar-card h3 .sidebar-card__more {
  color: var(--color-accent-primary);
}

/* Dark Mode für Changes Section */
[data-theme="dark"] .changes-section {
  background: linear-gradient(145deg, #450a0a 0%, #3c0e0e 100%) !important;
  border: 1px solid #7c2d12 !important;
  box-shadow: 0 2px 8px rgb(239 68 68 / 0.2) !important;
}

[data-theme="dark"] .changes-section:hover {
  box-shadow: 0 8px 24px rgb(239 68 68 / 0.3) !important;
  border-color: #ea580c !important;
}

[data-theme="dark"] .changes-section h3 {
  color: #f87171 !important;
  border-bottom-color: #7c2d12 !important;
}

[data-theme="dark"] .changes-section h3::after {
  background: #ef4444 !important;
}

[data-theme="dark"] .changes-section .change-item {
  border-bottom-color: #7c2d12;
}

[data-theme="dark"] .sidebar-item {
  border-bottom-color: var(--color-neutral-300);
}

[data-theme="dark"] .sidebar-item:hover {
  background: linear-gradient(90deg, rgb(34 197 94 / 0.1) 0%, transparent 100%);
}

[data-theme="dark"] .sidebar-item-title {
  color: var(--color-primary);
}

[data-theme="dark"] .sidebar-item-meta {
  color: var(--color-neutral-500);
}

/* Newsletter Section Dark Mode */
[data-theme="dark"] .newsletter-section {
  background: var(--color-neutral-100);
  color: var(--color-primary);
}

[data-theme="dark"] .newsletter-section__title {
  color: var(--color-primary);
}

[data-theme="dark"] .newsletter-section__description {
  color: var(--color-neutral-600);
}

[data-theme="dark"] .newsletter-form__input {
  background: var(--color-neutral-200);
  border-color: var(--color-neutral-400);
  color: var(--color-primary);
}

[data-theme="dark"] .newsletter-form__input::placeholder {
  color: var(--color-neutral-500);
}

[data-theme="dark"] .newsletter-form__privacy {
  color: var(--color-neutral-500);
}

[data-theme="dark"] .newsletter-app__title {
  color: var(--color-primary);
}

[data-theme="dark"] .newsletter-app__description {
  color: var(--color-neutral-600);
}

[data-theme="dark"] .app-download-btn {
  background: var(--color-neutral-200);
  border-color: var(--color-neutral-300);
  color: var(--color-primary);
}

[data-theme="dark"] .app-download-btn:hover {
  background: var(--color-neutral-300);
  border-color: var(--color-accent-primary);
}

[data-theme="dark"] .app-download-btn__label {
  color: var(--color-primary);
}

[data-theme="dark"] .app-download-btn__subtitle {
  color: var(--color-neutral-500);
}

/* Footer Dark Mode */
[data-theme="dark"] .footer {
  background: var(--color-neutral-50);
  border-top: 1px solid var(--color-neutral-300);
}

[data-theme="dark"] .footer__title {
  color: var(--color-primary);
}

[data-theme="dark"] .footer__description {
  color: var(--color-neutral-600);
}

[data-theme="dark"] .footer__links a {
  color: var(--color-neutral-600);
}

[data-theme="dark"] .footer__links a:hover {
  color: var(--color-accent-primary);
}

[data-theme="dark"] .social-link {
  background: var(--color-neutral-200);
  color: var(--color-neutral-600);
  border: 1px solid var(--color-neutral-300);
}

[data-theme="dark"] .social-link:hover {
  background: var(--color-accent-primary);
  color: white;
  border-color: var(--color-accent-primary);
}

[data-theme="dark"] .footer__sponsors {
  border-top-color: var(--color-neutral-300);
}

[data-theme="dark"] .footer__sponsors-title {
  color: var(--color-neutral-600);
}

[data-theme="dark"] .sponsor-logo {
  color: var(--color-neutral-600);
  border-color: var(--color-neutral-300);
}

[data-theme="dark"] .sponsor-logo:hover {
  color: var(--color-primary);
  border-color: var(--color-neutral-400);
}

[data-theme="dark"] .footer__bottom {
  border-top-color: var(--color-neutral-300);
  color: var(--color-neutral-600);
}

/* Additional Dark Mode Fixes for other elements */
[data-theme="dark"] .header {
  background: var(--color-neutral-100);
  border-bottom-color: var(--color-neutral-300);
}

[data-theme="dark"] .search-input {
  background: var(--color-neutral-200);
  border-color: var(--color-neutral-400);
  color: var(--color-primary);
}

[data-theme="dark"] .search-input:focus {
  border-color: var(--color-accent-primary);
}

[data-theme="dark"] .nav {
  background: var(--color-neutral-200);
  border-bottom-color: var(--color-neutral-300);
}

[data-theme="dark"] .nav__link {
  color: var(--color-primary);
}

[data-theme="dark"] .nav__dropdown {
  background: var(--color-neutral-100);
  border-color: var(--color-neutral-300);
}

/* Dark Mode Mobile Nav */
[data-theme="dark"] .nav__mobile-header { border-bottom-color: var(--color-neutral-300); }
[data-theme="dark"] .nav__mobile-close { color: var(--color-neutral-500); }
[data-theme="dark"] .nav__mobile-close:hover { background: var(--color-neutral-300); color: var(--color-primary); }
[data-theme="dark"] .nav__mobile-search { border-bottom-color: var(--color-neutral-300); }
[data-theme="dark"] .nav__toggle { border-color: var(--color-neutral-300); color: var(--color-neutral-400); }
[data-theme="dark"] .nav__toggle:hover { background: var(--color-neutral-300); }
[data-theme="dark"] .nav__mobile-controls { background: var(--color-neutral-200); border-top-color: var(--color-neutral-300); }
[data-theme="dark"] .nav__mobile-zoom-btn { background: var(--color-neutral-200); border-color: var(--color-neutral-400); color: var(--color-neutral-500); }
[data-theme="dark"] .nav__mobile-zoom-btn:hover { background: var(--color-accent-primary); color: #fff; }
[data-theme="dark"] .nav__backdrop { background: rgba(0, 0, 0, 0.7); }

[data-theme="dark"] .language-select {
  background: var(--color-neutral-200);
  border-color: var(--color-neutral-400);
  color: var(--color-primary);
}

/* News Cards in Dark Mode */
[data-theme="dark"] .news-card {
  background: var(--color-neutral-100);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2), 0 4px 12px rgba(0,0,0,0.1);
}
[data-theme="dark"] .news-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.25), 0 12px 32px rgba(0,0,0,0.15);
}
[data-theme="dark"] .news-card__flag {
  border-color: var(--color-neutral-200);
}

[data-theme="dark"] .article-modern {
  background: linear-gradient(145deg, var(--color-neutral-100) 0%, var(--color-neutral-200) 100%);
  border-color: var(--color-neutral-300);
}

[data-theme="dark"] .article-modern:hover {
  border-color: var(--color-accent-primary);
}

[data-theme="dark"] .article-featured {
  background: linear-gradient(145deg, var(--color-neutral-100) 0%, var(--color-neutral-200) 100%);
}

/* Results Table Dark Mode */
[data-theme="dark"] .results-table {
  background: var(--color-neutral-100);
}

[data-theme="dark"] .results-table th {
  background: var(--color-neutral-200);
  color: var(--color-primary);
}

[data-theme="dark"] .results-table td {
  border-bottom-color: var(--color-neutral-300);
}

[data-theme="dark"] .results-table tbody tr:hover {
  background: var(--color-neutral-200);
}

/* Track Cards Dark Mode */
[data-theme="dark"] .track-card {
  background: var(--color-neutral-100);
  border-color: var(--color-neutral-300);
}

[data-theme="dark"] .track-card__details {
  color: var(--color-neutral-600);
}

/* Horse Cards Dark Mode */
[data-theme="dark"] .horse-card {
  background: var(--color-neutral-100);
  border-color: var(--color-neutral-300);
}

[data-theme="dark"] .horse-card__details {
  color: var(--color-neutral-600);
}

[data-theme="dark"] .horse-card__pedigree {
  color: var(--color-neutral-600);
}

[data-theme="dark"] .horse-card__location {
  color: var(--color-neutral-500);
}

/* =============================
   Meisterschaft Table
   ============================= */
.meisterschaft-table-container {
  margin-bottom: var(--space-8);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.meisterschaft-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  font-size: 0.9375rem;
}

.meisterschaft-table thead {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
}

.meisterschaft-table th {
  padding: var(--space-4) var(--space-4);
  text-align: left;
  font-family: var(--font-headline);
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  font-size: 0.8125rem;
  white-space: nowrap;
}

.meisterschaft-table td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-neutral-200);
  vertical-align: middle;
}

.meisterschaft-table tbody tr:last-child td {
  border-bottom: none;
}

.meisterschaft-table tbody tr:hover {
  background: var(--color-neutral-50);
}

.meisterschaft-table tbody tr:nth-child(even) {
  background: var(--color-neutral-50);
}

.meisterschaft-table tbody tr:nth-child(even):hover {
  background: var(--color-neutral-100);
}

.meisterschaft-table .no-value {
  color: var(--color-neutral-400);
}

.meisterschaft-table .table-image {
  max-width: 80px;
  max-height: 60px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}

.meisterschaft-table .table-flag {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-sm);
  border: 2px solid var(--color-neutral-200);
  flex-shrink: 0;
}

.meisterschaft-table .country-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--color-neutral-200);
  border-radius: 50%;
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--color-neutral-600);
}

.meisterschaft-table .participant-cell {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: nowrap;
}

.meisterschaft-table .participant-name {
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.meisterschaft-table a {
  color: var(--color-accent-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.meisterschaft-table a:hover {
  color: var(--color-accent-secondary);
}

/* Responsive Table */
@media (max-width: 768px) {
  .meisterschaft-table-container {
    margin-left: calc(-1 * var(--space-4));
    margin-right: calc(-1 * var(--space-4));
    padding: 0 var(--space-4);
  }

  .meisterschaft-table {
    font-size: 0.875rem;
  }

  .meisterschaft-table th,
  .meisterschaft-table td {
    padding: var(--space-2) var(--space-3);
  }

  .meisterschaft-table .table-image {
    max-width: 60px;
    max-height: 45px;
  }
}

/* Alternative: Card-Layout für Mobile (optional aktivierbar) */
@media (max-width: 640px) {
  .meisterschaft-table--cards thead {
    display: none;
  }

  .meisterschaft-table--cards tbody tr {
    display: block;
    margin-bottom: var(--space-4);
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
  }

  .meisterschaft-table--cards tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-neutral-200);
  }

  .meisterschaft-table--cards tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    font-family: var(--font-headline);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: var(--color-neutral-500);
    margin-right: var(--space-4);
  }

  .meisterschaft-table--cards tbody td:last-child {
    border-bottom: none;
  }
}

/* Dark Mode */
[data-theme="dark"] .meisterschaft-table {
  background: var(--color-neutral-100);
}

[data-theme="dark"] .meisterschaft-table thead {
  background: linear-gradient(135deg, var(--color-accent-primary) 0%, var(--color-accent-secondary) 100%);
}

/* Zellen: Schrift EXPLIZIT hell setzen (nicht auf Vererbung verlassen — auf
   Elementor-Seiten kommt sie sonst dunkel an) + dunkle Trennlinie. */
[data-theme="dark"] .meisterschaft-table td,
[data-theme="dark"] .meisterschaft-table .participant-name {
  color: var(--color-neutral-900);
  border-bottom-color: var(--color-neutral-300);
}

/* Links heller (dunkelgruen verschwindet sonst auf dunklem Grund). */
[data-theme="dark"] .meisterschaft-table a {
  color: #a3c267;
}

/* Einheitlich dunkle Flaeche statt hellgrauem Zebra: ungerade Zeilen solide
   dunkel, gerade nur ein dezenter heller Hauch — bleibt klar im Dark-Bereich. */
[data-theme="dark"] .meisterschaft-table tbody tr:nth-child(odd) {
  background: var(--color-neutral-100);
}

[data-theme="dark"] .meisterschaft-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .meisterschaft-table tbody tr:hover,
[data-theme="dark"] .meisterschaft-table tbody tr:nth-child(even):hover {
  background: rgba(255, 255, 255, 0.08);
}
/* =============================================================
   Dark Mode — restliche helle Flaechen (Durchgaengigkeit)
   Karten (.news-card/.sidebar-card/.article-*/.news-article) tragen
   bereits eigene Dark-Overrides; hier die noch hartcodierten weissen
   Filter-/Formular-Oberflaechen der Archiv-Seiten.
   ============================================================= */
[data-theme="dark"] .archive-filter {
  background: var(--color-neutral-100) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .archive-filter__toggle,
[data-theme="dark"] .archive-filter-form input[type="date"],
[data-theme="dark"] .filter-group select,
[data-theme="dark"] .filter-group input[type="date"] {
  background: var(--color-neutral-50);
}

/* =============================================================
   Dark Mode — Elementor-Standardseiten (#main-content)
   -------------------------------------------------------------
   Elementor backt Karten-Hintergruende (haeufig #FFFFFF) direkt ins Design.
   Diese liegen NICHT auf den Top-Level-Containern (= Layout/Positionierung,
   z. B. Hero oder der Ueberlappungs-Wrapper mit negativem margin-top), sondern
   auf den DARIN VERSCHACHTELTEN Inhalts-Containern. Darum nur verschachtelte
   Container/Inner-Sections faerben (`.e-con .e-con` / Inner-Section): die
   Inhaltskarte wird dunkel (Marktplatz-Box-Farbe --color-neutral-100), der
   Top-Level-Wrapper bleibt transparent -> Hero-Bild + Ueberlappungseffekt
   bleiben erhalten. Texte werden hell. ID-Spezifitaet + !important schlagen
   Elementors element-spezifische Regeln; Buttons, Bilder, Icons bleiben.
   HINWEIS: bewusst farbige Inhalts-Container gezielt zuruecksetzen, z. B.:
     [data-theme="dark"] #main-content .elementor-element-XXXX
       { background-color: #1a472a !important; }
   ============================================================= */
[data-theme="dark"] #main-content .e-con .e-con,
[data-theme="dark"] #main-content .elementor-section .elementor-section {
  background-color: var(--color-neutral-100) !important;
}
[data-theme="dark"] #main-content .elementor-heading-title,
[data-theme="dark"] #main-content .elementor-widget-text-editor,
[data-theme="dark"] #main-content .elementor-widget-text-editor p,
[data-theme="dark"] #main-content .elementor-widget-text-editor li,
[data-theme="dark"] #main-content .elementor-widget-text-editor span,
[data-theme="dark"] #main-content .elementor-icon-list-text,
[data-theme="dark"] #main-content .elementor-widget-text-editor :is(h1, h2, h3, h4, h5, h6) {
  color: var(--color-neutral-800) !important;
}

/* =============================================================
   Dark Mode — Rekord-Kacheln (Seite traberzucht/deutsche-rekorde)
   -------------------------------------------------------------
   Die .record-cnt-Karten stammen aus einem JetEngine-Dynamic-Repeater;
   ihr Styling liegt im Elementor-Custom-CSS des Widgets (Seite 1381) mit
   hartcodiertem background: white bzw. #F7FAFB — flippt also nicht ueber
   die Tokens. Der Textfarb-Token flippt aber -> weisse Schrift auf
   weisser Kachel. Hier nur die Flaechen dunkel nachziehen, Schrift
   erbt bereits die hellen Dark-Tokens.
   ============================================================= */
[data-theme="dark"] .record-cnt {
  background: var(--color-neutral-100);
  box-shadow: 0px 0px 20px 10px rgba(0, 0, 0, 0.3);
}
[data-theme="dark"] .record-cnt .inner .inner-section {
  background: var(--color-neutral-200);
}

/* =============================================================
   Dark Mode — HOF-Tabellen-Design (Custom-CSS-Plugin, variablenbasiert)
   -------------------------------------------------------------
   Alle <table> (inkl. .meisterschaft-table) werden vom Custom-CSS ueber
   --hof-*- und --zebra-*-Variablen hell gestylt (table td-Ebene -> schlaegt unsere
   ACHTUNG: In CSS-Kommentaren nie "Stern-Slash" als Text schreiben — genau das
   hatte hier den Kommentar vorzeitig beendet und die nachfolgende Dark-Regel
   per Fehler-Recovery verschluckt (Tabellen blieben im Dark Mode weiss).
   .meisterschaft-table-Regeln). Es gibt dort keine Dark-Variante. Wir defi-
   nieren die Farb-Variablen im Dark Mode um -> das komplette Tabellen-Design
   flippt automatisch. html[data-theme] (0,1,1) schlaegt das :root (0,1,0) des
   Custom-CSS unabhaengig von der Ladereihenfolge. Header (gruen/weiss) bleibt.
   ============================================================= */
html[data-theme="dark"] {
  --hof-bg: var(--color-neutral-100);          /* Tabellen-Flaeche dunkel */
  --hof-text: var(--color-neutral-900);        /* Zelltext hell */
  --hof-muted: var(--color-neutral-500);
  --hof-border: var(--color-neutral-300);
  --zebra-color: rgba(255, 255, 255, 0.045);   /* dezenter dunkler Stripe statt #f5f5f5 */
  --zebra-hover: rgba(255, 255, 255, 0.10);
}

/* Bulletproof: HOF-Tabellenzeilen direkt auf td-Ebene treffen (so wie das
   Custom-CSS sie setzt) + !important. Falls die Variablen-Umdefinition oben
   aus irgendeinem Grund nicht greift, gewinnen diese Regeln definitiv. */
[data-theme="dark"] .meisterschaft-table tbody td {
  color: var(--color-neutral-900) !important;
}
[data-theme="dark"] .meisterschaft-table tbody tr:nth-child(odd) td {
  background-color: transparent !important;
}
[data-theme="dark"] .meisterschaft-table tbody tr:nth-child(even) td {
  background-color: rgba(255, 255, 255, 0.05) !important;
}

/* =============================================================
   Dark Mode — News-/Archiv-Filter Feinschliff
   Inaktive Filter-Chips nutzen neutral-100 = gleiche Farbe wie der
   (abgedunkelte) Filterkasten -> sie verschwinden. Im Dark Mode eine Stufe
   heller absetzen. Zusaetzlich native Datepicker dunkel-faehig machen.
   ============================================================= */
[data-theme="dark"] .filter-tag {
  background: var(--color-neutral-200);
  color: var(--color-neutral-800);
  border-color: var(--color-neutral-300);
}
[data-theme="dark"] .filter-tag:hover {
  background: var(--color-neutral-300);
}
[data-theme="dark"] .archive-filter-form input[type="date"] {
  color-scheme: dark;
}

/* Aktiver Filter-Chip bleibt im Dark Mode gruen hervorgehoben — sonst ueber-
   schreibt die generische [data-theme="dark"] .filter-tag-Regel (gleiche
   Spezifitaet, spaeter in der Datei) den Aktiv-Zustand. */
[data-theme="dark"] .filter-tag.active {
  background: var(--color-accent-secondary);
  color: #fff;
  border-color: var(--color-accent-secondary);
}

/* Dark Mode — Kategorie-Badges (Sidebar + News-Card): dunkelgruene Schrift auf
   gruenem Tint ist auf dunklem Grund zu kontrastarm -> helleres Gruen (#b8df7a,
   faerbt via currentColor auch das SVG-Icon) + sichtbarerer Badge-Hintergrund. */
[data-theme="dark"] .sidebar-news-category,
[data-theme="dark"] .news-card-category {
  background: rgba(112, 153, 50, 0.20);
  color: #b8df7a;
}

/* ==========================================================================
   Suchergebnis-Seite (templates/search.php)
   Das Verfeinern-Suchformular im Hero steht ausserhalb von .header__search und
   braucht daher eigene Input-/Button-Regeln. Wiederverwendet wird der
   Hero-Container und das News-Card-Grid des Archivs.
   ========================================================================== */
.search-form--page {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto 2rem;
}
.search-form--page .search-input,
.search-form--page input[type="search"] {
  width: 100%;
  padding: 0.95rem var(--space-12) 0.95rem var(--space-4);
  border: 1px solid var(--color-neutral-300);
  border-radius: var(--radius-lg);
  background: var(--color-neutral-50);
  color: var(--color-primary);
  font-size: 0.95rem;
  line-height: normal;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  outline: none;
  box-shadow: var(--shadow-xl);
  margin: 0;
}
.search-form--page .search-input:focus,
.search-form--page input[type="search"]:focus {
  border-color: var(--color-accent-primary);
  box-shadow: 0 0 0 3px rgb(112 153 50 / 0.25);
}
.search-form--page .search-button,
.search-form--page button[type="submit"] {
  position: absolute;
  right: var(--space-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-neutral-500);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color var(--transition-fast);
  margin: 0;
}
.search-form--page .search-button:hover,
.search-form--page button[type="submit"]:hover {
  color: var(--color-accent-primary);
}

/* Treffer-Titel: Hervorhebung des Suchbegriffs */
.search-hero ~ .archive-content-section .search-highlight,
.archive-grid .search-highlight {
  background: rgba(112, 153, 50, 0.22);
  color: inherit;
  padding: 0 0.1em;
  border-radius: 3px;
}

[data-theme="dark"] .search-form--page .search-input,
[data-theme="dark"] .search-form--page input[type="search"] {
  background: var(--color-neutral-100);
  border-color: var(--color-neutral-300);
}

/* ==========================================================================
   Trainer-Single: Elementor-Hero an den globalen Hero-Stil angleichen
   Der Single-Trainer rendert ueber das Theme-Builder-Template "Trainer".
   Dessen Hero (Sektion mit Klasse .archive-hero-content) setzt eigene Werte
   (min-height 648px, schwarzer Radial-Hintergrund), die vom globalen
   .archive-hero-container-Look (Sage-Green-Basis + Verlaeufe, inhaltsgetriebene
   Hoehe via Padding) abweichen. Hier auf body.single-trainer eingeschraenkt
   zurueckgeholt. `.elementor-element` hebt die Spezifitaet ueber Elementors
   eigene Element-Regeln (deren Werte sind nicht !important).
   ========================================================================== */
body.single-trainer .elementor-element.archive-hero-content {
  position: relative;
  min-height: 0;                         /* fixe 648px/500px aufheben */
  padding: 150px 2rem 160px;             /* wie .archive-hero-content--standalone */
  background-color: var(--color-hero-base);
  background-image: none;                /* schwarzen Radial-Verlauf entfernen */
  color: #fff;
}
/* dunkler Verlauf wie .archive-hero-container::before */
body.single-trainer .elementor-element.archive-hero-content::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.5) 40%, rgba(0, 0, 0, 0.6) 100%);
}
/* gruene Radial-Tints wie .archive-hero-container::after */
body.single-trainer .elementor-element.archive-hero-content::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 800px 600px at 50% 50%, rgba(34, 197, 94, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 400px 300px at 30% 70%, rgba(34, 197, 94, 0.1) 0%, transparent 50%);
}
/* Elementors eigenes Hintergrund-Overlay (gruenes Radial) ausblenden,
   sonst liegt es zusaetzlich ueber unseren Verlaeufen */
body.single-trainer .elementor-element.archive-hero-content > .elementor-background-overlay {
  display: none;
}
/* Inhalt (Titel/Untertitel) ueber die Verlaufs-Pseudoelemente heben —
   deckt boxed (.e-con-inner) wie full-width (direkte Widgets) ab */
body.single-trainer .elementor-element.archive-hero-content > .e-con-inner,
body.single-trainer .elementor-element.archive-hero-content > .elementor-element {
  position: relative;
  z-index: 1;
}
@media (max-width: 768px) {
  body.single-trainer .elementor-element.archive-hero-content {
    padding: 60px 1rem 128px;            /* mobile: standalone padding-top 60 + Elementor-Mobile-Bottom */
  }
}

/* =============================
   404 — Seite nicht gefunden
   Nutzt die Hero- und Karten-Struktur des Archivs; hier nur, was zusaetzlich
   gebraucht wird. Der Hero liegt auf dunklem Grund, deshalb helle Schrift.
   ============================= */
.error-404-kennzeichen {
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-primary);
  margin: 0 0 var(--space-2);
}
.error-404-adresse {
  margin: var(--space-3) 0 var(--space-4);
  font-size: 0.875rem;
  color: rgb(255 255 255 / 0.6);
  overflow-wrap: anywhere;
}
.error-404-adresse code {
  background: rgb(255 255 255 / 0.08);
  padding: 0.15em 0.45em;
  border-radius: var(--radius-sm, 4px);
}
.error-404-wege {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.error-404-ueberschrift {
  font-size: 1.5rem;
  margin: 0 0 var(--space-6);
  color: var(--color-primary, inherit);
}
/* .archive-content-section zieht sich mit -160px in den Hero. Auf den
   Archivseiten landet dort leerer Hero-Raum; hier stehen die Wege-Buttons.
   Der Innenabstand gibt sie wieder frei, ohne die Ueberlappung des
   Abschnitt-Hintergrunds anzutasten. */
body.trab-404 .archive-container {
  padding-top: 240px;
}
@media (max-width: 768px) {
  body.trab-404 .archive-container { padding-top: 150px; }
}
@media (max-width: 600px) {
  .error-404-wege .btn { width: 100%; }
}

/* =============================
   Registrierung & Aktivierung (wp-signup.php / wp-activate.php)
   Der Kern liefert das Formular; hier wird nur der Rahmen gestaltet und die
   Kern-Felder an die Seite angeglichen. Bewusst ueber die Kern-Klassen
   (.mu_register, .wp-activate-container, #content.widecolumn) — so bleibt es
   heil, wenn der Kern Felder ergaenzt.
   ============================= */
/* Der Inhaltsbereich zieht sich mit -160px in den Hero — dieselbe Überlappung
   wie bei den Karten im Archiv. Die Registrierung nutzt sie bewusst: die Karte
   ragt in den Hero, statt darunter in einer leeren Fläche zu stehen. */
body.trab-signup .archive-container {
  padding-top: 0;
  padding-bottom: var(--space-16, 4rem);
}

/* Zwei Spalten: links die Begründung, rechts das Formular des Kerns.
   Ohne die linke Spalte stünde die schmale Karte allein in der Breite. */
body.trab-signup .signup-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: var(--space-8, 2rem);
  align-items: stretch;
}
/* Der Bereich bringt unten 6rem Grundabstand mit — hier reicht deutlich
   weniger, sonst klafft eine leere Fläche über dem Footer. */
body.trab-signup .portal-wrapper {
  padding-bottom: var(--space-12, 3rem);
}
@media (max-width: 900px) {
  body.trab-signup .signup-layout {
    grid-template-columns: 1fr;
    gap: var(--space-8, 2rem);
  }
}

/* Die Nebenspalte bekommt eine eigene dunkle Fläche. Sich auf den Hero als
   Hintergrund zu verlassen ging schief: der endet auf halber Höhe, danach
   stand helle Schrift auf hellem Grund. Als eigene Fläche funktioniert sie in
   beiden Farbmodi und auf jeder Höhe. */
body.trab-signup .signup-weg {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: var(--space-8, 2.5rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, #2b3a2a 0%, #1a2333 60%, #131c2b 100%);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12), 0 18px 40px rgba(0,0,0,0.14);
  color: #fff;
}
body.trab-signup .signup-weg__titel {
  font-family: var(--font-headline);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.2;
  margin: 0 0 var(--space-8, 2rem);
  color: #fff;
}

/* Die drei Schritte. Die Nummer ist die Nummerndecke des Trabers — das
   einzige laute Element der Seite. Oswald ist hier Absicht: schmale,
   hohe Ziffern, wie sie auf der Decke stehen. */
body.trab-signup .signup-schritte {
  list-style: none;
  /* Mindestabstand nach unten: auf der kurzen Aktivierungsseite zieht
     `margin-top: auto` den Fußbereich sonst direkt an den letzten Schritt. */
  margin: 0 0 var(--space-8, 2rem);
  padding: 0;
  display: grid;
  gap: var(--space-6, 1.5rem);
}
body.trab-signup .signup-schritt {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: var(--space-4, 1rem);
  align-items: start;
}
body.trab-signup .signup-decke {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 58px;
  font-family: var(--font-headline);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1;
  /* Unten angeschrägt: die Decke läuft zum Sattel hin spitz zu */
  clip-path: polygon(0 0, 100% 0, 100% 78%, 50% 100%, 0 78%);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.45);
  transition: background var(--transition-fast), color var(--transition-fast);
}
body.trab-signup .signup-schritt--aktiv .signup-decke {
  background: var(--color-accent-primary);
  color: #fff;
}
body.trab-signup .signup-schritt--erledigt .signup-decke {
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.75);
}
body.trab-signup .signup-schritt__inhalt {
  display: block;
  padding-top: 0.35rem;
}
body.trab-signup .signup-schritt__titel {
  display: block;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.15rem;
}
body.trab-signup .signup-schritt__text {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
  line-height: 1.5;
}
/* Der noch nicht erreichte Schritt tritt zurück, ohne zu verschwinden */
body.trab-signup .signup-schritt--offen .signup-schritt__titel { color: rgba(255, 255, 255, 0.75); }
body.trab-signup .signup-schritt--offen .signup-schritt__text { color: rgba(255, 255, 255, 0.5); }

/* Augenbraue über der Überschrift — nennt denselben Stand wie die Leiste */
body.trab-signup .signup-augenbraue {
  font-family: var(--font-headline);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent-primary);
  margin: 0 0 var(--space-2, 0.5rem);
}
/* Sitzt am Fuß der Fläche: fängt den Leerraum ab, der entsteht, weil die
   Spalte auf die Höhe der Formularkarte gezogen wird. */
body.trab-signup .signup-weg__fuss {
  margin: var(--space-8, 2rem) 0 0;
  margin-top: auto;
  padding-top: var(--space-5, 1.25rem);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
}
body.trab-signup .signup-weg__fuss a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
body.trab-signup .signup-weg__fuss a:hover {
  color: var(--color-accent-primary);
}

/* Auf schmalen Anzeigen zuerst das Formular, die Begründung darunter */
@media (max-width: 900px) {
  body.trab-signup .signup-layout { display: flex; flex-direction: column; }
  body.trab-signup .signup-formular { order: 1; }
  body.trab-signup .signup-weg { order: 2; height: auto; }
}

/* Kern-Container: eigene Breitenvorgabe aufheben, unsere Karte darauf.
   Farben wie bei .news-card — heller Grundzustand, Dark-Mode weiter unten.
   Die neutral-Token kippen mit dem Theme, deshalb tragen sie Text und Rahmen
   in beiden Modi. */
body.trab-signup .widecolumn,
body.trab-signup .mu_register,
body.trab-signup .wp-activate-container {
  width: auto;
  max-width: none;
  margin: 0;
  padding: var(--space-8, 2.5rem);
  color: var(--color-neutral-800);
  background: #fff;
  border: 1px solid var(--color-neutral-300);
  border-radius: var(--radius-lg);
  /* Deutlicher als bei den Nachrichten-Karten: die Karte liegt über dem
     Hero-Verlauf und braucht eine klare Kante. */
  box-shadow: 0 4px 12px rgba(0,0,0,0.12), 0 18px 40px rgba(0,0,0,0.14);
}
/* Verschachtelung vermeiden: liegt die Kern-Karte in unserer, nur die aeussere */
body.trab-signup .widecolumn .mu_register,
body.trab-signup .widecolumn .wp-activate-container {
  max-width: none;
  padding: 0;
  background: none;
  border: 0;
}

body.trab-signup h2,
body.trab-signup .mu_register h2,
body.trab-signup #signup-welcome {
  margin-top: 0;
  font-size: 1.375rem;
}

body.trab-signup label,
body.trab-signup .mu_register label {
  display: block;
  font-weight: 600;
  color: var(--color-neutral-700);
  margin: var(--space-5, 1.25rem) 0 var(--space-2, 0.5rem);
}

body.trab-signup input[type=text],
body.trab-signup input[type=email],
body.trab-signup input[type=password],
body.trab-signup .mu_register input[type=text],
body.trab-signup .mu_register input[type=email] {
  width: 100%;
  max-width: 100%;
  padding: 0.7rem 0.9rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-neutral-300);
  background: #fff;
  color: var(--color-neutral-800);
}
body.trab-signup input:focus {
  outline: none;
  border-color: var(--color-accent-secondary);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Abgesetzte Hinweise unter den Feldern */
body.trab-signup .mu_register .prefix_address,
body.trab-signup .mu_register .suffix_address,
body.trab-signup p.wp-signup-blogname {
  font-size: 0.875rem;
  color: var(--color-neutral-600);
}

/* Auswahl „Website oder nur Benutzername": Beschriftung gehoert NEBEN den
   Knopf, nicht darunter — die Block-Regel oben gilt nur fuer Feld-Labels. */
body.trab-signup .wp-signup-radio-button {
  display: flex;
  align-items: baseline;
  gap: var(--space-2, 0.5rem);
  margin: var(--space-2, 0.5rem) 0;
}
body.trab-signup .wp-signup-radio-button label,
body.trab-signup label.checkbox {
  display: inline;
  margin: 0;
  font-weight: 400;
  color: inherit;
}
body.trab-signup .wp-signup-radio-button input[type=radio] {
  margin: 0;
  flex: 0 0 auto;
}

body.trab-signup .submit input[type=submit],
body.trab-signup input#submit,
body.trab-signup .mu_register input[type=submit] {
  display: inline-flex;
  width: auto;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: var(--space-6, 1.5rem);
  padding: var(--space-3, 0.75rem) var(--space-6, 1.5rem);
  border: 1px solid var(--color-accent-primary);
  border-radius: var(--radius-lg, 12px);
  background: var(--color-accent-primary);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast, 0.15s);
}
body.trab-signup .submit input[type=submit]:hover,
body.trab-signup input#submit:hover {
  background: var(--color-accent-secondary);
  border-color: var(--color-accent-secondary);
  transform: translateY(-1px);
}

/* ---- Erfolgsansicht der Aktivierung -------------------------------------
   Der Kern gibt Benutzername und Passwort als zwei Absätze aus. Als
   Datenkarte gesetzt sind sie das, was sie sind: Zugangsdaten zum Notieren. */
body.trab-signup #signup-welcome {
  margin: var(--space-6, 1.5rem) 0;
  border: 1px solid var(--color-neutral-300);
  border-radius: var(--radius-md);
  overflow: hidden;
}
body.trab-signup #signup-welcome p {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2, 0.5rem) var(--space-4, 1rem);
  align-items: baseline;
  margin: 0;
  padding: var(--space-3, 0.75rem) var(--space-4, 1rem);
  font-family: Consolas, Menlo, monospace;
  font-size: 1rem;
  word-break: break-all;
}
body.trab-signup #signup-welcome p + p {
  border-top: 1px solid var(--color-neutral-200);
}
body.trab-signup #signup-welcome .h3 {
  min-width: 8.5rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-neutral-600);
  word-break: normal;
}

/* Der Satz mit den Weiterführungen. Der Knopf trägt die Hauptaktion, der
   Nebenlink steht daneben statt mitten im Fließtext. */
body.trab-signup p.view,
body.trab-signup p.lead-in {
  margin: var(--space-5, 1.25rem) 0 0;
  line-height: 1.6;
}
body.trab-signup .signup-knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: var(--space-5, 1.25rem) var(--space-4, 1rem) 0 0;
  padding: var(--space-3, 0.75rem) var(--space-6, 1.5rem);
  border-radius: var(--radius-lg);
  background: var(--color-accent-primary);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}
body.trab-signup .signup-knopf:hover {
  background: var(--color-accent-secondary);
  transform: translateY(-1px);
  color: #fff;
}
body.trab-signup .signup-nebenlink {
  color: var(--color-accent-secondary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

[data-theme="dark"] body.trab-signup #signup-welcome {
  border-color: var(--color-neutral-200);
}
[data-theme="dark"] body.trab-signup #signup-welcome p + p {
  border-top-color: var(--color-neutral-200);
}
[data-theme="dark"] body.trab-signup .signup-nebenlink {
  color: var(--color-accent-primary);
}

/* Fehler- und Hinweismeldungen des Kerns */
body.trab-signup .error,
body.trab-signup .mu_alert {
  margin: var(--space-4, 1rem) 0;
  padding: var(--space-3, 0.75rem) var(--space-4, 1rem);
  border-left: 3px solid var(--color-error, #c0392b);
  border-radius: var(--radius-md);
  background: rgb(192 57 43 / 0.1);
  color: var(--color-neutral-800);
}

/* Dark Mode — nur die Flächen, die nicht über die neutral-Token kippen.
   Gleiches Vorgehen wie bei .news-card und dem Archiv-Filter. */
[data-theme="dark"] body.trab-signup .widecolumn,
[data-theme="dark"] body.trab-signup .mu_register,
[data-theme="dark"] body.trab-signup .wp-activate-container {
  background: var(--color-neutral-100);
  border-color: var(--color-neutral-200);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25), 0 18px 40px rgba(0,0,0,0.2);
}
[data-theme="dark"] body.trab-signup .widecolumn .mu_register,
[data-theme="dark"] body.trab-signup .widecolumn .wp-activate-container {
  background: none;
  box-shadow: none;
}
[data-theme="dark"] body.trab-signup input[type=text],
[data-theme="dark"] body.trab-signup input[type=email],
[data-theme="dark"] body.trab-signup input[type=password],
[data-theme="dark"] body.trab-signup .mu_register input[type=text],
[data-theme="dark"] body.trab-signup .mu_register input[type=email] {
  background: var(--color-neutral-50);
}
