/*
Theme Name: Astana News
Theme URI: https://akmo.kz
Description: Региональный новостной портал Астаны и Акмолинской области. 8 рубрик (Город, Общество, Экономика, Промышленность, Спорт, Культура, Образование, Здоровье) с цветовым кодированием через body[data-cat].
Version: 0.17.0
Author: akmo.kz
Author URI: https://akmo.kz
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: akmo
Domain Path: /languages
Tags: news, magazine, blog, custom-menu, featured-images, threaded-comments, translation-ready, sticky-post
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
*/

/* ============================================================
   1. CSS-ПЕРЕМЕННЫЕ — единый источник истины темы
   ============================================================ */
:root {
  /* Брендовый акцент */
  --accent:        #143E72;
  --accent-2:      #4A82C6;
  --accent-soft:   #E5EEF8;

  /* Палитра текста */
  --ink:           #0E2A4A;
  --ink-2:         #1F4575;
  --ink-3:         #2D4A6E;
  --ink-4:         #5B7BA1;

  /* Линии и фон */
  --rule:          #DCE5F0;
  --rule-soft:     #EAF0F7;
  --paper:         #FFFFFF;
  --paper-2:       #FFFFFF;
  --paper-card:    #FFFFFF;
  --ph-bg:         #EEF2F7;

  /* Индикаторы курсов */
  --up:            #1d6f43;
  --down:          #b32218;

  /* Шрифты */
  --serif:         'PT Serif', 'Charter', Georgia, serif;
  --sans:          'PT Sans', 'Segoe UI', Roboto, Arial, sans-serif;
  --mono:          'PT Sans', 'Segoe UI', Roboto, Arial, sans-serif;  /* моноширинный убран — читался как ИИ; это роль подписей/дат/меток */

  /* Сетка */
  --maxw:          1280px;
  --readw:         820px;

  /* Палитра 8 рубрик */
  --cat-city:        #143E72;
  --cat-society:     #B5524A;
  --cat-economy:     #2D6E4A;
  --cat-industry:    #4A5568;
  --cat-sport:       #C46A1F;
  --cat-culture:     #7A3F6E;
  --cat-education:   #2D6CB0;
  --cat-health:      #2C8B8B;

  /* Активная категория страницы — переопределяется body[data-cat] */
  --cat-active:      var(--cat-city);
  --cat-active-soft: rgba(20, 62, 114, 0.08);
}

/* Body-level переключатель цветовой схемы по data-cat
   Ставится в header.php через akmo_get_active_cat_slug() */
body[data-cat="city"]      { --cat-active: var(--cat-city);      --cat-active-soft: rgba(20, 62, 114, 0.08); }
body[data-cat="society"]   { --cat-active: var(--cat-society);   --cat-active-soft: rgba(181, 82, 74, 0.08); }
body[data-cat="economy"]   { --cat-active: var(--cat-economy);   --cat-active-soft: rgba(45, 110, 74, 0.08); }
body[data-cat="industry"]  { --cat-active: var(--cat-industry);  --cat-active-soft: rgba(74, 85, 104, 0.08); }
body[data-cat="sport"]     { --cat-active: var(--cat-sport);     --cat-active-soft: rgba(196, 106, 31, 0.08); }
body[data-cat="culture"]   { --cat-active: var(--cat-culture);   --cat-active-soft: rgba(122, 63, 110, 0.08); }
body[data-cat="education"] { --cat-active: var(--cat-education); --cat-active-soft: rgba(45, 108, 176, 0.08); }
body[data-cat="health"]    { --cat-active: var(--cat-health);    --cat-active-soft: rgba(44, 139, 139, 0.08); }

/* ============================================================
   2. БАЗОВЫЙ СБРОС
   ============================================================ */
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html { overflow-x: clip; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* WordPress required */
.alignnone, .aligncenter, .alignleft, .alignright { display: block; height: auto; }
.aligncenter { margin: 0 auto; }
.alignleft   { float: left; margin: 0 1.5em 1em 0; }
.alignright  { float: right; margin: 0 0 1em 1.5em; }
.wp-caption  { max-width: 100%; }
.wp-caption-text {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.08em; color: var(--ink-3);
  text-transform: uppercase; padding: 8px 0;
}
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%); height: 1px; width: 1px;
  margin: -1px; overflow: hidden; padding: 0;
  position: absolute; word-wrap: normal !important;
}

/* Контейнеры */
.container      { max-width: var(--maxw); margin: 0 auto; padding: 0 48px; }
.read-container { max-width: var(--readw); margin: 0 auto; padding: 0 24px; }

