/*
Theme Name: GeneratePress Child — ТТМ
Theme URI: https://test.trichotillomania.ru/
Description: Дочерняя тема GeneratePress для тестовой копии сайта о трихотилломании.
Author: Александра Миронова
Template: generatepress
Version: 1.7.0
Text Domain: generatepress-child-ttm
*/

/* ТТМ · Тёплый лес v1.2
   Правила для стандартных блоков не должны переписывать дизайн
   авторских HTML-разделов .ttm-home и .ttmh.
*/
:root {
  --ttm-bg:#F5EFE6;
  --ttm-surface:#FBF8F3;
  --ttm-card:#E9DDCF;
  --ttm-green:#5F7A61;
  --ttm-green-dark:#4F6951;
  --ttm-heading:#2F3A30;
  --ttm-copy:#3B413A;
  --ttm-muted:#6E675E;
  --ttm-border:#D9CCBC;
}
body {background:var(--ttm-bg);color:var(--ttm-copy)}
.site-header,.main-navigation,.site-footer {background-color:var(--ttm-surface)}
.site-content {background:transparent}
.inside-article {background:var(--ttm-surface)}
.entry-content {overflow-wrap:break-word;line-height:1.7}

/* Стандартные заголовки GeneratePress и Gutenberg.
   Низкая специфичность у вложенных заголовков нужна, чтобы
   встроенная CSS-верстка двух авторских страниц оставалась главной. */
.entry-title {color:var(--ttm-heading);font-family:Georgia,'Times New Roman',serif;font-weight:500;font-size:clamp(28px,2.8vw,36px);line-height:1.2}
:where(.entry-content) h1 {font-size:clamp(28px,2.8vw,36px)}
:where(.entry-content) h2 {font-size:clamp(24px,2.3vw,30px)}
:where(.entry-content) h3 {font-size:clamp(20px,1.8vw,24px)}
:where(.entry-content) h1,
:where(.entry-content) h2,
:where(.entry-content) h3 {color:var(--ttm-heading);font-family:Georgia,'Times New Roman',serif;font-weight:500;letter-spacing:-.015em;line-height:1.25}
:where(.entry-content) h2 {margin-block:1.25em .6em}
:where(.entry-content) p {margin-bottom:1.15em}
.entry-content a:focus-visible, .entry-content button:focus-visible,
.entry-content summary:focus-visible {outline:3px solid var(--ttm-green);outline-offset:3px}

/* Обычные Gutenberg-кнопки. Не затрагиваем .btn и другие кнопки,
   нарисованные внутри HTML-статей. */
.entry-content .wp-block-button__link {
 background:var(--ttm-green);color:white;border-radius:999px;
 padding:12px 22px;text-decoration:none;font-weight:600;
 transition:background-color .16s ease
}
.entry-content .wp-block-button__link:hover {background:var(--ttm-green-dark);color:white}
.entry-content .wp-block-button.is-style-outline .wp-block-button__link {
 background:transparent;border:1px solid var(--ttm-green);color:var(--ttm-green-dark)
}

/* Повторно используемые компоненты применяются только при
   явном добавлении классов в Gutenberg/HTML. */
.entry-content .ttm-section {padding:clamp(18px,3vw,34px);border-radius:18px;background:var(--ttm-surface);margin-block:24px}
.entry-content .ttm-section--beige {background:var(--ttm-card)}
.entry-content .ttm-section--green {background:var(--ttm-green-dark);color:white}
.entry-content .ttm-section--green :is(h2,h3,p) {color:white}
.entry-content .ttm-card {padding:clamp(16px,2vw,26px);border:1px solid var(--ttm-border);background:var(--ttm-card);border-radius:16px}
.entry-content .ttm-note {padding:16px 20px;background:var(--ttm-bg);border-left:4px solid var(--ttm-green);border-radius:0 12px 12px 0}
.entry-content .ttm-cta {padding:clamp(20px,3vw,36px);background:var(--ttm-card);border-radius:18px}
.entry-content .ttm-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}

/* Базовый Gutenberg FAQ, только если специально указан класс. */
.entry-content .ttm-faq details {border:1px solid var(--ttm-border);border-radius:12px;padding:16px 18px;margin-bottom:12px;background:var(--ttm-surface)}
.entry-content .ttm-faq summary {cursor:pointer;font-weight:600;color:var(--ttm-heading)}

