/* =============================================================
   Siedlergemeinschaft Hirschknock e.V. – Haupt-Stylesheet
   Farben: Vereinsgrün #408000, Dunkelgrün #2d5a00
   Schrift: Georgia (Überschriften), System-UI (Fließtext)
   ============================================================= */

/* === CSS-Variablen ========================================== */
:root {
  --green:        #408000;
  --green-dark:   #2d5a00;
  --green-hover:  #4d9900;
  --green-light:  #eaf3d8;
  --green-pale:   #f5f9ef;
  --text:         #272726;
  --text-muted:   #5a5a58;
  --text-light:   #888;
  --border:       #e0ddd5;
  --bg:           #f8f7f3;
  --white:        #ffffff;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08);
  --shadow:       0 2px 8px rgba(0,0,0,.10);
  --shadow-lg:    0 4px 20px rgba(0,0,0,.14);
  --radius:       8px;
  --radius-sm:    4px;
  --max-width:    1100px;
  --nav-height:   68px;
  --font-heading: Georgia, 'Times New Roman', serif;
  --font-body:    'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

/* === Reset & Basis ========================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); text-decoration: underline; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.3;
  color: var(--text);
}
ul, ol { padding-left: 1.5rem; }

/* === Layout ================================================= */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}
.page-content { padding: 2.5rem 0; min-height: 55vh; }

/* === Navigation ============================================= */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--green-dark);
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}
.nav-logo img {
  height: 46px;
  width: auto;
  filter: brightness(0) invert(1);
}
.nav-logo-text {
  color: rgba(255,255,255,.92);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  line-height: 1.25;
  max-width: 190px;
}
.nav-logo:hover { text-decoration: none; }

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2px;
  align-items: center;
  padding: 0;
}
.nav-menu a {
  display: block;
  padding: 0.45rem 0.65rem;
  color: rgba(255,255,255,.88);
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: background .18s, color .18s;
  white-space: nowrap;
}
.nav-menu a:hover,
.nav-menu a.active {
  background: rgba(255,255,255,.16);
  color: #fff;
  text-decoration: none;
}

/* Hamburger-Button (mobil) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: .25s;
}

/* === Hero ================================================== */
.hero {
  position: relative;
  height: 400px;
  overflow: hidden;
  background: var(--green-dark);
}
.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.65) 0%, rgba(0,0,0,.3) 25%, transparent 55%);
  display: flex;
  align-items: flex-end;
  padding: 2rem;
}
.hero-text {
  color: #fff !important;
  max-width: 60%;
  background: rgba(0,0,0,.45);
  padding: 0.6rem 1rem;
  border-radius: 4px;
}
.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(0.95rem, 1.8vw, 1.25rem);
  font-weight: bold;
  color: #f2efe8;
  text-shadow: 1px 1px 5px rgba(0,0,0,.9), 0 0 10px rgba(0,0,0,.7);
  margin-bottom: 0.25rem;
}
.hero-subtitle {
  font-size: .85rem;
  color: #f2efe8;
  opacity: .95;
  text-shadow: 1px 1px 4px rgba(0,0,0,.9), 0 0 8px rgba(0,0,0,.7);
}

/* === Seiten-Banner (Unterseiten) =========================== */
.page-banner {
  background: var(--green-dark);
  color: #fff;
  padding: 1.75rem 0;
}
.page-banner h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  font-weight: normal;
  color: #fff;
}
.page-banner .breadcrumb { color: rgba(255,255,255,.65); margin-top: .4rem; }
.page-banner .breadcrumb a { color: rgba(255,255,255,.88); }
.page-banner .breadcrumb-sep { color: rgba(255,255,255,.4); }

/* === Breadcrumb ============================================ */
.breadcrumb {
  display: flex;
  gap: .4rem;
  align-items: center;
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: var(--green); }
.breadcrumb-sep { color: var(--border); }

/* === Section-Titel ========================================= */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: .6rem;
  border-bottom: 3px solid var(--green);
}
.section-header h2 {
  font-family: var(--font-heading);
  font-size: 1.55rem;
}
.section-more { font-size: .85rem; color: var(--green); font-weight: 600; }

