/* ==========================================================================
   РАЗДЕЛ «ВОЗМОЖНОСТИ» — features.php + features/*.php
   ========================================================================== */

/* --- Mini-Hero секция --- */
.features-hero {
  background: radial-gradient(135deg, #ffffff 0%, #eff6ff 100%);
  border-bottom: 1px solid var(--border-color);
}

.features-hero__glow {
  top: 20%;
  left: 5%;
  width: 400px;
  height: 400px;
  background: rgba(11, 58, 117, 0.07);
}

/* --- Sticky anchor-tabs навигация --- */
.features-nav {
  position: sticky;
  top: 76px; /* Фиксация точно под главным меню */
  z-index: 1010;
  background: #0f172a; /* Контрастный тёмный фон для высокой заметности */
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.35);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 0;
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
}

.features-nav::-webkit-scrollbar {
  display: none;
}

.features-nav .container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.features-nav a {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  border-radius: 10px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 150ms ease;
}

.features-nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.features-nav a.active {
  color: #ffffff;
  background: #2563eb; /* Яркий акцентный элемент активного модуля */
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
}

.features-nav a svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* --- Секции модулей --- */
.module-section {
  padding: 80px 0;
  scroll-margin-top: 140px; /* Отступ при переходе по якорям с учетом 2-х фиксированных меню */
}

.module-section:nth-child(even) {
  background: var(--muted-bg);
}

.module-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-blue);
  background: rgba(11, 58, 117, 0.07);
  border-radius: 4px;
  padding: 4px 10px;
  margin-bottom: 16px;
}

.module-tag--teal {
  color: var(--accent-teal);
  background: rgba(13, 148, 136, 0.08);
}

.module-tag--ai {
  color: #6d28d9;
  background: rgba(109, 40, 217, 0.08);
}

.module-tag svg {
  width: 13px;
  height: 13px;
}

/* --- Юридический бейдж (Выдача ТМЦ) --- */
.legal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #0f766e;
  background: #f0fdf9;
  border: 1px solid #0d9488;
  border-radius: 4px;
  padding: 4px 10px;
  margin-bottom: 20px;
}

.legal-badge svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

/* --- Список возможностей модуля --- */
.module-features-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.module-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  line-height: 1.5;
}

.module-features-list li .feature-check {
  width: 18px;
  height: 18px;
  color: var(--accent-teal);
  flex-shrink: 0;
  margin-top: 2px;
}

/* --- Мокап-карточки (визуализация интерфейса) --- */
.module-mockup {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(11, 58, 117, 0.08);
}

