/* ============================================================================
   Theme: BALTICA  (Site Layer)
   Редакционный новостник: тёплый пергаментный фон, тёмно-зелёный хедер,
   золотой акцент, serif-заголовки. Палитра/шрифты заданы здесь же.
   Имя файла версионировано (theme.a1.css) — у разных тем разные имена/отпечаток.

   ШРИФТЫ — self-host (woff2 в static/themes/baltica/fonts/). НЕ с
   fonts.googleapis.com (footprint + риск доступности из РФ). Если woff2
   отсутствуют — действует фолбэк-стек (Georgia / system-ui), страница рендерится.
   ============================================================================ */

/* --- @font-face: self-host woff2 (сабсеты кириллица/латиница, unicode-range) --- */
@font-face {
  font-family: 'PT Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/pt-sans-400-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'PT Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/pt-sans-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'PT Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/pt-sans-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'PT Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/pt-sans-400-latin.woff2') format('woff2');
  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: 'PT Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/pt-sans-700-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'PT Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/pt-sans-700-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'PT Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/pt-sans-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'PT Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/pt-sans-700-latin.woff2') format('woff2');
  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: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/playfair-display-700-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/playfair-display-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/playfair-display-700-latin.woff2') format('woff2');
  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;
}

/* --- Палитра темы --------------------------------------------------------- */
:root {
  --green: #1b3a28;
  --green-mid: #24512f;
  --amber: #c8a050;
  --amber-lt: #dbb96a;
  --parchment: #f5f0e4;
  --white: #ffffff;
  --text-dark: #1a1a1a;
  --text-mid: #3d3d3d;
  --red: #c0392b;
  --radius: 6px;
  --shadow: 0 4px 24px rgba(0, 0, 0, .18);
  /* Акцент по умолчанию = amber; пер-сайтовый акцент переопределяется инлайном в base.html. */
  --accent: var(--amber);
  --font-head: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'PT Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --maxw: 1080px;
}

/* --- Сброс/база ----------------------------------------------------------- */
* { box-sizing: border-box; }
html.bl-theme { -webkit-text-size-adjust: 100%; }
.bl-body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--parchment);
  line-height: 1.6;
}
.bl-body img { max-width: 100%; height: auto; display: block; }
.bl-body a { color: var(--green-mid); text-decoration: none; }
.bl-body a:hover { color: var(--accent); text-decoration: underline; }

/* --- Шапка ---------------------------------------------------------------- */
.bl-masthead {
  background: var(--green);
  color: var(--parchment);
  border-bottom: 4px solid var(--accent);
}
.bl-masthead__bar {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px 6px;
}
.bl-logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.5rem, 4.5vw, 2.4rem);
  color: var(--parchment) !important;
  letter-spacing: .3px;
  line-height: 1.1;
}
.bl-logo:hover { color: var(--amber-lt) !important; text-decoration: none; }
.bl-masthead__meta {
  margin-left: auto;
  font-size: .8rem;
  color: var(--amber-lt);
  text-align: right;
  text-transform: capitalize;
}
.bl-tagline {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 18px 8px;
  font-style: italic;
  color: var(--amber-lt);
  font-size: .95rem;
}

/* --- Навигация (десктоп инлайн, мобайл — выдвижное меню) ------------------- */
.bl-nav {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 8px 18px 12px;
  border-top: 1px solid rgba(219, 185, 106, .25);
}
.bl-nav__link {
  color: var(--parchment) !important;
  font-weight: 700;
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 2px 0;
  border-bottom: 2px solid transparent;
}
.bl-nav__link:hover { color: var(--amber-lt) !important; border-bottom-color: var(--accent); text-decoration: none; }

.bl-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px; height: 38px;
  background: transparent;
  border: 1px solid rgba(219, 185, 106, .5);
  border-radius: var(--radius);
  cursor: pointer;
}
.bl-burger span { display: block; height: 2px; width: 20px; margin: 0 auto; background: var(--amber-lt); }

/* --- Контент-обёртка ------------------------------------------------------ */
.bl-main { max-width: var(--maxw); margin: 0 auto; padding: 28px 18px; }
.bl-kicker {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}
.bl-meta { display: block; color: var(--text-mid); font-size: .82rem; margin-top: 8px; text-transform: capitalize; }
.bl-empty { color: var(--text-mid); font-style: italic; }

/* --- Герой ---------------------------------------------------------------- */
.bl-hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 36px;
}
.bl-hero__media { display: block; }
.bl-hero__media img { width: 100%; height: 100%; object-fit: cover; min-height: 240px; }
.bl-hero__body { padding: 26px 28px; display: flex; flex-direction: column; justify-content: center; }
.bl-hero__title { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.15; margin: 0 0 12px; }
.bl-hero__title a { color: var(--text-dark) !important; }
.bl-hero__title a:hover { color: var(--green-mid) !important; text-decoration: none; }
.bl-hero__lead { color: var(--text-mid); font-size: 1.05rem; margin: 0; }

/* --- Секции и сетка карточек ---------------------------------------------- */
.bl-section { margin-bottom: 40px; }
.bl-section__head {
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: var(--green);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 8px;
  margin: 0 0 20px;
}
.bl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.bl-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .08);
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s ease, transform .15s ease;
}
.bl-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.bl-card__media img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.bl-card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.bl-card__title { font-family: var(--font-head); font-size: 1.2rem; line-height: 1.2; margin: 0 0 8px; }
.bl-card__title a { color: var(--text-dark) !important; }
.bl-card__title a:hover { color: var(--green-mid) !important; text-decoration: none; }
.bl-card__lead { color: var(--text-mid); font-size: .92rem; margin: 0; }

