/* ==========================================================================
   Pocket Option — Brand Style (Dark Theme)
   Шрифт: Inter | Primary: #0099FA | BG: #0B0E11
   ========================================================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* --- CSS Variables --- */
:root {
  --po-primary: #0099FA;
  --po-primary-hover: #0080D4;
  --po-primary-light: rgba(0, 153, 250, 0.12);
  --po-green: #0ECB81;
  --po-green-light: rgba(14, 203, 129, 0.12);
  --po-red: #F6465D;
  --po-red-light: rgba(246, 70, 93, 0.12);
  --po-yellow: #F0B90B;
  --po-bg-dark: #0B0E11;
  --po-bg-card: #1E2329;
  --po-bg-card-hover: #252930;
  --po-bg-input: #2B3139;
  --po-bg-section: #14171C;
  --po-border: #2B3139;
  --po-text: #EAECEF;
  --po-text-secondary: #848E9C;
  --po-text-muted: #5E6673;
  --po-white: #FFFFFF;
  --po-radius: 8px;
  --po-radius-lg: 12px;
  --po-radius-xl: 16px;
  --po-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --po-transition: all 0.25s ease;
  --po-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --po-container: 1200px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--po-font);
  background-color: var(--po-bg-dark);
  color: var(--po-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--po-primary);
  text-decoration: none;
  transition: var(--po-transition);
}

a:hover {
  color: var(--po-primary-hover);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

/* --- Container --- */
.container {
  max-width: var(--po-container);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  color: var(--po-white);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 16px;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }

p {
  margin-bottom: 16px;
  color: var(--po-text);
}

.text-secondary { color: var(--po-text-secondary); }
.text-primary { color: var(--po-primary); }
.text-green { color: var(--po-green); }
.text-red { color: var(--po-red); }
.text-center { text-align: center; }

/* --- Header / Navbar --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(11, 14, 17, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--po-border);
  padding: 0 20px;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--po-white);
  text-decoration: none;
}

.logo svg {
  width: 32px;
  height: 32px;
}

.logo span {
  color: var(--po-primary);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  color: var(--po-text-secondary);
  font-size: 0.925rem;
  font-weight: 500;
  transition: var(--po-transition);
  position: relative;
}

.nav a:hover,
.nav a.active {
  color: var(--po-white);
}

.nav a.active::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--po-primary);
  border-radius: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-family: var(--po-font);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--po-radius);
  cursor: pointer;
  transition: var(--po-transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--po-primary);
  color: var(--po-white);
}

.btn-primary:hover {
  background: var(--po-primary-hover);
  color: var(--po-white);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 153, 250, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--po-primary);
  border: 1.5px solid var(--po-primary);
}

.btn-outline:hover {
  background: var(--po-primary);
  color: var(--po-white);
}

.btn-green {
  background: var(--po-green);
  color: var(--po-bg-dark);
}

.btn-green:hover {
  background: #0BB874;
  color: var(--po-bg-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(14, 203, 129, 0.35);
}

.btn-lg {
  padding: 16px 40px;
  font-size: 1.05rem;
  border-radius: var(--po-radius-lg);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

/* --- Hero Section --- */
.hero {
  padding: 40px 0 80px;
  background: linear-gradient(135deg, #0B0E11 0%, #0D1B2A 50%, #0B0E11 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 153, 250, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 60px;
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-size: 3rem;
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-text h1 span {
  color: var(--po-primary);
}

.hero-text .subtitle {
  font-size: 1.15rem;
  color: var(--po-text-secondary);
  margin-bottom: 32px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  gap: 40px;
}

.hero-stat {
  text-align: center;
}

.hero-stat .number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--po-primary);
}

.hero-stat .label {
  font-size: 0.85rem;
  color: var(--po-text-secondary);
  margin-top: 4px;
}

.hero-image {
  flex: 1;
  text-align: right;
}

/* --- Section Styles --- */
.section {
  padding: 80px 0;
}

.section-alt {
  background: var(--po-bg-section);
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  margin-bottom: 12px;
}

.section-title p {
  color: var(--po-text-secondary);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}

/* --- Cards / Grid --- */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

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

.card {
  background: var(--po-bg-card);
  border: 1px solid var(--po-border);
  border-radius: var(--po-radius-lg);
  padding: 28px;
  transition: var(--po-transition);
}

.card:hover {
  background: var(--po-bg-card-hover);
  border-color: var(--po-primary);
  transform: translateY(-2px);
  box-shadow: var(--po-shadow);
}

.card-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--po-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.5rem;
}

.card-icon-blue {
  background: var(--po-primary-light);
  color: var(--po-primary);
}

