/* =========================================================
   «Алый пёс» — ветеринарная клиника
   style.css
   Палитра акцентов подобрана по логотипу: алый #EB0203
   ========================================================= */

/* ---------- Переменные ---------- */
:root {
  --red-50:  #fff2f2;
  --red-100: #ffe1e1;
  --red-200: #ffc2c2;
  --red-400: #f4373a;   /* акцент для тёмного фона */
  --red-500: #eb0203;   /* основной алый — цвет логотипа */
  --red-600: #c40103;   /* для текста на светлом фоне */
  --red-700: #9a0203;

  --warm-50:  #fffaf5;
  --warm-100: #fdf1e6;
  --warm-200: #f6e3d2;
  --warm-300: #ecd2ba;

  --ink-900: #26140f;
  --ink-700: #4a3229;
  --ink-500: #7a6257;
  --ink-300: #a8968d;

  --gray-200: #e3ddd8;
  --gray-300: #cfc7c0;
  --white: #ffffff;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 6px rgba(38, 20, 15, .06);
  --shadow: 0 10px 30px rgba(38, 20, 15, .09);
  --shadow-red: 0 12px 26px rgba(235, 2, 3, .26);

  --container: 1160px;
  --header-h: 84px;

  --font: "Segoe UI", "Inter", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-brand: "Playfair Display", "PT Serif", Georgia, "Times New Roman", serif;
}

/* ---------- Сброс ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-700);
  background: var(--warm-50);
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

h1, h2, h3 {
  margin: 0 0 .5em;
  color: var(--ink-900);
  line-height: 1.18;
  letter-spacing: -.01em;
}

p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }

a {
  color: var(--red-600);
  text-decoration: none;
  transition: color .2s ease, opacity .2s ease;
}
a:hover { color: var(--red-500); }

:focus-visible {
  outline: 3px solid var(--red-400);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

/* Название клиники — засечным шрифтом, как на логотипе */
.brand-name {
  font-family: var(--font-brand);
  font-weight: 700;
  color: var(--red-400);
  letter-spacing: .01em;
}

/* ---------- Плейсхолдеры ---------- */
.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background:
    repeating-linear-gradient(45deg, #e7e2de 0 12px, #eae5e1 12px 24px);
  color: var(--ink-500);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 10px;
}

.placeholder--avatar {
  width: 110px;
  height: 110px;
  margin: 0 auto 16px;
  border-radius: 50%;
  font-size: 12px;
  padding: 6px;
}

/* ---------- Карта клиники (конструктор Яндекс.Карт) ---------- */
.map {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  min-height: 280px;
  overflow: hidden;
  background: var(--warm-200);
  border: 1px solid var(--warm-300);
  border-radius: var(--radius-lg);
}

/* Разметку внутрь блока добавляет скрипт Яндекса — растягиваем её на весь блок,
   чтобы карта была адаптивной независимо от ширины в параметрах скрипта. */
.map > *,
.map iframe {
  display: block;
  width: 100% !important;
  height: 100% !important;
  border: 0;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  cursor: pointer;
  text-align: center;
  transition: transform .18s ease, background-color .2s ease,
              color .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--red-500);
  color: var(--white);
  box-shadow: var(--shadow-red);
}
.btn--primary:hover {
  background: var(--red-600);
  color: var(--white);
  transform: translateY(-2px);
}

.btn--ghost {
  background: var(--white);
  color: var(--red-600);
  border-color: var(--red-200);
  box-shadow: var(--shadow-sm);
}
.btn--ghost:hover {
  border-color: var(--red-500);
  color: var(--red-600);
  transform: translateY(-2px);
}

.btn--lg { padding: 16px 32px; font-size: 17px; }
.btn--block { width: 100%; }

/* ---------- Бейджи ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.badge--live {
  background: var(--red-500);
  color: var(--white);
  box-shadow: 0 8px 20px rgba(235, 2, 3, .32);
}

.badge--dark {
  background: rgba(255, 255, 255, .16);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, .3);
}

.badge--on-light {
  background: var(--red-50);
  color: var(--red-600);
  border: 1px solid var(--red-200);
}

.badge__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--white);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1;   transform: scale(1); }
  50%      { opacity: .35; transform: scale(.7); }
}

/* =========================================================
   Шапка
   ========================================================= */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 250, 245, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--warm-200);
}

