/* ==================== RESET & BASE ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green: #2d7d46;
  --green-dark: #1e5a31;
  --green-light: #4a9d64;
  --beige: #f5f0e8;
  --beige-dark: #e8dfd3;
  --white: #ffffff;
  --text: #2c2c2c;
  --text-light: #666666;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--beige);
  color: var(--text);
  line-height: 1.7;
  min-height: 100vh;
}

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

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

/* ==================== LAYOUT ==================== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 60px 0; }
.section-alt { background: var(--white); }

/* ==================== NAVBAR ==================== */
.navbar {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  flex-wrap: wrap;
}

.navbar-brand {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--green) !important;
  display: flex;
  align-items: center;
  gap: 10px;
}

.navbar-brand span { font-size: 1.6rem; }

.navbar-menu {
  display: flex;
  list-style: none;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 0;
}

.navbar-menu a {
  color: var(--text);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.navbar-menu a:hover, .navbar-menu a.active {
  background: var(--green);
  color: var(--white) !important;
}

.menu-toggle {
  display: none;
  background: none;
  border: 2px solid var(--green);
  color: var(--green);
  font-size: 1.5rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

/* ==================== HERO ==================== */
.hero {
  background: linear-gradient(135deg, rgba(45,125,70,0.92), rgba(30,90,49,0.88)),
              url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%232d7d46" width="1200" height="600"/><circle cx="200" cy="300" r="150" fill="%234a9d64" opacity="0.3"/><circle cx="800" cy="200" r="200" fill="%231e5a31" opacity="0.2"/><circle cx="1000" cy="450" r="120" fill="%234a9d64" opacity="0.25"/></svg>');
  background-size: cover;
  color: var(--white);
  text-align: center;
  padding: 80px 20px;
  min-height: 500px;
  display: flex;
  align-items: center;
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 20px;
  line-height: 1.3;
}

.hero p {
  font-size: 1.15rem;
  max-width: 700px;
  margin: 0 auto 30px;
  opacity: 0.95;
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.btn-primary { background: var(--green); color: var(--white); }
.btn-primary:hover { background: var(--green-dark); color: var(--white); transform: translateY(-1px); }
.btn-secondary { background: var(--white); color: var(--green); }
.btn-secondary:hover { background: var(--beige); color: var(--green-dark); }
.btn-outline { background: transparent; color: var(--green); border: 2px solid var(--green); }
.btn-outline:hover { background: var(--green); color: var(--white); }
.btn-danger { background: #d9534f; color: var(--white); }
.btn-danger:hover { background: #c9302c; color: var(--white); }
.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-lg { padding: 18px 40px; font-size: 1.1rem; }
.btn-block { display: block; width: 100%; }

/* ==================== STATS ==================== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  margin: 40px 0;
}

.stat-card {
  background: var(--white);
  padding: 30px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-card .number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--green);
  display: block;
}

.stat-card .label {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-top: 4px;
}

/* ==================== CARDS ==================== */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.card-body { padding: 24px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.card-img {
  width: 100%;
  height: 180px;
  background: linear-gradient(135deg, var(--green-light), var(--green-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
}

/* ==================== FORMS ==================== */
.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.form-control {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--beige-dark);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s;
  background: var(--white);
}

.form-control:focus {
  outline: none;
  border-color: var(--green);
}

select.form-control { appearance: auto; }
textarea.form-control { min-height: 120px; resize: vertical; }

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

/* ==================== BADGES ==================== */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-nfz { background: #e3f2fd; color: #1565c0; }
.badge-zus { background: #fff3e0; color: #e65100; }
.badge-krus { background: #e8f5e9; color: #2e7d32; }

.badge-group { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }

/* ==================== STARS ==================== */
.stars { color: #f4a623; font-size: 1.1rem; letter-spacing: 2px; }
.stars-input { display: flex; gap: 4px; }
.stars-input label {
  font-size: 2rem;
  cursor: pointer;
  color: var(--beige-dark);
  transition: color 0.2s;
}
.stars-input label:hover, .stars-input label.active { color: #f4a623; }

/* ==================== SPEC TAGS ==================== */
.spec-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }

.spec-tag {
  background: var(--beige);
  color: var(--text);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
}

/* ==================== SEARCH/FILTER BAR ==================== */
.filter-bar {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}

.filter-bar .form-row { align-items: end; }

/* ==================== SECTION HEADINGS ==================== */
.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--green-dark);
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-light);
  margin-bottom: 30px;
}

/* ==================== FAQ ==================== */
.faq-item {
  background: var(--white);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-question {
  padding: 18px 24px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
}

.faq-question:hover { background: var(--beige); }
.faq-question::after { content: '+'; font-size: 1.5rem; color: var(--green); transition: transform 0.2s; }
.faq-item.open .faq-question::after { content: '−'; }

.faq-answer {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s, padding 0.3s;
  line-height: 1.8;
}

.faq-item.open .faq-answer {
  padding: 0 24px 20px;
  max-height: 500px;
}

/* ==================== FORUM ==================== */
.forum-post {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: transform 0.15s;
}

.forum-post:hover { transform: translateX(4px); }

.forum-post .category-badge {
  background: var(--green);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.forum-post h3 { font-size: 1.05rem; margin-bottom: 4px; }
.forum-post .meta { font-size: 0.8rem; color: var(--text-light); }

.reply-card {
  background: var(--beige);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin: 8px 0 8px 30px;
  border-left: 3px solid var(--green);
}

/* ==================== GUIDE ==================== */
.guide-section {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.guide-section h2 {
  color: var(--green-dark);
  font-size: 1.4rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--beige);
}

.guide-section ol, .guide-section ul {
  padding-left: 24px;
  margin: 12px 0;
}

.guide-section li { margin-bottom: 8px; }

.guide-nav {
  background: var(--white);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 30px;
}

.guide-nav a {
  display: block;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  font-weight: 500;
}

.guide-nav a:hover { background: var(--beige); }

/* ==================== TABLE ==================== */
.table-wrapper { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--beige); font-size: 0.9rem; }
th { background: var(--green); color: var(--white); font-weight: 600; }
tr:hover { background: var(--beige); }

/* ==================== ADMIN ==================== */
.admin-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: calc(100vh - 70px);
}

.admin-sidebar {
  background: var(--green-dark);
  padding: 24px 16px;
  color: var(--white);
}

.admin-sidebar a {
  display: block;
  padding: 12px 16px;
  color: rgba(255,255,255,0.8);
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  font-weight: 500;
}

.admin-sidebar a:hover, .admin-sidebar a.active {
  background: rgba(255,255,255,0.15);
  color: var(--white);
}

.admin-content { padding: 30px; }

.admin-stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

/* ==================== FOOTER ==================== */
.footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.85);
  padding: 50px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  margin-bottom: 30px;
}

.footer h4 { color: var(--white); margin-bottom: 16px; font-size: 1.05rem; }
.footer a { color: rgba(255,255,255,0.7); display: block; margin-bottom: 8px; font-size: 0.9rem; }
.footer a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); padding-top: 20px; text-align: center; font-size: 0.85rem; opacity: 0.7; }

/* ==================== NEWSLETTER ==================== */
.newsletter-section {
  background: var(--green);
  color: var(--white);
  padding: 50px 0;
  text-align: center;
}

.newsletter-section h2 { font-size: 1.6rem; margin-bottom: 10px; }
.newsletter-section p { margin-bottom: 20px; opacity: 0.9; }

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 500px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}

.newsletter-form input {
  flex: 1;
  min-width: 250px;
  padding: 14px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
}

/* ==================== MODAL ==================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active { display: flex; }

.modal {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal h2 { margin-bottom: 20px; color: var(--green-dark); }
.modal-close { float: right; font-size: 1.5rem; cursor: pointer; background: none; border: none; color: var(--text-light); }

/* ==================== ALERTS ==================== */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-weight: 500;
}

.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.alert-error { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }
.alert-info { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }

/* ==================== PAGE HEADER ==================== */
.page-header {
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: var(--white);
  padding: 50px 20px;
  text-align: center;
}

.page-header h1 { font-size: 2rem; margin-bottom: 8px; }
.page-header p { opacity: 0.9; font-size: 1.05rem; }

/* ==================== TABS ==================== */
.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.tab {
  padding: 10px 20px;
  border: 2px solid var(--beige-dark);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 500;
  background: var(--white);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.tab:hover { border-color: var(--green); }
.tab.active { background: var(--green); color: var(--white); border-color: var(--green); }

/* ==================== LOGIN ==================== */
.login-box {
  max-width: 400px;
  margin: 60px auto;
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.login-box h2 { text-align: center; color: var(--green-dark); margin-bottom: 24px; }

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  html { font-size: 16px; }

  .menu-toggle { display: block; }

  .navbar-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    padding-bottom: 10px;
  }

  .navbar-menu.active { display: flex; }
  .navbar-menu a { padding: 12px 16px; }

  .hero { padding: 50px 20px; min-height: auto; }
  .hero h1 { font-size: 1.6rem; }
  .hero p { font-size: 1rem; }

  .card-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }

  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { padding: 16px; }

  .section { padding: 40px 0; }
  .page-header { padding: 30px 20px; }
  .page-header h1 { font-size: 1.5rem; }

  .filter-bar .form-row { grid-template-columns: 1fr; }

  .guide-section { padding: 20px; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr; }
  .stat-card .number { font-size: 2rem; }
  .btn-lg { padding: 14px 28px; font-size: 1rem; }
}

/* ==================== UTILITY ==================== */
.text-center { text-align: center; }
.text-green { color: var(--green); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.gap-1 { gap: 8px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none; }
.w-full { width: 100%; }