/* Изолированные прежние HTML-страницы:
   сохраняем их оригинальную геометрию, карточки, акценты и интервалы;
   уменьшаем только H1 и H2. Эти селекторы сильнее встроенных. */
.entry-content .ttm-home h1 {font-size:clamp(30px,3.3vw,42px);line-height:1.17}
.entry-content .ttm-home h2 {font-size:clamp(25px,2.7vw,33px);line-height:1.22}
.entry-content .ttmh h1 {font-size:clamp(30px,3.3vw,42px);line-height:1.17}
.entry-content .ttmh h2 {font-size:clamp(25px,2.7vw,33px);line-height:1.22}

/* Не навязываем CSS дочерней темы существующим изображениям,
   карточкам и FAQ внутри .ttm-home и .ttmh. */
@media(max-width:768px) {
 .entry-title {font-size:30px}
 :where(.entry-content) h1 {font-size:30px}
 :where(.entry-content) h2 {font-size:25px}
 :where(.entry-content) h3 {font-size:21px}
 .entry-content .ttm-home h1,.entry-content .ttmh h1 {font-size:clamp(28px,7.4vw,32px)}
 .entry-content .ttm-home h2,.entry-content .ttmh h2 {font-size:clamp(24px,6vw,27px)}
 .entry-content .ttm-grid {grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce) {
 .entry-content .wp-block-button__link {transition:none}
}


/* v1.3 — мобильная читабельность авторских HTML-страниц */
.entry-content .ttmh,
.entry-content .ttm-home {max-width:100%;min-width:0;overflow-wrap:break-word}
.entry-content .ttmh :is(.hero,.split,.grid,.card,.days,.cta),
.entry-content .ttm-home :is(.hero,.split,.grid,.card,.cta) {min-width:0;max-width:100%}
.entry-content .ttmh :is(h1,h2,h3),
.entry-content .ttm-home :is(h1,h2,h3) {overflow-wrap:anywhere;hyphens:auto}
@media(max-width:767px) {
 .entry-content .ttmh,.entry-content .ttm-home {font-size:16px;line-height:1.6;padding-inline:0}
 .entry-content .ttmh h1,.entry-content .ttm-home h1 {font-size:clamp(27px,7vw,30px)!important;line-height:1.2!important;letter-spacing:-.02em}
 .entry-content .ttmh h2,.entry-content .ttm-home h2 {font-size:clamp(23px,5.8vw,25px)!important;line-height:1.25!important}
 .entry-content .ttmh h3,.entry-content .ttm-home h3 {font-size:20px;line-height:1.3}
 .entry-content .ttmh .hero {display:grid;grid-template-columns:minmax(0,1fr);padding:22px 18px;gap:20px}
 .entry-content .ttmh .hero p {font-size:16px;line-height:1.62}
 .entry-content .ttmh .days {display:flex;flex-direction:column;align-items:flex-start;gap:14px;padding:20px 18px}
 .entry-content .ttmh .days > b {font-size:56px;line-height:1;flex:0 0 auto}
 .entry-content .ttmh .days > div {width:100%;min-width:0}
 .entry-content .ttmh .days p {font-size:16px;overflow-wrap:anywhere}
 .entry-content .ttmh .grid,.entry-content .ttmh .split,.entry-content .ttmh .toc ul {grid-template-columns:minmax(0,1fr)}
 .entry-content .ttmh .card,.entry-content .ttmh .toc,.entry-content .ttmh .cta {padding:18px}
 .entry-content .ttmh .lead {font-size:17px}
 .entry-content .ttmh img {max-width:100%;height:auto}
}


/* ================================================================
   v1.4 — компактная липкая шапка и фирменное меню GeneratePress.
   Работает для шапки, содержащей логотип и горизонтальную навигацию.
   ================================================================ */
:root {
 --ttm-nav-hover-bg:#E9DDCF;
 --ttm-nav-focus:#4F6951;
}

/* Сохраняем логотип и меню на экране при прокрутке */
#masthead.site-header {
 position:sticky;
 position:-webkit-sticky;
 top:0;
 z-index:900;
 background:#FBF8F3;
 box-shadow:0 1px 0 rgba(47,58,48,.10);
}

