:root {
  --maincolor: #4B6DFE;
  --maindark: #272168;
  --window-width: 1200px;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: sans-serif;
  background: #fff; /* фон под canvas, можно поменять на градиент или темный цвет */
  overflow-x: hidden;
}

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/Montserrat-VariableFont_wght.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

/* --- Overlay для десктопа --- */
#desktop-overlay {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  height: calc(100% - var(--header-height));
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease;
  z-index: 2500; /* ниже шапки (3000), выше остальных элементов */
}

#desktop-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin-top: var(--header-height);
}

/* Фоновое изображение */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

/* Обёртка для двух колонок */
.hero-wrapper {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 60px;
  width: 100%;
  max-width: var(--window-width);
  z-index: 1;
  position: relative;
}

.hero .btn-primary{
  padding: 25px 50px;
  font-size: 2.4rem;
}

/* Левая часть */
.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  margin-top: 50px;
}

.hero-main-title {
  font-family: "Montserrat";
  font-size: clamp(2.2rem, 7vw, 2.5rem);
  font-weight: bold;
  word-break: auto-phrase;
  hyphens: auto;
  margin: 0px 0px 20px;
  color: black;
}

.hero p {
  max-width: 550px;
  font-family: "Montserrat";
  font-size: 1.2rem;
  line-height: 1.5;
  margin-top: 0;
  margin-bottom: 50px;
  color: black;
  margin-bottom: 30px;
}

.contact-right p {
  max-width: 550px;
  font-family: "Montserrat";
  font-size: 1.2rem;
  line-height: 1.5;
  color: white;
  margin: 0;
}

/* Кнопки контактов */
.contact-buttons {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: stretch; /* ← растягивает кнопки на одинаковую ширину */
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 20px;

  padding: 5px 5px;
  font-family: "Montserrat";
  background-color: var(--maincolor);
  color: #fff;
  border-color: var(--maincolor) !important;
  border: solid;
  text-decoration: none;
  border-radius: 15px;
  font-size: 1.2rem;

  width: 100%;           /* ← занимает всю ширину родителя */
  max-width: 400px;      /* ← ограничение ширины, если нужно */
  box-sizing: border-box;
  justify-content: flex-start; /* ← выравнивание содержимого по левому краю */
}

.contact-buttons .contact-btn:hover {
  background-color: #fff;
  color: var(--maincolor);
}

.contact-buttons .btn-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

/* Правая часть */
.contact-right {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  margin-top: 50px;
}

#contactForm {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 450px;
}

/* Общие стили для всех input и textarea */
#contactForm input[type="text"],
#contactForm input[type="tel"],
#contactForm input[type="email"],
#contactForm input:not([type="checkbox"]),
#contactForm textarea,
#contactForm select {
  background-color: white;
  color: black;
  font-size: 1.2rem;
  padding: 10px 15px;
  font-family: "Montserrat";
  outline: none;
  width: 100%;
  border-radius: 15px;
}

#contactForm input:not([type="checkbox"])::placeholder,
#contactForm textarea::placeholder {
  color: black;
  opacity: 0.7;
}

#contactForm input:not([type="checkbox"]):focus,
#contactForm input:not([type="checkbox"]):not(:placeholder-shown),
#contactForm textarea:focus,
#contactForm textarea:not(:placeholder-shown),
#contactForm select:focus {
  background-color: white;
  color: black;
  border-radius: 15px;
  padding: 10px 15px;
}

/* Текстовая подсказка */
.form-note {
  font-size: 1rem;
  color: grey;
  font-family: "Montserrat", sans-serif;
  margin-bottom: -10px;
}

/* Селект */
#contactForm select {
  background-color: white;
  color: black;
  border-radius: 15px;
  padding: 10px 15px;
  font-family: "Montserrat", sans-serif;
  font-size: 1.2rem;
}

/* Кнопка */
button[type="submit"] {
  padding: 15px 25px;
  font-family: "Montserrat";
  background-color: var(--maincolor);
  color: #fff;
  border-color: var(--maincolor) !important;
  border: solid;
  text-decoration: none;
  border-radius: 15px;
  font-size: 1.4rem;
}

