/* Стоматология Александрова — Blog CSS v2 (matches live stomal.ru: Rubik + #41B8AD)
   Mirrors main page visual language: dark hero photo, service-card photo+overlay,
   pattern BG sections, teal pill CTAs. NO Helvetica Neue, NO yellow chip USP.
*/
:root {
  --teal: #41B8AD;
  --teal-bright: #00D3BE;
  --teal-deep: #2F9A91;
  --teal-soft: #71FFF1;
  --ink: #1A1A1A;
  --gray-900: #222;
  --gray-700: #555;
  --gray-500: #7A7A7A;
  --gray-300: #CFCFCF;
  --gray-line: #E5E5E5;
  --gray-100: #F4F4F4;
  --gray-50: #F9F9F9;
  --white: #FFFFFF;
  --radius-card: 10px;
  --radius-pill: 100px;
  --shadow-card: 0 4px 18px rgba(0, 0, 0, 0.07);
  --shadow-hover: 0 12px 32px rgba(15, 80, 75, 0.16);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: Rubik, system-ui, -apple-system, Segoe UI, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }

/* ===== Header (1:1 with main site navbar) ===== */
.bg-topbar {
  background: var(--white);
  border-bottom: 1px solid #f0f0f0;
  position: sticky; top: 0; z-index: 50;
}
.bg-topbar__inner {
  max-width: 1400px; margin: 0 auto;
  padding: 18px 40px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}
.bg-topbar__brand { display: flex; align-items: center; flex-shrink: 0; }
.bg-topbar__brand img.bg-svglogo {
  height: 48px; width: auto;
  display: block;
}
.bg-topbar__nav {
  display: flex; align-items: center; gap: 32px;
  flex: 1; justify-content: center;
}
.bg-topbar__nav a {
  font-size: 15px; font-weight: 400;
  color: var(--ink);
  padding: 6px 0;
  position: relative;
  transition: color 0.15s;
}
.bg-topbar__nav a:hover { color: var(--teal); }
.bg-topbar__nav a.is-active { color: var(--teal); }
.bg-topbar__nav a.is-active::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--teal);
  border-radius: 2px;
}
.bg-topbar__actions { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.bg-topbar__phone {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 8px 22px 8px 8px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--gray-300);
  font-size: 16px; font-weight: 500;
  color: var(--ink);
  transition: border-color 0.15s, color 0.15s;
}
.bg-topbar__phone:hover { border-color: var(--teal); color: var(--teal); }
.bg-topbar__phone-icon {
  width: 38px; height: 38px;
  background: var(--teal);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
  flex-shrink: 0;
}
.bg-topbar__phone strong { font-weight: 700; }
.bg-topbar__menu-toggle {
  display: none;
  background: var(--white);
  border: 1.5px solid var(--gray-300);
  border-radius: 50%;
  width: 42px; height: 42px;
  cursor: pointer;
  align-items: center; justify-content: center;
  color: var(--ink);
  padding: 0;
}
.bg-topbar__menu-toggle:hover { border-color: var(--teal); color: var(--teal); }

/* ===== Hero (dark photo + gradient + white text left) ===== */
.bg-hero {
  position: relative;
  min-height: 460px;
  background: #0e2522;
  overflow: hidden;
  display: flex; align-items: stretch;
}
.bg-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("/image/Home/Header/header.webp");
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.bg-hero::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(14, 37, 34, 0.92) 0%, rgba(14, 37, 34, 0.65) 50%, rgba(14, 37, 34, 0.2) 100%);
  z-index: 1;
}
.bg-hero__inner {
  position: relative; z-index: 2;
  max-width: 1320px; margin: 0 auto; width: 100%;
  padding: 80px 32px;
  display: flex; align-items: center;
}
.bg-hero__body { max-width: 560px; }
.bg-hero__eyebrow {
  display: inline-block;
  color: var(--teal-bright);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 211, 190, 0.4);
}
.bg-hero__title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 300;
  color: var(--white);
  text-transform: uppercase;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}
