/* ANFANG: style.css (Barrierefrei optimiert 2025) */
/* Open Sans local einbinden */
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/open-sans-v43-latin-regular.woff2') format('woff2');
  font-display: swap;
}

/* Farbvariablen für einfaches Umstylen - WCAG AA konform */
:root {
  --hintergrund: #f7f8fa;
  --box-hintergrund: #ffffff;
  --rahmen: #d1d5db;
  --rahmen-hover: #9ca3af;
  --text: #111827;
  --text-mittel: #374151;
  --text-hell: #4b5563;
  --blau: #1e40af;
  --akzent: #1d4ed8;
  --schatten: 0 4px 24px rgba(0, 0, 0, 0.1);
  --focus-ring: #2563eb;
  --hover-bg: #f3f4f6;
  --error: #dc2626;
  --success: #16a34a;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: 'Open Sans', Arial, Helvetica, sans-serif;
  background: var(--hintergrund);
  color: var(--text);
  font-size: 17px;
  line-height: 1.7;
}

/* Skip Navigation Link für Screenreader */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--text);
  color: white;
  padding: 8px;
  border-radius: 4px;
  text-decoration: none;
  z-index: 1000;
  font-weight: bold;
}
.skip-link:focus { top: 6px; }

/* Fokus-Indikatoren für bessere Accessibility */
:focus { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none; }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }

/* Modernes Grid-Layout */
.layout-grid {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 40px;
  max-width: 1700px;
  margin: 0 auto;
  padding: 32px 12px;
  align-items: flex-start;
}
@media (max-width: 950px) {
  .layout-grid { grid-template-columns: 1fr; }
  aside { margin-top: 38px; }
}
aside, .sidebar { width: 100%; background: none; padding: 0; }

/* Header */
header {
  background: var(--box-hintergrund);
  border-bottom: 2px solid var(--rahmen);
  padding: 28px 0 20px 0;
  box-shadow: var(--schatten);
  margin-bottom: 8px;
  text-align: center;
}
header h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--text);
  font-weight: 700;
  font-family: inherit;
}

/* Anzeigen Grid */
.anzeigen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 28px;
  margin: 2rem 0;
}