/* === Artikel-Karten ======================================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }

.card-featured {
  margin-bottom: 1rem;
}
.card-featured-image {
  height: 120px;
  overflow: hidden;
  background: var(--green-light);
  border-radius: var(--radius) var(--radius) 0 0;
}
.card-featured-image img { width: 100%; height: 100%; object-fit: cover; }
.card-featured .card-excerpt { display: block; overflow: visible; -webkit-line-clamp: unset; white-space: normal; }

.card-image { aspect-ratio: 16/9; overflow: hidden; background: var(--green-light); }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card-image img { transform: scale(1.04); }

.card-image-placeholder {
  aspect-ratio: 16/9;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-image-placeholder img { height: 55px; opacity: .25; filter: grayscale(1); }

.card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.card-date { font-size: .78rem; color: var(--text-muted); margin-bottom: .4rem; }
.card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: .65rem;
  line-height: 1.35;
}
.card-title a { color: var(--text); text-decoration: none; }
.card-title a:hover { color: var(--green); text-decoration: none; }
.card-excerpt { color: var(--text-muted); font-size: .9rem; flex: 1; margin-bottom: .9rem; }
.card-link {
  color: var(--green);
  font-size: .85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  margin-top: auto;
  text-decoration: none;
}
.card-link::after { content: ' →'; }
.card-link:hover { color: var(--green-dark); text-decoration: none; }

/* === Termine-Liste ========================================= */
.events-list { display: flex; flex-direction: column; gap: 1rem; }
.event-item {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  display: flex;
  gap: 1.2rem;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--green);
  transition: box-shadow .2s;
}
.event-item:hover { box-shadow: var(--shadow); }

.event-date-badge {
  flex-shrink: 0;
  width: 54px;
  background: var(--green);
  color: #fff;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: .45rem .2rem;
  text-align: center;
}
.event-date-day { font-size: 1.45rem; font-weight: 700; line-height: 1; }
.event-date-month { font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }

.event-info { flex: 1; min-width: 0; }
.event-title { font-family: var(--font-heading); font-size: 1rem; margin-bottom: .2rem; }
.event-meta {
  font-size: .82rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}
.event-meta span { display: flex; align-items: center; gap: .25rem; }
.event-pdf {
  font-size: .8rem;
  color: var(--green);
  font-weight: 600;
  text-decoration: none;
  margin-top: .4rem;
  display: inline-block;
}
.event-cancelled { opacity: .55; text-decoration: line-through; }
.badge-cancelled {
  display: inline-block;
  background: #c0392b;
  color: #fff;
  font-size: .68rem;
  padding: .15rem .5rem;
  border-radius: 20px;
  margin-left: .5rem;
  vertical-align: middle;
}

/* === Homepage-Layout ======================================= */
.home-sections { padding: 3rem 0; }
.home-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
  align-items: start;
}

/* === Einzelner Artikel ===================================== */
.article-header { margin-bottom: 1.75rem; }
.article-meta { font-size: .85rem; color: var(--text-muted); margin-bottom: .5rem; }
.article-header h1 { font-size: clamp(1.4rem, 3vw, 2rem); }
.article-hero { border-radius: var(--radius); overflow: hidden; margin-bottom: 2rem; max-height: 440px; }
.article-hero img { width: 100%; height: 100%; object-fit: cover; }
.article-content { font-size: 1rem; line-height: 1.85; }
.article-content p { margin-bottom: 1.15rem; }
.article-content h2 { font-size: 1.35rem; margin: 2rem 0 .9rem; color: var(--green-dark); }
.article-content h3 { font-size: 1.1rem; margin: 1.5rem 0 .6rem; }
.article-content ul, .article-content ol { margin-bottom: 1.1rem; }
.article-back { margin-top: 2rem; }

