/**
 * Dampflokclub Theme Main Styles
 * Mobile First, Performance & Accessibility focused
 */

/* Globale Typografie */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-headings);
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-2);
  color: var(--text) !important; /* Höchste Priorität für schwarze Überschriften */
}

p, li, span {
  font-family: var(--font-body);
}

/* Fahrten-spezifische Titel - breitere Selektoren für bessere Kompatibilität */
.fahrt-title,
.fahrt-title a {
  color: var(--white) !important;
  font-weight: 600;
  text-decoration: none;
}

.fahrt-title a:hover {
  color: var(--primary-gold) !important;
  text-decoration: underline;
}

/* Alternative für spezifische Fahrten-Seiten */
.post-type-archive-fahrten .fahrt-title,
.post-type-archive-fahrten .fahrt-title a,
.archive.tax-fahrten .fahrt-title,
.archive.tax-fahrten .fahrt-title a {
  color: var(--white) !important;
}

/* Layout & Structure */
.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-content {
  flex: 1;
  padding: 0 var(--space-2); /* Mehr Seitenabstand */
}

/* Header */
.site-header {
  background: var(--black);
  border-bottom: var(--border-width) solid var(--primary-gold);
  position: sticky;
  top: 0;
  z-index: 998;
  border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* Marquee Banner (Bahnhof-Anzeigetafel) */
.marquee-banner {
  background: #000000 !important;
  color: #FFD700 !important;
  font-family: 'Courier New', monospace;
  font-size: 1rem;
  font-weight: bold;
  padding: 12px 0;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  border-bottom: 3px solid #FFD700;
  border-top: 1px solid #FFD700;
  text-transform: uppercase;
  letter-spacing: 1px;
  min-height: 50px;
  display: block;
  width: 100%;
  z-index: 50;
  border-radius: var(--border-radius-small);
}

.marquee-content {
  display: inline-block;
  animation: marquee-immediate 100s linear infinite;
  white-space: nowrap;
  line-height: 1;
  position: absolute;
  top: 50%;
  right: 99%;
  padding: 0;
  margin: 0;
  color: #FFD700;
  font-size: 1.5rem;
  font-weight: bold;
  text-indent: 0;
  letter-spacing: 0;
  transform: translateY(-50%);
}

/* Desktop-spezifische Anpassung */
@media (min-width: 768px) {
  .marquee-content {
    top: 7px;
    transform: none;
  }
}

/* Mobile-spezifische Anpassung */
@media (max-width: 767px) {
  .marquee-content {
    top: 3px;
    transform: translateY(-50%);
  }
}

.marquee-banner {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.marquee-text {
  display: inline;
  padding: 0;
  margin: 0;
  color: #FFD700;
  padding-left: 0;
  margin-left: 0;
}

.marquee-banner:hover .marquee-content {
  animation-play-state: paused;
}

@keyframes marquee-immediate {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-800px);
  }
}

/* Mobile Animation mit vertikaler Zentrierung */
@media (max-width: 767px) {
  @keyframes marquee-immediate {
    0% {
      transform: translateY(-50%) translateX(0);
    }
    100% {
      transform: translateY(-50%) translateX(-800px);
    }
  }
}

@keyframes marquee {
  0% {
    transform: translate3d(0, 0, 0);
  }
  100% {
    transform: translate3d(-100%, 0, 0);
  }
}

.marquee-item {
  display: inline;
  margin-right: 0;
  color: #FFD700;
}

.marquee-item::before {
  content: "● ";
  color: #DC143C;
  margin-right: 1rem;
  animation: blink 2s ease-in-out infinite alternate;
}

@keyframes blink {
  0% { opacity: 1; }
  100% { opacity: 0.4; }
}

/* Responsive Marquee */
@media (max-width: 767px) {
  .marquee-banner {
    font-size: 0.875rem;
    padding: 0.5rem 0;
    min-height: 35px;
  }
  
  .marquee-content {
    animation-duration: 25s;
  }
  
  .marquee-item {
    margin-right: 4rem;
  }
}

/* Responsive Marquee */
@media (max-width: 767px) {
  .marquee-banner {
    font-size: 0.875rem;
    padding: var(--space-1) 0;
    min-height: 35px;
  }
  
  .marquee-content {
    animation-duration: 25s;
  }
  
  .marquee-item {
    margin-right: 4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-content {
    animation: none !important;
    transform: translateX(0) !important;
    padding-left: var(--space-2) !important;
    white-space: normal !important;
  }
  
  .marquee-item::before {
    animation: none !important;
  }
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2);
  min-height: 70px;
  position: relative;
  width: 100%;
  max-width: none;
}

