/* ---------- Общие ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.65;
  color: #2b3a2f;
  background: #f7f5ef;
}
.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 800px; margin: 0 auto; padding: 0 20px; }

/* ---------- Шапка ---------- */
header {
  background: linear-gradient(135deg, #4a7c59, #6ba368);
  color: #fff;
  padding: 24px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
header .container {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 12px;
}
.logo { font-size: 22px; font-weight: 700; letter-spacing: 0.3px; color: #fff; text-decoration: none; }
.logo span { color: #d4e8c2; }
nav a { color: #eaf4e2; text-decoration: none; margin-left: 20px; font-size: 15px; }
nav a:hover { text-decoration: underline; }

/* ---------- Главная ---------- */
.hero {
  background: #eef3e8;
  padding: 60px 0;
  text-align: center;
  border-bottom: 1px solid #e0e8d8;
}
.hero h1 { font-size: 34px; color: #345a3f; margin-bottom: 12px; }
.hero p { color: #5a6b5d; font-size: 17px; max-width: 640px; margin: 0 auto; }

main { padding: 50px 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.card {
  background: #fff; border-radius: 10px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(60,80,60,0.06);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(60,80,60,0.12); }
.card-img { height: 160px; background-size: cover; background-position: center; }
.card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.card-body h2 { font-size: 19px; color: #345a3f; margin-bottom: 10px; }
.card-body p { font-size: 15px; color: #5a6b5d; margin-bottom: 14px; flex: 1; }
.card-body a { color: #4a7c59; text-decoration: none; font-weight: 600; font-size: 14px; }
.card-body a:hover { text-decoration: underline; }

/* ---------- Статьи ---------- */
main.article-main { padding: 40px 0 60px; }
article {
  background: #fff; padding: 40px; border-radius: 10px;
  box-shadow: 0 2px 10px rgba(60,80,60,0.06);
}
article h1 { color: #345a3f; margin-bottom: 12px; font-size: 30px; line-height: 1.3; }
.meta { color: #8a9a8c; font-size: 14px; margin-bottom: 24px; }
article h2 { color: #4a7c59; margin: 26px 0 12px; font-size: 21px; }
article p { margin-bottom: 14px; color: #3a4a3d; }
article ul, article ol { margin: 12px 0 18px 22px; }
article li { margin-bottom: 8px; }
article a { color: #4a7c59; }
.back-link { display: inline-block; margin-bottom: 20px; color: #4a7c59; text-decoration: none; font-weight: 600; }
.back-link:hover { text-decoration: underline; }

/* ---------- Форма ---------- */
form.contact-form { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
form.contact-form label { font-weight: 600; color: #345a3f; font-size: 15px; }
form.contact-form input,
form.contact-form textarea {
  font: inherit; padding: 12px 14px; border: 1px solid #cfd8ca; border-radius: 8px;
  background: #fbfcf9; color: #2b3a2f; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
form.contact-form input:focus,
form.contact-form textarea:focus {
  border-color: #6ba368;
  box-shadow: 0 0 0 3px rgba(107,163,104,0.15);
}
form.contact-form textarea { min-height: 140px; resize: vertical; }
form.contact-form button {
  align-self: flex-start; background: #4a7c59; color: #fff; border: 0;
  padding: 12px 26px; border-radius: 8px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: background 0.2s;
}
form.contact-form button:hover { background: #3d6a4a; }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding: 80px 0; }
.error-page h1 { font-size: 80px; color: #4a7c59; margin-bottom: 8px; }
.error-page p { color: #5a6b5d; font-size: 18px; margin-bottom: 26px; }
.btn {
  display: inline-block; background: #4a7c59; color: #fff;
  padding: 12px 26px; border-radius: 8px; text-decoration: none; font-weight: 600;
}
.btn:hover { background: #3d6a4a; }

/* ---------- Подвал ---------- */
footer {
  background: #2f4636; color: #c5d4c2; padding: 30px 0;
  text-align: center; font-size: 14px; margin-top: 40px;
}
footer a { color: #a8c79a; text-decoration: none; margin: 0 8px; }
footer a:hover { text-decoration: underline; }


.article-hero {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 24px;
}
