/* Общие стили и переменные */
:root {
  --primary: #2d5a27;
  --secondary: #1a3318;
  --accent: #8b5a2b;
  --accent-light: #d4a373;
  --bg: #f4f6f0;
  --text: #232b2b;
  --card-bg: #ffffff;
  --border: #e0e6db;
}

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

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

header {
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
  color: #fff;
  padding: 1.8rem 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.header-content {
  max-width: 1050px;
  margin: 0 auto;
}

.header-content h1 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.header-content p {
  color: #d4e09b;
  font-size: 0.95rem;
  margin-top: 0.2rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 1.2rem;
}

nav a {
  color: #e3ebd3;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  transition: all 0.2s ease;
}

nav a:hover, nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
}

main {
  max-width: 1050px;
  width: 100%;
  margin: 2rem auto;
  padding: 0 1.2rem;
  flex: 1;
}

.hero {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  margin-bottom: 2rem;
  border-left: 6px solid var(--primary);
}

.hero h2 {
  font-size: 1.6rem;
  color: var(--secondary);
  margin-bottom: 0.8rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.8rem;
}

.card {
  background: var(--card-bg);
  padding: 1.6rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.card h3 {
  font-size: 1.3rem;
  color: var(--secondary);
  margin-bottom: 0.6rem;
}

.card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.2rem;
  background: #eaeee6;
  border: 1px solid #dce2d6;
}

.card p {
  color: #444;
  margin-bottom: 1rem;
}

.btn-link {
  display: inline-block;
  color: var(--primary);
  font-weight: bold;
  text-decoration: none;
  margin-top: auto;
  transition: color 0.2s;
}

.btn-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.info-list {
  margin: 1rem 0 1.5rem 1.4rem;
  color: #333;
}

.info-list li {
  margin-bottom: 0.6rem;
}

/* Сравнительная таблица */
.table-wrapper {
  overflow-x: auto;
  background: var(--card-bg);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
  margin-top: 1.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

th, td {
  padding: 1rem 1.2rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.5px;
}

tbody tr:hover {
  background: #f8faf6;
}

tbody tr:last-child td {
  border-bottom: none;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-croc {
  background: #e1eedd;
  color: #245c22;
}

.badge-alli {
  background: #e6ebf5;
  color: #2b4c7e;
}

/* Викторина */
.quiz-box {
  background: var(--card-bg);
  padding: 2.2rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  border: 1px solid var(--border);
  max-width: 760px;
  margin: 0 auto;
}

.quiz-header {
  border-bottom: 2px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
}

.quiz-progress {
  color: #666;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.quiz-question {
  font-size: 1.3rem;
  color: var(--secondary);
  font-weight: 700;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.option-btn {
  padding: 1rem 1.2rem;
  font-size: 1.05rem;
  text-align: left;
  border: 2px solid #e0e5db;
  background: #fff;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #333;
}

.option-btn:hover:not([disabled]) {
  background: #f1f6ec;
  border-color: var(--primary);
}

.option-btn.correct {
  background: #d4edda !important;
  border-color: #28a745 !important;
  color: #155724 !important;
  font-weight: 600;
}

.option-btn.wrong {
  background: #f8d7da !important;
  border-color: #dc3545 !important;
  color: #721c24 !important;
}

.feedback-box {
  padding: 1rem 1.2rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  display: none;
}

.feedback-box.correct {
  background: #e2f0d9;
  border-left: 5px solid #28a745;
  color: #204d16;
}

.feedback-box.wrong {
  background: #fce8e6;
  border-left: 5px solid #dc3545;
  color: #78261f;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.85rem 1.6rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-primary:hover {
  background: var(--secondary);
}

.result-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  display: none;
}

.result-card h3 {
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.result-score {
  font-size: 1.3rem;
  color: #444;
  margin-bottom: 1.8rem;
}

footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: 0.9rem;
  color: #6d756b;
  background: #e8ede3;
  margin-top: 3rem;
}
