: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;
  height: 100vh;
  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 .btn-primary{
  padding: 25px 50px;
  font-size: 2.4rem;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--window-width);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  height: 100%;
  text-align: left;
}

.hero-main-title {
  font-family: "Montserrat";
  font-size: clamp(2.8rem, 7vw, 3.5rem);
  font-weight: bold;
  line-height: 1.5;
  word-break: auto-phrase;
  hyphens: auto;
  max-width: 45%;
  margin: 0px 0px 100px;
  color: white;
}

/* --- Glass block with blur effect --- */
.hero-glass-block {
  position: relative;
  max-width: 600px;
  padding: 0;
  border-radius: 16px;
  z-index: 1;
}

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

/* Кнопка с линиями */
.numbers-button-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 40px 0;
  gap: 50px;
}

.numbers-button-wrapper .btn-primary {
  font-size: 2.5rem;
  white-space: nowrap;
  text-align: center;
  display: inline-block;
  transition: transform 0.3s ease;
}

/* Анимация при наведении */
.numbers-button-wrapper .btn-primary:hover {
  animation: tiltScale 0.6s ease-in-out;
}

/* Ключевые кадры: наклон влево → вправо → центр + масштаб */
@keyframes tiltScale {
  0% {
    transform: rotate(0deg) scale(1);
  }
  25% {
    transform: rotate(-3deg) scale(1.05);
  }
  50% {
    transform: rotate(3deg) scale(1.05);
  }
  75% {
    transform: rotate(-2deg) scale(1.03);
  }
  100% {
    transform: rotate(0deg) scale(1);
  }
}

.numbers-button-wrapper .line {
  flex-grow: 1;
  height: 1px;
  background-color: var(--maincolor);
}

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

.bid-container{
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Вторая кнопка */
.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;
}

/* секция 2 блока */
.guarantee-section {
  background-color: white;
  padding: 60px 20px;
  color: white;
}

.guarantee-container {
  display: flex;
  gap: 40px;
  justify-content: space-between;
  flex-wrap: wrap;
  max-width: var(--window-width);
  margin: 0 auto;
}

.guarantee-item {
  position: relative;
  background-color: white;
  padding: 150px 30px 30px; /* сверху больше, чтобы освободить место под иконку */
  border-radius: 15px;
  border: solid var(--maincolor);
  flex: 1 1 calc(50% - 20px);
  box-sizing: border-box;
  text-align: center;
  overflow: visible;
}

.guarantee-icon-wrapper {
  position: absolute;
  top: -40px; /* иконка выходит за пределы */
  left: 50%;
  transform: translateX(-50%);
}

.guarantee-icon {
  width: 200px;
  height: 200px;
  object-fit: contain;
}

.guarantee-text {
  text-align: left;
}

.guarantee-text p {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: black;
  font-family: "Montserrat";
}

.guarantee-text ul {
  padding-left: 20px;
  color: black;
  margin: 0;
  font-size: 1.5rem;
  font-family: "Montserrat";
  list-style-type: disc;
}

/* Секция */
.info-toggle-section {
  background-color: white;
  padding: 60px 20px;
}

/* Контейнер */
.info-toggle-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  max-width: var(--window-width);
  margin: 0 auto;
}

/* Блок кнопки и раскрытия */
.toggle-block {
  width: 100%;
  max-width: var(--window-width);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

/* Кнопки */
.toggle-btn {
  padding: 15px 25px;
  font-family: "Montserrat";
  color: #fff;
  border: none;
  border-radius: 15px;
  font-size: 3.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  box-sizing: border-box;
  z-index: 2;
  position: relative;
}

.format-btn {
  background-color: var(--maincolor);
}

.audience-btn {
  background-color: var(--maindark);
}

/* Галочка */
.toggle-icon {
  width: 40px;
  height: 25px;
  transition: transform 0.3s ease;
}

.toggle-btn.active .toggle-icon {
  transform: rotate(180deg);
}

/* Контент */
.toggle-content {
  display: none;
  padding: 100px 50px 20px;
  border-radius: 15px;
  width: 100%;
  max-width: var(--window-width);
  box-sizing: border-box;
  margin-top: -40px; /* поднимаем блок вверх */
  z-index: 1;
}

/* Индивидуальные цвета */
.format-content {
  background-color: var(--maindark);
}

.audience-content {
  background-color: var(--maincolor);
}

.toggle-content ul {
  list-style-type: disc;
  padding-left: 20px;
  font-size: 2.0rem;
  font-family: "Montserrat";
  color: white;
}

.toggle-content ul li {
  padding-bottom: 30px;
}

/* --- Adaptive styles --- */
@media (max-width: 1024px) {
  .hero {
    height: 50vh;
    justify-content: start;
    background-position: -300px center;
  }

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

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

  .hero-bg {
    width: auto;
    height: auto;
  }

  .hero p {
    font-size: 1.0rem;
    margin: 0 0 20px;
  }

  .hero-glass-block p {
    font-size: 1.2rem;
    margin: 0;
  }

  .hero .btn-primary {
    padding: 15px 10px;
    font-size: 1.2rem;
  }

  .numbers-button-wrapper {
    gap: 10px;
    margin: 20px 0;
  }
  
  .bid-section{
    padding: 0;
  }

  .bid-container {
    gap: 0;
  }

  .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;
  }

  .guarantee-section {
    padding: 30px 10px;
  }

  .guarantee-container {
    flex-direction: column;
  }

  .guarantee-item {
    flex: 1 1 100%;
    padding: 50px 10px 10px;
  }

  .guarantee-icon {
    width: 80px;
    height: 80px;
  }

  .guarantee-icon-wrapper {
    top: -20px;
  }

  .guarantee-text p,
  .guarantee-text ul {
    font-size: 1rem;
  }

  .info-toggle-section {
    padding: 10px 10px 40px;
  }

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

  .toggle-icon {
    width: 20px;
    height: 15px;
  }

  .toggle-content ul {
    font-size: 1rem;
  }

  .toggle-content ul li{
    padding-bottom: 10px;
  }

  .toggle-content {
    padding: 20px;
    margin-top: -20px;
  }

}
