/* ================================================
   FFW Niederlibbach – Modernes HTML5 Design
   Farben: Rot #CC0000, Weiß, Dunkelgrau
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;600;700&family=Source+Sans+3:wght@400;600&display=swap');

:root {
  --rot:       #CC0000;
  --rot-dunkel:#990000;
  --rot-hell:  #ff1a1a;
  --weiss:     #ffffff;
  --grau-hell: #f5f5f5;
  --grau-mid:  #e0e0e0;
  --grau:      #666666;
  --dunkel:    #1a1a1a;
  --schatten:  0 2px 8px rgba(0,0,0,0.15);
  --radius:    4px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Source Sans 3', sans-serif;
  font-size: 16px;
  color: var(--dunkel);
  background: var(--grau-hell);
  line-height: 1.6;
}

/* ── HEADER ─────────────────────────────────── */
header {
  background: var(--rot);
  color: var(--weiss);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--weiss);
}

.logo-icon {
  font-size: 2rem;
  line-height: 1;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-title {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.logo-sub {
  font-size: 0.72rem;
  opacity: 0.85;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── NAVIGATION ─────────────────────────────── */
nav {
  background: var(--dunkel);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

nav a {
  color: var(--weiss);
  text-decoration: none;
  font-family: 'Oswald', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.7rem 1rem;
  display: block;
  transition: background 0.2s, color 0.2s;
  border-bottom: 3px solid transparent;
}

nav a:hover,
nav a.aktiv {
  background: var(--rot);
  border-bottom-color: var(--rot-hell);
}

/* Hamburger */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--weiss);
  font-size: 1.5rem;
}

.nav-mobile {
  display: none;
  background: var(--dunkel);
  flex-direction: column;
}

.nav-mobile a {
  padding: 0.8rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-family: 'Oswald', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--weiss);
  text-decoration: none;
  display: block;
}

.nav-mobile a:hover,
.nav-mobile a.aktiv {
  background: var(--rot);
}

.nav-mobile.offen { display: flex; }

/* ── MAIN CONTENT ───────────────────────────── */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
}

/* ── PAGE HERO ──────────────────────────────── */
.page-hero {
  background: var(--rot);
  color: var(--weiss);
  padding: 2.5rem 1rem;
  text-align: center;
  margin-bottom: 0;
}

.page-hero h1 {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.page-hero p {
  margin-top: 0.5rem;
  opacity: 0.9;
  font-size: 1rem;
}

/* ── CARDS ──────────────────────────────────── */
.card {
  background: var(--weiss);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.card h2 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.3rem;
  color: var(--rot);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--grau-mid);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card h3 {
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  margin: 1rem 0 0.5rem;
  color: var(--dunkel);
}

/* ── TABLES ─────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead th {
  background: var(--dunkel);
  color: var(--weiss);
  font-family: 'Oswald', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.6rem 0.8rem;
  text-align: left;
  white-space: nowrap;
}

tbody tr { border-bottom: 1px solid var(--grau-mid); }
tbody tr:last-child { border-bottom: none; }
tbody tr:nth-child(even) { background: var(--grau-hell); }
tbody tr:hover { background: #fff0f0; }

tbody td, tbody th {
  padding: 0.5rem 0.8rem;
  vertical-align: top;
}

tbody th { font-weight: 600; white-space: nowrap; }

/* Jahreszeile */
tr.jahr th {
  background: var(--rot);
  color: var(--weiss);
  text-align: center;
  font-family: 'Oswald', sans-serif;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
}

/* Farbcodes aus Originalseite */
.pflicht { color: var(--rot); font-weight: 700; }
.katszug { color: #009933; font-style: italic; }
.veranstaltung { color: #0055cc; }

/* ── COLLAPSIBLE ────────────────────────────── */
details {
  background: var(--weiss);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  margin-bottom: 1rem;
  overflow: hidden;
}

details summary {
  font-family: 'Oswald', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 1rem 1.2rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--weiss);
  color: var(--dunkel);
  user-select: none;
  transition: background 0.2s;
}

details summary::-webkit-details-marker { display: none; }

details summary::after {
  content: '▸';
  color: var(--rot);
  font-size: 1rem;
  transition: transform 0.3s;
}

details[open] summary::after { transform: rotate(90deg); }
details[open] summary { background: var(--grau-hell); }
details summary:hover { background: var(--grau-hell); }

.details-content {
  padding: 1rem 1.2rem 1.2rem;
  border-top: 2px solid var(--rot);
}

/* ── AKTUELLES GRID ─────────────────────────── */
.aktuell-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.aktuell-item {
  background: var(--weiss);
  border-radius: var(--radius);
  border-left: 4px solid var(--rot);
  padding: 1rem 1.2rem;
  box-shadow: var(--schatten);
}

.aktuell-item.pflicht { border-left-color: var(--rot); }
.aktuell-item.katszug { border-left-color: #009933; }
.aktuell-item.veranstaltung { border-left-color: #0055cc; }

.aktuell-item .datum {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grau);
  margin-bottom: 0.3rem;
}

.aktuell-item p {
  font-size: 0.95rem;
  line-height: 1.4;
}

/* ── FOOTER ─────────────────────────────────── */
footer {
  background: var(--dunkel);
  color: var(--weiss);
  margin-top: 3rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
}

.footer-col h4 {
  font-family: 'Oswald', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--rot-hell);
  margin-bottom: 0.8rem;
}

.footer-col p,
.footer-col a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  display: block;
  line-height: 1.8;
}

.footer-col a:hover { color: var(--weiss); }

.footer-bottom {
  background: #111;
  text-align: center;
  padding: 0.8rem 1rem;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.45);
}