/* Skip-link (accessibility) */
.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--accent); color: var(--paper);
  padding: 8px 14px; font-family: var(--mono); font-size: 12px;
  z-index: 1000;
}
.skip-link:focus { left: 8px; }

/* Универсальные плейсхолдеры фото */
.ph {
  aspect-ratio: 4/3;
  background: var(--ph-bg);
  border: 1px solid var(--rule);
  position: relative;
}

/* Иконка глаза для просмотров */
.eye-icon {
  font-size: 0.95em;
  display: inline-block;
  transform: translateY(0.06em);
  margin-right: 1px;
}

/* Подсветка совпадений в поиске */
mark {
  background: var(--cat-active-soft);
  color: var(--cat-active);
  padding: 0 2px;
  font-weight: 700;
}

/* ============================================================
   3. TOP STRIP — курсы валют + дата + утилитарные ссылки
   ============================================================ */
.topstrip {
  border-bottom: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
.topstrip-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 8px 48px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.ts-date    { font-weight: 600; color: var(--ink-2); text-transform: uppercase; }
.ts-quotes  { display: flex; gap: 14px; flex: 1; overflow: hidden; }
.ts-quote   { display: inline-flex; gap: 6px; align-items: baseline; white-space: nowrap; }
.ts-quote b { color: var(--ink); font-weight: 600; }
.ts-quote .up   { color: var(--up); }
.ts-quote .down { color: var(--down); }
.ts-actions { display: flex; gap: 14px; }
.ts-actions a { cursor: pointer; transition: color 0.15s; }
.ts-actions a:hover { color: var(--ink); }

/* ============================================================
   4. MASTHEAD — шапка сайта (большой логотип + слоган)
   ============================================================ */
.masthead {
  text-align: center;
  padding: 38px 48px 22px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.mast-meta-l, .mast-meta-r {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mast-meta-l { left: 32px; text-align: left; }
.mast-meta-r { right: 32px; text-align: right; }
.mast-logo {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 44px;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1;
}
.mast-logo .dot { color: var(--accent); }
.mast-logo a { color: inherit; }
.mast-tag {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
/* Компактный masthead для внутренних страниц */
.masthead.is-compact { padding: 26px 48px 18px; }
.masthead.is-compact .mast-logo { font-size: 36px; }

/* ============================================================
   5. NAV — sticky навигация (8 рубрик + поиск + подписаться)
   ============================================================ */
.nav {
  border-bottom: 1px solid var(--ink);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  align-items: center;
  height: 50px;
  gap: 28px;
}
.nav-mini {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.nav-items {
  display: flex;
  gap: 18px;
  flex: 1;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-item {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.15s;
  white-space: nowrap;
}
.nav-item a { color: inherit; }
.nav-item:hover,
.nav-item:hover a { color: var(--cat-active); }
.nav-item.active,
.nav-item.current-menu-item,
.nav-item.current_page_item {
  color: var(--cat-active);
  font-weight: 600;
  border-bottom: 2px solid var(--cat-active);
}
.nav-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--rule);
  padding: 6px 10px;
  background: var(--paper-card);
}
.nav-search input {
  background: transparent; border: none; outline: none;
  color: var(--ink); font-family: var(--sans);
  font-size: 12px; width: 130px;
}
.nav-search input::placeholder { color: var(--ink-4); }
.nav-search svg { color: var(--ink-3); }
.nav-subscribe {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cat-active);
  cursor: pointer;
}
.mobile-toggle { display: none; }
.mobile-toggle .icon-close { display: none; }
.mobile-toggle[aria-expanded="true"] .icon-burger { display: none; }
.mobile-toggle[aria-expanded="true"] .icon-close  { display: block; }

/* ============================================================
   6. BREADCRUMB — общие хлебные крошки
   ============================================================ */
.breadcrumb {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.breadcrumb a { cursor: pointer; transition: color 0.15s; }
.breadcrumb a:hover { color: var(--cat-active); }
.breadcrumb .sep { color: var(--ink-4); }
.breadcrumb .current { color: var(--ink); font-weight: 600; }

/* ============================================================
   7. CARDS GRID + CARD — общая карточка для архивов
   (используется в archive.php, author.php, tag.php, 404.php)
   ============================================================ */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 28px;
  padding-top: 48px;
  padding-bottom: 48px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  cursor: pointer;
}
.card .ph::after {
  content: 'Фото';
  position: absolute;
  bottom: 10px; left: 12px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--ink-4);
  text-transform: uppercase;
}
.card-cat {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 4px;
}
.card-h {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.25;
  margin: 0;
  letter-spacing: -0.005em;
  transition: color 0.15s;
  color: var(--ink);
}
.card:hover .card-h { color: var(--cat-active); }
.card-dek {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink-3);
  margin: 0;
}
.card-meta {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.card-meta b { color: var(--ink); font-weight: 600; }

/* ============================================================
   8. PAGINATION — общая пагинация (используется и WP-стандарт)
   ============================================================ */
.pagination {
  margin-top: 48px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.pag-info {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.pag-info b { color: var(--ink); font-weight: 700; }
.pag-controls { display: flex; gap: 4px; flex-wrap: wrap; }
.pag-btn,
.pag-controls a,
.pag-controls span.current,
.pag-controls span.dots {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.15s;
  background: var(--paper);
  text-decoration: none;
}
.pag-btn:hover,
.pag-controls a:hover {
  border-color: var(--cat-active);
  color: var(--cat-active);
}
.pag-btn.active,
.pag-controls span.current {
  background: var(--cat-active);
  border-color: var(--cat-active);
  color: #fff;
  cursor: default;
}
.pag-btn.disabled {
  opacity: 0.4; cursor: not-allowed; pointer-events: none;
}
.pag-dots,
.pag-controls span.dots {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink-4);
  border: none;
  background: transparent;
}

/* ============================================================
   9. ЦВЕТОВЫЕ ХЕЛПЕРЫ ДЛЯ КАТЕГОРИЙ (used in card-cat etc.)
   ============================================================ */
.cat-city      { color: var(--cat-city) !important; }
.cat-society   { color: var(--cat-society) !important; }
.cat-economy   { color: var(--cat-economy) !important; }
.cat-industry  { color: var(--cat-industry) !important; }
.cat-sport     { color: var(--cat-sport) !important; }
.cat-culture   { color: var(--cat-culture) !important; }
.cat-education { color: var(--cat-education) !important; }
.cat-health    { color: var(--cat-health) !important; }

/* ============================================================
   10. NEWSLETTER — сквозной блок перед футером
   ============================================================ */
.newsletter {
  padding: 36px 0;
  border-top: 1px solid var(--ink);
  background:
    radial-gradient(ellipse at 50% 30%, var(--cat-active-soft) 0%, transparent 60%),
    var(--paper);
}
.newsletter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.newsletter-strap {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cat-active);
  margin-bottom: 18px;
}
.newsletter-h {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.2;
  margin: 0;
  letter-spacing: -0.015em;
}
.newsletter-h em {
  font-style: italic;
  font-weight: 400;
  color: var(--cat-active);
}
.newsletter-dek {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-2);
  margin: 0;
  max-width: 50ch;
}
.newsletter-form {
  flex: 0 1 460px;
  display: grid;
  grid-template-columns: 1fr auto;
  border: 1px solid var(--ink);
  background: var(--paper-card);
}
.newsletter-form input {
  background: transparent; border: none; outline: none;
  color: var(--ink); font-family: var(--sans);
  font-size: 14px; padding: 14px 18px;
}
.newsletter-form input::placeholder { color: var(--ink-4); }
.newsletter-form button {
  background: var(--ink); color: var(--paper);
  border: none; font-family: var(--mono);
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 14px 24px; cursor: pointer;
  transition: background 0.15s;
}
.newsletter-form button:hover { background: var(--cat-active); }
.newsletter-meta {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-4);
}

