/* ============================================================================
   Календарь беременности — полный редизайн «нежный editorial»
   Сигнатура: путь 40 недель (кольцо-прогресс + лента недель), акцент теплеет
   по триместрам. Mobile-first. Самодостаточно, не зависит от старого грида.
   Всё под .smc-page, чтобы не конфликтовать со style.css/main.css.
   ============================================================================ */

.smc-page {
  /* нейтральная база */
  --ink: #2c2a4a;
  --muted: #726e90;
  --line: #ece7f7;
  --card: #ffffff;
  --bg: #fbf7ff;
  --purple: #514b7e;

  /* акцент по триместру (переопределяется на [data-tri]) */
  --accent: #a98cff;
  --accent-2: #c4b3ff;
  --accent-soft: #f2ecff;
  --hero-a: #efe9ff;
  --hero-b: #fdf0f7;

  --radius: 20px;
  --radius-lg: 28px;
  --shadow: 0 22px 50px -28px rgba(60, 50, 110, .45);
  --shadow-sm: 0 10px 26px -18px rgba(60, 50, 110, .5);
  --maxw: 1080px;
  --read: 720px;

  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Roboto', system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.smc-page * { box-sizing: border-box; }

/* цветовая температура по триместрам */
.smc-page[data-tri="1"] { --accent:#a98cff; --accent-2:#c4b3ff; --accent-soft:#f2ecff; --hero-a:#efe9ff; --hero-b:#f7f0ff; }
.smc-page[data-tri="2"] { --accent:#ff8fb1; --accent-2:#ffb1c9; --accent-soft:#ffeaf1; --hero-a:#f4ecff; --hero-b:#fff0f5; }
.smc-page[data-tri="3"] { --accent:#ff9f7e; --accent-2:#ffc0a6; --accent-soft:#ffeee5; --hero-a:#fdeef0; --hero-b:#fff2ea; }

.smc-h { font-family: 'Manrope', 'Roboto', system-ui, sans-serif; }

/* ---- ВЕРХНЯЯ НАВИГАЦИЯ -------------------------------------------------- */
.smc-topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86); backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.smc-topbar-in { max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; gap: 16px; padding: 12px 20px; }
.smc-brand { display: flex; align-items: center; flex: 0 0 auto; }
.smc-brand img { height: 40px; width: auto; display: block; }
.smc-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1 1 auto; -webkit-overflow-scrolling: touch; }
.smc-nav::-webkit-scrollbar { display: none; }
.smc-nav a {
  font-family: 'Manrope', sans-serif; font-weight: 600; font-size: 14px; white-space: nowrap;
  color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 999px; transition: .15s;
}
.smc-nav a:hover { color: var(--purple); background: var(--accent-soft); }
.smc-nav a[aria-current] { color: var(--purple); background: var(--accent-soft); }
.smc-cta-pill {
  flex: 0 0 auto; font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 14px;
  color: #fff; text-decoration: none; padding: 10px 18px; border-radius: 999px; white-space: nowrap;
  background: linear-gradient(135deg, var(--purple), var(--accent)); box-shadow: var(--shadow-sm);
}
.smc-cta-pill:hover { color: #fff; filter: brightness(1.05); }

/* ---- ОБОЛОЧКА ----------------------------------------------------------- */
.smc-shell { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.smc-crumbs { font-size: 13px; color: var(--muted); padding: 18px 0 0; display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.smc-crumbs a { color: var(--accent); text-decoration: none; font-weight: 600; }
.smc-crumbs a:hover { text-decoration: underline; }
.smc-crumbs .sep { opacity: .4; }

/* ---- HERO --------------------------------------------------------------- */
.smc-hero { position: relative; overflow: hidden; border-radius: var(--radius-lg); margin: 16px 0 0;
  padding: 34px 40px; background: linear-gradient(135deg, var(--hero-a), var(--hero-b)); border: 1px solid #fff; }
.smc-hero-grid { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; }
.smc-eyebrow { display: inline-block; font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 12px;
  letter-spacing: .8px; text-transform: uppercase; color: var(--purple); background: rgba(255,255,255,.7);
  padding: 6px 13px; border-radius: 999px; margin-bottom: 14px; }
.smc-hero h1 { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: clamp(30px, 5vw, 48px);
  line-height: 1.04; letter-spacing: -1px; margin: 0 0 10px; color: var(--ink); }
.smc-hero .smc-lead { font-size: clamp(16px, 2.2vw, 20px); color: #58527a; font-weight: 500; margin: 0; max-width: 30ch; }

/* кольцо-прогресс беременности — сигнатура */
.smc-arc { --p: 0; position: relative; width: 132px; height: 132px; border-radius: 50%; flex: 0 0 auto;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), #eadffb 0);
  display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.smc-arc::before { content: ""; position: absolute; inset: 11px; background: #fff; border-radius: 50%; }
.smc-arc-num { position: relative; text-align: center; font-family: 'Manrope', sans-serif; line-height: 1; }
.smc-arc-num b { display: block; font-size: 40px; font-weight: 800; color: var(--purple); }
.smc-arc-num span { font-size: 12px; color: var(--muted); font-weight: 600; }
.smc-hero-emoji { position: absolute; right: 26px; bottom: 18px; font-size: 46px; opacity: .9;
  filter: drop-shadow(0 10px 14px rgba(60,50,110,.18)); }

/* ---- ЛЕНТА НЕДЕЛЬ (сигнатурная навигация) ------------------------------ */
.smc-ribbon-wrap { position: sticky; top: 64px; z-index: 40; background: var(--bg); padding: 12px 0 4px; }
.smc-ribbon { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 8px;
  -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.smc-ribbon::-webkit-scrollbar { display: none; }
.smc-ribbon a { scroll-snap-align: center; flex: 0 0 auto; min-width: 52px; text-align: center; text-decoration: none;
  font-family: 'Manrope', sans-serif; padding: 8px 6px; border-radius: 14px; background: #fff; border: 1px solid var(--line);
  color: var(--muted); transition: .15s; box-shadow: var(--shadow-sm); }
.smc-ribbon a small { display: block; font-size: 10px; opacity: .8; }
.smc-ribbon a b { font-size: 18px; font-weight: 700; color: var(--ink); }
.smc-ribbon a:hover { border-color: var(--accent); transform: translateY(-2px); }
.smc-ribbon a.is-now { background: linear-gradient(135deg, var(--purple), var(--accent)); border-color: transparent; }
.smc-ribbon a.is-now b, .smc-ribbon a.is-now small { color: #fff; }

/* ---- КОЛОНКА ЧТЕНИЯ ----------------------------------------------------- */
.smc-reading { max-width: var(--read); margin: 6px auto 0; }

.smc-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 18px 0 4px; }
.smc-chip { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 13px 15px; box-shadow: var(--shadow-sm); }
.smc-chip .k { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.smc-chip .v { font-family: 'Manrope', sans-serif; font-size: 18px; font-weight: 800; color: var(--purple); }
.smc-chip.is-accent { background: var(--accent-soft); border-color: transparent; }
.smc-note { font-size: 12.5px; color: #9a95ad; margin: 12px 0 0; }

.smc-tldr { margin: 24px 0; padding: 22px 24px; border-radius: var(--radius); background: var(--accent-soft);
  border: 1px solid #fff; position: relative; }
.smc-tldr h2 { font-family: 'Manrope', sans-serif; font-size: 13px; letter-spacing: .6px; text-transform: uppercase;
  color: var(--purple); margin: 0 0 12px; }
.smc-tldr ul { margin: 0; padding: 0; list-style: none; }
.smc-tldr li { position: relative; padding-left: 28px; margin: 9px 0; line-height: 1.5; color: #423e63; font-size: 15.5px; }
.smc-tldr li::before { content: "✶"; position: absolute; left: 4px; top: 0; color: var(--accent); font-weight: 700; }

.smc-review { display: flex; gap: 11px; align-items: flex-start; margin: 22px 0; padding: 14px 18px;
  background: #f4fbf5; border: 1px solid #d9f0db; border-radius: 14px; font-size: 13.5px; color: #3c6b41; }
.smc-review b { color: #2e5a33; }
.smc-disclaimer { font-size: 12.5px; color: #9a95ad; margin: 16px 0 0; line-height: 1.6; }

/* проза статьи */
.smc-prose { margin-top: 6px; }
.smc-prose > p:first-of-type { font-size: 18.5px; color: #38345a; }
.smc-prose h2 { font-family: 'Manrope', sans-serif; font-size: 25px; font-weight: 800; letter-spacing: -.4px;
  color: var(--ink); margin: 36px 0 12px; padding-top: 6px; }
.smc-prose h2::before { content: ""; display: block; width: 46px; height: 4px; border-radius: 4px;
  background: linear-gradient(90deg, var(--purple), var(--accent)); margin-bottom: 14px; }
.smc-prose h3 { font-family: 'Manrope', sans-serif; font-size: 19px; font-weight: 700; color: var(--ink); margin: 24px 0 8px; }
.smc-prose p { margin: 0 0 17px; color: #3d3960; }
.smc-prose ul { margin: 0 0 18px; padding: 0; list-style: none; }
.smc-prose ul li { position: relative; padding-left: 30px; margin: 11px 0; line-height: 1.6; color: #3d3960; }
.smc-prose ul li::before { content: "🌸"; position: absolute; left: 0; top: 1px; font-size: 14px; }
.smc-prose a { color: var(--accent); }

/* FAQ */
.smc-faq { margin-top: 40px; }
.smc-faq h2 { font-family: 'Manrope', sans-serif; font-size: 25px; font-weight: 800; color: var(--ink); margin: 0 0 16px; }
.smc-faq details { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 2px 20px;
  margin-bottom: 11px; box-shadow: var(--shadow-sm); }
.smc-faq summary { cursor: pointer; list-style: none; padding: 17px 0; font-family: 'Manrope', sans-serif; font-weight: 700;
  font-size: 16px; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.smc-faq summary::-webkit-details-marker { display: none; }
.smc-faq summary::after { content: "+"; font-size: 26px; font-weight: 400; color: var(--accent); transition: transform .2s; }
.smc-faq details[open] summary::after { transform: rotate(45deg); }
.smc-faq details > p { margin: 0 0 18px; color: #4a4668; font-size: 15.5px; line-height: 1.65; }

/* пагинация недель */
.smc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 34px 0 0; }
.smc-pager a { display: flex; align-items: center; gap: 13px; text-decoration: none; background: var(--card);
  border: 1px solid var(--line); border-radius: 18px; padding: 16px 20px; box-shadow: var(--shadow-sm); transition: .16s; }
.smc-pager a:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }
.smc-pager a.next { text-align: right; flex-direction: row-reverse; grid-column: 2; }
.smc-pager a.prev { grid-column: 1; }
.smc-pager .dir { font-size: 26px; color: var(--accent); line-height: 1; }
.smc-pager .k { font-size: 12px; color: var(--muted); }
.smc-pager .t { font-family: 'Manrope', sans-serif; font-weight: 700; color: var(--purple); }

/* ---- ИНДЕКС: триместры + сетка недель ---------------------------------- */
.smc-intro { max-width: var(--read); margin: 26px auto 0; }
.smc-intro p { color: #45416a; margin: 0 0 14px; }
.smc-tri { margin: 40px 0 0; }
.smc-tri-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.smc-tri-head h2 { font-family: 'Manrope', sans-serif; font-size: 26px; font-weight: 800; color: var(--ink); margin: 0; }
.smc-tri-head .range { font-family: 'Manrope', sans-serif; font-size: 13px; font-weight: 700; color: #fff;
  padding: 4px 12px; border-radius: 999px; }
.smc-tri-head .note { font-size: 14px; color: var(--muted); }
.smc-tri[data-tri="1"] { --accent:#a98cff; } .smc-tri[data-tri="1"] .range { background:#a98cff; }
.smc-tri[data-tri="2"] { --accent:#ff8fb1; } .smc-tri[data-tri="2"] .range { background:#ff8fb1; }
.smc-tri[data-tri="3"] { --accent:#ff9f7e; } .smc-tri[data-tri="3"] .range { background:#ff9f7e; }
.smc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 14px; }
.smc-wk { display: flex; flex-direction: column; gap: 7px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; text-decoration: none; color: inherit; box-shadow: var(--shadow-sm); transition: .16s; }
.smc-wk:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--accent); }
.smc-wk .top { display: flex; align-items: center; justify-content: space-between; }
.smc-wk .num { font-family: 'Manrope', sans-serif; font-size: 30px; font-weight: 800; color: var(--accent); line-height: 1; }
.smc-wk .num small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 3px; }
.smc-wk .emoji { font-size: 28px; }
.smc-wk .sub { font-size: 13.5px; line-height: 1.4; color: #46426a; }
.smc-wk .size { margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--muted); }
.smc-wk .size b { color: var(--purple); }

/* ---- БОЛЬШОЙ CTA + ФУТЕР ----------------------------------------------- */
.smc-cta-band { margin: 44px 0 0; border-radius: var(--radius-lg); padding: 34px 38px; color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--accent)); display: flex; align-items: center;
  justify-content: space-between; gap: 24px; flex-wrap: wrap; box-shadow: var(--shadow); }
.smc-cta-band h3 { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: 23px; margin: 0 0 7px; color: #fff; }
.smc-cta-band p { margin: 0; opacity: .92; font-size: 15px; max-width: 430px; }
.smc-badges { display: flex; gap: 12px; flex-wrap: wrap; }
.smc-badges img { height: 48px; }

.smc-footer { margin-top: 52px; border-top: 1px solid var(--line); background: #fff; }
.smc-footer-in { max-width: var(--maxw); margin: 0 auto; padding: 32px 20px; display: flex; flex-wrap: wrap;
  gap: 22px 40px; align-items: center; justify-content: space-between; }
.smc-footer img.smc-flogo { height: 42px; }
.smc-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.smc-footer nav a { color: var(--muted); text-decoration: none; font-size: 14px; }
.smc-footer nav a:hover { color: var(--purple); }
.smc-footer .smc-copy { width: 100%; font-size: 12.5px; color: #a8a3bd; border-top: 1px solid var(--line); padding-top: 16px; }

/* ---- адаптив ------------------------------------------------------------ */
@media (max-width: 760px) {
  .smc-page { font-size: 16px; }
  .smc-hero { padding: 26px 22px; border-radius: 22px; }
  .smc-hero-grid { grid-template-columns: 1fr; gap: 18px; }
  .smc-arc { width: 104px; height: 104px; }
  .smc-arc-num b { font-size: 32px; }
  .smc-hero-emoji { display: none; }
  .smc-ribbon-wrap { top: 60px; }
  .smc-chips { grid-template-columns: 1fr; }
  .smc-cta-band { padding: 26px 22px; }
  .smc-cta-pill { display: none; }
}

/* ---- доступность -------------------------------------------------------- */
.smc-page a:focus-visible, .smc-page summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) { .smc-page *, .smc-page *::before { transition: none !important; } }