/* ── DOWNLOAD BUTTONS ───────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  background: var(--rot);
  color: var(--weiss);
  border-radius: var(--radius);
  text-decoration: none;
  font-family: 'Oswald', sans-serif;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: background 0.2s, transform 0.1s;
  box-shadow: var(--schatten);
}

.btn:hover {
  background: var(--rot-dunkel);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  border: 2px solid var(--rot);
  color: var(--rot);
}

.btn-ghost:hover {
  background: var(--rot);
  color: var(--weiss);
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}

.download-card {
  background: var(--weiss);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  border-top: 3px solid var(--rot);
}

.download-card .icon { font-size: 2.2rem; }
.download-card h3 { font-family: 'Oswald', sans-serif; font-size: 1rem; text-transform: uppercase; }
.download-card p { font-size: 0.85rem; color: var(--grau); flex: 1; }

/* ── GALERIE ────────────────────────────────── */
.galerie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.8rem;
  margin-top: 1rem;
}

.galerie-item {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  cursor: pointer;
  background: var(--grau-mid);
}

.galerie-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.galerie-item:hover img { transform: scale(1.06); }

.galerie-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  color: var(--weiss);
  padding: 1.5rem 0.7rem 0.6rem;
  font-size: 0.8rem;
  pointer-events: none;
}

.galerie-caption strong { display: block; font-size: 0.9rem; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 1rem;
}

.lightbox.aktiv { display: flex; }

.lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.lightbox-caption {
  color: var(--weiss);
  text-align: center;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.lightbox-close {
  position: absolute;
  top: 1rem; right: 1.5rem;
  font-size: 2.5rem;
  color: var(--weiss);
  cursor: pointer;
  line-height: 1;
  background: none;
  border: none;
  transition: color 0.2s;
}

.lightbox-close:hover { color: var(--rot-hell); }

/* ── RESPONSIVE ─────────────────────────────── */
@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-inner { display: none; }

  .header-inner { height: 56px; }
  .logo-title { font-size: 0.95rem; }

  main { padding: 1.2rem 0.8rem 2rem; }

  .galerie-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }

  table { font-size: 0.82rem; }
  thead th, tbody td, tbody th { padding: 0.4rem 0.5rem; }

  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .download-grid { grid-template-columns: 1fr; }
  .aktuell-grid { grid-template-columns: 1fr; }
}
