:root {
  --koepchen-color-primary: #6A1B1B;
  --koepchen-color-text: #2F2F2F;
  --koepchen-color-muted: #555;
  --koepchen-color-surface: #FFFFFF;
  --koepchen-color-surface-soft: #FAFAFA;
  --koepchen-color-accent-dark: #006B7F;
  --koepchen-color-border: #DDD;
  --koepchen-font-family: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
}

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 {
  background: var(--koepchen-color-primary);
  color: var(--koepchen-color-surface);
  padding: 40px 20px;
  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;
}

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

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

  main {
    padding: 16px;
  }

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

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