/*
  PRISRA — CUSTOM CSS (SAFE EDITION, 2026-06-03)
  Tilda: Site Settings → More → Custom CSS

  ⚠️ КРИТИЧЕСКОЕ ПРАВИЛО:
  НЕ использовать селекторы Tilda-классов (.t-*, .t-cover, .t-card, .t-menu, .t-header,
  .t-btn, .t-text, .t-descr, .t-width_100, etc.) ГЛОБАЛЬНО без scope.
  Они стоят на ВСЕХ страницах сайта.

  Старая версия (бэкап custom.css.backup-25may) делала это и ломала:
  - color: rgb(255,255,255,..) на .t-text/.t-descr → белый текст на белых попапах = невидим
  - display: flex на .t-menu__list-item/.t-menu__link → ломала горизонтальное меню
  - aspect-ratio 4/3 на .t-card__img/.t-cover img → ломала пропорции картинок
  - max-width 780px + padding 90px на .t-width_100 → сжимала все страницы в узкую колонку

  Эта версия применяет стили ТОЛЬКО к блог-статьям через .prisra-article-page
  wrapper class (см. ниже). Tilda-структурные классы не трогаем.
*/


/* ==============================================
   1. Глобальные SAFE правила (не трогают Tilda layout)
   ============================================== */

/* Predictable layout for images without dimensions — улучшает CLS, не ломает картинки */
img:not([width]):not([height]) {
  aspect-ratio: auto;
}

/* Video containers — 16:9 aspect ratio для youtube/vimeo embeds */
iframe[src*="youtube"],
iframe[src*="vimeo"] {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
}

/* Text rendering optimization (performance hint, не визуально) */
html {
  text-rendering: optimizeSpeed;
}


/* ==============================================
   2. Accessibility — sr-only + focus rings
   Безопасно: не трогает Tilda-классы напрямую, только
   стандартные input/button/a и кастомные классы.
   ============================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Замена дефолтного синего outline на брендированный */
*:focus-visible {
  outline: 2px solid #C9A961;
  outline-offset: 3px;
  border-radius: 4px;
}

button:focus-visible,
[role="button"]:focus-visible {
  outline: 2px solid #C9A961;
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(201, 169, 97, 0.25);
}

a:focus-visible {
  outline: 2px solid #C9A961;
  outline-offset: 3px;
  border-radius: 2px;
}


/* ==============================================
   3. Mobile responsive helpers — кастомные классы
   только (не Tilda-классы), безопасно.
   ============================================== */

@media (max-width: 480px) {
  .hero-ctas {
    flex-direction: column;
  }
  .hero-ctas .btn-primary,
  .hero-ctas .btn-ghost {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  .capabilities-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}


/* ==============================================
   MOBILE: Responsive fixes
   ============================================== */

@media (max-width: 480px) {
  /* Hero CTA buttons stack vertically */
  .hero-ctas {
    flex-direction: column;
  }
  .hero-ctas .btn-primary,
  .hero-ctas .btn-ghost {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Capabilities band — 2 columns on mobile */
  .capabilities-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* FAQ items */
  .faq-item summary {
    font-size: 0.95rem;
  }
}


/* ==============================================
   BLOG ARTICLES — .prisra-article styles
   Scoped только на блог-статьи через wrapper-класс.
   НЕ использовать .t-width_100 — он стоит на всех Tilda страницах.
   ============================================== */

.prisra-article {
  font-family: 'Ubuntu', Arial, sans-serif;
  color: #222;
  line-height: 1.78;
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* Lead paragraph */
.prisra-article .lead {
  font-size: 1.15rem;
  color: #444;
  line-height: 1.8;
  border-left: 4px solid #f07820;
  padding-left: 20px;
  margin: 0 0 36px;
}

/* Headings */
.prisra-article h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
  color: #111;
  margin: 0 0 24px;
}

.prisra-article h2 {
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  font-weight: 700;
  color: #111;
  margin: 52px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

.prisra-article h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #222;
  margin: 32px 0 10px;
}

/* Paragraphs */
.prisra-article p {
  margin: 0 0 18px;
  font-size: 1rem;
}

/* Lists */
.prisra-article ul,
.prisra-article ol {
  margin: 0 0 24px;
  padding-left: 24px;
}

.prisra-article li {
  margin-bottom: 10px;
  line-height: 1.7;
}

.prisra-article ul li::marker {
  color: #f07820;
}

/* Strong inside list */
.prisra-article li strong {
  color: #111;
}

/* Tables */
.prisra-article table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 32px;
  font-size: 0.92rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 1px #e8e8e8;
}

.prisra-article thead {
  background: #111;
  color: #fff;
}

.prisra-article thead th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.prisra-article tbody tr:nth-child(even) {
  background: #f9f9f9;
}

.prisra-article tbody tr:hover {
  background: #fff5ee;
}

.prisra-article tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

/* Stat / highlight boxes */
.prisra-article .stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin: 8px 0 36px;
}

