/* === Подключение локального шрифта OpenSans-CondLight === */
@font-face {
  font-family: 'OpenSans-CondLight';
  src: url('../fonts/OpenSans-CondLight.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Uniwars';
  src: url('../fonts/uniwarsbl-regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #000000f1;
  color: #fff;
  font-family: "OpenSans-CondLight", sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
  overflow-y: scroll;
  height: 100vh;
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32'><line x1='0' y1='16' x2='32' y2='16' stroke='yellow' stroke-width='1'/><line x1='16' y1='0' x2='16' y2='32' stroke='yellow' stroke-width='1'/><circle cx='16' cy='16' r='2' fill='gray'/></svg>") 16 16, crosshair;
}

/* === 12 колонок (декоративные) === */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 60px;
  right: 60px;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
  background-image: repeating-linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0px,
    rgba(255, 255, 255, 0) calc((100% / 12) - 10px),
    transparent calc((100% / 12) - 10px),
    transparent calc(100% / 12)
  );
  background-size: 100% 100%;
  border-left: 2px solid rgba(49, 47, 47, 0.03);
  border-right: 2px solid rgba(49, 47, 47, 0.03);
}

/* === Минималистичный курсор прицел === */
.cyber-cursor {
  position: fixed;
  width: 60px;
  height: 60px;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  display: none;
}

.cyber-cursor .outer-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(251, 255, 41, 0.7);
  border-radius: 50%;
  box-sizing: border-box;
}
.cyber-cursor .inner-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  background: rgba(251, 255, 41, 0);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.cyber-cursor .crosshair-h {
  position: absolute;
  top: 50%;
  left: -8px;
  width: 4px;
  height: 1px;
  background: rgb(251, 255, 41, 0.9);
  transform: translateY(-50%);
}
.cyber-cursor .crosshair-h-right {
  position: absolute;
  top: 50%;
  right: -8px;
  width: 4px;
  height: 1px;
  background: rgb(251, 255, 41, 0.9);
  transform: translateY(-50%);
}
.cyber-cursor .crosshair-v {
  position: absolute;
  left: 50%;
  top: -8px;
  width: 1px;
  height: 4px;
  background: rgb(251, 255, 41, 0.9);
  transform: translateX(-50%);
}
.cyber-cursor .crosshair-v-bottom {
  position: absolute;
  left: 50%;
  bottom: -8px;
  width: 1px;
  height: 4px;
  background: rgb(251, 255, 41, 0.9);
  transform: translateX(-50%);
}

/* === 3D Кубик === */
.cube-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform-style: preserve-3d;
  z-index: 1;
  pointer-events: none;
}

.cube {
  position: relative;
  width: 200px;
  height: 200px;
  transform-style: preserve-3d;
  transform: translate(-50%, -50%) rotateX(0deg) rotateY(0deg);
}

.cube-face {
  position: absolute;
  width: 200px;
  height: 200px;
  background: linear-gradient(45deg, #8a2be2, #4b0082);
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 30px rgba(150, 0, 255, 0.7),
              0 0 30px rgba(150, 0, 255, 0.5);
  opacity: 0.8;
}

.cube-face-front  { transform: translateZ(100px); }
.cube-face-back   { transform: rotateY(180deg) translateZ(100px); }
.cube-face-right  { transform: rotateY(90deg) translateZ(100px); }
.cube-face-left   { transform: rotateY(-90deg) translateZ(100px); }
.cube-face-top    { transform: rotateX(90deg) translateZ(100px); }
.cube-face-bottom { transform: rotateX(-90deg) translateZ(100px); }

/* === Сетка канвас 50x50 с подсветкой === */
#gridCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 2;
  display: block;
  background-color: transparent;
}

/* === Контент === */
.content {
  position: relative;
  width: 100%;
  z-index: 10;
}

.accent {
  color: rgba(255, 149, 0, 0.89);
}

/* === Анимация текста === */
.text-animated {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.text-animated.visible {
  opacity: 1;
  transform: translateY(0);
}

.typewriter {
  overflow: hidden;
  border-right: 2px solid rgba(255, 149, 0, 0.89);
  white-space: normal;
  word-wrap: break-word;
  animation: blink-caret 0.75s step-end infinite;
  opacity: 0;
}

.typewriter.animating {
  opacity: 1;
}

.typewriter.finished {
  border-right: none;
}

/* === Плавное всплытие текста === */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 2.0s ease, transform 0.8s ease;
}

.fade-up.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: rgba(255, 149, 0, 0.89); }
}