/* === Statische Seiten ====================================== */
.static-page {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}
.static-page h1 {
  font-size: 1.9rem;
  margin-bottom: 1.5rem;
  padding-bottom: .7rem;
  border-bottom: 3px solid var(--green);
}
.static-page h2 { font-size: 1.3rem; margin: 1.9rem 0 .8rem; color: var(--green-dark); }
.static-page h3 { font-size: 1.1rem; margin: 1.4rem 0 .5rem; }
.static-page p { margin-bottom: 1rem; }
.static-page ul, .static-page ol { margin-bottom: 1rem; }
.static-page li { margin-bottom: .25rem; }
.static-page table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.static-page th, .static-page td { padding: .6rem .9rem; border: 1px solid var(--border); text-align: left; }
.static-page th { background: var(--green-pale); font-weight: 600; }
.static-page tr:nth-child(even) td { background: var(--bg); }

.historie-bild {
  margin: 1.5rem 0;
  display: block;
}
.historie-bild img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}
.historie-bild figcaption {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .4rem;
  font-style: italic;
}

/* Vorstandschaft */
.board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.board-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--green);
  text-align: center;
}
.board-role { font-size: .78rem; color: var(--green); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .4rem; }
.board-name { font-family: var(--font-heading); font-size: 1.05rem; }

/* Ausschuss-Liste */
.committee-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .6rem;
}
.committee-member {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: .65rem 1rem;
  box-shadow: var(--shadow-sm);
  font-size: .9rem;
}

/* === Galerie =============================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.gallery-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--white);
  transition: box-shadow .2s, transform .2s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.gallery-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); text-decoration: none; color: inherit; }
.gallery-card-img { aspect-ratio: 4/3; overflow: hidden; background: var(--green-light); }
.gallery-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery-card:hover .gallery-card-img img { transform: scale(1.05); }
.gallery-card-img-placeholder {
  aspect-ratio: 4/3;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  font-size: 2.5rem;
}
.gallery-card-info { padding: 1rem; }
.gallery-card-title { font-family: var(--font-heading); font-size: 1rem; margin-bottom: .2rem; }
.gallery-card-count { font-size: .78rem; color: var(--text-muted); }

/* Foto-Grid (Lightbox) */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: .6rem;
}
.photo-item {
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--green-light);
}
.photo-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s, opacity .2s; }
.photo-item:hover img { transform: scale(1.08); opacity: .88; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.lightbox.active { display: flex; }
.lightbox-img { max-width: 90vw; max-height: 82vh; object-fit: contain; border-radius: var(--radius-sm); }
.lightbox-close {
  position: absolute; top: 1rem; right: 1rem;
  background: rgba(255,255,255,.18); border: none; color: #fff;
  font-size: 1.4rem; width: 42px; height: 42px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.lightbox-prev, .lightbox-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.18); border: none; color: #fff;
  font-size: 1.4rem; width: 48px; height: 48px; border-radius: 50%;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,.3); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
.lightbox-caption {
  position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.75); font-size: .85rem; text-align: center; max-width: 80%;
}

/* === Downloads / Blättla =================================== */
.download-list { display: flex; flex-direction: column; gap: .65rem; }
.download-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white);
  border-radius: var(--radius);
  padding: .9rem 1.2rem;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text);
  border-left: 4px solid var(--border);
  transition: box-shadow .2s, border-left-color .2s;
}
.download-item:hover { box-shadow: var(--shadow); border-left-color: var(--green); text-decoration: none; color: var(--text); }
.download-icon { font-size: 1.4rem; flex-shrink: 0; }
.download-info { flex: 1; min-width: 0; }
.download-title { font-weight: 600; font-size: .92rem; }
.download-meta { font-size: .78rem; color: var(--text-muted); }
.download-arrow { color: var(--green); font-size: 1.1rem; flex-shrink: 0; }

/* Blättla nach Jahrgängen */
.blaettla-group { margin-bottom: 2rem; }
.blaettla-group h3 {
  font-size: 1.05rem; color: var(--green-dark);
  margin-bottom: .75rem; padding-bottom: .3rem; border-bottom: 1px solid var(--border);
}
.blaettla-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .55rem; }

