/* ===== DarkGreen & LimeGreen theme ===== */
:root {
  --dark: #006400;          /* DarkGreen */
  --dark-2: #004b00;
  --dark-3: #032b03;
  --lime: #32CD32;          /* LimeGreen */
  --lime-soft: #e6f8e2;
  --lime-line: #c9eebf;
  --bg: #f4f9f2;
  --surface: #ffffff;
  --text: #1b2a1b;
  --muted: #5b6e5b;
  --radius: 16px;
  --shadow: 0 10px 30px -12px rgba(0, 60, 0, .25);
  --font-head: "Manrope", "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", "Segoe UI", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.72;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--dark); text-decoration-color: var(--lime); text-underline-offset: 3px; }
a:hover { color: #008a00; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(120deg, var(--dark-3) 0%, var(--dark) 60%, #0a7a0a 100%);
  border-bottom: 3px solid var(--lime);
  box-shadow: 0 6px 20px -10px rgba(0, 0, 0, .45);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 74px; }

.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.logo:hover { color: #fff; }
.logo__icon { flex: none; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .3)); transition: transform .3s; }
.logo:hover .logo__icon { transform: rotate(-6deg) scale(1.05); }
.logo__text { display: flex; flex-direction: column; line-height: 1.15; }
.logo__name { font-family: var(--font-head); font-weight: 800; font-size: 21px; letter-spacing: -.01em; }
.logo__tag { font-size: 12px; color: #b9f3b0; letter-spacing: .04em; text-transform: uppercase; }

/* ---------- Language switcher ---------- */
.langs ul { list-style: none; margin: 0; padding: 4px; display: flex; gap: 4px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(50, 205, 50, .45); border-radius: 999px; }
.langs a {
  display: block; padding: 6px 14px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 700; font-size: 14px; letter-spacing: .05em;
  color: #e7ffe2; text-decoration: none; transition: background .2s, color .2s;
}
.langs a:hover { background: rgba(50, 205, 50, .25); color: #fff; }
.langs a.is-active { background: var(--lime); color: var(--dark-3); }

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
  padding-top: 40px; padding-bottom: 64px;
  align-items: start;
}

.content { min-width: 0; }

/* ---------- Article ---------- */
.article {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-top: 6px solid var(--dark);
  padding: 44px 52px 48px;
  min-width: 0;
}
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs a { color: var(--dark); font-weight: 600; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

.article__head h1 {
  font-family: var(--font-head);
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.15;
  letter-spacing: -.02em;
  color: var(--dark-3);
  margin: 0 0 18px;
}
.meta { display: flex; flex-wrap: wrap; gap: 10px 18px; padding-bottom: 22px; margin-bottom: 8px; border-bottom: 1px solid var(--lime-line); }
.meta__item {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--dark);
  background: var(--lime-soft); padding: 6px 12px; border-radius: 999px;
}

.prose > *:first-child { margin-top: 18px; }
.prose p { margin: 0 0 1.15em; }
.prose .lead { font-size: 19px; color: #233823; }
.prose h2 {
  font-family: var(--font-head); font-size: clamp(23px, 2.4vw, 29px); line-height: 1.25;
  color: var(--dark-3); margin: 1.9em 0 .7em; padding-left: 16px;
  border-left: 5px solid var(--lime);
}
.prose h3 { font-family: var(--font-head); font-size: 20px; color: var(--dark); margin: 1.5em 0 .5em; }
.prose ul, .prose ol { padding-left: 0; margin: 0 0 1.4em; list-style: none; counter-reset: li; }
.prose li { position: relative; padding-left: 34px; margin-bottom: .7em; }
.prose ul > li::before {
  content: ""; position: absolute; left: 6px; top: .5em;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--lime); box-shadow: 0 0 0 4px var(--lime-soft);
}
.prose ol > li { counter-increment: li; }
.prose ol > li::before {
  content: counter(li); position: absolute; left: 0; top: .15em;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--dark); color: #fff; font-size: 13px; font-weight: 700;
  display: grid; place-items: center;
}
.prose strong { color: var(--dark-3); }
.prose blockquote {
  margin: 2em 0; padding: 26px 30px 26px 74px; position: relative;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-3) 100%);
  color: #f0fff0; border-radius: var(--radius); font-size: 19px; font-style: italic; line-height: 1.6;
}
.prose blockquote::before {
  content: "“"; position: absolute; left: 22px; top: 6px;
  font-family: Georgia, serif; font-size: 80px; line-height: 1; color: var(--lime);
}
.prose blockquote p { margin: 0; }

