/* БАЗА */

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #020617;
  color: #e5e7eb;
  display: flex;
  flex-direction: column;
}

.site-header,
.site-footer {
  flex-shrink: 0;
}

a {
  color: #60a5fa;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.site-main {
  padding-bottom: 60px;
  flex: 1 0 auto;
}

.main {
  padding: 32px 16px 40px;
}

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

/* HEADER */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: radial-gradient(circle at top, rgba(79, 70, 229, 0.55), rgba(15, 23, 42, 0.98));
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #f9fafb;
}

.logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f46e5, #22d3ee);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.logo-text {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  font-size: 18px;
}

.logo-sub {
  font-size: 12px;
  opacity: 0.78;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
}

.main-nav a {
  color: #e5e7eb;
  opacity: 0.88;
}

.main-nav a:hover {
  opacity: 1;
}

.main-nav a.is-active {
  font-weight: 600;
  opacity: 1;
}

/* BREADCRUMBS */

.breadcrumbs {
  border-bottom: 1px solid rgba(30, 64, 175, 0.5);
  background: linear-gradient(to right, rgba(15,23,42,0.96), rgba(30,64,175,0.25));
  font-size: 13px;
}

.breadcrumbs-inner {
  padding: 6px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.breadcrumbs a {
  color: #9ca3af;
}

.breadcrumbs a:hover {
  color: #e5e7eb;
}

.breadcrumbs-sep {
  color: #6b7280;
}

.breadcrumbs-current {
  color: #e5e7eb;
}

/* HERO */

.hero {
  margin: 0 auto 32px;
}

.hero-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
}

.hero-text {
  flex: 1 1 320px;
}

.hero-subtitle {
  margin-top: 12px;
  color: #9ca3af;
  max-width: 520px;
}

.hero-actions {
  margin-top: 20px;
}

.hero-actions--row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-note {
  margin-top: 10px;
  font-size: 14px;
  color: #9ca3af;
  max-width: 440px;
}

.hero-trust {
  margin-top: 10px;
  font-size: 13px;
  color: #a5b4fc;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.hero-trust .dot {
  opacity: .5;
}

.hero-image img {
  max-width: 320px;
  border-radius: 20px;
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.9);
}

.hero-image--big img {
  max-width: 380px;
}

/* BUTTONS */

.btn {
  display: inline-block;
  padding: 9px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
}

.btn-primary {
  background: #3b82f6;
  color: white;
}

.btn-ghost {
  background: transparent;
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.7);
}

/* SECTIONS */

.section {
  padding: 22px 0;
}

.section--stripe {
  background: rgba(15, 23, 42, 0.9);
}

.section--cta {
  text-align: center;
  margin-top: 8px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: baseline;
  margin-bottom: 16px;
}

.section-link {
  font-size: 14px;
}

/* RICH TEXT */

.rich-text h2,
.rich-text h3 {
  margin-top: 20px;
}

.rich-text p {
  line-height: 1.6;
  margin-top: 8px;
}

/* FEATURES */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.feature-card {
  padding: 16px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.9);
}

/* BLOG GRID & CARDS */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.blog-card {
  border-radius: 16px;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.96);
  display: flex;
  flex-direction: column;
}

.blog-card__thumb img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.blog-card__body {
  padding: 14px 16px 16px;
}

.blog-card__meta-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.blog-card__title {
  margin: 4px 0;
}

.blog-card__meta-date {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 6px;
}

.blog-card__intro {
  font-size: 14px;
  color: #cbd5f5;
}

/* BADGES */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.badge--category {
  background: rgba(59, 130, 246, 0.18);
  color: #bfdbfe;
}

.badge--time {
  background: rgba(148, 163, 184, 0.25);
  color: #e5e7eb;
}

/* PROMO */

.promo-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 20px;
  align-items: flex-start;
}

.promo-note {
  padding: 18px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.96);
  font-size: 14px;
  color: #e5e7eb;
}

.promo-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.promo-col--card {
  padding: 18px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.96);
}

/* FOOTER */

