
/* --- Imported from images-styles.css --- */
:root {
  --ink: #13231f;
  --muted: #55645f;
  --paper: #f7f4ec;
  --surface: #fffdf8;
  --green: #0f5b46;
  --green-dark: #083b2d;
  --lime: #d6f06e;
  --gold: #d7a84a;
  --rose: #f4d5cb;
  --line: #d8ded8;
  --shadow: 0 18px 45px rgba(19, 35, 31, 0.1);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.68;
}

a { color: var(--green); text-underline-offset: 0.18em; }
a:hover { color: var(--green-dark); }
img { display: block; width: 100%; height: auto; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 244, 236, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.header-inner { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { color: var(--ink); font-weight: 850; text-decoration: none; letter-spacing: -0.025em; }
.site-header nav, .site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-header nav a { color: var(--ink); font-size: 0.92rem; font-weight: 700; text-decoration: none; }

.hero { padding: 76px 0 54px; background: linear-gradient(145deg, #f7f4ec 20%, #e4efdf 100%); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr); gap: 54px; align-items: center; }
.eyebrow, .kicker { margin: 0 0 10px; color: var(--green); font-size: 0.78rem; font-weight: 900; letter-spacing: 0.12em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; line-height: 1.12; letter-spacing: -0.035em; }
h1 { max-width: 850px; margin-bottom: 24px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.7rem, 5.4vw, 5.4rem); font-weight: 700; }
h2 { margin-bottom: 20px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 3.4vw, 3.25rem); }
h3 { margin-bottom: 12px; font-size: 1.24rem; }
.lead { font-size: 1.13rem; line-height: 1.75; }
.hero-copy > p { max-width: 820px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 20px; border: 1px solid var(--green); border-radius: 999px; font-weight: 800; text-decoration: none; }
.button.primary { color: #fff; background: var(--green); }
.button.secondary { color: var(--green); background: transparent; }
.hero-figure { margin: 0; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transform: rotate(1.5deg); }
.hero-figure img { aspect-ratio: 4 / 3; object-fit: contain; border-radius: 14px; background: #0e211b; }
figcaption { margin-top: 10px; color: var(--muted); font-size: 0.85rem; line-height: 1.5; }

.article-layout { display: grid; grid-template-columns: 220px minmax(0, 820px); gap: 60px; justify-content: center; padding-top: 58px; padding-bottom: 90px; }
.toc { position: sticky; top: 102px; align-self: start; display: grid; gap: 8px; padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.toc-title { margin: 0 0 4px; font-weight: 900; }
.toc a { color: var(--muted); font-size: 0.92rem; text-decoration: none; }
.content { min-width: 0; }
.content section { margin-bottom: 76px; scroll-margin-top: 100px; }
.content p, .content li, .content td, .content th { text-align: left; }
.content p { margin: 0 0 19px; }
.content ul, .content ol { margin: 18px 0; padding-left: 24px; }
.content li + li { margin-top: 10px; }

.verdict-card { padding: 34px; background: var(--green-dark); color: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.verdict-card .kicker { color: var(--lime); }
.verdict-card h2 { color: #fff; }
.pros-cons { display: grid; gap: 10px; margin-bottom: 0; padding-left: 20px; }

.table-wrap { overflow-x: auto; margin: 26px 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
table { width: 100%; min-width: 680px; border-collapse: collapse; }
th, td { padding: 16px; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: #e7eee8; color: var(--green-dark); font-size: 0.9rem; }
tr:last-child td { border-bottom: 0; }

.wide-figure { margin: 30px 0; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.wide-figure img { max-height: 480px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; }
.accent-figure { background: #edf3d3; }
.calm-figure { background: #e7efea; }
.math-card, .source-box { margin: 26px 0; padding: 26px; border-left: 6px solid var(--gold); background: var(--surface); border-radius: 0 16px 16px 0; }
.source-box { border-left-color: var(--green); }
.math-card p:last-child, .source-box p:last-child { margin-bottom: 0; }

.split-notes, .audience-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 28px 0; }
.split-notes > div, .audience-card { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.audience-card.good { border-top: 5px solid var(--green); }
.audience-card.caution { border-top: 5px solid #b64c39; background: #fff9f7; }
.audience-card ul { margin-bottom: 0; }
.checklist { padding: 26px 30px 26px 50px !important; background: #e9f1ec; border-radius: 16px; }

.faq-section details { margin-bottom: 12px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.faq-section summary { cursor: pointer; font-weight: 850; }
.faq-section details p { margin: 14px 0 0; color: var(--muted); }

.site-footer { padding: 44px 0; color: #e6eee9; background: var(--green-dark); }
.footer-grid { display: flex; align-items: flex-start; justify-content: space-between; gap: 36px; }
.footer-grid > div { max-width: 620px; }
.footer-title { margin-top: 0; color: #fff; font-weight: 900; }
.site-footer a { color: var(--lime); }

@media (max-width: 900px) {
  .site-header { position: static; }
  .header-inner { padding: 15px 0; align-items: flex-start; flex-direction: column; gap: 10px; }
  .hero { padding-top: 48px; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { max-width: 600px; transform: none; }
  .article-layout { grid-template-columns: minmax(0, 820px); }
  .toc { position: static; grid-template-columns: repeat(3, 1fr); }
  .toc-title { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .shell { width: min(100% - 28px, 1180px); }
  h1 { font-size: clamp(2.35rem, 12vw, 3.5rem); overflow-wrap: anywhere; }
  h2 { font-size: 2rem; }
  .hero-grid { gap: 32px; }
  .article-layout { padding-top: 30px; gap: 36px; }
  .toc { grid-template-columns: repeat(2, 1fr); }
  .verdict-card { padding: 24px; }
  .split-notes, .audience-grid { grid-template-columns: 1fr; }
  .footer-grid { flex-direction: column; }
  .site-footer nav { flex-direction: column; gap: 10px; }
}


/* =========================================
   UNIVERSAL DESKTOP & MOBILE MENU + LOGO
   ========================================= */
.site-header {
    background-color: var(--color-bg, transparent);
    border-bottom: 1px solid var(--color-border, transparent);
    position: sticky; top: 0; z-index: 100;
}
.top-navigation-bar {
    width: 100%; margin: 0 auto; padding: 15px 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.site-logo { min-width: 180px; margin: 0; }
.site-logo img {
    max-height: 50px !important; max-width: none !important;
    width: auto !important; display: block; transition: transform 0.2s ease;
}
.site-logo img:hover { transform: scale(1.02); }
.site-nav--desktop { display: none !important; }

@media (min-width: 1024px) {
    .top-navigation-bar {
        max-width: 100%; padding: 15px 40px; 
        display: flex; justify-content: space-between; align-items: center; gap: 30px;
    }
    .site-nav--desktop { display: block !important; flex: 1; min-width: 0; }
    .mobile-controls { display: none !important; }
    .site-nav--desktop ul {
        display: flex; flex-wrap: wrap; justify-content: flex-end; 
        gap: 15px 25px; list-style: none; margin: 0; padding: 0;
    }
    /* УМНЫЙ ЦВЕТ ТЕКСТА */
    .site-nav--desktop a {
        text-decoration: none;
        color: var(--color-text, var(--auto-menu-text, #111827)) !important;
        font-family: var(--font-body, sans-serif); font-weight: 600; font-size: 14px; 
        transition: opacity 0.2s ease; white-space: normal !important; line-height: 1.2;
    }
    .site-nav--desktop a:hover { opacity: 0.7; }
}

.burger {
    background: transparent; border: none; cursor: pointer;
    display: flex; flex-direction: column; gap: 6px; padding: 5px; z-index: 1000;
}
/* УМНЫЙ ЦВЕТ БУРГЕРА */
.burger span {
    display: block; width: 28px; height: 3px;
    background-color: var(--color-text, var(--auto-menu-text, #111827)) !important;
    transition: transform 0.3s ease, opacity 0.3s ease; border-radius: 2px;
}
.burger.is-active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.burger.is-active span:nth-child(2) { opacity: 0; }
.burger.is-active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* УМНЫЙ ФОН МОБИЛЬНОГО МЕНЮ */
.mobile-menu {
    position: fixed; top: 0; right: -100%; width: 85%; max-width: 400px; height: 100vh;
    background-color: var(--color-bg, var(--auto-menu-bg, #ffffff)) !important;
    box-shadow: -5px 0 20px rgba(0,0,0,0.1); transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99999; overflow-y: auto; padding: 60px 30px;
}
.mobile-menu.is-open { right: 0; }
.mobile-menu__close {
    position: absolute; top: 20px; right: 20px; background: transparent; border: none;
    font-size: 36px; line-height: 1;
    color: var(--color-text, var(--auto-menu-text, #111827)) !important;
    cursor: pointer; transition: opacity 0.2s ease;
}
.mobile-menu__close:hover { opacity: 0.7; }
.menu-mobile {
    list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 25px;
}
.menu-mobile a {
    text-decoration: none;
    color: var(--color-text, var(--auto-menu-text, #111827)) !important;
    font-size: 20px; font-family: var(--font-display, sans-serif);
    font-weight: 600; display: block; transition: opacity 0.2s ease, padding-left 0.2s ease;
}
.menu-mobile a:hover { opacity: 0.7; padding-left: 10px; }

/* Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px); 
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
    z-index: 99998;
}

.mobile-menu-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.sitemap-main{
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
}

.sitemap-title{
  margin: 0 0 8px;
  text-align: center;
}

.sitemap-subtitle{
  margin: 0 0 24px;
  text-align: center;
  opacity: 0.75;
}

.sitemap-list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.sitemap-link{
  display: block;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  text-decoration: none;
}

.sitemap-link:hover{
  border-color: rgba(255,255,255,0.2);
}

/* ===== Universal hub (NO body_class needed) ===== */

main.hub-children-main{
  padding-bottom: 48px;
}

/* Article wrapper */
main.hub-children-main .hub-children-article{
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* Header */
main.hub-children-main .hub-children-header{
  text-align: center;
  margin-top: 24px;
  margin-bottom: 24px;
}

main.hub-children-main .hub-children-title{
  margin: 0 0 10px;
}

main.hub-children-main .hub-children-intro{
  max-width: 900px;
  margin: 0 auto;
  opacity: .9;
}

/* Grid */
main.hub-children-main .hub-children-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  margin-top: 12px;
}

/* Card */
main.hub-children-main .hub-children-card{
  display: block;
  text-decoration: none;
}

main.hub-children-main .hub-children-card__media{
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
  transition: transform .22s ease, box-shadow .22s ease;
}

main.hub-children-main .hub-children-card:hover .hub-children-card__media{
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.28);
}

/* Image */
main.hub-children-main .hub-children-card__img{
  width: 100%;
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
}

/* Overlay */
main.hub-children-main .hub-children-card__overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.08) 0%,
    rgba(0,0,0,0.42) 55%,
    rgba(0,0,0,0.70) 100%
  );
}

/* Text */
main.hub-children-main .hub-children-card__content{
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
}

main.hub-children-main .hub-children-card__title{
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 6px 18px rgba(0,0,0,.55);
}

/* Responsive */
@media (max-width: 1024px){
  main.hub-children-main .hub-children-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }
}

@media (max-width: 640px){
  main.hub-children-main .hub-children-grid{
    grid-template-columns: 1fr;
  }
}

/* ===== ОГРАНИЧЕНИЕ ШИРИНЫ ДЛЯ ВСЕХ СТРАНИЦ (Убрали привязку к .home) ===== */
main > *:not([data-content="hero"]):not(.cl-header):not(header):not(.cl-hero),
main article > *:not([data-content="hero"]):not(.cl-header):not(header):not(.cl-hero) {
    max-width: var(--content-max-width, 1180px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
}

main iframe,
main article iframe {
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    transform: none !important;
    width: 100% !important;
}

/* ===== ШРИФТЫ И ЦВЕТ ТЕКСТА (Перебиваем дефолт WP) ===== */
main, article, p, li, a, h1, h2, h3, h4, h5 {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif !important;
}

main {
    color: var(--ink, #111827);
}

/* ===== Укрощаем огромный заголовок H1 ===== */
main h1 {
    font-size: clamp(2rem, 4vw, 3.5rem) !important;
    font-weight: 800;
    margin-top: 30px;
    margin-bottom: 20px;
    line-height: 1.2;
}

/* ===== ХЛЕБНЫЕ КРОШКИ (BREADCRUMBS) - ТОЛЬКО СВЕТЛЫЕ ===== */
#crumbs {
    max-width: var(--content-max-width, 1180px); /* Выравниваем по ширине контента */
    margin-left: auto;
    margin-right: auto;
    padding: 10px 20px; /* Отступы по бокам, как у текста */
    margin-bottom: 20px;
    font-size: 14px;
    color: #64748b; 
    text-align: left; 
    box-sizing: border-box;
}

#crumbs a {
    text-decoration: none;
    color: #475569; 
    transition: color 0.2s ease;
}

#crumbs a:hover {
    color: #2563eb; 
    text-decoration: underline;
}

#crumbs .current {
    font-weight: 600;
    color: #0f172a; 
}

/* =========================================
   СТИЛИ ДЛЯ ОГЛАВЛЕНИЯ (TOC) - ТОЛЬКО СВЕТЛЫЕ
   ========================================= */
.toc-card {
    background: #f8fafc; 
    border: 1px solid #e2e8f0; 
    border-radius: 10px;
    padding: 25px 30px;
    margin: 40px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.toc-card h2 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    color: #1e293b; 
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 15px;
}

.toc-columns {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toc-group a {
    color: #475569 !important; 
    text-decoration: none;
    font-size: 16px;
    line-height: 1.5;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}

.toc-group a:hover {
    color: #2563eb !important; 
    transform: translateX(4px);
}

@media (min-width: 768px) {
    .toc-columns {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 40px;
    }
}

/* =========================================
   CUSTOM USER STYLES (AUTOMATIC INJECTION)
   ========================================= */

/* Grid for child pages */
.child-pages-small-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
@media (max-width: 768px) {
    .child-pages-small-grid {
        grid-template-columns: 1fr;
    }
}

/* Universal Image Scaling & Styling */
.cl-hero img,
.content-article img,
img.article-image,
img.wp-post-image {
    max-width: 100%;
    width: 100%;
    height: auto !important;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}
