/* ===========================
   Фоны секций — полупрозрачные оверлеи поверх body-фото
   =========================== */
.tasks        { background: rgba(8,  10, 18, 0.86); }
.comparison   { background: rgba(4,   6, 14, 0.76); }
.facts        { background: rgba(0,   5, 16, 0.82); }
.cta-section  { background: rgba(0,  12, 26, 0.80); }
.testimonials { background: rgba(10,  6, 20, 0.84); }

/* Видео в кейсах */
.case-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
  aspect-ratio: 4/3;
  background: #000;
}

.case-video-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(0, 198, 255, 0.25);
  aspect-ratio: 4/3;
  position: relative;
  background: #000;
  box-shadow:
    0 0 0 1px rgba(0, 198, 255, 0.12),
    0 8px 40px rgba(0, 198, 255, 0.15),
    0 0 80px rgba(0, 198, 255, 0.06);
}

.case-video-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(to bottom, transparent, rgba(10, 12, 24, 0.72));
  pointer-events: none;
  z-index: 1;
}

.case-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: pointer;
}

/* Кнопка звука */
.video-sound-btn {
  position: absolute;
  bottom: 14px;
  right: 14px;
  z-index: 10;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
}
.video-sound-btn:hover {
  background: rgba(0, 198, 255, 0.4);
  transform: scale(1.1);
}

/* Пауза-оверлей при клике на видео */
.video-pause-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  z-index: 5;
}
.video-pause-overlay.visible { opacity: 1; }
.video-pause-overlay svg { filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5)); }

/* ===========================
   Анимация лазера на иконках
   =========================== */
@keyframes laserPulse {
  0%, 100% { box-shadow: 0 0 6px rgba(0, 198, 255, 0.5); }
  50%       { box-shadow: 0 0 18px rgba(0, 198, 255, 0.9), 0 0 30px rgba(255, 107, 26, 0.4); }
}

@keyframes sparkFly {
  0%   { transform: translate(0, -50%) scale(1); opacity: 1; }
  60%  { opacity: 1; }
  100% { transform: translate(12px, -60%) scale(0.3); opacity: 0; }
}