.site-branding {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 101;
}

.site-logo-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 101;
  margin-left: var(--space-2);
  order: 10; /* Ensure it appears after the menu/toggle */
}

.site-logo-right img {
  max-height: 50px; /* Match the height of the left logo */
  width: auto;
  display: block;
}

@media (max-width: 768px) {
  .site-logo-right img {
    max-height: 40px; /* Slightly smaller on mobile if needed, or keep 50px */
  }

  .site-logo-right {
    order: 1; /* Move to the left, after site-branding (order 0) */
    margin-left: var(--space-2);
    margin-right: 0;
  }

  /* Hide menu label on mobile to make button compact */
  .menu-label {
    display: none;
  }
}

/* Desktop Navigation - versteckt auf mobile */
.main-navigation {
  display: none;
  margin-left: auto;
  order: 2;
}

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-3);
}

.secondary-navigation {
  display: none;
  order: 3;
}

.secondary-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-3);
}

/* Mobile Menu Toggle - sichtbar auf mobile */
.menu-toggle {
  background: none;
  border: 2px solid var(--primary-gold);
  padding: var(--space-1);
  border-radius: var(--border-radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-left: auto;
  order: 3;
  z-index: 102;
  position: relative;
  color: var(--primary-gold);
}

.site-title {
  margin: 0;
  font-family: var(--font-headings);
  font-size: 2rem; /* Größer für bessere Sichtbarkeit */
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.site-title a {
  color: var(--primary-gold);
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-title a:hover,
.site-title a:focus {
  color: var(--white);
}

.custom-logo {
  max-height: 50px;
  width: auto;
}

.site-description {
  margin: 0;
  font-size: 0.875rem;
  color: var(--primary-gold);
  display: none;
}

/* Navigation */
.main-navigation {
  display: none;
  margin-left: auto;
}

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--space-3);
  justify-content: flex-end;
}

/* Desktop Dropdown-Menü Styling */
.main-navigation li,
.secondary-navigation li {
  position: relative;
}

/* Submenü (Dropdown) - standardmäßig versteckt auf Desktop */
.main-navigation ul ul,
.secondary-navigation ul ul {
  position: absolute;
  top: 100%;
  background: var(--black);
  border: 1px solid var(--primary-gold);
  border-radius: var(--border-radius-small);
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  display: block;
  flex-direction: column;
  gap: 0;
  padding: var(--space-1);
}

.main-navigation ul ul {
  left: 0;
}

.secondary-navigation ul ul {
  right: 0;
  left: auto;
}

/* Dropdown beim Hover anzeigen */
.main-navigation li:hover > ul,
.main-navigation li:focus-within > ul,
.secondary-navigation li:hover > ul,
.secondary-navigation li:focus-within > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Submenü Links */
.main-navigation ul ul a,
.secondary-navigation ul ul a {
  padding: var(--space-2);
  display: block;
  border-bottom: none;
  border-radius: var(--border-radius-small);
  margin: 2px 0;
}

.main-navigation ul ul a:hover,
.main-navigation ul ul a:focus,
.secondary-navigation ul ul a:hover,
.secondary-navigation ul ul a:focus {
  background: var(--primary-gold);
  color: var(--black) !important; /* Force black text on hover */
}

/* Multi-Level Dropdown - Dritte Ebene (Sub-Sub-Menü) */
.main-navigation ul ul ul,
.secondary-navigation ul ul ul {
  position: absolute;
  top: 0;
  margin-left: 5px; /* Kleiner Abstand */
  background: var(--black);
  border: 1px solid var(--primary-gold);
  border-radius: var(--border-radius-small);
  min-width: 200px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1001; /* Höher als erste Ebene */
}

.main-navigation ul ul ul {
  left: 100%; /* Seitlich statt übereinander */
  transform: translateX(-10px);
}

.secondary-navigation ul ul ul {
  right: 100%; /* Open to the left */
  left: auto;
  margin-right: 5px;
  margin-left: 0;
  transform: translateX(10px);
}

/* Dritte Ebene beim Hover anzeigen */
.main-navigation ul ul li:hover > ul,
.main-navigation ul ul li:focus-within > ul {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.secondary-navigation ul ul li:hover > ul,
.secondary-navigation ul ul li:focus-within > ul {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Wenn das Sub-Sub-Menü zu weit rechts wäre, links öffnen (nur für Main Nav relevant) */
.main-navigation ul ul li:last-child ul,
.main-navigation ul ul li.menu-item-has-children:nth-last-child(-n+2) ul {
  left: auto;
  right: 100%;
  margin-left: 0;
  margin-right: 5px;
  transform: translateX(10px);
}

.main-navigation ul ul li:last-child:hover > ul,
.main-navigation ul ul li:last-child:focus-within > ul,
.main-navigation ul ul li.menu-item-has-children:nth-last-child(-n+2):hover > ul,
.main-navigation ul ul li.menu-item-has-children:nth-last-child(-n+2):focus-within > ul {
  transform: translateX(0);
}

/* Pfeil-Indikator für Menüs mit Untermenüs */
.main-navigation .menu-item-has-children > a::after,
.secondary-navigation .menu-item-has-children > a::after {
  content: "▼";
  margin-left: 0.5rem;
  font-size: 0.8rem;
  transition: transform 0.2s ease;
  display: inline-block;
}

.main-navigation ul ul .menu-item-has-children > a::after {
  content: "▶";
  float: right;
  margin-left: 0;
}

.secondary-navigation ul ul .menu-item-has-children > a::after {
  content: "◀"; /* Arrow pointing left */
  float: left;
  margin-right: 0.5rem;
  margin-left: 0;
}

.main-navigation li:hover > a::after,
.secondary-navigation li:hover > a::after {
  transform: rotate(180deg);
}

.main-navigation ul ul li:hover > a::after,
.secondary-navigation ul ul li:hover > a::after {
  transform: rotate(0deg); /* Seitenpfeil bleibt unverändert */
}

.main-navigation a {
  color: var(--primary-gold) !important;
  text-decoration: none;
  font-weight: 500;
  padding: var(--space-1) 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.main-navigation a:hover,
.main-navigation a:focus {
  color: var(--white) !important;
  border-bottom-color: var(--white);
}

/* Active State - Only underline top-level items */
.main-navigation > ul > li.current-menu-item > a,
.main-navigation > ul > li.current_page_item > a,
.main-navigation > ul > li.current-menu-ancestor > a,
.main-navigation > ul > li.current-menu-parent > a {
  border-bottom-color: var(--primary-gold);
}

/* Prioritize direct top-level match over ancestor match */
/* If a top-level item is the current page, don't underline the ancestor (parent of a sub-link to the same page) */
.main-navigation:has(> ul > li.current-menu-item) > ul > li.current-menu-ancestor > a,
.main-navigation:has(> ul > li.current_page_item) > ul > li.current-menu-ancestor > a {
  border-bottom-color: transparent;
}

.secondary-navigation > ul > li.current-menu-item > a,
.secondary-navigation > ul > li.current_page_item > a,
.secondary-navigation > ul > li.current-menu-ancestor > a,
.secondary-navigation > ul > li.current-menu-parent > a {
  border-bottom-color: var(--primary-gold);
}

.secondary-navigation:has(> ul > li.current-menu-item) > ul > li.current-menu-ancestor > a,
.secondary-navigation:has(> ul > li.current_page_item) > ul > li.current-menu-ancestor > a {
  border-bottom-color: transparent;
}

/* Prevent multiple items from being underlined (e.g. if page is in multiple submenus) */
/* Only the first occurrence will be underlined */
.main-navigation > ul > li.current-menu-item ~ li.current-menu-item > a,
.main-navigation > ul > li.current_page_item ~ li.current_page_item > a,
.main-navigation > ul > li.current-menu-ancestor ~ li.current-menu-ancestor > a,
.main-navigation > ul > li.current-menu-parent ~ li.current-menu-parent > a {
  border-bottom-color: transparent;
}

.secondary-navigation > ul > li.current-menu-item ~ li.current-menu-item > a,
.secondary-navigation > ul > li.current_page_item ~ li.current_page_item > a,
.secondary-navigation > ul > li.current-menu-ancestor ~ li.current-menu-ancestor > a,
.secondary-navigation > ul > li.current-menu-parent ~ li.current-menu-parent > a {
  border-bottom-color: transparent;
}

/* Chromium sometimes ignores `color` when -webkit-text-fill-color is set elsewhere.
   Force both properties for all link states to ensure consistent gold color. */
.secondary-navigation a,
.secondary-navigation a:link,
.secondary-navigation a:visited {
  color: var(--primary-gold) !important;
  -webkit-text-fill-color: var(--primary-gold) !important;
  text-decoration: none;
  font-weight: 500;
  padding: var(--space-1) 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease;
}

.secondary-navigation a:hover,
.secondary-navigation a:focus {
  color: var(--white) !important;
  -webkit-text-fill-color: var(--white) !important;
}

/* Ensure sub-menu items turn black on hover (overriding the white above) */
.secondary-navigation ul ul a:hover,
.secondary-navigation ul ul a:focus {
  color: var(--black) !important;
  -webkit-text-fill-color: var(--black) !important;
}

/* Mobile Menu Toggle Hover States */
.menu-toggle:hover,
.menu-toggle:focus {
  border-color: var(--red);
}

.menu-toggle[aria-expanded="true"] .menu-text {
  text-decoration: underline;
}

.hamburger {
  width: 20px;
  height: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}

.hamburger span {
  display: block;
  height: 2px;
  background: var(--primary-gold);
  transition: all 0.2s ease;
}

.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation Overlay */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #f8f9fa; /* Gleiche Hintergrundfarbe wie die Website */
  z-index: 999;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  padding-top: 120px; /* Platz für Marquee + Header */
  border-radius: 0 var(--border-radius-large) var(--border-radius-large) 0;
}

.mobile-nav.is-open {
  transform: translateX(0);
}

/* Mobile Navigation Header mit Schließen-Button */
.mobile-nav-header {
  position: absolute;
  top: 140px; /* Niedriger positioniert - unter Header und Marquee */
  right: var(--space-3);
  z-index: 1001;
}

.mobile-nav-close {
  background: none;
  border: none; /* Kein Rahmen */
  color: #000; /* Noch dunkler für besseren Kontrast */
  padding: var(--space-1);
  border-radius: 0; /* Keine runden Ecken */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; /* Feste Breite für Touch-Zielgröße */
  height: 44px; /* Feste Höhe für Touch-Zielgröße */
  transition: all 0.3s ease;
}

.mobile-nav-close:hover,
.mobile-nav-close:focus {
  background: rgba(0, 0, 0, 0.1); /* Leichter dunkler Hintergrund beim Hover */
  color: #000;
  transform: scale(1.1);
}

.mobile-nav-close svg {
  width: 24px;
  height: 24px;
}

.mobile-nav ul {
  list-style: none;
  margin: 0;
  padding: var(--space-2);
}

.mobile-nav li {
  border-bottom: var(--border-width) solid rgba(0, 0, 0, 0.2); /* Etwas sichtbarere Trenner */
}

.mobile-nav a {
  display: block;
  padding: var(--space-2) 0;
  color: #000; /* Schwarz für maximalen Kontrast und beste Lesbarkeit */
  text-decoration: none;
  font-size: 1.125rem;
  font-family: var(--font-headings); /* Oswald-Schrift für Konsistenz */
  font-weight: 600; /* Etwas fetter für bessere Lesbarkeit */
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.mobile-nav a:hover,
.mobile-nav a:focus {
  color: var(--primary-red); /* Rote Farbe beim Hover für Konsistenz */
  background: rgba(183, 28, 28, 0.1); /* Leichter roter Hintergrund beim Hover */
  border-radius: var(--border-radius-small);
}

/* Mobile Submenü - immer sichtbar */
.mobile-nav ul ul {
  display: block;
  opacity: 1;
  visibility: visible;
  position: static;
  box-shadow: none;
  border: none;
  background: transparent;
  min-width: auto;
  transform: none;
  padding-left: var(--space-3);
  margin-top: var(--space-1);
}

.mobile-nav ul ul a {
  font-size: 1rem;
  padding: var(--space-1) 0;
  color: rgba(255, 204, 0, 0.9);
  text-transform: none;
  font-weight: 400;
}

.mobile-nav ul ul a:hover,
.mobile-nav ul ul a:focus {
  color: var(--white);
  background: rgba(255, 204, 0, 0.15);
}

.mobile-menu-divider {
  height: 1px;
  background-color: rgba(255, 255, 255, 0.1);
  margin: var(--space-2) 0;
}

/* Mobile: Desktop-Dropdown-Verhalten deaktivieren */
@media (max-width: 767px) {
  .main-navigation ul ul {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    display: block !important;
  }
}

/* Content */
.content-area {
  padding: var(--space-4) 0;
}

/* Hero Slideshow */
.hero-slideshow {
  position: relative;
  width: 100%;
  max-height: 70vh;
  overflow: hidden;
  margin-bottom: var(--space-4);
}

.slideshow-container {
  position: relative;
  width: 100%;
  height: 500px;
  background: var(--black);
  border-radius: var(--border-radius-large);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.slides {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 0;
  pointer-events: none;
}

.slide.active {
  opacity: 1;
  z-index: 1;
  pointer-events: auto;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.slide-content {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  right: var(--space-4);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: var(--space-4) var(--space-3) var(--space-3);
  border-radius: var(--border-radius);
  color: var(--white);
  text-align: center;
}

.slide-content h2 {
  font-family: var(--font-headings);
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--primary-gold) !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.slide-content p {
  font-size: 1.1rem;
  color: var(--white);
  margin: 0;
  line-height: 1.5;
}

/* Slideshow Navigation Buttons */
.slide-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid var(--primary-gold);
  color: var(--primary-gold);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-btn:hover,
.slide-btn:focus {
  background: var(--primary-gold);
  color: var(--black);
  transform: translateY(-50%) scale(1.1);
}

.prev-btn {
  left: var(--space-3);
}

.next-btn {
  right: var(--space-3);
}

/* Slide Indicators (Dots) */
.slide-indicators {
  position: absolute;
  bottom: var(--space-3);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--space-2);
  z-index: 10;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--primary-gold);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active,
.dot:hover {
  background: var(--primary-gold);
  transform: scale(1.2);
}

/* Responsive Slideshow */
@media (max-width: 768px) {
  .slideshow-container {
    height: 400px;
  }
  
  .slide-content {
    bottom: var(--space-2);
    left: var(--space-2);
    right: var(--space-2);
    padding: var(--space-3) var(--space-2) var(--space-2);
  }
  
  .slide-content h2 {
    font-size: 1.5rem;
  }
  
  .slide-content p {
    font-size: 1rem;
  }
  
  .slide-btn {
    width: 40px;
    height: 40px;
  }
  
  .prev-btn {
    left: var(--space-2);
  }
  
  .next-btn {
    right: var(--space-2);
  }
}

@media (min-width: 1024px) {
  .slideshow-container {
    height: 600px;
  }
  
  .slide-content h2 {
    font-size: 2.5rem;
  }
  
  .slide-content p {
    font-size: 1.2rem;
  }
}

/* Content ohne Boxen - direkt auf der Seite */
.entry-header,
.entry-content,
.page-content,
.archive-header {
  background: transparent; /* Kein Hintergrund */
  color: var(--text); /* Goldener Text auf rotem Hintergrund */
  padding: var(--space-2) 0; /* Nur vertikales Padding */
  margin: var(--space-3) 0; /* Weniger Margin */
  border-radius: 0; /* Keine runden Ecken */
  border: none; /* Kein Rahmen */
  box-shadow: none; /* Kein Schatten */
  transition: none; /* Keine Hover-Effekte */
}

.entry-header:hover,
.entry-content:hover,
.page-content:hover,
.archive-header:hover {
  transform: none;
  box-shadow: none;
}

.site-main {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--space-4) var(--space-2); /* Mehr Abstand oben/unten und seitlich */
}

/* Posts & Pages */
.entry-header {
  margin-bottom: var(--space-3);
}

.entry-title {
  font-family: var(--font-headings);
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
  color: var(--text) !important; /* Schwarz für alle anderen Einträge - höchste Priorität */
  line-height: 1.2;
}

.entry-meta {
  font-size: 0.875rem;
  color: var(--text); /* Schwarz statt gedämpftes Gold */
  margin-bottom: var(--space-2);
}

.entry-meta a {
  color: var(--text);
}

.entry-meta a:hover,
.entry-meta a:focus {
  color: var(--text); /* Schwarz beim Hover */
}

.entry-content {
  margin-bottom: var(--space-4);
  color: var(--text); /* Goldener Text */
}

.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  color: var(--text) !important; /* Schwarze Überschriften - höchste Priorität */
  margin-top: var(--space-3);
  margin-bottom: var(--space-2);
}

.entry-content > * + * {
  margin-top: var(--space-3);
}

.entry-content p {
  margin-bottom: var(--space-2);
  color: var(--text); /* Goldener Text */
}

.entry-content a {
  color: var(--white); /* Weiße Links für besseren Kontrast */
  text-decoration: underline;
}

.entry-content a:hover,
.entry-content a:focus {
  color: var(--primary-gold); /* Heller beim Hover */
}

.entry-content blockquote {
  border-left: 4px solid var(--primary-gold);
  margin: var(--space-3) 0;
  padding-left: var(--space-3);
  font-style: italic;
  color: rgba(255, 204, 0, 0.9); /* Leicht gedämpftes Gold */
  background: rgba(255, 204, 0, 0.1); /* Sehr transparenter goldener Hintergrund */
  padding: var(--space-2) var(--space-3);
  border-radius: var(--border-radius-small);
}

.entry-footer {
  padding-top: var(--space-2);
  border-top: var(--border-width) solid rgba(255, 204, 0, 0.3); /* Goldener Trenner */
  font-size: 0.875rem;
  color: rgba(255, 204, 0, 0.8); /* Gedämpftes Gold */
}

/* Post Navigation */
.post-navigation {
  margin: var(--space-4) 0;
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
}

.post-navigation a {
  flex: 1;
  padding: var(--space-2);
  border: var(--border-width) solid #e5e5e5;
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--text);
}

.post-navigation a:hover,
.post-navigation a:focus {
  border-color: var(--red);
  background: var(--bg);
}

.post-navigation .nav-next {
  text-align: right;
}

/* Archive */
.archive-header {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: var(--border-width) solid rgba(255, 204, 0, 0.3); /* Goldener Trenner */
}

.archive-title {
  font-family: var(--font-headings);
  font-size: 2.2rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
  color: var(--text); /* Zurück zu schwarz für andere Archive-Seiten */
  line-height: 1.2;
}

.archive-description {
  color: var(--text); /* Schwarz statt gedämpftes Gold */
}

/* Pagination */
.pagination {
  margin: var(--space-4) 0;
  text-align: center;
}

.page-numbers {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  margin: 0 var(--space-1);
  border: var(--border-width) solid #e5e5e5;
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--text);
}

.page-numbers:hover,
.page-numbers:focus {
  border-color: var(--red);
  background: var(--bg);
}

.page-numbers.current {
  background: var(--primary-gold);
  border-color: var(--primary-gold);
  color: var(--black);
}

/* Search */
.search-form {
  display: flex;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
}

.search-field {
  flex: 1;
  padding: var(--space-2);
  border: var(--border-width) solid #e5e5e5;
  border-radius: var(--border-radius);
  font-size: 1rem;
}

.search-field:focus {
  border-color: var(--red);
  outline: none;
}

.search-submit {
  padding: var(--space-2) var(--space-3);
  background: var(--primary-gold);
  border: none;
  border-radius: var(--border-radius);
  color: var(--black);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 50px;
}

.search-submit:hover,
.search-submit:focus {
  background: #E6C200;
}

.search-submit svg {
  width: 18px;
  height: 18px;
}

/* 404 Page */
.error-404 .page-header {
  text-align: center;
  margin-bottom: var(--space-4);
}

.error-404 .page-content {
  text-align: center;
}

.error-actions {
  margin-top: var(--space-4);
  text-align: left;
}

.error-actions > div {
  margin-bottom: var(--space-4);
  padding: var(--space-3);
  border: var(--border-width) solid #e5e5e5;
  border-radius: var(--border-radius);
}

.error-actions h2 {
  text-align: center;
  margin-bottom: var(--space-3);
}

.error-actions h3 {
  color: var(--red);
  margin-bottom: var(--space-2);
}

.helpful-links {
  list-style: none;
  padding: 0;
  margin: var(--space-2) 0;
}

.helpful-links li {
  margin-bottom: var(--space-1);
}

.recent-posts-list {
  list-style: none;
  padding: 0;
  margin: var(--space-2) 0;
}

.recent-posts-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-1) 0;
  border-bottom: var(--border-width) solid #f0f0f0;
}

