/* ==========================================================================
   1. Переменные и сброс базовых стилей
   ========================================================================== */
:root {
  --bg-dark: #0b0f19;
  --bg-card: #111522;
  --border-color: #2d3446;
  --purple-main: #8b5cf6;
  --purple-accent: #a855f7;
  --red-accent: #ef4444;
  --text-white: #ffffff;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-white);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden; /* Защита от горизонтального скролла */
}

/* Общий контейнер для выравнивания блоков по единой ширине */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
  box-sizing: border-box;
}

/* ==========================================================================
   2. Шапка (Header & Navigation)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(11, 15, 25, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #1e2538;
  padding: 16px 24px;
  width: 100%;
  box-sizing: border-box;
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
}

/* Логотип */
.logo {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}

.logo-icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.25));
}

.logo-text-group {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1;
}

.logo-title .fan {
  color: var(--purple-accent);
}

.logo-title .service {
  color: var(--text-white);
  font-weight: 500;
}

.logo-subtitle {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Навигация */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 22px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--text-white);
}

/* Кнопка действия в шапке */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.btn-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: var(--text-white);
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  border: 1px solid rgba(168, 85, 247, 0.4);
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-contact:hover {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
}

/* ==========================================================================
   3. Кнопка "Наверх" (Scroll to Top)
   ========================================================================== */
.scroll-top-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #1c1c22;
  color: var(--text-white);
  border: 1px solid rgba(168, 85, 247, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 900;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.25);
}

.scroll-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background-color: var(--purple-main);
  border-color: var(--purple-accent);
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.5);
}

/* ==========================================================================
   4. Блок Hero (Первый экран)
   ========================================================================== */
.hero {
  padding: 100px 24px;
  text-align: center;
  width: 100%;
  box-sizing: border-box;
}