/* ============================================================
   11. FOOTER — общий, с орнаментом-watermark
   ============================================================ */
.footer {
  padding: 56px 0 36px;
  border-top: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}
.footer-ornament {
  position: absolute;
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
  width: 320px;
  height: 320px;
  color: var(--accent);
  opacity: 0.06;
  pointer-events: none;
}
.footer-ornament svg { width: 100%; height: 100%; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}
.footer-brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}
.footer-brand .dot { color: var(--accent); }
.footer-desc {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-3);
  margin: 0;
  max-width: 36ch;
}
.footer-col h5 {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 16px;
}
.footer-col ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
}
.footer-col li,
.footer-col li a {
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  transition: color 0.15s;
}
.footer-col li:hover,
.footer-col li a:hover { color: var(--accent); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-4);
  display: flex;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

/* ============================================================
   12. READING PROGRESS — индикатор прокрутки (single.php)
   ============================================================ */
.read-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--cat-active);
  z-index: 100;
  width: 0;
}

/* ============================================================
   13. PAGE-HERO — общий блок шапки на page/search/archive/tag
   ============================================================ */
.page-hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--rule);
  background: var(--cat-active-soft);
}
.page-hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 48px;
}
.page-hero-strap {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cat-active);
  margin-bottom: 14px;
}
.page-hero-h {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(36px, 4.2vw, 56px);
  line-height: 1.05;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.page-hero-h em {
  font-style: italic;
  font-weight: 400;
  color: var(--cat-active);
}
.page-hero-dek {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.45;
  color: var(--ink-2);
  margin: 0;
  max-width: 60ch;
}

/* ============================================================
   13b. CARD-LINK — stretched link pattern
   .card-link лежит на заголовке, ::after растягивает клик-зону
   на всю карточку. Так сохраняется валидный HTML5 без вложенных <a>.
   ============================================================ */
.card { position: relative; }
.card-link {
	color: inherit;
	text-decoration: none;
	background-image: none;
}
.card-link::after {
	content: '';
	position: absolute;
	inset: 0;
	z-index: 1;
}
/* Картинки и интерактивные элементы должны быть выше overlay,
   чтобы оставаться кликабельными отдельно (например, .card-cat → линк на рубрику). */
.card > .ph,
.card > .card-cat,
.card > .card-meta { position: relative; z-index: 2; }
.card-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.card .ph::after { z-index: 0; }

/* ============================================================
   13c. SHARE BUTTONS
   ============================================================ */
.share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: 1px solid var(--rule);
	background: var(--paper);
	color: var(--ink-2);
	cursor: pointer;
	transition: all 0.15s;
	padding: 0;
}
.share-btn:hover {
	border-color: var(--cat-active);
	color: var(--cat-active);
}
.share-btn.is-copied {
	border-color: var(--up);
	color: var(--up);
}
.share-btns {
	display: inline-flex;
	gap: 8px;
}