/* Table */
.table-wrap { overflow-x: auto; margin: 1.6em 0; border-radius: 12px; border: 1px solid var(--lime-line); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 620px; }
.prose th, .prose td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--lime-line); vertical-align: top; }
.prose th { background: var(--dark); color: #fff; font-family: var(--font-head); }
.prose tbody tr:nth-child(even) { background: #f7fcf5; }
.prose tbody td:first-child { font-weight: 600; color: var(--dark-3); }

/* FAQ */
.faq { margin-top: 1em; display: grid; gap: 14px; }
.faq__item { border: 1px solid var(--lime-line); border-radius: 12px; background: #fbfef9; overflow: hidden; }
.faq__item h3 { margin: 0; padding: 16px 20px; font-size: 18px; background: var(--lime-soft); }
.faq__item p { margin: 0; padding: 14px 20px 18px; }

/* ---------- Image frames (no stretching, centred) ---------- */
.frame {
  margin: 30px 0;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--lime-line);
  border-radius: 18px;
  box-shadow: 0 12px 28px -18px rgba(0, 80, 0, .5);
  position: relative;
}
.frame::after {
  content: ""; position: absolute; inset: 10px; border-radius: 11px; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}
.frame__img { aspect-ratio: 16 / 10; overflow: hidden; border-radius: 11px; background: var(--lime-soft); }
.frame__img img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.frame figcaption {
  font-size: 14px; color: var(--muted); padding: 10px 6px 2px; line-height: 1.5;
  display: flex; gap: 8px; align-items: flex-start;
}
.frame figcaption::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--lime); }

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 22px; position: sticky; top: 100px; }
.sidebar__title {
  font-family: var(--font-head); font-size: 20px; margin: 0; color: var(--dark-3);
  display: flex; align-items: center; gap: 10px;
}
.sidebar__title::before { content: ""; width: 26px; height: 6px; border-radius: 3px; background: var(--lime); }
.card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid #e3f2de;
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -16px rgba(0, 80, 0, .45); }
.card__img { display: block; position: relative; aspect-ratio: 16 / 10; overflow: hidden; margin: 8px 8px 0; border-radius: 11px; background: var(--lime-soft); }
.card__img img { width: 100%; height: 100%; object-fit: cover; object-position: center; transition: transform .5s; }
.card:hover .card__img img { transform: scale(1.05); }
.card__badge {
  position: absolute; left: 10px; top: 10px; background: var(--lime); color: var(--dark-3);
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
}
.card__body { padding: 14px 18px 18px; }
.card__date { font-size: 13px; color: var(--muted); font-weight: 600; }
.card__title { font-family: var(--font-head); font-size: 17px; line-height: 1.35; margin: 4px 0 8px; }
.card__title a { color: var(--dark-3); text-decoration: none; }
.card__title a:hover { color: var(--dark); text-decoration: underline; text-decoration-color: var(--lime); }
.card__text { font-size: 14.5px; line-height: 1.55; color: var(--muted); margin: 0 0 10px; }
.card__more { font-size: 14px; font-weight: 700; color: var(--dark); text-decoration: none; }
.card__more:hover { color: #008a00; }

/* ---------- Footer ---------- */
.site-footer { background: var(--dark-3); color: #cfe9ca; border-top: 4px solid var(--lime); }
.site-footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; padding-top: 52px; padding-bottom: 40px; }
.site-footer__title { font-family: var(--font-head); color: #fff; font-size: 17px; margin: 0 0 14px; letter-spacing: .02em; }
.site-footer__about .logo { margin-bottom: 18px; }
.site-footer p { margin: 0; font-size: 15px; line-height: 1.7; }
.site-footer a { color: #9ff59a; }
.site-footer a:hover { color: #fff; }
.contacts { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; font-size: 15px; }
.contacts li { display: flex; align-items: flex-start; gap: 10px; }
.contacts svg { flex: none; color: var(--lime); margin-top: 3px; }
.footer-langs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-langs a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 15px; }
.footer-langs span {
  display: inline-grid; place-items: center; width: 34px; height: 26px; border-radius: 6px;
  border: 1px solid rgba(50, 205, 50, .5); font-family: var(--font-head); font-weight: 700; font-size: 12px;
}
.footer-langs a.is-active span { background: var(--lime); color: var(--dark-3); border-color: var(--lime); }
.site-footer__bottom { background: #021f02; border-top: 1px solid rgba(50, 205, 50, .2); }
.site-footer__bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 16px; padding-bottom: 16px; }
.site-footer__bottom p { font-size: 14px; }
.to-top { font-size: 14px; font-weight: 600; text-decoration: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; }
  .article { padding: 36px 34px 40px; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar__title { grid-column: 1 / -1; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__about { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .site-header__inner { min-height: 64px; }
  .logo__name { font-size: 15px; line-height: 1.2; max-width: 150px; }
  .logo__icon { width: 38px; height: 38px; }
  .langs a { padding: 5px 10px; font-size: 13px; }
  .layout { padding-top: 20px; }
  .article { padding: 26px 18px 30px; border-radius: 12px; }
  .prose .lead { font-size: 17.5px; }
  .prose blockquote { padding: 22px 20px 22px 54px; font-size: 17px; }
  .prose blockquote::before { left: 14px; font-size: 60px; }
  .frame { padding: 6px; border-radius: 14px; margin: 22px 0; }
  .frame::after { inset: 6px; }
  .sidebar { grid-template-columns: 1fr; }
  .site-footer__grid { grid-template-columns: 1fr; gap: 28px; }
  .site-footer__bottom-inner { flex-direction: column; text-align: center; }
}
