/* Fonts */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/playfair-display-v40-latin-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/playfair-display-v40-latin-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/montserrat-v31-latin-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/montserrat-v31-latin-600.woff2') format('woff2');
}

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/montserrat-v31-latin-700.woff2') format('woff2');
}

/* Variables */
:root {
  --color-primary: #CDA871;
  --color-primary-dark: #B8924F;
  --color-secondary: #172635;
  --color-text-muted: #6B7280;
  --color-border: #B1B5B9;
  --color-bg: #FEFEFE;
  --color-bg-alt: #F5F0EA;
  --color-link: #1E3A5F;
  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Montserrat', -apple-system, 'Segoe UI', sans-serif;
  --max-width: 900px;
}

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

/* Base */
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-secondary);
  background-color: var(--color-bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--color-primary-dark);
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
}

/* Layout */
.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Main navigation (sticky bar, pure-CSS hamburger) */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50; /* below the lightbox (z-index:100) */
  background-color: var(--color-secondary);
}

.site-nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.site-nav-brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.site-nav-brand img {
  width: 40px;
  height: auto;
}

/* collapsed by default (mobile-first); expands at the desktop breakpoint */
.nav-links {
  list-style: none;
  display: none;
  flex-basis: 100%;
  flex-direction: column;
  gap: 0.85rem;
  padding-top: 0.5rem;
}

.nav-toggle-cb:checked ~ .nav-links {
  display: flex;
}

.nav-link {
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--color-bg);
}

/* anchored jumps clear the sticky bar */
:target {
  scroll-margin-top: 4.5rem;
}

.nav-burger {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-primary);
  font-size: 1.6rem;
  line-height: 1;
  padding: 0.1rem 0.4rem;
}

.nav-burger::before {
  content: "\2630"; /* hamburger */
}

.nav-toggle-cb:checked ~ .nav-burger::before {
  content: "\2715"; /* close (×) */
}

