/* ============================================================
   Intelijen — адаптация скачанного шаблона W3Layouts под флот.
   Единственные "ручки" от генератора — --accent / --accent-dim
   (writePalette в src/generator/generateSite.js). Всё остальное
   (тёмная палитра панели, фон-подложка) фиксировано в этом файле.
   ============================================================ */
:root {
  --accent: #EB5757;
  --accent-dim: #B33A3A;

  --ground: var(--accent-dim);   /* цветная подложка всей страницы */
  --panel: #1d1d1d;              /* тёмная панель по центру */
  --panel-2: #262626;            /* карточки/врезки внутри панели */
  --panel-3: #333333;            /* строка навигации */
  --line: rgba(245, 238, 243, 0.15);
  --line-soft: rgba(120, 124, 127, 0.4);
  --text: #f3f3f3;
  --text-dim: #8b8f92;
  --text-mut: #6c6f72;
}

*, *::before, *::after { box-sizing: border-box; }
html, body, div, span, h1, h2, h3, h4, h5, h6, p, blockquote, a, img, ul, ol, li,
figure, figcaption, header, footer, nav, section, article, aside, form, input, button {
  margin: 0; padding: 0; border: 0; font: inherit; vertical-align: baseline;
}
ol, ul { list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

body {
  font-family: "Segoe UI", "Open Sans", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--ground);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  width: 80%;
  max-width: 1200px;
  margin: 0 auto;
}
@media (max-width: 1366px) { .wrap { width: 90%; } }
@media (max-width: 800px)  { .wrap { width: 94%; } }

/* container-алиас — на случай, если общий partial (homepage-block.php) ждёт .container */
.container { width: 100%; }

/* ---------- header ---------- */
.site-header { background: var(--panel); }
.site-header-top { padding: 28px 0 18px; }
.site-logo {
  display: inline-block;
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  color: var(--text-dim);
  letter-spacing: 0.5px;
}
.site-logo b { color: #fff; font-weight: 800; }

.site-nav-bar {
  background: var(--panel-3);
  border-radius: 5px 5px 0 0;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}
.site-nav a {
  display: block;
  padding: 18px 22px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-dim);
  border-left: 1px solid #424242;
  transition: color 0.25s ease, background 0.25s ease;
  white-space: nowrap;
}
.site-nav a:first-child { border-left: 0; }
.site-nav a:hover,
.site-nav a.is-active { color: #fff; }

.nav-toggle {
  display: none;
  width: 46px; height: 40px;
  margin: 6px 0 10px;
  background: var(--accent);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 12px;
  width: 22px; height: 2px;
  background: #fff;
}
.nav-toggle span { top: 19px; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after  { top: 7px; }

.nav-mobile { display: none; background: var(--panel-3); border-radius: 0 0 5px 5px; }
.nav-mobile a {
  display: block;
  padding: 13px 18px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-dim);
  border-top: 1px solid #424242;
}
.nav-mobile a:hover { color: #fff; }
.nav-mobile.open { display: block; }

@media (max-width: 800px) {
  .site-nav { display: none; }
  .nav-toggle { display: block; }
}

/* ---------- panel ---------- */
.site-main { padding: 28px 0 44px; }       /* цветная подложка видна сверху и снизу панели */
.panel {
  background: var(--panel);
  border-radius: 5px;
  padding: 0 3%;
}
.panel-inner { padding: 10px 0 40px; }
@media (max-width: 800px) { .panel { padding: 0 6%; } }

/* ---------- hero ---------- */
.hero {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 40px 0 34px;
  border-bottom: 1px solid var(--line);
}
.hero-text { flex: 1 1 auto; min-width: 0; }
.hero-kicker {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 10px;
}
.hero-title {
  font-size: 34px;
  line-height: 1.15;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 14px;
}
.hero-lead { color: var(--text-mut); font-size: 15px; margin-bottom: 20px; max-width: 46ch; }
.hero-media {
  flex: 0 0 40%;
  max-width: 40%;
}
.hero-media img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 5px;
}
@media (max-width: 900px) {
  .hero { flex-direction: column; align-items: flex-start; gap: 24px; }
  .hero-media { flex-basis: auto; max-width: 100%; width: 100%; }
  .hero-title { font-size: 26px; }
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #fff;
  background: var(--accent);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.25s ease;
}
.btn:hover { background: var(--accent-dim); }

/* ---------- home layout ---------- */
.home-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 44px;
  padding-top: 34px;
}
@media (max-width: 900px) {
  .home-layout { grid-template-columns: 1fr; gap: 34px; }
}

.section-title {
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text);
  padding-bottom: 12px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.section-title span { color: var(--accent); }

