/* =============================================================================
   Landing page styles
   Соответствует: 2.design/landing-page-for-clinic.pen → ESTOM Landing Page (FrHVY)
   Ширина канваса дизайна: 1440. Основной padding секций: 64px/80px.
   ============================================================================= */

body.landing {
  background: var(--surface);
}

.landing-wrap {
  width: 100%;
  background: var(--surface);
}

/*
  Горизонтальные паддинги секций.
  На экранах до 1440px работает как в дизайне (80px по бокам).
  На более широких — паддинг растёт, удерживая контент шириной 1280px по центру.
  Вертикальные паддинги оставляем per-секцию.
*/
.l-nav,
.l-hero,
.l-stats,
.l-section,
.l-cta,
.l-footer,
.sp-header,
.sp-catalog,
.sp-process,
.dp-section,
.dp-trust,
.bp-section,
.cp-section,
.ap-hero,
.ap-advantages,
.ap-mission,
.ap-stats,
.bk-section {
  padding-left: max(80px, calc((100% - 1280px) / 2));
  padding-right: max(80px, calc((100% - 1280px) / 2));
}

/* ---------- Nav ---------- */
.l-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);

  /* Липкая шапка: прилипает к верху окна при скролле */
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.65);
  /* Лёгкая тень, чтобы шапка «отрывалась» от контента при скролле */
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
}
.l-nav__brand {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.l-nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.l-nav__link {
  font-size: var(--font-body);
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
}
.l-nav__link:hover { color: var(--primary); }
.l-nav__right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.l-nav__lang {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-size: var(--font-small);
  color: var(--text-secondary);
}
.l-nav__cta {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  background: var(--primary);
  color: var(--text-white);
  border-radius: 7px;
  font-size: var(--font-body);
  font-weight: 600;
  text-decoration: none;
}
.l-nav__cta:hover { background: var(--primary-dark); color: var(--text-white); }

/* ---------- Section base ---------- */
.l-section {
  padding-top: 64px;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--border);
}
.l-section--alt {
  background: var(--surface);
}

.l-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--gap-md);
  margin-bottom: 48px;
}
.l-section-head__text {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
  flex: 1;
}
.l-section-head__title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}
.l-section-head__sub {
  font-size: 16px;
  color: var(--text-secondary);
}
.l-section-head__btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  background: transparent;
  border-radius: var(--radius-sm);
  font-size: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.l-section-head__btn:hover { background: var(--primary-light); }

/* ---------- Hero ---------- */
.l-hero {
  display: flex;
  gap: 40px;
  padding-top: 64px;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.l-hero__left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.l-hero__title {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.18;
  color: var(--text-primary);
}
.l-hero__sub {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.7;
}
.l-hero__cta {
  display: flex;
  gap: 16px;
  align-items: center;
}
.l-hero__cta-primary {
  display: inline-flex;
  align-items: center;
  padding: 16px 32px;
  background: var(--primary);
  color: var(--text-white);
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}
.l-hero__cta-primary:hover { background: var(--primary-dark); color: var(--text-white); }
.l-hero__cta-secondary {
  display: inline-flex;
  align-items: center;
  padding: 14px 30px;
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}
.l-hero__cta-secondary:hover { background: var(--primary-light); }
.l-hero__right {
  width: 540px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.l-hero__img {
  width: 100%;
  height: 310px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--primary-light);
}
.l-hero__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.l-hero__img-row {
  display: flex;
  gap: 12px;
  height: 140px;
}
.l-hero__img-row > div {
  flex: 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--primary-light);
}
.l-hero__img-row img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- Stats Bar ---------- */
.l-stats {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-top: 48px;
  padding-bottom: 48px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.l-stats__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.l-stats__num {
  font-size: 40px;
  font-weight: 700;
  color: var(--primary);
}
.l-stats__label {
  font-size: var(--font-body);
  font-weight: 500;
  color: var(--text-secondary);
}
.l-stats__divider {
  width: 1px;
  height: 48px;
  background: var(--border);
}

/* ---------- Services ---------- */
.l-services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.l-service-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  min-height: 290px;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.l-service-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.l-service-card__icon {
  width: 100%;
  height: 160px;
  background: var(--primary-light);
  overflow: hidden;
}
.l-service-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.l-service-card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 24px;
  flex: 1;
}
.l-service-card__title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
}
.l-service-card__desc {
  font-size: var(--font-body);
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ---------- Doctors ---------- */
.l-doctors-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.l-doctor-card {
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}
.l-doctor-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.l-doctor-card__photo {
  width: 100%;
  height: 360px;
  overflow: hidden;
  background: var(--primary-light);
}
.l-doctor-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.l-doctor-card__info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
}
.l-doctor-card__name {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}
.l-doctor-card__spec {
  font-size: var(--font-body);
  font-weight: 500;
  color: var(--primary);
}
.l-doctor-card__exp {
  font-size: var(--font-body);
  line-height: 1.5;
  color: var(--text-secondary);
}

