:root {
  --primary: #295CC9;
  --dark: #062D0E;
  --light: #F9FAFD;
}

body { 
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; 
  background: var(--light); 
  font-size: 1.25rem;
}

/* ====== STICKY HEADER ====== */
.navbar { 
  position: relative;
  width: 100%; 
  z-index: 1030; 
}

/* ====== LOGO ====== */
.logo-wrapper { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  text-decoration: none; 
  color: inherit; 
}

.logo-icon { 
  font-size: 17px; 
  line-height: 1;
}

.logo-text { 
  font-size: 18px; 
  font-weight: 400; 
  letter-spacing: -0.3px; 
}

.logo-slogan { 
  font-size: 18px; 
  font-weight: 400;
  color: #666;
  margin-left: 8px;
  padding-left: 8px;
  border-left: 1px solid #ddd;
}

/* ====== HERO с фоном ====== */
.hero-section {
  position: relative;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url('/assets/fon.webp') center/cover no-repeat;
  padding-top: 9.3rem;
  padding-bottom: 9.3rem;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: #fff;
  text-align: center;
  padding: 0 1rem;
  max-width: 1100px;
}

.hero-lead {
  font-size: 3.0rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-sub {
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.5;
  opacity: 0.95;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  white-space: pre-line;
}

@media (max-width: 768px) {
  .hero-lead { font-size: 1.8rem; }
  .hero-sub { font-size: 1.2rem; }
  .hero-section { min-height: 500px; }
}

/* ====== ACCORDION ====== */
.accordion-button:not(.collapsed) { 
  background: var(--primary); 
  color: #fff; 
}

.accordion-button:focus { 
  box-shadow: none; 
}

/* ====== СТАТИСТИКА с фоном ====== */
#voronka {
  position: relative;
  background: url('/assets/fon-2.webp') center/cover no-repeat;
  overflow: hidden;
}

#voronka::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

#voronka .container {
  position: relative;
  z-index: 2;
}

.stat-arrow {
  text-shadow: 0 2px 8px rgba(0,0,0,0.8);
  opacity: 0.95;
  line-height: 1;
  font-weight: normal;
}

#voronka .col-stat {
  flex: 0 0 30%;
  max-width: 30%;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.stat-card {
  aspect-ratio: 1 / 1;
  height: auto;
  width: 100%;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3) !important;
}

@media (max-width: 767px) {
  .stat-card {
    aspect-ratio: auto;
    min-height: 140px;
  }
}

@media (max-width: 991px) and (min-width: 768px) {
  #voronka .col-stat {
    flex: 0 0 35%;
    max-width: 35%;
  }
  .stat-card {
    padding: 1rem !important;
  }
}

/* ====== FOOTER ====== */
footer { 
  background: var(--dark); 
  color: #fff; 
}

footer a { 
  color: #ccc; 
}

footer a:hover { 
  color: #fff; 
}

/* ====== БЛОК СТОИМОСТЬ ====== */
.section-subtitle {
  font-size: 1.6rem;
  font-weight: 400;
  color: #212529;
  margin-bottom: 1rem;
}

