/* RankSEO — shared styles */
:root {
  --bg: #0b0f19;
  --bg-card: #121826;
  --bg-elevated: #1a2234;
  --border: #2a3548;
  --text: #e8ecf4;
  --text-muted: #8b95a8;
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.25);
  --cyan: #22d3ee;
  --green: #34d399;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--accent-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--cyan); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: 10px; font-weight: 600; font-size: 0.92rem;
  border: none; cursor: pointer; transition: all 0.25s; text-decoration: none; white-space: nowrap;
}
.btn--primary {
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: #fff; box-shadow: 0 4px 20px var(--accent-glow);
}
.btn--primary:hover { transform: translateY(-2px); color: #fff; box-shadow: 0 8px 28px var(--accent-glow); }
.btn--ghost {
  background: rgba(255,255,255,0.06); color: var(--text); border: 1px solid var(--border);
}
.btn--ghost:hover { background: rgba(255,255,255,0.1); color: var(--text); border-color: var(--accent); }
.btn--outline {
  background: transparent; color: var(--accent-light); border: 2px solid var(--border);
}
.btn--outline:hover { border-color: var(--accent); color: var(--accent-light); }

.tag {
  display: inline-flex; padding: 5px 12px; border-radius: 100px;
  font-size: 0.78rem; font-weight: 600; background: rgba(59,130,246,0.12);
  color: var(--accent-light); border: 1px solid rgba(59,130,246,0.25);
}

/* Header */
.header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(11,15,25,0.92); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h); gap: 20px;
}
.logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.1rem; color: var(--text); flex-shrink: 0;
}
.logo__icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 800; color: #fff;
}
.nav { display: flex; gap: 2px; list-style: none; flex-wrap: wrap; align-items: stretch; }
.nav > li { position: relative; display: flex; align-items: stretch; }
.nav a {
  font-size: 0.85rem; font-weight: 500; color: var(--text-muted);
  padding: 8px 12px; border-radius: 8px; display: flex; align-items: center;
}
.nav a:hover, .nav a.active, .nav .current-menu-item > a,
.nav .current-menu-ancestor > a { color: var(--text); background: rgba(255,255,255,0.05); }
.nav .sub-menu {
  display: none; list-style: none; margin: 0; padding: 8px;
  position: absolute; top: calc(100% + 4px); left: 0; min-width: 260px;
  max-width: min(320px, 90vw); max-height: min(70vh, 520px); overflow-y: auto;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); z-index: 200;
}
.nav .sub-menu .sub-menu { top: 0; left: calc(100% + 4px); }
.nav li:hover > .sub-menu { display: block; }
.nav .sub-menu li { position: relative; }
.nav li.has-submenu { position: relative; }
.nav li.has-submenu > a { padding-right: 34px; }
.nav .sub-menu a {
  padding: 10px 12px; border-radius: 8px; white-space: normal; line-height: 1.35;
}
.nav .submenu-toggle {
  display: none; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border: 0; border-radius: 6px; cursor: pointer;
  background: rgba(255,255,255,0.06); color: var(--text-muted);
}
.nav .submenu-toggle span {
  display: block; width: 8px; height: 8px; margin: 0 auto;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px);
}
.header__cta { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.header__phone { font-weight: 700; color: var(--text); font-size: 0.95rem; }
.nav-toggle {
  display: none; background: none; border: none; color: var(--text);
  font-size: 1.5rem; cursor: pointer; padding: 8px;
}

/* Hero */
.hero {
  padding: 80px 0 96px; position: relative; overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 60% at 80% 20%, rgba(59,130,246,0.12) 0%, transparent 60%),
              radial-gradient(ellipse 50% 50% at 10% 80%, rgba(34,211,238,0.06) 0%, transparent 50%);
  pointer-events: none;
}
.hero__grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px;
  align-items: center; position: relative;
}
.hero h1 {
  font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.15;
  font-weight: 800; margin-bottom: 20px; letter-spacing: -0.02em;
}
.hero h1 em { font-style: normal; color: var(--accent-light); }
.hero__lead { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 28px; max-width: 540px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.hero__stats { display: flex; gap: 32px; flex-wrap: wrap; }
.hero__stat strong { display: block; font-size: 1.4rem; color: var(--cyan); font-weight: 800; }
.hero__stat span { font-size: 0.8rem; color: var(--text-muted); }

.form-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 28px;
}
.form-card h2 { font-size: 1.2rem; margin-bottom: 6px; }
.form-card p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; }
.form-row { margin-bottom: 12px; }
.form-row label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 5px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--bg-elevated);
  color: var(--text); font-size: 0.9rem; font-family: var(--font);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--accent);
}
.form-note { font-size: 0.72rem; color: var(--text-muted); margin-top: 10px; text-align: center; }

/* Sections */
.section { padding: 80px 0; }
.section--alt { background: var(--bg-card); }
.section__head { max-width: 640px; margin-bottom: 48px; }
.section__head--center { text-align: center; margin-left: auto; margin-right: auto; }
.section__head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 12px;
  letter-spacing: -0.02em; line-height: 1.2;
}
.section__head p { color: var(--text-muted); font-size: 1rem; }

