/* =========================================================
   PRACTICAL ELECTRONICS — "Circuit Lab" design layer
   Дочерняя тема Blog Bee Child. Подключается после стилей темы.
   ========================================================= */

:root {
  --rl-ink: #0b1220;
  --rl-ink-2: #1e293b;
  --rl-muted: #64748b;
  --rl-muted-2: #94a3b8;
  --rl-paper: #f5f7fb;
  --rl-card: #ffffff;
  --rl-line: #e4e9f2;
  --rl-line-soft: #eef2f8;
  --rl-accent: #2563eb;
  --rl-accent-2: #0ea5e9;
  --rl-cyan: #06b6d4;
  --rl-amber: #f59e0b;
  --rl-violet: #7c3aed;
  --rl-radius: 18px;
  --rl-radius-sm: 12px;
  --rl-shadow: 0 10px 30px rgba(15, 23, 42, .08);
  --rl-shadow-lg: 0 24px 60px rgba(15, 23, 42, .14);
  --rl-font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --rl-font-display: "Manrope", "Inter", -apple-system, "Segoe UI", sans-serif;
  --rl-font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------- база ---------- */
html { scroll-behavior: smooth; }
body.bbe-light,
body {
  background-color: var(--rl-paper) !important;
  background-image:
    radial-gradient(rgba(37, 99, 235, .055) 1px, transparent 1px),
    radial-gradient(rgba(6, 182, 212, .045) 1px, transparent 1px);
  background-size: 28px 28px, 28px 28px;
  background-position: 0 0, 14px 14px;
  color: var(--rl-ink);
  font-family: var(--rl-font-sans) !important;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, h6,
.entry-title, .section-head, .widget-title, .page-title,
.site-title, .bble-site-title {
  font-family: var(--rl-font-display) !important;
  letter-spacing: -.022em;
  color: var(--rl-ink);
}
a { color: var(--rl-accent) !important; }
a:hover { color: #1d4ed8 !important; }
img { max-width: 100%; height: auto; }

/* ---------- хедер: стеклянная панель ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(255, 255, 255, .86) !important;
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--rl-line);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .05);
}
.site-header .bbe-header-middle-row { padding-top: 12px; padding-bottom: 12px; }
.site-header .custom-logo { max-height: 46px; width: auto; }
.main-navigation .menu > li > a {
  font-family: var(--rl-font-display) !important;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .01em;
  color: var(--rl-ink-2) !important;
  padding: 9px 14px;
  border-radius: 999px;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.main-navigation .menu > li > a:hover,
.main-navigation .menu > li.current-menu-item > a {
  background: linear-gradient(135deg, rgba(37, 99, 235, .10), rgba(6, 182, 212, .10));
  color: var(--rl-accent) !important;
  text-decoration: none !important;
}
.main-navigation .menu > li.menu-item-has-children > a::after { opacity: .55; }
.site-header .menu-toggle .bbe-burger-menu { color: var(--rl-ink); }
.top-header-row, .bbe-header-top-row { background: var(--rl-ink) !important; }
.bbe-search-trigger, .search-toggle { color: var(--rl-ink) !important; }

/* ---------- HERO (главная) ---------- */
.rl-hero {
  position: relative;
  overflow: hidden;
  margin: 0 0 34px;
  padding: 58px 0 46px;
  color: #fff;
  background:
    radial-gradient(900px 420px at 12% -10%, rgba(6, 182, 212, .45), transparent 60%),
    radial-gradient(760px 420px at 88% 0%, rgba(37, 99, 235, .55), transparent 62%),
    radial-gradient(600px 380px at 60% 120%, rgba(124, 58, 237, .30), transparent 60%),
    linear-gradient(135deg, #070c17 0%, #0e1a33 48%, #0b2a4a 100%);
  border-radius: 0 0 34px 34px;
  box-shadow: var(--rl-shadow-lg);
}
/* печатная плата: дорожки и площадки */
.rl-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, .055) 1px, transparent 1px),
    radial-gradient(circle at 22% 30%, rgba(6, 182, 212, .9) 0 2.5px, transparent 3px),
    radial-gradient(circle at 68% 62%, rgba(96, 165, 250, .9) 0 2.5px, transparent 3px),
    radial-gradient(circle at 84% 24%, rgba(6, 182, 212, .7) 0 2px, transparent 2.5px);
  background-size: 56px 56px, 56px 56px, 100% 100%, 100% 100%, 100% 100%;
  opacity: .55;
  pointer-events: none;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .95), rgba(0, 0, 0, .35));
}
.rl-hero::after {
  content: "";
  position: absolute;
  right: -130px;
  top: -130px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  border: 1px dashed rgba(125, 211, 252, .35);
  box-shadow: 0 0 0 60px rgba(37, 99, 235, .07), 0 0 0 130px rgba(6, 182, 212, .05);
  pointer-events: none;
}
.rl-hero__inner { position: relative; z-index: 2; max-width: 860px; }
.rl-hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--rl-font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #7dd3fc;
  background: rgba(125, 211, 252, .10);
  border: 1px solid rgba(125, 211, 252, .28);
  padding: 7px 13px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.rl-hero__kicker::before {
  content: "";
  width: 7px; height: 7px; border-radius: 50%;
  background: #22d3ee;
  box-shadow: 0 0 12px #22d3ee;
}
.rl-hero__title {
  margin: 0 0 14px;
  font-family: var(--rl-font-display) !important;
  font-size: clamp(30px, 4.1vw, 52px);
  line-height: 1.08;
  font-weight: 800;
  color: #fff !important;
  letter-spacing: -.03em;
}
.rl-hero__title em {
  font-style: normal;
  background: linear-gradient(92deg, #7dd3fc, #a78bfa 55%, #34d399);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.rl-hero__lead {
  margin: 0 0 26px;
  max-width: 640px;
  color: #c7d2e4 !important;
  font-size: 17px;
  line-height: 1.7;
}
.rl-hero__chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.rl-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: #e2e8f0 !important;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
  text-decoration: none !important;
}
.rl-chip:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, .14);
  border-color: rgba(125, 211, 252, .55);
  color: #fff !important;
}
.rl-search {
  display: flex;
  gap: 8px;
  max-width: 560px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .18);
  padding: 7px;
  border-radius: 16px;
  backdrop-filter: blur(6px);
}
.rl-search input[type="search"], .rl-search input[type="text"] {
  flex: 1;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 15px;
  padding: 10px 12px;
  outline: none;
}
.rl-search input::placeholder { color: rgba(226, 232, 240, .65); }
.rl-search button {
  border: 0;
  cursor: pointer;
  padding: 11px 20px;
  border-radius: 12px;
  font-family: var(--rl-font-display);
  font-weight: 700;
  font-size: 14px;
  color: #03121f;
  background: linear-gradient(135deg, #7dd3fc, #38bdf8);
  transition: transform .18s ease, box-shadow .18s ease;
}
.rl-search button:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(56, 189, 248, .35); }