.hero__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.hero__title {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 20px;
  margin-bottom: 24px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.hero__title span {
  color: var(--purple-accent, #8b5cf6);
}

.hero__subtitle {
  font-size: 1.15rem;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 40px;
}

/* Репутационный блок специалиста */
.specialist-card {
  width: 100%;
  max-width: 550px;
  margin-bottom: 30px;
  text-align: center;
}

.specialist-card__name {
  font-size: 1.3rem;
  color: #8e8e93;
  margin-bottom: 6px;
}

.specialist-card__name span {
  font-weight: 700;
  color: #ffffff;
}

.specialist-card__status {
  font-size: 1.1rem;
  color: #10b981;
  font-weight: 500;
  margin-bottom: 24px;
}

/* Виджет Яндекса */
.yandex-widget {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 550px;
  background: #1c1c22;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 20px 28px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
  box-sizing: border-box;
  text-align: left;
}

.yandex-widget:hover {
  background: #222229;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.yandex-widget__header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.yandex-widget__icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
}

.yandex-widget__title {
  font-family: Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.yandex-widget__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.yandex-widget__rating {
  display: flex;
  align-items: center;
  gap: 10px;
}

.yandex-widget__num {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1;
}

.yandex-widget__stars {
  color: #f59e0b;
  font-size: 1.15rem;
  letter-spacing: 1px;
  line-height: 1;
}

.yandex-widget__count {
  color: #8e8e93;
  font-size: 0.85rem;
}

/* Сетка кнопок связи */
.contact-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 12px;
  width: 100%;
  max-width: 550px;
  box-sizing: border-box;
  margin-top: 15px;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  box-sizing: border-box;
  transition: background 0.2s ease, transform 0.1s ease, border-color 0.2s ease;
}

.btn-action:active {
  transform: scale(0.98);
}

.btn-action--tg {
  background: var(--purple-main, #8b5cf6);
  color: #ffffff;
}

.btn-action--tg:hover {
  background: var(--purple-accent, #a855f7);
}

.btn-action--operator {
  position: relative;
  background: #1c1c22;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #8e8e93;
}

.btn-action--operator:hover {
  background: #222229;
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.btn-action__icon-phone {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  stroke: currentColor;
}

.btn-action__operator-logo {
  height: 40px;
  width: auto;
  max-width: 60px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 4px;
  padding: 2px;
}

/* Кастомные тултипы для десктопа */
.btn-tooltip {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .btn-action--operator {
    position: relative;
  }

  .btn-tooltip {
    display: block;
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(6px);
    background: #25252c;
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    font-family: monospace;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
  }

  .btn-tooltip::before {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #25252c;
  }

  .btn-action--operator:hover .btn-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

/* ==========================================================================
   5. Блок «Услуги» (Services) — Сетка и Карточки
   ========================================================================== */
.services {
  padding: 120px 0;
}

.section-title {
  font-size: 2.25rem;
  text-align: center;
  margin-bottom: 56px;
  font-weight: 700;
  color: var(--text-white);
  letter-spacing: -0.025em;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.service-card {
  background: #1c1c22;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
  border-color: var(--purple-accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.5);
}

.service-card__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 14px;
  line-height: 1.35;
}

.service-card__desc {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
}

/* ==========================================================================
   6. Блок «Преимущества» (Advantages)
   ========================================================================== */
.advantages-section {
  padding: 120px 0;
  background-color: var(--bg-dark);
  color: var(--text-white);
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

.advantage-card {
  background-color: #111827;
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.advantage-card:hover {
  border-color: #374151;
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.5);
}

.card-icon {
  width: 48px;
  height: 48px;
  background-color: #1f2937;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: #3b82f6; 
  flex-shrink: 0;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: #ffffff;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.card-text {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

/* ==========================================================================
   Схема работы (Workflow)
   ========================================================================== */
.workflow-section {
  padding: 120px 0;
  background-color: var(--bg-dark);
  color: var(--text-white);
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  counter-reset: workflow-counter;
}

.workflow-card {
  background: #1c1c22;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  position: relative;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  counter-increment: workflow-counter;
}

.workflow-card:hover {
  border-color: var(--purple-accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.5);
}

.workflow-card::before {
  content: "0" counter(workflow-counter);
  width: 48px;
  height: 48px;
  background-color: #1f2937;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  color: var(--purple-accent);
  margin-bottom: 24px;
  flex-shrink: 0;
}

.workflow-card__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 14px;
  line-height: 1.35;
}

.workflow-card__desc {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
}

/* ==========================================================================
   Спецификация и тарифы (Prices Section)
   ========================================================================== */
.prices-section {
  padding: 120px 0;
  background-color: var(--bg-dark);
  color: var(--text-white);
}

.tech-pricing {
  background: #1c1c22;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 36px 32px;
  max-width: 900px;
  margin: 0 auto;
  box-sizing: border-box;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.tech-pricing:hover {
  border-color: var(--purple-accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.5);
}

.tech-pricing__title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 16px;
}

.tech-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.tech-spec-row:first-child {
  padding-top: 0;
}

.tech-spec-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tech-spec-col--main {
  flex: 1;
  padding-right: 24px;
}

.tech-spec-col--price {
  text-align: right;
  white-space: nowrap;
}

.tech-spec__name {
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.35;
}

.tech-spec__detail {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.5;
}

.tech-spec__detail--note {
  color: var(--text-muted);
  opacity: 0.85;
  font-size: 0.85rem;
  margin-top: 4px;
}

.tech-spec__price {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: monospace;
  color: var(--purple-accent);
}

.tech-spec__rate {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ==========================================================================
   8. Подвал сайта (Footer)
   ========================================================================== */
.site-footer {
  background-color: #080b12;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 80px 0 32px;
  color: var(--text-white);
  box-sizing: border-box;
  width: 100%;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}

.footer-col--brand {
  max-width: 380px;
}

.footer-logo {
  margin-bottom: 16px;
}

.footer-logo .logo-title {
  font-size: 32px;
}

.footer-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.footer-legal {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 16px;
  opacity: 0.85;
}

.footer-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

.footer-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0;
  margin: 0;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--text-white);
}

.footer-text {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 24px;
  text-align: center;
}

.footer-copyright {
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0.75;
  margin: 0;
}

@media (max-width: 768px) {
  .site-footer {
    padding: 56px 0 24px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-bottom: 40px;
  }
}

/* ==========================================================================
   7. Адаптивность под мобильные устройства и планшеты
   ========================================================================== */
@media (max-width: 1024px) {
  .hero {
    padding: 80px 20px;
  }

  .services,
  .advantages-section,
  .workflow-section,
  .prices-section {
    padding: 80px 0;
  }

  .services-grid,
  .advantages-grid,
  .workflow-grid {
    gap: 24px;
  }

  .service-card,
  .advantage-card,
  .workflow-card,
  .tech-pricing {
    padding: 28px 24px;
  }
}

@media (max-width: 992px) {
  .nav-menu {
    display: none; /* Скрываем десктопное меню */
  }

  .site-header {
    padding: 12px 16px;
  }

  .header-container {
    gap: 12px;
  }

  .logo {
    gap: 10px;
  }

  .logo-icon {
    width: 44px;
    height: 44px;
  }

  .logo-title {
    font-size: 24px;
  }

  .logo-subtitle {
    display: none; /* Скрываем подзаголовок, чтобы не раздувать высоту */
  }

  .btn-contact {
    padding: 8px 14px;
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px; /* Фиксирует отступы для всех контейнеров, карточки больше не прилипают к краям */
  }

  .hero {
    padding: 40px 16px;
  }

  .hero__title {
    font-size: 2.1rem;
  }

  .hero__subtitle {
    font-size: 1rem;
    margin-bottom: 28px;
  }

  .yandex-widget {
    padding: 16px 20px;
  }

  .services,
  .advantages-section,
  .workflow-section,
  .prices-section {
    padding: 56px 0;
  }

  .section-title {
    font-size: 1.75rem;
    margin-bottom: 32px;
  }

  .services-grid,
  .advantages-grid,
  .workflow-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .service-card,
  .advantage-card,
  .workflow-card,
  .tech-pricing {
    padding: 24px;
  }

  .service-card__title,
  .card-title,
  .workflow-card__title {
    font-size: 1.2rem;
    margin-bottom: 10px;
  }

  .service-card__desc,
  .card-text,
  .workflow-card__desc {
    font-size: 0.98rem;
  }

  .tech-spec-row {
    flex-direction: column;
    gap: 12px;
  }

  .tech-spec-col--price {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 10px 12px;
  }

  .logo-icon {
    width: 36px;
    height: 36px;
  }

  .logo-title {
    font-size: 20px;
  }

  .btn-contact {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 6px;
  }

  .hero {
    padding: 30px 12px;
  }

  .hero__title {
    font-size: 1.75rem;
    line-height: 1.25;
  }

  .hero__subtitle {
    font-size: 0.95rem;
    padding: 0 4px;
  }

  .specialist-card__name {
    font-size: 1.05rem;
  }

  .specialist-card__status {
    font-size: 0.95rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .btn-action {
    width: 100%;
  }

  .btn-action--operator {
    justify-content: center;
    gap: 12px;
  }

  .scroll-top-btn {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }
}