/* ─────────────────────────────────────────
   EGOT - Shared Stylesheet
   ───────────────────────────────────────── */

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

:root {
  --green-dark:  #1a3d2b;
  --green-mid:   #2d6a4f;
  --green-light: #52b788;
  --gold:        #e9c46a;
  --gold-soft:   #f4d07a;
  --cream:       #f8f4ec;
  --white-warm:  #fefdf9;
  --text:        #1c1c1c;
  --muted:       #5a6a60;
  --border:      #e5e0d4;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
}

a { color: var(--green-mid); text-decoration: none; transition: color .2s; }
a:hover { color: var(--green-dark); }

/* ── NAVIGATION ── */
nav.main-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2.5rem;
  background: rgba(26,61,43,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav-logo { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.nav-logo img { height: 40px; filter: brightness(10); }
.nav-logo span {
  font-family: 'DM Serif Display', serif;
  font-size: 1rem; color: #fff; line-height: 1.2;
}
.nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; }
.nav-links a {
  color: rgba(255,255,255,.75);
  text-decoration: none; font-size: .88rem; font-weight: 500;
  letter-spacing: .02em;
  transition: color .2s;
  position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }
.nav-links a.active::after {
  content: ''; position: absolute; bottom: -6px; left: 0; right: 0;
  height: 2px; background: var(--gold); border-radius: 2px;
}
.nav-cta {
  background: var(--gold); color: var(--green-dark) !important;
  padding: .5rem 1.25rem; border-radius: 99px;
  font-weight: 600 !important; transition: background .2s, transform .15s !important;
}
.nav-cta:hover { background: var(--gold-soft) !important; transform: translateY(-1px); }

/* mobile hamburger */
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; }

