@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --red:        #CC1A1A;
  --red-hover:  #b01515;
  --blue:       #1a6fcc;
  --blue-hover: #155cb0;
  --green:      #1a9c47;
  --black:      #111111;
  --dark:       #1e1e1e;
  --gray-dark:  #444;
  --gray:       #777;
  --gray-light: #e5e5e5;
  --bg:         #f6f6f6;
  --white:      #ffffff;
  --radius:     8px;
  --shadow:     0 2px 12px rgba(0,0,0,.08);
  --transition: .18s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Container ───────────────────────────────────────────────────────────────── */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 780px; }

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  text-decoration: none !important;
  white-space: nowrap;
}
.btn-primary  { background: var(--red);   color: var(--white); }
.btn-primary:hover  { background: var(--red-hover); }
.btn-blue     { background: var(--blue);  color: var(--white); }
.btn-blue:hover  { background: var(--blue-hover); }
.btn-green    { background: var(--green); color: var(--white); }
.btn-outline  { background: transparent; border-color: var(--gray-light); color: var(--black); }
.btn-outline:hover { border-color: var(--black); }
.btn-text     { background: transparent; border: none; color: var(--gray); padding: 8px 0; }
.btn-text:hover { color: var(--black); }
.btn-gradient-blue {
  background: linear-gradient(135deg, #1a6fcc 0%, #0d9de0 100%);
  color: var(--white);
  border-color: transparent;
}
.btn-gradient-blue:hover {
  background: linear-gradient(135deg, #155cb0 0%, #0b88c2 100%);
}
.btn-sm       { padding: 8px 16px; font-size: 14px; }
.btn-block    { width: 100%; }

/* ── Badge ───────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 100px;
  border: 1px solid var(--gray-light);
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-dark);
}

/* ── Header ──────────────────────────────────────────────────────────────────── */
.site-header {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo img { filter: brightness(0) invert(1); }
.site-nav { display: flex; gap: 4px; }
.site-nav a {
  padding: 8px 14px;
  color: rgba(255,255,255,.85);
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.site-nav a:hover { background: rgba(255,255,255,.1); color: var(--white); }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Hero ────────────────────────────────────────────────────────────────────── */
.hero {
  padding: 80px 0 72px;
  background: var(--white);
  text-align: center;
}
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 28px; }
.hero-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.5px;
  margin-bottom: 20px;
  color: var(--black);
}
.hero-sub {
  font-size: 18px;
  color: var(--gray);
  margin-bottom: 36px;
  line-height: 1.7;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* ── Section ─────────────────────────────────────────────────────────────────── */
.section { padding: 72px 0; }
.section-gray { background: var(--bg); }
.section-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 40px;
}
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 32px;
}
.section-head .section-title { margin-bottom: 0; }
.link-more { font-size: 14px; font-weight: 500; color: var(--red); }

/* ── Features ────────────────────────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  padding: 28px 24px;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.feature-card:hover {
  box-shadow: var(--shadow);
  border-color: #ccc;
}
.feature-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.feature-card p { font-size: 14px; color: var(--gray); line-height: 1.6; }

/* ── Services ────────────────────────────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.service-card h3 { font-size: 18px; font-weight: 700; }
.service-card p  { font-size: 14px; color: var(--gray); flex: 1; }
.service-card .btn { align-self: flex-start; }

/* ── News grid (home) ───────────────────────────────────────────────────────── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.news-card {
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition);
}
.news-card:hover { box-shadow: var(--shadow); }
.news-card-img { display: block; aspect-ratio: 16/9; overflow: hidden; }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.news-card:hover .news-card-img img { transform: scale(1.04); }
.news-card-body { padding: 16px; }
.news-date { font-size: 12px; color: var(--gray); display: block; margin-bottom: 6px; }
.news-date-lg { font-size: 14px; }
.news-card-body h3 { font-size: 15px; font-weight: 600; line-height: 1.4; }
.news-card-body h3 a { color: var(--black); }
.news-card-body h3 a:hover { color: var(--red); text-decoration: none; }

/* ── News list ────────────────────────────────────────────────────────────────── */
.page-hero {
  background: var(--bg);
  padding: 48px 0 40px;
  border-bottom: 1px solid var(--gray-light);
}
.page-hero h1 { font-size: 36px; font-weight: 700; }

.news-list { display: flex; flex-direction: column; gap: 24px; }
.news-list-item {
  display: flex;
  gap: 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--gray-light);
}
.news-list-item:last-child { border-bottom: none; }
.news-list-img { flex: 0 0 180px; aspect-ratio: 16/9; overflow: hidden; border-radius: var(--radius); }
.news-list-img img { width: 100%; height: 100%; object-fit: cover; }
.news-list-body { flex: 1; }
.news-list-body h2 { font-size: 18px; font-weight: 600; margin-top: 4px; }
.news-list-body h2 a { color: var(--black); }
.news-list-body h2 a:hover { color: var(--red); text-decoration: none; }