.recent-posts-list .post-date {
  font-size: 0.875rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  background: var(--black);
  color: var(--primary-gold);
  padding: var(--space-4) 0 var(--space-2);
  margin-top: auto;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.footer-content {
  display: grid;
  gap: var(--space-4);
  margin-bottom: var(--space-3);
  grid-template-columns: 1fr 1fr 1.5fr;
  max-width: 1400px;
  margin: 0 auto var(--space-3) auto;
  padding: 0 var(--space-4);
}

.footer-info h3 {
  color: var(--primary-gold);
  margin-bottom: var(--space-2);
}

.footer-info p {
  color: #ccc;
  margin: 0;
  line-height: 1.6;
}

.footer-navigation {
  display: flex;
  justify-content: center;
}

.footer-newsletter {
  display: flex;
  justify-content: flex-end;
}

.footer-newsletter .newsletter-section {
  background: transparent;
  padding: 0;
  margin: 0;
  max-width: none;
  width: 100%;
  border: none;
}

.footer-newsletter .newsletter-section h3 {
  color: var(--primary-gold);
  font-size: 1.2em;
  margin-bottom: var(--space-2);
}

.footer-newsletter .newsletter-section .newsletter-description {
  color: #ccc;
  font-size: 0.9em;
  margin-bottom: var(--space-3);
}

.footer-newsletter .newsletter-form input[type="email"] {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid #555;
  color: #ccc;
}

.footer-newsletter .newsletter-form input[type="email"]:focus {
    border-color: var(--primary-gold);
    background: rgba(255, 255, 255, 0.2);
}

/* Footer Newsletter spezifische Anpassungen */
.footer-newsletter .newsletter-fields {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: end;
}

.footer-newsletter .newsletter-inputs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.footer-newsletter .newsletter-button {
    margin-top: 0;
    height: fit-content;
    align-self: end;
}.footer-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.footer-menu a,
#footer-menu a {
  color: #FFD700 !important;
  text-decoration: none;
  font-size: 0.875rem;
}

