/* KSV Lübtheen – sportlich-dynamisches Design, Mobile-first */

/* ── Custom Properties ──────────────────────────────────────── */
:root {
  --color-bg:        #1a1a1a;
  --color-bg-card:   #242424;
  --color-bg-nav:    #111111;
  --color-accent:    #cc2200;
  --color-accent-h:  #e63300;
  --color-text:      #e8e8e8;
  --color-text-muted:#999999;
  --color-border:    #333333;
  --color-white:     #ffffff;
  --font:            system-ui, -apple-system, sans-serif;
  --max-width:       1200px;
  --radius:          6px;
  --transition:      0.2s ease;
}

/* ── Reset ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
a  { color: var(--color-accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-accent-h); }

/* ── Header ──────────────────────────────────────────────────── */
header {
  background: var(--color-bg-nav);
  border-bottom: 3px solid var(--color-accent);
  padding: 0 1rem;
}
.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 1rem;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.site-logo img { width: 60px; height: auto; }
.site-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-white);
  letter-spacing: 0.03em;
  line-height: 1.2;
}
.site-title span { color: var(--color-accent); }

/* ── Burger-Menü (Checkbox-Hack) ────────────────────────────── */
.nav-toggle { display: none; }
.nav-toggle-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle-label span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle:checked ~ .nav-toggle-label span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.nav-toggle:checked ~ .nav-toggle-label span:nth-child(2) {
  opacity: 0;
}
.nav-toggle:checked ~ .nav-toggle-label span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ── Navigation ──────────────────────────────────────────────── */
nav {
  background: var(--color-bg-nav);
}
nav ul {
  list-style: none;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
nav ul li a {
  display: block;
  padding: 0.85rem 1.1rem;
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 3px solid transparent;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
nav ul li a:hover,
nav ul li a.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  background: rgba(204,34,0,0.07);
}

/* ── Hauptinhalt ─────────────────────────────────────────────── */
main {
  flex: 1;
  max-width: var(--max-width);
  margin: 2rem auto;
  padding: 0 1rem;
  width: 100%;
}
.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

/* ── Karten / Sektionen ──────────────────────────────────────── */
.card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.card-accent {
  border-left: 4px solid var(--color-accent);
}

/* ── Typografie ──────────────────────────────────────────────── */
h1, h2, h3, h4 {
  color: var(--color-white);
  line-height: 1.25;
  margin-bottom: 0.5em;
}
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
h2 { font-size: clamp(1.2rem, 3vw, 1.7rem); border-left: 4px solid var(--color-accent); padding-left: 0.6rem; }
h3 { font-size: 1.15rem; color: var(--color-accent); }
h4 { font-size: 1rem; }
p  { margin-bottom: 1em; }
ul, ol { padding-left: 1.4em; margin-bottom: 1em; }
li { margin-bottom: 0.3em; }
small { color: var(--color-text-muted); font-size: 0.85em; }
table { width: 100%; border-collapse: collapse; margin-bottom: 1em; font-size: 0.9rem; }
th { background: var(--color-accent); color: var(--color-white); padding: 0.5rem 0.75rem; text-align: left; }
td { padding: 0.45rem 0.75rem; border-bottom: 1px solid var(--color-border); }
tr:nth-child(even) td { background: rgba(255,255,255,0.03); }

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.sidebar h2 { font-size: 1.1rem; }
.sidebar ul { list-style: none; padding: 0; }
.sidebar ul li { border-bottom: 1px solid var(--color-border); }
.sidebar ul li a {
  display: block;
  padding: 0.5rem 0;
  color: var(--color-text);
  font-size: 0.92rem;
  transition: color var(--transition), padding-left var(--transition);
}
.sidebar ul li a:hover {
  color: var(--color-accent);
  padding-left: 0.4rem;
}

/* ── Galerie ─────────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}
.gallery-grid figure a {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--radius);
  border: 2px solid var(--color-border);
  transition: border-color var(--transition), transform var(--transition);
}
.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.gallery-grid figure a:hover {
  border-color: var(--color-accent);
  transform: scale(1.03);
}

/* ── Buttons ──────────────────────────────────────────────────── */
button, .btn {
  display: inline-block;
  background: var(--color-accent);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius);
  padding: 0.65rem 1.4rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
}
button:hover, .btn:hover { background: var(--color-accent-h); }

/* ── Formulare ──────────────────────────────────────────────── */
.login-container {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 380px;
  width: 90%;
  margin: 2rem auto;
}
.login-container h1 { margin-bottom: 1.5rem; font-size: 1.4rem; }
label { display: block; margin-bottom: 0.3rem; font-size: 0.9rem; color: var(--color-text-muted); }
input[type="text"], input[type="password"] {
  width: 100%;
  padding: 0.6rem 0.8rem;
  margin-bottom: 1rem;
  background: #2d2d2d;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  color: var(--color-text);
  font-size: 1rem;
}
input[type="text"]:focus, input[type="password"]:focus {
  outline: 2px solid var(--color-accent);
  border-color: var(--color-accent);
}
.login-container button { width: 100%; margin-top: 0.5rem; }
.error { color: #ff6b6b; background: rgba(255,50,50,0.1); border: 1px solid #ff4444; border-radius: var(--radius); padding: 0.5rem 0.75rem; margin-bottom: 1rem; }

/* ── Footer ──────────────────────────────────────────────────── */
footer {
  background: var(--color-bg-nav);
  border-top: 2px solid var(--color-border);
  text-align: center;
  padding: 1.25rem 1rem;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}
footer a { color: var(--color-text-muted); }
footer a:hover { color: var(--color-accent); }

/* ── Zitat / Spruch ───────────────────────────────────────────── */
blockquote, .spruch {
  border-left: 4px solid var(--color-accent);
  padding: 0.75rem 1rem;
  background: rgba(204,34,0,0.07);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--color-text-muted);
  margin: 1em 0;
}

/* ── Responsive: Tablet ─────────────────────────────────────── */
@media (min-width: 768px) {
  .content-grid {
    grid-template-columns: 1fr 280px;
  }
  .nav-toggle-label { display: none; }
  nav ul { flex-wrap: nowrap; }
}

/* ── Responsive: Desktop ─────────────────────────────────────── */
@media (min-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr 300px;
  }
  .header-inner { min-height: 80px; }
  .site-title { font-size: 1.5rem; }
}

/* ── Mobile Nav (Burger) ─────────────────────────────────────── */
@media (max-width: 767px) {
  .nav-toggle-label { display: flex; }
  nav ul {
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  /* Checkbox ist Geschwister von header und nav im body */
  #nav-toggle:checked ~ nav ul { max-height: 500px; }
  nav ul li a { border-bottom: 1px solid var(--color-border); }
  .content-grid { grid-template-columns: 1fr; }
}

/* ── Galerie-Figcaption ──────────────────────────────────────── */
figure { margin: 0; }
figcaption { text-align: center; font-size: 0.8rem; color: var(--color-text-muted); margin-top: 0.25rem; }

/* ── Hilfklassen ─────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--color-text-muted); }
.mt-1 { margin-top: 1rem; }
.mb-1 { margin-bottom: 1rem; }