/* Cards grid */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cards-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; transition: all 0.3s;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow); }
.card__icon { font-size: 1.6rem; margin-bottom: 14px; }
.card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.card p { font-size: 0.88rem; color: var(--text-muted); }
.card a.card-link { font-size: 0.85rem; font-weight: 600; margin-top: 12px; display: inline-block; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.step { text-align: center; padding: 20px 12px; }
.step__num {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--cyan));
  color: #fff; font-weight: 800; font-size: 1rem;
  display: flex; align-items: center; justify-content: center; margin: 0 auto 14px;
}
.step h3 { font-size: 0.92rem; margin-bottom: 6px; }
.step p { font-size: 0.8rem; color: var(--text-muted); }

/* Specialists */
.spec-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; text-align: center;
}
.spec-card__avatar {
  width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.2rem; color: #fff;
}
.spec-card h3 { font-size: 1rem; margin-bottom: 4px; }
.spec-card__role { font-size: 0.8rem; color: var(--accent-light); font-weight: 600; margin-bottom: 8px; }
.spec-card p { font-size: 0.82rem; color: var(--text-muted); }

/* Pricing */
.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.price-card {
  background: var(--bg-elevated); border: 2px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px 24px; text-align: center; position: relative;
}
.price-card--hit { border-color: var(--accent); box-shadow: 0 0 40px var(--accent-glow); }
.price-card--hit::before {
  content: "Популярный"; position: absolute; top: -12px; left: 50%;
  transform: translateX(-50%); background: var(--accent); color: #fff;
  padding: 4px 16px; border-radius: 100px; font-size: 0.75rem; font-weight: 700;
}
.price-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.price-card__desc { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 12px; }
.price-card__val { font-size: 2.2rem; font-weight: 800; margin: 12px 0; }
.price-card__val small { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }
.price-card ul { list-style: none; margin: 20px 0; text-align: left; }
.price-card li {
  padding: 8px 0; font-size: 0.85rem; color: var(--text-muted);
  border-bottom: 1px solid var(--border); display: flex; gap: 8px;
}
.price-card li::before { content: "✓"; color: var(--green); font-weight: 700; flex-shrink: 0; }

/* Cases */
.case-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.case-card__niche { font-size: 0.75rem; color: var(--cyan); font-weight: 600; margin-bottom: 8px; }
.case-card h3 { font-size: 1.05rem; margin-bottom: 12px; }
.case-card__metrics { display: flex; gap: 20px; margin-top: 16px; }
.case-card__metric strong { display: block; font-size: 1.3rem; color: var(--green); }
.case-card__metric span { font-size: 0.75rem; color: var(--text-muted); }

/* Carousel */
.carousel { position: relative; }
.carousel__viewport { overflow: hidden; }
.carousel__track { display: flex; transition: transform 0.45s cubic-bezier(0.4,0,0.2,1); }
.carousel__slide { flex-shrink: 0; min-width: 0; margin-right: 20px; }
.review-card {
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; height: 100%;
}
.review-card__header { display: flex; gap: 12px; margin-bottom: 12px; align-items: center; }
.review-card__avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.8rem; color: #fff; flex-shrink: 0;
}
.review-card__name { font-weight: 600; font-size: 0.9rem; }
.review-card__meta { font-size: 0.75rem; color: var(--text-muted); }
.review-card__stars { color: #fbbf24; font-size: 0.85rem; margin-bottom: 10px; }
.review-card__text { font-size: 0.88rem; color: var(--text-muted); line-height: 1.65; }
.carousel__controls { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 28px; }
.carousel__btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--bg-elevated); color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.carousel__btn:hover { border-color: var(--accent); background: var(--accent); color: #fff; }
.carousel__btn:disabled { opacity: 0.3; cursor: not-allowed; }
.carousel__dots { display: flex; gap: 8px; }
.carousel__dot {
  width: 8px; height: 8px; border-radius: 50%; border: none;
  background: var(--border); cursor: pointer; padding: 0;
}
.carousel__dot--active { background: var(--accent); transform: scale(1.25); }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq__item { border-bottom: 1px solid var(--border); padding: 24px 0; }
.faq__item h3 { font-size: 1.02rem; margin-bottom: 10px; line-height: 1.4; }
.faq__item p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.7; }

/* Article */
.article { max-width: 800px; margin: 0 auto; }
.article h2 { font-size: 1.4rem; margin: 32px 0 12px; line-height: 1.3; }
.article h2:first-child { margin-top: 0; }
.article h3 { font-size: 1.1rem; margin: 24px 0 10px; }
.article p { color: var(--text-muted); margin-bottom: 14px; font-size: 0.95rem; line-height: 1.75; }
.article ul, .article ol { margin: 10px 0 18px 22px; color: var(--text-muted); font-size: 0.95rem; }
.article li { margin-bottom: 6px; }

/* CTA */
.cta-block {
  text-align: center; padding: 56px 40px;
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-card));
  border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.cta-block h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 10px; }
.cta-block p { color: var(--text-muted); margin-bottom: 24px; max-width: 520px; margin-left: auto; margin-right: auto; }
.cta-block__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Breadcrumb */
.breadcrumb {
  font-size: 0.82rem; color: var(--text-muted); padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent-light); }

