/* =============================================
   naskoruyu.ru — Global Stylesheet
   ============================================= */

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

/* ─── CSS Variables ─── */
:root {
  --red:       #c62828;
  --red-dark:  #8b0000;
  --red-light: #ffebee;
  --navy:      #0d1b2a;
  --navy-mid:  #1e3a5f;
  --steel:     #4a6fa5;
  --bg:        #f5f5f0;
  --bg-card:   #ffffff;
  --text:      #1a1a2e;
  --text-mid:  #3d3d5c;
  --text-muted:#7a7a9a;
  --border:    #e2e2ef;
  --shadow-sm: 0 2px 8px rgba(13,27,42,.08);
  --shadow-md: 0 6px 24px rgba(13,27,42,.12);
  --shadow-lg: 0 12px 40px rgba(13,27,42,.18);
  --radius:    14px;
  --radius-sm: 8px;
  --font-head: 'Raleway', sans-serif;
  --font-body: 'Nunito', sans-serif;
  --max-w:     1160px;
  --transition: .25s ease;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ─── Layout ─── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── HEADER ─── */
.site-header {
  background: var(--navy);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,.35);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -.5px;
  color: #fff;
}
.logo-cross {
  width: 32px; height: 32px;
  background: var(--red);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.logo span { color: var(--red); }
.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a {
  color: rgba(255,255,255,.8);
  font-size: .9rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.site-nav a:hover, .site-nav a.active {
  background: rgba(255,255,255,.12);
  color: #fff;
}

/* ─── AD WRAPPER ─── */
.ad-zone {
  background: #f0f0ea;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  padding: 12px;
  margin: 16px 0;
  font-size: .75rem;
  color: var(--text-muted);
  overflow: hidden;
}
.ad-zone-header { margin: 0; border-radius: 0; border-left: none; border-right: none; }

/* ─── HERO ─── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, #1a3a6e 100%);
  padding: 80px 24px 90px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(198,40,40,.25) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: -60px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(74,111,165,.2) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  background: rgba(198,40,40,.2);
  border: 1px solid rgba(198,40,40,.4);
  color: #ff8a80;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 40px;
  margin-bottom: 20px;
}
.hero h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.18;
  max-width: 750px;
  margin: 0 auto 20px;
  letter-spacing: -.5px;
}
.hero h1 em { color: #ff6b6b; font-style: normal; }
.hero p {
  color: rgba(255,255,255,.72);
  font-size: 1.1rem;
  max-width: 540px;
  margin: 0 auto 32px;
}
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  position: relative; z-index: 1;
}
.hero-stat { text-align: center; }
.hero-stat strong {
  display: block;
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
  color: var(--red);
  line-height: 1;
}
.hero-stat span { color: rgba(255,255,255,.55); font-size: .85rem; }

/* ─── SECTION TITLE ─── */
.section-title {
  font-family: var(--font-head);
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -.3px;
}
.section-sub {
  color: var(--text-muted);
  font-size: .95rem;
  margin-bottom: 32px;
}

/* ─── ARTICLE GRID ─── */
.articles-section { padding: 64px 0; }
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}
.article-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid var(--border);
}
.article-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.card-img-wrap {
  overflow: hidden;
  height: 200px;
  position: relative;
}
.card-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.article-card:hover .card-img-wrap img { transform: scale(1.06); }
.card-cat {
  position: absolute;
  top: 14px; left: 14px;
  background: var(--red);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 10px;
  border-radius: 20px;
}
.card-body { padding: 22px 22px 26px; flex: 1; display: flex; flex-direction: column; }
.card-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.38;
  margin-bottom: 10px;
  color: var(--text);
  transition: color var(--transition);
}
.article-card:hover .card-title { color: var(--red); }
.card-desc {
  color: var(--text-mid);
  font-size: .88rem;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 18px;
}
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--red);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  transition: gap var(--transition);
}
.article-card:hover .card-link { gap: 10px; }

