/* ==========================================================
   CREW — публичный сайт
   Дизайн-токены соответствуют принятым решениям бренд-проекта:
   светлая тема, --wine акцент, нулевые радиусы, без обводок/бейджей.
   ========================================================== */

@font-face {
  font-family: 'SFT Schrifted Sans';
  src: url('../fonts/SFT_Schrifted_Sans_TRIAL.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F8F7F4;
  --alt: #F5F5F5;
  --ink: #171717;
  --body: #686966;       /* AA-версия фирменного --body-soft для основного текста */
  --body-soft: #81827F;  /* буквальный фирменный тон, для декоративного применения */
  --wine: #572636;
  --wine-deep: #2c1219;
  --line: rgba(23,23,23,0.10);
  --radius: 0px;
  --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'SFT Schrifted Sans', 'Inter', sans-serif;
  font-synthesis: none;
  color: var(--ink);
  margin: 0 0 .5em;
  line-height: 1.15;
  letter-spacing: -.01em;
}
p { margin: 0 0 1em; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--wine); color: #fff;
  padding: 10px 16px; z-index: 1000;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ---------------------------------------------------------
   Хедер
   --------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(248,247,244,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 76px; gap: 24px;
}
.site-header__logo img { height: 34px; width: auto; }
.site-nav { display: none; gap: 28px; align-items: center; }
.site-nav__link { font-size: 0.92rem; font-weight: 500; color: var(--ink); padding: 8px 0; }
.site-nav__link:hover { color: var(--wine); }
.site-nav__link--btn {
  background: var(--wine); color: #fff !important; padding: 10px 20px; font-weight: 600;
}
.site-nav__link--btn:hover { background: var(--wine-deep); }

.site-header__right { display: flex; align-items: center; gap: 16px; }
.lang-switch { display: flex; gap: 2px; }
.lang-switch__item {
  font-size: 0.78rem; font-weight: 600; padding: 6px 9px; color: var(--body); min-width: 32px; text-align: center;
}
.lang-switch__item.is-active { color: var(--wine); background: var(--alt); }

.mobile-toggle {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; background: none; border: none; cursor: pointer; padding: 0;
}
.mobile-toggle span { display: block; height: 2px; background: var(--ink); width: 22px; margin: 0 auto; }

.mobile-panel {
  position: fixed; inset: 0; z-index: 300; background: var(--paper);
  overflow-y: auto;
}
.mobile-panel[hidden] { display: none; }
.mobile-panel__inner { padding: 24px; min-height: 100%; display: flex; flex-direction: column; }
.mobile-panel__close {
  align-self: flex-end; width: 44px; height: 44px; font-size: 1.8rem; line-height: 1; background: none; border: none; cursor: pointer; color: var(--ink);
}
.mobile-panel__nav { display: flex; flex-direction: column; margin-top: 12px; }
.mobile-panel__link { font-size: 1.3rem; padding: 14px 0; border-bottom: 1px solid var(--line); font-family: 'SFT Schrifted Sans','Inter',sans-serif; }
.mobile-panel__link--btn { color: var(--wine) !important; font-weight: 700; }
.mobile-panel__lang { margin-top: 24px; }

/* ---------------------------------------------------------
   Кнопки
   --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; font-size: 0.95rem; font-weight: 600; min-height: 48px;
  border: 1px solid transparent; cursor: pointer;
}
.btn--primary { background: var(--wine); color: #fff; }
.btn--primary:hover { background: var(--wine-deep); }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--paper); }

/* ---------------------------------------------------------
   Общие элементы блоков
   --------------------------------------------------------- */
.blk { padding: 72px 0; }
.blk--light { background: var(--paper); color: var(--body); }
.blk--alt { background: var(--alt); color: var(--body); }
.blk--wine { background: var(--wine); color: rgba(248,247,244,0.92); }
.blk--wine h1, .blk--wine h2, .blk--wine h3 { color: #fff; }
.blk--dark { background: var(--wine-deep); color: rgba(248,247,244,0.85); }
.blk--dark h1, .blk--dark h2, .blk--dark h3 { color: #fff; }

.blk-eyebrow {
  font-size: 0.82rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--wine); margin-bottom: 14px;
}
.blk--wine .blk-eyebrow, .blk--dark .blk-eyebrow { color: rgba(248,247,244,0.75); }

.blk-title { font-size: clamp(1.6rem, 3vw, 2.3rem); }
.blk-title--center { text-align: center; }
.blk-subtitle { color: var(--body); max-width: 640px; font-size: 1.05rem; }
.blk-head { margin-bottom: 40px; }

.blk-richtext { max-width: 720px; }
.blk-richtext p { margin-bottom: 1.1em; }
.blk-richtext ul, .blk-richtext ol { padding-left: 1.3em; margin-bottom: 1.1em; }
.blk-richtext img { margin: 1em 0; }
.blk-richtext h2, .blk-richtext h3 { margin-top: 1.3em; }
/* Цитата: разграничение оттенком фона, без обводки — по правилам бренда. */
.blk-richtext blockquote { background: var(--alt); padding: 24px 28px; margin: 1.5em 0; }
.blk-richtext blockquote p { margin-bottom: 0; font-size: 1.05rem; color: var(--ink); }
.blk-richtext blockquote p + p { margin-top: 1em; }

/* Hero */
.blk-hero {
  position: relative; padding: 120px 0 96px; background-size: cover; background-position: center;
  min-height: 460px; display: flex; align-items: center;
}
.blk-hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(44,18,25,0.55), rgba(44,18,25,0.82));
}
.blk-hero--dark { color: #fff; }
.blk-hero--dark .blk-hero__title, .blk-hero--dark .blk-eyebrow { color: #fff; }
.blk-hero--wine { background-color: var(--wine); color: #fff; }
.blk-hero--wine .blk-hero__title { color: #fff; }
.blk-hero__inner { position: relative; z-index: 2; }
/* .container центрирует контент шириной --container (1180px) на всех
   остальных секциях сайта. В hero эта же ширина нужна только чтобы посчитать
   отступ слева (текст должен начинаться на той же вертикали, что и заголовки
   ниже по странице) — сам блок при этом прижат к левому краю, а не
   центрируется. Без этого правила `.container`'s margin:0 auto внутри
   flex-контейнера .blk-hero центрирует текст по горизонтали (стандартное
   поведение auto-отступов на flex-элементе) — то, что и требовалось
   исправить. */
.blk-hero__inner.container {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-left: max(24px, calc((100% - var(--container)) / 2 + 24px));
  padding-right: 24px;
}
.blk-hero__title { font-size: clamp(2rem, 5vw, 3.4rem); max-width: 780px; margin-bottom: .4em; }
.blk-hero__subtitle { font-size: 1.15rem; max-width: 560px; margin-bottom: 1.6em; }
.blk-hero--dark .blk-hero__subtitle, .blk-hero--wine .blk-hero__subtitle { color: rgba(248,247,244,0.88); }
.blk-hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.blk-hero--dark .btn--outline, .blk-hero--wine .btn--outline { color: #fff; border-color: rgba(255,255,255,0.6); }
.blk-hero--dark .btn--outline:hover, .blk-hero--wine .btn--outline:hover { background: #fff; color: var(--ink); }

/* Текст с фото */
.blk-text-photo__grid { display: grid; gap: 40px; align-items: center; grid-template-columns: 1fr; }
.blk-text-photo__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.blk-text-photo--left .blk-text-photo__media { order: 0; }
.blk-text-photo--left .blk-text-photo__body { order: 1; }

/* Список с иконками */
.blk-icon-list { position: relative; overflow: hidden; }
.blk-icon-list::before {
  content: ''; position: absolute; right: -60px; bottom: -60px; width: 380px; height: 380px;
  background: url('../crew-element-contour.svg') no-repeat center / contain;
  opacity: .05; pointer-events: none; z-index: 0;
}
.blk-icon-list .container { position: relative; z-index: 1; }
.blk-icon-list__grid { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 32px; }
.blk-icon-item { position: relative; padding: 32px 28px; background: #fff; }
.blk--wine .blk-icon-item, .blk--dark .blk-icon-item { background: rgba(255,255,255,0.07); }
.blk-icon-item__index {
  position: absolute; top: 22px; right: 24px; line-height: 1;
  font-family: 'SFT Schrifted Sans', 'Inter', sans-serif; font-size: 1.5rem;
  color: var(--wine); opacity: .2;
}
.blk--wine .blk-icon-item__index, .blk--dark .blk-icon-item__index { color: #fff; opacity: .28; }
.blk-icon-item__icon { width: 44px; height: 44px; color: var(--wine); margin-bottom: 16px; }
.blk-icon-item__icon .icon { width: 100%; height: 100%; }
.blk--wine .blk-icon-item__icon, .blk--dark .blk-icon-item__icon { color: #fff; }
.blk-icon-item__title { font-size: 1.05rem; margin-bottom: .4em; padding-right: 36px; }
.blk-icon-item__text { font-size: 0.92rem; margin: 0; }

/* CTA */
.blk-cta__inner { text-align: center; max-width: 680px; margin: 0 auto; }
.blk-cta__title { margin-bottom: .3em; }
.blk-cta__subtitle { margin: 0 auto 1.6em; color: inherit; opacity: .85; }
.blk--wine .blk-cta__subtitle, .blk--dark .blk-cta__subtitle { color: rgba(248,247,244,0.85); }
.blk--wine .btn--primary, .blk--dark .btn--primary { background: #fff; color: var(--wine); }
.blk--wine .btn--outline, .blk--dark .btn--outline { color: #fff; border-color: rgba(255,255,255,0.6); }

/* HTML-блок */
.blk-html { padding: 0; }
.blk-html .container { padding-top: 40px; padding-bottom: 40px; }

/* Галерея */
.blk-gallery__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
}
.blk-gallery__item { padding: 0; border: none; background: none; cursor: pointer; overflow: hidden; aspect-ratio: 1/1; }
.blk-gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.blk-gallery__item:hover img { transform: scale(1.04); }

.lightbox {
  position: fixed; inset: 0; background: rgba(23,23,23,0.94); z-index: 500;
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 82vh; object-fit: contain; }
.lightbox__close, .lightbox__prev, .lightbox__next {
  position: absolute; background: none; border: none; color: #fff; cursor: pointer;
  font-size: 2rem; line-height: 1; padding: 10px;
}
.lightbox__close { top: 12px; right: 16px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }

/* Показатели */
.blk-stats__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 4px; text-align: center; }
.blk-stat { padding: 36px 20px; background: rgba(255,255,255,0.06); }
.blk--light .blk-stat, .blk--alt .blk-stat { background: rgba(23,23,23,0.03); }
.blk-stat__num { font-family: 'SFT Schrifted Sans','Inter',sans-serif; font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--wine); }
.blk--wine .blk-stat__num, .blk--dark .blk-stat__num { color: #fff; }
.blk-stat__label { font-size: 0.88rem; margin-top: 4px; }

/* Партнёры */
.blk-partners__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 24px; align-items: center; }
.blk-partners__item { display: flex; align-items: center; justify-content: center; padding: 12px; filter: grayscale(1); opacity: .75; }
.blk-partners__item:hover { filter: none; opacity: 1; }
.blk-partners__item img { max-height: 48px; width: auto; }

/* FAQ */
.blk-faq__list { max-width: 780px; margin: 0 auto; }
.blk-faq__item { border-bottom: 1px solid var(--line); }
.blk-faq__q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  background: none; border: none; text-align: left; padding: 22px 4px; font-size: 1.02rem; font-weight: 600;
  color: var(--ink); cursor: pointer; min-height: 44px;
}
.blk-faq__ic { position: relative; width: 16px; height: 16px; flex: none; }
.blk-faq__ic::before, .blk-faq__ic::after { content: ''; position: absolute; background: var(--ink); }
.blk-faq__ic::before { top: 7px; left: 0; width: 16px; height: 2px; }
.blk-faq__ic::after { top: 0; left: 7px; width: 2px; height: 16px; transition: transform .2s; }
.blk-faq__q[aria-expanded="true"] .blk-faq__ic::after { transform: scaleY(0); }
.blk-faq__a { padding: 0 4px 22px; max-width: 700px; }
.blk-faq__a[hidden] { display: none; }

/* ---------------------------------------------------------
   Новости
   --------------------------------------------------------- */
.blk-news-list { padding-top: 48px; }
/* «Кирпичная кладка» — чистый CSS через колонки (columns), без JS: карточки
   разной высоты (из-за разной длины заголовка/анонса, наличия и формата
   обложки — горизонтальной у обычной новости и вертикальной у журнала)
   естественным образом складываются в кладку без одинаковых по высоте
   строк. Внутри одной колонки карточки идут потоком сверху вниз, поэтому
   порядок на экране — по столбцам, а не построчно слева направо; это
   стандартное поведение CSS-масонри через columns, не баг. На мобильных —
   одна колонка (обычный вертикальный список), с 640px — две, с 900px —
   три; те же точки перелома, что и в остальной сетке блоков сайта. */
.news-grid { columns: 1; column-gap: 28px; }
.news-card { background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; break-inside: avoid-column; -webkit-column-break-inside: avoid; margin-bottom: 28px; }
.news-card__media { aspect-ratio: 16/10; overflow: hidden; }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; }
.news-card__body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.news-card__date { font-size: 0.78rem; color: var(--body-soft); margin-bottom: 8px; }
.news-card__title { font-size: 1.1rem; margin-bottom: 8px; }
.news-card__excerpt { font-size: 0.9rem; flex: 1; }
.news-card__link { font-size: 0.85rem; font-weight: 600; color: var(--wine); margin-top: 12px; }
.news-empty { padding: 40px 0; }
@media (min-width: 640px) { .news-grid { columns: 2; } }
@media (min-width: 900px) { .news-grid { columns: 3; } }

/* Блок «Последние новости» на главной: свежая новость крупно + компактный
   список остальных. Разграничение — оттенком фона (белое на --paper/--alt),
   без обводок, без скруглений — по правилам бренда. */
.news-feature-grid { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: stretch; }
.news-feature-grid--solo { grid-template-columns: 1fr; }
.news-feature { background: #fff; display: flex; flex-direction: column; }
.news-feature__media { aspect-ratio: 16/10; overflow: hidden; }
.news-feature__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.news-feature__body { padding: 28px; flex: 1; display: flex; flex-direction: column; }
.news-feature__date { font-size: 0.82rem; color: var(--body-soft); margin-bottom: 10px; }
.news-feature__title { font-size: clamp(1.3rem, 2vw, 1.6rem); margin-bottom: 12px; }
.news-feature__excerpt { font-size: 0.98rem; flex: 1; }
.news-feature__link { font-size: 0.85rem; font-weight: 600; color: var(--wine); margin-top: 16px; }

.news-feature-list { background: #fff; display: flex; flex-direction: column; }
.news-feature-list__item { display: flex; flex-direction: column; padding: 16px 24px; }
.news-feature-list__item:hover, .news-feature-list__item:focus-visible { background: var(--alt); }
.news-feature-list__date { font-size: 0.75rem; color: var(--body-soft); margin-bottom: 4px; }
.news-feature-list__title {
  font-size: 0.98rem; font-weight: 600; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

@media (min-width: 900px) {
  .news-feature-grid { grid-template-columns: 1.5fr 1fr; }
  .news-feature-grid--solo { grid-template-columns: 1fr; }
  .news-feature-grid--solo .news-feature { max-width: 640px; }
}

.news-pagination { display: flex; gap: 6px; margin-top: 40px; }
.news-pagination__item { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); font-size: 0.85rem; }
.news-pagination__item.is-active { background: var(--wine); color: #fff; border-color: var(--wine); }

.blk-news-single { padding: 56px 0 96px; }
.blk-news-single__inner { max-width: 760px; margin: 0 auto; }
.news-back { display: inline-block; margin-bottom: 24px; font-size: 0.88rem; color: var(--wine); font-weight: 600; }
.news-single__date { font-size: 0.82rem; color: var(--body-soft); margin-bottom: 10px; }
.news-single__title { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 24px; }
.news-single__cover { margin-bottom: 32px; aspect-ratio: 16/9; overflow: hidden; }
.news-single__cover img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------
   Футер
   --------------------------------------------------------- */
.site-footer { background: var(--wine-deep); color: rgba(248,247,244,0.82); padding: 64px 0 24px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 40px; padding-bottom: 40px; }
.footer-logo { height: 30px; margin-bottom: 16px; filter: brightness(0) invert(1); }
.footer-about { font-size: 0.9rem; max-width: 340px; }
.footer-social { display: flex; gap: 14px; margin-top: 16px; }
.footer-social img { filter: brightness(0) invert(1); opacity: .8; }
.footer-social a:hover img { opacity: 1; }
.footer-col__title { color: #fff; font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 14px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 10px; font-size: 0.9rem; }
.footer-links a:hover { color: #fff; }
.footer-contact-line { font-size: 0.9rem; margin-bottom: 10px; }
.footer-contact-line a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(248,247,244,0.15); padding-top: 20px; font-size: 0.8rem; }

/* ---------------------------------------------------------
   Адаптив (mobile-first, thumb-zone)
   --------------------------------------------------------- */
@media (min-width: 900px) {
  .site-nav { display: flex; }
  .mobile-toggle { display: none; }
  .mobile-panel { display: none !important; }
  .blk-text-photo__grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

@media (max-width: 640px) {
  .blk { padding: 52px 0; }
  .blk-hero { padding: 96px 0 64px; min-height: 380px; }
  .blk-icon-list__grid { grid-template-columns: 1fr !important; }
  .blk-gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .container { padding: 0 18px; }
  .blk-hero__inner.container { padding-left: 18px; padding-right: 18px; }
  .btn { width: 100%; }
  .blk-hero__actions { flex-direction: column; }
  .blk-hero__actions .btn { width: 100%; }
}

/* ---------------------------------------------------------
   Журнал (PDF): карточка в тексте новости и просмотрщик
   --------------------------------------------------------- */
/* Обложка журнала в списке новостей — вертикальная, показываем целиком. */
.news-card__media--magazine { aspect-ratio: 4/5; background: var(--alt); padding: 20px; }
.news-card__media--magazine img { object-fit: contain; filter: drop-shadow(0 8px 20px rgba(23,23,23,0.22)); }

.magazine-embed {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  align-items: center;
  background: var(--alt);
  padding: 24px;
  margin: 32px 0;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.magazine-embed:hover { background: #efeeea; }
.magazine-embed:focus-visible { outline: 2px solid var(--wine); outline-offset: 2px; }
.magazine-embed__cover img {
  width: 100%;
  height: auto;
  display: block;
  box-shadow: 0 10px 28px rgba(23,23,23,0.18);
}
.magazine-embed__label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--wine);
  margin-bottom: 10px;
}
.magazine-embed__title {
  font-family: 'SFT Schrifted Sans', 'Inter', sans-serif;
  color: var(--ink);
  font-size: 1.15rem;
  line-height: 1.25;
  margin-bottom: 14px;
}
.magazine-embed__action {
  display: inline-block;
  background: var(--wine);
  color: #fff;
  font-size: 0.9rem;
  padding: 11px 20px;
}
.magazine-embed:hover .magazine-embed__action { background: var(--wine-deep); }

/* --- Полноэкранный просмотрщик --- */
body.mag-locked { overflow: hidden; }

.mag-viewer {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: none;
  grid-template-rows: auto 1fr auto;
  /* minmax(0,1fr): иначе колонка грида растягивается под самый широкий
     элемент (длинный заголовок в верхней панели) и просмотрщик вылезает
     за правый край экрана на телефоне. */
  grid-template-columns: minmax(0, 1fr);
  background: var(--wine-deep);
  color: rgba(248,247,244,0.92);
}
.mag-viewer__top, .mag-viewer__stage, .mag-viewer__bar { min-width: 0; }
.mag-viewer.is-open { display: grid; }

.mag-viewer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: rgba(0,0,0,0.22);
}
.mag-viewer__title {
  font-family: 'SFT Schrifted Sans', 'Inter', sans-serif;
  font-size: 0.95rem;
  color: #fff;
  min-width: 0;            /* чтобы длинное название сжималось с многоточием */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mag-viewer__top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.mag-viewer__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  background: rgba(255,255,255,0.10);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  transition: background .15s ease;
}
.mag-viewer__btn:hover { background: rgba(255,255,255,0.2); }
.mag-viewer__btn:disabled { opacity: .35; cursor: default; }
.mag-viewer__btn--download { padding: 0 14px; text-decoration: none; gap: 8px; }
.mag-viewer__btn--step { min-width: 48px; height: 44px; }

.mag-viewer__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 12px;
}
.mag-viewer__stage.is-zoomed { align-items: flex-start; justify-content: flex-start; }

.mag-viewer__loader { color: rgba(248,247,244,0.75); font-size: 0.95rem; }

.mag-viewer__book {
  position: relative;
  display: flex;
  align-items: stretch;
  perspective: 2400px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.45);
}
.mag-page {
  position: relative;
  background: #fff;
  overflow: hidden;
  flex: none;
}
.mag-page canvas { display: block; width: 100%; height: 100%; }
.mag-page--left { box-shadow: inset -14px 0 24px -18px rgba(0,0,0,0.5); }
.mag-page--right { box-shadow: inset 14px 0 24px -18px rgba(0,0,0,0.5); }
.mag-page--solo { box-shadow: none; }
.mag-page--flip { position: absolute; top: 0; left: 50%; transform-style: preserve-3d; }

/* Листание: правая половина уходит к корешку, левая — наоборот. */
@keyframes magFlipNext {
  from { transform: rotateY(28deg); opacity: .35; }
  to   { transform: rotateY(0); opacity: 1; }
}
@keyframes magFlipPrev {
  from { transform: rotateY(-28deg); opacity: .35; }
  to   { transform: rotateY(0); opacity: 1; }
}
.mag-viewer__book.is-flip-next .mag-page--right,
.mag-viewer__book.is-single.is-flip-next .mag-page--left {
  transform-origin: left center;
  animation: magFlipNext .4s ease-out;
}
.mag-viewer__book.is-flip-prev .mag-page--left,
.mag-viewer__book.is-single.is-flip-prev .mag-page--left {
  transform-origin: right center;
  animation: magFlipPrev .4s ease-out;
}

.mag-viewer__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 92px;
  background: rgba(0,0,0,0.3);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background .15s ease;
}
.mag-viewer__nav:hover { background: rgba(0,0,0,0.55); }
.mag-viewer__nav:disabled { opacity: .25; cursor: default; }
.mag-viewer__nav--prev { left: 8px; }
.mag-viewer__nav--next { right: 8px; }

.mag-viewer__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  background: rgba(0,0,0,0.22);
}
.mag-viewer__counter {
  font-size: 0.85rem;
  color: rgba(248,247,244,0.85);
  white-space: nowrap;
  flex: none;
}
.mag-viewer__slider {
  flex: 1;
  min-width: 80px;
  accent-color: #fff;
  height: 28px;
}

/* На широких экранах листаем стрелками по краям разворота, кнопки в нижней
   панели не нужны — чтобы не дублировать одно и то же управление. */
@media (min-width: 900px) {
  .mag-viewer__btn--step { display: none; }
}

@media (max-width: 899px) {
  .magazine-embed { grid-template-columns: 110px 1fr; gap: 16px; padding: 16px; }
  .magazine-embed__title { font-size: 1rem; }
  .magazine-embed__action { width: 100%; text-align: center; }
  /* Стрелки по краям на телефоне перекрывали бы страницу — листание
     переносим в нижнюю панель, в зону большого пальца. */
  .mag-viewer__nav { display: none; }
  .mag-viewer__title { font-size: 0.85rem; }
  .mag-viewer__btn-label { display: none; }
  .mag-viewer__bar { flex-wrap: wrap; gap: 8px; padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
  .mag-viewer__counter { flex: 1; text-align: center; font-size: 0.8rem; }
  .mag-viewer__slider { order: 10; flex-basis: 100%; }
}

/* ---------------------------------------------------------
   Главная: блок «Журнал» (последний номер + ссылка на все)
   Кнопка «Смотреть все номера» вынесена в свою grid-область (.blk-journal__btn-wrap),
   а не лежит внутри текстового блока — на мобильных (1 колонка) области
   идут друг под другом в порядке body → cover → btn, поэтому кнопка
   оказывается внизу блока, ПОСЛЕ превью обложки, с отступом от неё
   (столько же, сколько между остальными строками блока, gap). На десктопе
   (≥900px, когда есть обложка) кнопка остаётся под текстом в левой
   колонке — area "btn" там стоит под "body" в той же колонке, а обложка
   растянута на обе строки правой колонки.
   --------------------------------------------------------- */
.blk-journal__grid {
  display: grid; gap: 28px; align-items: center;
  grid-template-columns: 1fr;
  grid-template-areas: "body" "cover" "btn";
}
.blk-journal__grid--no-cover { grid-template-areas: "body" "btn"; }
.blk-journal__body { grid-area: body; }
.blk-journal__cover { grid-area: cover; }
.blk-journal__btn-wrap { grid-area: btn; }
.blk-journal__cover img { width: 100%; height: auto; display: block; box-shadow: 0 10px 28px rgba(23,23,23,0.18); }
.blk-journal__latest { margin: 28px 0; padding: 20px 0; border-top: 1px solid var(--line); }
.blk--wine .blk-journal__latest, .blk--dark .blk-journal__latest { border-top-color: rgba(255,255,255,0.18); }
.blk-journal__latest-date { font-size: 0.78rem; color: var(--body-soft); margin-bottom: 6px; }
.blk--wine .blk-journal__latest-date, .blk--dark .blk-journal__latest-date { color: rgba(248,247,244,0.7); }
.blk-journal__latest-title { font-size: 1.2rem; margin-bottom: 8px; }
.blk--wine .blk-journal__latest-title a, .blk--dark .blk-journal__latest-title a { color: #fff; }
.blk-journal__latest-excerpt { font-size: 0.92rem; margin: 0; }
.blk--wine .blk-journal__latest-excerpt, .blk--dark .blk-journal__latest-excerpt { color: rgba(248,247,244,0.85); }

/* ---------------------------------------------------------
   Главная: блок «Последние новости» (без журналов — без повтора)
   --------------------------------------------------------- */
.blk-latest-news__footer { margin-top: 36px; text-align: center; }

@media (min-width: 900px) {
  .blk-journal__grid { grid-template-columns: 1fr 1fr; grid-template-areas: "body cover" "btn cover"; }
  .blk-journal__grid--no-cover { grid-template-columns: 1fr; grid-template-areas: "body" "btn"; }
}

/* ---------------------------------------------------------
   Мероприятия: карточки (блоки events_upcoming / events_archive)
   Карточка не ссылка целиком — только информирует; разграничение
   белым фоном от фона секции, без обводки (по правилам бренда).
   --------------------------------------------------------- */
.event-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 28px; }
.event-card { background: #fff; display: flex; flex-direction: column; }
.event-card__media { aspect-ratio: 16/10; overflow: hidden; }
.event-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.event-card__body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.event-card__date { font-size: 0.78rem; color: var(--body-soft); margin-bottom: 8px; }
.event-card__title { font-size: 1.1rem; margin-bottom: 6px; }
.event-card__location { font-size: 0.85rem; color: var(--body-soft); margin-bottom: 10px; }
.event-card__text { font-size: 0.9rem; flex: 1; margin-bottom: 18px; }
/* Кнопка «Сайт» — используется base .btn.btn--outline (см. выше), здесь
   только своя посадка в карточке: прижата к левому краю, не растягивается
   на всю ширину. min-height:48px у .btn уже удовлетворяет thumb-zone. */
.event-card__btn { align-self: flex-start; }
.events-empty { padding: 8px 0 4px; color: var(--body); }
.blk-events__footer { margin-top: 36px; text-align: center; }