button[type="submit"]:hover {
  background-color: #fff;
  color: var(--maincolor);
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: white;
  font-family: "Montserrat", sans-serif;
}

/* Чекбокс — кастомный */
.checkbox-wrapper input[type="checkbox"] {
  appearance: none;
  width: 28px;
  height: 26px;
  border: 2px solid white;
  border-radius: 4px;
  background-color: transparent;
  cursor: pointer;
  position: relative;
  display: inline-block;
  vertical-align: middle;
  transition: background-color 0.3s ease;
}

/* Галочка — синяя, фон белый */
.checkbox-wrapper input[type="checkbox"]:checked {
  background-color: white;
}

.checkbox-wrapper input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  display: block;
  left: 7px;
  top: 2px;
  width: 6px;
  height: 12px;
  border: solid var(--maindark);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Модальное окно */
.modal {
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: #fff; /* белый фон */
  color: #000; /* чёрный текст */
  padding: 30px 40px;
  border: 3px solid var(--maincolor); /* рамка цвета maincolor */
  border-radius: 12px;
  width: 60%;
  max-width: 400px;
  text-align: center;
  font-size: 1.4rem;
  font-family: 'Montserrat', sans-serif;
  animation: slideIn 0.3s ease;
  position: relative;
}

/* Кнопка закрытия */
.modal-close {
  color: var(--maincolor);
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--maindark);
}

/* Анимация появления */
@keyframes slideIn {
  from {
    transform: translateY(-20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* bid section */
.bid-section {
  background-color: var(--maindark);
  padding: 50px 0px;
}

.bid-container{
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: center;
  justify-content: center;
}

/* Вторая кнопка */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: white;
  text-decoration: none;
  font-family: "Montserrat";
  font-size: 1.4rem;
  transition: text-decoration 0.3s ease;
}

.btn-secondary:hover span {
  text-decoration: underline;
}

.btn-secondary-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* --- Adaptive styles --- */
@media (max-width: 1024px) {
  .hero {
    justify-content: start;
    background-position: -400px center;
    background-color: var(--maindark);
  }

  .hero p{
    color: white;
  }

  .hero-content {
    justify-content: flex-start; /* убираем центрирование по вертикали */
    height: auto; /* больше не растягиваем на всю высоту */
    padding: 0;
    align-items: normal;
  }

  .hero-bg {
    display: none;
  }

  .hero-main-title {
    font-size: clamp(
      1.2rem,
      8vw,
      2.5rem
    ); /* больше на мобилке, но уменьшается для маленьких экранов */
    margin-bottom: 35px; /* больше отступа до блока */
    font-weight: 600;
    color: white;
  }

  .btn-primary {
    text-align: center;
  }

  .numbers-button-wrapper {
    gap: 10px;
  }

  .numbers-button-wrapper .btn-primary {
    font-size: 1.2rem;
  }

  .hero-main-title {
    font-weight: 600;
    margin-bottom: 20px;
  }

  .btn-secondary {
    font-size: 1.2rem;
  }

  .btn-secondary-icon {
    width: 20px;
    height: 20px;
  }
  
  .hero-wrapper {
    flex-direction: column;
    gap: 0;
    padding: 0 10px 30px;
  }

  .hero-content,
  .contact-right {
    width: 100%;
  }

  #contactForm {
    max-width: 100%;
  }

  #emailInput,
  button[type="submit"] {
    font-size: 1.2rem;
    padding: 10px;
  }

  .checkbox-wrapper input[type="checkbox"] {
    width: 25px;
    height: 18px;
  }

  .checkbox-wrapper input[type="checkbox"]:checked::after{
    left: 4px;
    top: -1px;
    width: 5px;
    height: 12px;
  }

  .modal-content {
    width: 90%;
    padding: 20px;
    font-size: 1.2rem;
  }

  .bid-section {
    padding: 20px 0px;
  }
}
