:root {
  --primary: #003300;
  --secondary: #336600;
  --accent: #339933;
  --bg: #ffffff;
  --text: #1a1a1a;
  --text-light: #ffffff;
  --border: #d4d4d4;
  --muted: #f5f5f5;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--secondary); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }

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

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* Header */
.header {
  background: var(--primary);
  color: var(--text-light);
  padding: 16px 0;
  border-bottom: 4px solid var(--secondary);
}

.header .container {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-logo {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

.header-logo svg { width: 100%; height: 100%; }

.header-title { flex: 1; }

.header-title h1 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.header-title .subtitle {
  font-size: 0.85rem;
  opacity: 0.8;
  margin-top: 2px;
}

/* Navigation */
.nav {
  background: var(--secondary);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav .container {
  display: flex;
  align-items: center;
  gap: 0;
  overflow: visible;
}

.nav a {
  color: var(--text-light);
  padding: 12px 18px;
  font-size: 0.9rem;
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,0.15);
  transition: background 0.2s;
}

.nav a:last-child { border-right: none; }

.nav a:hover, .nav a.active {
  background: var(--primary);
  text-decoration: none;
}

/* Dropdown (Forstverwaltung) */
.nav-item {
  position: relative;
}

.nav-item > a { display: block; }

.nav-item:hover > a,
.nav-item:focus-within > a,
.nav-item.active > a {
  background: var(--primary);
  text-decoration: none;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: var(--secondary);
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
  z-index: 200;
}

.nav-item:hover .dropdown,
.nav-item:focus-within .dropdown {
  display: block;
}

.dropdown a {
  display: block;
  padding: 10px 18px;
  font-size: 0.9rem;
  border-right: none;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}

.dropdown a:last-child { border-bottom: none; }

.dropdown a:hover,
.dropdown a.active {
  background: var(--primary);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px 16px;
}

/* Breadcrumb */
.breadcrumb {
  padding: 16px 0 8px;
  font-size: 0.85rem;
  color: #666;
}

.breadcrumb a { color: var(--secondary); }
.breadcrumb span { color: #999; }

/* Layout */
.page-wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  padding: 24px 0 48px;
  flex: 1;
}

/* Sidebar */
.sidebar {
  background: var(--muted);
  border-radius: 8px;
  padding: 20px;
  position: sticky;
  top: 68px;
  align-self: start;
}

.sidebar h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--secondary);
}

.sidebar ul { list-style: none; }

.sidebar li { margin-bottom: 4px; }

.sidebar a {
  display: block;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--text);
  transition: background 0.15s;
}

.sidebar a:hover, .sidebar a.active {
  background: var(--secondary);
  color: var(--text-light);
  text-decoration: none;
}

/* Main Content */
.main-content { min-width: 0; }

.main-content h1 {
  font-size: 1.75rem;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--secondary);
}

.main-content h2 {
  font-size: 1.25rem;
  color: var(--primary);
  margin: 24px 0 12px;
}

.main-content h3 {
  font-size: 1.1rem;
  color: var(--secondary);
  margin: 20px 0 8px;
}

.main-content p { margin-bottom: 16px; }

.main-content ul, .main-content ol {
  margin: 0 0 16px 24px;
}

.main-content li { margin-bottom: 6px; }

.main-content blockquote {
  border-left: 4px solid var(--secondary);
  padding: 12px 20px;
  margin: 16px 0;
  background: var(--muted);
  border-radius: 0 8px 8px 0;
}

.main-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

/* Tables */
.content-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
}

.content-table th {
  background: var(--secondary);
  color: var(--text-light);
  padding: 10px 14px;
  text-align: left;
  font-size: 0.9rem;
}

.content-table td {
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.content-table tr:nth-child(even) td { background: var(--muted); }

/* Info box */
.info-box {
  background: var(--muted);
  border-left: 4px solid var(--secondary);
  padding: 16px 20px;
  margin: 16px 0;
  border-radius: 0 8px 8px 0;
}

.info-box strong { color: var(--primary); }

/* Section tag */
.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: 3px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.tag-fv { background: var(--primary); }
.tag-fb { background: var(--secondary); }
.tag-sc { background: #666; }

/* Content images */
.content-img {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin: 16px 0;
}

.content-img-right {
  float: right;
  margin: 4px 0 12px 20px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-width: 50%;
}

.content-img-left {
  float: left;
  margin: 4px 20px 12px 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-width: 50%;
}

.img-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 16px 0 24px;
}

.img-gallery img {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  width: 100%;
  height: auto;
}

.img-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0 24px;
}

.img-row img {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.home-card-img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 12px;
}

@media (max-width: 768px) {
  .content-img-right, .content-img-left {
    float: none;
    margin: 16px 0;
    max-width: 100%;
  }
}

/* Navigation arrows */
.nav-arrows {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.nav-arrows a {
  padding: 8px 16px;
  background: var(--muted);
  border-radius: 6px;
  font-size: 0.9rem;
  transition: background 0.15s;
}

.nav-arrows a:hover {
  background: var(--secondary);
  color: var(--text-light);
  text-decoration: none;
}

/* Footer */
.footer {
  background: var(--primary);
  color: var(--text-light);
  padding: 24px 0;
  margin-top: auto;
  font-size: 0.85rem;
}

.footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.footer a { color: rgba(255,255,255,0.85); }
.footer a:hover { color: #fff; }

.footer-address { line-height: 1.6; }

/* Home hero */
.hero {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: var(--text-light);
  padding: 48px 24px;
  border-radius: 12px;
  margin: 40px 0 32px;
  text-align: center;
}

.hero h1 { font-size: 2rem; margin-bottom: 12px; color: var(--text-light); border: none; }
.hero p { font-size: 1.1rem; opacity: 0.9; max-width: 600px; margin: 0 auto; line-height: 1.6; }

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.home-card {
  background: var(--muted);
  border-radius: 10px;
  padding: 24px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.home-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }

.home-card h2 { font-size: 1.1rem; margin-top: 0; }
.home-card p { font-size: 0.9rem; color: #444; margin-bottom: 12px; }
.home-card a { font-weight: 600; }

/* Responsive */
@media (max-width: 768px) {
  .header .container { gap: 12px; }
  .header-logo { width: 48px; height: 48px; }
  .header-title h1 { font-size: 1rem; }

  .nav .container { gap: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .nav a { padding: 10px 14px; font-size: 0.85rem; }
  .dropdown a { padding: 8px 14px; font-size: 0.85rem; }

  .page-wrap {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .sidebar { display: none; }

  .hero { padding: 32px 20px; }
  .hero h1 { font-size: 1.5rem; }

  .home-grid { grid-template-columns: 1fr; }

  .footer .container { flex-direction: column; text-align: center; }

  .main-content h1 { font-size: 1.4rem; }
}

@media (max-width: 480px) {
  .header-logo { width: 40px; height: 40px; }
  .header-title h1 { font-size: 0.9rem; }
  .header-title .subtitle { font-size: 0.75rem; }
}