/* --- Пагинация ------------------------------------------------------------ */
.bl-pager { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 30px; }
.bl-pager__link { font-weight: 700; color: var(--green-mid) !important; }
.bl-pager__status { color: var(--text-mid); font-size: .9rem; }

/* --- Статья --------------------------------------------------------------- */
.bl-article { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px clamp(18px, 5vw, 56px); max-width: 760px; margin: 0 auto; }
.bl-article__head { margin-bottom: 18px; }
.bl-article__title { font-family: var(--font-head); font-weight: 700; font-size: clamp(1.8rem, 5vw, 2.8rem); line-height: 1.12; margin: 0 0 14px; color: var(--text-dark); }
.bl-article__lead { font-size: 1.18rem; color: var(--text-mid); font-weight: 700; margin: 0 0 14px; line-height: 1.4; }
.bl-article__meta { color: var(--text-mid); font-size: .85rem; border-top: 1px solid #eee; border-bottom: 1px solid #eee; padding: 8px 0; text-transform: capitalize; }
.bl-figure { margin: 24px 0; }
.bl-figure img { width: 100%; border-radius: var(--radius); }
.bl-figure__cap { color: var(--text-mid); font-size: .85rem; margin-top: 8px; font-style: italic; }
.bl-article__body { font-size: 1.08rem; color: var(--text-dark); }
.bl-article__body p { margin: 0 0 1.1em; }
.bl-article__body h2, .bl-article__body h3 { font-family: var(--font-head); color: var(--green); }
.bl-article__body a { color: var(--green-mid); text-decoration: underline; }
.bl-article__body blockquote { border-left: 4px solid var(--accent); margin: 1.2em 0; padding: 4px 18px; color: var(--text-mid); font-style: italic; }
.bl-article__body img { border-radius: var(--radius); margin: 1em 0; }

/* --- Поделиться ----------------------------------------------------------- */
.bl-share { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 28px 0 8px; }
.bl-share__label { font-weight: 700; color: var(--text-mid); font-size: .9rem; }
.bl-share__btn {
  display: inline-block;
  padding: 6px 16px;
  border-radius: var(--radius);
  background: var(--green);
  color: var(--parchment) !important;
  font-size: .85rem;
  font-weight: 700;
}
.bl-share__btn:hover { background: var(--green-mid); text-decoration: none; }

/* --- Источники ------------------------------------------------------------ */
.bl-sources { background: var(--parchment); border-left: 4px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; padding: 14px 18px; margin: 24px 0 0; font-size: .9rem; }
.bl-sources__head { display: block; color: var(--green); margin-bottom: 6px; }
.bl-sources__list { margin: 0; padding-left: 18px; }
.bl-sources__list li { margin: 3px 0; }

/* --- Похожие -------------------------------------------------------------- */
.bl-related { max-width: var(--maxw); margin: 44px auto 0; }

/* --- 404 ------------------------------------------------------------------ */
.bl-notfound { text-align: center; padding: 60px 16px; }
.bl-notfound__code { font-family: var(--font-head); font-size: 5rem; color: var(--accent); display: block; line-height: 1; }
.bl-notfound__title { font-family: var(--font-head); color: var(--green); margin: 8px 0 12px; }
.bl-notfound__text { color: var(--text-mid); }
.bl-notfound__home { font-weight: 700; }

/* --- Футер ---------------------------------------------------------------- */
.bl-footer { background: var(--green); color: var(--parchment); margin-top: 50px; border-top: 4px solid var(--accent); }
.bl-footer__inner { max-width: var(--maxw); margin: 0 auto; padding: 28px 18px; }
.bl-footer__brand { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.bl-footer__name { font-family: var(--font-head); font-size: 1.4rem; font-weight: 700; }
.bl-footer__region { color: var(--amber-lt); font-size: .9rem; }
.bl-footer__links { display: flex; flex-wrap: wrap; gap: 18px; padding: 12px 0; border-top: 1px solid rgba(219, 185, 106, .25); }
.bl-footer__links a { color: var(--parchment) !important; font-size: .9rem; }
.bl-footer__links a:hover { color: var(--amber-lt) !important; text-decoration: none; }
.bl-footer__copy { color: var(--amber-lt); font-size: .82rem; margin: 8px 0 0; }

/* --- Адаптив (mobile-first выдвижное меню) -------------------------------- */
@media (max-width: 720px) {
  .bl-hero { grid-template-columns: 1fr; }
  .bl-hero__media img { min-height: 200px; }
  .bl-burger { display: flex; }
  .bl-masthead__meta { display: none; }
  .bl-nav {
    flex-direction: column;
    gap: 2px;
    max-height: 0;
    overflow: hidden;
    padding-top: 0;
    padding-bottom: 0;
    border-top: none;
    transition: max-height .2s ease, padding .2s ease;
  }
  .bl-nav.is-open {
    max-height: 320px;
    padding-top: 10px;
    padding-bottom: 14px;
    border-top: 1px solid rgba(219, 185, 106, .25);
  }
  .bl-nav__link { padding: 8px 0; }
}