/* Три прямоугольника в ряд (десктоп) */
.price-cards-trio {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.price-card-compact {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 16px;
  padding: 24px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.price-card-compact h3 {
  font-size: 1.58rem;
  color: #6c757d;
  letter-spacing: 1px;
  margin-bottom: 0;
  font-weight: 600;
  min-height: 3.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Контейнер для цены и описания */
.price-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Прижимаем содержимое к верху */
  align-items: center;
  margin-top: 8px;
  padding-top: 20px; /* Отступ сверху для выравнивания */
}

.price-card-compact .amount {
  font-size: 2.17rem;
  font-weight: 700;
  color: #295CC9;
  margin: 0;
  transition: all 0.3s ease;
  line-height: 1.2;
  height: 2.6rem; /* Фиксированная высота для выравнивания */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Для текста "По запросу" - убираем auto margin, делаем как обычный текст */
.price-card-compact .amount.request-text {
  font-size: 1.5rem;
  color: #6c757d;
  margin: 0;
  height: 2.6rem; /* Та же высота что и у цены */
  display: flex;
  align-items: center;
  justify-content: center;
}

.price-card-compact small {
  color: #212529;
  line-height: 1.3;
  margin-top: 8px;
}

.test-drive-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 10px 0;
}

/* Кнопки количества - растянуты на всю ширину */
.quantity-section {
  margin-bottom: 20px;
  width: 100%;
}

.quantity-section h3 {
  color: #212529;
}

.quantity-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 10px;
  width: 100%;
}

.quantity-btn {
  background: white;
  border: 2px solid #dee2e6;
  border-radius: 10px;
  padding: 12px 8px;
  cursor: pointer;
  font-size: 1.15rem;  /* ← было 1.1rem, стало 1.25rem */
  font-weight: 600;
  color: #212529;
  transition: all 0.2s ease;
  text-align: center;
  white-space: nowrap;
  width: 100%;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.quantity-btn:hover {
  border-color: #295CC9;
  background: #f0f4ff;
}

.quantity-btn.active {
  background: #295CC9;
  color: white;
  border-color: #295CC9;
  box-shadow: none;
}

/* Скрыть элемент */
.hidden-label {
  display: none !important;
}

/* Для примеров бюджетов */
.price-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.price-card {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
}

/* ====== МОБИЛЬНАЯ АДАПТАЦИЯ ====== */
@media (max-width: 991px) {
  .price-cards-trio {
    gap: 15px;
  }
  
  .price-card-compact {
    padding: 20px 12px;
    min-height: 260px;
  }
  
  /* Кнопки в 3 ряда по 3, но меньшей ширины */
  .quantity-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-width: 500px; /* Ограничиваем ширину */
    margin: 0 auto; /* Центрируем */
  }
  
  .quantity-btn {
    font-size: 1.25rem; /* Как fs-5 - "Оплата только за результат" */
    padding: 10px 4px; /* Уменьшаем боковые отступы */
  }
  
  /* Увеличиваем шрифт описаний на мобильных до fs-5 */
  .price-card-compact small,
  .test-drive-content p {
    font-size: 1.25rem !important; /* Принудительно fs-5 */
  }
}

@media (max-width: 768px) {
  .price-cards-trio {
    gap: 12px;
  }
  
  .price-cards {
    grid-template-columns: 1fr;
  }
  
  .section-subtitle {
    font-size: 1.4rem;
  }
  
  /* Для мобильных кнопок */
  .quantity-btn {
    font-size: 1.25rem;
    min-width: auto;
    padding: 10px 2px;
  }
  
  /* Увеличиваем шрифт в мобильных карточках */
  .price-card-compact small.fs-6 {
    font-size: 1.25rem !important;
  }
}

@media (max-width: 576px) {
  .quantity-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    max-width: 100%; /* На совсем узких всю ширину */
  }
  
  .quantity-btn {
    padding: 8px 2px;
    font-size: 1.25rem;
  }
  
  .price-card-compact h3 {
    font-size: 1.3rem;
    min-height: auto;
  }
  
  .price-card-compact .amount,
  .price-card-compact .amount.request-text {
    font-size: 1.8rem;
    height: auto;
  }
  
  /* Увеличиваем шрифт текста в мобильном тест-драйве */
  .price-card-compact .fs-6 {
    font-size: 1.25rem !important;
  }
}

/* ====== ФИНАЛЬНЫЕ ДОРАБОТКИ ====== */

/* "По запросу" - такой же стиль как у цены 300р */
.price-card-compact .amount.request-text {
  font-size: 2.17rem; /* = размеру цены */
  color: #295CC9; /* = синий цвет цены */
  margin: 0;
  height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Мобильный тест-драйв - компактнее */
.mobile-test-drive {
  max-width: 320px;
  min-height: auto;
  padding: 15px;
}

.mobile-text {
  font-size: 1.25rem;
}

/* На узких экранах уменьшаем высоту карточек при "По запросу" */
@media (max-width: 768px) {
  .price-card-compact {
    min-height: auto !important;
    padding: 15px 10px;
  }
  
  .price-cards-trio {
    gap: 10px;
  }
  
  .price-content {
    padding-top: 10px;
  }
  
  .price-card-compact .amount,
  .price-card-compact .amount.request-text {
    font-size: 1.6rem;
    height: auto;
    min-height: 2rem;
  }
  
  .price-card-compact small {
    margin-top: 4px;
    font-size: 1rem !important;
  }
}

@media (max-width: 576px) {
  .mobile-test-drive {
    max-width: 280px;
    padding: 12px;
  }
  
  .mobile-text {
    font-size: 1.1rem;
  }
  
  .price-card-compact .amount,
  .price-card-compact .amount.request-text {
    font-size: 1.5rem;
  }
}

@media (max-width: 991px) {
  .navbar-collapse .d-flex {
    justify-content: center !important;
    margin-left: 0 !important;
    margin-top: 0.5rem;
    padding-bottom: 0.5rem;
  }
}

.hero-content .btn-primary {
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  font-weight: 500;
}

#podhod .btn-outline-primary {
  font-weight: 700;
}

/* Общие стили для outline кнопок при наведении */
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: #e7f1ff !important;
  border-color: #295CC9 !important;
  color: #295CC9 !important;
  box-shadow: none !important;
}

/* Для кнопки в шапке (чтобы не было белого текста на белом фоне) */
.navbar .btn-outline-primary:hover,
.navbar .btn-outline-primary:focus {
  background-color: #e7f1ff !important;
  border-color: #295CC9 !important;
  color: #295CC9 !important;
}