/* ---------- promo grid (3 featured on home) ---------- */
.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
  padding: 30px 0 34px;
  border-bottom: 1px solid var(--line);
}
.promo-card { background: var(--panel-2); border-radius: 5px; overflow: hidden; }
.promo-card-cover { display: block; height: 150px; object-fit: cover; width: 100%; background: #2c2c2c; }
.promo-card-body { padding: 18px; }
.promo-card-cat {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--accent);
}
.promo-card h3 {
  font-size: 15px; font-weight: 700; line-height: 1.35;
  text-transform: uppercase; color: #fff; margin: 8px 0 10px;
}
.promo-card:hover h3 { color: var(--accent); }
.promo-card p { font-size: 13px; color: var(--text-mut); }

/* ---------- article list (blog_grid) ---------- */
.post {
  padding-bottom: 34px;
  margin-bottom: 34px;
  border-bottom: 1px solid var(--line-soft);
}
.post:last-child { border-bottom: 0; margin-bottom: 0; }
.post-title {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
  color: #fff;
  margin-bottom: 14px;
}
.post-title a:hover { color: var(--accent); }
.post-cover {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 16px;
  background: #2c2c2c;
}
.post-excerpt { font-size: 14px; color: #9a9a9a; line-height: 1.7; margin-bottom: 16px; }
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.post-meta .cat { color: var(--accent); font-weight: 700; text-transform: uppercase; }
.post-meta .star { color: #F5A623; }

/* ---------- pagination ---------- */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.pagination a, .pagination span {
  display: block;
  padding: 7px 13px;
  font-size: 13px;
  color: var(--text-dim);
  background: #3d3d3d;
  border: 1px solid #555;
  border-radius: 3px;
}
.pagination a:hover { color: #fff; border-color: var(--accent); }
.pagination .is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- sidebar ---------- */
.sidebar-block { margin-bottom: 34px; }
.sidebar-block h3 {
  font-size: 17px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text);
  padding-bottom: 10px;
  margin-bottom: 6px;
}
.sidebar-block h3 span { color: var(--accent); }
.cat-list li a {
  display: block;
  padding: 11px 0 11px 18px;
  font-size: 14px;
  color: var(--text-mut);
  border-top: 1px solid var(--line-soft);
  position: relative;
  transition: color 0.25s ease;
}
.cat-list li:first-child a { border-top: 0; }
.cat-list li a::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 6px; height: 6px;
  margin-top: -3px;
  background: var(--accent);
  border-radius: 1px;
}
.cat-list li a:hover { color: #fff; }
.cat-list .count { color: var(--text-dim); font-size: 12px; }

.mini-post {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}
.mini-post:first-of-type { border-top: 0; }
.mini-post-thumb {
  flex: 0 0 64px;
  width: 64px; height: 64px;
  object-fit: cover;
  border-radius: 4px;
  background: #2c2c2c;
}
.mini-post-title { font-size: 13px; line-height: 1.4; color: var(--text); }
.mini-post:hover .mini-post-title { color: var(--accent); }
.mini-post-date { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

/* ---------- article cards (grid) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 26px;
}
.a-card { background: var(--panel-2); border-radius: 5px; overflow: hidden; display: flex; flex-direction: column; }
.a-card-cover {
  height: 170px;
  background-size: cover;
  background-position: center;
  background-color: #2c2c2c;
}
.a-card-body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; }
.a-card-meta { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-dim); }
.a-card-meta .cat { color: var(--accent); font-weight: 700; }
.a-card h3 { font-size: 15px; font-weight: 700; line-height: 1.35; color: #fff; }
.a-card:hover h3 { color: var(--accent); }
.a-card p { font-size: 13px; color: var(--text-mut); }
.a-card-foot { margin-top: auto; font-size: 12px; color: var(--text-dim); }
.a-card-foot .star { color: #F5A623; }

/* ---------- category tabs (stati) ---------- */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.cat-tabs a {
  padding: 8px 18px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--accent);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  transition: all 0.25s ease;
}
.cat-tabs a:hover,
.cat-tabs a.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- page header (rubrika / stati / 404 / privacy) ---------- */
.page-head {
  padding: 34px 0 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 6px;
}
.page-head .eyebrow {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--accent); margin-bottom: 10px;
}
.page-head h1 {
  font-size: 28px; font-weight: 800; text-transform: uppercase; color: #fff;
  line-height: 1.2;
}
.page-head p { color: var(--text-mut); margin-top: 12px; max-width: 62ch; }
.page-head .meta { color: var(--text-dim); font-size: 13px; margin-top: 12px; }

/* ---------- breadcrumbs ---------- */
.breadcrumbs { padding: 22px 0 0; font-size: 12.5px; color: var(--text-dim); }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs .sep { margin: 0 7px; opacity: 0.5; }

/* ---------- single article ---------- */
.article-head { padding: 26px 0 22px; }
.article-head .eyebrow {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--accent); margin-bottom: 12px;
}
.article-head h1 {
  font-size: 30px; font-weight: 800; line-height: 1.2; color: #fff; margin-bottom: 14px;
}
.article-head .lead { font-size: 16px; color: #b7b7b7; margin-bottom: 14px; }
.article-head .byline { font-size: 13px; color: var(--text-dim); }
.article-head .byline .star { color: #F5A623; }

.article-cover-img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: 6px;
  margin: 6px 0 30px;
}

.article-body { font-size: 16px; line-height: 1.8; color: #d7d7d7; }
.article-body > *:first-child { margin-top: 0; }
.article-body p { margin: 0 0 20px; }
.article-body h2 { font-size: 23px; color: #fff; margin: 34px 0 14px; text-transform: none; font-weight: 700; }
.article-body h3 { font-size: 19px; color: #fff; margin: 26px 0 12px; font-weight: 700; }
.article-body ul, .article-body ol { margin: 0 0 20px 22px; }
.article-body li { margin-bottom: 8px; }
.article-body ul li { list-style: disc; }
.article-body ol li { list-style: decimal; }
.article-body a { color: var(--accent); text-decoration: underline; }
.article-body img { border-radius: 6px; margin: 22px 0; }
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 18px;
  margin: 22px 0;
  color: var(--text-mut);
  font-style: italic;
}
.article-body table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 14px; }
.article-body th, .article-body td { border: 1px solid var(--line-soft); padding: 9px 12px; text-align: left; }
.article-body th { background: var(--panel-2); color: #fff; }

.article-foot-author {
  display: flex; align-items: center; gap: 14px;
  margin-top: 34px; padding: 20px;
  background: var(--panel-2);
  border-radius: 6px;
}
.article-foot-author .who { font-size: 14px; color: var(--text); }
.article-foot-author .who b { color: #fff; }
.article-foot-author .role { font-size: 12.5px; color: var(--text-dim); }

/* rating widget (partial остаётся из core-template — стилизуем классы тут) */
.article-rating {
  margin-top: 36px;
  padding: 26px;
  background: var(--panel-2);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  text-align: center;
}
.article-rating-title { font-size: 14px; font-weight: 700; margin-bottom: 14px; text-transform: uppercase; letter-spacing: 0.5px; }
.article-rating-summary { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.article-rating-value { font-size: 24px; font-weight: 800; line-height: 1; color: #fff; }
.article-rating-stars-display { position: relative; display: inline-block; font-size: 19px; line-height: 1; letter-spacing: 3px; }
.article-rating-stars-bg { color: var(--line-soft); }
.article-rating-stars-fg { position: absolute; top: 0; left: 0; overflow: hidden; white-space: nowrap; color: #F5A623; }
.article-rating-count { font-size: 12.5px; color: var(--text-dim); }
.article-rating-picker { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.article-rating-picker-label { font-size: 13px; color: var(--text-dim); }
.article-rating-picker-stars { display: flex; gap: 2px; }
.rating-star-btn {
  background: none; border: none; cursor: pointer;
  font-size: 26px; line-height: 1; color: var(--line-soft);
  padding: 2px 3px; transition: color 0.15s ease, transform 0.15s ease;
}
.rating-star-btn.is-active, .rating-star-btn:hover { color: #F5A623; transform: scale(1.12); }
.article-rating-thanks { font-size: 13.5px; color: var(--accent); font-weight: 600; }

/* "Похожие статьи" внизу статьи */
.related-wrap { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--line); }
.related-wrap .eyebrow {
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--accent); margin-bottom: 6px;
}
.related-wrap h2 { font-size: 19px; text-transform: uppercase; color: #fff; margin-bottom: 22px; }

/* ---------- homepage-block (общий partial) ---------- */
.homepage-about {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  color: #c7c7c7;
  font-size: 15px;
  line-height: 1.8;
}
.homepage-about h2 { font-size: 20px; color: #fff; text-transform: uppercase; margin-bottom: 14px; }
.homepage-about h3 { font-size: 17px; color: #fff; margin: 22px 0 10px; }
.homepage-about p { margin-bottom: 16px; }
.homepage-about a { color: var(--accent); text-decoration: underline; }
.homepage-about ul, .homepage-about ol { margin: 0 0 16px 22px; }
.homepage-about ul li { list-style: disc; margin-bottom: 6px; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding: 60px 0; }
.notfound .code { font-size: 96px; font-weight: 800; color: var(--accent); line-height: 1; }
.notfound h1 { font-size: 26px; text-transform: uppercase; color: #fff; margin: 12px 0 16px; }
.notfound p { color: var(--text-mut); margin-bottom: 22px; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--panel);
  padding: 26px 0 30px;
}
.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.footer-cats { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-cats a, .footer-nav a {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-mut);
  transition: color 0.25s ease;
}
.footer-cats a:hover, .footer-nav a:hover { color: #fff; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-copy { font-size: 12px; text-transform: uppercase; color: var(--text-dim); }
.footer-copy a { color: var(--accent); }
.footer-copy a:hover { text-decoration: underline; }