/* ---------- секции ---------- */
.section-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 6px 0 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--rl-line);
}
.section-head .label {
  font-family: var(--rl-font-display) !important;
  font-size: 13px !important;
  letter-spacing: .16em !important;
  text-transform: uppercase;
  font-weight: 800 !important;
  color: var(--rl-ink) !important;
  position: relative;
  padding-left: 14px;
}
.section-head .label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 17px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--rl-accent), var(--rl-cyan));
}
.section-head .divider { display: none; }

/* ---------- карточки статей ---------- */
.bbe-article {
  background: var(--rl-card) !important;
  border: 1px solid var(--rl-line);
  border-radius: var(--rl-radius);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  height: 100%;
}
.bbe-article:hover {
  transform: translateY(-5px);
  box-shadow: var(--rl-shadow-lg);
  border-color: rgba(37, 99, 235, .28);
}
.bbe-article-figure, .bbe-article-thumb { border-radius: 0; }
.bbe-article-figure { overflow: hidden; background: var(--rl-line-soft); }
.bbe-article-figure img, .bbe-article-thumb { transition: transform .55s cubic-bezier(.22, .61, .36, 1); }
.bbe-article:hover .bbe-article-figure img,
.bbe-article:hover .bbe-article-thumb { transform: scale(1.045); }
.entry-inner { padding: 18px 20px 20px !important; }
.entry-categories { margin-bottom: 10px !important; }
.cat-item-link {
  display: inline-flex;
  align-items: center;
  background: rgba(37, 99, 235, .08) !important;
  color: #1d4ed8 !important;
  border-radius: 999px;
  padding: 4px 11px !important;
  font-family: var(--rl-font-mono);
  font-size: 10.5px !important;
  letter-spacing: .09em;
  text-transform: uppercase;
  font-weight: 600;
  text-decoration: none !important;
  transition: background .18s ease;
}
.cat-item-link:hover { background: rgba(37, 99, 235, .16) !important; }
.entry-title {
  font-size: 19px !important;
  line-height: 1.32 !important;
  font-weight: 800 !important;
  margin: 0 0 10px !important;
}
.entry-title a { color: var(--rl-ink) !important; text-decoration: none !important; }
.entry-title a:hover { color: var(--rl-accent) !important; }
.entry-meta {
  font-family: var(--rl-font-mono);
  font-size: 11px !important;
  letter-spacing: .04em;
  color: var(--rl-muted) !important;
  text-transform: uppercase;
}
.entry-meta a, .byline a { color: var(--rl-muted) !important; }
.entry-footer { border-top: 1px dashed var(--rl-line); margin-top: 12px; padding-top: 10px; }