/* ---------- Reviews ---------- */
.l-reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.l-review-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.l-review-card__stars {
  color: var(--warning);
  font-size: 20px;
  letter-spacing: 3px;
}
.l-review-card__quote {
  font-size: var(--font-body);
  line-height: 1.6;
  color: var(--text-primary);
}
.l-review-card__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.l-review-card__name {
  font-size: var(--font-body);
  font-weight: 600;
  color: var(--text-primary);
}
.l-review-card__meta {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-caption);
  color: var(--text-secondary);
}
.l-review-card__meta small {
  color: var(--text-muted);
  font-size: inherit;
}

/* ---------- Branches ---------- */
.l-branches-content {
  display: flex;
  gap: 32px;
}
.l-branches-map {
  flex: 1;
  height: 400px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--primary-light);
}
.l-branches-map img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.l-branches-list {
  width: 360px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.l-branch-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.l-branch-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.l-branch-card__head svg {
  color: var(--primary);
  width: 18px;
  height: 18px;
}
.l-branch-card__name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}
.l-branch-card__row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-small);
  color: var(--text-secondary);
}
.l-branch-card__row svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ---------- FAQ ---------- */
.l-faq-list {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface);
}
.l-faq-item {
  border-bottom: 1px solid var(--border);
}
.l-faq-item:last-child {
  border-bottom: none;
}
.l-faq-item__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  list-style: none;
  cursor: pointer;
  transition: background 0.15s;
}
.l-faq-item__row::-webkit-details-marker,
.l-faq-item__row::marker {
  display: none;
}
.l-faq-item__row:hover {
  background: var(--bg);
}
.l-faq-item__q {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}
.l-faq-item__icon {
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: transform 0.2s;
}
.l-faq-item[open] .l-faq-item__icon {
  transform: rotate(180deg);
}
.l-faq-item__a {
  padding: 0 24px 20px 24px;
  font-size: var(--font-body);
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ---------- CTA ---------- */
.l-cta {
  padding-top: 48px;
  padding-bottom: 48px;
  background: var(--surface);
  display: flex;
  justify-content: center;
}
.l-cta__card {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 56px 64px;
  background: var(--primary);
  border-radius: 24px;
  text-align: center;
}
.l-cta__title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-white);
}
.l-cta__sub {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  max-width: 500px;
}
.l-cta__btns {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: var(--gap-sm);
}
.l-cta__btn-primary {
  display: inline-flex;
  align-items: center;
  padding: 16px 32px;
  background: var(--surface);
  color: var(--primary);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}
.l-cta__btn-primary:hover { background: var(--bg); color: var(--primary); }
.l-cta__btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.125);
  color: var(--text-white);
  border: 2px solid var(--text-white);
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}
.l-cta__btn-secondary:hover { background: rgba(255, 255, 255, 0.2); color: var(--text-white); }
.l-cta__btn-secondary svg {
  width: 18px;
  height: 18px;
}

/* ---------- Footer ---------- */
.l-footer {
  padding-top: 48px;
  padding-bottom: 48px;
  background: #0F172A;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.l-footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 64px;
}
.l-footer__col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.l-footer__brand {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-white);
}
.l-footer__desc {
  max-width: 280px;
  font-size: var(--font-body);
  line-height: 1.7;
  color: var(--text-muted);
}
.l-footer__col-title {
  font-size: var(--font-body);
  font-weight: 600;
  color: var(--text-white);
}
.l-footer__link {
  font-size: var(--font-body);
  color: var(--text-muted);
  text-decoration: none;
}
.l-footer__link:hover { color: var(--text-white); }
.l-footer__divider {
  height: 1px;
  background: #1E293B;
}
.l-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.l-footer__copy {
  font-size: var(--font-body);
  color: var(--text-secondary);
}
.l-footer__social {
  display: flex;
  gap: 16px;
}
.l-footer__social a {
  color: var(--text-muted);
  width: 20px;
  height: 20px;
  display: inline-flex;
}
.l-footer__social a:hover { color: var(--text-white); }

