/* Блог и страницы услуг studioai.su. Базовые стили повторяют index.html. */

/* ========== RESET ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: #0a0a0f;
  color: #e5e7eb;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid #7F77DD; outline-offset: 2px; }

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(127, 119, 221, 0.22), transparent),
    radial-gradient(ellipse 60% 40% at 80% 60%, rgba(29, 158, 117, 0.10), transparent),
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(216, 90, 48, 0.08), transparent);
  pointer-events: none;
  z-index: 0;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(127, 119, 221, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(127, 119, 221, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}
main { position: relative; z-index: 1; }

/* ========== КОНТЕЙНЕР ========== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
.container.narrow { max-width: 820px; }

/* ========== NAVBAR ========== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10, 10, 15, 0.7);
  border-bottom: 1px solid rgba(127, 119, 221, 0.1);
}
.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: 10px; font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 18px; color: #fff; }
.logo-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #7F77DD, #3C3489);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; color: #fff;
  box-shadow: 0 0 20px rgba(127, 119, 221, 0.5);
}
.nav-links { display: flex; gap: 32px; font-size: 14px; color: #9ca3af; }
.nav-links a { transition: color 0.2s; }
.nav-links a:hover, .nav-links a[aria-current] { color: #fff; }
.nav-cta {
  background: linear-gradient(135deg, #7F77DD, #534AB7);
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  box-shadow: 0 0 20px rgba(127, 119, 221, 0.3);
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 0 30px rgba(127, 119, 221, 0.5); }
@media (max-width: 768px) { .nav-links { display: none; } }

/* ========== КНОПКИ ========== */
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  transition: all 0.2s;
}
.btn-primary {
  background: linear-gradient(135deg, #7F77DD, #534AB7);
  box-shadow: 0 0 30px rgba(127, 119, 221, 0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 40px rgba(127, 119, 221, 0.6); }
.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.btn-secondary:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }

/* ========== ШАПКИ СТРАНИЦ ========== */
.page-hero { padding: 48px 0 24px; }
.section-tag {
  display: inline-block;
  font-size: 13px; font-weight: 500;
  color: #7F77DD;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.page-title, .post-header h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(30px, 4.6vw, 48px);
  line-height: 1.15;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.page-sub { font-size: 17px; color: #9ca3af; max-width: 720px; }

.breadcrumbs { font-size: 13px; color: #6b7280; margin-bottom: 24px; display: flex; flex-wrap: wrap; gap: 6px; }
.breadcrumbs a { color: #9ca3af; }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs .sep { margin-left: 6px; color: #4b5563; }
.breadcrumbs [aria-current] { color: #6b7280; }

/* ========== СТАТЬЯ ========== */
.post { padding: 48px 0 0; }
.post-header { margin-bottom: 28px; }
.post-cluster {
  display: inline-block;
  font-size: 12px;
  color: #CECBF6;
  background: rgba(127, 119, 221, 0.15);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.post-cluster:hover { background: rgba(127, 119, 221, 0.28); }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: #9ca3af; }

.tldr, .toc {
  border-radius: 16px;
  padding: 22px 26px;
  margin-bottom: 24px;
}
.tldr {
  background: linear-gradient(135deg, rgba(127, 119, 221, 0.14), rgba(29, 158, 117, 0.06));
  border: 1px solid rgba(127, 119, 221, 0.3);
}
.toc { background: rgba(255, 255, 255, 0.02); border: 1px solid rgba(255, 255, 255, 0.08); }
.tldr-title, .toc-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px; font-weight: 600; color: #fff;
  margin-bottom: 10px;
}
.tldr ul, .toc ol { padding-left: 20px; display: grid; gap: 6px; }
.tldr li { color: #e5e7eb; font-size: 15.5px; }
.toc li { color: #9ca3af; font-size: 15px; }
.toc a { color: #CECBF6; }
.toc a:hover { color: #fff; text-decoration: underline; }
.service-hero .tldr { margin-top: 8px; }

/* ========== ТЕКСТ ========== */
.prose { font-size: 17px; line-height: 1.75; color: #d1d5db; }
.prose > * + * { margin-top: 18px; }
.prose h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(23px, 3vw, 29px);
  line-height: 1.25;
  color: #fff;
  letter-spacing: -0.01em;
  margin-top: 48px;
}
.prose h3 { font-size: 19px; line-height: 1.35; color: #fff; margin-top: 32px; }
.prose h2 + *, .prose h3 + * { margin-top: 12px; }
.prose a { color: #a9a3ff; text-decoration: underline; text-decoration-color: rgba(169, 163, 255, 0.4); text-underline-offset: 3px; }
.prose a:hover { color: #fff; text-decoration-color: #fff; }
.prose strong { color: #fff; font-weight: 600; }
.prose ul, .prose ol { padding-left: 24px; display: grid; gap: 8px; }
.prose li::marker { color: #7F77DD; }
.prose blockquote {
  border-left: 3px solid #7F77DD;
  background: rgba(127, 119, 221, 0.08);
  border-radius: 0 12px 12px 0;
  padding: 16px 20px;
  color: #e5e7eb;
}
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 2px 6px;
}
.prose pre { background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; padding: 16px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; border-top: 1px solid rgba(255, 255, 255, 0.08); margin: 36px 0; }
.table-wrap { overflow-x: auto; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.prose th, .prose td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.prose th { color: #fff; font-weight: 600; background: rgba(127, 119, 221, 0.1); }
.prose tr:last-child td { border-bottom: 0; }

/* ========== FAQ ========== */
.faq { margin-top: 56px; }
.faq h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(23px, 3vw, 29px);
  color: #fff;
  margin-bottom: 18px;
}
.faq-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  margin-bottom: 12px;
  transition: border-color 0.2s;
}
.faq-item[open] { border-color: rgba(127, 119, 221, 0.3); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-size: 16px; font-weight: 500; color: #fff;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(127, 119, 221, 0.2);
  display: flex; align-items: center; justify-content: center;
  color: #7F77DD;
  transition: transform 0.3s;
  flex-shrink: 0;
}
.faq-item[open] .faq-icon { transform: rotate(45deg); }
.faq-a { padding: 0 22px 18px; color: #9ca3af; font-size: 15.5px; line-height: 1.65; }

/* ========== CTA ========== */
.post-cta {
  margin: 56px 0 0;
  padding: 40px 36px;
  background: linear-gradient(135deg, rgba(127, 119, 221, 0.15), rgba(60, 52, 137, 0.1));
  border: 1px solid rgba(127, 119, 221, 0.3);
  border-radius: 24px;
}
.post-cta h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(23px, 3vw, 30px);
  line-height: 1.2;
  color: #fff;
  margin-bottom: 12px;
}
.post-cta p { color: #CECBF6; font-size: 16px; max-width: 600px; }
.post-cta .cta-row { margin-top: 22px; }
.contact-alt-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.contact-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  font-size: 14px;
  color: #e5e7eb;
  transition: all 0.2s;
}
.contact-link:hover { background: rgba(127, 119, 221, 0.15); border-color: rgba(127, 119, 221, 0.4); color: #fff; }

/* ========== УСЛУГА ========== */
.service-price {
  display: grid;
  gap: 2px;
  margin-top: 8px;
  padding: 18px 22px;
  border-radius: 16px;
  background: rgba(29, 158, 117, 0.08);
  border: 1px solid rgba(29, 158, 117, 0.3);
  max-width: 420px;
}
.service-price span { font-size: 13px; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.08em; }
.service-price strong { font-family: 'Space Grotesk', sans-serif; font-size: 26px; color: #fff; }
.service-price small { font-size: 13px; color: #9ca3af; }
#details { padding-top: 24px; }

/* ========== КАРТОЧКИ ========== */
.list-section { padding: 24px 0 8px; }
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.post-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  background: linear-gradient(135deg, rgba(127, 119, 221, 0.08), rgba(29, 158, 117, 0.03));
  border: 1px solid rgba(127, 119, 221, 0.2);
  border-radius: 20px;
  transition: transform 0.25s, border-color 0.25s;
}
.post-card:hover { transform: translateY(-3px); border-color: rgba(127, 119, 221, 0.45); }
.post-card[hidden] { display: none; }
.post-card-tag {
  align-self: flex-start;
  font-size: 12px;
  color: #CECBF6;
  background: rgba(127, 119, 221, 0.15);
  padding: 3px 10px;
  border-radius: 999px;
}
.post-card-title { font-family: 'Space Grotesk', sans-serif; font-size: 19px; line-height: 1.3; color: #fff; font-weight: 600; }
.post-card-desc { font-size: 14.5px; color: #9ca3af; line-height: 1.55; flex-grow: 1; }
.post-card-date { font-size: 13px; color: #6b7280; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chip {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: #d1d5db;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s;
}
.chip span { color: #6b7280; margin-left: 4px; }
.chip:hover { border-color: rgba(127, 119, 221, 0.4); color: #fff; }
.chip.active { background: rgba(127, 119, 221, 0.2); border-color: rgba(127, 119, 221, 0.5); color: #fff; }

.related { padding: 72px 0 0; }
.related h2, .inline-cards h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(23px, 3vw, 29px);
  color: #fff;
  margin-bottom: 20px;
}
.inline-cards { margin-top: 56px; }
.inline-cards .cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }

/* ========== FOOTER ========== */
footer {
  position: relative;
  z-index: 1;
  padding: 60px 0 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-col h4 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  color: #fff;
  margin-bottom: 16px;
  font-weight: 600;
}
.footer-col a, .footer-col p {
  display: block;
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 8px;
  transition: color 0.2s;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: #6b7280;
  flex-wrap: wrap; gap: 12px;
}
.footer-bottom a { color: #9ca3af; text-decoration: underline; text-underline-offset: 3px; }
.footer-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-domains { display: flex; gap: 16px; }
.footer-domains span { color: #CECBF6; }
.liveinternet-counter {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 6px;
  border: 1px solid rgba(206, 203, 246, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  opacity: 0.62;
}
.liveinternet-counter img { display: block; border: 0; }

/* ========== МОБИЛКА ========== */
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .nav-inner { padding: 14px 16px; }
  .page-hero, .post { padding-top: 32px; }
  .prose { font-size: 16.5px; }
  .tldr, .toc { padding: 18px 18px; }
  .prose table { font-size: 14px; min-width: 520px; }
  .prose th, .prose td { padding: 10px 12px; }
  .post-cta { padding: 28px 20px; }
  .cards { grid-template-columns: 1fr; }
  .btn-primary, .btn-secondary { width: 100%; text-align: center; }
  .footer-grid { gap: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .post-card, .btn-primary, .btn-secondary { transition: none; }
}