.task-card__icon {
  position: relative;
  display: inline-block;
  font-size: 2rem;
  margin-bottom: 1rem;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

/* Свечение за иконкой */
.task-card__icon::before {
  content: '';
  position: absolute;
  inset: -10px;
  background: radial-gradient(circle, rgba(0, 198, 255, 0.35) 0%, transparent 65%);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

/* Лазерный луч */
.task-card__icon::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 60%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg,
    rgba(0, 198, 255, 0.95) 0%,
    rgba(255, 107, 26, 0.7) 60%,
    transparent 100%
  );
  border-radius: 1px;
  transform: translateY(-50%);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.task-card:hover .task-card__icon {
  transform: scale(1.2);
  filter: drop-shadow(0 0 10px rgba(0, 198, 255, 0.6));
}

.task-card:hover .task-card__icon::before {
  opacity: 1;
  transform: scale(1);
  animation: laserPulse 1.2s ease infinite;
}

.task-card:hover .task-card__icon::after {
  width: 52px;
  opacity: 1;
}

/* Иконки в карточках услуг */
.service-card__icon {
  position: relative;
  display: inline-block;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
}

.service-card__icon::before {
  content: '';
  position: absolute;
  inset: -8px;
  background: radial-gradient(circle, rgba(0, 198, 255, 0.3) 0%, transparent 65%);
  border-radius: 50%;
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.service-card:hover .service-card__icon {
  transform: scale(1.2);
  filter: drop-shadow(0 0 10px rgba(0, 198, 255, 0.6));
}

.service-card:hover .service-card__icon::before {
  opacity: 1;
  transform: scale(1);
  animation: laserPulse 1.2s ease infinite;
}

/* ===========================
   Блок «Решаемые задачи»
   =========================== */
.tasks {
  /* фон задан выше через параллакс */
}

.tasks__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.task-card {
  /* padding-box = тёмный фон внутри рамки; border-box = сплошная рамка */
  background:
    linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
    linear-gradient(135deg, var(--border), var(--border)) border-box;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), backdrop-filter var(--transition);
  position: relative;
}

.task-card:hover {
  /* Градиентная рамка + полупрозрачный тёмный фон (glassmorphism) */
  background:
    linear-gradient(rgba(14, 18, 30, 0.82), rgba(14, 18, 30, 0.82)) padding-box,
    linear-gradient(135deg, var(--accent-blue), var(--accent-orange)) border-box;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transform: translateY(-4px);
  box-shadow:
    0 8px 32px rgba(0, 198, 255, 0.2),
    0 2px 8px rgba(0, 0, 0, 0.5);
}

.task-card__title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.task-card__desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===========================
   Сравнительная таблица
   =========================== */
.comparison__wrap {
  position: relative;
  border-radius: var(--radius-lg);
  clip-path: inset(0 round var(--radius-lg));
  border: 1px solid rgba(0, 198, 255, 0.15);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04) inset,
    0 24px 60px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(0, 198, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(10, 12, 20, 0.55);
}

.comparison__table {
  width: 100%;
  border-collapse: collapse;
}

.comparison__table thead th {
  padding: 1.25rem 1.5rem;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.comparison__table thead th:first-child {
  color: var(--text-muted);
}

.comparison__table thead th.highlight {
  background: rgba(0, 198, 255, 0.10);
  position: relative;
  /* Фон ячейки остаётся, текст окрашиваем через color + text-shadow чтобы
     выделить колонку без конфликта background-clip с background-color */
  color: var(--accent-blue);
  text-shadow: 0 0 20px rgba(0, 198, 255, 0.4);
  font-size: 0.9375rem;
  letter-spacing: 0.04em;
}

.comparison__table thead th.highlight::after {
  content: ' ★';
  font-size: 0.75em;
  opacity: 0.7;
  vertical-align: middle;
}

.comparison__table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background var(--transition);
}

.comparison__table tbody tr:last-child {
  border-bottom: none;
}

.comparison__table tbody tr:hover {
  background: rgba(255, 255, 255, 0.04);
}

.comparison__table td {
  padding: 1.125rem 1.5rem;
  font-size: 0.9375rem;
}

.comparison__table td:first-child {
  color: var(--text-secondary);
  font-weight: 500;
}

.comparison__table td.highlight {
  background: rgba(0, 198, 255, 0.06);
}

.check { color: #4CAF50; }
.cross { color: #F44336; }
.neutral { color: var(--text-muted); }

/* ===========================
   Слайдер До/После
   =========================== */
.cases {
  background: transparent;
}

.cases__slider {
  position: relative;
  overflow: hidden;
}

.case-slide {
  min-width: 100%;
  display: none;
}

.case-slide.active {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.case-info__title {
  margin-bottom: 0.75rem;
}

.case-info__desc {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.case-info__result {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: rgba(76, 175, 80, 0.08);
  border: 1px solid rgba(76, 175, 80, 0.2);
  border-radius: var(--radius);
}

.case-info__result-icon { font-size: 1.25rem; }

.case-info__result-text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

/* Навигация слайдера */
.cases__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

.cases__prev,
.cases__next {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-size: 1.1rem;
}

.cases__prev:hover,
.cases__next:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.cases__dots {
  display: flex;
  gap: 0.5rem;
}

.cases__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  cursor: pointer;
  transition: background var(--transition), width var(--transition);
}

.cases__dot.active {
  background: var(--accent-blue);
  width: 24px;
  border-radius: 4px;
}

/* ===========================
   Цифры / Факты
   =========================== */
.facts__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.fact-item {
  padding: 2.5rem 2rem;
  text-align: center;
  border-right: 1px solid var(--border);
}

.fact-item:last-child { border-right: none; }

.fact-item__num {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
  background: linear-gradient(120deg, var(--accent-blue) 0%, #7DF9FF 45%, var(--accent-orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.fact-item__label {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ===========================
   CTA-секция
   =========================== */
.cta-section {
  border-top: 1px solid rgba(0, 198, 255, 0.12);
  border-bottom: 1px solid rgba(0, 198, 255, 0.12);
}

.cta-section__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3rem;
}

.cta-section__title {
  margin-bottom: 0.75rem;
}

.cta-section__desc {
  color: var(--text-secondary);
  max-width: 500px;
}

.cta-section__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 220px;
}

/* ===========================
   Отзывы
   =========================== */
.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: border-color var(--transition);
}

.testimonial-card:hover {
  border-color: rgba(0, 198, 255, 0.3);
}

.testimonial-card__text {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
  flex: 1;
}

.testimonial-card__text::before {
  content: '"';
  font-size: 2.5rem;
  color: var(--accent-blue);
  line-height: 0;
  vertical-align: -0.75rem;
  margin-right: 0.25rem;
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.testimonial-card__photo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-secondary);
  flex-shrink: 0;
}

.testimonial-card__name {
  font-weight: 600;
  font-size: 0.9375rem;
}

.testimonial-card__company {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ===========================
   Страница Услуги
   =========================== */
.page-hero {
  padding: 8rem 0 4rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  transition: border-color var(--transition), transform var(--transition);
}

.service-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-4px);
}

.service-card__img {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
  height: 100%;
  background: var(--bg-secondary);
}

.service-card__body {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.service-card__icon {
  font-size: 2rem;
}

.service-card__title {
  font-size: 1.125rem;
  font-weight: 700;
}

.service-card__desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  flex: 1;
}

.service-card__meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.service-card__meta strong {
  color: var(--text-secondary);
}

/* ===========================
   Страница Контакты
   =========================== */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contacts-info__title {
  margin-bottom: 2rem;
}

.contacts-info__items {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.contacts-info__item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contacts-info__item-icon {
  width: 44px;
  height: 44px;
  background: rgba(0, 198, 255, 0.08);
  border: 1px solid rgba(0, 198, 255, 0.18);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-blue);
  flex-shrink: 0;
}

/* Кнопки мессенджеров */
.btn-messenger {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: flex-start;
  font-weight: 600;
  border-radius: var(--radius);
  padding: 0.85rem 1.25rem;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  border: none;
}

.btn-wa {
  background: #1a3a2a;
  color: #25D366;
  box-shadow: inset 0 0 0 1px rgba(37, 211, 102, 0.25);
}
.btn-wa:hover {
  background: #1f4833;
  box-shadow: inset 0 0 0 1px rgba(37, 211, 102, 0.5), 0 4px 20px rgba(37, 211, 102, 0.15);
  transform: translateY(-2px);
  color: #25D366;
}

.btn-tg {
  background: #0d2a3d;
  color: #29A8EB;
  box-shadow: inset 0 0 0 1px rgba(41, 168, 235, 0.25);
}
.btn-tg:hover {
  background: #0f3550;
  box-shadow: inset 0 0 0 1px rgba(41, 168, 235, 0.5), 0 4px 20px rgba(41, 168, 235, 0.15);
  transform: translateY(-2px);
  color: #29A8EB;
}

.contacts-info__item-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.contacts-info__item-value {
  font-weight: 600;
  font-size: 1rem;
}

.contacts-info__item-value a:hover {
  color: var(--accent-blue);
}

/* Форма */
.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.form-card__title {
  margin-bottom: 0.5rem;
}

.form-card__desc {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 0.9375rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.875rem 1rem;
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent-blue);
  box-shadow:
    0 0 0 3px rgba(0, 198, 255, 0.12),
    0 0 16px rgba(0, 198, 255, 0.08);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group select {
  appearance: none;
  cursor: pointer;
}

.form-group input[type="file"] {
  padding: 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 1rem;
  text-align: center;
}

.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
}