/* === Специальные классы для разных анимаций === */
.fade-in {
  opacity: 0;
  transition: opacity 2s ease-out;
}

.fade-in.show {
  opacity: 1;
}

/* === Управление текстами отдельно === */
.text-header {
  font-size: 1.5vw;
  text-align: center;
  margin: 60px 20px 20px;
  color: rgba(255, 149, 0, 0.826);
  font-family: 'OpenSans-CondLight', sans-serif;
}

.text-intro {
  font-size: 1.5vw;
  text-align: center;
  padding: 10px 5vw 20px;
  color: rgba(253, 216, 193, 0.628);
  font-family: 'OpenSans-CondLight', sans-serif;
}

.text-details {
  font-size: 1.5vw;
  text-align: center;
  padding: 0 5vw 60px;
  color: rgba(253, 216, 193, 0.667);
  font-family: 'OpenSans-CondLight', sans-serif;
}

/* === Герой-секция с видео и оверлеем === */
.hero-section {
  position: relative;
  width: calc(100% - 120px);
  margin: 20px auto 0;
  max-width: 2800px;
}

/* Контейнер для видео */
.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 42.25%;
  overflow: hidden;
  border-radius: 0px;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 50px;
  opacity: 0.;
  cursor: none;
  border: 3px solid rgb(54, 54, 54);
}

/* Контейнер для оверлея */
.hero-overlay-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: 0%;
  box-sizing: border-box;
  pointer-events: none;
  z-index: 10;
}

.hero-overlay-image {
  width: 10%;
  height: 13%;
  object-fit: contain;
  display: block;
  opacity: 0.5;
  cursor: none;
  pointer-events: auto;
  position: absolute;
  top: 0;
  right: 50;
  z-index: 11;
}

/* === Новые текстовые блоки под видео === */
.new-video-texts {
  text-align: center;
  margin: 20px auto;
  max-width: 1200px;
  position: relative;
  z-index: 7;
  margin-bottom: 380px;
}

.new-video-text-header {
  font-size: 1.5vw;
  margin: 20px 20px 10px;
  color: rgba(255, 149, 0, 0.826);
  font-family: 'OpenSans-CondLight', sans-serif;
}

.new-video-text-intro {
  font-size: 1.5vw;
  padding: 10px 5vw 20px;
  color: rgba(253, 216, 193, 0.628);
  font-family: 'OpenSans-CondLight', sans-serif;
}

/* === Сетка блоков услуг === */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 80px;
  padding: 10px 5vw;
  max-width: 2800px;
  margin: 0 auto;
}

.service-block {
  background: rgba(37, 0, 54, 0.3);
  border: 2px solid rgba(255, 149, 0, 0);
  padding: 400px;
  text-align: center;
  transition: none;
  transform: scale(1);
  transform-origin: center;
}

