/* Блог Sofiya Clinic — за макетами sofiya_blog_mockups. Усе в межах .sb, щоб не зачепити тему сайту */
.sb {
  --sb-bg: #f7f8f4;
  --sb-surface: #ffffff;
  --sb-surface-alt: #f1f5ea;
  --sb-text: #2a2f25;
  --sb-heading: #24301f;
  --sb-muted: #6f7767;
  --sb-line: #dfe6d5;
  --sb-accent: #76b82a;
  --sb-accent-dark: #5d9620;
  --sb-shadow: 0 18px 48px rgba(43, 58, 28, 0.08);
  --sb-radius: 22px;
  --sb-container: 1180px;

  background: var(--sb-bg);
  color: var(--sb-text);
  line-height: 1.6;
  font-size: 16px;
  padding-bottom: 24px;
}
.sb *, .sb *::before, .sb *::after { box-sizing: border-box; }
.sb img { max-width: 100%; display: block; }
.sb a { color: inherit; text-decoration: none; transition: color .2s ease; }
.sb p { margin: 0 0 16px; font-size: inherit; line-height: inherit; color: inherit; }
.sb h1, .sb h2, .sb h3, .sb h4, .sb h5 {
  margin: 0 0 14px;
  line-height: 1.2;
  color: var(--sb-heading);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}
.sb h1 { font-size: clamp(30px, 4.4vw, 50px); }
.sb h2 { font-size: clamp(26px, 3vw, 36px); }
.sb h3 { font-size: 22px; }
.sb h4 { font-size: 18px; }
.sb h5 { font-size: 15px; }

.sb-container {
  width: min(calc(100% - 32px), var(--sb-container));
  margin: 0 auto;
}

/* Хлібні крихти */
.sb-crumbs { padding: 22px 0 0; font-size: 14px; color: var(--sb-muted); }
.sb-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.sb-crumbs li { display: inline-flex; align-items: center; gap: 6px; }
.sb-crumbs li + li::before { content: "›"; color: var(--sb-accent); }
.sb-crumbs a:hover { color: var(--sb-accent-dark); }
.sb-crumbs [aria-current] { color: var(--sb-text); }

/* Шапка блогу */
.sb-hero, .sb-page-hero { padding: 22px 0 24px; }
.sb-hero-card, .sb-page-hero-card {
  background: linear-gradient(135deg, rgba(118,184,42,.10), rgba(255,255,255,.96));
  border: 1px solid rgba(118,184,42,.18);
  border-radius: 32px;
  box-shadow: var(--sb-shadow);
  overflow: hidden;
}
.sb-hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: stretch; }
.sb-hero-copy, .sb-article-head { padding: 34px; }
.sb-hero-grid .sb-hero-copy { align-self: center; padding: 44px; }
.sb-hero-copy .sb-lead { margin-bottom: 0; }
.sb-hero-image img { width: 100%; height: 100%; min-height: 250px; max-height: 420px; object-fit: cover; }

.sb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--sb-accent-dark);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  margin-bottom: 16px;
}
.sb-eyebrow::before { content: ""; width: 38px; height: 2px; background: var(--sb-accent); }
a.sb-eyebrow:hover { color: var(--sb-accent); }
.sb .sb-lead { font-size: 18px; color: #4d5545; max-width: 64ch; }
.sb .sb-muted { color: var(--sb-muted); font-size: 14px; }

/* Кнопки */
.sb-btn, .sb-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  text-align: center;
  transition: .2s ease;
}
.sb a.sb-btn { background: var(--sb-accent); color: #fff; box-shadow: 0 12px 24px rgba(118,184,42,.22); }
.sb a.sb-btn:hover { background: var(--sb-accent-dark); color: #fff; }
.sb a.sb-btn-outline { border: 1px solid var(--sb-accent); color: var(--sb-accent-dark); background: #fff; }
.sb a.sb-btn-outline:hover { background: var(--sb-surface-alt); }
.sb-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }

/* Секції */
.sb-section { padding: 28px 0 56px; }
.sb-section-tight { padding-bottom: 0; }
.sb-section-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; margin-bottom: 26px; flex-wrap: wrap; }
.sb-section-head h2 { margin-bottom: 0; }
.sb-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.sb a.sb-chip {
  padding: 10px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--sb-line);
  color: #4e5846;
  font-weight: 600;
  font-size: 15px;
}
.sb a.sb-chip:hover { border-color: rgba(118,184,42,.5); color: var(--sb-accent-dark); }
.sb a.sb-chip.is-active { background: var(--sb-surface-alt); color: var(--sb-accent-dark); border-color: rgba(118,184,42,.35); }

