/* ==================== HERO СЕКЦИЯ ==================== */
.hero {
  background-color: var(--color-black);
  color: var(--color-white);
  padding-top: 160px;
  padding-bottom: 80px;
  position: relative;
  overflow-x: clip;
}

.hero > .container {
  overflow: visible;
}

.hero-background-pattern {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 632px;
  height: 632px;
  background-image: url('../images/hero-background-pattern.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.1;
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-5xl);
  align-items: center;
}

.hero-text {
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.hero-text-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-title {
  font-size: 36px;
  font-weight: 500;
  line-height: 44px;
  letter-spacing: -0.72px;
  background: linear-gradient(180deg, #FFFFFF 0%, rgba(255, 255, 255, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0;
}

.hero-subtitle {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: -0.32px;
  color: #BFBFBF;
  margin: 0;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: -0.32px;
  transition: all 0.3s ease;
  cursor: pointer;
  white-space: nowrap;
}

.hero-btn-primary {
  background-color: var(--color-white);
  color: var(--color-black);
  border-radius: 1000px;
  border: none;
}

.hero-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(255, 255, 255, 0.2);
}

.hero-btn-outline {
  background-color: transparent;
  color: var(--color-white);
  border: 1px solid var(--color-dark-gray);
  border-radius: 32px;
}

.hero-btn-outline:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: var(--color-white);
}

.hero-phone-container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  overflow: visible;
}

.hero-phone-frame {
  position: relative;
  flex-shrink: 0;
  max-width: 280px;
  width: 100%;
}

.hero-phone-frame::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 632px;
  height: 632px;
  background-image: url('../images/hero-background-pattern.png');
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.1;
  pointer-events: none;
  z-index: -1;
}

.phone-frame-img {
  position: relative;
  width: 100%;
  height: auto;
  z-index: 2;
  display: block;
}

.hero-phone-content {
  position: absolute;
  top: 1%;
  left: 2%;
  right: 2%;
  bottom: 2%;
  overflow: hidden;
  border-radius: 40px;
  z-index: 1;
}

.hero-screen {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.hero-screen.active {
  opacity: 1;
  visibility: visible;
}

.hero-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-side-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 24px 24px 0;
  border-right: 1px solid #282828;
  align-items: flex-end;
  justify-content: center;
  width: 220px;
  flex-shrink: 0;
}

.side-nav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border-radius: 32px;
  background-color: rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
  box-sizing: border-box;
}

.side-nav-item img {
  width: 20px;
  height: 20px;
  display: block;
  flex-shrink: 0;
  transition: all 0.3s ease;
  filter: brightness(0);
}

.side-nav-item span {
  font-family: 'Onest', sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  letter-spacing: -0.24px;
  color: var(--color-black);
  white-space: nowrap;
  display: none;
  transition: all 0.3s ease;
}

.side-nav-item.active {
  background-color: var(--color-white);
}

.side-nav-item.active span {
  display: block;
}

.side-nav-item:hover {
  background-color: rgba(255, 255, 255, 0.5);
}

