* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: #f8fafc;
  color: #0f172a;
}

/* HEADER */

header {
  background: white;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center; /* выравниваем логотип / телефоны / меню по вертикали */
}

.logo {
  display: flex;
  align-items: center;
  font-weight: 700;
}

.logo img {
  height: 60px;
  margin-right: 14px;
}

.logo-text {
  font-size: 14px;          /* размер не уменьшаем */
  font-weight: 500;         /* чуть легче, чем 600 */
  line-height: 1.2;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.02em;   /* добавляет воздуха */
}

nav {
  display: flex;
  align-items: center;
}

nav a {
  margin-left: 16px;
  text-decoration: none;
  color: #0f172a;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap; /* ← КЛЮЧЕВАЯ СТРОКА */
}

.burger {
  display: none;
  font-size: 26px;
  cursor: pointer;
}

/* Телефоны в шапке (desktop) */

.header-phones {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  margin-right: 20px;
}

/* Иконка телефона перед блоком номеров */
.header-phones::before {
  content: "";
  width: 16px;
  height: 16px;
  display: inline-block;
  background-image: url("images/icon-phone.svg");
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.8;
}

.header-phones a {
  font-size: 15px;
  font-weight: 500;
  color: #1f2933;
  text-decoration: none;
  white-space: nowrap;
}

/* Разделитель между номерами */
.header-phones a + a::before {
  content: "•";
  margin-right: 10px;
  color: #9ca3af;
}

.header-phones a:hover {
  color: #4659a5;
}

/* На мобилке телефоны в шапке скрываем */
@media (max-width: 768px) {
  .header-phones {
    display: none;
  }
}

/* На средних ширинах показываем только основной номер в шапке */
/* Средние экраны: шапка в две строки, чтобы всё влезало красиво */
  @media (min-width: 769px) and (max-width: 1100px) {
  .header-container {
    flex-wrap: wrap;       /* разрешаем перенос строк */
    row-gap: 6px;          /* небольшой вертикальный зазор между рядами */
  }

  /* Логотип + телефоны остаются в верхней строке */
  .header-phones {
    margin-right: 0;       /* чуть убираем отступ справа, даём место меню */
  }

  /* Меню переносим на вторую строку и выравниваем вправо */
  nav {
    width: 100%;
    justify-content: flex-end;
  }

  nav a {
    font-size: 14px;       /* чуть компактнее, но всё ещё читаемо */
    margin-left: 12px;     /* немного меньше зазор между пунктами */
  }

  /* В шапке показываем только основной номер, чтобы не было тесноты */
  .header-phones a:nth-child(2) {
    display: none;
  }
}


/* HERO */

.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 140px 20px 120px;
  color: white;
  overflow: hidden;
}

/* Мягкий затемняющий градиент */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(15,23,42,0.52) 0%,
    rgba(15,23,42,0.36) 40%,
    rgba(15,23,42,0.20) 70%,
    rgba(15,23,42,0.08) 100%
  );
  z-index: 0;
}



.hero-content {
    position: relative; /* чтобы текст был поверх затемнения */
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    text-align: left;   /* надписи по левому краю */
}



/* Заголовок с "обводкой" через text-shadow */
.hero-content h1 {
  font-size: 54px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 24px;
  text-shadow: 0 6px 18px rgba(0,0,0,0.4);
}


/* Подзаголовок */
.hero-content p {
  font-size: 20px;
  line-height: 1.6;
  max-width: 720px;
  margin: 0 0 36px 0;
  opacity: 0.95;
  text-shadow: 0 4px 12px rgba(0,0,0,0.4);
}


/* Кнопки */
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}


.hero-buttons button,
.hero-buttons a.telegram-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: #0088cc;
  color: white;
  padding: 12px 25px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.hero-buttons a.telegram-btn img.telegram-icon {
  width: 20px;
  height: 20px;
}

.hero-buttons a.telegram-btn:hover {
  background-color: #007ab8;
}

/* Основная кнопка */
.hero-buttons button {
  background-color: #ff9900;
  color: white;
}

.hero-buttons button:hover {
  background-color: #e68a00;
}

/* Мягкий "премиум" эффект кнопок */
.hero-buttons button,
.hero-buttons a.telegram-btn {
  border-radius: 10px;
  padding: 14px 28px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.22);
}

@media (hover: hover) {
  .hero-buttons button:hover,
  .hero-buttons a.telegram-btn:hover {
    transform: translateY(-2px);
  }
}


/* Телефоны в hero (показываем только на мобилке) */
.hero-phone {
  display: none;          /* desktop скрыт */
  margin-top: 20px;
  gap: 16px;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
}

.hero-phone a {
  font-size: 20px;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
  white-space: nowrap;
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

.hero-phone a:hover {
  text-decoration: underline;
}

/* Адаптив HERO и телефонов */
@media (max-width: 768px) {
  @media (max-width: 768px) {
  .hero {
    padding: 100px 20px 80px;
  }

  .hero-content h1 {
    font-size: 34px;
  }

  .hero-content p {
    font-size: 16px;
  }
}


  .hero-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .hero-phone {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-top: 26px;
  }

  .hero-phone a {
    font-size: 20px;
  }

  /* tel-ссылки без фона от браузера */
  .hero a[href^="tel"] {
    background: transparent !important;
    -webkit-tap-highlight-color: transparent;
  }
}

/* Секция контактов — отдельный фон */

#contacts {
  background: linear-gradient(180deg, #e8eff8, #f8fafc);
  padding: 100px 0;
}


section {
  padding: 80px 0;
}

/* Карточки */

.cards,
.image-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(250px,1fr));
  gap: 25px;
}