.header__inner {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Логотип */
.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo__img {
  width: clamp(118px, 16vw, 150px);
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: var(--white);
  border: 1px solid var(--warm-200);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.logo:hover .logo__img {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* Навигация */
.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav__list {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav__link {
  position: relative;
  color: var(--ink-700);
  font-weight: 600;
  font-size: 16px;
  padding: 6px 0;
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--red-500);
  border-radius: 2px;
  transition: width .25s ease;
}
.nav__link:hover { color: var(--red-600); }
.nav__link:hover::after { width: 100%; }

.nav__cta { padding: 11px 20px; font-size: 15px; }

/* Кнопка «Личный кабинет» */
.nav__account {
  white-space: nowrap;
  border-color: var(--warm-300);
}
.nav__account svg { flex-shrink: 0; }

/* Плавно уплотняем шапку, чтобы меню и две кнопки умещались */
@media (max-width: 1200px) {
  .nav,
  .nav__list { gap: 18px; }

  .nav__link { font-size: 15px; }
  .nav__cta { padding: 10px 15px; font-size: 14px; }
}

/* Бургер */
.burger {
  display: none;
  margin-left: auto;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--warm-300);
  border-radius: 12px;
  background: var(--white);
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: border-color .2s ease, background-color .2s ease;
}
.burger:hover { border-color: var(--red-400); }

.burger__line {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink-900);
  transition: transform .25s ease, opacity .2s ease;
}

.burger.is-active .burger__line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-active .burger__line:nth-child(2) { opacity: 0; }
.burger.is-active .burger__line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  padding: 76px 0 84px;
  background:
    radial-gradient(900px 420px at 88% -10%, var(--red-100) 0%, transparent 62%),
    radial-gradient(700px 380px at 6% 110%, var(--warm-200) 0%, transparent 60%),
    linear-gradient(180deg, var(--warm-100) 0%, var(--warm-50) 100%);
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  right: -140px;
  bottom: -160px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(235, 2, 3, .10), transparent 68%);
  pointer-events: none;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
  z-index: 1;
}

.hero__content {
  max-width: 880px;
  margin-inline: auto;
  text-align: center;
}

.hero__title {
  font-size: clamp(34px, 5.4vw, 60px);
  font-weight: 800;
  margin-bottom: 18px;
}

.hero__text {
  font-size: 18px;
  max-width: 40em;
  margin: 0 auto 28px;
  color: var(--ink-500);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-bottom: 38px;
}

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 42px;
  padding-top: 24px;
  border-top: 1px solid var(--warm-300);
}

.hero__facts li { display: flex; flex-direction: column; align-items: center; }
.hero__facts strong {
  font-size: 26px;
  color: var(--red-600);
  line-height: 1.2;
}
.hero__facts span { font-size: 14px; color: var(--ink-500); }

/* =========================================================
   Секции
   ========================================================= */
.section { padding: 82px 0; }

.section--warm { background: var(--warm-100); }

.section__head {
  max-width: 720px;
  margin: 0 auto 46px;
  text-align: center;
}

.section__kicker {
  display: inline-block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red-600);
  margin-bottom: 12px;
}

.section__title {
  font-size: clamp(27px, 3.6vw, 40px);
  font-weight: 800;
}

.section__subtitle { color: var(--ink-500); margin: 0; }

/* ---------- График работы ---------- */
.section--schedule { padding-top: 0; }

.schedule {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 44px;
  align-items: center;
  padding: 48px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(700px 320px at 100% 0%, rgba(255, 255, 255, .16), transparent 60%),
    linear-gradient(135deg, var(--red-600) 0%, var(--red-500) 48%, var(--red-700) 100%);
  color: var(--white);
  box-shadow: var(--shadow);
}

.schedule__title {
  color: var(--white);
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 800;
  margin-bottom: 14px;
}

.schedule__note {
  font-size: 18px;
  color: rgba(255, 255, 255, .92);
  margin-bottom: 10px;
  max-width: 40em;
}

.schedule__hint {
  margin: 0;
  font-size: 15px;
  color: rgba(255, 255, 255, .75);
}

.schedule__phones {
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.schedule__phones-label {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .8);
}

.phone {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  color: var(--ink-900);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.phone:hover {
  transform: translateY(-2px);
  background: var(--white);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
  color: var(--ink-900);
}

.phone__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--red-50);
  color: var(--red-600);
}

.phone__body { display: flex; flex-direction: column; line-height: 1.35; }
.phone__number { font-size: 18px; font-weight: 800; letter-spacing: .01em; }
.phone__caption { font-size: 13px; color: var(--ink-500); }

.schedule__phones .btn--primary {
  margin-top: 6px;
  background: var(--white);
  color: var(--red-600);
  box-shadow: none;
}
.schedule__phones .btn--primary:hover { background: var(--warm-100); color: var(--red-700); }

