/* =========================================================
   Oldtimer-Freunde Katzberg – Vereinswebsite
   Retro-Optik: Creme, Tannengrün, Messing
   ========================================================= */

:root {
  --tinte:        #2b2b26;
  --creme:        #f5efdf;
  --hell:         #fffdf6;
  --gruen:        #3f5c46;
  --gruen-dunkel: #2c4231;
  --gold:         #b08d4f;
  --rahmen:       #e3d9bf;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--creme);
  color: var(--tinte);
  line-height: 1.65;
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 1rem 2rem; }

h1, h2, h3 {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--gruen-dunkel);
  line-height: 1.25;
}

h1 { font-size: 1.9rem; margin: 1.5rem 0 1rem; }
h2 { font-size: 1.4rem; margin: 1.5rem 0 .75rem; }
h3 { font-size: 1.15rem; margin: 0 0 .35rem; }

a { color: var(--gruen); }
a:hover { color: var(--gold); }

p.small, .small { font-size: .85rem; color: #6b6353; }

code { background: var(--hell); border: 1px solid var(--rahmen); border-radius: 4px; padding: 0 .3rem; }

/* ---------- Navigation ---------- */
.topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .75rem 1.5rem;
  padding: 1rem 0;
  border-bottom: 3px double var(--gold);
  margin-bottom: 1.5rem;
}
.brand {
  font-family: Georgia, serif;
  font-size: 1.3rem;
  font-weight: bold;
  text-decoration: none;
  color: var(--gruen-dunkel);
}
.brand span { color: var(--gold); }
.links a { margin-left: 1rem; text-decoration: none; color: var(--tinte); font-weight: 500; }
.links a:hover { color: var(--gold); }