.card,
.image-card {
  background: white;
  padding: 25px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.05);
  transition: transform .35s ease, box-shadow .35s ease;
}

.image-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 45px rgba(0,0,0,.12);
}

.image-card img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 15px;
}

/* Базовый список контактов */

.contacts-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
}

.contacts-list a {
  color: #4659a5;
  text-decoration: none;
}

.map {
  margin-top: 40px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

form input,
form textarea {
  width: 100%;
  padding: 14px;
  margin-bottom: 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

footer {
  background: #0f172a;
  color: #cbd5f5;
  text-align: center;
  padding: 40px 20px;
}

/* NAV + бургер на мобилке */

@media (max-width: 768px) {
  nav a {
    font-size: 12px;
  }

  nav {
    display: none;
    flex-direction: column;
  }

  .burger {
    display: block;
  }
}

/* Лого на мобилке */

@media (max-width: 768px) {
  .logo img {
    height: 50px;
  }

  .logo-text {
    font-size: 12px;
  }
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
}

/* Кнопки */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 25px;
  font-size: 16px;
  font-weight: bold;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s;
  color: white;
}

.btn-form {
  background-color: #4659a5;
}

.btn-form:hover {
  background-color: #364180;
}

/* hover для карточек только при наличии мыши */

@media (hover: hover) {
  .image-card:hover,
  .adv-card:hover {
    cursor: pointer;
  }
}

/* ADVANTAGES CARDS */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.card {
  background: linear-gradient(180deg, #ffffff, #f1f5f9);
  padding: 22px 24px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0,0,0,.06);
  transition: transform .35s ease, box-shadow .35s ease;
  line-height: 1.5;
}

@media (hover: hover) {
  .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,.12);
  }
}

/* Сообщение об успешной отправке заявки */

.form-success {
  margin-bottom: 20px;
  padding: 15px 20px;
  border-radius: 10px;
  background: #e6f9ee;
  color: #065f46;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}

/* Карточка контактов и лэйаут */

.contacts-card {
  background: #ffffff;
  border-radius: 24px;
  padding: 40px 32px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

/* MOBILE-FIRST: контакты в колонку */

.contacts-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contacts-left,
.contacts-map {
  flex: none;
  min-width: 0;
}

.contacts-map {
  margin-top: 10px;
}

/* DESKTOP: контакты и карта в две колонки одинаковой высоты */

@media (min-width: 769px) {
  .contacts-card {
    padding: 40px 32px;
  }

  .contacts-layout {
    flex-direction: row;
    gap: 40px;
    align-items: stretch;
  }

  .contacts-left,
  .contacts-map {
    flex: 1 1 0;
  }

  .contacts-map {
    margin-top: 0;
    display: flex;
    flex-direction: column;
  }

  .contacts-map .map {
    flex: 1;
    margin-top: 0;
  }

  .contacts-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
  }
}

/* Мобильная настройка отступов и высоты карты в блоке Контакты */

@media (max-width: 768px) {
  .contacts-layout {
    gap: 16px;
  }

  .contacts-map {
    margin-top: 0;
  }

  .contacts-map .map {
    margin-top: 0;
  }

  .contacts-map iframe {
    height: 280px;
  }
}

/* Контакты с иконками */

.contact-item {
  position: relative;
  padding-left: 34px;
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.4;
  color: #0f172a;
}

.contact-item a {
  color: #4659a5;
  text-decoration: none;
}

.contact-item a:hover {
  text-decoration: underline;
}

.contact-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 18px;
  height: 18px;
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.85;
}

.contact-item.address::before {
  background-image: url("images/icon-location.svg");
}

.contact-item.phone::before {
  background-image: url("images/icon-phone.svg");
}

.contact-item.email::before {
  background-image: url("images/icon-mail.svg");
}
/* ===== MOBILE BURGER MENU (pushes content down + CSS animation) ===== */
@media (max-width: 768px) {
  /* чтобы nav уходил на новую строку и толкал контент вниз */
  .header-container {
    flex-wrap: wrap;
  }

  /* nav в потоке, без absolute — поэтому контент сдвигается вниз */
  #nav {
    position: static !important;
    display: flex !important;
    flex-direction: column;
    width: 100%;
    flex-basis: 100%;

    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;

    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 10px 30px rgba(0,0,0,.10);
    border-radius: 12px;

    transition:
      max-height 0.35s ease,
      opacity 0.25s ease,
      transform 0.25s ease;

    margin-top: 0;
    padding: 0;
  }

  body.nav-open #nav {
    max-height: 520px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;

    margin-top: 12px;
    padding: 10px 0;
  }

  #nav a {
    display: block;
    width: 100%;
    margin: 0;
    padding: 12px 18px;
    font-size: 16px;
    text-align: left;
  }

  #nav a:hover {
    background: #f1f5f9;
  }
}

/* ===== FIX: якоря секций не прячутся под sticky header ===== */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 120px;
}

#about, #catalog, #advantages, #services, #contacts {
  scroll-margin-top: 120px;
}

@media (min-width: 769px) {
  html { scroll-padding-top: 110px; }
  #about, #catalog, #advantages, #services, #contacts { scroll-margin-top: 110px; }
}


/* ===== header always above content ===== */
header{z-index:1000;}

.hero-content {
  animation: heroFade 0.9s ease forwards;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes heroFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