/* === Kontakt =============================================== */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.contact-item { display: flex; gap: .9rem; margin-bottom: 1.2rem; align-items: flex-start; }
.contact-icon { font-size: 1.2rem; margin-top: .1rem; flex-shrink: 0; }
.contact-label { font-size: .75rem; color: var(--text-muted); margin-bottom: .1rem; }
.contact-value { font-weight: 500; }
.contact-value a { color: var(--green); }
.map-container { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.map-container iframe { display: block; width: 100%; height: 340px; border: none; }
.map-hint { font-size: .78rem; color: var(--text-muted); margin-top: .5rem; text-align: center; }

/* Kontaktformular */
.contact-form { background: var(--white); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow-sm); }
.contact-form h3 { font-family: var(--font-heading); font-size: 1.2rem; margin-bottom: 1.2rem; color: var(--green-dark); }
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: .35rem; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: .6rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--text);
  background: #fff;
  transition: border-color .2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { outline: none; border-color: var(--green); }
.form-group textarea { min-height: 130px; resize: vertical; }

/* === Buttons =============================================== */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .6rem 1.3rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: .9rem; font-weight: 600;
  cursor: pointer; text-decoration: none; border: none;
  transition: background .18s, box-shadow .18s;
}
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; text-decoration: none; }
.btn-outline { background: transparent; color: var(--green); border: 2px solid var(--green); }
.btn-outline:hover { background: var(--green-light); color: var(--green-dark); text-decoration: none; }
.btn-sm { padding: .38rem .9rem; font-size: .8rem; }

/* === Meldungen ============================================= */
.notice {
  padding: .9rem 1.2rem; border-radius: var(--radius-sm); margin-bottom: 1.5rem; font-size: .9rem;
}
.notice-info    { background: #e8f4f8; color: #1a6680; border-left: 4px solid #1a6680; }
.notice-success { background: var(--green-light); color: var(--green-dark); border-left: 4px solid var(--green); }
.notice-error   { background: #fdecea; color: #b71c1c; border-left: 4px solid #c0392b; }
.notice-warning { background: #fff8e1; color: #7a5800; border-left: 4px solid #f9a825; }

/* === Footer ================================================ */
.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,.82);
  padding: 2.5rem 0 1.25rem;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand img {
  height: 55px;
  filter: brightness(0) invert(1);
  opacity: .82;
  margin-bottom: .75rem;
}
.footer-brand p { font-size: .85rem; line-height: 1.6; }
.footer-col h4 {
  color: #fff; font-size: .8rem; text-transform: uppercase;
  letter-spacing: .09em; margin-bottom: .75rem;
}
.footer-col ul { list-style: none; font-size: .85rem; padding: 0; }
.footer-col li { margin-bottom: .35rem; }
.footer-col a { color: rgba(255,255,255,.72); text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 1.1rem;
  font-size: .78rem;
  color: rgba(255,255,255,.45);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .4rem;
}
.footer-bottom a { color: rgba(255,255,255,.55); text-decoration: none; }
.footer-bottom a:hover { color: rgba(255,255,255,.88); }
.admin-link { color: rgba(255,255,255,.25) !important; font-size: .72rem; }

/* === Responsive ============================================ */
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--green-dark);
    padding: .5rem 0 1rem;
    box-shadow: 0 6px 16px rgba(0,0,0,.25);
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { border-radius: 0; padding: .7rem 1.5rem; font-size: .9rem; }
  .nav-toggle { display: flex; }
  .hero { height: 260px; }
  .hero-overlay { padding: 1.5rem; }
  .cards-grid { grid-template-columns: 1fr; }
  .card-featured-image { height: 100px; }
  .footer-grid { grid-template-columns: 1fr; }
  .static-page { padding: 1.5rem; }
  .event-item { flex-direction: column; gap: .75rem; }
  .event-date-badge { width: 100%; flex-direction: row; gap: .5rem; padding: .5rem 1rem; justify-content: flex-start; }
  .board-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .board-grid { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}

/* === Druck ================================================= */
@media print {
  .site-nav, .site-footer, .nav-toggle { display: none; }
  .hero { display: none; }
}