/* Админ-панель не должна перекрывать шапку при редактировании */
body.admin-bar #masthead.site-header {top:32px}

/* Если навигация является отдельным верхнеуровневым блоком,
   закрепляем именно её. Для навигации внутри #masthead
   повторное закрепление не требуется. */
body:not(.nav-float-right) #site-navigation.main-navigation {
 position:sticky;
 position:-webkit-sticky;
 top:0;
 z-index:899;
}

/* Фирменные состояния пунктов GeneratePress */
#site-navigation.main-navigation,
#site-navigation.main-navigation .inside-navigation,
#site-navigation.main-navigation .main-nav ul li a,
#site-navigation.main-navigation .menu-toggle {
 color:var(--ttm-heading);
}
#site-navigation.main-navigation .main-nav ul li:hover > a,
#site-navigation.main-navigation .main-nav ul li:focus-within > a,
#site-navigation.main-navigation .main-nav ul li.sfHover > a,
#site-navigation.main-navigation .main-nav ul li[class*="current-menu-"] > a,
#site-navigation.main-navigation .main-nav ul li[class*="current_page_"] > a {
 background-color:var(--ttm-nav-hover-bg);
 color:var(--ttm-green-dark);
}

/* Иконки SVG/font внутри ссылок наследуют цвет текста */
#site-navigation.main-navigation .main-nav a svg,
#site-navigation.main-navigation .main-nav a .svg-inline--fa,
#site-navigation.main-navigation .main-nav a .gp-icon,
#site-navigation.main-navigation .main-nav a i {
 color:inherit;
 fill:currentColor;
}
#site-navigation.main-navigation .main-nav a .dropdown-menu-toggle {
 color:inherit;
}
#site-navigation.main-navigation .main-nav ul li a {
 transition:background-color .18s ease,color .18s ease;
}

/* Подменю в том же фирменном стиле */
#site-navigation.main-navigation .main-nav ul ul {
 background:#FBF8F3;
 box-shadow:0 8px 22px rgba(47,58,48,.10);
}
#site-navigation.main-navigation .main-nav ul ul li a {color:var(--ttm-heading)}
#site-navigation.main-navigation .main-nav ul ul li:hover > a,
#site-navigation.main-navigation .main-nav ul ul li:focus-within > a {
 background:var(--ttm-nav-hover-bg);
 color:var(--ttm-green-dark);
}

/* Контур клавиатурного фокуса */
#site-navigation.main-navigation a:focus-visible,
#site-navigation.main-navigation button:focus-visible {
 outline:2px solid var(--ttm-green-dark);
 outline-offset:2px;
}

/* Бургер-меню: убрать дефолтный синий, зелёный акцент */
#site-navigation.main-navigation .menu-toggle,
#site-navigation.main-navigation .menu-toggle:hover,
#site-navigation.main-navigation .menu-toggle:focus,
#site-navigation.main-navigation.toggled .menu-toggle {
 background:#FBF8F3;
 color:var(--ttm-green-dark);
}
#site-navigation.main-navigation .menu-toggle .gp-icon,
#site-navigation.main-navigation .menu-toggle svg {
 color:inherit;
 fill:currentColor;
}

/* Мобильная шапка ниже и без бокового вылезания */
@media(max-width:768px) {
 #masthead.site-header .inside-header {padding:10px 16px}
 #masthead.site-header .site-logo img {
  max-width:min(240px,65vw);
  max-height:62px;
  width:auto;height:auto;
 }
 body.admin-bar #masthead.site-header {top:46px}
 body.admin-bar:not(.nav-float-right) #site-navigation.main-navigation {top:46px}
}

/* На больших экранах чуть компактнее шапка */
@media(min-width:769px) {
 #masthead.site-header .inside-header {padding-top:12px;padding-bottom:12px}
 #masthead.site-header .site-logo img {
  max-width:340px;
  max-height:78px;
  width:auto;height:auto;
 }
}

@media(prefers-reduced-motion:reduce) {
 #site-navigation.main-navigation .main-nav ul li a {transition:none}
}

/* ============================================================
   ТТМ · Тёплый лес v1.7 — согласованная финальная компоновка
   Вместо прежних экспериментальных дополнений v1.6–v1.7.
   ============================================================ */

:root {
  --ttm-link:#4F6951;
  --ttm-link-hover:#2F4D35;
}