.site-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.3);
  background: radial-gradient(circle at bottom, rgba(37, 99, 235, 0.4), #020617);
  padding: 20px 0 26px;
  font-size: 13px;
  color: #9ca3af;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-title {
  font-weight: 600;
  color: #e5e7eb;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-links a {
  color: #9ca3af;
}

.footer-links a:hover {
  color: #e5e7eb;
}

.blog-categories {
  margin: 16px 0 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.blog-category {
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  color: #e5e7eb;
  background: transparent;
}

.blog-category--active {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.8);
}

/* PRICING */

.pricing-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.pricing-card {
  position: relative;
  background: rgba(15, 23, 42, 0.96);
  border-radius: 18px;
  padding: 18px 18px 20px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pricing-card--popular {
  border-color: rgba(59, 130, 246, 0.9);
  box-shadow: 0 18px 50px rgba(37, 99, 235, 0.35);
}

.pricing-tag {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.18);
  color: #bfdbfe;
}

.pricing-name {
  margin: 0;
  font-size: 18px;
}

.pricing-short {
  margin: 0;
  font-size: 14px;
  color: #9ca3af;
}

.pricing-price-block {
  margin-top: 8px;
  margin-bottom: 6px;
}

.pricing-price-main {
  font-size: 20px;
  font-weight: 700;
  color: #e5e7eb;
}

.pricing-price-main span {
  font-size: 13px;
  font-weight: 500;
  color: #9ca3af;
  margin-left: 4px;
}

.pricing-price-sec {
  font-size: 13px;
  color: #9ca3af;
  margin-top: 2px;
}

.pricing-features ul {
  padding-left: 18px;
  margin: 8px 0 0;
}

.pricing-features li {
  font-size: 14px;
  margin-bottom: 4px;
}

.pricing-cta {
  margin-top: 12px;
}

/* МОБИЛКА */

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-inner {
    flex-direction: column-reverse;
  }

  .main {
    padding-top: 20px;
  }

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

/* === BLOG LAYOUT (SIDEBAR) === */

.blog-layout {
  display: grid;
  grid-template-columns: 1fr; /* По умолчанию 1 колонка (мобилка) */
  gap: 40px;
}

/* На десктопе включаем 2 колонки */
@media (min-width: 900px) {
  .blog-layout {
    grid-template-columns: minmax(0, 2fr) 300px; /* Контент шире, сайдбар 300px */
    align-items: start; /* Чтобы сайдбар не растягивался по высоте */
  }
}

/* Стили статьи внутри сетки */
.article-content {
  background: transparent; /* Убираем фон, если был */
  overflow: hidden; /* Защита от вылезающих картинок */
}

/* Стили Сайдбара */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky; /* Липкий сайдбар! */
  top: 100px; /* Отступ от хедера при скролле */
}

.sidebar-widget {
  background: rgba(15, 23, 42, 0.6); /* Полупрозрачный фон */
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 16px;
  padding: 20px;
}

.sidebar-widget h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: #e5e7eb;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  padding-bottom: 10px;
}

/* Промо-блок */
.sidebar-promo {
  background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.15), rgba(15, 23, 42, 0.8));
  border-color: rgba(59, 130, 246, 0.3);
  text-align: center;
}
.sidebar-promo p {
  font-size: 14px;
  color: #cbd5f5;
  margin-bottom: 16px;
}
.btn-sm {
  font-size: 13px;
  padding: 8px 16px;
  width: 100%;
  box-sizing: border-box;
}

/* Мини-карточки статей */
.sidebar-posts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-post-card {
  display: flex;
  gap: 12px;
  text-decoration: none;
  align-items: flex-start;
  transition: opacity 0.2s;
}
.sidebar-post-card:hover {
  opacity: 0.8;
  text-decoration: none;
}

.sidebar-post-thumb {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  background: #1e293b;
}
.sidebar-post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-post-info {
  flex: 1;
}

.sidebar-post-info h4 {
  font-size: 14px;
  line-height: 1.4;
  margin: 0 0 4px 0;
  color: #e5e7eb;
  font-weight: 500;

  /* Ограничение в 3 строки */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-post-date {
  font-size: 12px;
  color: #64748b;
}