/* ─── ARTICLE PAGE LAYOUT ─── */
.page-wrapper {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 24px 64px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

/* ─── ARTICLE CONTENT ─── */
.article-content {}
.article-header { margin-bottom: 28px; }
.article-cat-badge {
  display: inline-block;
  background: var(--red-light);
  color: var(--red);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.article-title {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.4px;
  margin-bottom: 16px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text-muted);
  font-size: .85rem;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}
.article-meta span { display: flex; align-items: center; gap: 5px; }
.article-body { font-size: 1rem; line-height: 1.78; color: var(--text-mid); }
.article-body h2 {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 36px 0 12px;
  padding-left: 14px;
  border-left: 4px solid var(--red);
}
.article-body h3 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 26px 0 10px;
}
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol {
  margin: 14px 0 20px 0;
  padding-left: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.article-body ul li {
  padding-left: 22px;
  position: relative;
  color: var(--text-mid);
}
.article-body ul li::before {
  content: '';
  position: absolute;
  left: 0; top: 10px;
  width: 8px; height: 8px;
  background: var(--red);
  border-radius: 50%;
}
.article-body ol { counter-reset: li; }
.article-body ol li {
  counter-increment: li;
  padding-left: 34px;
  position: relative;
  color: var(--text-mid);
}
.article-body ol li::before {
  content: counter(li);
  position: absolute;
  left: 0; top: 1px;
  width: 22px; height: 22px;
  background: var(--red);
  color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem;
  font-weight: 700;
}
.article-img {
  border-radius: var(--radius);
  overflow: hidden;
  margin: 24px 0;
}
.article-img img {
  width: 100%; height: 340px;
  object-fit: cover;
}
.article-img figcaption {
  font-size: .8rem;
  color: var(--text-muted);
  text-align: center;
  padding: 10px 0 4px;
  font-style: italic;
}
.alert-box {
  background: #fff3e0;
  border-left: 4px solid #ff8f00;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: .92rem;
}
.alert-box strong { color: #e65100; }
.tip-box {
  background: var(--red-light);
  border-left: 4px solid var(--red);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 20px 0;
  font-size: .92rem;
}
.tip-box strong { color: var(--red-dark); }

/* ─── SIDEBAR ─── */
.sidebar { position: sticky; top: 84px; }
.sidebar-widget {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 24px;
}
.sidebar-widget-title {
  background: var(--navy);
  color: #fff;
  font-family: var(--font-head);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 12px 18px;
}
.sidebar-links { padding: 12px 0; }
.sidebar-links a {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 18px;
  font-size: .88rem;
  color: var(--text-mid);
  border-left: 3px solid transparent;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
  line-height: 1.4;
}
.sidebar-links a:hover {
  background: var(--red-light);
  border-left-color: var(--red);
  color: var(--red-dark);
}
.sidebar-links a .link-num {
  flex-shrink: 0;
  width: 20px; height: 20px;
  background: var(--bg);
  border-radius: 50%;
  font-size: .7rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}

/* ─── BREADCRUMB ─── */
.breadcrumb {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 24px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--steel); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb span { opacity: .6; }

/* ─── FOOTER ─── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,.65);
  margin-top: 64px;
}
.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding: 52px 24px 44px;
  max-width: var(--max-w);
  margin: 0 auto;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand .logo { margin-bottom: 14px; }
.footer-brand p { font-size: .88rem; line-height: 1.7; max-width: 280px; }
.footer-col h4 {
  font-family: var(--font-head);
  color: #fff;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col ul a {
  font-size: .87rem;
  transition: color var(--transition);
}
.footer-col ul a:hover { color: #fff; }
.footer-bottom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-disclaimer {
  font-size: .77rem;
  color: rgba(255,255,255,.35);
  max-width: 600px;
}

/* ─── INDEX specific ─── */
.cats-strip {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.cats-strip-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 12px 0;
}
.cats-strip-inner a {
  white-space: nowrap;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-mid);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.cats-strip-inner a:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  .page-wrapper {
    grid-template-columns: 1fr;
  }
  .sidebar { position: static; }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .site-nav a { padding: 6px 8px; font-size: .8rem; }
  .hero { padding: 52px 16px 60px; }
  .hero-stats { gap: 24px; }
  .articles-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
