/* Лесные тропы — оформление сайта. Светлая тема, без внешних шрифтов. */

:root {
  --bg: #f6f3ea;
  --paper: #fffdf7;
  --text: #2a2d26;
  --muted: #6b6f63;
  --line: #e2ddcf;
  --green: #2f5d3a;
  --green-dark: #22452b;
  --green-light: #e4eddf;
  --accent: #b2652a;
  --max: 960px;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
}

a { color: var(--green); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--green-dark); }

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

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.25; color: var(--green-dark); margin: 1.6em 0 0.6em; }
h1 { font-size: 2.1rem; margin-top: 0.4em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.2em; padding-left: 1.4em; }
li { margin-bottom: 0.35em; }
blockquote {
  margin: 1.4em 0; padding: 0.6em 1.2em;
  border-left: 4px solid var(--green);
  background: var(--paper); color: var(--muted); font-style: italic;
}
hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
small, .small { font-size: 0.9rem; color: var(--muted); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Шапка */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px 24px; padding-top: 16px; padding-bottom: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--green-dark); }
.brand img { width: 36px; height: 36px; }
.brand-name { font-family: var(--serif); font-size: 1.45rem; font-weight: 700; letter-spacing: 0.01em; }
.brand-tag { display: block; font-size: 0.8rem; color: var(--muted); font-family: var(--sans); font-weight: 400; }

.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  text-decoration: none; padding: 6px 12px; border-radius: 6px;
  color: var(--green-dark); font-weight: 500;
}
.nav a:hover, .nav a.active { background: var(--green-light); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 10px; font: inherit; color: var(--green-dark); cursor: pointer;
}