/* ---------- Услуги ---------- */
.services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service {
  padding: 30px 26px;
  background: var(--white);
  border: 1px solid var(--warm-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.service:hover {
  transform: translateY(-6px);
  border-color: var(--red-200);
  box-shadow: var(--shadow);
}

.service__icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 18px;
  border-radius: 16px;
  background: var(--red-50);
  color: var(--red-600);
}

.service__title { font-size: 21px; margin-bottom: 8px; }
.service__text { margin: 0; font-size: 15px; color: var(--ink-500); }

/* ---------- Врачи ---------- */
.doctors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.doctor {
  padding: 30px 26px;
  background: var(--white);
  border: 1px solid var(--warm-200);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
}
.doctor:hover { transform: translateY(-6px); box-shadow: var(--shadow); }

.doctor__name { font-size: 20px; margin-bottom: 4px; }
.doctor__role { font-size: 15px; color: var(--ink-500); margin-bottom: 6px; }
.doctor__exp {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--red-600);
}

/* ---------- Контакты ---------- */
.section--contacts { background: var(--warm-100); }

.contacts {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
}

.contacts__list {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}

.contacts__list li {
  display: grid;
  gap: 2px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--warm-300);
}
.contacts__list li:last-child { border-bottom: 0; padding-bottom: 0; }

.contacts__label {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red-600);
}

.contacts__value { font-size: 18px; color: var(--ink-900); font-weight: 600; }
.contacts__link { color: var(--ink-900); }
.contacts__link:hover { color: var(--red-600); }

/* =========================================================
   Подвал
   ========================================================= */
.footer {
  background: var(--ink-900);
  color: rgba(255, 255, 255, .74);
  padding: 62px 0 26px;
  font-size: 15px;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 38px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.footer__brand { margin-bottom: 18px; }

.footer__logo {
  width: clamp(150px, 22vw, 176px);
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: var(--white);
  border-radius: 12px;
  padding: 2px;
}

.footer__text { margin: 0 0 14px; max-width: 34em; }
.footer__text--sm { font-size: 13px; color: rgba(255, 255, 255, .55); }

.footer__note {
  display: inline-block;
  margin: 0;
  padding: 6px 15px;
  border-radius: var(--radius-pill);
  background: var(--red-500);
  color: var(--white);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .06em;
}

.footer__title {
  color: var(--white);
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: .01em;
}

.footer__list { display: grid; gap: 10px; }
.footer__list a { color: rgba(255, 255, 255, .78); }
.footer__list a:hover { color: var(--white); }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 22px;
  font-size: 13px;
  color: rgba(255, 255, 255, .5);
}
.footer__bottom p { margin: 0; }

/* =========================================================
   Адаптив
   ========================================================= */
@media (max-width: 1024px) {
  .hero { padding: 60px 0 68px; }

  .schedule { grid-template-columns: 1fr; gap: 32px; padding: 38px; }

  .services { grid-template-columns: repeat(2, 1fr); }

  .contacts { grid-template-columns: 1fr; gap: 32px; }
  .map { aspect-ratio: 16 / 9; min-height: 0; }

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

@media (max-width: 960px) {
  :root { --header-h: 74px; }

  .burger { display: flex; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 18px 20px 28px;
    background: var(--warm-50);
    border-bottom: 1px solid var(--warm-200);
    box-shadow: 0 24px 40px rgba(38, 20, 15, .14);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform .26s ease, opacity .26s ease, visibility .26s;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav__list li + li { border-top: 1px solid var(--warm-200); }

  .nav__link {
    display: block;
    padding: 15px 4px;
    font-size: 17px;
  }
  .nav__link::after { display: none; }

  .nav__cta { margin-top: 18px; width: 100%; }
  .nav__cta + .nav__cta { margin-top: 10px; }

  .logo__img { width: 118px; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }

  .section { padding: 58px 0; }

  .hero { padding: 44px 0 54px; }
  .hero__actions .btn { width: 100%; }
  .hero__facts { gap: 16px 30px; }
  .hero__facts strong { font-size: 22px; }

  .schedule { padding: 28px 22px; border-radius: var(--radius); }
  .schedule__phones { padding: 18px; }

  .services,
  .doctors { grid-template-columns: 1fr; gap: 16px; }

  .footer__inner { grid-template-columns: 1fr; gap: 28px; }
  .footer__bottom { flex-direction: column; }

  .logo__img { width: 104px; border-radius: 10px; }
}

@media (max-width: 380px) {
  .logo__img { width: 92px; }
}

/* ---------- Уважение к настройкам движения ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