/* Белые внешние поля; НЕ ограничиваем визуальные секции 1120 px. */
body, body .site, body .site-content,
body .site-content .content-area,
body .site-content .site-main,
body .site-content .inside-article {
  background-color:#fff;
}
body .site-content .entry-content {background-color:#fff}
body .site-content .entry-content > .ttmh,
body .site-content .entry-content > .ttm-home {background-color:#fff}

@media (min-width:1025px) {
  /* Широкие секции и отзывы, как на оригинальной главной. */
  body .site.grid-container,
  body .site-content.grid-container,
  body .site-content .inside-article {
    max-width:1280px;
    margin-inline:auto;
  }
  /* Длинные обычные абзацы: удобная длина строки.
     Карточки и оформленные секции НЕ сужаем. */
  body .entry-content > p,
  body .entry-content > ul,
  body .entry-content > ol {max-width:800px}
}

/* Шапка: чистый белый, зелёные акценты. */
body #masthead.site-header,
body #masthead.site-header .inside-header,
body #site-navigation.main-navigation,
body #site-navigation.main-navigation .inside-navigation {background:#fff!important}
body #site-navigation .menu-toggle {background:#fff!important;color:var(--ttm-heading)!important}
body #site-navigation .main-nav ul li a {color:var(--ttm-heading)}
body #site-navigation .main-nav ul li:hover > a,
body #site-navigation .main-nav ul li:focus-within > a,
body #site-navigation .main-nav ul li[class*="current-menu-"] > a,
body #site-navigation .main-nav ul li[class*="current_page_"] > a {
  background:var(--ttm-bg)!important;
  color:var(--ttm-green-dark)!important;
}

/* Текстовые ссылки; исключения защищают кнопки и ссылки-карточки. */
body .entry-content a:not(.button):not(.wp-block-button__link):not([class*="btn"]):not([class*="button"]),
body .entry-content a:visited:not(.button):not(.wp-block-button__link):not([class*="btn"]):not([class*="button"]) {
  color:var(--ttm-link)!important;
  text-decoration-color:currentColor;
  text-underline-offset:3px;
}
body .entry-content a:hover:not(.button):not(.wp-block-button__link):not([class*="btn"]):not([class*="button"]),
body .entry-content a:focus-visible:not(.button):not(.wp-block-button__link):not([class*="btn"]):not([class*="button"]) {
  color:var(--ttm-link-hover)!important;
}

/* Стандартные кнопки. Не ломаем контурный вторичный вариант. */
body .entry-content a.button,
body .entry-content .wp-block-button:not(.is-style-outline) .wp-block-button__link,
body .entry-content input[type="submit"] {
  background:var(--ttm-green)!important;
  border-color:var(--ttm-green)!important;
  color:#fff!important;
  text-decoration:none!important;
}
body .entry-content a.button:hover,
body .entry-content .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
body .entry-content input[type="submit"]:hover {
  background:var(--ttm-green-dark)!important;
  border-color:var(--ttm-green-dark)!important;
  color:#fff!important;
}
body .entry-content .wp-block-button.is-style-outline .wp-block-button__link {
  background:transparent!important;
  border-color:var(--ttm-green-dark)!important;
  color:var(--ttm-green-dark)!important;
}

/* Встроенная обложка записи видна на телефонах.
   Десктопное CSS-скрытие не гарантирует отсутствие загрузки файла. */
@media (min-width:769px) {
  body.single-post .page-header-image-single,
  body.single-post .featured-image,
  body.page .page-header-image-single,
  body.page .featured-image {display:none!important}
}

/* Временное визуальное устранение второго H1 на странице гипноза.
   HTML/H1 нужно впоследствии исправить на уровне шаблона WordPress. */
body:has(.ttmh) .entry-header {display:none!important}

/* Три равные карточки в сетках главной; прочие сетки не трогаем. */
@media (min-width:1025px) {
  body.home .ttm-grid:has(> .ttm-card:nth-child(3):last-child) {
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:20px!important;
    align-items:stretch;
  }
  body.home .ttm-grid:has(> .ttm-card:nth-child(3):last-child) > .ttm-card {
    width:auto!important;max-width:none!important;min-width:0;
  }
}

/* Отзывы — вернуть формат оригинальной главной: 3/2/1 колонки.
   Точный селектор проверен по HTML главной страницы. */
body #reviews .ttm-wrap > div:nth-child(2) {
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:22px!important;
  align-items:stretch;
}
body #reviews .ttm-wrap > div:nth-child(2) > .ttm-card {
  min-width:0;
  width:auto!important;
  max-width:none!important;
  background:var(--ttm-surface)!important;
  border:1px solid var(--ttm-border);
  border-radius:20px;
}
/* Оставить аккуратные обрезанные превью; полная переписка по ссылке. */
body #reviews .ttm-story-images img {max-width:100%}
@media (min-width:768px) and (max-width:1100px) {
  body #reviews .ttm-wrap > div:nth-child(2) {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}
@media (max-width:767px) {
  body #reviews .ttm-wrap > div:nth-child(2) {
    grid-template-columns:minmax(0,1fr)!important;
  }
}



