/* ============================================================
   ASTERLINK — Стили
   Шрифты: Roboto (основной) + Roboto Slab (заголовки)
   Цветовая гамма: синий (#1a56db) + салатовый (#22c55e)
   Стиль: строгий, прямоугольный, без скруглений
   ============================================================ */

/* ========== 1. ОБЩИЕ СБРОСЫ ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    "Roboto",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
  background: #eef2f7;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 20px;
}

/* ========== 2. ОСНОВНАЯ КАРТОЧКА ========== */
.landing {
  max-width: 1280px;
  width: 100%;
  background: #ffffff;
  box-shadow: 0 8px 32px rgba(26, 86, 219, 0.12);
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  min-height: 540px;
  border: 1px solid #dbe2ed;
}

/* ========== 3. ЛЕВАЯ КОЛОНКА ========== */
.left-panel {
  flex: 1 1 50%;
  padding: 56px 48px;
  background: #f8faff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Заголовки – Roboto Slab */
.left-panel .logo,
.left-panel h1,
.left-panel h2,
.right-panel .form-title,
.feature-card h4,
.calls-preview .calls-header h3 {
  font-family: "Roboto Slab", "Times New Roman", serif;
  font-weight: 700;
}

.left-panel .logo {
  font-size: 36px;
  letter-spacing: -0.02em;
  color: #1a2a4a;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.left-panel .logo span {
  background: linear-gradient(135deg, #1a56db, #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.left-panel .logo .icon {
  font-size: 32px;
  -webkit-text-fill-color: initial;
}

.left-panel h1 {
  font-size: 42px;
  line-height: 1.15;
  color: #0b1a33;
  margin: 12px 0 16px;
  letter-spacing: -0.01em;
}
.left-panel h1 .highlight {
  background: linear-gradient(135deg, #1a56db, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Обычный текст – Roboto (sans-serif) */
.left-panel .desc,
.left-panel .sub,
.right-panel .form-sub,
.feature-card p,
.footer-link,
.form-group label,
.message,
.call-item,
.badge-active {
  font-family: "Roboto", "Segoe UI", Arial, sans-serif;
}

.left-panel .desc {
  font-size: 16px;
  line-height: 1.7;
  color: #3a4a62;
  max-width: 500px;
  margin-bottom: 28px;
}

/* ========== 4. КНОПКИ ========== */
.left-panel .actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.right-panel .actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}

.right-panel .actions a {
  min-width: 220px;
  justify-content: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1a56db;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  padding: 14px 32px;
  border: none;
  border-radius: 0;
  cursor: pointer;
  transition: 0.2s;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(26, 86, 219, 0.3);
}
.btn-primary:hover {
  background: #0f3f9e;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(26, 86, 219, 0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: #1a2a4a;
  font-weight: 600;
  font-size: 16px;
  padding: 14px 28px;
  border: 1px solid #b8c8dd;
  border-radius: 0;
  cursor: pointer;
  transition: 0.2s;
  text-decoration: none;
}
.btn-secondary:hover {
  background: #e5edf8;
  border-color: #1a56db;
  color: #1a56db;
}

/* ========== 5. ПРАВАЯ КОЛОНКА ========== */
.right-panel {
  flex: 1 1 50%;
  padding: 56px 48px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-left: 1px solid #dbe2ed;
}

.right-panel .form-title {
  font-size: 28px;
  color: #0b1a33;
  margin-bottom: 4px;
}
.right-panel .form-sub {
  font-size: 14px;
  color: #5a6f8a;
  margin-bottom: 24px;
}

/* ========== 6. ФОРМА ========== */
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #1a2a4a;
  margin-bottom: 4px;
}
.form-group label .required {
  color: #dc2626;
  margin-left: 2px;
}
.form-group input {
  width: 100%;
  padding: 11px 16px;
  font-size: 15px;
  background: #fafcff;
  border: 1px solid #d0dbea;
  border-radius: 0;
  color: #0b1a33;
  transition: 0.2s;
  outline: none;
}
.form-group input:focus {
  border-color: #1a56db;
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(26, 86, 219, 0.15);
}

/* ========== 7. КАПЧА ========== */
.captcha-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fafcff;
  border: 1px solid #d0dbea;
  padding: 4px 12px 4px 16px;
  margin-top: 4px;
}
.captcha-row span {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 4px;
  color: #0b1a33;
  background: #ffffff;
  padding: 4px 12px;
  border: 1px solid #d0dbea;
  font-family: "Courier New", monospace;
}
.captcha-row input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 4px;
  font-size: 15px;
  outline: none;
  color: #0b1a33;
}
.captcha-row input::placeholder {
  color: #b0c0d0;
}

