/* 1. Принудительно импортируем шрифт Inter с Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;900&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

/* 2. Базовые стили для body */
body { 
  background: #fff; 
  color: #111827; 
  line-height: 1.8; 
}

/* 3. ЖЕСТКО задаем шрифт для всех текстовых элементов внутри твоего контента */
body, 
.entry-content, 
.wp-block-post-content, 
.content, 
.content p, 
.content h1, 
.content h2, 
.content h3, 
.content li, 
.content td { 
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important; 
}

/* --- Дальше идет твой неизмененный код структуры --- */
.wrap { max-width: 100%; padding: 0; }
.content { max-width: 720px; margin: 0 auto; padding: 3rem 1.5rem 0; }


  /* HERO — на всю ширину */
  .hero {
    background: linear-gradient(160deg, #071a12, #0d281c, #040d09);
    padding: 4rem 2rem 3rem;
    text-align: center;
    position: relative; overflow: hidden;
  }
  .hero::after {
    content: ''; position: absolute; inset: 0;
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="n"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.7" numOctaves="4" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23n)"/%3E%3C/svg%3E');
    opacity: 0.04; pointer-events: none;
  }
  .hero .glow { position: absolute; width: 500px; height: 500px; border-radius: 50%; filter: blur(120px); pointer-events: none; z-index: 1; }
  .hero .g1 { background: rgba(132,204,22,0.06); top: -150px; right: -100px; }
  .hero .g2 { background: rgba(16,185,129,0.04); bottom: -150px; left: -100px; }
  .hero > *:not(.glow) { position: relative; z-index: 2; }

  .hero .badge {
    display: inline-block; backdrop-filter: blur(4px);
    background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.45);
    font-size: 0.6rem; letter-spacing: 0.15em; text-transform: uppercase;
    padding: 0.3rem 0.9rem; border-radius: 999px;
    margin-bottom: 1.5rem;
  }
  .hero h1 {
    font-size: clamp(2.4rem, 5.5vw, 3.4rem);
    font-weight: 900; letter-spacing: -2px;
    color: #fff; line-height: 1.05;
    margin-bottom: 0.75rem;
  }
  .hero p { color: rgba(255,255,255,0.45); font-size: 0.9rem; max-width: 500px; margin: 0 auto; }
  .hero .bar {
    width: 50px; height: 3px;
    background: linear-gradient(90deg, #84cc16, #22c55e);
    border-radius: 2px; margin: 1.25rem auto 0;
  }

  /* CONTENT */
  .content .section-badge {
    display: inline-block;
    font-size: 0.6rem; letter-spacing: 0.12em; text-transform: uppercase;
    font-weight: 600; color: #059669;
    margin-bottom: 0.25rem;
  }
  .content h2 {
    font-size: 1.5rem; font-weight: 700;
    letter-spacing: -0.5px; color: #111827;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
  }
  .content h3 {
    font-size: 1rem; font-weight: 600;
    color: #1f2937; margin: 1.5rem 0 0.5rem;
  }
  .content p { font-size: 0.92rem; color: #374151; margin-bottom: 1rem; }
  .content .em { color: #059669; font-weight: 500; }
  .content .muted-block {
    border-left: 2px solid #22c55e;
    padding: 0.25rem 0 0.25rem 1rem;
    margin: 1.25rem 0;
  }
  .content .muted-block p { color: #374151; font-size: 0.88rem; margin: 0; }
  .content ul { list-style: none; padding: 0; margin: 1rem 0 1.25rem; }
  .content ul li {
    padding: 0.3rem 0 0.3rem 1.4rem; font-size: 0.88rem; color: #374151;
    position: relative;
  }
  .content ul li::before {
    content: ''; position: absolute; left: 0; top: 0.6rem;
    width: 6px; height: 6px; border-radius: 50%; background: #22c55e;
  }

  /* CODE */
  .content .code-block {
    background: #f8f9fa; border: 1px solid #e5e7eb;
    border-radius: 0.75rem; padding: 1.25rem;
    margin-bottom: 1.25rem; overflow-x: auto;
  }
  .content .code-block pre {
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.78rem; line-height: 1.5; color: #374151;
  }
  .content .code-block .arrow { color: #059669; }
  .content .code-block .func { color: #047857; font-weight: 500; }
  .content .code-block .comment { color: #9ca3af; font-style: italic; }

  /* TABLE */
  .content table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; }
  .content td { padding: 0.5rem 0.4rem; font-size: 0.82rem; border-bottom: 1px solid #f3f4f6; }
  .content td:first-child { font-weight: 500; color: #111827; width: 30%; }
  .content td:nth-child(2) { color: #6b7280; }
  .content td:last-child { color: #059669; font-weight: 500; }

  /* DARK BLOCK */
  .content .dark-block {
    background: linear-gradient(135deg, #0a1a14, #0d281c);
    border-radius: 1rem; padding: 1.75rem;
    margin: 2rem 0; position: relative; overflow: hidden;
  }
  .content .dark-block::after {
    content: ''; position: absolute; inset: 0;
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 256 256" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="n"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.7" numOctaves="4" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23n)"/%3E%3C/svg%3E');
    opacity: 0.04; pointer-events: none;
  }
  .content .dark-block > * { position: relative; z-index: 2; }
  .content .dark-block p { color: rgba(255,255,255,0.65); font-size: 0.88rem; margin: 0; }
  .content .dark-block strong { color: #fff; }

  /* IMAGE */
  .content .img-block { margin: 2rem 0; cursor: pointer; }
  .content .img-block img { width: 100%; border-radius: 0.75rem; display: block; box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
  .content .img-block .cap { margin-top: 0.4rem; font-size: 0.72rem; color: #9ca3af; text-align: center; }

  /* WARNING */
  .content .warning {
    background: #fef2f2; border-left: 2px solid #ef4444;
    border-radius: 0.5rem; padding: 1rem 1.25rem; margin: 1.5rem 0;
  }
  .content .warning p { color: #991b1b; font-size: 0.85rem; margin: 0; }

  /* ORDERED LIST */
  .content .num-list { list-style: none; counter-reset: step; padding: 0; margin: 1rem 0; }
  .content .num-list li {
    counter-increment: step;
    padding: 0.5rem 0 0.5rem 2.2rem;
    font-size: 0.88rem; color: #374151;
    position: relative; line-height: 1.5;
    border-bottom: 1px solid #f3f4f6;
  }
  .content .num-list li:last-child { border-bottom: none; }
  .content .num-list li::before {
    content: counter(step);
    position: absolute; left: 0; top: 0.45rem;
    width: 24px; height: 24px;
    background: linear-gradient(135deg, #84cc16, #22c55e);
    color: #fff; font-size: 0.7rem; font-weight: 700;
    border-radius: 50%; display: flex;
    align-items: center; justify-content: center;
  }

  /* CTA */
  .cta {
    background: #f9fafb; border-top: 1px solid #e5e7eb;
    padding: 2.5rem 2rem; text-align: center;
    margin-top: 2rem;
  }
  .cta h3 { font-size: 1.1rem; font-weight: 600; color: #111827; margin-bottom: 0.25rem; }
  .cta p { color: #6b7280; font-size: 0.85rem; margin-bottom: 1.25rem; max-width: 360px; margin-left: auto; margin-right: auto; }
  .cta a {
    display: inline-block;
    background: linear-gradient(135deg, #84cc16, #22c55e);
    color: #fff; font-weight: 600;
    padding: 0.7rem 2.5rem; border-radius: 999px;
    text-decoration: none; font-size: 0.85rem;
    transition: all 0.2s;
  }
  .cta a:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.15); }

  /* LIGHTBOX */
  .lb-overlay {
    display: none; position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 9999; justify-content: center;
    align-items: center; cursor: pointer; padding: 2rem;
  }
  .lb-overlay.active { display: flex; }
  .lb-overlay img { max-width: 90%; max-height: 90%; border-radius: 1rem; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
  .lb-close {
    position: absolute; top: 1.5rem; right: 2rem;
    color: #fff; font-size: 2rem; cursor: pointer;
    font-weight: 300; opacity: 0.7;
    line-height: 1;
  }
  .lb-close:hover { opacity: 1; }

  @media (max-width: 640px) {
    .hero { padding: 2.5rem 1.5rem; }
    .hero h1 { font-size: clamp(1.8rem, 7vw, 2.4rem); }
    .content { padding: 2rem 1rem 0; }
    .cta { padding: 2rem 1.25rem; }
  }

/* ========== CLUSTER NAV ========== */
.cluster-nav {
  max-width: 720px;
  margin: 2.5rem auto 0;
  padding: 1.5rem 1.75rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}
.cluster-nav > * { position: relative; z-index: 2; }

.cluster-nav__header {
  display: flex; align-items: baseline; gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #e5e7eb;
}
.cluster-nav__title {
  font-size: 0.88rem; font-weight: 600; color: #111827;
}
.cluster-nav__count {
  font-size: 0.7rem; color: #9ca3af;
}

.cluster-nav__list {
  display: flex; flex-direction: column; gap: 0;
}
.cluster-nav__item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.5rem 0.6rem;
  text-decoration: none;
  transition: background 0.15s ease;
}
a.cluster-nav__item:hover {
  background: rgba(0,0,0,0.03);
  text-decoration: none;
}
.cluster-nav__item--active {
  background: rgba(34,197,94,0.06);
  border-left: 2px solid #22c55e;
  padding-left: calc(0.6rem - 2px);
}
.cluster-nav__num {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem; font-weight: 700;
  flex-shrink: 0;
  background: #e5e7eb;
  color: #6b7280;
}
.cluster-nav__item--active .cluster-nav__num {
  background: linear-gradient(135deg, #84cc16, #22c55e);
  color: #fff;
}
.cluster-nav__label {
  font-size: 0.82rem; line-height: 1.35;
  color: #6b7280;
}
.cluster-nav__item--active .cluster-nav__label {
  color: #111827; font-weight: 500;
}
a.cluster-nav__item:hover .cluster-nav__label {
  color: #111827;
}

/* Arrows */
.cluster-nav__arrows {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 1rem;
  padding-top: 0.6rem;
  border-top: 1px solid #e5e7eb;
}
.cluster-nav__arrow {
  display: flex; align-items: center; gap: 0.4rem;
  text-decoration: none;
  font-size: 0.78rem; color: #6b7280;
  padding: 0.3rem 0.4rem;
  transition: all 0.15s ease;
}
.cluster-nav__arrow:hover {
  color: #059669;
  text-decoration: none;
}
.cluster-nav__arrow svg {
  stroke: currentColor; fill: none; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}
.cluster-nav__arrow--next { margin-left: auto; }
.cluster-nav__arrow--disabled { visibility: hidden; }

@media (max-width: 640px) {
  .cluster-nav { padding: 1.25rem 1rem; margin-left: 1rem; margin-right: 1rem; }
  .cluster-nav__label { font-size: 0.78rem; }
}

/* ========== BLOG HUB ========== */

.hub {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
}

/* Stats strip */
.hub__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
}
.hub__stats-item {
  font-size: 0.82rem;
  color: #6b7280;
  font-weight: 500;
}
.hub__stats-num {
  font-weight: 700;
  color: #059669;
  font-variant-numeric: tabular-nums;
}
.hub__stats-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: #d1d5db;
}

/* Filter tabs */
.hub__filters {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}
.hub__filters-track {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.hub__filters-track::-webkit-scrollbar { display: none; }

.hub__tab {
  border: none !important;
  outline: none !important;
  background: transparent !important;
  color: #9ca3af !important;
  font-size: 0.82rem;
  font-weight: 500;
  font-family: inherit;
  padding: 0.45rem 1.1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: none !important;
}
.hub__tab:hover {
  color: #4b5563 !important;
  background: #f9fafb !important;
}
.hub__tab--active,
.hub__tab--active:hover,
.hub__tab--active:focus {
  color: #047857 !important;
  background: #ecfdf5 !important;
}
.hub__tab:focus-visible {
  outline: 2px solid #059669 !important;
  outline-offset: -2px;
}

/* Card grid */
.hub__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* Card */
.hub__card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-radius: 1rem;
  overflow: hidden;
  text-decoration: none !important;
  color: inherit;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  opacity: 0;
  transform: translateY(20px);
  position: relative;
}

/* Shimmer gradient overlay */
.hub__card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  opacity: 0;
  background: linear-gradient(
    135deg,
    rgba(240,253,244,0.6) 0%,
    rgba(209,250,229,0.3) 25%,
    rgba(167,243,208,0.1) 50%,
    rgba(209,250,229,0.35) 75%,
    rgba(236,253,245,0.5) 100%
  );
  background-size: 250% 250%;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.hub__card--revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              border-color 0.4s ease,
              box-shadow 0.4s ease;
}

@keyframes hubShimmer {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}

@media (hover: hover) {
  .hub__card:hover {
    border-color: rgba(167,243,208,0.45);
    box-shadow: 0 6px 24px rgba(5,150,105,0.06);
    transform: translateY(-3px);
  }
  .hub__card:hover::before {
    opacity: 1;
    animation: hubShimmer 3s ease-in-out infinite;
  }
  .hub__card:hover .hub__card-arrow {
    color: #059669;
    transform: translateX(3px);
  }
  .hub__card:hover .hub__card-badge {
    background: rgba(5,150,105,0.08);
    color: #047857;
    border-color: rgba(5,150,105,0.15);
  }
}

/* Card image */
.hub__card-img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #f3f4f6;
}

.hub__card-img {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #f3f4f6;
}
.hub__card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
@media (hover: hover) {
  .hub__card:hover .hub__card-img img {
    transform: scale(1.04);
  }
}

/* Card body */
.hub__card-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.15rem 1.25rem 1.25rem;
}



.hub__card-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6b7280;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  padding: 0.2rem 0.55rem;
  border-radius: 0.25rem;
  margin-bottom: 0.65rem;
  transition: all 0.3s ease;
}

.hub__card-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  color: #111827;
  margin-bottom: 0.45rem;
  letter-spacing: -0.2px;
}

.hub__card-desc {
  font-size: 0.8rem;
  line-height: 1.55;
  color: #6b7280;
  flex: 1;
  margin-bottom: 0.75rem;
}

.hub__card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.6rem;
  border-top: 1px solid #f3f4f6;
}
.hub__card-date {
  font-size: 0.7rem;
  color: #9ca3af;
  font-weight: 500;
}
.hub__card-arrow {
  color: #d1d5db;
  transition: all 0.25s ease;
  display: flex;
}

/* Empty state */
.hub__empty {
  text-align: center;
  padding: 3rem 1rem;
}
.hub__empty p {
  color: #9ca3af;
  font-size: 0.88rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .hub__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .hub {
    padding: 1.5rem 1rem 2rem;
  }
  .hub__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .hub__card {
    opacity: 1;
    transform: none;
  }
  .hub__card--revealed {
    opacity: 1;
    transform: none;
  }
}

/* ========== BLOG HUB HERO ========== */

.hub-hero {
  padding: 5rem 2rem 3.5rem !important;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.hub-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem) !important;
  margin-bottom: 1rem !important;
}
.hub-hero > p {
  color: rgba(255,255,255,0.45) !important;
  font-size: 0.92rem !important;
  max-width: 540px !important;
  line-height: 1.65 !important;
}
.hub-hero > *:not(canvas):not(.hub-hero__dots) {
  position: relative;
  z-index: 2;
}

.hub-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(4px);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}
.hub-hero__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.75rem;
}
.hub-hero__tag {
  display: inline-block;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  color: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  transition: all 0.3s ease;
}
.hub-hero__tag:hover {
  color: rgba(255,255,255,0.4);
  border-color: rgba(255,255,255,0.12);
}
.hub-hero__dots {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 1;
  background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
}

@keyframes hubPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.4); }
}

@media (max-width: 640px) {
  .hub-hero { padding: 3rem 1.5rem 2.5rem !important; min-height: 280px; }
  .hub-hero h1 { font-size: clamp(1.6rem, 7vw, 2.2rem) !important; }
  .hub-hero > p br { display: none; }
}