/*
 * Theme Name:  Spotlight Child
 * Theme URI:   https://codesupply.co/themes/spotlight/
 * Description: Spotlight Child Theme
 * Author:      Code Supply Co.
 * Author URI:  https://codesupply.co/
 * Template:    spotlight
 * Version:     1.0.0
 */

/* Copy any classes from parent theme here. They will override the parent's version. */

/* ============================================================
   ДЫМ.ТАЙМ — бренд-палитра (не малиновый WB, тёплый красный/уголь)
   color_primary в Customizer (theme_mods) = #e8442c — эта переменная
   дублирует его для мест, где Kirki не даёт отдельного hover-тона.
   ============================================================ */
:root{
  --dt-accent:#e8442c;
  --dt-accent-dark:#c2331f;
  --dt-text:#121416;
  --dt-text-muted:#6c757d;
  --dt-line:#e3e6e8;
  --dt-bg:#ffffff;
}
/* Затемнённый hover для primary-элементов темы (Kirki даёт только один тон) */
.wp-block-button .wp-block-button__link:not(.has-background):hover,
button:hover, .button:hover,
input[type="button"]:hover, input[type="reset"]:hover, input[type="submit"]:hover,
.pk-button-primary:hover{
  background-color: var(--dt-accent-dark) !important;
}
a:hover, .entry-content a{ color: var(--dt-accent); }

/* === WBNEWS: фикс прыжка меню/грида — заголовки в 2 строки максимум === */
.cs-mm-posts .entry-title,
.cs-mega-menu .entry-title,
.cs-entry__title,
.post-card .entry-title,
.cs-featured-posts .entry-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cs-mm-posts .cs-overlay-content .entry-title,
.cs-mega-menu .cs-overlay-content .entry-title { -webkit-line-clamp: 3; }