.btn-submit {
  width: 100%;
  padding: 14px;
  background: #1a56db;
  border: none;
  border-radius: 0;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
  margin-top: 10px;
  box-shadow: 0 4px 12px rgba(26, 86, 219, 0.25);
}
.btn-submit:hover {
  background: #0f3f9e;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(26, 86, 219, 0.35);
}

/* ========== 8. СООБЩЕНИЯ ========== */
.message {
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
}
.message.error {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}
.message.success {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}
.message.success a {
  color: #065f46;
  font-weight: 700;
  text-decoration: underline;
}

/* ========== 9. ФУТЕР ========== */
.footer-link {
  margin-top: 24px;
  text-align: right;
  font-size: 13px;
  color: #8b9bb5;
  border-top: 1px solid #dbe2ed;
  padding-top: 18px;
}
.footer-link a {
  color: #4b5b73;
  text-decoration: none;
}
.footer-link a:hover {
  color: #1a56db;
}

/* ========== 10. БЛОК "ЗВОНКИ" — АНИМИРОВАННЫЙ СПИСОК ========== */
.calls-preview {
  flex: 0 0 100%;
  padding: 16px 48px 24px;
  background: #f8faff;
  border-top: 1px solid #dbe2ed;
}

.calls-preview .calls-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.calls-preview .calls-header h3 {
  font-size: 20px;
  color: #0b1a33;
  font-family: "Roboto Slab", serif;
  font-weight: 700;
}
.calls-preview .calls-header span {
  font-size: 13px;
  color: #5a6f8a;
  font-family: "Roboto", sans-serif;
}

/* Список звонков — вертикальный, до 5 элементов */
.calls-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 190px;
  overflow-y: hidden;
  padding-right: 0;
}

/* Элемент звонка */
.call-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 14px;
  background: #ffffff;
  border: 1px solid #dbe2ed;
  font-family: "Roboto", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  transition: all 0.3s ease;
  position: relative;
  min-height: 34px;
}

.call-item .call-number {
  font-weight: 500;
  transition: color 0.3s ease;
  letter-spacing: 0.3px;
}

.call-item .call-status {
  font-size: 16px;
  transition: color 0.3s ease;
}

/* Анимация мигания синим (ожидание) */
@keyframes blink-blue {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.2;
  }
}

@keyframes pulse-blue {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.4);
  }
}

/* Стиль принятого звонка (салатово-зелёный) */
.call-item.accepted .call-number {
  color: #22c55e !important;
  font-weight: 600;
}
.call-item.accepted .call-status {
  color: #22c55e !important;
}

/* Бейдж "Активные" с анимированной точкой */
.badge-active {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #1a56db;
  background: #e8effa;
  padding: 3px 12px;
  border: 1px solid #b8c8dd;
}

.badge-active::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-dot 1.2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(0.7);
  }
}

/* Сообщение о завершении всех звонков */
.call-item.done-message {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 14px;
  background: #f0f7f0;
  border: 1px solid #b8d8b8;
  font-family: "Roboto", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  color: #2d6a2d;
  min-height: 34px;
}