.nav-toggle-cb:focus-visible ~ .nav-burger {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.nav-toggle-cb {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Header / Hero */
.hero {
  text-align: center;
  padding: 3rem 1.5rem 2.5rem;
}

.hero-logo {
  display: block;
  width: 160px;
  margin: 0 auto 1.5rem;
}

.hero h1 {
  margin-bottom: 0.5rem;
}

.hero-title {
  display: block;
  max-width: 320px;
  margin: 0 auto;
}

.hero-tagline {
  font-size: 1rem;
  color: var(--color-text-muted);
  font-style: italic;
}

/* Sections */
.section {
  padding: 3rem 0;
}

.section--alt {
  background-color: var(--color-bg-alt);
}

.section h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.75rem;
}

.section h2::after {
  content: '';
  display: block;
  width: 50px;
  height: 2px;
  background-color: var(--color-primary);
  position: absolute;
  bottom: 0;
  left: 0;
}

.section--alt h2::after,
.section--center h2::after {
  left: 50%;
  transform: translateX(-50%);
}

.section--center {
  text-align: center;
}

.section p {
  margin-bottom: 1rem;
}

.section p:last-child {
  margin-bottom: 0;
}

/* Vorstand */
.vorstand-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.vorstand-list {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.vorstand-item dt {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.vorstand-item dd {
  font-weight: 600;
}

/* Vorstand photo */
.vorstand-foto {
  margin: 0;
}

.vorstand-foto-link {
  display: block;
  cursor: zoom-in;
}

.vorstand-foto-link img {
  width: 100%;
  border-radius: 4px;
}

/* Lightbox (pure CSS :target) */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  padding: 1.5rem;
  background-color: rgba(245, 240, 234, 0.95);
  cursor: zoom-out;
  text-decoration: none;
}

.lightbox:target {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content {
  max-width: 1100px;
  width: 100%;
  margin: 0;
  background-color: var(--color-bg-alt);
  padding: 0.75rem;
  border-radius: 4px;
}

.lightbox-content img {
  width: 100%;
  border-radius: 2px;
}

.lightbox-content figcaption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* Unser Dorf */
.dorf-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dorf-images {
  display: flex;
  gap: 1rem;
}

.dorf-images picture,
.dorf-images img {
  border-radius: 4px;
}

.dorf-image-single {
  flex: 1;
}

.dorf-image-single img {
  width: 100%;
  border-radius: 4px;
}

.dorf-image-landscape {
  flex: 2;
}

.dorf-image-landscape img {
  width: 100%;
}

.dorf-image-portrait {
  flex: 1;
}

.dorf-image-portrait img {
  width: 100%;
  object-fit: cover;
  height: 100%;
}

/* Mitmachen */
.beitraege {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
  justify-content: center;
  flex-wrap: wrap;
}

.beitrag-card {
  border: 2px solid var(--color-primary);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  text-align: center;
  flex: 1;
  min-width: 180px;
  max-width: 260px;
}

.beitrag-card strong {
  display: block;
  font-size: 1.5rem;
  font-family: var(--font-heading);
  color: var(--color-secondary);
  margin-bottom: 0.25rem;
}

.beitrag-card span {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.kontakt-email {
  font-size: 1.1rem;
  font-weight: 600;
}

.mitmachen-cta {
  margin: 1.5rem 0 0.75rem;
}

.mitmachen-cta a {
  font-weight: 600;
}

.mitmachen-hinweis {
  margin-bottom: 0.25rem;
}

/* Dokumente */
.dokumente-list {
  list-style: none;
  margin: 1.5rem auto 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: center;
}

.dokumente-list a {
  font-weight: 600;
}

.dokumente-stand {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Veranstaltungen (events grouped by month) */
.events-month {
  max-width: 640px;
  margin: 2rem auto 0;
}

.month-group {
  margin-bottom: 1.75rem;
}

.month-group h2 {
  font-size: 1.15rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--color-primary);
}

.month-events {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.month-event {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 0.75rem;
  flex-wrap: wrap;
}

.month-event .event-name {
  font-weight: 500;
}

/* Organizer tags — meaning carried by the text, not colour alone */
.orga-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 4px;
  padding: 0.1rem 0.55rem;
  white-space: nowrap;
}

.orga-private {
  background: var(--color-bg-alt);
  color: var(--color-secondary);
  border: 1px solid var(--color-border);
}

.orga-gemeinde {
  background: var(--color-secondary);
  color: var(--color-bg);
}

.orga-feuerwehr {
  background: var(--color-primary);
  color: var(--color-secondary);
}

.event-empty {
  color: var(--color-text-muted);
  font-style: italic;
}

/* Footer */
.footer {
  background-color: var(--color-secondary);
  color: var(--color-bg);
  padding: 2rem 1.5rem;
  text-align: center;
  font-size: 0.9rem;
}

.footer-nav {
  margin-bottom: 1rem;
}

.footer-nav a {
  color: var(--color-primary);
  text-decoration: none;
  margin: 0 0.75rem;
}

.footer-nav a:hover {
  color: var(--color-bg);
  text-decoration: underline;
}

.footer-copy {
  color: var(--color-border);
  font-size: 0.8rem;
}

/* Legal pages */
.page-header {
  text-align: center;
  padding: 2rem 1.5rem 1rem;
  border-bottom: 1px solid var(--color-bg-alt);
}

.page-header a {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.page-header-logo {
  width: 50px;
  display: block;
}

.page-header-title {
  width: 180px;
}

.legal-content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}

.legal-content h1 {
  font-size: 1.6rem;
  margin-bottom: 2rem;
}

.legal-content h2 {
  font-size: 1.15rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.legal-content p {
  margin-bottom: 0.75rem;
}

.legal-content address {
  font-style: normal;
  margin-bottom: 0.75rem;
}

.legal-placeholder {
  color: var(--color-text-muted);
  font-style: italic;
}

/* Desktop */
@media (min-width: 768px) {
  .nav-links {
    display: flex;
    flex-direction: row;
    flex-basis: auto;
    flex-wrap: wrap;
    gap: 1.25rem;
    padding-top: 0;
  }

  .nav-burger {
    display: none;
  }

  .hero {
    padding: 4rem 1.5rem 3rem;
  }

  .hero-logo {
    width: 200px;
  }

  .hero-title {
    max-width: 380px;
  }

  .section {
    padding: 4rem 0;
  }

  .section h2 {
    font-size: 1.6rem;
  }

  .vorstand-content {
    flex-direction: row;
    align-items: flex-start;
    gap: 2.5rem;
  }

  .vorstand-list {
    flex: 1;
  }

  .vorstand-foto {
    flex-shrink: 0;
    width: 45%;
  }

  .dorf-content {
    flex-direction: row;
    align-items: flex-start;
  }

  .dorf-images {
    flex-shrink: 0;
    width: 45%;
  }

  .dorf-text {
    flex: 1;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    max-width: 400px;
  }
}
