:root {
  color-scheme: light;
  --az-bg: #f7f4ef;
  --az-card: #ffffff;
  --az-text: #2f2933;
  --az-muted: #746a73;
  --az-accent: #a6252b;
  --az-accent-dark: #76191f;
  --az-line: #eadfe0;
  --az-shadow: 0 10px 30px rgba(58, 39, 42, .08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; padding: 0 16px; display: grid;
  grid-template-columns: minmax(0, 820px) minmax(260px, 320px);
  grid-template-areas: "header header" "nav nav" "breadcrumb breadcrumb" "content aside" "footer footer";
  justify-content: center; column-gap: 24px; row-gap: 18px;
  color: var(--az-text); background: var(--az-bg);
  font: 16px/1.65 Arial, Verdana, Helvetica, sans-serif;
}
img { max-width: 100%; }
a { color: #7c2026; text-underline-offset: 3px; }
a:hover { color: var(--az-accent); }
a:focus-visible, label:focus-visible { outline: 3px solid rgba(166, 37, 43, .28); outline-offset: 3px; }
#header {
  grid-area: header; min-width: 0; display: flex; align-items: center; justify-content: center;
  min-height: 84px; padding: 10px 0 4px;
}
.header-logo { width: min(220px, 58vw); margin: 0 auto; }
.logo { display: block; width: 100%; height: auto; max-width: 350px; }
.decktop, .mobilla { display: none; }
.nav {
  grid-area: nav; position: relative; z-index: 2; display: flex; flex-wrap: wrap;
  justify-content: center; gap: 4px; width: 100%; padding: 7px;
  background: var(--az-card); border: 1px solid var(--az-line); border-radius: 15px;
  box-shadow: 0 5px 18px rgba(58, 39, 42, .06);
}
#top-nav, .tnav { display: none; }
.link-menu {
  display: inline-flex; align-items: center; justify-content: center; min-height: 38px;
  padding: 7px 12px; color: #3b3033; border-radius: 10px; font-size: 14px;
  font-weight: 700; text-decoration: none;
}
.link-menu:hover, .link-menu:focus-visible { color: #fff; background: var(--az-accent); }
#breadcrumb { grid-area: breadcrumb; min-height: 1px; color: var(--az-muted); font-size: 13px; }
#content {
  grid-area: content; min-width: 0; padding: clamp(20px, 3.4vw, 36px);
  overflow-wrap: anywhere; background: var(--az-card); border: 1px solid var(--az-line);
  border-radius: 18px; box-shadow: var(--az-shadow);
}
#content > :first-child { margin-top: 0; }
#content h1, #content h2, #content h3 {
  color: #32262a; font-family: Georgia, "Times New Roman", serif; line-height: 1.25;
}
#content h1 { font-size: clamp(28px, 4vw, 40px); }
#content h2 { font-size: clamp(22px, 3vw, 30px); }
#content h3 { font-size: clamp(18px, 2.2vw, 23px); }
.artical, .zagovor, .headline-category { max-width: 100%; }
.artical p, .zagovor p, .headline-category p { margin: 0 0 1em; }
.image { display: block; width: auto; max-width: 100%; height: auto; margin: 20px auto; border-radius: 14px; }
.zagovor {
  margin: 20px 0; padding: 18px 20px; background: #fff8f3;
  border-left: 4px solid var(--az-accent); border-radius: 0 12px 12px 0;
}
.az-divider {
  width: min(280px, 70%); height: 1px; margin: 28px auto; border: 0;
  background: linear-gradient(90deg, transparent, var(--az-accent), transparent);
}
.nav-category { margin: 0 0 24px; }
.minimenu { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
li.minimenu { display: block; }
.knopki {
  display: inline-flex; align-items: center; min-height: 36px; padding: 6px 11px;
  color: #5d2b30; background: #fff6f3; border: 1px solid #ecd7d7; border-radius: 999px;
  font-size: 14px; font-weight: 700; text-decoration: none;
}
.knopki:hover, .knopki:focus-visible { color: #fff; background: var(--az-accent); border-color: var(--az-accent); }
.blockcat { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0 0 16px; }
.contentcategory {
  min-width: 0; overflow: hidden; background: #fffaf7; border: 1px solid var(--az-line);
  border-radius: 14px; transition: transform .16s ease, box-shadow .16s ease;
}
.contentcategory:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(58, 39, 42, .08); }
.contentcategory h2 { height: 100%; margin: 0 !important; font: inherit !important; }
.linkmore {
  display: flex; height: 100%; min-height: 94px; flex-direction: column; justify-content: space-between;
  gap: 12px; padding: 16px; color: #432d31; font-size: 17px; font-weight: 800;
  line-height: 1.35; text-decoration: none;
}
.linkmore:hover { color: var(--az-accent-dark); }
.imagecategory { display: block; width: 100%; max-height: 230px; object-fit: cover; border-radius: 9px; }
.pop-contentcategory { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.pop-contentcategory > h3 { grid-column: 1 / -1; margin: 0 0 4px; }
.pop-article { min-width: 0; background: #fffaf7; border: 1px solid var(--az-line); border-radius: 12px; }
.pop-article a {
  display: block; height: 100%; padding: 13px; color: #432d31; font-weight: 700; text-decoration: none;
}
.pop-article .image { width: 100%; max-height: 200px; margin: 0 0 10px; object-fit: cover; }
.straniza { margin-top: 28px; text-align: center; }
.straniza p { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; }
.straniza span, .stranizy {
  display: inline-flex; min-width: 36px; min-height: 36px; align-items: center; justify-content: center;
  padding: 5px 9px; border-radius: 9px; text-decoration: none;
}
.straniza span { color: #fff; background: var(--az-accent); }
.stranizy { background: #f2e9e6; }
.list { padding-left: 22px; }
#rightblock {
  grid-area: aside; min-width: 0; align-self: start; padding: 18px; background: var(--az-card);
  border: 1px solid var(--az-line); border-radius: 18px; box-shadow: var(--az-shadow);
}
.rightblock1 { display: grid; gap: 0; }
.aside-home {
  display: flow-root; padding: 13px 0; color: #3b3033;
  border-bottom: 1px solid var(--az-line); text-decoration: none;
}
.aside-home:first-child { padding-top: 0; }
.aside-home:hover { color: var(--az-accent); }
.image-home3 {
  float: left; width: 88px; height: 62px; margin: 2px 12px 6px 0;
  object-fit: cover; border-radius: 9px;
}
.span-home { font-weight: 800; line-height: 1.35; }
.text-aside { margin: 7px 0 17px; color: var(--az-muted); font-size: 13px; line-height: 1.5; }
#footer { grid-area: footer; }
.az-footer {
  grid-column: 1 / -1 !important; width: calc(100% + 32px);
  margin-left: -16px !important; margin-right: -16px !important;
}
@media (max-width: 960px) {
  body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "header" "nav" "breadcrumb" "content" "aside" "footer"; }
  #rightblock { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; }
}
@media (max-width: 720px) {
  body { padding: 0 10px; row-gap: 12px; font-size: 15px; }
  #header { min-height: 68px; padding-top: 7px; }
  .header-logo { width: min(174px, 58vw); }
  .nav { display: block; padding: 7px; }
  .tnav {
    display: flex; min-height: 42px; align-items: center; justify-content: center;
    color: #4b3236; border-radius: 10px; cursor: pointer; font-size: 14px; font-weight: 800;
  }
  .tnav::after { content: "☰  Меню"; }
  #top-nav:checked + .tnav::after { content: "✕  Закрыть"; }
  .link-menu { display: none; }
  #top-nav:checked ~ .link-menu { display: flex; width: 100%; margin-top: 3px; }
  #content { padding: 20px 16px; border-radius: 14px; }
  .blockcat, .pop-contentcategory { grid-template-columns: 1fr; }
  .contentcategory { border-radius: 12px; }
  .linkmore { min-height: 74px; }
  #rightblock { display: block; padding: 16px; border-radius: 14px; }
  .text-aside { display: none; }
  .aside-home { min-height: 74px; }
  .az-footer { width: calc(100% + 20px); margin-left: -10px !important; margin-right: -10px !important; }
}
@media (max-width: 420px) {
  .image-home3 { width: 76px; height: 54px; }
  .knopki { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
/* Main page title */
.az-page-title { margin: 0 0 24px !important; padding-bottom: 14px; border-bottom: 1px solid var(--az-line); }