/* === WBNEWS: мета поста (дата+автор) — горизонтальной полосой СВЕРХУ, не слева === */
.single .entry-container{ display:block !important; }
.single .entry-sidebar-wrap{ width:100% !important; max-width:100% !important; flex:0 0 100% !important; position:static !important; margin:0 0 22px !important; }
.single .entry-sidebar{ position:static !important; width:auto !important; transform:none !important;
  display:flex !important; flex-wrap:wrap; align-items:center; gap:6px 28px;
  padding:0 0 14px; border-bottom:1px solid #e8e8e8; }
.single .entry-sidebar .post-section{ margin:0 !important; padding:0 !important; border:0 !important; }
.single .entry-sidebar .post-sidebar-date,
.single .entry-sidebar .post-sidebar-author{ display:flex; align-items:center; gap:10px; font-size:14px; }
.single .entry-sidebar .reader-text,
.single .entry-sidebar .post-section-title{ text-transform:uppercase; letter-spacing:.04em;
  font-size:11px; color:#999; font-weight:600; margin:0 6px 0 0; }
.single .entry-sidebar .avatar{ width:34px; height:34px; }
.single .entry-content-wrap{ width:100% !important; max-width:100% !important; flex:0 0 100% !important; }

/* === WBNEWS v2: чистая мета-строка поста (override прошлого) === */
.single .entry-sidebar{
  display:flex !important; flex-wrap:wrap; align-items:baseline;
  justify-content:flex-start !important; text-align:left !important;
  gap:4px 14px; padding:0 !important; border:0 !important;
  margin:0 0 26px !important; }
.single .entry-sidebar .post-section{ margin:0 !important; padding:0 !important;
  border:0 !important; display:inline-flex; align-items:baseline; }
.single .entry-sidebar .post-sidebar-date,
.single .entry-sidebar .post-sidebar-author{ font-size:13px; color:#6b6b6b; }
.single .entry-sidebar .entry-date{ color:#6b6b6b; font-size:13px; }
.single .entry-sidebar .reader-text{ text-transform:uppercase; letter-spacing:.05em;
  font-size:11px; color:#9a9a9a; font-weight:600; margin-right:5px; }
/* убрать заголовок «Автор» и лишнюю обвязку */
.single .entry-sidebar .post-sidebar-author .title-block{ display:none !important; }
.single .entry-sidebar .author-wrap,
.single .entry-sidebar .author,
.single .entry-sidebar .author-description{ display:inline !important;
  margin:0 !important; padding:0 !important; background:none !important; }
.single .entry-sidebar .title-author{ display:inline !important; margin:0 !important;
  font-size:13px !important; line-height:1 !important; }
.single .entry-sidebar .title-author a{ color:#e8442c; font-weight:600;
  text-decoration:none; }
.single .entry-sidebar .title-author a:hover{ text-decoration:underline; }
.single .entry-sidebar .post-sidebar-author .avatar{ display:none !important; }
/* разделитель · между датой и автором */
.single .entry-sidebar .post-sidebar-author::before{ content:"·";
  color:#cfcfcf; margin:0 12px 0 0; font-weight:700; }
/* «Коротко»: без верхней жирной линии в одиночной статье — мета уже отделяет */
.single .entry-content > div:first-child[style*="border-top"]{
  border-top:0 !important; padding-top:0 !important; }

/* === WBNEWS v3: контент и мета по центру читаемой ширины (фикс дыры справа) === */
.single .entry-content{ max-width:720px !important; margin-left:auto !important;
  margin-right:auto !important; }
.single .entry-sidebar{ max-width:720px; margin-left:auto !important;
  margin-right:auto !important; }

/* === WBNEWS v4: мета поста — ЖЁСТКО одна строка слева === */
.single .entry-sidebar{
  display:block !important; text-align:left !important;
  max-width:720px !important; margin:0 auto 24px !important;
  padding:0 0 14px !important; border-bottom:1px solid #ececec !important;
  font-size:13px !important; line-height:1.4 !important; color:#6b6b6b !important; }
.single .entry-sidebar .post-section,
.single .entry-sidebar .post-sidebar-date,
.single .entry-sidebar .post-sidebar-author,
.single .entry-sidebar time,
.single .entry-sidebar .author-wrap,
.single .entry-sidebar .author,
.single .entry-sidebar .author-description,
.single .entry-sidebar .title-author,
.single .entry-sidebar .fn{
  display:inline !important; margin:0 !important; padding:0 !important;
  border:0 !important; background:none !important; float:none !important;
  width:auto !important; line-height:inherit !important; font-size:13px !important; }
.single .entry-sidebar .reader-text{
  display:inline !important; text-transform:none !important; letter-spacing:0 !important;
  font-size:13px !important; font-weight:400 !important; color:#6b6b6b !important;
  margin:0 4px 0 0 !important; }
.single .entry-sidebar .post-sidebar-author .title-block,
.single .entry-sidebar .post-sidebar-author .avatar{ display:none !important; }
.single .entry-sidebar .post-sidebar-author::before{
  content:" · " !important; color:#bbb !important; }
.single .entry-sidebar .title-author a{ color:#e8442c !important; font-weight:600 !important;
  text-decoration:none !important; }
.single .entry-sidebar .title-author a:hover{ text-decoration:underline !important; }

/* === WBNEWS v5: мета по левому краю, ровно как текст статьи === */
.single .entry-sidebar-wrap{ display:block !important; }
.single .entry-sidebar{ display:block !important; width:auto !important;
  max-width:720px !important; margin-left:auto !important; margin-right:auto !important;
  text-align:left !important; }

/* === WBNEWS v6: контент во всю ширину статейной колонки (шире 720) === */
.single .entry-content{ max-width:100% !important; margin-left:0 !important;
  margin-right:0 !important; }
.single .entry-sidebar{ max-width:100% !important; margin-left:0 !important;
  margin-right:0 !important; }

/* === WBNEWS: аккуратный перенос заголовков (баланс + логический br) === */
.single .entry-title{ text-wrap:balance; }
.single .entry-title .cs-title-break{ display:block; }

/* ============================================================
   WBNEWS — БИРЖА (раздел /birzha/) в дизайн-системе сайта
   ============================================================ */
.wbx{ --wbx-accent:#e8442c; --wbx-accent-2:#c2331f; --wbx-tint:#fdeeec;
  --wbx-ink:#0a0a0a; --wbx-mut:#6b6b6b; --wbx-line:#ececec; }
.wbx *{ box-sizing:border-box; }
.page-template-default .wbx{ margin:0; }

/* Биржа: страницы во всю ширину (без сайдбара/узкой колонки) */
body.page .wbx{ max-width:1180px; margin-left:auto; margin-right:auto; }
body.page .wbx .entry-content,
body.page .page-template .entry-content{ max-width:none !important; }
.wbx a{ text-decoration:none; box-shadow:none; }

/* Single: убрать карточку «Следующее» (entry-post-next) — не нужна, путает */
.single .entry-post-next{ display:none !important; }

/* Шапка статьи: автор в мета-строке */
.single .entry-meta-details .meta-author a{ color:#e8442c; font-weight:600;
  text-decoration:none; }
.single .entry-meta-details .meta-author a:hover{ text-decoration:underline; }

/* Single: убрать дубль-полосу даты/автора под фото
   (данные перенесены в мета-строку шапки) */
.single .entry-sidebar,
.single .entry-sidebar-wrap{ display:none !important; }

/* Архив рубрики: текст карточки во всю ширину фото
   (тема резервирует 180px под пустую мета-колонку — убираем) */
.archive .entry-container,
.search .entry-container{ margin-left:0 !important; margin-right:0 !important; }
.archive .entry-container .entry-content-wrap,
.search .entry-container .entry-content-wrap{
  flex:0 0 100% !important; max-width:100% !important;
  margin-left:0 !important; padding-left:0 !important; padding-right:0 !important; }

/* «Посмотреть запись» — редакционная текст-ссылка со стрелкой,
   без тяжёлой заливки (magazine-стиль) */
.archive .entry-more, .search .entry-more,
.archive a.entry-more, .search a.entry-more,
.archive .more-link, .search .more-link{
  display:inline-flex !important; align-items:center; gap:7px;
  background:none !important; border:0 !important; box-shadow:none !important;
  padding:0 !important; min-height:0 !important;
  color:#e8442c !important; font-weight:700 !important;
  font-size:13px !important; letter-spacing:.04em; text-transform:uppercase;
  transition:gap .15s ease, opacity .15s ease; }
.archive .entry-more::after, .search .entry-more::after,
.archive .more-link::after, .search .more-link::after{
  content:"\2192"; font-size:15px; line-height:1; }
.archive .entry-more:hover, .search .entry-more:hover,
.archive .more-link:hover, .search .more-link:hover{
  color:#e8442c !important; gap:11px; opacity:.78; }

/* ─── QA-фиксы 07.08.2026 ─── */

/* даты в виджете последних материалов вылезали за экран на мобилке */
.wp-block-latest-posts__post-date{
  display:block;
  width:100%;
  max-width:100%;
  white-space:normal;
  word-break:break-word;
}
.wp-block-latest-posts.wp-block-latest-posts__list{
  padding-left:0;
  list-style:none;
}
.wp-block-latest-posts__list li{
  max-width:100%;
  overflow-wrap:anywhere;
}

/* защита от горизонтального скролла */
html,body{max-width:100%;overflow-x:hidden}
.wp-block-latest-posts a,
.wp-block-categories a{
  display:inline-block;
  max-width:100%;
  overflow-wrap:anywhere;
}

/* зоны нажатия не меньше 40px — требование мобильной доступности */
.wp-block-categories-list a,
.wp-block-latest-posts__list a,
.entry-meta a,
.cs-entry__category a,
.footer-nav a,
.nav-menu a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
}

/* зоны нажатия: догоняем меню и остальные ссылки в навигации/сайдбаре */
.menu-item > a,
.navbar a,
.navbar-content a,
.widget a,
.cs-sidebar a,
.entry-footer a,
.site-footer a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
}
/* ссылки внутри текста статьи не трогаем — там инлайн-поток */
.entry-content p a,
.entry-content li a{
  display:inline;
  min-height:0;
}

/* кнопки-иконки (бургер, поиск) и плашки рубрик на карточках */
.toggle-offcanvas,
.navbar-toggle-offcanvas,
.toggle-search,
.button-round{
  min-width:40px;
  min-height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.cs-entry__category a,
.cs-entry__post-meta a,
.post-categories a{
  display:inline-flex;
  align-items:center;
  min-height:40px;
  padding-block:6px;
}

/* комментарии отключены — прячем счётчик "No comments" */
.meta-comments,
.entry-meta .comments-link{display:none !important}

/* ─── «Читайте также» под статьёй ─── */
.wbx-rel{margin:48px 0 8px;padding-top:32px;border-top:1px solid var(--dt-line,#e3e6e8)}
.wbx-rel-h{font-size:22px;font-weight:700;letter-spacing:-0.4px;margin:0 0 20px;color:var(--dt-text,#121416)}
.wbx-rel-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:20px}
@media(max-width:1100px){.wbx-rel-grid{grid-template-columns:repeat(2,1fr)}}
.wbx-rel-card{display:block;color:inherit;text-decoration:none}
.wbx-rel-thumb{border-radius:6px;overflow:hidden;background:#f2f4f5;aspect-ratio:16/10;margin-bottom:11px}
.wbx-rel-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.wbx-rel-cat{display:inline-block;font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.4px;color:var(--dt-accent,#e8442c);margin-bottom:6px}
.wbx-rel-body h3,.wbx-rel-title{font-size:16px;font-weight:700;line-height:1.25;letter-spacing:-0.3px;margin:0;color:var(--dt-text,#121416);transition:color .15s ease-out}
.wbx-rel-card:hover .wbx-rel-body h3,.wbx-rel-card:hover .wbx-rel-title{color:var(--dt-accent,#e8442c)}
@media(max-width:640px){.wbx-rel-grid{grid-template-columns:1fr 1fr;gap:16px}.wbx-rel-h{font-size:19px}}