.footer-menu a:hover,
.footer-menu a:focus,
#footer-menu a:hover,
#footer-menu a:focus {
  color: var(--white) !important;
}

.site-info {
  text-align: center;
  font-size: 0.875rem;
  color: #ccc;
  padding-top: var(--space-2);
  border-top: var(--border-width) solid #555;
}

/* Responsive Design */
@media (min-width: 768px) {
  .site-description {
    display: block;
  }
  
  /* Desktop: Menu Toggle verstecken */
  .menu-toggle {
    display: none !important;
  }
  
  /* Desktop: Hauptnavigation anzeigen */
  .main-navigation {
    display: block !important;
    margin-left: var(--space-3); /* Space from left logo */
    margin-right: auto; /* Push everything else to the right */
    order: 2;
  }

  /* Desktop: Sekundäre Navigation anzeigen */
  .secondary-navigation {
    display: block !important;
    margin-left: auto; /* Push to the right */
    margin-right: var(--space-3); /* Space from right logo */
    order: 3;
  }
  
  /* Desktop: Mobile Nav komplett verstecken */
  .mobile-nav {
    display: none !important;
  }
  
  .main-navigation ul {
    justify-content: flex-start; /* Left align items */
  }

  .secondary-navigation ul {
    justify-content: flex-end; /* Right align items */
  }
  
  /* Desktop: Mobile Nav komplett verstecken */
  .mobile-nav {
    display: none !important;
  }
  
  /* Desktop: Header Container anpassen */
  .header-container {
    padding: var(--space-3) var(--space-2);
  }
  
  .site-logo-right {
    margin-left: 0; /* Reset margin since menu pushes it */
    order: 10;
  }
  
  .mobile-nav {
    display: none;
  }
  
  .footer-content {
    grid-template-columns: 1fr 1fr 1.5fr;
  }
  
  .footer-navigation {
    justify-content: center;
  }
  
  .footer-newsletter {
    justify-content: flex-end;
  }
  
  /* Desktop Newsletter Layout beibehalten */
  .footer-newsletter .newsletter-fields {
    grid-template-columns: 1fr auto;
  }
  
  .footer-newsletter .newsletter-inputs {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1024px) {
  .header-container {
    padding: var(--space-3) 0;
  }
  
  .content-area {
    padding: var(--space-5) 0; /* Mehr Abstand auf größeren Bildschirmen */
  }
  
  .site-content {
    padding: 0 var(--space-4); /* Mehr Seitenabstand auf Desktop */
  }
  
  .site-main {
    padding: var(--space-5) var(--space-4); /* Noch mehr Abstand auf Desktop */
  }
  
  .entry-title {
    font-size: 3rem; /* Größere Überschriften auf Desktop */
  }
  
  .archive-title {
    font-size: 2.8rem; /* Größere Archive-Titel auf Desktop */
  }
  
  .post-navigation {
    flex-direction: row;
  }
  
  .post-navigation .nav-previous {
    max-width: 45%;
  }
  
  .post-navigation .nav-next {
    max-width: 45%;
  }
}

/* === MARQUEE BANNER STYLES === */
.marquee-banner {
  background: #000000 !important;
  color: #FFD700 !important;
  font-family: 'Courier New', monospace !important;
  font-size: 1rem !important;
  font-weight: bold !important;
  padding: 0.75rem 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  position: relative !important;
  border-bottom: 3px solid #FFD700 !important;
  border-top: 1px solid #FFD700 !important;
  text-transform: uppercase !important;
  letter-spacing: 1px !important;
  min-height: 40px !important;
  display: flex !important;
  align-items: center !important;
  z-index: 50 !important;
}

.marquee-content {
  display: inline-block !important;
  animation: marqueeScroll 30s linear infinite !important;
  padding-left: 100% !important;
  will-change: transform !important;
  line-height: 1.2 !important;
  color: #FFD700 !important;
}

.marquee-banner:hover .marquee-content {
  animation-play-state: paused !important;
}

@keyframes marqueeScroll {
  0% {
    transform: translate3d(100%, 0, 0);
  }
  100% {
    transform: translate3d(-100%, 0, 0);
  }
}

.marquee-item {
  display: inline !important;
  margin-right: 6rem !important;
  color: #FFD700 !important;
}

.marquee-item::before {
  content: "● " !important;
  color: #DC143C !important;
  margin-right: 1rem !important;
  animation: marqueeBlink 2s ease-in-out infinite alternate !important;
}

@keyframes marqueeBlink {
  0% { opacity: 1; }
  100% { opacity: 0.4; }
}

/* Responsive Marquee */
@media (max-width: 767px) {
  .marquee-banner {
    font-size: 0.875rem !important;
    padding: 0.5rem 0 !important;
    min-height: 35px !important;
  }
  
  .marquee-content {
    animation-duration: 25s !important;
  }
  
  .marquee-item {
    margin-right: 4rem !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-content {
    animation: none !important;
    transform: translateX(0) !important;
    padding-left: 1rem !important;
    white-space: normal !important;
  }
  
  .marquee-item::before {
    animation: none !important;
  }
}

/* Newsletter Section Styling */
.newsletter-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 2.5rem 0;
    border-top: 3px solid #FFD700;
    border-bottom: 1px solid #444;
    position: relative;
    margin-bottom: 2rem;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #FFD700, transparent);
}

.newsletter-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.newsletter-title {
    color: #FFD700 !important;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.newsletter-title i {
    font-size: 1.8rem;
}

.newsletter-description {
    color: #ccc;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.newsletter-form {
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-fields {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: end;
}

.newsletter-field {
    position: relative;
}

.newsletter-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #444;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.newsletter-input:focus {
    outline: none;
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.newsletter-input::placeholder {
    color: #999;
}

.newsletter-button {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 52px;
    transition: all 0.3s ease;
}

.newsletter-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3);
}

