/* ==========================================================================
   1. DESIGN TOKENS
   ========================================================================== */
:root {
  --primary: #1E3A8A;
  --primary-dark: #16296b;
  --accent: #3B82F6;
  --background: #F8FAFC;
  --surface: #FFFFFF;
  --text: #111827;
  --text-secondary: #6B7280;

  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.4);

  --font-display: "Cormorant Garamond", "Georgia", serif;
  --font-body: "Manrope", -apple-system, sans-serif;

  --radius-lg: 32px;
  --radius-md: 24px;
  --radius-sm: 14px;

  --shadow-soft: 0 20px 60px -20px rgba(17, 24, 39, 0.18);
  --shadow-card: 0 12px 32px -12px rgba(30, 58, 138, 0.14);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --container-w: 1180px;
}

/* ==========================================================================
   2. RESET
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; border: none; background: none; cursor: pointer; }

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   3. TYPOGRAPHY HELPERS
   ========================================================================== */
.eyebrow {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.2;
  color: var(--text);
  max-width: 720px;
  margin-bottom: 56px;
}
.section-title--left { margin-left: 0; margin-bottom: 24px; }

section .container > .eyebrow,
section .container > .section-title { text-align: left; }

.advantages .eyebrow,
.advantages .section-title,
.reviews .eyebrow,
.reviews .section-title {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   4. BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 32px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  transition: transform 0.35s var(--ease), filter 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease);
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #fff;
  box-shadow: 0 14px 30px -10px rgba(59, 130, 246, 0.55);
}
.btn--primary:hover { filter: brightness(1.08); transform: translateY(-2px); }
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  background: var(--glass-bg);
  color: var(--primary);
  border: 1px solid rgba(30, 58, 138, 0.18);
  backdrop-filter: blur(12px);
}
.btn--ghost:hover { background: #fff; transform: translateY(-2px); }

.btn--sm { padding: 11px 22px; font-size: 14px; }
.btn--lg { padding: 19px 40px; font-size: 16px; margin-bottom: 40px; }

/* ==========================================================================
   5. NAVBAR
   ========================================================================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 22px 0;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), padding 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
}
.navbar.is-scrolled {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 30px -12px rgba(17, 24, 39, 0.12);
  padding: 14px 0;
}

.navbar__inner { display: flex; align-items: center; justify-content: space-between; }

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 11px;
}
.navbar__monogram {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 18px -6px rgba(30, 58, 138, 0.5);
  flex-shrink: 0;
}
.navbar__logo-text {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  color: var(--primary);
  letter-spacing: 0.01em;
}

.navbar__nav { display: flex; align-items: center; gap: 36px; }
.navbar__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  position: relative;
  padding-bottom: 4px;
}
.navbar__link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.navbar__link:hover::after { width: 100%; }
.navbar__link.is-active { color: var(--primary); }
.navbar__link.is-active::after { width: 100%; }

.navbar__cta { margin-left: 4px; }

.navbar__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 26px;
  z-index: 600;
}
.navbar__burger span {
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.35s var(--ease), opacity 0.35s var(--ease);
}
.navbar__burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__burger.is-open span:nth-child(2) { opacity: 0; }
.navbar__burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(248, 250, 252, 0.98);
  backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  z-index: 400;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), visibility 0.4s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-menu__link { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--text); }
.mobile-menu__cta { margin-top: 12px; }

/* ==========================================================================
   6. HERO
   ========================================================================== */
.hero {
  position: relative;
  padding: 168px 0 110px;
  overflow: hidden;
}

.hero__bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero__shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
}
.hero__shape--one {
  width: 620px; height: 620px;
  top: -220px; right: -160px;
  background: radial-gradient(circle at 30% 30%, rgba(59, 130, 246, 0.35), transparent 70%);
}
.hero__shape--two {
  width: 480px; height: 480px;
  bottom: -260px; left: -140px;
  background: radial-gradient(circle at 60% 60%, rgba(30, 58, 138, 0.16), transparent 70%);
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 48px;
}

.hero__content { max-width: 560px; }