/* ============================================================
   14. РЕСПОНСИВ — общие правила (специфичные шаблоны
        переопределяют локально в своих CSS)
   ============================================================ */
@media (max-width: 1100px) {
  .cards-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .container, .topstrip-inner, .nav-inner, .masthead, .page-hero-inner {
    padding-left: 20px; padding-right: 20px;
  }
  .ts-quotes, .ts-actions { display: none; }
  .nav-items, .nav-search, .nav-subscribe { display: none; }
  .mobile-toggle {
    display: flex;
    margin-left: auto;
    background: transparent;
    border: 1px solid var(--rule);
    color: var(--ink);
    width: 36px; height: 36px;
    align-items: center;
    justify-content: center;
  }
  .mast-meta-l, .mast-meta-r { display: none; }
  .mast-logo { font-size: 32px; }
  .masthead { padding: 26px 20px 18px; }

  /* Mobile menu — открытое состояние */
  .nav.is-open { position: relative; }
  .nav.is-open .nav-items {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--ink);
    padding: 12px 20px 20px;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    box-shadow: 0 16px 32px rgba(10, 30, 58, 0.08);
    z-index: 49;
  }
  .nav.is-open .nav-items .nav-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--rule-soft);
    font-size: 15px;
  }
  .nav.is-open .nav-items .nav-item:last-child { border-bottom: none; }
  .mobile-toggle[aria-expanded="true"] {
    border-color: var(--cat-active);
    color: var(--cat-active);
  }

  .page-hero-h { font-size: 36px; }
  .cards-grid  { grid-template-columns: 1fr; gap: 32px; }

  .pagination     { flex-direction: column; gap: 18px; align-items: stretch; }
  .newsletter-row { flex-direction: column; gap: 18px; align-items: stretch; }
  .footer-grid    { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand   { grid-column: 1 / -1; font-size: 22px; }
  .footer-bottom  { flex-direction: column; gap: 8px; }
  .footer-ornament { display: none; }
}

/* ============================================================
   15. УТИЛИТЫ ДЛЯ КОММЕНТАРИЕВ И WP-СТАНДАРТОВ
   ============================================================ */
.sticky    { display: block; }
.bypostauthor { display: block; }
.gallery-caption { display: block; }

/* ============================================================
   16. EMPTY-STATE BLOCKS (используются на search/author/tag/archive)
   ============================================================ */
.search-empty {
	padding: 56px 0;
	text-align: center;
}
.search-empty-h {
	font-family: var(--serif);
	font-style: italic;
	font-weight: 400;
	font-size: 28px;
	color: var(--ink-2);
	margin: 0 0 12px;
}
.search-empty-dek {
	font-family: var(--sans);
	font-size: 15px;
	line-height: 1.5;
	color: var(--ink-3);
	max-width: 50ch;
	margin: 0 auto 24px;
}
.search-empty-suggest {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
}