.bg-hero__title strong { font-weight: 800; }
.bg-hero__lead {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.6;
  margin-bottom: 28px;
}
.bg-hero__cta {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--teal);
  color: var(--white);
  padding: 13px 28px;
  border-radius: var(--radius-pill);
  font-size: 15px; font-weight: 500;
  transition: background 0.15s, transform 0.15s;
}
.bg-hero__cta:hover { background: var(--teal-bright); transform: translateY(-2px); }

/* ===== Breadcrumb on hero ===== */
.bg-crumb {
  position: relative; z-index: 2;
  font-size: 13px; color: rgba(255, 255, 255, 0.75);
  margin-bottom: 22px;
}
.bg-crumb a { color: var(--teal-bright); }
.bg-crumb a:hover { color: var(--white); }
.bg-crumb span.sep { margin: 0 8px; color: rgba(255, 255, 255, 0.35); }

/* ===== Pattern section ===== */
.bg-section {
  position: relative;
  padding: 90px 32px;
  background: var(--gray-50);
  overflow: hidden;
}
.bg-section--white { background: var(--white); }
.bg-section::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("/image/pattern.png");
  background-repeat: repeat;
  background-size: 400px;
  opacity: 0.04;
  z-index: 0;
  pointer-events: none;
}
.bg-section__inner {
  position: relative; z-index: 1;
  max-width: 1320px; margin: 0 auto;
}
.bg-section__head { text-align: center; margin-bottom: 56px; }
.bg-section__title {
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
  color: var(--ink);
}
.bg-section__title strong { font-weight: 800; }
.bg-section__lead {
  max-width: 640px; margin: 0 auto;
  font-size: 15px; color: var(--gray-700);
  line-height: 1.65;
}

/* ===== Category grid — photo + overlay (mirrors service cards on main) ===== */
.bg-cats {
  display: grid; gap: 24px;
  grid-template-columns: repeat(2, 1fr);
}
.bg-cat {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-card);
  aspect-ratio: 16 / 10;
  background: #0e2522;
  box-shadow: var(--shadow-card);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.bg-cat:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}
.bg-cat__img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}
.bg-cat:hover .bg-cat__img { transform: scale(1.05); }
.bg-cat__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14, 37, 34, 0.0) 35%, rgba(14, 37, 34, 0.55) 65%, rgba(14, 37, 34, 0.92) 100%);
}
.bg-cat__body {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 28px 30px;
  color: var(--white);
}
.bg-cat__title {
  font-size: 22px; font-weight: 600;
  margin-bottom: 6px;
}
.bg-cat__sub {
  font-size: 14px; color: rgba(255, 255, 255, 0.82);
  margin-bottom: 14px;
  line-height: 1.5;
}
.bg-cat__count {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px;
  color: var(--teal-bright);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.bg-cat__count::after {
  content: "→";
  font-size: 14px;
  transition: transform 0.2s ease;
}
.bg-cat:hover .bg-cat__count::after { transform: translateX(4px); }

@media (min-width: 900px) {
  .bg-cats { grid-template-columns: repeat(4, 1fr); }
  .bg-cat { aspect-ratio: 3 / 4; }
}

/* ===== Article grid ===== */
.bg-arts {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
}
.bg-art {
  background: var(--white);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}
.bg-art--draft { opacity: 1; }
.bg-art:not(.bg-art--draft):hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}
.bg-art__media {
  height: 180px;
  background: linear-gradient(135deg, #0e2522 0%, #41b8ad 100%);
  position: relative;
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
}
.bg-art__media[style*="background-image"] {
  background-size: cover;
  background-position: center;
}
.bg-art__media-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14, 37, 34, 0.0) 50%, rgba(14, 37, 34, 0.65) 100%);
}
.bg-art__media-letter {
  position: relative; z-index: 1;
  font-size: 56px; font-weight: 900;
  letter-spacing: -0.02em;
  opacity: 0.42;
}
.bg-art__badge {
  position: absolute; top: 14px; right: 14px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  background: var(--white); color: var(--teal-deep);
  padding: 5px 11px; border-radius: var(--radius-pill);
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.bg-art__body { padding: 22px 24px 26px; flex: 1; display: flex; flex-direction: column; }
.bg-art__cat {
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--teal);
  margin-bottom: 10px;
}
.bg-art__title {
  font-size: 17px; font-weight: 500;
  line-height: 1.4; margin-bottom: 10px;
  color: var(--ink);
}
.bg-art__excerpt {
  font-size: 14px; color: var(--gray-700);
  line-height: 1.6;
  flex: 1;
}