@media (min-width: 1600px) {
  .anzeigen-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.anzeige-link {
  text-decoration: none;
  color: inherit;
  display: block;
  border-radius: 18px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.anzeige-link:hover,
.anzeige-link:focus {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0,0,0,0.15);
}
.anzeige {
  background: var(--box-hintergrund);
  border-radius: 18px;
  box-shadow: var(--schatten);
  padding: 32px 20px 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 380px;
  max-width: 290px;
  margin: 0 auto;
  position: relative;
  border: 2px solid var(--rahmen);
  transition: border-color 0.2s;
}
.anzeige:hover { border-color: var(--rahmen-hover); }
.bild-wrapper {
  width: 112px; height: 112px;
  background: var(--box-hintergrund);
  border-radius: 12px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px; border: 2px solid var(--rahmen);
}
.anzeige img.portrait {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 10px; background: #fafbfc;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
/* Alt-Text Fallback für Bilder ohne src */
.anzeige img.portrait[alt]:empty::after {
  content: attr(alt);
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 0.875rem; color: var(--text-hell); padding: 1rem;
}
/* Anzeige Info */
.anzeige-info {
  flex: 1 1 auto;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; min-height: 110px;
}
.anzeige-titel {
  font-size: 1.1rem;
  color: var(--text);
  margin: 6px 0 4px 0;
  font-weight: 700;
  text-align: center;
  line-height: 1.4;
  font-family: inherit;
}
.anzeige-datum {
  font-size: 0.98rem;
  color: var(--text);
  margin-bottom: 2px;
  font-weight: 600;
}
.anzeige-ort {
  font-size: 0.92rem;
  color: var(--text-hell);
  margin-bottom: 0;
  font-weight: 500;
}
/* Buttons */
.anzeige-btn, .anzeige .anzeige-btn {
  margin-top: 16px;
  background: var(--text);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 0.97rem;
  width: 100%;
  font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  min-height: 44px;
  text-align: center; text-decoration: none;
}
.anzeige-btn:hover, .anzeige .anzeige-btn:hover,
.anzeige-btn:focus, .anzeige .anzeige-btn:focus {
  background: var(--akzent); color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(37,99,235,0.3);
}
/* Pagination */
.pagination {
  margin: 38px 0 20px 0;
  display: flex; justify-content: center; align-items: center; gap: 8px; font-family: inherit;
}
.pagination a, .pagination strong, .pagination span {
  min-width: 44px; height: 44px; display: inline-flex; justify-content: center; align-items: center;
  font-size: 0.94rem; font-weight: 600; border-radius: 8px;
  text-decoration: none; border: 2px solid var(--rahmen);
  background: var(--box-hintergrund); color: var(--text);
  transition: all 0.2s; user-select: none;
}
.pagination a:hover, .pagination a:focus {
  background: var(--hover-bg); border-color: var(--akzent); color: var(--akzent);
}
.pagination strong {
  background: var(--akzent); color: white; border-color: var(--akzent);
}
.pagination span {
  background: transparent; border: none; color: var(--text-hell);
}

/* Sidebar */
.sidebar .box, aside .box {
  background: var(--box-hintergrund);
  border-radius: 18px;
  box-shadow: var(--schatten);
  padding: 24px 20px;
  margin-bottom: 32px;
  border: 2px solid var(--rahmen);
}
.sidebar h2, .sidebar h3, aside h2, aside h3 {
  margin: 0 0 16px 0;
  font-size: 1.13rem; color: var(--text); font-weight: 700; font-family: inherit;
}
.sidebar-nav, .sidebar-links {
  list-style: none; padding: 0; margin: 12px 0 0 0;
  display: flex; flex-direction: column; gap: 8px;
}
.sidebar-nav a, .sidebar-links a {
  display: block; padding: 12px 16px; background: var(--hover-bg); color: var(--blau);
  border-radius: 8px; font-size: 0.94rem; text-decoration: none;
  font-family: inherit; font-weight: 500; transition: all 0.2s;
  min-height: 44px; align-items: center; border: 2px solid transparent;
}
.sidebar-nav a:hover, .sidebar-links a:hover,
.sidebar-nav a:focus, .sidebar-links a:focus {
  background: var(--akzent); color: white; border-color: var(--akzent);
}

/* Footer */
footer, .site-footer {
  background: #f6f8fb; padding: 24px 0; text-align: center; font-size: 0.88rem;
  color: var(--text-hell); border-top: 2px solid var(--rahmen);
  margin-top: 48px; line-height: 1.6; border-radius: 0 0 22px 22px;
  box-shadow: 0 6px 20px 0 rgba(36,45,66,0.03) inset;
}
footer a, .site-footer a { color: var(--blau); text-decoration: underline; font-weight: 500; }
footer a:hover, .site-footer a:hover, footer a:focus, .site-footer a:focus { color: var(--akzent); }

/* Suchergebnisse */
.suchergebnis {
  font-size: 1.13rem; color: var(--blau); font-weight: 700; margin: 16px 0 24px 0;
}

/* Cookie Banner - WCAG konform */
.cookie-hinweis {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0; z-index: 2000;
  background: var(--text); color: white; padding: 16px;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.2);
  justify-content: center; align-items: center; gap: 24px;
  font-size: 0.94rem; flex-wrap: wrap;
}
.cookie-hinweis p { margin: 0; font-size: 0.94rem; text-align: center; line-height: 1.6; }
.cookie-hinweis a { color: white; text-decoration: underline; font-weight: 600; }
.cookie-ok-btn {
  background: white; color: var(--text); border: 2px solid white;
  padding: 12px 24px; border-radius: 8px; cursor: pointer;
  font-weight: 600; font-size: 0.94rem; margin-left: 18px; transition: all 0.2s; min-height: 44px;
}
.cookie-ok-btn:hover, .cookie-ok-btn:focus {
  background: var(--hover-bg); color: var(--akzent); border-color: var(--hover-bg);
}

/* Responsive Design */
@media (max-width: 1020px) {
  .layout-grid {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 32px clamp(16px, 4vw, 32px) 0;
  }
  aside { margin-top: 48px; max-width: 720px; margin-left: auto; margin-right: auto; }
}
@media (max-width: 768px) {
  .layout-grid { padding: 16px clamp(8px, 2vw, 16px) 0; }
  main { padding: 0 clamp(8px, 2vw, 16px); }
  .anzeigen-grid { gap: 22px; }
  .anzeige { padding: 20px 10px 16px 10px; min-height: 300px; }
  .sidebar .box, aside .box { padding: 20px 12px; }
  .pagination a, .pagination strong, .pagination span { min-width: 36px; height: 36px; font-size: 0.89rem; }
  .cookie-hinweis { flex-direction: column; gap: 16px; padding: 16px clamp(8px, 2vw, 16px); font-size: 0.88rem; }
  .cookie-ok-btn { margin-left: 0; width: 100%; max-width: 300px; }
}

/* Reduzierte Animationen */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
/* Hoher Kontrast */
@media (prefers-contrast: high) {
  :root {
    --rahmen: #000000;
    --text-hell: #444444;
    --schatten: 0 4px 24px rgba(0,0,0,0.3);
  }
  .anzeige, .sidebar .box, aside .box { border-width: 3px; }
}
/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --hintergrund: #111827;
    --box-hintergrund: #1f2937;
    --rahmen: #4b5563;
    --rahmen-hover: #6b7280;
    --text: #f9fafb;
    --text-mittel: #d1d5db;
    --text-hell: #9ca3af;
    --blau: #3b82f6;
    --akzent: #2563eb;
    --hover-bg: #374151;
    --focus-ring: #60a5fa;
  }
  footer, .site-footer { background: #1f2937; }
}
/* Anzeigen-Links und Buttons: immer schwarz wie Text */
.anzeige a,
.anzeige-btn,
.anzeige .anzeige-btn,
.anzeige-link {
  color: var(--text) !important;
}

/* Anzeige-Links (z.B. "Zur Anzeige") Hintergrund wie gehabt, aber Text bleibt schwarz */
.anzeige-btn,
.anzeige .anzeige-btn {
  background: var(--text);
  color: #fff !important;
}
.sidebar-links a,
.sidebar-nav a {
  color: var(--text) !important;
}

.sidebar-links a:hover,
.sidebar-nav a:hover,
.sidebar-links a:focus,
.sidebar-nav a:focus {
  color: var(--text) !important;
  background: var(--hover-bg);
}
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9-Format */
  height: 0;
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  border: 0;
}


/* ENDE: style.css */