[data-hero-el] {
  opacity: 0;
  transform: translateY(22px);
  animation: heroReveal 0.9s var(--ease) forwards;
}
.hero__content [data-hero-el]:nth-child(1) { animation-delay: 0.15s; }
.hero__content [data-hero-el]:nth-child(2) { animation-delay: 0.3s; }
.hero__content [data-hero-el]:nth-child(3) { animation-delay: 0.45s; }
.hero__content [data-hero-el]:nth-child(4) { animation-delay: 0.58s; }
.hero__content [data-hero-el]:nth-child(5) { animation-delay: 0.7s; }
.hero__content [data-hero-el]:nth-child(6) { animation-delay: 0.82s; }
.hero__media[data-hero-el] { animation-delay: 0.1s; }

@keyframes heroReveal {
  to { opacity: 1; transform: translateY(0); }
}

.hero__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(38px, 5.4vw, 62px);
  line-height: 1.08;
  color: var(--text);
  margin-bottom: 22px;
}

.hero__specialties {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 20px;
}
.hero__specialties li {
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}

.hero__experience {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 22px;
}
.hero__experience span {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--primary);
  margin-right: 6px;
}

.hero__text {
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 460px;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; }

.hero__media { position: relative; }
.hero__photo-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow-soft);
  z-index: 1;
}
.hero__photo {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}
.hero__photo-frame:hover .hero__photo { transform: scale(1.04); }

.hero__glow {
  position: absolute;
  width: 70%; height: 70%;
  top: 12%; right: -12%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.35), transparent 70%);
  filter: blur(50px);
  z-index: 0;
}

/* ==========================================================================
   6b. PAGE HEADER (standalone pages, e.g. articles.html)
   ========================================================================== */
.page-header { padding: 168px 0 60px; }
.page-header__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 28px;
  transition: color 0.3s var(--ease);
}
.page-header__back:hover { color: var(--accent); }
.page-header__text {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 560px;
}

/* ==========================================================================
   7. ADVANTAGES
   ========================================================================== */
.advantages { padding: 120px 0; }

.advantages__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.adv-card {
  padding: 36px 28px;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-card);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.adv-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 24px 50px -18px rgba(30, 58, 138, 0.22);
}

.adv-card__title {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  margin-top: 4px;
  margin-bottom: 12px;
  color: var(--text);
}
.adv-card__text {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ==========================================================================
   7b. ARTICLES (задел на будущее)
   ========================================================================== */
.articles { padding: 0 0 130px; }
.articles .eyebrow,
.articles .section-title {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.articles__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.articles__empty {
  grid-column: 1 / -1;
  padding: 64px 32px;
  text-align: center;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  border: 1px dashed rgba(30, 58, 138, 0.25);
}
.articles__empty p {
  max-width: 480px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Future article card — ready to use once real articles are added:
.article-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(30, 58, 138, 0.08);
  box-shadow: var(--shadow-card);
}
.article-card__image { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.article-card__body { padding: 22px 24px; }
.article-card__title { font-family: var(--font-display); font-size: 19px; font-weight: 600; margin-bottom: 8px; }
.article-card__excerpt { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }
*/

/* ==========================================================================
   8. APPROACH
   ========================================================================== */
.approach { padding: 40px 0 130px; }

.approach__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.approach__photo-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3.1;
  box-shadow: var(--shadow-soft);
}
.approach__photo {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}
.approach__photo-frame:hover .approach__photo { transform: scale(1.04); }

.approach__text {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 480px;
}

.approach__quote {
  position: relative;
  padding: 26px 28px 26px 32px;
  border-left: 2px solid var(--accent);
  margin-bottom: 34px;
}
.approach__quote-mark {
  font-family: var(--font-display);
  font-size: 54px;
  line-height: 0;
  color: var(--accent);
  position: absolute;
  left: -6px;
  top: 34px;
  opacity: 0.35;
}
.approach__quote p {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.4;
}

.approach__points { display: flex; flex-direction: column; gap: 14px; }
.approach__point {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
  color: var(--text);
}
.approach__point-line {
  width: 28px; height: 1.5px;
  background: var(--accent);
  flex-shrink: 0;
}

/* ==========================================================================
   9. REVIEWS
   ========================================================================== */
.reviews { padding: 0 0 130px; }
.reviews .container { margin-bottom: 56px; }

.reviews__viewport {
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.reviews__track {
  display: flex;
  gap: 22px;
  width: max-content;
  padding: 4px 0;
  will-change: transform;
}

.review-card {
  flex: 0 0 auto;
  width: 340px;
  padding: 32px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid rgba(30, 58, 138, 0.08);
  box-shadow: var(--shadow-card);
}
.review-card__stars { color: var(--accent); letter-spacing: 2px; margin-bottom: 16px; font-size: 15px; }
.review-card__text {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.review-card__name {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--primary);
}
.review-card__avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.14);
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.review-card--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-bg);
  border: 1px dashed rgba(30, 58, 138, 0.25);
  box-shadow: none;
}
.review-card__placeholder {
  font-size: 13.5px;
  color: var(--text-secondary);
  text-align: center;
}