.prisra-article .stat-box {
  background: #f9f9f9;
  border: 1px solid #eee;
  border-top: 3px solid #f07820;
  border-radius: 8px;
  padding: 18px 20px;
  text-align: center;
}

.prisra-article .stat-box__num {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: #f07820;
  line-height: 1.1;
}

.prisra-article .stat-box__label {
  display: block;
  font-size: 0.82rem;
  color: #666;
  margin-top: 4px;
}

/* Numbered steps */
.prisra-article ol.steps {
  list-style: none;
  padding: 0;
  counter-reset: step-counter;
}

.prisra-article ol.steps li {
  counter-increment: step-counter;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
  padding: 16px 20px;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid #eee;
}

.prisra-article ol.steps li::before {
  content: counter(step-counter);
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: #f07820;
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* FAQ accordion */
.prisra-article .faq-block {
  margin-top: 40px;
  border-top: 2px solid #f0f0f0;
  padding-top: 8px;
}

.prisra-article .faq-block details {
  border-bottom: 1px solid #eee;
}

.prisra-article .faq-block details summary {
  padding: 18px 40px 18px 0;
  font-weight: 600;
  font-size: 1rem;
  color: #111;
  cursor: pointer;
  position: relative;
  list-style: none;
}

.prisra-article .faq-block details summary::-webkit-details-marker { display: none; }

.prisra-article .faq-block details summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: #f07820;
  font-weight: 300;
  transition: transform 0.2s;
}

.prisra-article .faq-block details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.prisra-article .faq-block details p {
  padding: 0 0 20px;
  color: #444;
}

/* CTA block */
.prisra-article .cta-block {
  background: linear-gradient(135deg, #111 0%, #222 100%);
  color: #fff;
  border-radius: 12px;
  padding: 36px 40px;
  margin-top: 52px;
  text-align: center;
}

.prisra-article .cta-block h3 {
  color: #fff;
  font-size: 1.3rem;
  margin: 0 0 10px;
}

.prisra-article .cta-block p {
  color: rgba(255,255,255,0.75);
  margin: 0 0 24px;
  font-size: 0.95rem;
}

.prisra-article .cta-block a.btn {
  display: inline-block;
  background: #f07820;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 14px 32px;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s;
}

.prisra-article .cta-block a.btn:hover {
  background: #d9670e;
}

/* Breadcrumb */
.prisra-article .breadcrumb {
  font-size: 0.82rem;
  color: #999;
  margin-bottom: 28px;
}

.prisra-article .breadcrumb a {
  color: #999;
  text-decoration: none;
}

.prisra-article .breadcrumb a:hover {
  color: #f07820;
}

.prisra-article .breadcrumb span {
  margin: 0 6px;
}

/* Article meta */
.prisra-article .article-meta {
  font-size: 0.82rem;
  color: #aaa;
  margin-bottom: 32px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.prisra-article .article-meta .tag {
  background: #f5f5f5;
  border-radius: 20px;
  padding: 3px 12px;
  color: #555;
}

/* Responsive */
@media (max-width: 600px) {
  .prisra-article {
    padding: 0 16px 48px;
  }
  .prisra-article .cta-block {
    padding: 28px 20px;
  }
  .prisra-article .stat-row {
    grid-template-columns: 1fr 1fr;
  }
  .prisra-article table {
    font-size: 0.82rem;
  }
  .prisra-article thead th,
  .prisra-article tbody td {
    padding: 9px 10px;
  }
}


/* ==============================================
   BLOG ARTICLE STYLES — scoped via .prisra-article-page wrapper

   ⚠️ CRITICAL: НЕ использовать селектор .t-width_100 — он применяется
   ко ВСЕМ страницам Tilda (главная, услуги, лендинги) и ломает их.

   Стили работают ТОЛЬКО когда в DOM есть .prisra-article-page —
   обёртка добавлена в HTML каждой блог-статьи в виде:
     <div class="prisra-article-page"> ... content ... </div>

   Если Tilda дропает обёртку при минификации T123 блока —
   используйте article-inline-styles.html (вставляется внутрь T123).
   ============================================== */

.prisra-article-page {
  font-family: 'Ubuntu', Arial, sans-serif;
  line-height: 1.78;
  max-width: 780px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  color: #222;
  box-sizing: border-box;
}

.prisra-article-page h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
  color: #111;
  margin: 0 0 24px;
}

.prisra-article-page h2 {
  font-size: clamp(1.2rem, 3vw, 1.65rem);
  font-weight: 700;
  color: #111;
  margin: 48px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

.prisra-article-page h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #222;
  margin: 28px 0 10px;
}

.prisra-article-page p {
  margin: 0 0 18px;
  font-size: 1rem;
  color: #333;
  line-height: 1.78;
}

.prisra-article-page ul,
.prisra-article-page ol {
  margin: 0 0 24px;
  padding-left: 24px;
}

.prisra-article-page li {
  margin-bottom: 10px;
  line-height: 1.7;
  color: #333;
}

.prisra-article-page ul li::marker {
  color: #f07820;
}

.prisra-article-page strong {
  color: #111;
  font-weight: 700;
}

.prisra-article-page a {
  color: #f07820;
  text-decoration: none;
  border-bottom: 1px solid rgba(240,120,32,0.3);
  transition: border-color 0.2s;
}

.prisra-article-page a:hover {
  border-bottom-color: #f07820;
}

.prisra-article-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 32px;
  font-size: 0.92rem;
  overflow: hidden;
  box-shadow: 0 0 0 1px #e8e8e8;
  border-radius: 8px;
  background: #fff;
}