/* ===== CTA (teal full-bleed, mirrors team section) ===== */
.bg-cta {
  position: relative;
  background: var(--teal);
  color: var(--white);
  padding: 80px 32px;
  text-align: center;
  overflow: hidden;
}
.bg-cta::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("/image/pattern.png");
  background-repeat: repeat;
  background-size: 400px;
  opacity: 0.08;
  pointer-events: none;
}
.bg-cta__inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }
.bg-cta__eyebrow {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 14px;
}
.bg-cta__title {
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
  line-height: 1.2;
}
.bg-cta__title strong { font-weight: 800; }
.bg-cta__sub {
  font-size: 16px; opacity: 0.92;
  margin-bottom: 28px;
}
.bg-cta__phone {
  display: inline-block;
  font-size: clamp(24px, 3.2vw, 32px);
  font-weight: 700;
  color: var(--white);
  background: rgba(255, 255, 255, 0.14);
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  border: 1.5px solid rgba(255, 255, 255, 0.45);
  transition: background 0.2s, border-color 0.2s;
}
.bg-cta__phone:hover {
  background: var(--white); color: var(--teal-deep);
  border-color: var(--white);
}

/* ===== Article layout ===== */
.bg-article { background: var(--white); }
.bg-hero--article { min-height: 360px; }
.bg-article__meta {
  display: flex; gap: 18px; flex-wrap: wrap;
  margin-top: 16px;
  font-size: 13px; color: rgba(255, 255, 255, 0.78);
}
.bg-article__meta span { display: inline-flex; align-items: center; gap: 6px; }
.bg-article__container {
  max-width: 1180px; margin: 0 auto;
  padding: 56px 32px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
}
.bg-article__toc {
  position: sticky; top: 96px;
  padding: 22px;
  background: var(--gray-50);
  border-radius: var(--radius-card);
  font-size: 14px;
}
.bg-article__toc h3 {
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--gray-700);
  margin-bottom: 14px;
}
.bg-article__toc ol { list-style: none; counter-reset: toc; }
.bg-article__toc li {
  counter-increment: toc;
  padding: 7px 0;
  border-bottom: 1px solid var(--gray-line);
  line-height: 1.4;
}
.bg-article__toc li:last-child { border-bottom: 0; }
.bg-article__toc a {
  color: var(--ink);
  display: flex; gap: 10px;
  transition: color 0.15s;
}
.bg-article__toc a::before {
  content: counter(toc, decimal-leading-zero);
  color: var(--teal);
  font-weight: 700;
  flex-shrink: 0;
}
.bg-article__toc a:hover { color: var(--teal); }

