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

:root {
  --color-bg: #f5f0e8;
  --color-bg-alt: #ede6d8;
  --color-text: #3a3328;
  --color-text-light: #6b5f4e;
  --color-accent: #5c7a3a;
  --color-accent-dark: #3d5227;
  --color-accent-light: #8aab5e;
  --color-gold: #b8943e;
  --color-gold-light: #d4b86a;
  --color-white: #fdfbf7;
  --color-border: #d4cbb8;
  --color-card: #ffffff;
  --font-heading: 'Georgia', 'Times New Roman', serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --shadow-sm: 0 1px 3px rgba(58, 51, 40, 0.1);
  --shadow-md: 0 4px 12px rgba(58, 51, 40, 0.12);
  --shadow-lg: 0 8px 30px rgba(58, 51, 40, 0.15);
  --radius: 8px;
  --max-width: 1200px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  min-height: 100vh;
}

/* ── Header / Navigation ── */
.site-header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.site-logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  color: var(--color-accent-dark);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-logo span {
  color: var(--color-gold);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  margin: 6px 0;
  transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 0.25rem;
}

.main-nav a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--color-text-light);
  text-decoration: none;
  font-size: 0.95rem;
  border-radius: var(--radius);
  transition: all 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--color-accent-dark);
  background: var(--color-bg-alt);
}

/* ── Hero Section ── */
.hero {
  background: url('../images/Home-TitleBlock-Background.jpg') center/cover no-repeat;
  color: var(--color-white);
  padding: 5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(30, 40, 20, 0.55);
}

.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hero h1 { font-family: var(--font-heading); font-size: 3rem; margin-bottom: 0.5rem; font-weight: 700; }
.hero .subtitle { font-size: 1.3rem; opacity: 0.9; font-style: italic; margin-bottom: 0.75rem; }
.hero .tagline { font-size: 1rem; opacity: 0.7; }

/* ── Page Header (non-home pages) ── */
.page-header {
  background: url('../images/Home-TitleBlock-Background.jpg') center/cover no-repeat;
  color: var(--color-white);
  padding: 3rem 1.5rem;
  text-align: center;
  position: relative;
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(30, 40, 20, 0.55);
}

.page-header h1,
.page-header p {
  position: relative;
  z-index: 1;
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
}

.page-header p {
  opacity: 0.85;
  margin-top: 0.5rem;
  font-size: 1.05rem;
}

/* ── Main Content ── */
.content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.content-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

/* ── Section Titles ── */
.section-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--color-accent-dark);
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-gold-light);
}

/* ── Timeline (Chronik) ── */
.timeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.timeline-card {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  text-decoration: none;
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all 0.25s ease;
}

.timeline-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-accent-light);
}

.timeline-card .year-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.75rem;
  background: var(--color-bg-alt);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.timeline-card .year-label {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-accent-dark);
}

.timeline-card .year-desc {
  font-size: 0.8rem;
  color: var(--color-text-light);
  margin-top: 0.25rem;
}

/* ── Year Page ── */
.year-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.year-nav a {
  color: var(--color-accent);
  text-decoration: none;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.2s;
}

.year-nav a:hover { color: var(--color-accent-dark); }

.year-text {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  line-height: 1.8;
}

.year-document {
  background: var(--color-bg-alt);
  border-left: 4px solid var(--color-gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
}

.year-document h3 {
  font-family: var(--font-heading);
  color: var(--color-gold);
  margin-bottom: 0.5rem;
}

/* ── Gallery ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.gallery-item {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow-md);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--color-text-light);
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
}

.gallery-placeholder .icon { font-size: 2rem; opacity: 0.4; }

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(30, 26, 20, 0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active { display: flex; opacity: 1; }

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  backdrop-filter: blur(4px);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255, 255, 255, 0.3); }

.lightbox-close { top: -50px; right: 0; }
.lightbox-prev { left: -60px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: -60px; top: 50%; transform: translateY(-50%); }

.lightbox-counter {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 1rem;
  font-size: 0.9rem;
}

/* ── Cards (Members, Sponsors, etc.) ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--color-card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.card h3 {
  font-family: var(--font-heading);
  color: var(--color-accent-dark);
  margin-bottom: 0.5rem;
}

.card p { color: var(--color-text-light); font-size: 0.95rem; }

.card-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
  color: var(--color-accent);
  border: 3px solid var(--color-border);
  overflow: hidden;
  flex-shrink: 0;
}

.card-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card h3 {
  font-family: var(--font-heading);
  color: var(--color-accent-dark);
  margin-bottom: 0.25rem;
}

.card p {
  color: var(--color-text-light);
  font-size: 0.82rem;
  line-height: 1.5;
}

.card small {
  font-size: 0.75rem;
  color: var(--color-text-light);
  opacity: 0.8;
}

/* ── Protokolle List ── */
.protokoll-list {
  list-style: none;
}

.protokoll-list li {
  padding: 1rem 1.5rem;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: box-shadow 0.2s;
}

.protokoll-list li:hover { box-shadow: var(--shadow-sm); }

.protokoll-list .proto-year {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-gold);
  min-width: 50px;
}

.protokoll-list .proto-title { color: var(--color-text); }

/* ── Footer ── */
.site-footer {
  background: var(--color-accent-dark);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: 2rem 1.5rem;
  margin-top: 4rem;
  font-size: 0.9rem;
}

.site-footer a { color: var(--color-gold-light); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .main-nav {
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
    display: none;
  }

  .main-nav.open { display: block; }

  .main-nav ul {
    flex-direction: column;
    padding: 1rem;
  }

  .main-nav a { padding: 0.75rem 1rem; }

  .hero h1 { font-size: 2rem; }
  .hero .subtitle { font-size: 1.1rem; }

  .timeline-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 0.75rem; }
  .timeline-card { padding: 1rem 0.75rem; }
  .timeline-card .year-label { font-size: 1.1rem; }

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

  .lightbox-prev { left: 10px; }
  .lightbox-next { right: 10px; }
  .lightbox-close { top: 10px; right: 10px; }

  .page-header h1 { font-size: 1.6rem; }
}

@media (max-width: 480px) {
  .timeline-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