.form-success__icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.form-success__title {
  margin-bottom: 0.5rem;
}

.form-success__desc {
  color: var(--text-secondary);
}

/* ===========================
   Адаптивность компонентов
   =========================== */
@media (max-width: 1024px) {
  .tasks__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .facts__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .facts__grid .fact-item:nth-child(2) { border-right: none; }
  .facts__grid .fact-item:nth-child(3) { border-top: 1px solid var(--border); }
  .facts__grid .fact-item:nth-child(4) { border-top: 1px solid var(--border); }

  .testimonials__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .services-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .tasks__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .case-slide.active {
    grid-template-columns: 1fr;
  }

  .facts__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cta-section__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cta-section__actions {
    width: 100%;
  }

  .testimonials__grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    grid-template-columns: 1fr;
  }

  .service-card__img {
    aspect-ratio: 16/9;
  }

  .contacts-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .comparison__table {
    font-size: 0.875rem;
  }

  .comparison__table td,
  .comparison__table th {
    padding: 0.875rem 1rem;
  }
}

@media (max-width: 480px) {
  .tasks__grid {
    grid-template-columns: 1fr;
  }

  .facts__grid {
    grid-template-columns: 1fr;
  }

  .facts__grid .fact-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .facts__grid .fact-item:last-child {
    border-bottom: none;
  }
}