.bg-article__body { max-width: 760px; }
.bg-article__body p,
.bg-article__body ul,
.bg-article__body ol,
.bg-article__body table {
  font-size: 16px; line-height: 1.75;
  color: var(--gray-900);
  margin-bottom: 18px;
}
.bg-article__body .bg-article__lede {
  font-size: 18px; line-height: 1.65;
  color: var(--ink);
  font-weight: 400;
  margin-bottom: 28px;
  padding-left: 18px;
  border-left: 3px solid var(--teal);
}
.bg-article__body h2 {
  font-size: clamp(22px, 2.6vw, 28px);
  font-weight: 600;
  margin: 44px 0 16px;
  line-height: 1.3;
  color: var(--ink);
  scroll-margin-top: 96px;
}
.bg-article__body h2 strong { font-weight: 800; color: var(--teal-deep); }
.bg-article__body h3 {
  font-size: 19px;
  font-weight: 600;
  margin: 28px 0 12px;
  color: var(--ink);
}
.bg-article__body ul,
.bg-article__body ol { padding-left: 24px; }
.bg-article__body ul li,
.bg-article__body ol li { margin-bottom: 8px; }
.bg-article__body ul li::marker { color: var(--teal); }
.bg-article__body table {
  width: 100%; border-collapse: collapse;
  font-size: 15px;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.bg-article__body th {
  background: var(--teal);
  color: var(--white);
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
}
.bg-article__body td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--gray-line);
}
.bg-article__body tr:nth-child(even) td { background: var(--gray-50); }
.bg-article__body blockquote {
  margin: 24px 0;
  padding: 20px 22px;
  background: var(--gray-50);
  border-left: 4px solid var(--teal);
  border-radius: 4px;
  font-size: 15px;
  color: var(--gray-900);
}
.bg-article__body a {
  color: var(--teal-deep);
  border-bottom: 1px solid currentColor;
}
.bg-article__body a:hover { color: var(--teal-bright); border-bottom-color: var(--teal-bright); }
.bg-article__body strong { font-weight: 700; }

.bg-faq { margin-top: 28px; }
.bg-faq details {
  background: var(--gray-50);
  border-radius: var(--radius-card);
  margin-bottom: 12px;
  padding: 18px 22px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: border-color 0.15s;
}
.bg-faq details[open] {
  background: var(--white);
  border-color: var(--teal);
}
.bg-faq summary {
  font-weight: 600;
  font-size: 16px;
  color: var(--ink);
  list-style: none;
  display: flex; align-items: center; gap: 12px;
  position: relative;
  padding-right: 32px;
}
.bg-faq summary::-webkit-details-marker { display: none; }
.bg-faq summary::after {
  content: "+";
  position: absolute; right: 0;
  font-size: 24px; line-height: 0;
  color: var(--teal);
  font-weight: 300;
  transition: transform 0.15s;
}
.bg-faq details[open] summary::after { content: "−"; }
.bg-faq details p {
  margin-top: 14px;
  font-size: 15px; line-height: 1.65;
  color: var(--gray-900);
}

.bg-article__inline-cta {
  margin: 32px 0;
  padding: 28px;
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%);
  color: var(--white);
  border-radius: var(--radius-card);
  display: flex; flex-direction: column; gap: 14px;
}
.bg-article__inline-cta strong { font-size: 18px; font-weight: 600; }
.bg-article__inline-cta a {
  display: inline-block;
  background: var(--white);
  color: var(--teal-deep) !important;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  border-bottom: none !important;
  align-self: flex-start;
}
.bg-article__inline-cta a:hover { background: rgba(255, 255, 255, 0.9); }

.bg-article__next {
  border-top: 1px solid var(--gray-line);
  margin-top: 48px;
  padding-top: 32px;
}
.bg-article__next h3 {
  font-size: 13px;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--gray-700);
  margin-bottom: 16px;
}
.bg-article__next ul { list-style: none; padding: 0; }
.bg-article__next li {
  margin-bottom: 10px;
  padding-left: 16px;
  position: relative;
}
.bg-article__next li::before {
  content: "→";
  position: absolute; left: 0;
  color: var(--teal);
  font-weight: 700;
}

@media (max-width: 900px) {
  .bg-article__container { grid-template-columns: 1fr; gap: 28px; padding: 32px 18px; }
  .bg-article__toc { position: static; }
  .bg-article__body { max-width: 100%; }
  .bg-article__body table { font-size: 13px; }
  .bg-article__body th, .bg-article__body td { padding: 8px 10px; }
}

/* ===== Disclaimer strip ===== */
.bg-disclaimer {
  background: #000;
  color: var(--white);
  text-align: center;
  padding: 14px 18px;
  font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.1em;
  font-weight: 400;
}

