/* ─── Noto Sans Variable — latin ─── */
@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/ntosans-latin.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/ntosans-cyrillic.woff2") format("woff2-variations");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: "Noto Serif";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/ntoserif-latin.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Noto Serif";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/ntoserif-cyrillic.woff2") format("woff2-variations");
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}

:root {
  --container-main: 1200px;
  --container-article: 1000px;
  --page-gutter: 24px;
  --font-sans: "Noto Sans", Arial, Helvetica, sans-serif;
  --font-serif: "Noto Serif", Georgia, "Times New Roman", serif;
  --color-heading: #203047;
  --color-text: #425466;
  --color-text-secondary: #5c6875;
  --color-muted: #747d87;
  --color-accent: #c8171e;
  --color-page: #fbf7f0;
  --color-header: #f4f6f8;
  --color-border: #e8e2da;
  --text-primary: #203047;
  --text-secondary: #5c6875;
  --text-muted: #747d87;
  --red: #ba0000;
  --red-dark: #920000;
  --navy: #1d304a;
  --muted: #747d87;
  --milk: #fbf7f0;
  --tint: #f7f4ef;
  --line: #e8e2da;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-family: var(--font-sans);
  font-size: 17px;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.62;
  color: var(--text-primary);
  background: #fffaf2;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 3px solid #d9a447; outline-offset: 3px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

h1, h2, h3, h4, h5, h6 { line-height: 1.3; margin-bottom: 16px; }
h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
p { margin-bottom: 12px; }

/* ─── Header ─── */
.site-header {
  --header-height: 82px;
  --nav-text: #1d304a;
  --nav-accent: #a90000;
  --nav-border: #e6e2dc;
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--nav-border);
}

.header-row {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.6vw, 26px);
  min-height: var(--header-height);
}

.brand { flex: 0 0 auto; }
.brand img { display: block; width: 140px; height: auto; }

.desktop-nav { flex: 1; min-width: 0; }
.desktop-nav > ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2px, 0.4vw, 8px);
}

.desktop-nav a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px clamp(7px, 0.65vw, 11px);
  color: var(--nav-text);
  font: 600 16px/1.2 inherit;
  white-space: nowrap;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: var(--nav-accent);
}

.header-phone {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: center;
  line-height: 1.15;
}
.header-phone small { color: #657080; font-size: 14px; font-weight: 600; }
.header-phone a {
  color: var(--nav-text);
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
}
.header-phone a:hover { color: var(--nav-accent); }

/* ─── Breadcrumbs ─── */
.article-breadcrumbs {
  background: #fffdf9;
  border-bottom: 1px solid rgba(32, 48, 71, 0.06);
}
.article-breadcrumbs__inner {
  width: min(calc(100% - var(--page-gutter) * 2), var(--container-article));
  margin-inline: auto;
  padding-block: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 9px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.45;
  color: var(--color-muted);
}
.article-breadcrumbs a {
  color: var(--color-text-secondary);
  text-decoration: none;
  text-underline-offset: 3px;
}
.article-breadcrumbs a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}
.article-breadcrumbs [aria-current="page"] {
  color: var(--color-muted);
}
.article-breadcrumbs span[aria-hidden="true"] {
  color: #920000;
  margin: 0 6px;
}

/* ─── Page header ─── */
.page-header {
  padding: 2rem 0;
  background: var(--tint, #f7f4ef);
}
.page-header h1 {
  margin: 0;
  font-family: var(--font-serif, "Noto Serif", Georgia, serif);
  font-size: clamp(1.6rem, 2.4vw, 2.2rem);
  color: var(--navy, #1d304a);
  font-weight: 500;
}

/* ─── Articles grid ─── */
.page-content { padding: 2rem 0 3rem; }
.page-content .container { max-width: 1200px; margin: 0 auto; }

.articles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.article-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line, #e8e1d8);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.15s, border-color 0.2s;
}

.article-card:hover {
  border-color: #d5b7b1;
  box-shadow: 0 8px 24px rgba(30, 48, 74, 0.08);
  transform: translateY(-2px);
}

.article-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--tint, #f7f4ef);
  flex-shrink: 0;
}

.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.article-card:hover .article-thumb img {
  transform: scale(1.04);
}

.article-body {
  padding: 14px 16px 16px;
  flex: 1;
}

.article-body h2 {
  margin: 0;
  font-family: var(--font-sans, "Noto Sans", "Segoe UI", sans-serif);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--navy, #1d304a);
}

