/* ===== БАЗА ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --orange: #f97316;
  --purple: #8b5cf6;
  --lilac: #a78bfa;
  --green: #22c55e;
  --mint: #34d399;
  --cyan: #22d3ee;
  --text: #1a1a2e;
  --text-soft: #4b5563;
  --bg-soft: #f8f9fc;
  --border: #e5e7eb;
  --radius: 16px;
  --shadow: 0 4px 20px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 40px rgba(37,99,235,0.15);
}

body {
  font-family: 'Inter', 'Styrene A Web', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text); background: #fff; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== КНОПКИ ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: 999px; font-size: 14px; font-weight: 600;
  border: none; cursor: pointer; transition: all .2s ease; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-lg { padding: 14px 28px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-download { background: var(--blue); color: #fff; }
.btn-download:hover { background: var(--blue-dark); }
.btn-outline { background: #fff; color: var(--blue); border: 1.5px solid var(--blue); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-orange { background: var(--orange); color: #fff; }
.btn-purple { background: var(--purple); color: #fff; }
.btn-lilac { background: var(--lilac); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-mint { background: var(--mint); color: #fff; }
.btn-cyan { background: var(--cyan); color: #fff; }
.btn-white-blue { background: #fff; color: var(--blue); }

/* ===== ВЕРХНЯЯ ПОЛОСА ===== */
.topbar { background: linear-gradient(90deg, #eef0ff 0%, #f5e9ff 100%); padding: 10px 0; font-size: 14px; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.topbar__contacts { display: flex; align-items: baseline; gap: 12px; }
.topbar__tel { font-size: 18px; font-weight: 700; }
.topbar__note { font-size: 12px; color: var(--text-soft); }
.topbar__actions { display: flex; gap: 12px; align-items: center; }

/* ===== STICKY ШАПКА ===== */
.header {
  background: #fff; padding: 16px 0; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100; transition: box-shadow .3s, padding .3s;
}
.header.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,.08); padding: 10px 0; }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.header__logo img { height: 48px; transition: height .3s; }
.header.scrolled .header__logo img { height: 40px; }
.header__menu { display: flex; gap: 28px; font-weight: 600; font-size: 15px; }
.header__menu a:hover { color: var(--blue); }
.header__cta { padding: 9px 18px; font-size: 13px; }