.prisra-article-page thead {
  background: #111;
  color: #fff;
}

.prisra-article-page thead th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  color: #fff;
}

.prisra-article-page tbody tr:nth-child(even) {
  background: #f9f9f9;
}

.prisra-article-page tbody tr:hover {
  background: #fff5ee;
}

.prisra-article-page tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
  color: #333;
}

.prisra-article-page details {
  border-bottom: 1px solid #eee;
}

.prisra-article-page details summary {
  padding: 18px 40px 18px 0;
  font-weight: 600;
  font-size: 1rem;
  color: #111;
  cursor: pointer;
  position: relative;
  list-style: none;
}

.prisra-article-page details summary::-webkit-details-marker { display: none; }

.prisra-article-page details summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: #f07820;
  font-weight: 300;
  transition: transform 0.2s;
}

.prisra-article-page details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.prisra-article-page .cta-block {
  background: linear-gradient(135deg, #111 0%, #2a2a2a 100%);
  border-radius: 12px;
  padding: 36px 40px;
  margin-top: 52px;
  text-align: center;
}

.prisra-article-page .cta-block h3 {
  color: #fff;
  font-size: 1.3rem;
  margin: 0 0 10px;
  border-bottom: none;
}

.prisra-article-page .cta-block p {
  color: rgba(255,255,255,0.75);
  margin: 0 0 24px;
}

.prisra-article-page .cta-block a.btn {
  display: inline-block;
  background: #f07820;
  color: #fff;
  font-weight: 700;
  padding: 14px 32px;
  border-radius: 6px;
  border-bottom: none;
}

.prisra-article-page .stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin: 8px 0 36px;
}

.prisra-article-page .stat-box {
  background: #f9f9f9;
  border: 1px solid #eee;
  border-top: 3px solid #f07820;
  border-radius: 8px;
  padding: 18px 20px;
  text-align: center;
}

.prisra-article-page .stat-box__num {
  display: block;
  font-size: 1.8rem;
  font-weight: 700;
  color: #f07820;
  line-height: 1.1;
}

.prisra-article-page .stat-box__label {
  display: block;
  font-size: 0.82rem;
  color: #666;
  margin-top: 4px;
}

.prisra-article-page .lead {
  font-size: 1.15rem;
  color: #444;
  border-left: 4px solid #f07820;
  padding-left: 20px;
  margin: 0 0 36px;
}

.prisra-article-page .breadcrumb {
  font-size: 0.82rem;
  color: #999;
  margin-bottom: 28px;
}

.prisra-article-page .breadcrumb a {
  color: #999;
  border-bottom: none;
}

.prisra-article-page .article-meta {
  font-size: 0.82rem;
  color: #aaa;
  margin-bottom: 32px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.prisra-article-page .article-meta .tag {
  background: #f5f5f5;
  border-radius: 20px;
  padding: 3px 12px;
  color: #555;
}

.prisra-article-page ol.steps {
  list-style: none;
  padding: 0;
  counter-reset: step-counter;
}

.prisra-article-page ol.steps li {
  counter-increment: step-counter;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 14px 18px;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid #eee;
}

.prisra-article-page ol.steps li::before {
  content: counter(step-counter);
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  background: #f07820;
  color: #fff;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 600px) {
  .prisra-article-page {
    padding: 30px 16px 48px;
  }
  .prisra-article-page table {
    font-size: 0.8rem;
  }
  .prisra-article-page thead th,
  .prisra-article-page tbody td {
    padding: 8px 10px;
  }
  .prisra-article-page .cta-block {
    padding: 24px 20px;
  }
  .prisra-article-page .stat-row {
    grid-template-columns: 1fr 1fr;
  }
}