/*
Theme Name: Рабочий тема v2.2.3 Safe Update
Author: Sabit Baytenov
Description: Лёгкая WordPress-тема для лендингов: белый холст, без визуального header/footer и отдельные HTML/CSS row-блоки.
Version: 2.2.3
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: rabochiy-tema
*/

:root {
  --rw-white: #ffffff;
  --rw-text: #172033;
  --rw-link: #3656af;
}

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

html {
  margin: 0;
  padding: 0;
  background: var(--rw-white);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  min-width: 320px;
  overflow-x: hidden;
  background: var(--rw-white);
  color: var(--rw-text);
  font-family: Montserrat, Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
}

a {
  color: var(--rw-link);
}

.rw-site,
.rw-main {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background: var(--rw-white);
}

.rw-landing-row {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
}

.rw-empty-admin {
  width: min(720px, calc(100% - 40px));
  margin: 80px auto;
  padding: 32px;
  border: 1px dashed #ccd4e3;
  border-radius: 14px;
  text-align: center;
  background: #ffffff;
  color: #59657a;
}

.rw-empty-admin a {
  font-weight: 700;
}

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


/* v1.7: desktop and mobile are separate linked layouts on one public URL. */
.rw-layout-desktop { display: block; }
.rw-layout-mobile { display: none; }
.rw-layout-mobile-editor { display: block; width: 100%; min-height: 100vh; }

@media (max-width: 767px) {
  .rw-layout-desktop { display: none !important; }
  .rw-layout-mobile { display: block !important; }
}

/* ============================================================
   v2.0 — News article reader + related infinite scroll
   ============================================================ */
.rw-news-page {
  background: #f5f7fb;
  padding: 28px 0 72px;
}

.rw-news-layout {
  width: min(1320px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 880px) minmax(260px, 320px);
  gap: 52px;
  align-items: start;
}

.rw-news-stream {
  min-width: 0;
}

.rw-news-article {
  background: #fff;
  border: 1px solid #e8edf5;
  border-radius: 22px;
  overflow: hidden;
}

.rw-news-article.is-continuation {
  margin-top: 42px;
}

.rw-news-article__header {
  padding: 42px 48px 28px;
  scroll-margin-top: 20px;
}

.rw-news-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.rw-news-kicker a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 11px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3656af;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}

.rw-news-title {
  margin: 0;
  color: #111827;
  font-size: clamp(34px, 4.2vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.035em;
  font-weight: 800;
}

.rw-news-lead {
  margin: 22px 0 0;
  color: #4b5565;
  font-size: 20px;
  line-height: 1.55;
  font-weight: 500;
}

.rw-news-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  color: #778196;
  font-size: 14px;
}

.rw-news-views {
  white-space: nowrap;
}

.rw-news-hero {
  margin: 0;
  width: 100%;
  height: clamp(300px, 31vw, 410px);
  background: #eef1f6;
  overflow: hidden;
}

.rw-news-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.rw-news-content {
  padding: 38px 48px 18px;
  color: #20293a;
  font-size: 18px;
  line-height: 1.78;
}

.rw-news-content > :first-child { margin-top: 0; }
.rw-news-content > :last-child { margin-bottom: 0; }
.rw-news-content p { margin: 0 0 1.35em; }
.rw-news-content h2,
.rw-news-content h3 {
  color: #111827;
  line-height: 1.22;
  letter-spacing: -0.02em;
}
.rw-news-content h2 { margin: 2em 0 .7em; font-size: 30px; }
.rw-news-content h3 { margin: 1.7em 0 .65em; font-size: 24px; }
.rw-news-content a { text-underline-offset: 3px; }
.rw-news-content blockquote {
  margin: 30px 0;
  padding: 8px 0 8px 24px;
  border-left: 4px solid #3656af;
  color: #455066;
  font-size: 20px;
}
.rw-news-content img {
  border-radius: 14px;
  margin: 28px auto;
}

.rw-news-footer {
  padding: 16px 48px 42px;
}

.rw-news-source {
  margin: 0 0 18px;
  padding: 15px 17px;
  border-radius: 13px;
  background: #f6f8fc;
  color: #515d72;
  font-size: 14px;
}

.rw-news-source a { font-weight: 700; }

.rw-news-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rw-news-tags a {
  padding: 7px 11px;
  border: 1px solid #e0e6ef;
  border-radius: 999px;
  color: #536078;
  text-decoration: none;
  font-size: 13px;
}

.rw-news-rail {
  position: relative;
}

.rw-news-rail__inner {
  position: sticky;
  top: 24px;
  padding: 22px;
  border: 1px solid #e5eaf2;
  border-radius: 18px;
  background: #fff;
}

.rw-news-rail h2 {
  margin: 0 0 12px;
  color: #111827;
  font-size: 18px;
  line-height: 1.3;
}

.rw-news-rail__item {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 10px;
  padding: 13px 0;
  border-top: 1px solid #edf0f5;
  color: #20293a;
  text-decoration: none;
  line-height: 1.42;
}

.rw-news-rail__item time {
  color: #8590a5;
  font-size: 12px;
  font-weight: 700;
}

.rw-news-rail__item span {
  font-size: 14px;
  font-weight: 600;
}

.rw-news-loader {
  min-height: 92px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  color: #7b869a;
  font-size: 14px;
}

.rw-news-loader__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3656af;
  opacity: .45;
}

.rw-news-loader.is-loading .rw-news-loader__dot {
  animation: rw-news-pulse .8s ease-in-out infinite alternate;
}

.rw-news-loader.is-ended .rw-news-loader__dot { display: none; }

.rw-news-loader.is-error {
  flex-wrap: wrap;
}

.rw-news-loader__retry {
  border: 1px solid #dbe2ee;
  border-radius: 999px;
  background: #fff;
  color: #3656af;
  padding: 7px 13px;
  cursor: pointer;
  font-weight: 700;
}

@keyframes rw-news-pulse {
  from { transform: scale(.7); opacity: .25; }
  to { transform: scale(1.15); opacity: 1; }
}

@media (max-width: 1040px) {
  .rw-news-layout {
    grid-template-columns: minmax(0, 1fr);
    width: min(900px, calc(100% - 32px));
  }
  .rw-news-rail { display: none; }
}

@media (max-width: 767px) {
  .rw-news-page { padding: 0 0 48px; background: #fff; }
  .rw-news-layout { width: 100%; }
  .rw-news-article {
    border: 0;
    border-radius: 0;
  }
  .rw-news-article.is-continuation {
    margin-top: 28px;
    border-top: 10px solid #f1f4f8;
  }
  .rw-news-article__header { padding: 27px 20px 20px; }
  .rw-news-title {
    font-size: clamp(30px, 9vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.03em;
  }
  .rw-news-lead { margin-top: 16px; font-size: 18px; }
  .rw-news-meta { margin-top: 17px; font-size: 13px; }
  .rw-news-hero { height: auto; aspect-ratio: 16 / 9; }
  .rw-news-content { padding: 28px 20px 10px; font-size: 17px; line-height: 1.74; }
  .rw-news-content h2 { font-size: 26px; }
  .rw-news-content h3 { font-size: 22px; }
  .rw-news-footer { padding: 14px 20px 34px; }
  .rw-news-source { font-size: 13px; }
}