/* ---------- Burger button (mobile nav toggle) ---------- */
.l-nav-burger {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  border-radius: 8px;
}
.l-nav-burger:hover { background: var(--bg); }
.l-nav-burger svg { width: 24px; height: 24px; }

/* =============================================================================
   RESPONSIVE — соответствует дизайну
   .pen frames: ESTOM Tablet (768px), ESTOM Mobile (375px).
   ============================================================================= */

/* ---------- TABLET (≤1023px) ---------- */
@media (max-width: 1023px) {
  .l-nav, .l-hero, .l-stats, .l-section, .l-cta, .l-footer,
  .sp-header, .sp-catalog, .sp-process,
  .dp-section, .dp-trust,
  .bp-section,
  .cp-section,
  .ap-hero, .ap-advantages, .ap-mission, .ap-stats,
  .bk-section {
    padding-left: 40px;
    padding-right: 40px;
  }

  .l-section { padding-top: 48px; padding-bottom: 48px; }
  .l-section-head { margin-bottom: 32px; gap: var(--gap-sm); }
  .l-section-head__title { font-size: 26px; }
  .l-section-head__sub { font-size: 14px; }

  /* Hero — текст и картинки бок о бок, но картинки меньше */
  .l-hero { padding-top: 48px; padding-bottom: 48px; gap: 32px; }
  .l-hero__title { font-size: 36px; letter-spacing: -1px; }
  .l-hero__right { width: 360px; }
  .l-hero__img { height: 220px; }
  .l-hero__img-row { height: 100px; }

  /* Stats — 4 шт в одну строку, но цифры меньше */
  .l-stats { padding-top: 32px; padding-bottom: 32px; }
  .l-stats__num { font-size: 30px; }
  .l-stats__divider { height: 36px; }

  /* Services / Doctors — 2 колонки */
  .l-services-grid { grid-template-columns: repeat(2, 1fr); }
  .l-doctors-grid  { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .l-doctor-card__photo { height: 280px; }

  /* Reviews — 2 колонки */
  .l-reviews-grid { grid-template-columns: repeat(2, 1fr); }

  /* Branches — map и список один под другим */
  .l-branches-content { flex-direction: column; gap: 20px; }
  .l-branches-map { width: 100%; height: 240px; flex: none; }
  .l-branches-list { width: 100%; }

  /* CTA */
  .l-cta__card { padding: 40px 32px; }
  .l-cta__title { font-size: 28px; }

  /* Footer — 2x2 */
  .l-footer__top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .l-footer { padding-top: 40px; padding-bottom: 40px; gap: 32px; }
}

/* ---------- MOBILE (≤768px) — переключаем navbar в burger режим ---------- */
@media (max-width: 768px) {
  /* Скрываем десктоп-навигацию, показываем burger */
  .l-nav__links { display: none; }
  .l-nav__cta   { display: none; }
  .l-nav-burger { display: inline-flex; }
  .l-nav { position: sticky; }

  /* Drop-menu при открытом burger */
  .l-nav.is-open .l-nav__links {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 8px 20px 16px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  }
  .l-nav.is-open .l-nav__link {
    padding: 14px 0;
    width: 100%;
    border-bottom: 1px solid var(--border);
    font-size: 15px;
  }
  .l-nav.is-open .l-nav__link:last-of-type { border-bottom: none; }

  /* CTA-клон, который nav.js добавляет в выпадашку */
  .l-nav__cta--in-menu { display: none; }
  .l-nav.is-open .l-nav__cta--in-menu {
    display: inline-flex;
    width: 100%;
    margin-top: 12px;
    justify-content: center;
    padding: 12px 16px;
    background: var(--primary);
    color: var(--text-white);
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
  }
}

/* ---------- MOBILE (≤640px) ---------- */
@media (max-width: 640px) {
  .l-nav, .l-hero, .l-stats, .l-section, .l-cta, .l-footer,
  .sp-header, .sp-catalog, .sp-process,
  .dp-section, .dp-trust,
  .bp-section,
  .cp-section,
  .ap-hero, .ap-advantages, .ap-mission, .ap-stats,
  .bk-section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .l-section { padding-top: 32px; padding-bottom: 32px; }
  .l-section-head {
    align-items: center;
    margin-bottom: 20px;
    gap: 12px;
  }
  .l-section-head__title { font-size: 18px; line-height: 1.25; }
  .l-section-head__sub { font-size: 12px; }
  .l-section-head__btn {
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Hero — вертикальный стек */
  .l-hero {
    flex-direction: column;
    align-items: stretch;
    padding-top: 32px;
    padding-bottom: 32px;
    gap: 24px;
  }
  .l-hero__left { gap: 16px; }
  .l-hero__title { font-size: 26px; letter-spacing: -0.5px; line-height: 1.18; }
  .l-hero__sub { font-size: 13px; }
  .l-hero__cta { gap: 10px; }
  .l-hero__cta-primary,
  .l-hero__cta-secondary { padding: 10px 18px; font-size: 13px; }
  .l-hero__right { width: 100%; }
  .l-hero__img { height: 180px; }
  .l-hero__img-row { height: 90px; gap: 12px; }

  /* Stats — 4 в строку, цифры мельче */
  .l-stats { padding: 20px 16px; gap: 4px; }
  .l-stats__item { gap: 2px; }
  .l-stats__num { font-size: 18px; }
  .l-stats__label { font-size: 10px; }
  .l-stats__divider { height: 28px; }

  /* Services — 2 колонки, мини-карточка */
  .l-services-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .l-service-card { min-height: 0; border-radius: 12px; }
  .l-service-card__icon { height: 90px; }
  .l-service-card__body { padding: 12px; gap: 6px; }
  .l-service-card__title { font-size: 14px; }
  .l-service-card__desc  { font-size: 11px; line-height: 1.4; }

  /* Doctors — 2 колонки */
  .l-doctors-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .l-doctor-card__photo { height: 180px; }
  .l-doctor-card__info  { padding: 12px; gap: 4px; }
  .l-doctor-card__name  { font-size: 14px; }
  .l-doctor-card__spec  { font-size: 12px; }
  .l-doctor-card__exp   { font-size: 11px; }

  /* Reviews — одна колонка */
  .l-reviews-grid { grid-template-columns: 1fr; gap: 12px; }
  .l-review-card { padding: 14px; gap: 12px; }
  .l-review-card__stars { font-size: 16px; }
  .l-review-card__quote { font-size: 13px; }

  /* Branches */
  .l-branches-map { height: 200px; border-radius: 12px; }
  .l-branch-card { padding: 12px; gap: 6px; }
  .l-branch-card__name { font-size: 14px; }
  .l-branch-card__row  { font-size: 12px; }

  /* FAQ */
  .l-faq-item__row { padding: 14px 16px; }
  .l-faq-item__q   { font-size: 13px; }
  .l-faq-item__a   { padding: 0 16px 14px; font-size: 12px; }

  /* CTA */
  .l-cta { padding-top: 24px; padding-bottom: 24px; }
  .l-cta__card { padding: 28px 20px; border-radius: 16px; gap: 16px; }
  .l-cta__title { font-size: 20px; }
  .l-cta__sub   { font-size: 13px; }
  .l-cta__btns  { flex-direction: column; width: 100%; gap: 10px; margin-top: 4px; }
  .l-cta__btn-primary,
  .l-cta__btn-secondary {
    width: 100%;
    justify-content: center;
    padding: 14px 16px;
    font-size: 14px;
  }

  /* Footer — стек */
  .l-footer { padding-top: 32px; padding-bottom: 32px; gap: 24px; }
  .l-footer__top { grid-template-columns: 1fr; gap: 24px; }
  .l-footer__brand { font-size: 18px; }
  .l-footer__desc  { max-width: none; font-size: 12px; }
  .l-footer__bottom { flex-direction: column-reverse; gap: 16px; align-items: flex-start; }
  .l-footer__copy { font-size: 11px; }
}
