@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/IBMPlexSans-Variable.ttf") format("truetype");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Sans";
  src: url("fonts/IBMPlexSans-Italic-Variable.ttf") format("truetype");
  font-weight: 100 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --koepchen-color-primary: #6A1B1B;
  --koepchen-color-text: #2F2F2F;
  --koepchen-color-muted: #555;
  --koepchen-color-surface: #FFFFFF;
  --koepchen-color-surface-soft: #F5F2ED;
  --koepchen-color-accent: #00B7C1;
  --koepchen-color-accent-dark: #006B7F;
  --koepchen-color-border: #DDD;
  --koepchen-font-family: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  --koepchen-font-weight-regular: 400;
  --koepchen-font-weight-medium: 500;
  --koepchen-font-weight-bold: 700;
}


/* Barrierefreiheit: visuell versteckt, aber für Screen-Reader und SEO sichtbar */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  font-family: var(--koepchen-font-family);
  margin: 0;
  padding: 0;
  background: var(--koepchen-color-surface-soft);
  color: var(--koepchen-color-text);
  line-height: 1.6;
}


.header-logo {
  display: block;
  margin: 0 auto;
  height: 90px;
  width: auto;
  max-width: 420px;
  /* Logo-Farben (weinrot + anthrazit) auf Weiß invertieren für den dunklen Header */
  filter: brightness(0) invert(1);
}

header {
  background: var(--koepchen-color-primary);
  color: var(--koepchen-color-surface);
  padding: 36px 20px 32px;
  text-align: center;
}

header h1 {
  margin-top: 0;
}

header p {
  margin-bottom: 0;
}

main {
  padding: 20px;
  max-width: 1000px;
  margin: auto;
}

h2,
h3 {
  color: var(--koepchen-color-primary);
}

a {
  color: var(--koepchen-color-accent-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 3px solid var(--koepchen-color-text);
  outline-offset: 3px;
}

.site-section,
.auction-card,
.content {
  background: var(--koepchen-color-surface);
  padding: 20px;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.auction-card[hidden] {
  display: none;
}

.auction-headline {
  background: #EAEAEA;
  padding: 15px;
  text-align: center;
  font-weight: bold;
  color: var(--koepchen-color-text);
  border-radius: 5px;
  margin: 0 0 20px;
}

.auction-subtitle {
  display: block;
  font-size: 1.1em;
  margin-top: 5px;
  color: var(--koepchen-color-muted);
}

.auction-order-note {
  margin-top: -6px;
  margin-bottom: 14px;
  color: var(--koepchen-color-muted);
}

.auction-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.auction-summary-item {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--koepchen-color-border);
  border-radius: 6px;
  background: var(--koepchen-color-surface);
}

.auction-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.action-link {
  display: inline-block;
  padding: 7px 12px;
  border: 1px solid var(--koepchen-color-primary);
  border-radius: 6px;
  font-weight: bold;
}

.gallery-help {
  margin-top: 0;
  color: var(--koepchen-color-muted);
  font-size: 0.95rem;
}

.auction-note {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--koepchen-color-surface-soft);
  border-left: 4px solid var(--koepchen-color-primary);
  border-radius: 6px;
}

.auction-details {
  margin-top: 16px;
}

.auction-details ul,
.document-list,
.legal-list {
  padding-left: 1.2rem;
}

.auction-details li,
.legal-list li {
  margin-bottom: 0.3rem;
}

.details-toggle {
  display: inline-block;
  margin: 8px 0 4px;
  padding: 6px 12px;
  background: none;
  border: 1px solid var(--koepchen-color-primary);
  border-radius: 6px;
  color: var(--koepchen-color-primary);
  font-family: var(--koepchen-font-family);
  font-size: 0.9rem;
  font-weight: var(--koepchen-font-weight-medium);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.details-toggle:hover,
.details-toggle:focus-visible {
  background: var(--koepchen-color-primary);
  color: var(--koepchen-color-surface);
  outline: none;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  justify-items: center;
}

.gallery a {
  width: 100%;
  display: block;
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--koepchen-color-border);
  border-radius: 6px;
  display: block;
  max-height: 220px;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.gallery img:hover {
  filter: brightness(0.9);
  cursor: pointer;
  transform: scale(1.03);
}

.lightbox {
  display: none;
  position: fixed;
  z-index: 999;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  justify-content: center;
  align-items: center;
  padding: 1rem;
  box-sizing: border-box;
}

.lightbox:target {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border: 4px solid white;
  border-radius: 8px;
}

.lightbox .prev,
.lightbox .next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2em;
  color: white;
  text-decoration: none;
  padding: 0 1rem;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 4px;
}

.lightbox .prev {
  left: 0;
}

.lightbox .next {
  right: 0;
}

.lightbox .close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: white;
  background: rgba(0, 0, 0, 0.55);
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  font-size: 1.5rem;
  line-height: 1;
  text-decoration: none;
}

.document-list {
  list-style: none;
  padding-left: 0;
}

.document-list li::before {
  content: "";
  margin-right: 0;
}

.document-list li {
  margin-bottom: 6px;
}

.document-list li a::before {
  content: "Dokument: ";
  font-weight: bold;
  margin-right: 5px;
}

.back-link {
  display: inline-block;
  margin-bottom: 20px;
}

.loading-message,
.empty-message {
  padding: 20px;
  background: var(--koepchen-color-surface);
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

footer {
  background: var(--koepchen-color-text);
  color: var(--koepchen-color-surface);
  text-align: center;
  padding: 14px 10px;
  font-size: 14px;
}

footer a {
  color: var(--koepchen-color-surface);
  margin: 0 8px;
}


.header-credential {
  margin: 10px 0 0;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.82);
  text-transform: uppercase;
}

.contact-phone {
  font-size: 1.15rem;
  font-weight: var(--koepchen-font-weight-bold);
  color: var(--koepchen-color-primary);
}

@media (max-width: 640px) {
  header {
    padding: 30px 16px;
  }

  main {
    padding: 16px;
  }

  .site-section,
  .auction-card,
  .content {
    padding: 16px;
  }

  .auction-headline {
    font-size: 1.25rem;
  }
}

@media print {
  /* Hintergründe und Schatten weglassen – spart Tinte */
  header {
    background: none;
    color: #000;
    border-bottom: 2pt solid #6A1B1B;
    padding: 12pt 0;
  }

  .header-logo {
    filter: none;
    height: 48pt;
  }

  .header-credential {
    color: #333;
    text-transform: none;
    font-size: 10pt;
  }

  .site-section,
  .auction-card,
  .content {
    box-shadow: none;
    border: 1pt solid #ccc;
    page-break-inside: avoid;
  }

  /* Galerien und Lightboxes nicht drucken */
  .gallery,
  .lightbox,
  .gallery-help,
  .auction-actions,
  .details-toggle {
    display: none !important;
  }

  /* Beim Drucken alle Positionen anzeigen */
  .details-full {
    display: block !important;
  }

  /* Hinweisbox schlicht */
  .auction-note {
    border-left: 3pt solid #6A1B1B;
    background: none;
  }

  /* Links: URL ausschreiben */
  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 8pt;
    color: #555;
  }

  /* Navigationselement und Footer vereinfachen */
  footer {
    background: none;
    color: #333;
    border-top: 1pt solid #ccc;
  }

  footer a {
    color: #333;
  }

  /* Seitenumbrüche sinnvoll setzen */
  h2 {
    page-break-after: avoid;
  }

  .auction-card {
    page-break-before: auto;
  }
}