.article-card:hover .article-body h2 {
  color: var(--red, #ba0000);
}

@media (max-width: 1080px) {
  .articles-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

@media (max-width: 430px) {
  .articles-grid { grid-template-columns: 1fr; }
  .article-thumb { aspect-ratio: 16 / 9; }
}

/* ─── Article page ─── */
.article-page {
  min-height: 100%;
  background: var(--color-page);
  color: var(--color-text);
}

.article-header {
  background: var(--color-header);
  border-bottom: 1px solid rgba(32, 48, 71, 0.05);
}
.article-header__inner {
  width: min(calc(100% - var(--page-gutter) * 2), var(--container-article));
  margin-inline: auto;
  padding-block: clamp(34px, 4vw, 56px);
}
.article-title {
  max-width: 1000px;
  margin: 0 auto;
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 3.5vw, 3.5rem);
  line-height: 1.12;
  font-weight: 500;
  letter-spacing: -0.025em;
  text-align: center;
  text-wrap: balance;
  color: var(--color-heading);
}

.article-main {
  padding-block: clamp(42px, 6vw, 76px) clamp(64px, 8vw, 104px);
}
.article-content {
  width: min(calc(100% - var(--page-gutter) * 2), var(--container-article));
  margin-inline: auto;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.72;
  font-weight: 400;
  color: var(--color-text);
}
.article-content::after {
  content: "";
  display: block;
  clear: both;
}

/* Cover */
.article-cover {
  float: right;
  width: min(400px, 42%);
  margin: 2px 0 26px 40px;
  overflow: hidden;
  border-radius: 10px;
  background: #eee9e2;
}
.article-cover__image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Typography */
.article-content > p:first-of-type {
  margin-top: 0;
  font-size: 1.125rem;
  line-height: 1.72;
  color: #3e5062;
}
.article-content p { margin-block: 0 18px; }
.article-content p:last-child { margin-bottom: 0; }

.article-content h2 {
  clear: both;
  margin: 42px 0 14px;
  font-family: var(--font-serif);
  font-size: clamp(1.65rem, 2.1vw, 2rem);
  line-height: 1.25;
  font-weight: 500;
  letter-spacing: -0.015em;
  text-wrap: balance;
  color: var(--color-heading);
}

.article-content h3 {
  margin: 32px 0 12px;
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 1.7vw, 1.55rem);
  line-height: 1.3;
  font-weight: 600;
  text-wrap: balance;
  color: var(--color-heading);
}

.article-content > h2:first-of-type { margin-top: 38px; }

.article-content ul,
.article-content ol {
  margin: 18px 0 28px;
  padding-left: 1.4em;
}
.article-content li { margin-bottom: 9px; padding-left: 4px; }
.article-content li::marker { color: var(--color-accent); }

.article-content strong { font-weight: 600; color: var(--color-heading); }

.article-content a {
  color: #a91218;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.article-content a:hover {
  color: var(--color-accent);
  text-decoration-thickness: 2px;
}

.article-content blockquote {
  margin: 30px 0;
  padding: 20px 24px;
  border-left: 3px solid var(--color-accent);
  border-radius: 0 8px 8px 0;
  background: rgba(255, 255, 255, 0.65);
  color: var(--color-text);
}
.article-content blockquote p:last-child { margin-bottom: 0; }

.article-content table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  margin-block: 30px;
}
.article-content th,
.article-content td {
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}
.article-content th {
  font-weight: 600;
  color: var(--color-heading);
  background: #f6f3ee;
}

/* ─── Article image inline ─── */
.article-content .article-image {
  margin: 24px 0;
  border-radius: 8px;
  overflow: hidden;
}
.article-content .article-image img {
  display: block;
  width: 100%;
  height: auto;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
  .article-cover {
    width: min(360px, 44%);
    margin-left: 30px;
  }
  .article-content { font-size: 1rem; }
}

@media (max-width: 768px) {
  .article-breadcrumbs__inner { padding-block: 12px; font-size: 0.8125rem; }
  .article-header__inner { padding-block: 30px 34px; }
  .article-title { font-size: clamp(2rem, 9vw, 2.75rem); line-height: 1.14; }
  .article-main { padding-block: 34px 64px; }
  .article-cover { float: none; width: 100%; margin: 0 0 24px; border-radius: 8px; }
  .article-cover__image { width: 100%; }
  .article-content { font-size: 1rem; line-height: 1.68; }
  .article-content > p:first-of-type { font-size: 1.0625rem; line-height: 1.68; }
  .article-content h2 { clear: none; margin-top: 34px; }
  .article-content h3 { margin-top: 28px; }
}

@media (max-width: 480px) {
  .article-title { font-size: clamp(1.85rem, 9.5vw, 2.35rem); }
  .article-header__inner { padding-block: 26px 30px; }
  .article-content h2 { font-size: 1.55rem; }
  .article-content h3 { font-size: 1.3rem; }
  .article-content ul, .article-content ol { padding-left: 1.25em; }
}

/* ─── Footer ─── */
.site-footer {
  margin-top: auto;
  border-top: 1px solid #e8e1d8;
  background: #faf7f2;
  color: #1d304a;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1.2fr;
  gap: 30px;
  padding-top: 38px;
  padding-bottom: 30px;
}
.footer-brand img { margin-bottom: 12px; }
.footer-grid p { color: #5d6878; font-size: 16px; }
.footer-grid h2 { font-family: Georgia, serif; font-size: 18px; font-weight: 500; margin-bottom: 12px; }
.footer-grid nav, .footer-contact { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.footer-grid a { font-size: 16px; }
.footer-grid a:hover, .footer-grid a:focus-visible { color: #ba0000; }
.footer-phone { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.footer-phone small { color: #657080; font-size: 14px; font-weight: 600; line-height: 1.2; }
.footer-phone a { color: #1d304a; font-family: var(--font-sans); font-size: 20px; font-weight: 700; white-space: nowrap; line-height: 1.2; }
.footer-phone a:hover { color: #ba0000; }
.footer-bottom { border-top: 1px solid #e8e1d8; }
.footer-bottom .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-top: 15px;
  padding-bottom: 15px;
  color: #687486;
  font-size: 14px;
}
.footer-bottom nav { display: flex; gap: 18px; }

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom .container { align-items: flex-start; flex-direction: column; }
  .footer-bottom nav { flex-direction: column; gap: 7px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid nav { display: none; }
}