.search-filter-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--sans);
	font-size: 13px;
	font-weight: 500;
	color: var(--ink-3);
	padding: 7px 14px;
	cursor: pointer;
	transition: all 0.15s;
	border: 1px solid var(--rule);
	border-radius: 999px;
	text-decoration: none;
	background: var(--paper);
}
.search-filter-btn:hover,
.search-filter-btn:focus-visible {
	color: var(--cat-active);
	border-color: var(--cat-active);
}
.search-filter-btn.active {
	background: var(--cat-active);
	border-color: var(--cat-active);
	color: #FFFFFF;
	font-weight: 600;
}
.search-filter-btn .count {
	opacity: 0.6;
	font-size: 11px;
	margin-left: 6px;
}
.search-filter-btn.active .count { opacity: 0.85; }

/* Screen reader text — стандарт WP. */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	-webkit-clip-path: inset(50%);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}
.screen-reader-text:focus {
	background-color: #f1f1f1;
	clip: auto !important;
	clip-path: none;
	color: var(--ink);
	display: block;
	font-size: 14px;
	font-weight: 700;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

/* ============================================================
   17. NEWSLETTER STATUS — сообщения после сабмита формы подписки
   ============================================================ */
.newsletter-status {
	margin-top: 14px;
	padding: 10px 14px;
	font-family: var(--mono);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	border-left: 3px solid currentColor;
	background: var(--paper);
}
.newsletter-status--success {
	color: var(--up);
	background: rgba(29, 111, 67, 0.08);
}
.newsletter-status--error {
	color: var(--down);
	background: rgba(179, 34, 24, 0.08);
}
.newsletter-status--info {
	color: var(--accent);
	background: var(--cat-active-soft);
}

/* ============================================================
   18. WEATHER WIDGET — для masthead-meta-r
   ============================================================ */
.weather-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
}
.weather-item svg {
	color: var(--accent);
	flex-shrink: 0;
}
.weather-temp {
	font-weight: 600;
	color: var(--ink);
}

/* ============================================================
   19. SOCIAL LINKS — футер + author-box + author-hero
   ============================================================ */
.footer-socials {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 18px;
}
.footer-social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	color: var(--ink-3);
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.1);
	transition: all 0.15s;
}
.footer-social:hover,
.footer-social:focus-visible {
	color: var(--paper);
	background: var(--accent);
	border-color: var(--accent);
}

/* AUTHOR SOCIALS — на странице автора и в author-box */
.author-socials {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}
.author-social {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 10px;
	font-family: var(--mono);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	color: var(--ink-2);
	background: var(--paper);
	border: 1px solid var(--rule);
	text-decoration: none;
	transition: all 0.15s;
}
.author-social:hover,
.author-social:focus-visible {
	border-color: var(--cat-active);
	color: var(--cat-active);
	background: var(--cat-active-soft);
}
.author-social-text {
	font-size: 11px;
}

/* В author-box внутри статьи — компактнее */
.author-box .author-socials { margin-top: 10px; }
.author-box .author-social { padding: 4px 8px; font-size: 10px; }

/* ============================================================
   20. RESPONSIVE EMBED — для YouTube и других iframe внутри статьи
   ============================================================ */
.responsive-embed {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	margin: 24px 0;
	background: var(--ph-bg);
	overflow: hidden;
}
.responsive-embed iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ============================================================
   21. NEWSLETTER INTRO — описание под формой
   ============================================================ */
.newsletter-intro {
	font-family: var(--serif);
	font-style: italic;
	font-size: 14px;
	line-height: 1.4;
	color: var(--ink-3);
	margin: 8px 0 0;
	max-width: 50ch;
}

/* ============================================================
   Классы палитры Gutenberg → реальные цвета на фронте.
   (editor-color-palette через PHP не генерит эти правила сам.)
   ============================================================ */
.has-accent-color { color: #143E72; }
.has-accent-background-color { background-color: #143E72; }
.has-ink-color { color: #0E2A4A; }
.has-ink-background-color { background-color: #0E2A4A; }
.has-rule-color { color: #DCE5F0; }
.has-rule-background-color { background-color: #DCE5F0; }
.has-paper-color { color: #FFFFFF; }
.has-paper-background-color { background-color: #FFFFFF; }

/* Видимый фокус на полях ввода с outline:none (WCAG 2.4.7 Focus Visible) */
.nav-search:focus-within,
.newsletter-form:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
