/* ============================================================
   pages.css — стили блоков страниц: слайдер, преимущества,
   счётчики, «как мы работаем», услуги, цены, контакты
   ============================================================ */

/* ---------- Слайдер (главная) ---------- */
.hero { position: relative; min-height: 600px; overflow: hidden; background: var(--navy); }
.hero__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.hero__slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(16, 16, 18, 0.94) 0%, rgba(16, 16, 18, 0.66) 55%, rgba(16, 16, 18, 0.24) 100%);
}
.hero__slide.is-active { opacity: 1; z-index: 1; }
.hero__content { position: relative; z-index: 2; max-width: 760px; }
.hero__title {
  color: #fff;
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.15;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.hero__title span { color: var(--accent); }
.hero__text { color: var(--on-dark); font-size: clamp(16px, 1.6vw, 19px); max-width: 620px; margin-bottom: 26px; }

.hero__arrow {
  position: absolute;
  top: 50%;
  z-index: 5;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(16, 16, 18, 0.40);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.hero__arrow:hover { background: var(--accent); color: #fff; }
.hero__arrow--prev { left: 18px; }
.hero__arrow--next { right: 18px; }

.hero__dots {
  position: absolute;
  bottom: 22px;
  left: 50%;
  z-index: 5;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.hero__dot {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.hero__dot.is-active { background: var(--accent); transform: scale(1.15); }

@media (max-width: 991px) {
  .hero { min-height: 480px; }
  .hero__arrow { display: none; }
}

/* ---------- Преимущества (features) ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.feature { padding: 30px 26px; transition: transform 0.2s, box-shadow 0.2s; }
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature__icon {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  margin-bottom: 18px;
}
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 14.5px; }
.feature ul { margin-top: 4px; }
.feature ul li { color: var(--muted); font-size: 14.5px; padding-left: 18px; position: relative; }
.feature ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

@media (max-width: 991px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 575px) { .features { grid-template-columns: 1fr; } }

/* ---------- Счётчики ---------- */
.counters {
  position: relative;
  padding: 72px 0;
  background-size: cover;
  background-position: center;
}
.counters::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(16, 16, 18, 0.87);
}
.counters__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.counter__num {
  display: block;
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 800;
  color: var(--accent);
  line-height: 1.1;
}
.counter__label { color: var(--on-dark); font-size: 15px; font-weight: 600; }

@media (max-width: 991px) { .counters__grid { grid-template-columns: 1fr 1fr; gap: 36px; } }
@media (max-width: 575px) { .counters__grid { grid-template-columns: 1fr; } }

/* ---------- «Как мы работаем» ---------- */
.how { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 980px; margin: 0 auto; }
.how__col { padding: 34px 30px; }
.how__col h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--line);
}
.how__col h3::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--accent);
}
.steps { counter-reset: step; }
.steps li {
  position: relative;
  padding: 0 0 22px 52px;
  counter-increment: step;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--navy-soft), var(--navy-deep));
  border: 1px solid rgba(35, 81, 200, 0.55);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.steps li:last-child { padding-bottom: 0; }
.steps li b { display: block; font-size: 16px; color: var(--navy); }
.steps li span { color: var(--muted); font-size: 14.5px; }

@media (max-width: 991px) { .how { grid-template-columns: 1fr; } }

/* ---------- «Как мы работаем» — с иконками ---------- */
.how--icons { max-width: 1140px; }
.how--icons .how__col h3 { font-size: 18px; }
.steps--icons li {
  padding-left: 0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.steps--icons li::before { content: none; }
.steps--icons li > div { min-width: 0; }
.steps__icon {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent-soft);
  flex-shrink: 0;
}
.steps--icons li .steps__icon { color: var(--accent); }

/* ---------- Карточки услуг ---------- */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card { padding: 30px 28px; display: flex; flex-direction: column; transition: transform 0.2s, box-shadow 0.2s; }
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.service-card__icon {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 18px;
}
.service-card h3 { font-size: 19px; margin-bottom: 10px; }
.service-card p { color: var(--muted); font-size: 14.5px; flex-grow: 1; }
.service-card .btn { align-self: flex-start; margin-top: 18px; }

@media (max-width: 991px) {
  .services-grid { grid-template-columns: 1fr; }
  /* На мобильном иконка стоит рядом с заголовком, текст и кнопка — ниже на всю ширину */
  .service-card {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 16px;
    align-items: center;
  }
  .service-card__icon { grid-column: 1; grid-row: 1; margin-bottom: 20px; }
  .service-card h3 { grid-column: 2; grid-row: 1; margin-bottom: 20px; }
  .service-card p { grid-column: 1 / -1; grid-row: 2; }
  .service-card .btn { grid-column: 1 / -1; grid-row: 3; align-self: stretch; text-align: center; justify-content: center; }
}

/* ---------- Списки «для кого», примечания ---------- */
.check-list { max-width: 760px; margin: 0 auto; }
.check-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 16.5px;
  font-weight: 600;
  color: var(--navy);
}
.check-list li svg { color: var(--accent-strong); flex-shrink: 0; }

.callout {
  margin: 36px auto 0;
  max-width: 860px;
  padding: 26px 30px;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--accent-soft);
}
.callout p { margin-bottom: 10px; }
.callout p:last-child { margin-bottom: 0; }

.alert-warn {
  margin: 36px auto 0;
  max-width: 860px;
  padding: 20px 26px;
  border-radius: var(--radius);
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  text-align: center;
  font-size: 17px;
}