/* ── PAGE HEADER (smaller hero for sub-pages) ── */
.page-header {
  position: relative;
  padding: 9rem 2.5rem 5rem;
  overflow: hidden;
  text-align: center;
}
.page-header-bg {
  position: absolute; inset: 0;
  background: url('images/hintergrund.jpeg') center/cover no-repeat;
}
.page-header-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(26,61,43,.92), rgba(45,106,79,.75));
}
.page-header-content { position: relative; max-width: 800px; margin: 0 auto; }
.page-header .breadcrumb {
  display: inline-flex; gap: .5rem; align-items: center;
  color: rgba(255,255,255,.6); font-size: .8rem; letter-spacing: .05em;
  margin-bottom: 1.25rem;
}
.page-header .breadcrumb a { color: rgba(255,255,255,.7); }
.page-header .breadcrumb a:hover { color: var(--gold); }
.page-header .breadcrumb .sep { color: rgba(255,255,255,.3); }
.page-header h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.2rem, 4.5vw, 3.5rem);
  color: #fff; line-height: 1.15;
  animation: fadeUp .8s ease both;
}
.page-header h1 em { color: var(--gold); font-style: italic; }
.page-header p.subtitle {
  color: rgba(255,255,255,.78);
  font-size: 1.05rem; margin-top: 1rem;
  max-width: 600px; margin-left: auto; margin-right: auto;
  animation: fadeUp .8s .15s ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── MAIN CONTENT ── */
main.page-content {
  padding: 5rem 2.5rem;
  max-width: 1100px; margin: 0 auto;
}
.content-card {
  background: var(--white-warm);
  border-radius: 1.5rem;
  padding: 3.5rem;
  box-shadow: 0 6px 30px rgba(26,61,43,.06);
  border: 1px solid var(--border);
}

main h2, .content-card h2 {
  font-family: 'DM Serif Display', serif;
  color: var(--green-dark);
  font-size: 1.85rem;
  margin: 2.5rem 0 1rem;
  line-height: 1.25;
}
main h2:first-child, .content-card h2:first-child { margin-top: 0; }
main h3, .content-card h3 {
  font-family: 'DM Sans', sans-serif;
  color: var(--green-mid);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 2rem 0 .75rem;
  letter-spacing: -0.01em;
}
main p, .content-card p {
  color: var(--text);
  margin-bottom: 1.1rem;
  line-height: 1.8;
}
main ul, .content-card ul {
  margin: 0 0 1.5rem 1.5rem;
  color: var(--text);
}
main li, .content-card li {
  margin-bottom: .5rem; line-height: 1.7;
}
main strong, .content-card strong { color: var(--green-dark); }

main hr, .content-card hr {
  border: none; height: 1px;
  background: var(--border);
  margin: 2.5rem 0;
}

main img, .content-card img {
  max-width: 100%; height: auto;
  border-radius: .75rem;
  margin: 1.5rem 0;
  box-shadow: 0 6px 22px rgba(26,61,43,.1);
}

/* Featured / highlighted boxes */
.highlight-box {
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  color: #fff;
  padding: 2rem 2.5rem;
  border-radius: 1rem;
  margin: 2rem 0;
}
.highlight-box h2, .highlight-box h3 { color: #fff; }
.highlight-box p, .highlight-box li { color: rgba(255,255,255,.85); }
.highlight-box strong { color: var(--gold); }

.info-box {
  background: rgba(82,183,136,.08);
  border-left: 4px solid var(--green-light);
  padding: 1.25rem 1.5rem;
  border-radius: .5rem;
  margin: 1.5rem 0;
}
.info-box p:last-child { margin-bottom: 0; }

/* Buttons */
.btn-primary {
  display: inline-block;
  background: var(--gold); color: var(--green-dark);
  padding: .85rem 2rem; border-radius: 99px;
  font-weight: 600; font-size: .95rem; text-decoration: none;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 20px rgba(233,196,106,.35);
  border: none; cursor: pointer; font-family: inherit;
}
.btn-primary:hover {
  background: var(--gold-soft); transform: translateY(-2px); color: var(--green-dark);
  box-shadow: 0 8px 28px rgba(233,196,106,.45);
}
.btn-secondary {
  display: inline-block;
  border: 1.5px solid var(--green-mid); color: var(--green-mid);
  padding: .85rem 2rem; border-radius: 99px;
  font-weight: 500; font-size: .95rem; text-decoration: none;
  background: transparent;
  transition: all .2s; cursor: pointer; font-family: inherit;
}
.btn-secondary:hover { background: var(--green-mid); color: #fff; }

/* Sub-page navigation cards (used on Energiegemeinschaft / Verein index) */
.sub-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem; margin-top: 1rem;
}
.sub-card {
  background: var(--white-warm);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 2rem;
  text-decoration: none;
  display: block;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.sub-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(26,61,43,.12);
  border-color: var(--green-light);
}
.sub-card-icon {
  width: 48px; height: 48px; border-radius: .75rem;
  background: rgba(45,106,79,.1);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; margin-bottom: 1rem;
}
.sub-card h3 {
  font-family: 'DM Serif Display', serif;
  color: var(--green-dark); font-size: 1.3rem; margin: 0 0 .5rem;
}
.sub-card p {
  color: var(--muted); font-size: .9rem; margin: 0;
}
.sub-card-arrow {
  margin-top: 1rem; color: var(--green-mid); font-weight: 600; font-size: .9rem;
}

/* Document link list (News / Infos) */
.doc-list { list-style: none; margin-left: 0 !important; padding: 0; }
.doc-list li {
  background: var(--white-warm);
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: 1rem 1.5rem;
  margin-bottom: .75rem;
  display: flex; align-items: center; gap: 1rem;
  transition: border-color .2s, transform .2s;
}
.doc-list li:hover { border-color: var(--green-light); transform: translateX(4px); }
.doc-list .doc-icon {
  width: 40px; height: 40px;
  background: rgba(233,196,106,.15);
  border-radius: .5rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.doc-list a {
  color: var(--green-dark);
  font-weight: 500;
  flex: 1;
}

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
th, td { padding: .9rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--cream); font-weight: 600; color: var(--green-dark); }

/* Form (contact page) */
.form-group { margin-bottom: 1.5rem; }
.form-group label {
  display: block; font-weight: 500; margin-bottom: .5rem;
  color: var(--green-dark); font-size: .9rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: .85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: .6rem;
  font-family: inherit; font-size: 1rem;
  background: var(--white-warm); color: var(--text);
  transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--green-light);
  box-shadow: 0 0 0 3px rgba(82,183,136,.15);
}
.form-group textarea { resize: vertical; min-height: 140px; }

/* Stats grid */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.25rem; margin: 2rem 0;
}
.stat {
  background: var(--white-warm);
  border: 1px solid var(--border);
  padding: 1.5rem;
  border-radius: 1rem;
  text-align: center;
}
.stat-value {
  font-family: 'DM Serif Display', serif;
  font-size: 2rem; color: var(--green-dark);
  line-height: 1; margin-bottom: .4rem;
}
.stat-label {
  color: var(--muted); font-size: .85rem;
  text-transform: uppercase; letter-spacing: .08em;
}

/* ── FOOTER ── */
footer.main-footer {
  background: #111;
  padding: 3rem 2.5rem 2rem;
  color: rgba(255,255,255,.45);
  font-size: .85rem;
}
.footer-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-links { display: flex; gap: 1.5rem; flex-wrap: wrap; list-style: none; }
.footer-links a { color: rgba(255,255,255,.45); text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--gold); }
.footer-contact a { color: var(--gold); text-decoration: none; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  nav.main-nav { padding: 1rem 1.25rem; }
  .nav-logo span { font-size: .85rem; }
  .nav-links {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: rgba(26,61,43,.97);
    padding: 1rem 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
  }
  .nav-links.show { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: .75rem 0; border-bottom: 1px solid rgba(255,255,255,.05); }
  .nav-cta { display: inline-block; margin-top: .5rem; }
  .nav-toggle { display: block; }

  main.page-content { padding: 3rem 1.25rem; }
  .content-card { padding: 2rem 1.5rem; }
  .page-header { padding: 7rem 1.25rem 3.5rem; }
}
