/* Farbwelt des alten Auftritts, modernisiert:
   #990000 -> --wine, #CCCC99 -> --sand, #FFFFCC -> --cream */
:root {
  --wine: #8a1a1a;
  --wine-dark: #5c0f0f;
  --sand: #c9c69a;
  --cream: #faf7ef;
  --ink: #1c1a17;
  --muted: #6b6459;
  --line: #e4dfd2;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 16px/1.6 "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}

.wrap { width: min(1100px, 92vw); margin: 0 auto; }

.site-header { background: var(--wine-dark); border-bottom: 3px solid var(--sand); }
.header-inner { display: flex; align-items: baseline; justify-content: space-between; gap: 2rem; padding: 1rem 0; }
.brand { color: #fff; text-decoration: none; font-size: 1.45rem; letter-spacing: .12em; text-transform: uppercase; }
.brand span { display: block; font-size: .62rem; letter-spacing: .3em; color: var(--sand); }
.main-nav a { color: var(--cream); text-decoration: none; margin-left: 1.6rem; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; }
.main-nav a:hover { color: var(--sand); }

main { padding: 2.5rem 0 4rem; }
h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); color: var(--wine-dark); margin: 0 0 .4rem; }
h2 { color: var(--wine); margin-top: 2.4rem; }

.hero { padding: 3rem 0 2rem; border-bottom: 1px solid var(--line); }
.hero p { color: var(--muted); max-width: 46ch; }

.button {
  display: inline-block; margin-top: 1rem; padding: .7rem 1.4rem;
  background: var(--wine); color: #fff; text-decoration: none;
  border-radius: 2px; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase;
}
.button:hover { background: var(--wine-dark); }
.button-quiet { background: transparent; color: var(--wine-dark); border: 1px solid var(--wine); }
.button-quiet:hover { background: var(--sand); color: var(--wine-dark); }

.wine-grid { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.wine-card { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--sand); padding: 1rem 1.1rem; }
.wine-card a { text-decoration: none; color: inherit; }
.wine-name { display: block; font-weight: 600; color: var(--wine-dark); }
.wine-meta { display: block; font-size: .85rem; color: var(--muted); }

.entity-grid { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.entity-card { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--sand); padding: 1rem 1.1rem; }
.entity-card a { text-decoration: none; color: inherit; }

.region-list { list-style: none; padding: 0; display: grid; gap: .5rem; }
.region-list li { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--sand); padding: .7rem 1rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.region-list a { color: var(--wine-dark); font-weight: 600; text-decoration: none; }

.filter-form { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.5rem 0; }
.filter-form input, .filter-form select { padding: .5rem .6rem; border: 1px solid var(--line); background: #fff; color: var(--ink); font: inherit; }
.filter-form button { padding: .5rem 1rem; border: 0; background: var(--wine); color: #fff; font: inherit; cursor: pointer; }
.filter-form button:hover { background: var(--wine-dark); }

/* Bilder bleiben in ihrer natürlichen Größe: kleine Scans werden nicht auf
   Kachelbreite hochskaliert, große nur auf den verfügbaren Raum verkleinert. */
.thumb { display: block; width: auto; max-width: 100%; max-height: 140px; height: auto; object-fit: contain; margin-bottom: .7rem; background: var(--cream); }
.detail-photo { display: block; width: auto; max-width: 100%; max-height: 420px; height: auto; margin: 1rem 0; border: 1px solid var(--line); background: #fff; }
.detail-media { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1rem; }
.detail-etiket { display: block; width: auto; max-width: 200px; max-height: 300px; height: auto; object-fit: contain; margin: 1rem 0; border: 1px solid var(--line); background: #fff; }
.media-frame { display: block; margin-bottom: .7rem; }
.media-frame > .thumb,
.media-frame > .detail-photo,
.media-frame > .detail-etiket { margin-bottom: 0; }

/* Ruhiger Platzhalter, wenn kein Bild gesetzt ist oder die Datei nicht lädt. */
.media-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; min-height: 120px; margin-bottom: .7rem; padding: 1rem;
  background: var(--cream); border: 1px solid var(--line); color: var(--wine-dark);
  text-align: center;
}
.media-placeholder.detail-photo,
.media-placeholder.detail-etiket { max-width: 320px; min-height: 200px; }
.media-initial { font-size: 2.2rem; line-height: 1; color: var(--wine); }
.media-caption { margin-top: .5rem; font-size: .9rem; color: var(--muted); font-style: normal; }

/* Regionskarte: quadratischer Kartenausschnitt mit Bildnachweis darunter. */
.region-map { margin: 1.4rem 0; }
.region-map img { display: block; width: min(512px, 100%); height: auto; border: 1px solid var(--line); background: #fff; }
.region-map figcaption { margin-top: .4rem; font-size: .8rem; color: var(--muted); }
.region-map figcaption a { color: var(--muted); }
.media-note { display: block; margin: -.3rem 0 .7rem; font-size: .9rem; color: var(--muted); font-style: normal; }
.winery-about { max-width: 68ch; }
.winery-wines { margin: .4rem 0 1.2rem; }
.winery-wines a { color: var(--wine); }
.same-region { margin-top: 2.4rem; }

.detail .prose { max-width: 68ch; }
.muted { color: var(--muted); }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .25rem 1.2rem; margin: 1rem 0; }
dl.facts dt { color: var(--muted); font-size: .9rem; }
dl.facts dd { margin: 0; }
.pager { display: flex; gap: 1rem; justify-content: center; margin-top: 2rem; }
.pager a { color: var(--wine); }

.site-footer { border-top: 1px solid var(--line); padding: 1.5rem 0; color: var(--muted); font-size: .85rem; }