/* ТТМ — оформление ссылок в блоге и рубриках */

body.blog .site-main a,
body.category .site-main a {
    color: #4F6951 !important;
}

body.blog .site-main a:hover,
body.category .site-main a:hover {
    color: #2F3A30 !important;
}

/* Убираем подпись "от admin" */
body.blog .entry-meta .byline,
body.category .entry-meta .byline {
    display: none !important;
}

/* Даты оставляем более спокойными */
body.blog .entry-meta,
body.category .entry-meta {
    color: #6E675E;
}
































































































/* ТТМ • адресная настройка шапки и архива блога
   Добавить В КОНЕЦ рабочего style.css дочерней темы.
   Ничего из существующего файла удалять не нужно. */

/* 1. Шапка: содержимое (логотип + меню) на одной оси с широкими секциями. */
@media (min-width: 1025px) {
  #masthead.site-header > .inside-header {
    box-sizing: border-box;
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
  }
  /* Для случая, когда GeneratePress выводит меню отдельным блоком. */
  #site-navigation.main-navigation > .inside-navigation {
    box-sizing: border-box;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* 2. Архив «Блог»: карточки вместо широкого потока публикаций.
   Правила действуют только на /blog/, если это WordPress posts page (body.blog). */
body.blog #primary,
body.blog #main {
  min-width: 0;
}
body.blog #main.site-main {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 24px 48px;
  box-sizing: border-box;
  background: #F5EFE6;
  border-radius: 24px;
}
body.blog #main.site-main > article.post {
  min-width: 0;
  margin: 0 !important;
  background: #FBF8F3;
  border: 1px solid #D9CCBC;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: none;
}
body.blog #main.site-main > article.post > .inside-article {
  display: flex;
  flex-direction: column;
  height: 100%;
  box-sizing: border-box;
  padding: 0 0 24px !important;
  background: #FBF8F3 !important;
  max-width: none !important;
  margin: 0 !important;
}
/* В текущей разметке GeneratePress картинка стоит после заголовка.
   Поднимем превью наверх визуально, HTML и SEO-заголовок остаются на месте. */
body.blog #main.site-main > article.post .post-image {
  order: -1;
  margin: 0 0 18px !important;
}
body.blog #main.site-main > article.post .post-image img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: cover;
  border-radius: 0;
}
body.blog #main.site-main > article.post .entry-header,
body.blog #main.site-main > article.post .entry-summary,
body.blog #main.site-main > article.post footer.entry-meta {
  padding: 0 22px;
}
body.blog #main.site-main > article.post .entry-header {
  margin-bottom: 10px;
}
body.blog #main.site-main > article.post .entry-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(21px, 1.8vw, 25px) !important;
  line-height: 1.25;
  margin: 0 0 12px;
  overflow-wrap: break-word;
  hyphens: auto;
}
body.blog #main.site-main > article.post .entry-title a,
body.blog #main.site-main > article.post .entry-title a:visited {
  color: #2F3A30 !important;
  text-decoration: none;
}
body.blog #main.site-main > article.post .entry-title a:hover {
  color: #4F6951 !important;
}