/* ── Pagination ──────────────────────────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; margin-top: 40px; flex-wrap: wrap; }
.page-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: var(--black);
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition);
}
.page-btn:hover { background: var(--bg); text-decoration: none; }
.page-btn.active { background: var(--red); color: var(--white); border-color: var(--red); }

/* ── Breadcrumb ──────────────────────────────────────────────────────────────── */
.breadcrumb { font-size: 13px; color: var(--gray); }
.breadcrumb a { color: var(--gray); }

/* ── Single news ─────────────────────────────────────────────────────────────── */
.single-news { }
.single-news-header h1 { font-size: clamp(24px, 4vw, 36px); font-weight: 700; margin: 12px 0 24px; }
.single-news-cover {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 32px;
  aspect-ratio: 16/7;
}
.single-news-cover img { width: 100%; height: 100%; object-fit: cover; }
.single-news-footer { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--gray-light); }

/* ── Prose (markdown content) ────────────────────────────────────────────────── */
.prose { line-height: 1.75; }
.prose h1,.prose h2,.prose h3,.prose h4 { font-weight: 700; margin: 1.5em 0 .6em; line-height: 1.3; }
.prose h1 { font-size: 1.8em; }
.prose h2 { font-size: 1.4em; }
.prose h3 { font-size: 1.15em; }
.prose p  { margin: 0 0 1em; }
.prose ul,.prose ol { margin: 0 0 1em 1.5em; }
.prose li  { margin-bottom: .4em; }
.prose a   { color: var(--red); }
.prose blockquote {
  border-left: 3px solid var(--red);
  padding-left: 16px;
  color: var(--gray-dark);
  margin: 1em 0;
}
.prose code {
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .88em;
}
.prose pre {
  background: var(--dark);
  color: #e8e8e8;
  padding: 20px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1em 0;
}
.prose pre code { background: none; padding: 0; font-size: .9em; }
.prose img { border-radius: var(--radius); margin: 1em 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 14px; }
.prose th { background: var(--bg); font-weight: 600; }
.prose th,.prose td { border: 1px solid var(--gray-light); padding: 8px 12px; text-align: left; }
.prose iframe { width: 100%; aspect-ratio: 16/9; border: none; border-radius: var(--radius); margin: 1em 0; }
.prose hr { border: none; border-top: 1px solid var(--gray-light); margin: 2em 0; }

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.site-footer { background: var(--dark); color: rgba(255,255,255,.75); margin-top: auto; }
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 40px;
  padding: 48px 24px 40px;
}
.footer-logo img   { filter: brightness(0) invert(1); }
.footer-tagline    { font-size: 13px; margin-top: 8px; opacity: .6; }
.footer-links      { display: flex; flex-wrap: wrap; gap: 8px 24px; align-content: flex-start; }
.footer-links a    { color: rgba(255,255,255,.7); font-size: 14px; }
.footer-links a:hover { color: var(--white); text-decoration: none; }
.footer-contacts   { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.footer-contacts a { color: rgba(255,255,255,.7); font-size: 14px; }
.footer-contacts a:hover { color: var(--white); text-decoration: none; }
.footer-social     { display: flex; gap: 12px; margin-top: 8px; }
.footer-social a   { color: rgba(255,255,255,.5); display: flex; transition: color var(--transition); }
.footer-social a:hover { color: var(--white); }
.footer-copy {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 24px;
  font-size: 13px;
  color: rgba(255,255,255,.4);
}

/* ── Empty state ─────────────────────────────────────────────────────────────── */
.empty-state { color: var(--gray); font-size: 15px; padding: 40px 0; text-align: center; }

/* ── Icon box (shared across feature/service/card icons) ────────────────────── */
.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--red);
  margin-bottom: 14px;
}
.icon-box svg { width: 24px; height: 24px; }
.icon-box-sm { width: 36px; height: 36px; margin-bottom: 0; }
.icon-box-sm svg { width: 19px; height: 19px; }

/* ── Implementation page (vnedrenie) ─────────────────────────────────────────── */
.impl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}
.impl-card {
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.impl-card:hover {
  box-shadow: var(--shadow);
  border-color: #ccc;
}
.impl-card-featured {
  border-color: var(--blue);
  border-width: 2px;
  box-shadow: 0 0 0 1px var(--blue);
  position: relative;
}
.impl-card-featured::before {
  content: 'Рекомендуем';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--blue);
  color: var(--white);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 14px;
  border-radius: 100px;
}
.impl-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
}
.impl-card-header h3 { font-size: 18px; font-weight: 700; }
.impl-card-desc { font-size: 14px; color: var(--gray); line-height: 1.6; }
.impl-card-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.impl-card-list li {
  font-size: 14px;
  padding-left: 20px;
  position: relative;
  color: var(--black);
}
.impl-card-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}