/* ---------- сайдбар ---------- */
aside.widget-area { margin-bottom: 30px; }
.widget {
  background: var(--rl-card) !important;
  border: 1px solid var(--rl-line);
  border-radius: var(--rl-radius);
  padding: 20px 22px !important;
  margin-bottom: 22px !important;
  box-shadow: var(--rl-shadow);
}
.widget-title, .widget .widget-title {
  font-family: var(--rl-font-display) !important;
  font-size: 12px !important;
  letter-spacing: .15em !important;
  text-transform: uppercase;
  font-weight: 800 !important;
  color: var(--rl-ink) !important;
  padding-bottom: 12px;
  margin-bottom: 14px !important;
  border-bottom: 1px solid var(--rl-line);
  position: relative;
}
.widget ul li { padding: 8px 0; border-bottom: 1px dashed var(--rl-line-soft); }
.widget ul li:last-child { border-bottom: 0; }
.widget ul li a { color: var(--rl-ink-2) !important; font-weight: 500; text-decoration: none !important; transition: color .18s ease; }
.widget ul li a:hover { color: var(--rl-accent) !important; }
.widget .tagcloud a {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--rl-paper);
  border: 1px solid var(--rl-line);
  color: var(--rl-ink-2) !important;
  font-size: 12.5px !important;
  text-decoration: none !important;
}
.widget .tagcloud a:hover { background: rgba(37, 99, 235, .08); border-color: rgba(37, 99, 235, .3); color: var(--rl-accent) !important; }
.widget .custom-html-widget img { border-radius: var(--rl-radius-sm); }

/* ---------- главный баннер / featured-слайдер ---------- */
.align--left.blog-bee-main-wrap { padding-top: 8px; }
.bbe-banner, .main-banner, .banner-section { border-radius: var(--rl-radius); overflow: hidden; }
.slider-content .entry-title { font-size: 30px !important; line-height: 1.2 !important; }
.slider-content { padding: 26px 30px 24px !important; }