/* ===== Mobile ===== */
@media (max-width: 1100px) {
  .bg-topbar__nav:not(.is-open) { display: none; }
  .bg-topbar__nav.is-open {
    display: flex; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); flex-direction: column; align-items: stretch;
    padding: 18px 24px; gap: 4px;
    border-bottom: 1px solid #f0f0f0;
    box-shadow: 0 12px 24px rgba(0,0,0,0.06);
  }
  .bg-topbar__nav.is-open a { padding: 12px 0; border-bottom: 1px solid #f4f4f4; }
  .bg-topbar { position: relative; }
  .bg-topbar__menu-toggle { display: inline-flex; }
}
@media (max-width: 900px) {
  .bg-topbar__inner { padding: 14px 18px; }
  .bg-topbar__brand img.bg-svglogo { height: 38px; }
  .bg-topbar__phone { padding: 6px 16px 6px 6px; font-size: 14px; }
  .bg-topbar__phone-icon { width: 32px; height: 32px; }
  .bg-hero { min-height: 380px; }
  .bg-hero__inner { padding: 60px 18px; }
  .bg-section { padding: 56px 18px; }
  .bg-section__head { margin-bottom: 40px; }
  .bg-cta { padding: 56px 18px; }
  .bg-cat__body { padding: 20px 22px; }
  .bg-cat__title { font-size: 18px; }
}
@media (max-width: 600px) {
  .bg-topbar__phone-text { display: none; }
  .bg-topbar__phone { padding: 4px; border: none; min-width: 44px; min-height: 44px; }
  .bg-topbar__phone-icon { width: 44px; height: 44px; }
  .bg-topbar__menu-toggle { width: 44px; height: 44px; }
  .scc-btn { min-height: 44px !important; padding: 12px 20px !important; }
  .bg-crumb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ===== AUDIT FIXES 2026-05-26 (v5) ===== */

/* Fix 1 — article cards: photo + overlay (replaces giant letter look) */
.bg-art__media[style*="background-image"] { background-size: cover; background-position: center; }
.bg-art__media[style*="background-image"] .bg-art__media-letter { display: none; }
.bg-art__media-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14, 37, 34, 0) 40%, rgba(14, 37, 34, 0.65) 100%);
}
.bg-art__media-letter { opacity: 0.22; font-size: 44px; }

/* Fix 3 — touch target tablet/mobile (TOC + FAQ) */
@media (max-width: 900px) {
  .bg-article__toc li { padding: 10px 0; }
  .bg-article__toc a { min-height: 44px; align-items: center; padding: 4px 0; }
  .bg-faq summary { min-height: 44px; padding-top: 8px; padding-bottom: 8px; padding-right: 36px; }
}

/* Fix 4 — TOC collapsible on mobile (uses <details>) */
@media (min-width: 901px) {
  details.bg-article__toc > summary { display: none; }
  details.bg-article__toc > ol { display: block; }
}
@media (max-width: 900px) {
  details.bg-article__toc { padding: 14px 18px; }
  details.bg-article__toc > h3 { display: none; }
  details.bg-article__toc summary {
    font-size: 12px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: var(--gray-700);
    cursor: pointer; padding: 6px 0; min-height: 44px;
    display: flex; align-items: center; gap: 8px;
    list-style: none; margin-bottom: 0;
  }
  details.bg-article__toc summary::-webkit-details-marker { display: none; }
  details.bg-article__toc summary::after {
    content: "▾"; margin-left: auto;
    transition: transform 0.2s; color: var(--teal);
  }
  details.bg-article__toc[open] summary::after { transform: rotate(180deg); }
  details.bg-article__toc[open] ol { margin-top: 8px; }
}

/* Fix 5 — desktop category page: cap card grid to avoid stretched 580px cards */
@media (min-width: 720px) {
  .bg-arts {
    grid-template-columns: repeat(auto-fit, minmax(290px, 360px));
    justify-content: start;
  }
}

/* Tablet (768) — TOC 2-column with sticky */
@media (min-width: 720px) and (max-width: 900px) {
  .bg-article__container { grid-template-columns: 200px 1fr; gap: 24px; }
  details.bg-article__toc { position: sticky; top: 80px; font-size: 12px; padding: 14px; }
  details.bg-article__toc[open] { background: var(--gray-50); }
}