/* ========== 11. СТРАНИЦА "ВОЗМОЖНОСТИ" ========== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.feature-card {
  background: #fafcff;
  padding: 20px;
  text-align: center;
  border: 1px solid #dbe2ed;
}
.feature-card .icon {
  font-size: 40px;
  margin-bottom: 10px;
}
.feature-card h4 {
  font-size: 18px;
  color: #0b1a33;
  margin-bottom: 6px;
}
.feature-card p {
  font-size: 14px;
  color: #3a4a62;
  line-height: 1.5;
}

.docs-wrapper {
  width: 100%;
  background: #f8faff;
}

.docs-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #f8faff;
  padding-top: 20px;
  border-bottom: 1px solid #dbe2ed;
  padding-bottom: 24px;
  margin-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.docs-header h1 {
  font-family: "Roboto Slab", serif;
  font-size: 32px;
  color: #0b1a33;
}

.docs-layout {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

/* Боковое меню навигации */
.docs-nav {
  flex: 0 0 240px;
  background: #f8faff;
  border: 1px solid #dbe2ed;
  padding: 20px;
  position: sticky;
  top: 180px;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #b8c8dd #f8faff;
}

.docs-nav h4 {
  font-family: "Roboto Slab", serif;
  font-size: 16px;
  color: #0b1a33;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #dbe2ed;
}

.docs-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.docs-nav a {
  text-decoration: none;
  color: #3a4a62;
  font-size: 14px;
  display: block;
  padding: 6px 10px;
  border-left: 2px solid transparent;
  transition: 0.2s;
}

.docs-nav a:hover {
  color: #1a56db;
  background: #eef2f7;
  border-left-color: #1a56db;
}

/* Основной контент инструкции */
.docs-content {
  flex: 1;
  min-width: 0;
}

.doc-step {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid #dbe2ed;
  scroll-margin-top: 200px;
}

.doc-step:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.step-badge {
  display: inline-block;
  background: #e8effa;
  color: #1a56db;
  border: 1px solid #b8c8dd;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.left-panel .doc-step h2 {
  font-family: "Roboto Slab", serif;
  font-size: 22px;
  color: #0b1a33;
  margin-bottom: 12px;
}

.left-panel .doc-step h2 .highlight {
  display: inline-block;
  background: linear-gradient(135deg, #1a56db, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.doc-step h3 {
  font-family: "Roboto Slab", serif;
  font-size: 18px;
  color: #0b1a33;
  margin: 24px 0 10px;
}

/* Списки внутри документации */
.doc-step ul {
  margin: 12px 0 20px 20px;
  color: #3a4a62;
  font-size: 15px;
  line-height: 1.6;
}

.doc-step ol {
  margin: 12px 0 20px 20px;
  color: #3a4a62;
  font-size: 15px;
  line-height: 1.6;
  list-style: none;
  counter-reset: item;
}

.doc-step li {
  margin-bottom: 10px;
  padding-left: 4px;
}

.doc-step li strong {
  color: #0b1a33;
}

.doc-step ol > li::before {
  counter-increment: item;
  content: counters(item, ".") ". ";
}

/* Встроенный код (файлы, пути, команды в тексте) */
.doc-step code {
  background: #eef2f7;
  color: #1a56db;
  font-family: "Courier New", monospace;
  font-size: 13px;
  padding: 2px 6px;
  border: 1px solid #d0dbea;
}

/* Таблицы в стиле ASTERLINK */
.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
  background: #f8faff;
  border: 1px solid #dbe2ed;
}

.doc-table th {
  background: #f8faff;
  color: #0b1a33;
  font-family: "Roboto Slab", serif;
  font-weight: 700;
  text-align: left;
  padding: 12px 16px;
  border: 1px solid #dbe2ed;
}

.doc-table td {
  padding: 12px 16px;
  color: #3a4a62;
  border: 1px solid #dbe2ed;
  line-height: 1.5;
  vertical-align: top;
}

.doc-table td:first-child {
  font-weight: 600;
  color: #1a56db;
  white-space: nowrap;
}

.doc-step p {
  font-size: 15px;
  line-height: 1.6;
  color: #3a4a62;
  margin-bottom: 16px;
}

/* Блок для скриншотов */
.doc-image-box {
  background: #f8faff;
  border: 1px solid #dbe2ed;
  padding: 12px 12px 16px;
  margin: 24px auto;
  width: fit-content;
  max-width: 100%;
  box-shadow: 0 6px 18px rgba(11, 26, 51, 0.08);
}

.doc-image-box img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 1px solid #d0dbea;
}