/* ТТМ — единый блок навигации по рубрикам: без повторов */
body.blog .ttm-blog-categories {
  grid-column: 1 / -1 !important; /* если хук находится внутри сетки */
  min-width: 0;
  width: 100%;
  max-width: 1280px;
  box-sizing: border-box;
  margin: 0 auto 24px;
  padding: 26px 30px;
  background: #F5EFE6;
  border-radius: 22px;
}
body.blog .ttm-blog-categories h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 500;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.2;
  color: #2F3A30;
  margin: 0 0 12px;
}
body.blog .ttm-blog-categories p {
  margin: 0 0 18px;
  color: #6E675E;
}
body.blog .ttm-blog-category-links {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center;
  gap: 10px !important;
}
body.blog .ttm-blog-category-links > a,
body.blog .ttm-blog-category-links > a:visited {
  display: inline-flex !important;
  align-items: center;
  padding: 9px 15px !important;
  border-radius: 999px;
  border: 1px solid #D9CCBC;
  background: #FBF8F3;
  color: #4F6951 !important;
  text-decoration: none !important;
  line-height: 1.4;
}
body.blog .ttm-blog-category-links > a:hover,
body.blog .ttm-blog-category-links > a.is-active {
  background: #5F7A61;
  border-color: #5F7A61;
  color: #FFFFFF !important;
}
/* Важно: выделение рубрик не превращает навигацию в карточку архива */
@media (max-width: 1024px) {
  body.blog #main.site-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  body.blog #main.site-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    padding: 20px 14px 30px;
  }
  body.blog .ttm-blog-categories { padding: 20px 16px; }
  body.blog .ttm-blog-category-links { gap: 8px !important; }
  body.blog .ttm-blog-category-links > a { padding: 8px 12px !important; font-size: 14px; }
}

/* ==================================================
   ТТМ — сетка карточек на страницах рубрик
   ================================================== */

/* Основная сетка */
body.category #main.site-main {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 36px 24px 48px;
    box-sizing: border-box;
    background: #F5EFE6;
    border-radius: 24px;
}

/* Заголовок и описание рубрики — на всю ширину */
body.category #main > .page-header {
    grid-column: 1 / -1;
    background: #FBF8F3;
    border-radius: 20px;
    padding: 28px 32px;
    margin: 0;
}

body.category .page-title {
    font-family: Georgia, serif;
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.2;
    color: #2F3A30;
}

/* Карточки */
body.category #main > article.post {
    min-width: 0;
    margin: 0 !important;
    border: 1px solid #D9CCBC;
    border-radius: 20px;
    overflow: hidden;
    background: #FBF8F3;
}

body.category #main > article.post > .inside-article {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0 0 24px !important;
    box-sizing: border-box;
    background: #FBF8F3 !important;
    max-width: none !important;
    margin: 0 !important;
}

/* Превью наверху карточки */
body.category #main > article.post .post-image {
    order: -1;
    margin: 0 0 18px !important;
}

body.category #main > article.post .post-image img {
    display: block;
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-radius: 0;
}

/* Текст внутри карточек */
body.category #main > article.post .entry-header,
body.category #main > article.post .entry-summary,
body.category #main > article.post footer.entry-meta {
    padding: 0 22px;
}

body.category #main > article.post .entry-title {
    font-family: Georgia, serif;
    font-size: clamp(21px, 1.8vw, 25px) !important;
    line-height: 1.25;
    margin-bottom: 12px;
}

body.category #main > article.post .entry-title a {
    color: #2F3A30 !important;
    text-decoration: none;
}

body.category #main > article.post .entry-title a:hover {
    color: #4F6951 !important;
}

/* Зелёные ссылки */
body.category #main > article.post a:not(.entry-title a) {
    color: #4F6951;
}

/* Скрываем "от admin" */
body.category #main .byline {
    display: none !important;
}

/* Навигация между страницами архива */
body.category #main > .paging-navigation {
    grid-column: 1 / -1;
}

/* Планшеты */
@media (min-width: 768px) and (max-width: 1100px) {
    body.category #main.site-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Телефоны */
@media (max-width: 767px) {
    body.category #main.site-main {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
        padding: 20px 14px;
    }

    body.category #main > .page-header {
        padding: 22px 18px;
    }

    body.category #main > article.post .post-image img {
        height: 185px;
    }
}

/* ТТМ — точное выравнивание шапки с контентом */

@media (min-width: 1025px) {

    body #masthead.site-header > .inside-header {
        width: calc(100% - 48px) !important;
        max-width: 1195px !important;
        margin-inline: auto !important;
        padding: 0 24px !important;
        box-sizing: border-box !important;
    }

    body #site-navigation.main-navigation > .inside-navigation {
        max-width: 100% !important;
        margin-inline: auto !important;
    }
}