/* Page hero (inner pages) */
.page-hero { padding: 48px 0 56px; }
.page-hero h1 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-bottom: 16px; letter-spacing: -0.02em; }
.page-hero p { color: var(--text-muted); font-size: 1.05rem; max-width: 640px; }

/* Blog list */
.blog-list { display: grid; gap: 20px; }
.blog-item {
  display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 28px;
  transition: border-color 0.2s, transform 0.2s;
}
.blog-item h3 { font-size: 1.1rem; margin-bottom: 6px; }
.blog-item p { font-size: 0.88rem; color: var(--text-muted); }
.blog-item__date { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }
.blog-item:hover { border-color: rgba(59,130,246,0.45); transform: translateY(-1px); }
.blog-item h3 a { color: var(--text); }
.blog-item h3 a:hover { color: var(--accent-light); }

/* Pagination */
.rankseo-pagination { margin-top: 40px; padding-top: 8px; }
.rankseo-pagination .page-numbers {
  display: flex; flex-wrap: wrap; gap: 8px; list-style: none;
  padding: 0; margin: 0; justify-content: center; align-items: center;
}
.rankseo-pagination .page-numbers li { margin: 0; }
.rankseo-pagination .page-numbers a,
.rankseo-pagination .page-numbers span {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-width: 44px; height: 44px; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg-elevated); color: var(--text-muted);
  font-size: 0.88rem; font-weight: 600; line-height: 1;
  transition: border-color 0.2s, color 0.2s, background 0.2s, transform 0.2s;
}
.rankseo-pagination .page-numbers a:hover {
  color: var(--text); border-color: rgba(59,130,246,0.55);
  background: rgba(59,130,246,0.08); transform: translateY(-1px);
}
.rankseo-pagination .page-numbers .current {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  box-shadow: 0 8px 24px rgba(37,99,235,0.25);
}
.rankseo-pagination .page-numbers .dots {
  min-width: auto; padding: 0 6px; border: 0; background: transparent;
  color: var(--text-muted);
}
.rankseo-pagination .page-numbers .prev,
.rankseo-pagination .page-numbers .next { padding: 0 18px; }
.rankseo-pagination__label { display: inline-block; }
.rankseo-pagination-empty { color: var(--text-muted); }

.navigation.pagination { margin-top: 40px; }
.navigation.pagination .nav-links { display: flex; justify-content: center; }
.navigation.pagination .page-numbers {
  display: flex; flex-wrap: wrap; gap: 8px; list-style: none;
  padding: 0; margin: 0; justify-content: center;
}

@media (max-width: 640px) {
  .rankseo-pagination .page-numbers .prev,
  .rankseo-pagination .page-numbers .next { padding: 0 14px; }
  .rankseo-pagination__label { display: none; }
  .rankseo-pagination .page-numbers a,
  .rankseo-pagination .page-numbers span {
    min-width: 40px; height: 40px; padding: 0 10px;
  }
}

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.contact-info h3 { margin-bottom: 16px; }
.contact-info p, .contact-info li { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 10px; }
.contact-info ul { list-style: none; }

/* Footer */
.footer {
  background: var(--bg-card); border-top: 1px solid var(--border);
  padding: 56px 0 28px; margin-top: 0;
}
.footer__grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px; margin-bottom: 40px;
}
.footer h4 { font-size: 0.9rem; margin-bottom: 14px; color: var(--text); }
.footer ul { list-style: none; }
.footer li { margin-bottom: 8px; font-size: 0.85rem; }
.footer a { color: var(--text-muted); }
.footer a:hover { color: var(--accent-light); }
.footer__desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.65; margin-top: 10px; }
.footer__bottom {
  border-top: 1px solid var(--border); padding-top: 20px;
  font-size: 0.78rem; color: var(--text-muted);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}

/* Mobile nav */
@media (max-width: 1024px) {
  .hero__grid, .contact-grid { grid-template-columns: 1fr; }
  .cards-3, .cards-4, .pricing { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav {
    display: none; position: fixed; top: var(--header-h); left: 0; right: 0;
    background: var(--bg-card); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 12px; gap: 4px; max-height: calc(100vh - var(--header-h));
    overflow-y: auto; align-items: stretch;
  }
  .nav.open { display: flex; }
  .nav > li { flex-direction: column; align-items: stretch; }
  .nav .sub-menu {
    position: static; display: none; max-width: none; max-height: none;
    overflow: visible; box-shadow: none; border: 0; padding: 0 0 0 12px;
    margin-top: 4px; background: transparent;
  }
  .nav li.submenu-open > .sub-menu { display: block; }
  .nav li:hover > .sub-menu { display: none; }
  .nav li.submenu-open:hover > .sub-menu { display: block; }
  .nav .sub-menu .sub-menu { padding-left: 12px; }
  .nav .submenu-toggle { display: block; }
  .nav-toggle { display: block; }
  .header__cta .btn { display: none; }
  .cards-3, .cards-4, .pricing, .steps { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .blog-item { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .carousel__slide { margin-right: 0; }
}
