/* Веломаршруты выходного дня — стили сайта */
:root {
  --bg: #faf8f3;
  --bg-alt: #f1ede3;
  --text: #24302a;
  --muted: #5f6b64;
  --accent: #2e6e40;
  --accent-dark: #22532f;
  --accent-soft: #dfeadf;
  --line: #ddd7c9;
  --card: #ffffff;
  --max: 960px;
  --radius: 10px;
  --font: "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  --serif: Georgia, "Times New Roman", "Noto Serif", serif;
}

* { box-sizing: border-box; }

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

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

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

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

h1, h2, h3 { font-family: var(--serif); line-height: 1.25; font-weight: 700; margin: 1.4em 0 0.5em; }
h1 { font-size: 2.1rem; margin-top: 0.4em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; margin: 0 0 1.2em; }
li { margin-bottom: 0.35em; }

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

.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: 8px 12px; }
.skip:focus { left: 8px; z-index: 50; }

/* Шапка */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; flex-wrap: wrap; }
.brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-sub { color: var(--accent); font-weight: 400; font-style: italic; margin-left: 4px; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid var(--accent);
  position: relative; flex: none;
}
.brand-mark::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px;
  margin: -3px 0 0 -3px; background: var(--accent); border-radius: 50%;
}
.nav { display: flex; gap: 6px; }
.nav a {
  color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: 6px; font-weight: 500;
}
.nav a:hover { background: var(--accent-soft); color: var(--accent-dark); }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 6px;
  padding: 6px 12px; font: inherit; color: var(--text); cursor: pointer;
}

/* Главная */
.hero {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center;
  padding: 36px 0 12px;
}
.hero h1 { font-size: 2.3rem; margin-top: 0; }
.hero-text p { font-size: 1.05rem; }
.hero-img { margin: 0; }
.hero-img img { border-radius: var(--radius); }
.hero-img figcaption, .photo figcaption, .video figcaption {
  font-size: 0.88rem; color: var(--muted); margin-top: 6px; text-align: center;
}
.hero-links { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-block; background: var(--accent); color: #fff; padding: 10px 18px;
  border-radius: 6px; text-decoration: none; font-weight: 600; border: 0; font: inherit; cursor: pointer;
}
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn-light { background: var(--accent-soft); color: var(--accent-dark); }
.btn-light:hover { background: #cfdfcf; }

section { margin: 36px 0; }
section > h2 { border-bottom: 2px solid var(--accent-soft); padding-bottom: 6px; }

/* Карточки */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.card-img img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-body { padding: 14px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin: 6px 0 8px; font-size: 1.15rem; }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { color: var(--accent-dark); }
.card p { font-size: 0.95rem; }
.card .more { margin-top: auto; margin-bottom: 0; }
.meta { font-size: 0.85rem; color: var(--muted); margin-bottom: 0; }
.meta .cat, a.cat { color: var(--accent-dark); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.78rem; text-decoration: none; }

/* Видео и галерея */
.video { margin: 0; }
.video video { width: 100%; border-radius: var(--radius); background: #000; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery-grid img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 8px; }
.gallery-grid a { display: block; }

.about-short { background: var(--bg-alt); padding: 20px 24px; border-radius: var(--radius); }
.about-short h2 { margin-top: 0; border: 0; }

/* Статья */
.post-head { padding-top: 20px; }
.post-head h1 { margin-bottom: 0.4em; }
.lead { font-size: 1.15rem; color: #3d4a43; }
.byline { color: var(--muted); font-size: 0.9rem; font-style: italic; }
.post-body { max-width: 720px; }
.post-body h2 { margin-top: 1.6em; }
.photo { margin: 24px 0; }
.photo img { border-radius: var(--radius); }
.photo.wide { margin-top: 12px; }
.post-nav {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 14px 0; margin: 36px 0; font-size: 0.95rem;
}
.post-nav .next { margin-left: auto; text-align: right; }
.more-posts h2 { border-bottom: 2px solid var(--accent-soft); padding-bottom: 6px; }
.more-posts .cards { grid-template-columns: repeat(3, 1fr); }
.more-posts .card p:not(.meta):not(.more) { display: none; }

/* Страницы */
.page { max-width: 760px; padding-top: 12px; }
.page-head { padding-top: 12px; }
.cat-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.cat-list a {
  display: inline-block; background: var(--accent-soft); color: var(--accent-dark);
  padding: 4px 12px; border-radius: 20px; text-decoration: none; font-size: 0.9rem;
}
.cat-list li { margin: 0; }
.timeline li { margin-bottom: 0.6em; }
.notfound h1 { color: var(--accent-dark); }

/* Контакты */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.contact-info h2, .contact-form h2 { margin-top: 0.6em; font-size: 1.25rem; }
.big { font-size: 1.25rem; }
form label { display: block; font-weight: 600; font-size: 0.92rem; margin-bottom: 4px; }
form input, form textarea, form select {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px;
  font: inherit; background: #fff; color: var(--text);
}
form input:focus, form textarea:focus, form select:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.form-note { font-size: 0.85rem; color: var(--muted); }
.form-note.ok { color: var(--accent-dark); font-weight: 600; }
.form-note.err { color: #a33; font-weight: 600; }

/* Просмотр фото */
.lightbox {
  position: fixed; inset: 0; background: rgba(20, 28, 24, 0.92); display: none;
  align-items: center; justify-content: center; z-index: 100; padding: 20px; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.lightbox figcaption { color: #eee; text-align: center; margin-top: 10px; }
.lightbox figure { margin: 0; }
body.noscroll { overflow: hidden; }

/* Подвал */
.site-footer {
  margin-top: 60px; background: var(--bg-alt); border-top: 1px solid var(--line);
  padding: 28px 0 32px; font-size: 0.9rem; color: var(--muted);
}
.foot-main { color: var(--text); font-weight: 600; }
.foot-links a { margin-right: 4px; }

/* Телефоны и планшеты */
@media (max-width: 760px) {
  body { font-size: 16px; }
  h1 { font-size: 1.7rem; }
  .hero { grid-template-columns: 1fr; padding-top: 20px; gap: 16px; }
  .hero h1 { font-size: 1.8rem; }
  .cards, .more-posts .cards, .contact-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: inline-block; }
  .nav {
    display: none; width: 100%; flex-direction: column; padding: 8px 0 12px; border-top: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav a { padding: 10px 6px; }
  .post-nav { flex-direction: column; }
  .post-nav .next { margin-left: 0; text-align: left; }
}

@media (max-width: 420px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .brand { font-size: 1.15rem; }
}

@media print {
  .site-header, .site-footer, .more-posts, .post-nav, .nav-toggle { display: none; }
  body { background: #fff; }
}