@keyframes rotate {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* ==================== КЛИЕНТЫ ==================== */
.clients {
  background-color: var(--color-black);
  padding: var(--spacing-3xl) 0;
  position: relative;
  overflow: hidden;
}

.clients-content {
  display: flex;
  align-items: center;
  gap: 64px;
}

.clients-label {
  color: #7E7E7E;
  font-family: 'Onest', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: -0.28px;
  flex-shrink: 0;
  width: 208px;
}

.clients-logos-wrapper {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.clients-logos-wrapper::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 150px;
  background: linear-gradient(90deg, #101010 0%, #101010 20%, rgba(16, 16, 16, 0) 100%);
  z-index: 2;
  pointer-events: none;
}

.clients-logos-wrapper::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 150px;
  background: linear-gradient(270deg, #101010 0%, #101010 20%, rgba(16, 16, 16, 0) 100%);
  z-index: 2;
  pointer-events: none;
}

.clients-logos-track {
  display: flex;
  animation: scroll-logos 30s linear infinite;
  width: max-content;
}

.clients-logos-track:hover {
  animation-play-state: paused;
}

.clients-logos {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-shrink: 0;
  padding-right: 32px;
}

@keyframes scroll-logos {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.client-logo {
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.3s ease;
}

.client-logo img {
  height: 100%;
  width: auto;
}

.client-logo:hover {
  opacity: 0.7;
}

/* ==================== RESPONSIVE: TABLET (768px - 1024px) ==================== */
@media (min-width: 768px) and (max-width: 1024px) {
  .hero {
    padding-top: 120px;
    padding-bottom: 60px;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }

  /* Текст сверху по центру */
  .hero-text {
    order: 0;
    gap: 80px;
    text-align: center;
    align-items: center;
  }

  .hero-text-content {
    align-items: center;
    gap: 20px;
  }

  .hero-title {
    font-size: 36px;
    line-height: 44px;
    letter-spacing: -0.72px;
    text-align: center;
    background: linear-gradient(136deg, #FFFFFF 0%, #FFFFFF 36.92%, #FFFFFF 61.53%, #C9C9C9 86.15%, #979797 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .hero-title br {
    display: none;
  }

  .hero-subtitle {
    text-align: center;
    font-size: 16px;
    line-height: 24px;
    letter-spacing: -0.32px;
    color: #BFBFBF;
  }

  .hero-subtitle br {
    display: none;
  }

  .hero-buttons {
    justify-content: center;
    flex-direction: row;
    gap: 12px;
  }

  .hero-btn {
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    letter-spacing: -0.32px;
  }

  .hero-btn-primary {
    border-radius: 1000px;
  }

  .hero-btn-outline {
    border-radius: 32px;
    border: 1px solid #7E7E7E;
  }

  /* Телефон + селекторы справа */
  .hero-phone-container {
    order: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    gap: 20px;
  }

  .hero-phone-frame {
    max-width: 220px;
    position: relative;
    left: auto;
    transform: none;
  }

  /* Side nav справа от телефона */
  .hero-side-nav {
    display: flex;
    flex-direction: column;
    width: auto;
    padding: 16px 0 16px 16px;
    border-right: none;
    border-left: 1px solid #282828;
    align-items: flex-start;
    gap: 6px;
    position: absolute;
    right: 0;
  }

  .side-nav-item {
    padding: 8px 12px;
    gap: 8px;
  }

  .side-nav-item span {
    font-size: 10px;
  }

  .side-nav-item img {
    width: 16px;
    height: 16px;
  }
}

/* ==================== RESPONSIVE: 1200px ==================== */
@media (max-width: 1200px) {
  .hero-content {
    gap: var(--spacing-3xl);
  }
}

/* ==================== RESPONSIVE: MOBILE (<768px) ==================== */
@media (max-width: 768px) {
  .clients-label {
    width: 100%;
  }

  .hero {
    padding-top: 120px;
    min-height: auto;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
  }

  .hero-text {
    order: -1;
    gap: var(--spacing-3xl);
    text-align: center;
    align-items: center;
  }

  .hero-text-content {
    align-items: center;
  }

  .hero-title {
    text-align: center;
    font-size: 32px;
    line-height: 40px;
  }

  .hero-subtitle {
    text-align: center;
    font-size: 14px;
    line-height: 20px;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-btn {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 14px;
    line-height: 20px;
  }

  .hero-buttons {
    gap: 8px;
  }

  .hero-phone-container {
    order: 1;
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .hero-phone-frame {
    max-width: 100%;
    width: 280px;
    height: auto;
    aspect-ratio: 280 / 570;
  }

  .hero-side-nav {
    position: static;
    flex-direction: row;
    width: 100%;
    justify-content: center;
    border-right: none;
    border-top: 1px solid #282828;
    padding: 24px 24px 0 24px;
    gap: 2px;
  }

  .side-nav-item {
    width: auto;
    padding: 12px;
  }

  .side-nav-item span {
    display: none;
  }

  .side-nav-item.active span {
    display: inline;
  }

  .hero-background-pattern {
    width: 200px;
    height: 200px;
  }

  /* Clients */
  .clients-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .clients-logos {
    gap: 32px;
  }

  .client-logo {
    height: 40px;
  }

  .clients-logos-wrapper::before,
  .clients-logos-wrapper::after {
    width: 70px;
  }
}

/* ==================== RESPONSIVE: VERY SMALL (<400px) ==================== */
@media (max-width: 400px) {
  .hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .hero-title {
    font-size: 28px;
    line-height: 36px;
  }

  .hero-subtitle {
    font-size: 13px;
    line-height: 18px;
  }

  .hero-phone-frame {
    width: 240px;
  }

  .hero-side-nav {
    flex-wrap: wrap;
    gap: 2px;
  }

  .side-nav-item {
    padding: 12px;
  }

  .side-nav-item.active span {
    font-size: 12px;
  }
}