/* Обложка на главной */
.hero {
  position: relative; margin: 24px 0 8px; border-radius: 10px; overflow: hidden;
  background: #1f2a22;
}
.hero img { width: 100%; height: 420px; object-fit: cover; opacity: 0.85; }
.hero-text {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 32px;
  background: linear-gradient(to top, rgba(20, 30, 22, 0.85), rgba(20, 30, 22, 0));
  color: #fff;
}
.hero-text h1 { color: #fff; margin: 0 0 6px; font-size: 2.2rem; text-shadow: 0 1px 6px rgba(0,0,0,0.5); }
.hero-text p { margin: 0; font-size: 1.05rem; color: #eef2e8; text-shadow: 0 1px 4px rgba(0,0,0,0.6); }

.lead { font-size: 1.12rem; color: #3e4238; }

/* Лента статей */
.section-title { display: flex; align-items: baseline; gap: 14px; border-bottom: 2px solid var(--green); padding-bottom: 6px; margin-top: 2.2em; }
.section-title h2 { margin: 0; }
.section-title a { font-size: 0.9rem; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 20px 0; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  display: flex; flex-direction: column;
}
.card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin: 0 0 8px; font-size: 1.12rem; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card p { margin: 0 0 10px; font-size: 0.95rem; color: #474b41; flex: 1; }
.meta { font-size: 0.85rem; color: var(--muted); }
.meta time { white-space: nowrap; }
.tag { display: inline-block; background: var(--green-light); color: var(--green-dark); border-radius: 4px; padding: 1px 7px; font-size: 0.78rem; margin-right: 4px; }

.post-list { list-style: none; padding: 0; margin: 10px 0 0; }
.post-list li { display: flex; gap: 16px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.post-list img { width: 150px; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.post-list h3 { margin: 0 0 4px; font-size: 1.1rem; }
.post-list p { margin: 4px 0 0; font-size: 0.95rem; color: #474b41; }

/* Видео */
.video-block { margin: 20px 0; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.video-block video { width: 100%; border-radius: 6px; background: #000; }
.video-block p { margin: 10px 0 0; }

/* Галерея */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 6px; }
.gallery figcaption { font-size: 0.82rem; color: var(--muted); margin-top: 4px; }

/* Статья */
.article { max-width: 720px; margin: 0 auto; }
.article-header { margin: 28px 0 18px; }
.article-header .meta { margin-top: 6px; }
.article figure.photo { margin: 1.6em 0; }
.article figure.photo img { border-radius: 8px; width: 100%; }
.article figure.photo figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 6px; text-align: center; }
.article .cover img { aspect-ratio: 3 / 2; object-fit: cover; }
.tip {
  background: var(--green-light); border-left: 4px solid var(--green);
  padding: 10px 16px; border-radius: 0 6px 6px 0; margin: 1.3em 0;
}
.tip strong { color: var(--green-dark); }
.route-facts { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 12px 18px; margin: 1.2em 0; }
.route-facts dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 18px; margin: 0; }
.route-facts dt { color: var(--muted); }
.route-facts dd { margin: 0; }

.post-nav { display: flex; justify-content: space-between; gap: 16px; margin: 2.5em 0 1em; padding-top: 1em; border-top: 1px solid var(--line); font-size: 0.95rem; }
.post-nav a { max-width: 48%; }

/* Об авторе, контакты */
.author-card { display: flex; gap: 20px; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin: 20px 0; }
.author-card img { width: 180px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 50%; flex-shrink: 0; }
.author-card p { margin-bottom: 0.6em; }

.form { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 20px; max-width: 560px; }
.form label { display: block; font-weight: 500; margin: 12px 0 4px; }
.form input, .form textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #cfc9b8; border-radius: 6px;
  font: inherit; background: #fff; color: var(--text);
}
.form textarea { min-height: 140px; resize: vertical; }
.form input:focus, .form textarea:focus { outline: 2px solid var(--green); outline-offset: 1px; border-color: var(--green); }
.btn {
  display: inline-block; margin-top: 14px; background: var(--green); color: #fff; border: 0;
  padding: 10px 20px; border-radius: 6px; font: inherit; font-weight: 500; cursor: pointer;
}
.btn:hover { background: var(--green-dark); }
.form-note { margin-top: 12px; padding: 10px 12px; border-radius: 6px; background: #fff6e5; border: 1px solid #ecd8b0; display: none; }
.form-note.show { display: block; }

/* 404 */
.notfound { text-align: center; padding: 60px 0; }
.notfound h1 { font-size: 3rem; }

/* Подвал */
.site-footer { margin-top: 48px; background: var(--green-dark); color: #d9e3d3; padding: 28px 0; font-size: 0.9rem; }
.site-footer a { color: #fff; }
.site-footer .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 32px; }
.site-footer p { margin: 0 0 6px; }

.to-top {
  position: fixed; right: 18px; bottom: 18px; width: 42px; height: 42px; border-radius: 50%;
  background: var(--green); color: #fff; border: 0; font-size: 1.2rem; cursor: pointer;
  opacity: 0; pointer-events: none; transition: opacity 0.2s; box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.to-top.show { opacity: 1; pointer-events: auto; }

/* Телефон */
@media (max-width: 720px) {
  body { font-size: 16px; }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.3rem; }
  .wrap { padding: 0 16px; }
  .site-header .wrap { align-items: center; }
  .nav-toggle { display: inline-block; }
  .nav { display: none; width: 100%; flex-direction: column; gap: 2px; padding-top: 8px; border-top: 1px solid var(--line); }
  .nav.open { display: flex; }
  .hero img { height: 260px; }
  .hero-text { padding: 16px; }
  .hero-text h1 { font-size: 1.5rem; }
  .hero-text p { font-size: 0.95rem; }
  .cards { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .post-list li { flex-direction: column; gap: 10px; }
  .post-list img { width: 100%; }
  .author-card { flex-direction: column; align-items: center; text-align: center; }
  .route-facts dl { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .post-nav { flex-direction: column; }
  .post-nav a { max-width: 100%; }
}

@media (min-width: 721px) and (max-width: 900px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

@media print {
  .site-header, .site-footer, .to-top, .video-block { display: none; }
  body { background: #fff; }
}