.card-icon-green {
  background: var(--po-green-light);
  color: var(--po-green);
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.card p {
  color: var(--po-text-secondary);
  font-size: 0.95rem;
}

/* --- Feature Box --- */
.feature-box {
  display: flex;
  gap: 40px;
  align-items: center;
  margin-bottom: 60px;
}

.feature-box:nth-child(even) {
  flex-direction: row-reverse;
}

.feature-box .feature-content {
  flex: 1;
}

.feature-box .feature-visual {
  flex: 1;
  background: var(--po-bg-card);
  border-radius: var(--po-radius-xl);
  padding: 40px;
  text-align: center;
}

/* --- Stats Bar --- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  background: var(--po-bg-card);
  border-radius: var(--po-radius-xl);
  overflow: hidden;
  border: 1px solid var(--po-border);
}

.stat-item {
  padding: 32px;
  text-align: center;
  border-right: 1px solid var(--po-border);
}

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

.stat-item .stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--po-primary);
  margin-bottom: 4px;
}

.stat-item .stat-label {
  font-size: 0.9rem;
  color: var(--po-text-secondary);
}

/* --- Tables --- */
.po-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--po-bg-card);
  border-radius: var(--po-radius-lg);
  overflow: hidden;
  margin: 24px 0;
  border: 1px solid var(--po-border);
}

.po-table thead {
  background: var(--po-bg-section);
}

.po-table th {
  padding: 14px 20px;
  text-align: left;
  font-weight: 600;
  color: var(--po-text-secondary);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--po-border);
}

.po-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--po-border);
  font-size: 0.95rem;
}

.po-table tbody tr:last-child td {
  border-bottom: none;
}

.po-table tbody tr:hover {
  background: var(--po-bg-card-hover);
}

/* --- Lists --- */
.po-list {
  margin: 16px 0;
}

.po-list li {
  padding: 10px 0 10px 28px;
  position: relative;
  color: var(--po-text);
}

.po-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 18px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--po-primary);
}

.po-list-check li::before {
  content: '✓';
  background: none;
  color: var(--po-green);
  font-weight: 700;
  font-size: 0.9rem;
  top: 10px;
  left: 2px;
}

.po-list-numbered {
  counter-reset: item;
}

.po-list-numbered li {
  padding-left: 36px;
}

.po-list-numbered li::before {
  content: counter(item);
  counter-increment: item;
  background: var(--po-primary);
  color: var(--po-white);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  top: 12px;
}

/* --- Info Block --- */
.info-block {
  background: var(--po-primary-light);
  border-left: 4px solid var(--po-primary);
  border-radius: 0 var(--po-radius) var(--po-radius) 0;
  padding: 20px 24px;
  margin: 24px 0;
}

.info-block p {
  color: var(--po-text);
  margin: 0;
}

.warning-block {
  background: rgba(240, 185, 11, 0.1);
  border-left: 4px solid var(--po-yellow);
  border-radius: 0 var(--po-radius) var(--po-radius) 0;
  padding: 20px 24px;
  margin: 24px 0;
}

/* --- FAQ Accordion --- */
.faq-item {
  background: var(--po-bg-card);
  border: 1px solid var(--po-border);
  border-radius: var(--po-radius-lg);
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 20px 24px;
  background: none;
  border: none;
  color: var(--po-white);
  font-family: var(--po-font);
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--po-transition);
}

.faq-question:hover {
  background: var(--po-bg-card-hover);
}

.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--po-primary);
  transition: var(--po-transition);
}

.faq-item.active .faq-question::after {
  content: '−';
}

.faq-answer {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.active .faq-answer {
  padding: 0 24px 20px;
  max-height: 1000px;
}

/* --- CTA Section --- */
.cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, #0D1B2A 0%, #0B0E11 100%);
  text-align: center;
}

.cta-section h2 {
  margin-bottom: 16px;
}

.cta-section p {
  color: var(--po-text-secondary);
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Steps --- */
.steps {
  display: flex;
  gap: 24px;
  counter-reset: step;
}

.step {
  flex: 1;
  text-align: center;
  position: relative;
}

.step-number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--po-primary-light);
  color: var(--po-primary);
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  border: 2px solid var(--po-primary);
}

.step h4 {
  margin-bottom: 8px;
}

.step p {
  color: var(--po-text-secondary);
  font-size: 0.9rem;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  padding: 16px 0;
  padding-top: 80px; /* 64px header + 16px gap */
  font-size: 0.875rem;
}

.breadcrumbs a {
  color: var(--po-text-secondary);
}

.breadcrumbs span {
  color: var(--po-text-muted);
  margin: 0 8px;
}

.breadcrumbs .current {
  color: var(--po-text);
}

/* --- Footer --- */
.footer {
  background: var(--po-bg-section);
  border-top: 1px solid var(--po-border);
  padding: 60px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  color: var(--po-text-secondary);
  font-size: 0.9rem;
  margin-top: 16px;
  max-width: 300px;
}