@media (max-width: 640px) {
  .brand { font-size: 1.1rem; }
  .links a { margin-left: .6rem; font-size: .95rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin: 0 0 2rem;
  box-shadow: 0 3px 10px rgba(44, 66, 49, .25);
}
.hero img { width: 100%; height: 340px; object-fit: cover; display: block; }
.hero-text {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 3rem 1.5rem 1.25rem;
  background: linear-gradient(transparent, rgba(20, 25, 18, .85));
  color: #fff;
}
.hero-text h1 { color: #fff; margin: 0 0 .25rem; font-size: 2rem; }
.hero-text p { margin: 0; font-size: 1.05rem; }

@media (max-width: 640px) {
  .hero img { height: 220px; }
  .hero-text h1 { font-size: 1.4rem; }
  .hero-text p { font-size: .9rem; }
}

/* ---------- Layout ---------- */
.zweispalten { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 800px) { .zweispalten { grid-template-columns: 1fr; } }

/* ---------- Karten (Fahrzeuge) ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; margin-top: 1rem; }
.card {
  background: var(--hell);
  border: 1px solid var(--rahmen);
  border-radius: 10px;
  padding: 1rem;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .07);
  transition: transform .12s ease, box-shadow .12s ease;
  display: block;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 5px 14px rgba(44, 66, 49, .18); color: inherit; }
.card img, .card .ph {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: .75rem;
}
.card .ph {
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 1rem;
  background: var(--gruen); color: #fff;
  font-family: Georgia, serif; font-size: 1.1rem;
}
.card h2 { font-size: 1.15rem; margin: 0 0 .25rem; }
.card p { margin: 0; font-size: .9rem; color: #6b6353; }

/* ---------- Fahrzeug-Detail ---------- */
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; background: var(--hell); border: 1px solid var(--rahmen); border-radius: 12px; padding: 1.5rem; }
@media (max-width: 700px) { .detail { grid-template-columns: 1fr; } }
.detail img, .detail .ph { width: 100%; border-radius: 8px; aspect-ratio: 4/3; object-fit: cover; }
.detail .ph { display: flex; align-items: center; justify-content: center; background: var(--gruen); color: #fff; font-family: Georgia, serif; font-size: 1.3rem; }
.detail dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: 1rem 0; }
.detail dt { font-weight: 600; color: var(--gruen-dunkel); }
.detail dd { margin: 0; }

/* ---------- Termine ---------- */
.termin {
  display: flex; gap: 1.1rem; align-items: flex-start;
  background: var(--hell);
  border: 1px solid var(--rahmen);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.datum {
  min-width: 76px;
  background: var(--gruen);
  color: #fff;
  border-radius: 8px;
  text-align: center;
  padding: .45rem 0;
  font-family: Georgia, serif;
  line-height: 1.2;
}
.datum .tag { display: block; font-size: 1.6rem; }
.termin.vergangen .datum { background: #9a9484; }
.termin h3 { margin-bottom: .15rem; }

/* ---------- News ---------- */
.artikel {
  background: var(--hell);
  border: 1px solid var(--rahmen);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}
.artikel h2 { margin-top: 0; }

/* ---------- Galerie ---------- */
.galerie-grid { gap: 1rem; }
.galerie-grid figure {
  margin: 0;
  background: var(--hell);
  border: 1px solid var(--rahmen);
  border-radius: 10px;
  overflow: hidden;
}
.galerie-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.galerie-grid figcaption { padding: .5rem .75rem; font-size: .88rem; color: #6b6353; }

/* ---------- Formulare ---------- */
.btn {
  display: inline-block;
  background: var(--gruen);
  color: #fff;
  padding: .55rem 1.2rem;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
}
.btn:hover { background: var(--gruen-dunkel); color: #fff; }
.btn.gelb { background: var(--gold); }
.btn.gelb:hover { background: #96783f; color: #fff; }

.form {
  display: grid;
  gap: 1rem;
  max-width: 640px;
  background: var(--hell);
  padding: 1.5rem;
  border: 1px solid var(--rahmen);
  border-radius: 10px;
  margin-bottom: 2rem;
}
.form label { font-weight: 600; display: block; margin-bottom: .3rem; }
.form input, .form textarea {
  width: 100%;
  padding: .55rem .7rem;
  border: 1px solid #cbbf9e;
  border-radius: 6px;
  font: inherit;
  background: #fff;
}
.form textarea { min-height: 8rem; resize: vertical; }

.filter { display: flex; gap: .6rem; margin: 1rem 0; max-width: 480px; }
.filter input { flex: 1; padding: .5rem .7rem; border: 1px solid #cbbf9e; border-radius: 6px; font: inherit; }

/* ---------- Tabellen (Admin) ---------- */
.tablewrap { overflow-x: auto; border: 1px solid var(--rahmen); border-radius: 10px; margin-top: 1rem; }
table { width: 100%; border-collapse: collapse; background: var(--hell); }
th, td { padding: .6rem .9rem; border-bottom: 1px solid #eee4cf; text-align: left; vertical-align: top; font-size: .95rem; }
th { background: var(--gruen); color: #fff; font-family: Georgia, serif; font-weight: normal; }
tr:last-child td { border-bottom: none; }
img.thumb { width: 90px; height: 60px; object-fit: cover; border-radius: 4px; display: block; }

/* ---------- Meldungen ---------- */
.flash {
  background: #e2efdd;
  border: 1px solid #7ea86f;
  padding: .8rem 1.1rem;
  border-radius: 8px;
  margin: 0 0 1.5rem;
}
.flash.fehler { background: #f7dede; border-color: #c66a6a; }

/* ---------- Kacheln (Admin-Dashboard) ---------- */
.kachel {
  background: var(--hell);
  border: 1px solid var(--rahmen);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
}
.kachel .zahl { font-family: Georgia, serif; font-size: 2rem; color: var(--gruen-dunkel); display: block; }
.kachel .bezeichnung { font-size: .9rem; color: #6b6353; }
.kachel .neu { font-weight: 700; color: var(--gold); }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  border-top: 3px double var(--gold);
  text-align: center;
  font-size: .95rem;
  color: #6b6353;
}
.site-footer p { margin: .3rem 0; }