/* ==========================================================================
   10. FINAL CTA
   ========================================================================== */
.final-cta { padding: 40px 0 140px; }

.final-cta__grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 72px;
  align-items: center;
}

.doctor-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  box-shadow: var(--shadow-soft);
}
.doctor-card__photo {
  width: 100%; height: 100%;
  object-fit: cover;
}
.doctor-card__badge {
  position: absolute;
  left: 20px; right: 20px; bottom: 20px;
  padding: 24px;
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.doctor-card__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 21px;
  color: var(--text);
  margin-bottom: 10px;
}
.doctor-card__specialties { display: flex; flex-direction: column; gap: 3px; margin-bottom: 10px; }
.doctor-card__specialties li { font-size: 13px; color: var(--text-secondary); }
.doctor-card__exp {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.14);
}

.contacts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 32px;
  padding-top: 32px;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
}
.contacts__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.contacts__address {
  display: block;
  font-size: 16px;
  color: var(--text);
  line-height: 1.65;
}

.contacts__phone {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: clamp(20px, 5.5vw, 26px);
  font-weight: 700;
  color: var(--primary);
  transition: color 0.3s var(--ease), transform 0.3s var(--ease);
}
.contacts__phone:hover { color: var(--accent); transform: translateX(2px); }
.contacts__phone-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #fff;
  flex-shrink: 0;
}
.contacts__phone-icon svg { width: 19px; height: 19px; }

.map-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 300px;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(17, 24, 39, 0.06);
}

/* ==========================================================================
   11. FOOTER
   ========================================================================== */
.footer {
  padding: 48px 0;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
}
.footer__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
}
.footer__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
}
.footer__spec { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.footer__contacts, .footer__meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-secondary);
}
.footer__phone {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  color: var(--primary);
}
.footer__phone:hover { color: var(--accent); }
.footer__address {
  font-size: 15px;
  color: var(--text);
}
.footer__meta { align-items: flex-end; text-align: right; }
.footer__meta a:hover { color: var(--accent); }

/* ==========================================================================
   12. FLOATING CTA
   ========================================================================== */
.floating-cta {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 450;
  display: inline-flex;
  align-items: center;
  padding: 15px 26px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: 0 16px 34px -10px rgba(30, 58, 138, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.94);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease), visibility 0.4s, filter 0.3s var(--ease);
}
.floating-cta.is-visible { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.floating-cta:hover { filter: brightness(1.08); }

/* ==========================================================================
   13. AOS OVERRIDES
   ========================================================================== */
[data-aos] { transition-timing-function: var(--ease) !important; }

/* ==========================================================================
   14. RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
  .advantages__grid { grid-template-columns: repeat(2, 1fr); }
  .final-cta__grid { grid-template-columns: 1fr; gap: 48px; }
  .approach__grid { gap: 42px; }
}

@media (max-width: 860px) {
  .navbar__nav { display: none; }
  .navbar__burger { display: flex; }

  .hero { padding: 128px 0 72px; }
  .hero__grid { grid-template-columns: 1fr; gap: 40px; }
  .hero__media { order: -1; max-width: 380px; margin: 0 auto; }
  .hero__content { max-width: none; text-align: left; }
  .hero__text { max-width: none; }

  .approach__grid { grid-template-columns: 1fr; }
  .approach__media { order: -1; }

  .contacts { grid-template-columns: 1fr; }

  .footer__grid { flex-direction: column; }
  .footer__meta { align-items: flex-start; text-align: left; }
}

@media (max-width: 640px) {
  .advantages__grid { grid-template-columns: 1fr; }
  .advantages { padding: 88px 0; }
  .approach { padding: 20px 0 88px; }
  .final-cta { padding: 20px 0 100px; }

  .section-title { font-size: clamp(26px, 7vw, 34px); margin-bottom: 40px; }

  .btn { width: 100%; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; }

  .review-card { width: 84vw; }

  .floating-cta { right: 16px; bottom: 16px; padding: 13px 20px; font-size: 13.5px; }

  .doctor-card__badge { left: 12px; right: 12px; bottom: 12px; padding: 18px; }
}