/* ---------- страница записи ---------- */
.rl-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 999;
  background: transparent;
  pointer-events: none;
}
.rl-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--rl-accent), var(--rl-cyan), #a78bfa);
  box-shadow: 0 0 12px rgba(37, 99, 235, .5);
  transition: width .12s linear;
}
.single .entry-header, .single .entry-title, .single .entry-inner { border-radius: 0; }
.single .entry-title {
  font-size: clamp(26px, 3.2vw, 40px) !important;
  line-height: 1.18 !important;
  letter-spacing: -.03em;
}
.single .entry-content {
  font-size: 17px !important;
  line-height: 1.78 !important;
  color: var(--rl-ink-2) !important;
}
.single .entry-content > p:first-of-type {
  font-size: 19px;
  line-height: 1.7;
  color: var(--rl-ink) !important;
}
.entry-content h2 {
  font-size: clamp(22px, 2.3vw, 28px) !important;
  margin: 1.7em 0 .6em !important;
  padding-left: 14px;
  border-left: 5px solid transparent;
  border-image: linear-gradient(180deg, var(--rl-accent), var(--rl-cyan)) 1;
}
.entry-content h3 { font-size: 21px !important; margin: 1.4em 0 .5em !important; }
.entry-content a {
  color: var(--rl-accent) !important;
  text-decoration: underline !important;
  text-decoration-color: rgba(37, 99, 235, .35) !important;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: color .18s ease, text-decoration-color .18s ease;
}
.entry-content a:hover { color: #1d4ed8 !important; text-decoration-color: #1d4ed8 !important; }
.entry-content blockquote {
  position: relative;
  margin: 1.8em 0 !important;
  padding: 22px 26px 22px 58px !important;
  background: linear-gradient(135deg, rgba(37, 99, 235, .06), rgba(6, 182, 212, .06));
  border: 1px solid rgba(37, 99, 235, .18) !important;
  border-left: 4px solid var(--rl-accent) !important;
  border-radius: var(--rl-radius-sm);
  font-style: normal !important;
  color: var(--rl-ink-2) !important;
}
.entry-content blockquote::before {
  content: "“";
  position: absolute;
  left: 18px; top: 6px;
  font-family: Georgia, serif;
  font-size: 54px;
  line-height: 1;
  color: rgba(37, 99, 235, .35);
}
.entry-content blockquote p { margin: 0 !important; }
.entry-content table {
  width: 100%;
  border-collapse: separate !important;
  border-spacing: 0;
  border: 1px solid var(--rl-line) !important;
  border-radius: var(--rl-radius-sm);
  overflow: hidden;
  margin: 1.6em 0 !important;
  font-size: 15px;
}
.entry-content table th {
  background: linear-gradient(135deg, #0e1a33, #13294b) !important;
  color: #e2e8f0 !important;
  font-family: var(--rl-font-display);
  font-weight: 700;
  padding: 12px 14px !important;
  text-align: left;
}
.entry-content table td { padding: 11px 14px !important; border-top: 1px solid var(--rl-line) !important; }
.entry-content table tr:nth-child(even) td { background: rgba(37, 99, 235, .035); }
.entry-content img { border-radius: var(--rl-radius-sm); }
.entry-content ul li::marker, .entry-content ol li::marker { color: var(--rl-accent); font-weight: 700; }
.entry-content code, .entry-content pre {
  font-family: var(--rl-font-mono) !important;
  background: #0e1a33;
  color: #7dd3fc;
  border-radius: 10px;
}
.entry-content code { padding: 2px 7px; font-size: .92em; }
.entry-content pre { padding: 18px 20px; overflow-x: auto; border-radius: var(--rl-radius-sm); }
.entry-content pre code { background: transparent; padding: 0; }

/* TOC */
#toc_container {
  background: var(--rl-card) !important;
  border: 1px solid var(--rl-line) !important;
  border-radius: var(--rl-radius) !important;
  padding: 18px 22px !important;
  box-shadow: var(--rl-shadow);
}
#toc_container .toc_title { font-family: var(--rl-font-display); font-weight: 800; letter-spacing: .02em; }
#toc_container a { color: var(--rl-ink-2) !important; text-decoration: none !important; }
#toc_container a:hover { color: var(--rl-accent) !important; }

/* мета записи */
.single .entry-meta {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  font-size: 12px !important;
  letter-spacing: .03em;
  background: var(--rl-card);
  border: 1px solid var(--rl-line);
  border-radius: 999px;
  padding: 8px 16px;
  box-shadow: var(--rl-shadow);
}
.single .entry-meta i { color: var(--rl-accent); }

/* ---------- футер ---------- */
.site-footer {
  background:
    radial-gradient(600px 240px at 15% 0%, rgba(37, 99, 235, .20), transparent 60%),
    #070d18 !important;
  color: #94a3b8 !important;
  border-top: 1px solid rgba(125, 211, 252, .12);
  margin-top: 40px;
  padding-top: 34px;
}
.site-footer a { color: #cbd5e1 !important; text-decoration: none !important; }
.site-footer a:hover { color: #7dd3fc !important; }
.site-footer .widget-title { color: #e2e8f0 !important; border-bottom-color: rgba(148, 163, 184, .2); }
.site-footer .widget, .site-footer .footer-widget { background: transparent !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; }
.site-footer .widget ul li { border-bottom-color: rgba(148, 163, 184, .12); }
.bbe-footer-bottom-row { border-top: 1px solid rgba(148, 163, 184, .14); padding-top: 18px; }

/* ---------- кнопка «наверх» ---------- */
.rl-top {
  position: fixed;
  right: 22px;
  bottom: 26px;
  width: 46px; height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(37, 99, 235, .35);
  background: linear-gradient(135deg, #0b1220, #13294b);
  color: #7dd3fc;
  display: grid;
  place-items: center;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease, box-shadow .25s ease;
  z-index: 200;
  box-shadow: 0 12px 30px rgba(2, 8, 20, .35);
}
.rl-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.rl-top:hover { box-shadow: 0 16px 36px rgba(37, 99, 235, .45); }

/* ---------- пагинация ---------- */
.bbe-pagination a, .bbe-pagination span.current {
  border-radius: 12px !important;
  font-family: var(--rl-font-display);
  font-weight: 700;
}
.bbe-pagination span.current {
  background: linear-gradient(135deg, var(--rl-accent), var(--rl-cyan)) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: 0 10px 24px rgba(37, 99, 235, .30);
}

/* ---------- адаптив ---------- */
@media (max-width: 1024px) {
  .rl-hero { padding: 42px 0 36px; border-radius: 0 0 26px 26px; }
  .rl-hero__lead { font-size: 16px; }
}
@media (max-width: 767px) {
  .rl-hero { padding: 32px 0 28px; margin-bottom: 24px; }
  .rl-hero__title { font-size: 27px; }
  .rl-search { flex-direction: column; }
  .rl-search button { width: 100%; }
  .entry-inner { padding: 14px 16px 16px !important; }
  .entry-title { font-size: 17px !important; }
  .single .entry-title { font-size: 24px !important; }
  .single .entry-content { font-size: 16px !important; }
  .widget { padding: 16px 18px !important; }
}

/* ================= FIXES v2 ================= */

/* карточки: плейсхолдер изображения приятный, а не серый */
.bbe-article-figure, .bbe-article-thumb {
  background: linear-gradient(135deg, #eef2f8 0%, #dde5f0 100%) !important;
}
/* убираем возможные вертикальные «полоски» от темы у заголовков карточек */
.bbe-article .entry-title::before, .bbe-article .entry-title::after { display: none !important; content: none !important; }
.bbe-article .entry-title { border: 0 !important; padding-left: 0 !important; box-shadow: none !important; }

/* страница записи: убираем серую «подложку» под обложкой */
body.single .site .single-header .bbe-article-figure,
body.single .site .content-wrapper .bbe-article-figure,
body.single .post-thumbnail,
body.single .bbe-article-figure { background: transparent !important; }
body.single .single-header .bbe-article-figure img,
body.single .post-thumbnail img { display: block; width: 100%; height: auto; object-fit: cover; }
body.single .bbe-article-figure { max-height: none !important; }

/* футер: тёмный и читаемый, без плашек темы */
.site-footer,
.site-footer .bbe-builder,
.site-footer .bbe-footer-row,
.site-footer .bbe-container,
.site-footer .bbe-footer-widgets,
.site-footer .footer-widgets,
.site-footer .bbe-footer-bottom-row {
  background: transparent !important;
}
.site-footer {
  background:
    radial-gradient(700px 260px at 12% 0%, rgba(37, 99, 235, .28), transparent 62%),
    radial-gradient(700px 260px at 88% 0%, rgba(6, 182, 212, .16), transparent 62%),
    #070d18 !important;
}
.site-footer, .site-footer p, .site-footer span, .site-footer li, .site-footer div,
.site-footer .textwidget, .site-footer .footer-widget { color: #a9b6c9 !important; }
.site-footer h2, .site-footer h3, .site-footer h4, .site-footer .widget-title,
.site-footer .site-title, .site-footer .footer-site-title { color: #e8eef8 !important; }
.site-footer a, .site-footer .bbe-footer-menu a { color: #c7d5e8 !important; }
.site-footer a:hover { color: #7dd3fc !important; }
.site-footer .bbe-site-logo img { filter: brightness(0) invert(1); opacity: .92; }
.site-footer .bbe-social-icons a { color: #c7d5e8 !important; border-color: rgba(148, 163, 184, .25) !important; }
.site-footer .bbe-social-icons a:hover { color: #7dd3fc !important; border-color: rgba(125, 211, 252, .5) !important; }

/* аккуратный отступ до футера */
.blog-bee-main-wrap + .site-footer, body > #page > .site-footer { margin-top: 36px; }

/* ================= FIX v3: обложка записи без пустого «хвоста» ================= */
body.single .single-header .bbe-article-figure,
body.single .single-header .post-thumbnail,
body.single .single-header .bbe-article-figure img {
  height: auto !important;
  padding-bottom: 0 !important;
  aspect-ratio: auto !important;
  min-height: 0 !important;
}
body.single .single-header .post-thumbnail { display: block !important; }
body.single .single-header .bbe-article-figure { line-height: 0; }
body.single .single-header .bbe-article-figure img { display: block; width: 100%; height: auto !important; }

/* ================= FIX v4: виджеты и мелочи ================= */
.widget .search-form, .widget form.search-form { display: flex; gap: 8px; align-items: stretch; }
.widget .search-form input[type="search"],
.widget .search-form input[type="text"] {
  flex: 1 1 auto;
  min-width: 0;
  border: 1px solid var(--rl-line) !important;
  border-radius: 12px !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  background: var(--rl-paper) !important;
  color: var(--rl-ink) !important;
  outline: none;
}
.widget .search-form input:focus { border-color: rgba(37, 99, 235, .45) !important; box-shadow: 0 0 0 3px rgba(37, 99, 235, .10); }
.widget .search-form button,
.widget .search-form input[type="submit"] {
  border: 0 !important;
  border-radius: 12px !important;
  padding: 10px 16px !important;
  background: linear-gradient(135deg, var(--rl-accent), var(--rl-cyan)) !important;
  color: #fff !important;
  font-family: var(--rl-font-display);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  white-space: nowrap;
}
.widget .search-form button i, .widget .search-form input[type="submit"] i { color: #fff; }

#toc_container .toc_title { display: flex; align-items: center; gap: 8px; color: var(--rl-ink) !important; }
#toc_container .toc_title::before {
  content: "";
  width: 5px; height: 15px; border-radius: 3px;
  background: linear-gradient(180deg, var(--rl-accent), var(--rl-cyan));
}
#toc_container { box-shadow: var(--rl-shadow); }
.section-head { border-bottom: 0 !important; margin-bottom: 18px !important; padding-bottom: 6px !important; }

/* ================= СОДЕРЖАНИЕ (TOC) ================= */
html { scroll-padding-top: 96px; }
.entry-content h2, .entry-content h3 { scroll-margin-top: 96px; }

.rl-toc {
  margin: 26px 0 30px;
  border: 1px solid var(--rl-line);
  border-radius: var(--rl-radius);
  background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
  box-shadow: var(--rl-shadow);
  overflow: hidden;
}
.rl-toc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--rl-line);
  background: linear-gradient(135deg, rgba(37, 99, 235, .06), rgba(6, 182, 212, .06));
}
.rl-toc__title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--rl-font-display) !important;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--rl-ink);
}
.rl-toc__title::before {
  content: "";
  width: 5px; height: 16px; border-radius: 3px;
  background: linear-gradient(180deg, var(--rl-accent), var(--rl-cyan));
}
.rl-toc__toggle {
  border: 1px solid var(--rl-line);
  background: #fff;
  color: var(--rl-muted);
  border-radius: 999px;
  padding: 6px 14px;
  font-family: var(--rl-font-display);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s ease;
}
.rl-toc__toggle:hover { color: var(--rl-accent); border-color: rgba(37, 99, 235, .4); }

.rl-toc__list {
  margin: 0 !important;
  padding: 12px 20px 16px 20px !important;
  list-style: none !important;
  counter-reset: rltoc;
}
.rl-toc__list li {
  counter-increment: rltoc;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  list-style: none !important;
  line-height: 1.45;
}
.rl-toc__list li a {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 7px 10px;
  border-radius: 10px;
  color: var(--rl-ink-2) !important;
  text-decoration: none !important;
  font-size: 15px;
  font-weight: 500;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.rl-toc__list li a::before {
  content: counter(rltoc);
  flex: 0 0 auto;
  min-width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: rgba(37, 99, 235, .08);
  color: var(--rl-accent);
  font-family: var(--rl-font-mono);
  font-size: 11px;
  font-weight: 600;
  margin-top: 1px;
}
.rl-toc__list li a:hover { background: rgba(37, 99, 235, .06); color: var(--rl-accent) !important; }
.rl-toc__list li a.is-active { background: linear-gradient(135deg, rgba(37,99,235,.12), rgba(6,182,212,.10)); color: var(--rl-accent) !important; }
.rl-toc__list li a.is-active::before { background: linear-gradient(135deg, var(--rl-accent), var(--rl-cyan)); color: #fff; }
.rl-toc__list li.lvl-3 a { margin-left: 32px; font-size: 14px; }
.rl-toc__list li.lvl-3 a::before { content: "–"; background: transparent; color: var(--rl-muted-2); min-width: 14px; }

.rl-toc.is-collapsed .rl-toc__list { display: none; }
.rl-toc.is-collapsed .rl-toc__head { border-bottom: 0; }

/* ================= FIX: закреплённая шапка (sticky) =================
   У темы своя реализация: #masthead.sticky--on .bbe-sticky-header (position:fixed).
   Мы убираем backdrop-filter с .site-header — он создавал containing block
   и «ломал» fixed-позиционирование дубля шапки. */
.site-header {
  position: relative !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  background: rgba(255, 255, 255, .97) !important;
  border-bottom: 1px solid var(--rl-line);
  box-shadow: 0 6px 24px rgba(15, 23, 42, .05);
}
.site-header .bbe-sticky-header {
  background: rgba(255, 255, 255, .97) !important;
  border-bottom: 1px solid var(--rl-line);
  box-shadow: 0 10px 30px rgba(15, 23, 42, .10);
}
.site-header .bbe-sticky-header .bbe-site-logo img { max-height: 40px; width: auto; }
.site-header .bbe-sticky-header .bbe-primary-menu a {
  font-family: var(--rl-font-display) !important;
  font-weight: 600;
  font-size: 14px;
  color: var(--rl-ink-2) !important;
  padding: 8px 13px;
  border-radius: 999px;
}
.site-header .bbe-sticky-header .bbe-primary-menu a:hover {
  background: linear-gradient(135deg, rgba(37, 99, 235, .10), rgba(6, 182, 212, .10));
  color: var(--rl-accent) !important;
}
html { scroll-padding-top: 110px; }
.entry-content h2, .entry-content h3 { scroll-margin-top: 110px; }

/* фон сайта: наш паттерн важнее «картинки фона» из настроек темы */
body.bbe-light.background--one,
body.background--one,
body {
  background-color: var(--rl-paper) !important;
  background-image:
    radial-gradient(rgba(37, 99, 235, .055) 1px, transparent 1px),
    radial-gradient(rgba(6, 182, 212, .045) 1px, transparent 1px) !important;
  background-size: 28px 28px, 28px 28px !important;
  background-position: 0 0, 14px 14px !important;
  background-attachment: scroll !important;
}
/* компактнее закреплённая шапка */
.site-header .bbe-sticky-header .bbe-header-middle-row { padding-top: 8px; padding-bottom: 8px; }

/* ================= FIX v5: своя закреплённая шапка =================
   Тема показывает «клон» шапки с анимацией прозрачности и прячет его при
   прокрутке вверх — из-за этого шапка «мигала» и пропадала. Делаем проще:
   фиксируем основную шапку, клон темы скрываем, отступ контенту — через JS-переменную. */
.site-header {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000 !important;
  background: #ffffff !important;
  border-bottom: 1px solid var(--rl-line);
  box-shadow: 0 8px 26px rgba(15, 23, 42, .07);
}
.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
.site-header .bbe-sticky-header { display: none !important; }
body { padding-top: var(--rl-header-h, 0px); }
body.bbe-light { padding-top: var(--rl-header-h, 0px); }
/* если JS отключён — резервный отступ */
.no-js body { padding-top: 110px; }

/* заголовки карточек и баннера — тёмные, без «синих подчёркнутых» ссылок */
body .bbe-article .entry-title a,
body .article-wrap .entry-title a,
body .banner-sidebar .entry-title a,
body .slider-content .entry-title a,
body .bbe-article .entry-title a:hover,
body .article-wrap .entry-title a:hover,
body .banner-sidebar .entry-title a:hover,
body .slider-content .entry-title a:hover {
  color: var(--rl-ink) !important;
  text-decoration: none !important;
}
body .bbe-article .entry-title a:hover,
body .banner-sidebar .entry-title a:hover,
body .slider-content .entry-title a:hover { color: var(--rl-accent) !important; }
/* заголовок статьи на странице записи */
body.single .single-header .entry-title,
body.single .single-header .entry-title a { color: var(--rl-ink) !important; text-decoration: none !important; }

/* компактная фиксированная шапка */
.site-header .bbe-header-middle-row,
.site-header .bbe-header-row { padding-top: 6px !important; padding-bottom: 6px !important; min-height: 0 !important; }
.site-header .custom-logo { max-height: 38px !important; width: auto !important; }
.site-header .bbe-site-logo { padding: 0 !important; }
@media (max-width: 782px) {
  .site-header .custom-logo { max-height: 30px !important; }
}

/* фиксируем компактную высоту шапки */
.site-header .bbe-header-middle-row { height: 86px !important; display: flex !important; align-items: center !important; }
.site-header .bbe-header-middle-row > .bbe-container { width: 100%; }
.site-header .bbe-header-middle-row .row { align-items: center; }

/* категории-чипы не должны переноситься по буквам */
.entry-categories, .entry-categories li { display: inline-flex !important; flex-wrap: wrap; gap: 6px; }
.entry-categories li { margin: 0 !important; }
.cat-item-link { white-space: nowrap !important; word-break: normal !important; overflow-wrap: normal !important; }
