/* LzyGmrs — восстановление из веб-архива (снимок 2017-06-03) */

:root {
  --accent: #940000;
  --ink: #1c1c1c;
  --ink-soft: #5a5a5a;
  --line: #e2e2e2;
  --panel: #fff;
  --bar: #000;
  --font-display: "Oswald", "Arial Narrow", Arial, sans-serif;
  --font-body: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: #ffffff url("../img/background.jpg") no-repeat center top fixed;
  background-size: cover;
  color: var(--ink);
  font: 400 15px/1.65 var(--font-body);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ---------- шапка ---------- */

.site-header {
  max-width: var(--wrap);
  margin: 0 auto;
  background: var(--panel);
  box-shadow: 0 0 24px rgba(0, 0, 0, .22);
}

.site-header__top {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 24px;
  background: var(--bar);
}
.brand { flex: 1 1 auto; }
.brand img { max-height: 74px; width: auto; }

.socials {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border: 1px solid #4a4a4a;
  color: #fff;
  border-radius: 3px;
}
.socials a:hover { background: var(--accent); }
.socials svg { width: 16px; height: 16px; fill: currentColor; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid #4a4a4a;
  border-radius: 3px;
  cursor: pointer;
}
.nav-toggle__bar { display: block; height: 2px; background: #fff; margin: 5px 0; }

.primary-nav { background: var(--bar); border-top: 1px solid #2a2a2a; }
.primary-nav ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  display: block;
  padding: 14px 18px;
  font-family: var(--font-display);
  font-size: .88rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #fff;
}
.primary-nav a:hover { background: var(--accent); text-decoration: none; }

/* ---------- контент ---------- */

main {
  max-width: var(--wrap);
  margin: 0 auto;
  background: var(--panel);
  box-shadow: 0 0 24px rgba(0, 0, 0, .22);
  padding: 0 24px 40px;
}

section { padding-top: 34px; }

.section-head {
  font-size: 1.35rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #fff;
  background: var(--bar);
  padding: 9px 14px;
  margin-bottom: 22px;
}

/* главная новость */

.lead { position: relative; margin-bottom: 20px; }
.lead__img { width: 100%; }
.lead__text {
  padding: 18px 20px;
  background: #f5f5f5;
  border-left: 4px solid var(--accent);
}
.lead h1 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
.lead__excerpt { margin: 10px 0 0; color: var(--ink-soft); }

.post__meta {
  margin: 6px 0 0;
  font-size: .78rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.post__author { color: var(--accent); font-weight: 600; }

.subs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}
.subs > * { min-width: 0; }
.sub { border: 1px solid var(--line); }
.sub img { width: 100%; }
.sub__title { margin: 0; font-family: var(--font-display); font-weight: 500; line-height: 1.15; font-size: 1.02rem; padding: 12px 14px 0; }
.sub__excerpt { margin: 8px 0 14px; padding: 0 14px; font-size: .88rem; color: var(--ink-soft); }

/* лента */

.post-list, .cat__more {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.post > * { min-width: 0; }
.post:last-child { border-bottom: 0; }
.post:not(:has(> .post__img)) { grid-template-columns: minmax(0, 1fr); }
.post__title { font-size: 1.25rem; }
.post__excerpt { margin: 10px 0 0; color: var(--ink-soft); }

/* категории */

.cat__lead {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 22px;
  align-items: start;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.cat__lead > * { min-width: 0; }
.cat__lead:not(:has(> .cat__img)) { grid-template-columns: minmax(0, 1fr); }
.cat__img { width: 100%; }
.cat__title { margin: 0; font-family: var(--font-display); font-weight: 500; line-height: 1.15; font-size: 1.35rem; }
.cat__excerpt { margin: 10px 0 0; color: var(--ink-soft); }

.cat__more {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  padding-top: 18px;
}
.cat__more > * { min-width: 0; }
.cat__more li {
  display: grid;
  grid-template-columns: 85px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
.cat__more li > img { grid-column: 1; }
.cat__more li > div { grid-column: 2; min-width: 0; }
.cat__more li:not(:has(> img)) { grid-template-columns: minmax(0, 1fr); }
.cat__more li:not(:has(> img)) > div { grid-column: 1; }
.cat__more-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: .98rem;
  line-height: 1.25;
}

/* ---------- подвал ---------- */

.site-footer {
  max-width: var(--wrap);
  margin: 0 auto;
  background: var(--bar);
  color: #cfcfcf;
  text-align: center;
  padding: 32px 24px 40px;
  box-shadow: 0 0 24px rgba(0, 0, 0, .22);
}
.site-footer__brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #fff;
}
.site-footer__tag { margin: 6px 0 18px; font-size: .92rem; }
.site-footer__legal { margin: 0; font-size: .76rem; color: #8b8b8b; }

/* ---------- мобильные ---------- */

@media (max-width: 767px) {
  body { background-attachment: scroll; }

  .site-header__top { flex-wrap: wrap; padding: 14px 16px; }
  .brand { flex: 1 1 100%; }
  .brand img { max-height: 56px; }
  .nav-toggle { display: block; margin-left: auto; }

  .primary-nav { display: none; }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; }
  .primary-nav a { border-top: 1px solid #222; }

  main { padding: 0 16px 30px; }

  .post { grid-template-columns: 1fr; gap: 12px; }
  .post__img, .cat__img { width: 100%; }
  .cat__more li { grid-template-columns: 85px minmax(0, 1fr); }
  .cat__lead { grid-template-columns: 1fr; }
  .section-head { font-size: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* инлайновые ссылки в тексте различимы не только цветом (WCAG 1.4.1) */
p a:not(.btn):not(.link-arrow) { text-decoration: underline; }
p a:not(.btn):not(.link-arrow):hover { text-decoration: none; }