/* ---------- Цены ---------- */
.price-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
.price-card { padding: 34px 32px; }
.price-card h2 { font-size: 24px; margin-bottom: 20px; }
.price-card__title { display: flex; align-items: center; gap: 10px; }
.price-card__badge { font-size: 22px; line-height: 1; }
.price-card__badge--car { }
.price-card__badge--truck { }
.price-list { margin-bottom: 16px; }
.price-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px dashed var(--line);
}
.price-list li span { color: var(--ink); font-size: 15.5px; }
.price-list li b { color: var(--navy); font-size: 17px; white-space: nowrap; }
.price-note { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.price-img img { border-radius: var(--radius); box-shadow: var(--shadow); height: 100%; object-fit: cover; min-height: 260px; }

/* Раскладка цен по типу автомобиля: слева легковые, справа грузовые,
   общий блок почтенных цен растягивается на обе колонки. */
.price-layout--cars { grid-template-columns: 1fr 1fr; }
.price-layout--cars .price-card--common { grid-column: 1 / -1; }
.price-card--common { border-top: 3px solid var(--accent); }

@media (max-width: 991px) {
  .price-layout { grid-template-columns: 1fr; }
  .price-layout--cars .price-card--common { grid-column: 1; }
  .price-img img { min-height: 0; }
}

/* ---------- Каталог запчастей ---------- */
.parts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.part-card { overflow: hidden; text-align: center; transition: transform 0.2s, box-shadow 0.2s; }
.part-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.part-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.part-card h3 { font-size: 16px; padding: 16px 14px 18px; }

@media (max-width: 991px) { .parts-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px) { .parts-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 419px) { .parts-grid { grid-template-columns: 1fr; } }

/* ---------- Блок «Позвоните нам» ---------- */
.cta-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 40px;
  padding: 30px 34px;
  background: linear-gradient(120deg, var(--navy) 0%, var(--navy-soft) 100%);
  border: 0;
  color: #fff;
}
.cta-block h3 { color: #fff; font-size: 21px; margin-bottom: 6px; }
.cta-block p { color: var(--on-dark-muted); font-size: 15px; }
.cta-block__phones { display: flex; gap: 16px; flex-wrap: wrap; }
.cta-phone {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 22px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  transition: background 0.2s;
}
.cta-phone:hover { background: var(--accent); color: #fff; }
.cta-phone b { font-size: 16px; }
.cta-phone span { font-size: 12.5px; opacity: 0.8; }

/* ---------- Контакты ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 40px; }
.contact-unit { display: flex; flex-direction: column; gap: 20px; }
.contact-card__call { margin-top: 18px; width: 100%; }
/* На десктопе колонки одной высоты: карта растягивается на оставшееся место,
   чтобы пары «карточка + карта» заканчивались на одной линии,
   даже если в одном филиале два телефона, а в другом один */
@media (min-width: 992px) {
  .contact-unit .map-frame { flex: 1 1 auto; height: auto; min-height: 260px; }
}
.contact-card { padding: 30px 28px; }
.contact-card h3 { font-size: 20px; margin-bottom: 18px; }
.contact-list li { display: flex; gap: 14px; padding: 9px 0; }
.contact-list .icon { color: var(--accent-strong); margin-top: 4px; }
.contact-list b { display: block; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.contact-list .contact-list__value { color: var(--ink); font-weight: 600; }
.contact-list a { color: var(--ink); font-weight: 600; }
.contact-list a:hover { color: var(--accent-strong); }

/* Время работы скрыто по умолчанию, открывается по кнопке */
.hours-toggle {
  display: inline-block;
  margin-top: 4px;
  padding: 6px 12px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.hours-toggle:hover { background: var(--accent); color: #fff; }
.contact-hours__detail { margin-top: 8px; }

.map-frame {
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  width: 100%;
  height: 280px;
  background: var(--navy-soft);
  overflow: hidden;
}
.map-frame iframe {
  display: block;
  width: 100% !important;
  height: 100% !important;
  border: 0;
  border-radius: var(--radius);
}

@media (max-width: 991px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- Партнёрам ---------- */
.partner-benefits { max-width: 760px; margin: 0 auto 40px; }
.partner-benefits li {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.partner-benefits .icon { color: var(--accent-strong); margin-top: 4px; flex-shrink: 0; }
.partner-benefits p { color: var(--muted); }

/* ---------- Простая типографика внутри статей ---------- */
.text-block { max-width: 820px; margin: 0 auto; }
.text-block p { margin-bottom: 14px; color: var(--muted); font-size: 16.5px; }
.text-block h2 { font-size: 26px; margin: 34px 0 14px; }

/* ---------- Мобильная адаптация контента ---------- */
@media (max-width: 575px) {
  .hero { min-height: 420px; }
  .hero__title { font-size: 26px; }
  .hero__text { font-size: 15.5px; margin-bottom: 20px; }
  .section { padding: 48px 0; }
  .section-head { margin-bottom: 32px; }
  .counters { padding: 52px 0; }
  .how__col, .price-card, .contact-card, .cta-block { padding: 24px 20px; }
  .price-list li { flex-direction: column; align-items: flex-start; gap: 2px; }
  .price-list li b { white-space: normal; }
  .alert-warn { font-size: 15.5px; padding: 16px 18px; }
  .map-frame { height: 240px; }
  .check-list li { font-size: 15px; }
}