/* ===== КОНСУЛЬТАЦИЯ ЭНДОКРИНОЛОГА ===== */
.consult-cta { background: linear-gradient(135deg, #eef4ff 0%, #f3eaff 100%); padding: 56px 0; }
.consult-cta__inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.consult-cta__badge {
  display: inline-block; background: var(--blue); color: #fff;
  font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; padding: 6px 14px; border-radius: 999px; margin-bottom: 16px;
}
.consult-cta__text h2 { font-size: 40px; font-weight: 800; line-height: 1.15; margin-bottom: 16px; }
.consult-cta__text p { font-size: 17px; color: var(--text-soft); margin-bottom: 20px; }
.consult-cta__list { margin-bottom: 28px; }
.consult-cta__list li { position: relative; padding-left: 28px; margin-bottom: 10px; font-size: 16px; }
.consult-cta__list li::before {
  content: ''; position: absolute; left: 0; top: 6px;
  width: 18px; height: 18px; background: var(--blue); border-radius: 50%;
  background-image: 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%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 12px; background-position: center; background-repeat: no-repeat;
}
.consult-cta__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.consult-cta__form { background: #fff; border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-lg); }
.consult-cta__form h3 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.consult-cta__form-sub { font-size: 14px; color: var(--text-soft); margin-bottom: 20px; }
.consult-cta__form form { display: flex; flex-direction: column; gap: 12px; }
.consult-cta__form input[type="text"],
.consult-cta__form input[type="tel"],
.consult-cta__form textarea {
  width: 100%; padding: 13px 16px; border: 1.5px solid var(--border);
  border-radius: 12px; font-size: 15px; font-family: inherit; transition: border-color .2s;
}
.consult-cta__form input:focus, .consult-cta__form textarea:focus { outline: none; border-color: var(--blue); }
.consult-cta__form textarea { resize: vertical; }
.consult-cta__check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-soft); cursor: pointer; }
.consult-cta__check input { margin-top: 3px; }

/* ===== ГЕРОЙ ===== */
.hero { background: linear-gradient(135deg, #dfe4fb 0%, #f0e6fb 100%); padding: 60px 0 0; overflow: hidden; }
.hero__inner { display: grid; grid-template-columns: 1.1fr 1fr; align-items: end; gap: 40px; }
.hero__text { padding-bottom: 80px; }
.hero__text h1 { font-size: 48px; font-weight: 800; line-height: 1.1; margin-bottom: 20px; }
.hero__sub { font-size: 20px; color: var(--blue); font-weight: 500; max-width: 560px; }
.hero__img { max-height: 520px; object-fit: contain; }

/* ===== НАПРАВЛЕНИЯ ===== */
.directions { padding: 60px 0; }
.directions__top { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }
.tabs { display: flex; gap: 8px; }
.tab { background: none; border: none; padding: 10px 4px; font-size: 17px; font-weight: 600; color: var(--text-soft); cursor: pointer; border-bottom: 3px solid transparent; transition: all .2s; }
.tab.active { color: var(--text); border-bottom-color: var(--blue); }
.search {
  display: flex; align-items: center; gap: 10px; background: #fff;
  border: 1.5px solid var(--border); border-radius: 12px; padding: 10px 16px;
  min-width: 340px; flex: 1; max-width: 420px;
}
.search input { border: none; outline: none; font-size: 15px; width: 100%; font-family: inherit; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.cards { display: grid; gap: 20px; margin-bottom: 20px; }
.cards--wide { grid-template-columns: 1fr 1fr; }
.cards--three { grid-template-columns: repeat(3, 1fr); }
.cards--two { grid-template-columns: 1fr 1fr; }
.card {
  background: linear-gradient(180deg, #ffffff 0%, #faf7ff 100%);
  border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card h3 { font-size: 20px; font-weight: 700; margin-bottom: 12px; line-height: 1.3; }
.card p { font-size: 15px; color: var(--text-soft); margin-bottom: 20px; flex-grow: 1; }
.card ul { margin-bottom: 20px; flex-grow: 1; }
.card ul li { font-size: 15px; color: var(--text-soft); padding-left: 18px; position: relative; margin-bottom: 6px; }
.card ul li::before { content: ''; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .5; }
.card .btn { align-self: flex-start; }

/* ===== ВРАЧИ ===== */
.doctors { padding: 60px 0; background: var(--bg-soft); }
.doctors__intro {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px;
  background: #00b4d8; border-radius: 24px; padding: 48px; margin-bottom: 40px; color: #fff;
}
.doctors__desc h2 { font-size: 36px; font-weight: 800; margin-bottom: 20px; }
.doctors__desc p { margin-bottom: 12px; font-size: 16px; }
.doctors__desc .brief { font-weight: 700; font-size: 18px; }
.doctors__desc .btn { margin-top: 16px; }
.doctors__chief { background: #fff; border-radius: 20px; padding: 24px; color: var(--text); text-align: center; }
.doctors__chief img { max-height: 340px; margin: 0 auto 16px; }
.doctors__chief h4 { font-size: 20px; margin-bottom: 8px; }
.doctors__chief p { font-size: 14px; color: var(--text-soft); }
.doctors__carousel { position: relative; display: flex; align-items: center; gap: 12px; }
.carousel__track { display: flex; gap: 20px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; padding: 8px 0; flex: 1; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__arrow {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%;
  background: #fff; border: 1.5px solid var(--border); color: var(--blue);
  font-size: 24px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .2s;
}
.carousel__arrow:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.doctor-card {
  min-width: 280px; background: #fff; border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); text-align: center;
  display: flex; flex-direction: column;
}
.doctor-card img { height: 240px; object-fit: contain; margin: 0 auto 16px; }
.doctor-card h5 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.doctor-card p { font-size: 14px; color: var(--text-soft); flex-grow: 1; margin-bottom: 16px; }
.doctor-card .btn { align-self: center; }

/* ===== ОТ ЗАПИСИ ДО РЕКОМЕНДАЦИЙ ===== */
.steps { padding: 60px 0; }
.steps h2 { font-size: 36px; font-weight: 800; margin-bottom: 40px; }
.steps__inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.steps__list { counter-reset: step; position: relative; padding-left: 0; }
.steps__list li { position: relative; padding-left: 70px; padding-bottom: 32px; counter-increment: step; }
.steps__list li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 44px; height: 44px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-weight: 700; color: #fff;
  background: var(--blue); z-index: 1;
}
.steps__list li:nth-child(1)::before { background: var(--cyan); }
.steps__list li:nth-child(2)::before { background: var(--mint); }
.steps__list li:nth-child(3)::before { background: #fdba74; }
.steps__list li:nth-child(4)::before { background: var(--lilac); }
.steps__list li:nth-child(5)::before { background: #ddd6fe; color: var(--text); }
.steps__list li::after { content: ''; position: absolute; left: 21px; top: 44px; bottom: 0; width: 2px; border-left: 2px dashed #c7c9e0; }
.steps__list li:last-child::after { display: none; }
.steps__list h4 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.steps__list p { font-size: 15px; color: var(--text-soft); }
.steps__promo { background: linear-gradient(180deg, #f3f0ff 0%, #e9e4ff 100%); border-radius: var(--radius); padding: 32px; text-align: center; }
.steps__img { max-height: 380px; margin: 0 auto 20px; }
.steps__promo p { font-size: 17px; font-weight: 600; margin-bottom: 20px; }

/* ===== ЗАГРУЗКА ДОКУМЕНТОВ ===== */
.upload { padding: 60px 0; background: var(--bg-soft); }
.upload__inner {
  display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px;
  align-items: start; background: #fff; border-radius: 24px;
  padding: 48px; box-shadow: var(--shadow-lg);
}
.upload__text h2 { font-size: 30px; font-weight: 800; line-height: 1.2; margin-bottom: 16px; }
.upload__text p { font-size: 16px; color: var(--text-soft); }
.upload__form { display: flex; flex-direction: column; gap: 14px; }
.upload__form input[type="text"],
.upload__form input[type="tel"] {
  width: 100%; padding: 14px 18px; border: 1.5px solid var(--border);
  border-radius: 12px; font-size: 15px; font-family: inherit;
}
.upload__form input:focus { outline: none; border-color: var(--blue); }
.upload__drop {
  border: 2px dashed #c7c9e0; border-radius: 14px;
  padding: 24px 20px; text-align: center; cursor: pointer;
  transition: all .2s; color: var(--text-soft);
}
.upload__drop:hover, .upload__drop.dragover { border-color: var(--blue); background: #f0f4ff; color: var(--blue); }
.upload__drop svg { margin: 0 auto 8px; display: block; }
.upload__drop p { font-size: 15px; margin-bottom: 4px; }
.upload__drop p strong { color: var(--blue); }
.upload__drop span { font-size: 12px; opacity: .7; }
.upload__preview { display: flex; flex-wrap: wrap; gap: 8px; }
.upload__preview .file-chip {
  display: flex; align-items: center; gap: 6px;
  background: #eef4ff; color: var(--blue);
  padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 500;
}
.upload__preview .file-chip button { background: none; border: none; color: var(--blue); font-size: 16px; cursor: pointer; line-height: 1; }
.upload__check { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--text-soft); cursor: pointer; }
.upload__check input { margin-top: 3px; }
.upload__msg { font-size: 14px; margin-top: 4px; }
.upload__msg.ok { color: #16a34a; }
.upload__msg.err { color: #dc2626; }

/* ===== ТЕЛЕМЕДИЦИНА ===== */
.apps { background: linear-gradient(135deg, #00c2d1 0%, #00a8b8 100%); padding: 56px 0; color: #fff; }
.apps__inner { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 32px; align-items: center; }
.apps__left h3 { font-size: 28px; font-weight: 800; margin-bottom: 16px; }
.apps__left p { font-size: 16px; opacity: .95; }
.apps__center img { max-height: 380px; margin: 0 auto; }
.apps__right { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.apps__qr { width: 140px; background: #fff; padding: 8px; border-radius: 12px; }
.store-btn {
  display: flex; align-items: center; gap: 12px;
  background: #000; color: #fff;
  padding: 10px 18px; border-radius: 12px;
  min-width: 200px; transition: transform .2s;
  border: 1px solid #333;
}
.store-btn:hover { transform: translateY(-2px); }
.store-btn__text { display: flex; flex-direction: column; line-height: 1.1; }
.store-btn__text span { font-size: 10px; text-transform: uppercase; opacity: .8; }
.store-btn__text strong { font-size: 16px; font-weight: 600; }

/* ===== ФУТЕР ===== */
.footer { background: #8b9cf4; color: #fff; padding: 48px 0; }
.footer__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.footer__left p { margin-bottom: 12px; }
.footer__left ul { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; }
.footer__left ul a { font-size: 14px; opacity: .9; }
.footer__left ul a:hover { opacity: 1; text-decoration: underline; }
.footer__addr p { margin-bottom: 8px; font-size: 15px; }
.footer__addr a { font-weight: 700; font-size: 18px; }
.footer__download {
  display: inline-block; margin-top: 20px; background: #fff; color: var(--blue);
  padding: 12px 24px; border-radius: 999px; font-weight: 700; transition: transform .2s;
}
.footer__download:hover { transform: translateY(-2px); }

/* ===== ПЛАВАЮЩАЯ КНОПКА ===== */
.float-download {
  position: fixed; right: 24px; bottom: 24px; width: 60px; height: 60px;
  border-radius: 50%; background: var(--blue); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37,99,235,.4);
  z-index: 999; opacity: 0; pointer-events: none; transition: opacity .3s, transform .2s;
}
.float-download.visible { opacity: 1; pointer-events: auto; }
.float-download:hover { transform: scale(1.08); }

/* ===== МОБИЛЬНАЯ ПАНЕЛЬ ===== */
.mobile-bar {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-top: 1px solid var(--border); z-index: 1000;
  box-shadow: 0 -4px 20px rgba(0,0,0,.06);
}
.mobile-bar__item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 8px; font-size: 11px; font-weight: 600;
  color: var(--text-soft); border-right: 1px solid var(--border);
}
.mobile-bar__item:last-child { border-right: none; }
.mobile-bar__item--primary { color: var(--blue); }

/* ===== МОДАЛКА ===== */
.modal {
  position: fixed; inset: 0; z-index: 2000;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal.active { display: flex; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); }
.modal__box {
  position: relative; background: #fff; border-radius: 20px;
  padding: 36px 32px; max-width: 440px; width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.3); text-align: center;
  animation: modalIn .25s ease;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.modal__close {
  position: absolute; top: 12px; right: 16px;
  background: none; border: none; font-size: 26px; cursor: pointer;
  color: var(--text-soft); line-height: 1;
}
.modal__box h3 { font-size: 24px; font-weight: 800; margin-bottom: 12px; }
.modal__box p { font-size: 15px; color: var(--text-soft); margin-bottom: 24px; }
.modal__link { display: inline-block; margin-top: 16px; color: var(--blue); font-size: 14px; font-weight: 600; }
.modal__link:hover { text-decoration: underline; }

/* ===== АНИМАЦИИ ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== АДАПТИВ ===== */
@media (max-width: 992px) {
  .consult-cta__inner, .hero__inner, .doctors__intro, .steps__inner,
  .apps__inner, .footer__inner, .upload__inner { grid-template-columns: 1fr; }
  .cards--three { grid-template-columns: 1fr 1fr; }
  .hero__text { padding-bottom: 20px; }
  .hero__img { max-height: 380px; }
  .consult-cta__text h2, .hero__text h1 { font-size: 32px; }
  .header__menu { display: none; }
  .upload__inner { padding: 32px; }
}

@media (max-width: 640px) {
  .cards--wide, .cards--three, .cards--two { grid-template-columns: 1fr; }
  .topbar__inner { flex-direction: column; align-items: flex-start; }
  .search { min-width: 100%; }
  .consult-cta__text h2, .hero__text h1 { font-size: 26px; }
  .steps h2, .doctors__desc h2, .upload__text h2 { font-size: 26px; }
  .footer__left ul { grid-template-columns: 1fr; }
  .doctors__intro { padding: 28px; }
  .mobile-bar { display: flex; }
  .float-download { bottom: 80px; right: 16px; width: 52px; height: 52px; }
  .footer { padding-bottom: 90px; }
  .header__cta, .topbar__actions { display: none; }
}