/* ТТМ — больше воздуха в шапке на компьютерах */

@media (min-width: 1025px) {

    /* Увеличиваем вертикальные отступы шапки */
    body #masthead.site-header > .inside-header {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }

    /* Немного приподнимаем меню относительно логотипа */
    body #site-navigation.main-navigation {
        transform: translateY(-5px);
    }

    /* Сохраняем прежний размер логотипа */
    body #masthead .site-logo img {
        max-height: 78px;
        width: auto;
        height: auto;
    }
}

/* ТТМ — страница для родителей: первый экран и боковое оглавление.
   Добавить в конец style.css активной дочерней темы ТОЛЬКО на тестовом сайте. */

/* Не позволяем общим правилам карточек делать hero слишком высоким. */
#ttm-kids > .ttm-grid.ttm-section--beige {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(18px, 2.5vw, 34px);
  align-items: start !important;
  padding: clamp(18px, 2.4vw, 30px);
  border-radius: 22px;
  background: #F5EFE6;
}
#ttm-kids > .ttm-grid.ttm-section--beige > .ttm-section {
  min-width: 0;
  margin: 0;
  padding: clamp(20px, 2.4vw, 32px);
  background: #FBF8F3;
  border-radius: 18px;
}
#ttm-kids > .ttm-grid.ttm-section--beige > .tk-hero-art {
  align-self: start;
  margin: 0 !important;
  padding: 0 !important;
}
#ttm-kids .tk-hero-art img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}
#ttm-kids .tk-hero-art figcaption {
  margin-top: 10px;
  color: #6E675E;
  font-size: 14px;
}
#ttm-kids .tk-actions {
  align-items: center;
}

/* Боковое содержание и область текста — независимые колонки. */
@media (min-width: 1025px) {
  #ttm-kids .tk-layout {
    display: grid;
    grid-template-columns: minmax(215px, 255px) minmax(0, 1fr);
    gap: clamp(24px, 3vw, 42px);
    align-items: start;
    margin-top: 28px;
  }
  #ttm-kids .tk-layout > nav[aria-label="Содержание"] {
    position: sticky;
    top: 145px;
    align-self: start;
    max-height: calc(100vh - 165px);
    overflow-y: auto;
  }
}
#ttm-kids .tk-layout > nav[aria-label="Содержание"] {
  min-width: 0;
  margin: 0;
  padding: 22px 20px;
  background: #F5EFE6;
  border: 1px solid #D9CCBC;
  border-radius: 18px;
}
#ttm-kids .tk-layout > nav[aria-label="Содержание"] strong {
  display: block;
  margin-bottom: 14px;
  color: #2F3A30;
}
#ttm-kids .tk-layout > nav[aria-label="Содержание"] ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
#ttm-kids .tk-layout > nav[aria-label="Содержание"] li + li {
  margin-top: 8px;
}
#ttm-kids .tk-layout > nav[aria-label="Содержание"] a {
  display: block;
  padding: 7px 9px;
  border-radius: 8px;
  color: #4F6951;
  text-decoration: none;
  line-height: 1.4;
}
#ttm-kids .tk-layout > nav[aria-label="Содержание"] a:hover,
#ttm-kids .tk-layout > nav[aria-label="Содержание"] a:focus-visible {
  background: #E9DDCF;
  color: #2F3A30;
}
#ttm-kids .tk-main {
  min-width: 0;
}
#ttm-kids .tk-main > section[id] {
  scroll-margin-top: 155px;
}
@media (max-width: 1024px) {
  #ttm-kids .tk-layout {
    display: block;
  }
  #ttm-kids .tk-layout > nav[aria-label="Содержание"] {
    position: static;
    margin: 20px 0 !important;
  }
}
@media (max-width: 767px) {
  #ttm-kids > .ttm-grid.ttm-section--beige {
    grid-template-columns: minmax(0, 1fr);
    padding: 16px;
  }
  #ttm-kids > .ttm-grid.ttm-section--beige > .ttm-section {
    padding: 18px;
  }
  #ttm-kids .tk-actions a {
    max-width: 100%;
    white-space: normal;
  }
}