.footer h5 {
  color: var(--po-white);
  font-size: 0.95rem;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-links a {
  display: block;
  color: var(--po-text-secondary);
  font-size: 0.9rem;
  padding: 5px 0;
}

.footer-links a:hover {
  color: var(--po-primary);
}

.footer-bottom {
  border-top: 1px solid var(--po-border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--po-text-muted);
}

.footer-socials {
  display: flex;
  gap: 16px;
}

.footer-socials a {
  color: var(--po-text-secondary);
  font-size: 1.1rem;
}

.footer-socials a:hover {
  color: var(--po-primary);
}

.risk-warning {
  background: var(--po-bg-card);
  border: 1px solid var(--po-border);
  border-radius: var(--po-radius);
  padding: 16px 20px;
  margin-top: 24px;
  font-size: 0.8rem;
  color: var(--po-text-muted);
  line-height: 1.6;
}

/* --- Content Article --- */
.article-content {
  max-width: 1200px;
  margin: 0 auto;
}

/* Списки внутри контента — стандартная нумерация/маркеры */
.article-content ol {
  list-style: decimal;
  padding-left: 24px;
  margin: 16px 0;
}

.article-content ul:not(.po-list) {
  list-style: disc;
  padding-left: 24px;
  margin: 16px 0;
}

.article-content ol li,
.article-content ul:not(.po-list) li {
  padding: 6px 0;
  color: var(--po-text);
}

.article-content ol li::before,
.article-content ul:not(.po-list) li::before {
  display: none !important;
}

.article-content h2 {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--po-border);
}

.article-content h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.article-content h3 {
  margin-top: 32px;
}

.article-content p {
  font-size: 1.02rem;
  line-height: 1.8;
}

/* --- TOC (Table of Contents) --- */
.toc {
  background: var(--po-bg-card);
  border: 1px solid var(--po-border);
  border-radius: var(--po-radius-lg);
  padding: 24px 28px;
  margin-bottom: 40px;
}

.toc h4 {
  margin-bottom: 12px;
  font-size: 1rem;
}

.toc ol {
  list-style: decimal;
  padding-left: 20px;
  counter-reset: none;
}

.toc li {
  padding: 5px 0;
  padding-left: 0;
}

.toc li::before {
  display: none !important;
}

.toc a {
  color: var(--po-text-secondary);
  font-size: 0.925rem;
}

.toc a:hover {
  color: var(--po-primary);
}

/* --- Mobile Burger --- */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.burger span {
  width: 24px;
  height: 2px;
  background: var(--po-text);
  border-radius: 2px;
  transition: var(--po-transition);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-content { flex-direction: column; text-align: center; }
  .hero-text .subtitle { margin: 0 auto 32px; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .hero-image { display: none; }
  .feature-box, .feature-box:nth-child(even) { flex-direction: column; }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .hero { padding: 100px 0 60px; }
  .hero-text h1 { font-size: 2.25rem; }
  .section { padding: 60px 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: 1fr; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--po-border); }
  .steps { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }

  /* Кнопки — всегда в колонку на мобильных */
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
  }

  /* CTA секция — кнопки в колонку */
  .cta-section div[style*="display: flex"] {
    flex-direction: column !important;
    align-items: center !important;
  }

  .cta-section .btn {
    width: 100%;
    max-width: 320px;
    text-align: center;
  }

  /* Таблицы — горизонтальный скролл */
  .po-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .po-table thead,
  .po-table tbody,
  .po-table tr {
    display: table;
    width: 100%;
    table-layout: auto;
  }

  .po-table thead { display: table-header-group; }
  .po-table tbody { display: table-row-group; }
  .po-table tr { display: table-row; }
  .po-table th, .po-table td { display: table-cell; }

  /* Контент — без горизонтального переполнения */
  .article-content {
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  /* Навигация */
  .nav {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--po-bg-dark);
    border-bottom: 1px solid var(--po-border);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
    z-index: 999;
  }

  .nav.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav a.active::after {
    display: none;
  }

  .burger {
    display: flex;
  }

  .header-actions .btn {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  /* FAQ — компактнее на мобильных */
  .faq-question {
    padding: 16px;
    font-size: 0.9rem;
    gap: 12px;
  }

  .faq-answer {
    padding: 0 16px;
  }

  .faq-item.active .faq-answer {
    padding: 0 16px 16px;
  }

  /* Info/warning блоки */
  .info-block, .warning-block {
    padding: 16px;
  }

  /* TOC */
  .toc {
    padding: 16px 20px;
  }

  /* Контейнер — меньше боковых отступов */
  .container {
    padding: 0 16px;
  }
}

@media (max-width: 480px) {
  .hero-text h1 { font-size: 1.75rem; }
  .hero-stats { flex-wrap: wrap; gap: 20px; }
  .btn-lg { padding: 14px 20px; font-size: 0.95rem; }
  .btn { padding: 10px 20px; font-size: 0.9rem; }

  /* Таблицы — минимальная ширина колонок */
  .po-table {
    font-size: 0.8rem;
  }
  .po-table th, .po-table td {
    padding: 8px 10px;
    white-space: nowrap;
  }

  /* Секции компактнее */
  .section { padding: 40px 0; }
  .cta-section { padding: 48px 0; }
  .section-title { margin-bottom: 32px; }

  /* Hero stats компактнее */
  .hero-stat .number { font-size: 1.4rem; }
  .hero-stat .label { font-size: 0.75rem; }
}
