/* Блог врача-флеболога — базовые стили. Чистый медицинский стиль. */
:root {
  --bg: #f6f9fb;
  --surface: #ffffff;
  --ink: #16242e;
  --muted: #5a6b78;
  --line: #e3ebf1;
  --accent: #0e7c86;
  --accent-dark: #0a5b63;
  --accent-soft: #e6f3f4;
  --shadow: 0 1px 2px rgba(16, 42, 54, .04), 0 8px 24px rgba(16, 42, 54, .06);
  --radius: 14px;
  --maxw: 1120px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Шапка */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 20px;
  min-height: 66px;
}
.brand {
  font-weight: 700; font-size: 18px; color: var(--ink);
  letter-spacing: -.01em; white-space: nowrap;
}
.brand span { color: var(--accent); }
.nav { display: flex; align-items: center; gap: 22px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: var(--muted); font-size: 15px; font-weight: 500; }
.nav a:hover { color: var(--ink); }
.nav .btn { margin-left: 4px; }

.btn {
  display: inline-block;
  background: var(--accent); color: #fff;
  padding: 10px 18px; border-radius: 999px;
  font-size: 15px; font-weight: 600;
  transition: background .15s ease;
}
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost {
  background: transparent; color: var(--accent);
  border: 1px solid var(--accent);
}
.btn-ghost:hover { background: var(--accent-soft); color: var(--accent-dark); }

/* Заголовок раздела */
.section { padding: 56px 0; }
.section-head { max-width: 720px; margin-bottom: 32px; }
.section-head h2 { font-size: clamp(24px, 3.5vw, 32px); margin: 0 0 10px; letter-spacing: -.02em; }
.section-head p { color: var(--muted); margin: 0; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}

/* Сетка статей */
.posts {
  display: grid; gap: 24px;
  grid-template-columns: repeat(3, 1fr);
}
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--accent-soft); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.card h3 { font-size: 19px; line-height: 1.35; margin: 0; letter-spacing: -.01em; }
.card h3 a { color: var(--ink); }
.card h3 a:hover { color: var(--accent); }
.card p { color: var(--muted); font-size: 15px; margin: 0; flex: 1; }
.read-more {
  font-weight: 600; font-size: 15px; display: inline-flex; align-items: center; gap: 6px;
}
.read-more::after { content: "\2192"; transition: transform .15s ease; }
.card:hover .read-more::after, .read-more:hover::after { transform: translateX(3px); }

/* Обо мне */
#about { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.about-grid h2 { font-size: clamp(24px, 3.5vw, 32px); margin: 0 0 6px; letter-spacing: -.02em; }
.about-name { font-size: 20px; font-weight: 700; margin: 0 0 16px; color: var(--accent-dark); }
.about-grid p { color: var(--muted); margin: 0 0 16px; }
.about-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.about-photos img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }

/* Фото */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.gallery img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* Статья */
.article { padding: 40px 0 56px; }
.article-inner { max-width: 760px; margin: 0 auto; }
.breadcrumb { font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.article time { display: block; font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.article h1 { font-size: clamp(26px, 4vw, 38px); line-height: 1.2; letter-spacing: -.02em; margin: 0 0 24px; }
.article .lead {
  font-size: 20px; line-height: 1.55; color: var(--ink);
  margin: 0 0 24px; font-weight: 500;
}
.article-figure { margin: 0 0 28px; }
.article-figure img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.prose h2 { font-size: 25px; letter-spacing: -.01em; margin: 40px 0 14px; }
.prose h3 { font-size: 21px; margin: 32px 0 12px; }
.prose h4 { font-size: 18px; margin: 26px 0 10px; }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 4px; }
.prose li {
  list-style: none; position: relative; padding-left: 28px; margin-bottom: 10px;
}
.prose ul li::before {
  content: ""; position: absolute; left: 6px; top: 11px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.prose ol { counter-reset: item; }
.prose ol li { counter-increment: item; }
.prose ol li::before {
  content: counter(item); position: absolute; left: 0; top: 1px;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-dark);
  font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.prose .note {
  background: var(--accent-soft); border-left: 3px solid var(--accent);
  border-radius: 10px; padding: 16px 20px; margin: 0 0 20px; color: var(--accent-dark);
}
.author-box {
  margin-top: 40px; padding: 20px 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
}
.author-box .avatar {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  background: var(--accent); color: #fff; font-weight: 700; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.author-box .txt { font-size: 15px; color: var(--muted); }
.author-box .txt strong { display: block; color: var(--ink); font-size: 16px; }
.back-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 32px; font-weight: 600; }
.back-link::before { content: "\2190"; }

/* Подвал */
.site-footer { background: #0e2029; color: #b9cad3; padding: 40px 0 34px; margin-top: 20px; }
.site-footer .wrap { display: grid; gap: 18px; }
.footer-brand { color: #fff; font-weight: 700; font-size: 17px; }
.footer-note { font-size: 14px; line-height: 1.6; max-width: 780px; }
.footer-warn { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: #f2c94c; }
.site-footer a { color: #8fd6dd; }

/* Адаптив */
@media (max-width: 900px) {
  .posts { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .section { padding: 40px 0; }
  .posts { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .nav { gap: 14px; }
  .nav a:not(.btn) { display: none; }
  .brand { font-size: 16px; }
}