.module-mockup__topbar {
  background: #0f172a;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.mockup-dot--red   { background: #ef4444; }
.mockup-dot--yellow { background: #f59e0b; }
.mockup-dot--green  { background: #22c55e; }

.module-mockup__body {
  background: #f8fafc;
  padding: 20px;
  min-height: 240px;
}

/* --- Мокап статистики (ИИ-онбординг) --- */
.ai-mapping-table {
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  font-size: 13px;
}

.ai-mapping-row {
  display: grid;
  grid-template-columns: 1fr 24px 1fr;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  background: #ffffff;
}

.ai-mapping-row:last-child {
  border-bottom: none;
}

.ai-mapping-row .source {
  background: #fffbeb;
  border-radius: 4px;
  padding: 3px 8px;
  font-weight: 600;
  color: #92400e;
  font-size: 12px;
}

.ai-mapping-row .target {
  background: #f0fdf9;
  border-radius: 4px;
  padding: 3px 8px;
  font-weight: 600;
  color: #065f46;
  font-size: 12px;
}

.ai-mapping-row svg {
  width: 14px;
  height: 14px;
  color: var(--accent-teal);
}

/* --- Мокап прогресса инвентаризации --- */
.inv-progress-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--muted-bg);
  overflow: hidden;
}

.inv-progress-fill {
  height: 100%;
  background: var(--accent-teal);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.inv-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 13px;
}

.inv-row:last-child { border-bottom: none; }

.inv-status {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.inv-status--ok { background: #dcfce7; color: #16a34a; }
.inv-status--miss { background: #fee2e2; color: #dc2626; }
.inv-status--wait { background: #fef9c3; color: #ca8a04; }

.inv-status svg { width: 12px; height: 12px; }

/* --- Матрица тарифов --- */
.features-matrix {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.features-matrix thead th {
  background: #f8fafc;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  border-bottom: 2px solid var(--border-color);
}

.features-matrix thead th:first-child {
  text-align: left;
}

.features-matrix tbody td {
  padding: 11px 16px;
  font-size: 13px;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.features-matrix tbody td:first-child {
  text-align: left;
  font-weight: 500;
}

.features-matrix tbody tr:last-child td {
  border-bottom: none;
}

.features-matrix tbody tr:hover {
  background: #fafbfc;
}

.features-matrix .plan-highlight {
  color: var(--primary-blue);
  font-weight: 700;
}

.matrix-check {
  width: 16px;
  height: 16px;
  color: var(--accent-teal);
  display: inline-block;
  vertical-align: middle;
}

.matrix-cross {
  width: 16px;
  height: 16px;
  color: #94a3b8;
  display: inline-block;
  vertical-align: middle;
}

/* --- Детальные страницы модулей: Layout --- */
.module-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 40px;
  align-items: start;
}

@media (max-width: 991px) {
  .module-layout {
    grid-template-columns: 1fr;
  }
}

/* --- Sidebar --- */
.module-sidebar {
  position: sticky;
  top: 100px;
}

.module-sidebar__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-bottom: 8px;
}

.module-sidebar__nav {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.module-sidebar__nav li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font-size: 14px;
  color: #64748b;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}

.module-sidebar__nav li a:hover,
.module-sidebar__nav li a.active {
  background: rgba(11, 58, 117, 0.07);
  color: var(--primary-blue);
}

.module-sidebar__nav li a svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.module-sidebar__divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 16px 0;
}

.module-sidebar__cta {
  background: var(--primary-blue);
  color: #ffffff;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  margin-top: 8px;
}

.module-sidebar__cta p {
  font-size: 13px;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.85) !important;
}

.module-sidebar__cta a {
  display: inline-block;
  background: #ffffff;
  color: var(--primary-blue);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  transition: opacity 0.15s;
}

.module-sidebar__cta a:hover {
  opacity: 0.9;
}

/* --- Пошаговые схемы на детальных страницах --- */
.how-step {
  display: flex;
  gap: 20px;
  position: relative;
}

.how-step__number {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-blue);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.how-step__content {
  flex: 1;
  padding-bottom: 28px;
}

.how-step__title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.how-step__text {
  font-size: 14px;
  color: #475569;
  line-height: 1.6;
  margin: 0;
}

/* --- Большие иконки-блоки преимуществ на детальных страницах --- */
.benefit-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 24px;
  height: 100%;
  transition: transform 0.2s, box-shadow 0.2s;
}

.benefit-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(11, 58, 117, 0.08);
}

.benefit-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.benefit-card__icon--blue  { background: rgba(11, 58, 117, 0.08); color: var(--primary-blue); }
.benefit-card__icon--teal  { background: rgba(13, 148, 136, 0.08); color: var(--accent-teal); }
.benefit-card__icon--violet { background: rgba(109, 40, 217, 0.08); color: #6d28d9; }
.benefit-card__icon--amber { background: rgba(245, 158, 11, 0.08); color: #d97706; }

.benefit-card__icon svg {
  width: 22px;
  height: 22px;
}

.benefit-card__title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.benefit-card__text {
  font-size: 14px;
  color: #475569;
  line-height: 1.6;
  margin: 0;
}

/* --- FAQ на детальных страницах --- */
.features-faq .accordion-button {
  font-size: 15px;
  font-weight: 600;
  padding: 16px 20px;
}

.features-faq .accordion-body {
  font-size: 14px;
  line-height: 1.7;
  padding: 4px 20px 20px;
  color: #475569;
}

.features-faq .accordion-item {
  border-radius: 10px !important;
  overflow: hidden;
  margin-bottom: 8px;
  border: 1px solid var(--border-color) !important;
}

.features-faq .accordion-button:not(.collapsed) {
  background: rgba(11, 58, 117, 0.04);
  color: var(--primary-blue);
  box-shadow: none;
}

/* --- Cross-links модулей --- */
.cross-module-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.cross-module-card:hover {
  border-color: var(--primary-blue);
  box-shadow: 0 4px 16px rgba(11, 58, 117, 0.08);
}

.cross-module-card__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(11, 58, 117, 0.07);
  color: var(--primary-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cross-module-card__icon svg {
  width: 20px;
  height: 20px;
}

.cross-module-card__title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.cross-module-card__sub {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
}

/* --- Адаптивность --- */
@media (max-width: 768px) {
  .module-section {
    padding: 48px 0;
  }

  .features-nav a {
    padding: 12px 14px;
    font-size: 13px;
  }

  .module-mockup__body {
    min-height: 180px;
  }
}