.service-block.image-block {
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-block.image-block img {
  max-width: 100%;
  height: auto;
  border: 10px solid rgba(41, 38, 36, 0.808);
}

/* === Индивидуальные стили для каждого блока === */

/* Блок №1 - Текстовый блок УСЛУГИ */
.block-1 {
  background: rgba(46, 0, 65, 0);
  border-color: rgba(56, 54, 50, 0);
  text-align: left;
  padding: 600px;
  min-height: 450px;
}

.block-1 h3 {
  font-size: 1.2vw;
  color: rgba(255, 149, 0, 0.826);
  margin-bottom: 20px;
  font-family: 'OpenSans-CondLight', sans-serif;
  opacity: 0;
}

.block-1 p {
  font-size: 1.1vw;
  color: rgba(253, 216, 193, 0.667);
  font-family: "Calibri Light", sans-serif;
  line-height: 1.6;
  opacity: 0;
  margin: 10px 0;
}

/* Блок №2 - Блок с картой */
.block-2 {
  padding: 1px;
  background: rgba(46, 0, 65, 0);
  border-color: rgba(255, 149, 0, 0);
  margin: 20px;
  min-height: 800px;
}

/* Блок №3 - Текстовый блок ГДЕ МЫ НАХОДИМСЯ */
.block-3 {
  background: rgba(46, 0, 65, 0);
  border-color: rgba(255, 149, 0, 0);
  text-align: left;
  padding: 30px;
  min-height: 500px;
}

.block-3 h3 {
  font-size: 1.2vw;
  color: rgba(255, 149, 0, 0.826);
  margin-bottom: 20px;
  font-family: 'OpenSans-CondLight', sans-serif;
  opacity: 0;
}

.block-3 p {
  font-size: 1.1vw;
  color: rgba(253, 216, 193, 0.667);
  font-family: "Calibri Light", sans-serif;
  line-height: 1.6;
  opacity: 0;
  margin: 10px 0;
}

/* Блок №4 - Блок с картинкой «Вход» */
.block-4 {
  padding: 50px;
  background: rgba(46, 0, 65, 0);
  border-color: rgba(255, 149, 0, 0);
}

/* Блок №5 - Текстовый блок ЮРИДИЧЕСКИЙ ОТДЕЛ */
.block-5 {
  background: rgba(46, 0, 65, 0);
  border-color: rgba(255, 149, 0, 0);
  margin-top: 20px;
  padding: 30px;
}

.block-5 h3 {
  font-size: 1.2vw;
  color: rgba(255, 149, 0, 0.826);
  margin-bottom: 20px;
  font-family: 'OpenSans-CondLight', sans-serif;
  opacity: 0;
}

.block-5 p {
  font-size: 1.1vw;
  color: rgba(253, 216, 193, 0.667);
  font-family: "Calibri Light", sans-serif;
  line-height: 1.6;
  opacity: 0;
  margin: 10px 0;
}

/* Блок №6 - Блок с картинкой «Салон» */
.block-6 {
  background: rgba(46, 0, 65, 0);
  border-color: rgba(255, 149, 0, 0);
  padding: 30px;
}

/* === Блоки-преимущества === */
.benefits {
  padding: 180px 5vw;
  text-align: center;
  margin-top: 150px;
}

.benefits .register {
  width: 400px;
  margin: 0 auto 40px;
  padding: 20px;
  border: 4px solid rgba(62, 53, 40, 0.724);
  color: rgba(253, 216, 193, 0.667);
  font-size: 0.9vw;
  font-family: "Calibri Light", sans-serif;
  background: rgb(37, 0, 54);
}

.benefits .row {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 20px;
}

.benefits .block {
  width: 400px;
  padding: 20px;
  border: 4px solid rgba(62, 53, 40, 0.724);
  color: rgba(253, 216, 193, 0.667);
  font-size: 0.9vw;
  font-family: "Calibri Light", sans-serif;
  background: rgb(37, 0, 54);
  opacity: 0;
  transition: opacity 1.5s ease;
}

.benefits .block.show {
  opacity: 1;
}

/* === Подвал === */
.footer {
  padding: 60px 20px;
  text-align: center;
}

.footer .logo-bg {
  width: 100%;
  max-width: 1750px;
  height: 755px;
  background: rgba(84, 0, 157, 0.451);
  margin: 60px auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer .company-name {
  font-family: "Uniwars", sans-serif;
  font-size: 5.5vw;
  color: rgba(253, 216, 193, 0.667);
  text-align: center;
  line-height: 1.2;
}

.footer .final-text {
  font-size: 0.9vw;
  font-family: "Calibri Light", sans-serif;
  color: rgba(253, 216, 193, 0.667);
  max-width: 1200px;
  margin: 40px auto 0;
  line-height: 1.4;
  opacity: 0;
  transition: opacity 1.5s ease;
}

.footer .final-text.show {
  opacity: 1;
}

/* === Кнопка "На главную" === */
.hero-section-wrapper {
  position: relative;
  width: calc(100% - 120px);
  margin: 20px auto 0;
  max-width: 2800px;
}

.back-to-main {
  display: inline-block;
  padding: 10px 15px;
  background: rgba(62, 65, 23, 0.395);
  color: hsl(61, 100%, 58%);
  text-decoration: none;
  border-radius: 0 20px 0 15px;
  border: 5px solid rgb(23, 23, 23);
  outline: 2px solid hsl(59, 36%, 24%);
  font-family: 'Calibri', sans-serif;
  font-size: 0.7vw;
  transition: all 0.3s ease;
  position: absolute;
  top: 100%;
  left: 60px;
  z-index: 10;
  transform: translateY(30px);
}

.back-to-main:hover {
  background: hsl(61, 100%, 58%);
  color: hsl(0, 0%, 0%);
  border: 5px solid rgb(23, 23, 23);
  outline: 2px solid hsl(59, 36%, 24%);
}

/* === СТИЛИ ДЛЯ РАСТЯНУТЫХ БЛОКОВ === */

/* Секции для растянутых блоков */
.stretched-section {
  width: calc(100% - 250px);
  margin: 0 auto 100px auto;
  max-width: 2800px;
  position: relative;
  z-index: 10;
  display: block;
}

/* Первый растянутый блок - УСЛУГИ */
.stretched-section:nth-child(3) {
  margin-bottom: 400px;
}

/* Второй растянутый блок - КАРТА */
.stretched-section:nth-child(4) {
  margin-bottom: 400px;
}

/* Третий растянутый блок - ГДЕ МЫ НАХОДИМСЯ */
.stretched-section:nth-child(5) {
  margin-bottom: 400px;
}

/* Растянутые блоки */
.stretched-block {
  width: 100%;
  background: rgb(37, 0, 54);
  border: 2px solid rgba(255, 149, 0, 0);
  padding: 30px;
  box-sizing: border-box;
  display: block;
  position: relative;
  margin: 0;
  transform: scale(1);
  transition: none;
}

/* Контейнер для карты */
.map-container {
  width: 100%;
  height: 750px;
  display: block;
  position: relative;
}

/* Содержимое растянутых блоков */
.services-content,
.contacts-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 1200px;
  margin: 0 auto;
  text-align: left;
  width: 100%;
}

/* Заголовки в растянутых блоках */
.stretched-block h3.typewriter-text {
  font-size: 1.2vw;
  color: rgba(255, 149, 0, 0.826);
  margin-bottom: 20px;
  font-family: 'OpenSans-CondLight', sans-serif;
  opacity: 0;
  text-align: center;
  width: 100%;
  display: block;
}

.stretched-block p.typewriter-text {
  font-size: 1.1vw;
  color: rgba(253, 216, 193, 0.667);
  font-family: "Calibri Light", sans-serif;
  line-height: 1.6;
  opacity: 0;
  margin: 0;
  display: block;
  width: 100%;
  text-align: center;
}

/* Убедимся, что iframe занимает всё пространство */
.stretched-block .image {
  width: 100%;
  height: 100%;
  display: block;
}

/* === Адаптивность === */
@media (max-width: 1200px) {
  /* Адаптация видео */
  .hero-section {
    width: calc(100% - 40px);
  }
  
  .video-wrapper {
    padding-bottom: 56.25%;
  }
  
  /* Адаптация сетки */
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .block-1 h3, .block-3 h3, .block-5 h3 {
    font-size: 2vw;
  }
  
  .block-1 p, .block-3 p, .block-5 p {
    font-size: 1.3vw;
  }
  
  .new-video-text-header,
  .new-video-text-intro {
    font-size: 2vw;
  }
  
  /* Адаптация растянутых блоков */
  .stretched-section {
    width: calc(100% - 40px);
    margin-bottom: 40px;
  }
  
  .stretched-section:nth-child(3) {
    margin-bottom: 40px;
  }
  
  .stretched-section:nth-child(4) {
    margin-bottom: 40px;
  }
  
  .stretched-section:nth-child(5) {
    margin-bottom: 40px;
  }
  
  .map-container {
    height: 400px;
  }
  
  .stretched-block h3.typewriter-text {
    font-size: 2vw;
  }
  
  .stretched-block p.typewriter-text {
    font-size: 1.3vw;
  }
}

@media (max-width: 768px) {
  /* Адаптация видео */
  .hero-section {
    width: calc(100% - 20px);
  }
  
  .video-wrapper {
    padding-bottom: 56.25%;
  }
  
  /* Адаптация сетки */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 10px 20px;
  }
  
  .block-1 h3, .block-3 h3, .block-5 h3 {
    font-size: 3.5vw;
  }
  
  .block-1 p, .block-3 p, .block-5 p {
    font-size: 2.5vw;
  }
  
  .new-video-text-header {
    font-size: 4vw;
  }
  
  .new-video-text-intro {
    font-size: 3.5vw;
  }
  
  .text-header { font-size: 5vw; }
  .text-intro { font-size: 3.5vw; }
  .text-details { font-size: 3vw; }
  .footer .company-name { font-size: 8vw; }
  
  /* Адаптация растянутых блоков */
  .stretched-section {
    margin-bottom: 30px;
    width: calc(100% - 20px);
  }
  
  .stretched-section:nth-child(3) {
    margin-bottom: 30px;
  }
  
  .stretched-section:nth-child(4) {
    margin-bottom: 30px;
  }
  
  .stretched-section:nth-child(5) {
    margin-bottom: 30px;
  }
  
  .map-container {
    height: 300px;
  }
  
  .stretched-block h3.typewriter-text {
    font-size: 3.5vw;
  }
  
  .stretched-block p.typewriter-text {
    font-size: 2.5vw;
  }
  
  /* Адаптация преимуществ */
  .benefits .row {
    flex-direction: column;
    gap: 10px;
  }
  
  .benefits .block {
    width: 90%;
  }
}