.impl-services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.impl-service-card {
  padding: 24px;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  transition: box-shadow var(--transition);
}
.impl-service-card:hover { box-shadow: var(--shadow); }
.impl-service-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.impl-service-card p  { font-size: 13px; color: var(--gray); line-height: 1.6; }

.impl-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}
.impl-steps::before {
  content: '';
  position: absolute;
  top: 32px;
  left: calc(12.5% + 12px);
  right: calc(12.5% + 12px);
  height: 2px;
  background: var(--gray-light);
}
.impl-step {
  text-align: center;
  position: relative;
}
.impl-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bg);
  font-size: 20px;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.impl-card-featured .impl-step-num { background: var(--red); color: var(--white); }
.impl-step h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.impl-step p  { font-size: 13px; color: var(--gray); line-height: 1.6; max-width: 200px; margin: 0 auto; }

.impl-cta {
  background: var(--dark);
  color: var(--white);
  text-align: center;
  padding: 72px 0;
}
.impl-cta h2 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 12px;
}
.impl-cta p {
  font-size: 16px;
  color: rgba(255,255,255,.65);
  max-width: 520px;
  margin: 0 auto 32px;
  line-height: 1.6;
}
.impl-cta-links { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.impl-cta-links .btn { min-width: 220px; font-size: 16px; padding: 14px 32px; }
.impl-cta-links .btn-outline { border-color: rgba(255,255,255,.25); color: var(--white); }
.impl-cta-links .btn-outline:hover { border-color: var(--white); }

/* ── Services page (uslugi) ──────────────────────────────────────────────────── */
.usl-services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.usl-service-card {
  padding: 24px;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  transition: box-shadow var(--transition), border-color var(--transition);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.usl-service-card:hover { box-shadow: var(--shadow); border-color: #ccc; }
.usl-service-card h3 { font-size: 15px; font-weight: 600; }
.usl-card-desc { font-size: 13px; color: var(--gray); line-height: 1.6; }
.usl-card-price {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--gray-light);
  font-size: 18px;
}
.usl-price-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.usl-price-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.usl-price-list li span { color: var(--gray); }
.usl-price-list li strong { color: var(--black); white-space: nowrap; }

.usl-plugins-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.usl-plugin-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  transition: box-shadow var(--transition), border-color var(--transition);
}
.usl-plugin-card:hover { box-shadow: var(--shadow); border-color: #ccc; }
.usl-plugin-card h3 { font-size: 13px; font-weight: 500; }
.usl-plugin-card h3 a { color: var(--blue); }
.usl-plugin-card h3 a:hover { color: var(--blue-hover); text-decoration: underline; }
.usl-plugin-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--red);
  white-space: nowrap;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .features-grid  { grid-template-columns: repeat(2, 1fr); }
  .services-grid  { grid-template-columns: repeat(2, 1fr); }
  .footer-inner   { grid-template-columns: 1fr 1fr; }
  .footer-contacts { align-items: flex-start; }
  .impl-grid      { grid-template-columns: repeat(2, 1fr); }
  .impl-services-grid { grid-template-columns: repeat(2, 1fr); }
  .impl-steps     { grid-template-columns: repeat(2, 1fr); }
  .impl-steps::before { display: none; }
  .usl-services-grid { grid-template-columns: repeat(2, 1fr); }
  .usl-plugins-grid  { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .burger { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 64px; left: 0; right: 0;
    background: var(--dark);
    flex-direction: column;
    padding: 12px 0 16px;
    border-top: 1px solid rgba(255,255,255,.08);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 24px; border-radius: 0; }

  .hero { padding: 52px 0 48px; }
  .hero-title { font-size: 32px; }
  .hero-sub   { font-size: 15px; }

  .features-grid  { grid-template-columns: 1fr; }
  .services-grid  { grid-template-columns: 1fr; }
  .news-grid      { grid-template-columns: 1fr; }
  .footer-inner   { grid-template-columns: 1fr; gap: 28px; }
  .footer-contacts { align-items: flex-start; }

  .news-list-item { flex-direction: column; }
  .news-list-img  { flex: none; width: 100%; }

  .section        { padding: 48px 0; }
  .section-head   { flex-direction: column; gap: 8px; }
  .impl-grid      { grid-template-columns: 1fr; }
  .impl-services-grid { grid-template-columns: 1fr; }
  .impl-steps     { grid-template-columns: 1fr; gap: 32px; }
  .impl-steps::before { display: none; }
  .impl-step p    { max-width: none; }
  .impl-cta       { padding: 48px 0; }
  .usl-services-grid { grid-template-columns: 1fr; }
  .usl-plugins-grid  { grid-template-columns: 1fr; }
  .usl-price-list li { flex-direction: column; gap: 2px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 300px; }
}