/* Картки статей */
.sb-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.sb-card {
  display: flex;
  flex-direction: column;
  background: var(--sb-surface);
  border-radius: var(--sb-radius);
  overflow: hidden;
  box-shadow: var(--sb-shadow);
  border: 1px solid rgba(118,184,42,.10);
  transition: transform .2s ease, box-shadow .2s ease;
}
.sb-card:hover { transform: translateY(-3px); box-shadow: 0 22px 52px rgba(43, 58, 28, 0.12); }
.sb-card-media { position: relative; display: block; aspect-ratio: 16 / 8.5; overflow: hidden; background: var(--sb-surface-alt); }
.sb-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.sb-card:hover .sb-card-media img { transform: scale(1.03); }
.sb-card-placeholder { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(118,184,42,.18), rgba(118,184,42,.05)); }
.sb-card-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: var(--sb-accent-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  box-shadow: 0 8px 22px rgba(36,48,31,.10);
}
.sb-card-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.sb-meta, .sb-article-meta { display: flex; gap: 8px 14px; flex-wrap: wrap; color: var(--sb-muted); font-size: 14px; }
.sb-meta span, .sb-article-meta span { display: inline-flex; align-items: center; gap: 8px; }
.sb-meta span::before, .sb-article-meta span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--sb-accent); flex: none; }
.sb-meta a:hover, .sb-article-meta a { color: var(--sb-accent-dark); }
.sb-article-meta a { font-weight: 600; }
.sb .sb-card-title { margin: 14px 0 12px; font-size: 22px; line-height: 1.25; }
.sb-card-title a:hover { color: var(--sb-accent-dark); }
.sb .sb-card-text { color: #51594a; }
.sb-card-footer { margin-top: auto; padding-top: 6px; }

.sb-empty { background: #fff; border-radius: var(--sb-radius); padding: 48px 24px; text-align: center; box-shadow: var(--sb-shadow); }

/* Пагінація */
.sb-pagination { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 36px; flex-wrap: wrap; }
.sb-page-dot {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--sb-line);
  background: #fff;
  font-weight: 700;
}
.sb a.sb-page-dot:hover { border-color: var(--sb-accent); color: var(--sb-accent-dark); }
.sb-page-dot.is-active { background: var(--sb-accent); border-color: var(--sb-accent); color: #fff; }
.sb-page-gap { color: var(--sb-muted); }

/* Стаття */
.sb-preview-bar { background: #fff4d6; color: #6b5310; padding: 12px 16px; text-align: center; font-size: 14px; }
.sb-preview-bar a { text-decoration: underline; margin-left: 8px; }
.sb-article-cover img { width: 100%; max-height: 380px; object-fit: cover; }
.sb-article-head h1 { margin-bottom: 18px; }
.sb-article-head .sb-lead { margin: 18px 0 0; }
.sb-verified { color: var(--sb-accent-dark); font-weight: 600; }

.sb-article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 30px; align-items: start; }
.sb-article-shell, .sb-sidebar-card, .sb-info-card, .sb-cta-box, .sb-author-box {
  background: var(--sb-surface);
  border-radius: var(--sb-radius);
  box-shadow: var(--sb-shadow);
  border: 1px solid rgba(118,184,42,.10);
}
.sb-article-shell { overflow: hidden; }
.sb-article-body { padding: 34px; }
.sb-sidebar { display: grid; gap: 18px; align-content: start; position: sticky; top: 100px; } /* під фіксованою шапкою сайту */
.sb-sidebar-card, .sb-info-card, .sb-cta-box, .sb-author-box { padding: 22px; }
.sb-sidebar h4 { margin-bottom: 14px; }

/* Текст статті */
.sb-content { font-size: 17px; line-height: 1.75; overflow-wrap: break-word; }
.sb-content > *:first-child { margin-top: 0; }
.sb-content h2, .sb-content h3, .sb-content h4 { margin-top: 34px; scroll-margin-top: 90px; }
.sb-content h2 { font-size: clamp(24px, 2.6vw, 30px); }
.sb-content a { color: var(--sb-accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.sb-content a:hover { color: var(--sb-accent); }
.sb-content ul, .sb-content ol { margin: 0 0 18px; padding-left: 22px; }
.sb-content li { margin-bottom: 6px; }
.sb-content li > ul, .sb-content li > ol { margin: 6px 0 0; }
.sb-content ul { list-style: disc; }
.sb-content ol { list-style: decimal; }
.sb-content ul.sb-checklist { list-style: none; padding-left: 0; }
.sb-check { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--sb-accent); border-radius: 5px; margin-right: 10px; vertical-align: -3px; }
.sb-check.is-checked { background: var(--sb-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center/12px no-repeat; }
.sb-content blockquote {
  margin: 26px 0;
  padding: 20px 22px;
  border-left: 4px solid var(--sb-accent);
  background: var(--sb-surface-alt);
  color: #435039;
  border-radius: 14px;
  font-size: 17px !important; /* custom.css теми задає blockquote з !important */
  font-family: inherit;
  font-weight: 400;
  line-height: 1.7;
  text-align: left;
  font-style: italic;
}
/* у теми сайту свої лінії й лапки для цитат — у статтях вони не потрібні */
.sb-content blockquote::before, .sb-content blockquote::after,
.sb-content blockquote p::before, .sb-content blockquote p::after { content: none; display: none; }
.sb-content blockquote p:last-child { margin-bottom: 0; }
.sb-content blockquote cite { display: block; margin-top: 10px; font-style: normal; font-size: 14px; color: var(--sb-muted); }
.sb-content blockquote cite::before { content: "— "; }
.sb-table { overflow-x: auto; margin: 24px 0; border-radius: 14px; border: 1px solid var(--sb-line); }
.sb-content table { width: 100%; border-collapse: collapse; margin: 0; font-size: 15px; }
.sb-content th, .sb-content td { border-bottom: 1px solid var(--sb-line); border-right: 1px solid var(--sb-line); padding: 12px 14px; text-align: left; vertical-align: top; }
.sb-content tr > *:last-child { border-right: 0; }
.sb-content tbody tr:last-child > * { border-bottom: 0; }
.sb-content th { background: var(--sb-surface-alt); font-weight: 700; }
.sb-figure { margin: 26px 0; }
.sb-figure img { border-radius: 16px; margin: 0 auto; }
.sb-figure.is-bordered img { border: 1px solid var(--sb-line); }
.sb-figure.is-background { background: var(--sb-surface-alt); padding: 18px; border-radius: 18px; }
.sb-figure.is-background img { max-width: 70%; }
.sb-figure.is-stretched img { width: 100%; }
.sb-figure figcaption, .sb-embed figcaption { margin-top: 10px; font-size: 14px; color: var(--sb-muted); text-align: center; }
.sb-embed { margin: 26px 0; }
.sb-embed-frame { position: relative; padding-top: 56.25%; border-radius: 16px; overflow: hidden; background: #000; }
.sb-embed-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sb-delimiter { border: 0; height: auto; margin: 32px 0; text-align: center; }
.sb-delimiter::before { content: "• • •"; letter-spacing: .6em; color: var(--sb-accent); font-size: 18px; }
.sb-mark { background: rgba(118,184,42,.22); padding: 0 3px; border-radius: 3px; color: inherit; }
.sb-code { background: #f1f3ee; padding: 2px 6px; border-radius: 4px; font-size: .9em; }
.sb-note {
  margin: 26px 0;
  padding: 18px 20px 18px 56px;
  border-radius: 16px;
  background: #fff8e6;
  border: 1px solid #f3dfa6;
  position: relative;
}
.sb-note::before {
  content: "!";
  position: absolute;
  left: 18px;
  top: 18px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f0b429;
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  font-size: 15px;
}
.sb-note-title { font-weight: 700; color: #6b5310; margin-bottom: 4px; }
.sb-note p { margin: 0; }
.sb-content a.sb-service-card {
  display: grid;
  gap: 4px;
  margin: 26px 0;
  padding: 20px 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(118,184,42,.12), #fff);
  border: 1px solid rgba(118,184,42,.25);
  text-decoration: none;
  color: var(--sb-text);
}
.sb-content a.sb-service-card:hover { border-color: var(--sb-accent); color: var(--sb-text); }
.sb-service-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--sb-accent-dark); }
.sb-service-title { font-size: 20px; font-weight: 600; color: var(--sb-heading); }
.sb-service-text { color: #51594a; font-size: 15px; }
.sb-service-more { color: var(--sb-accent-dark); font-weight: 700; font-size: 15px; }
.sb-service-more::after { content: " →"; }

.sb-subhead { margin-top: 34px; }
.sb-service-tags, .sb-author-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.sb-service-tags a, .sb-author-tags span {
  padding: 8px 14px;
  background: var(--sb-surface-alt);
  border-radius: 999px;
  color: #415036;
  font-size: 14px;
  line-height: 1.4;
  border: 1px solid rgba(118,184,42,.18);
}
.sb-content .sb-service-tags a { text-decoration: none; color: #415036; }
.sb-content .sb-service-tags a:hover { border-color: var(--sb-accent); color: var(--sb-accent-dark); }
.sb-content ol.sb-sources { font-size: 15px; color: #51594a; }

/* Блок автора */
.sb-author-box { display: grid; grid-template-columns: 120px 1fr; gap: 22px; margin-top: 34px; font-size: 16px; line-height: 1.6; }
.sb-author-box h3 { margin-bottom: 4px; }
.sb-author-box h3 a { color: var(--sb-heading); text-decoration: none; }
.sb-author-box h3 a:hover { color: var(--sb-accent-dark); }
.sb-author-box .sb-eyebrow { margin-bottom: 10px; }
.sb .sb-author-position { color: var(--sb-accent-dark); font-weight: 600; margin-bottom: 10px; }
.sb-avatar { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; }
/* Якщо фото немає — ініціали в колі, щоб сітка блоку автора не ламалась */
.sb-avatar-initials {
  display: grid;
  place-items: center;
  flex: none;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sb-accent), var(--sb-accent-dark));
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: .02em;
}
.sb-avatar.sb-avatar-initials { width: 120px; height: 120px; font-size: 38px; box-shadow: 0 12px 28px rgba(118,184,42,.25); }
.sb-author-more { margin-top: 16px; }
.sb-author-more summary { cursor: pointer; font-weight: 700; color: var(--sb-accent-dark); }
.sb-author-more h5 { margin: 14px 0 8px; }
.sb-content ul.sb-check-list, .sb-check-list { list-style: none; padding: 0; display: grid; gap: 8px; margin: 0; }
.sb-check-list li { position: relative; padding-left: 26px; margin: 0; }
.sb-check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--sb-accent);
  box-shadow: 0 0 0 4px rgba(118,184,42,.15);
}
.sb-reviewer { display: flex; gap: 14px; align-items: center; margin-top: 18px; padding: 16px 18px; border-radius: 16px; background: var(--sb-surface-alt); font-size: 15px; line-height: 1.5; }
.sb-reviewer img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; flex: none; }

/* Сайдбар */
.sb-toc { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.sb-toc a { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--sb-line); color: #435039; font-size: 15px; line-height: 1.4; }
.sb-toc li:last-child a { border-bottom: 0; padding-bottom: 0; }
.sb-toc a:hover, .sb-toc a.is-active { color: var(--sb-accent-dark); }
.sb-toc strong { color: var(--sb-accent); }
.sb-facts { margin: 0 0 14px; display: grid; gap: 10px; font-size: 15px; }
.sb-facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--sb-muted); font-weight: 600; }
.sb-facts dd { margin: -6px 0 0; font-weight: 600; }
.sb-facts dd a { color: var(--sb-accent-dark); }
.sb-facts dd small { display: block; font-weight: 400; color: var(--sb-muted); font-size: 13px; }
.sb-info-card .sb-muted { margin: 0; font-size: 13px; }
.sb-cta-box { position: relative; overflow: hidden; background: linear-gradient(150deg, #f1f7e8 0%, #fff 70%); border-color: rgba(118,184,42,.22); }
.sb-cta-box::after { content: ""; position: absolute; right: -40px; top: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(118,184,42,.10); pointer-events: none; }
.sb-cta-icon { position: relative; z-index: 1; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--sb-accent); color: #fff; box-shadow: 0 10px 22px rgba(118,184,42,.28); margin-bottom: 14px; }
.sb-cta-copy { position: relative; z-index: 1; }
.sb-cta-box h4 { margin-bottom: 6px; font-size: 18px; }
.sb .sb-cta-box p { color: #4d5545; margin-bottom: 0; font-size: 15px; line-height: 1.55; }
.sb-cta-actions { position: relative; z-index: 1; display: grid; gap: 10px; margin-top: 18px; }
.sb a.sb-cta-phone {
  display: grid;
  gap: 2px;
  padding: 12px 18px;
  border-radius: 16px;
  background: var(--sb-accent);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(118,184,42,.25);
  transition: background .2s ease, transform .2s ease;
}
.sb a.sb-cta-phone:hover { background: var(--sb-accent-dark); color: #fff; transform: translateY(-1px); }
.sb-cta-phone-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; opacity: .85; font-weight: 600; }
.sb-cta-phone-number { font-size: 19px; font-weight: 700; white-space: nowrap; letter-spacing: .01em; }
.sb a.sb-cta-link { font-size: 14px; font-weight: 600; color: var(--sb-accent-dark); text-decoration: none; justify-self: start; }
.sb a.sb-cta-link::after { content: " →"; }
.sb a.sb-cta-link:hover { color: var(--sb-accent); }
.sb-content .sb-cta-box { margin: 30px 0; }
/* Варіант усередині статті: іконка | текст | телефон — в один компактний рядок */
.sb-cta-box.is-inline { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 22px 24px; }
.sb-cta-box.is-inline .sb-cta-icon { margin-bottom: 0; }
.sb-cta-box.is-inline .sb-cta-actions { margin-top: 0; justify-items: center; }
.sb-cta-box.is-inline a.sb-cta-link { justify-self: center; }
.sb-section-related { padding-top: 8px; }

/* Адаптивність */
@media (max-width: 1100px) {
  .sb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sb-article-layout, .sb-hero-grid { grid-template-columns: 1fr; }
  .sb-sidebar { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sb-sidebar .sb-cta-box { grid-column: 1 / -1; }
  .sb-hero-image { order: -1; }
  .sb-hero-image img { max-height: 320px; }
  .sb-cta-box.is-inline { grid-template-columns: auto minmax(0, 1fr); }
  .sb-cta-box.is-inline .sb-cta-actions { grid-column: 1 / -1; justify-items: start; }
  .sb-cta-box.is-inline a.sb-cta-link { justify-self: start; }
}

@media (max-width: 720px) {
  .sb-hero-copy, .sb-article-head, .sb-article-body, .sb-sidebar-card, .sb-info-card, .sb-cta-box, .sb-author-box { padding: 20px; }
  .sb-hero-card, .sb-page-hero-card { border-radius: 24px; }
  .sb-grid, .sb-sidebar { grid-template-columns: 1fr; }
  .sb-author-box { grid-template-columns: 1fr; }
  .sb-avatar, .sb-avatar.sb-avatar-initials { width: 88px; height: 88px; font-size: 28px; }
  .sb-content { font-size: 16px; }
  .sb-lead { font-size: 16px; }
  .sb-section { padding: 20px 0 40px; }
  .sb-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .sb a.sb-chip { white-space: nowrap; }
  .sb-cta-box.is-inline { grid-template-columns: 1fr; }
  .sb-cta-box.is-inline .sb-cta-actions { justify-items: stretch; }
  .sb-page-dot { width: 42px; height: 42px; }
}
