/* Персидская версия: письмо справа налево и своя типографика.
   Подключается только на /fa/ (см. ss_fa_assets в inc/i18n.php).

   Лист не переопределяет дизайн-систему, а зеркалит её: те же цвета, рамки и
   размеры, но направление, шрифты и межстрочные интервалы - под арабское письмо.
   Каждое правило повторяет исходный селектор с префиксом body.ss-fa, поэтому
   порядок подключения на результат не влияет.

   Шрифты: Noto Naskh Arabic за роль PT Serif (тексты, заголовки),
   Vazirmatn за роль PT Sans (интерфейс). PT Sans оставлен в конце стопки
   ради кириллицы в переключателе языков. */

body.ss-fa{
  direction:rtl;
  font-family:"Noto Naskh Arabic","PT Serif",Georgia,serif;
  line-height:1.85;
}
body.ss-fa.sadoisharq{font-family:"Noto Naskh Arabic","PT Serif",Georgia,serif}

/* интерфейсная гарнитура */
body.ss-fa .ui,
body.ss-fa .topbar,
body.ss-fa .masthead .tagline,
body.ss-fa .masthead .since,
body.ss-fa .menu,
body.ss-fa .section-head a,
body.ss-fa .kicker,
body.ss-fa .meta,
body.ss-fa .lock,
body.ss-fa .free-tag,
body.ss-fa .btn,
body.ss-fa .nav-search,
body.ss-fa .rank li::before,
body.ss-fa .badge,
body.ss-fa .side-box.quote cite,
body.ss-fa .article figcaption,
body.ss-fa .wp-caption-text,
body.ss-fa .field label,
body.ss-fa .field input,
body.ss-fa .footer-bottom,
body.ss-fa .soc,
body.ss-fa .ss-pagination,
body.ss-fa .ss-empty,
body.ss-fa .thumb.is-empty span{
  font-family:"Vazirmatn","PT Sans",system-ui,sans-serif;
}

/* Арабское письмо связное: разрядка разрывает соединения букв, а верхнего
   регистра в нём нет. Снимаем и то и другое всюду, где они заданы. */
body.ss-fa .logo,
body.ss-fa .kicker,
body.ss-fa .meta,
body.ss-fa .lock,
body.ss-fa .badge,
body.ss-fa .c-tag,
body.ss-fa .masthead .tagline,
body.ss-fa .masthead .since,
body.ss-fa .side-box.quote cite,
body.ss-fa .thumb.is-empty span,
body.ss-fa .article th,
body.ss-fa .table th{
  letter-spacing:normal;
  text-transform:none;
}

/* ------- шапка ------- */
body.ss-fa .logo{font-size:52px}
body.ss-fa .menu .has-sub>a::after{margin-left:0;margin-right:6px}
body.ss-fa .submenu{left:auto;right:0}

/* ------- материал ------- */
body.ss-fa .article h1{line-height:1.4}
body.ss-fa .article p{font-size:19px;line-height:2}
body.ss-fa .article ul,
body.ss-fa .article ol{padding-left:0;padding-right:24px;font-size:19px;line-height:2}
body.ss-fa .article blockquote{
  padding:4px 22px 4px 0;
  border-left:0;
  border-right:3px solid var(--gold);
}
body.ss-fa .article th,
body.ss-fa .article td{text-align:right}
body.ss-fa .alignleft{float:right;margin:0 0 16px 24px}
body.ss-fa .alignright{float:left;margin:0 24px 16px 0}

/* ------- карточки ------- */
body.ss-fa .card h3{line-height:1.5}
body.ss-fa .lock,
body.ss-fa .free-tag{right:auto;left:8px}

/* ------- боковая колонка ------- */
body.ss-fa .rank a{line-height:1.6}
body.ss-fa .side-box.quote blockquote{line-height:2}

/* ------- переключатель языка ------- */
body.ss-fa .t-lang{font-family:"PT Sans",system-ui,sans-serif}

/* ------- подвал в три колонки ------- */
body.ss-fa .footer-grid.fa{grid-template-columns:1.6fr 1fr 1.2fr}
body.ss-fa .footer li{margin-bottom:7px}

/* ------- передовой материал на главной ------- */
.fa-lead-wrap{padding-bottom:0}
.fa-lead{
  display:grid;
  grid-template-columns:1.15fr 1fr;
  gap:32px;
  align-items:center;
  background:var(--white);
  border:1px solid var(--line);
  padding:26px;
}
.fa-lead-img{display:block}
.fa-lead-img img{width:100%;height:auto;border:1px solid var(--line)}
.fa-lead-text h2{margin:10px 0 12px;font-size:30px;line-height:1.45}
.fa-lead-text h2 a:hover{color:var(--brand)}
.fa-lead-text p{margin:0 0 10px;color:var(--ink-soft);font-size:17px}

@media (max-width:1000px){
  body.ss-fa .footer-grid.fa{grid-template-columns:1fr 1fr}
}
@media (max-width:720px){
  body.ss-fa .logo{font-size:38px}
  .fa-lead{grid-template-columns:1fr;padding:18px}
  .fa-lead-text h2{font-size:24px}
  body.ss-fa .footer-grid.fa{grid-template-columns:1fr}
}