.newsletter-privacy {
    text-align: center;
    color: #999;
    margin-top: 1rem;
}

.newsletter-privacy i {
    color: #FFD700;
    margin-right: 0.5rem;
}

/* Footer Mobile Responsive */
@media (max-width: 767px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-6);
        padding: 0 var(--space-2);
    }
    
    .footer-navigation {
        justify-content: center;
    }
    
    .footer-newsletter {
        justify-content: center;
    }
    
    .footer-menu ul {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Newsletter Mobile Responsive */
@media (max-width: 768px) {
    .newsletter-section {
        padding: 1.5rem 0;
        margin-bottom: 1.5rem;
    }
    
    .newsletter-content {
        padding: 0 1rem;
    }
    
    .newsletter-title {
        font-size: 1.6rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .newsletter-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .newsletter-fields {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .newsletter-button {
        width: 100%;
        justify-content: center;
        padding: 1rem 2rem;
    }
}

@media (max-width: 480px) {
    .newsletter-title {
        font-size: 1.4rem;
    }
    
    .newsletter-input {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
    
    .newsletter-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
        min-height: 48px;
    }
}

/* Fahrten-spezifische Überschriften - nur für Fahrten-Seite */
.post-type-archive-fahrten .page-title,
.post-type-archive-fahrten .entry-title,
.archive.tax-fahrten .page-title,
.archive.tax-fahrten .entry-title {
  color: var(--white) !important;
}

/* Alternative für Fahrten-Seite - basierend auf Inhalt */
.page-title:has(.fa-clock) {
  color: var(--white) !important; /* Fahrten-Überschrift weiß */
}

.fahrten-page .entry-title {
  color: var(--white) !important; /* Fahrten-Einträge weiß */
}


.waagenreihung {
  max-width: 70% !important;
  padding: 0.75rem 1rem !important;

  img {
    object-fit: contain !important;
    width: 100%;
    height: auto;
    margin-bottom: 1cm !important; /* Abstand zwischen Bildern bei Zeilenumbrüchen */
  }
}