.doc-image-caption {
  font-size: 13px;
  font-weight: 500;
  color: #5a6f8a;
  margin-top: 12px;
  text-align: center;
  line-height: 1.4;
}

/* Блок для команд или кода */
.doc-code {
  background: #0b1a33;
  color: white;
  font-family: "Courier New", monospace;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.6;
  padding: 14px 18px;
  border-left: 4px solid #1a56db;
  overflow-x: auto;
  margin: 16px 0;
}

/* Важное примечание */
.doc-note {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-left: 4px solid #22c55e;
  color: #065f46;
  padding: 12px 16px;
  font-size: 14px;
  margin: 16px 0;
}

.doc-note a {
  color: #065f46;
  font-weight: 500;
}

.doc-note.warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b;
  color: #92400e;
}
.doc-note.warning a,
.doc-step li .doc-note.warning,
.doc-step li .doc-note.warning strong {
  color: #92400e;
}

.doc-step li .doc-note {
  margin: 16px 0;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.1;
  color: #065f46;
}

.doc-step li .doc-note strong {
  color: #065f46;
  font-weight: 700;
}

@media (max-width: 900px) {
  .docs-wrapper {
    padding: 28px;
  }
  .docs-layout {
    flex-direction: column;
  }
  .docs-nav {
    width: 100%;
    position: static;
  }
}
/* ========== 12. АДАПТИВНОСТЬ ========== */
@media (max-width: 900px) {
  .left-panel,
  .right-panel {
    flex: 1 1 100%;
    padding: 36px 28px;
  }
  .right-panel {
    border-left: none;
    border-top: 1px solid #dbe2ed;
  }
  .left-panel h1 {
    font-size: 32px;
  }
  .calls-preview {
    padding: 16px 28px 20px;
  }
}

@media (max-width: 480px) {
  .left-panel .actions,
  .right-panel .actions {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-primary,
  .btn-secondary {
    justify-content: center;
  }
  .captcha-row {
    flex-wrap: wrap;
    justify-content: center;
  }
  .captcha-row input {
    min-width: 100px;
  }
  .calls-preview {
    padding: 12px 16px 16px;
  }
  .call-item {
    padding: 4px 10px;
    font-size: 13px;
    min-height: 30px;
  }
  .calls-list {
    max-height: 160px;
  }
}

.landing:has(.docs-wrapper) {
  overflow: visible;
}

html {
  scroll-behavior: smooth;
}

.docs-nav a.active {
  color: #1a56db;
  background-color: #eef2f7;
  border-left-color: #1a56db;
  font-weight: 600;
}
/* Отступ при переходе по якорной ссылке к подзаголовкам h3 */
.doc-step h3 {
  scroll-margin-top: 200px;
}

/* Вложенный список подпунктов в навигации (по умолчанию свернут) */
.docs-nav ul ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 14px;
  margin-top: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition:
    max-height 0.35s ease,
    opacity 0.25s ease,
    margin-top 0.25s ease;
}

/* Автоматическое раскрытие подменю, когда родительский пункт или один из подпунктов активен */
.docs-nav li:has(> a.active) > ul,
.docs-nav li:has(ul a.active) > ul {
  max-height: 500px;
  opacity: 1;
  margin-top: 6px;
}

/* Стили ссылок подпунктов в фирменном стиле ASTERLINK */
.docs-nav ul ul a {
  font-size: 13px;
  line-height: 1.35;
  padding: 5px 10px;
  color: #5a6f8a;
  border-left: 2px solid #dbe2ed;
}

.docs-nav ul ul a:hover,
.docs-nav ul ul a.active {
  color: #1a56db;
  background-color: #eef2f7;
  border-left-color: #1a56db;
  font-weight: 500;
}

/* Аккуратный тонкий скроллбар для Chrome, Edge, Safari */
.docs-nav::-webkit-scrollbar {
  width: 5px;
}

.docs-nav::-webkit-scrollbar-track {
  background: #f8faff;
}

.docs-nav::-webkit-scrollbar-thumb {
  background-color: #b8c8dd;
}

.docs-nav::-webkit-scrollbar-thumb:hover {
  background-color: #1a56db;
}
