/* ВК Новости — ЦКР Карасун v6.0 */

:root {
  --vkn-card-bg: #F4F0EC;
  --vkn-text:    #1a1a1a;
  --vkn-muted:   #666;
  --vkn-border:  rgba(0,0,0,.09);
  --vkn-vk:      #2C3B4E;
  --vkn-ease:    cubic-bezier(.4,0,.2,1);
  --vkn-radius:  30px;
  --vkn-gap:     16px;
}

.vknews-section {
  background: transparent;
  padding: 32px 0 28px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.vknews-heading {
  text-align: center;
  font-size: clamp(24px,3.5vw,42px) !important;
  font-weight: 900 !important;
  letter-spacing: 3px !important;
  text-transform: uppercase !important;
  margin: 0 0 24px !important;
  color: inherit !important;
}

/* ── Карусель ── */
.vknews-carousel-wrap { display:flex; align-items:center; }
.vknews-viewport { flex:1; overflow:hidden; cursor:grab; }
.vknews-viewport.dragging { cursor:grabbing; }
.vknews-track {
  display:flex; gap:var(--vkn-gap);
  transition:transform .4s var(--vkn-ease);
  will-change:transform; align-items:stretch;
}

/* ── Стрелки карусели ── */
.vknews-nav {
  flex-shrink: 0;
  width: 44px; height: 44px;
  background: none !important;
  background-color: transparent !important;
  border: none; padding: 0;
  cursor: pointer;
  opacity: 0.9;
  transition: opacity .2s;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent !important;
  outline: none !important;
  box-shadow: none !important;
}
.vknews-nav:hover,
.vknews-nav:focus,
.vknews-nav:active,
.vknews-nav:focus-visible {
  background: none !important;
  background-color: transparent !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent !important;
}
.vknews-nav:hover { opacity: 1; }

.vknews-nav--prev::after {
  content: '';
  display: flex; margin:auto;
  width: 23px; height: 41px;
  background: url("data:image/svg+xml,%3Csvg width='23' height='41' viewBox='0 0 23 41' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M19.6888 0L22.5357 2.87917L5.61092 20.5139L7.41554 22.3948L7.40654 22.3844L22.4447 38.0515L19.6387 40.974C15.4824 36.6439 3.87862 24.5547 0 20.5139C2.8807 17.5107 0.071421 20.4374 19.6888 0Z' fill='%23BFA682'/%3E%3C/svg%3E") center/contain no-repeat;
}
.vknews-nav--next::after {
  content: '';
  display: flex; margin:auto;
  width: 23px; height: 41px;
  background: url("data:image/svg+xml,%3Csvg width='23' height='41' viewBox='0 0 23 41' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2.84698 0L1.90735e-06 2.87917L16.9248 20.5139L15.1202 22.3948L15.1292 22.3844L0.091032 38.0515L2.89699 40.974C7.05336 36.6439 18.6571 24.5547 22.5357 20.5139C19.655 17.5107 22.4643 20.4374 2.84698 0Z' fill='%23BFA682'/%3E%3C/svg%3E") center/contain no-repeat;
}
.vknews-nav svg { display: none; }

/* ── Точки + счётчик ── */
.vknews-footer-row { display:flex; align-items:center; justify-content:center; gap:20px; margin-top:14px; flex-wrap:wrap; }
.vknews-dots { display:flex; gap:6px; }
.vknews-dot {
  width:7px; height:7px; border-radius:50%;
  background:rgba(0,0,0,.18); border:none; cursor:pointer; padding:0;
  transition:background .2s, transform .2s;
}
.vknews-dot.active { background:#333; transform:scale(1.35); }
.vknews-counter { font-size:12px; color:rgba(0,0,0,.35); letter-spacing:.4px; }

/* ── КАРТОЧКА ── */
.vknews-card {
  flex-shrink:0;
  width:calc((100% - var(--vkn-gap) * 4) / 5);
  background:var(--vkn-card-bg);
  border-radius:var(--vkn-radius);
  overflow:hidden; display:flex; flex-direction:column;
  cursor:pointer;
  transition:transform .22s var(--vkn-ease), box-shadow .22s var(--vkn-ease);
  box-shadow:0 1px 8px rgba(0,0,0,.08);
  border:1px solid rgba(0,0,0,.06);
}
.vknews-card:hover { transform:translateY(-3px); box-shadow:0 6px 22px rgba(0,0,0,.13); }

.vknews-card-photo-wrap {
  width:100%;
  /* padding-bottom:100% = квадрат (работает всегда) */
  padding-bottom:100%;
  height:0;
  overflow:hidden; flex-shrink:0; background:#d8d2cc; position:relative;
  border-radius:var(--vkn-radius) var(--vkn-radius) 0 0;
}
.vknews-card-photo-wrap img,
.vknews-card-photo-wrap video,
.vknews-card-photo-wrap > div {
  position:absolute; inset:0;
  width:100%; height:100%;
  object-fit:cover; object-position:center;
  display:block; transition:transform .35s var(--vkn-ease);
}
.vknews-card:hover .vknews-card-photo-wrap img { transform:scale(1.04); }

.vknews-card-nophoto {
  width:100%; height:100%;
  display:flex; align-items:center; justify-content:center;
  background:linear-gradient(135deg,#b8c8d8,#8aa8c0);
}
.vknews-card-nophoto svg { width:44px; height:44px; opacity:.4; fill:white; }

.vknews-card-play {
  position:absolute; inset:0;
  display:flex; align-items:center; justify-content:center;
  background:rgba(0,0,0,.2);
}
.vknews-card-play svg { width:44px; height:44px; }

.vknews-card-body { padding:14px 16px 12px; display:flex; flex-direction:column; flex:1; }
.vknews-card-text {
  font-size:13px; line-height:1.5; color:var(--vkn-text);
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical;
  overflow:hidden; margin:0 0 5px; flex:1;
}
.vknews-read-more {
  font-size:12px; color:var(--vkn-vk); background:none; border:none;
  padding:0; cursor:pointer; text-align:left; margin-bottom:9px; transition:opacity .15s;
}
.vknews-read-more:hover { opacity:.7; }

.vknews-card-group { display:flex; align-items:center; gap:7px; text-decoration:none; }
.vknews-card-group-avatar { width:22px; height:22px; border-radius:50%; object-fit:cover; flex-shrink:0; background:#bbb; }
.vknews-card-group-info { display:flex; flex-direction:column; min-width:0; flex:1; }
.vknews-card-group-name { font-size:10.5px; font-weight:700; color:var(--vkn-text); line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.vknews-card-group-date { font-size:10px; color:var(--vkn-muted); line-height:1.2; }
.vknews-card-group-vk svg { width:14px; height:14px; fill:#2C3B4E; }

.vknews-card-footer {
  display:flex; align-items:center; gap:2px;
  border-top:1px solid var(--vkn-border); margin-top:8px; padding-top:6px;
}
.vknews-action-btn {
  display:flex; align-items:center; gap:4px;
  background:none; border:none; padding:4px 6px;
  cursor:pointer; color:var(--vkn-muted); font-size:12px;
  border-radius:6px; transition:color .15s, background .15s;
  position:relative; white-space:nowrap;
}
.vknews-action-btn:hover { color:var(--vkn-text); background:rgba(0,0,0,.06); }
/* В попапе — без заливки, меняем цвет + тонкий контур */
.vknews-popup-body .vknews-action-btn:hover { color:#2C3B4E; background:none; outline:1px solid rgba(255,255,255,.6); border-radius:6px; }
.vknews-action-btn svg   { width:14px; height:14px; flex-shrink:0; }
.vknews-share-btn        { margin-left:auto; }

.vknews-action-btn::after {
  content:attr(data-tip);
  position:absolute; bottom:calc(100% + 5px); left:50%; transform:translateX(-50%);
  background:rgba(0,0,0,.75); color:#fff;
  font-size:11px; white-space:nowrap; padding:3px 8px; border-radius:4px;
  opacity:0; pointer-events:none; transition:opacity .15s; z-index:10;
}
.vknews-action-btn:hover::after { opacity:1; }

/* Лоадер-карточка */
.vknews-load-more { display:flex !important; align-items:center; justify-content:center; pointer-events:none; opacity:.4; }
.vknews-card-loader { display:flex; align-items:center; justify-content:center; width:100%; padding:40px 0; }
.vknews-spin-icon { width:28px; height:28px; animation:vknSpin .8s linear infinite; color:var(--vkn-vk); }

.vknews-state { width:100%; text-align:center; padding:50px 20px; color:var(--vkn-muted); font-size:14px; }
.vknews-spinner {
  width:32px; height:32px; border:3px solid rgba(0,0,0,.1);
  border-top-color:var(--vkn-vk); border-radius:50%;
  animation:vknSpin .7s linear infinite; margin:0 auto 12px;
}
@keyframes vknSpin { to { transform:rotate(360deg); } }

/* ════════════════════════════════════════
   ОВЕРЛЕЙ + СТРЕЛКИ + КРЕСТИК
════════════════════════════════════════ */

.vknews-overlay {
  position:fixed; inset:0;
  background:rgba(0,0,0,.75);
  z-index:999999;
  display:flex; align-items:center; justify-content:center;
  flex-direction:row; gap:0; padding:16px 4px;
  opacity:0; pointer-events:none;
  transition:opacity .25s ease;
  backdrop-filter:blur(5px);
}
.vknews-overlay.open { opacity:1; pointer-events:all; }

/* Стрелки листания — тонкие, без фона, снаружи модала */




/* Крестик закрытия — тот же стиль */

/* Стрелки листания попапов */
.vknews-popup-arrow { position:relative; flex-shrink:0; width:60px; height:60px; background:none; border:none; padding:0; cursor:pointer; z-index:2; opacity:.9; transition:opacity .15s; -webkit-tap-highlight-color:transparent; display:flex; align-items:center; justify-content:center; }
.vknews-popup-arrow:hover { opacity:1; }
#vknews-popup-prev::after { content:''; display:flex; margin:auto; width:41px; height:41px; background:url("data:image/svg+xml,%3Csvg%20width='41'%20height='41'%20viewBox='0%200%2041%2041'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3E%3Cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M20.4876%200L23.4275%202.85398L7.843%2018.4383H40.9746V22.5357H7.843L23.3845%2038.0771L20.4876%2040.974C12.9873%2033.4738%207.17921%2027.6657%200.00056076%2020.487L20.4876%200Z'%20fill='%23BFA682'/%3E%3C/svg%3E") center/contain no-repeat; }
#vknews-popup-next::after { content:''; display:flex; margin:auto; width:41px; height:41px; background:url("data:image/svg+xml,%3Csvg%20width='41'%20height='41'%20viewBox='0%200%2041%2041'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3E%3Cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M20.487%200L17.5471%202.85398L33.1316%2018.4383H0V22.5357H33.1316L17.5902%2038.0771L20.487%2040.974C27.9873%2033.4738%2033.7954%2027.6657%2040.974%2020.487L20.487%200Z'%20fill='%23BFA682'/%3E%3C/svg%3E") center/contain no-repeat; }
.vknews-popup-arrow svg, .vknews-popup-arrow img { display:none; }





/* Счётчик */
.vknews-popup-counter {
  /* Счётчик над модалом — в оверлее */
  position:fixed; top:16px; left:50%; transform:translateX(-50%);
  font-size:12px; color:rgba(255,255,255,.75);
  background:rgba(0,0,0,.45); padding:4px 14px; border-radius:20px;
  font-family:-apple-system,sans-serif; letter-spacing:.4px;
  pointer-events:none; z-index:1000000; white-space:nowrap;
}

/* Модал */
.vknews-modal {
  background:#fff; border-radius:var(--vkn-radius);
  width:fit-content; width:-webkit-fit-content;
  max-width:calc(96vw - 128px);  /* учитываем ширину стрелок */
  max-height:88vh; overflow:hidden;
  box-shadow:0 20px 70px rgba(0,0,0,.4);
  position:relative;
  transform:translateY(20px) scale(.96);
  transition:transform .28s ease;
  color:#1a1a1a;
  display:flex; flex-direction:column;
}
.vknews-overlay.open .vknews-modal { transform:translateY(0) scale(1); }






/* ════════════════════════════════════════
   ПОПАП — двухколоночный layout
════════════════════════════════════════ */


/* Крестик закрытия */
.vknews-modal-close { position:fixed; top:16px; right:16px; width:44px; height:44px; background:none; border:none; padding:0; cursor:pointer; z-index:10; opacity:.9; transition:opacity .15s; -webkit-tap-highlight-color:transparent; display:flex; align-items:center; justify-content:center; }
.vknews-modal-close:hover { opacity:1; }
.vknews-modal-close::after { content:''; display:flex; margin:auto; width:27px; height:27px; background:url("data:image/svg+xml,%3Csvg width='27' height='27' viewBox='0 0 27 27' fill='none' xmlns='http://www.w3.org/2000/svg'%3E %3Cpath d='M21.4475 23.3151L13.0736 14.9281L4.69972 23.3151L2.83008 21.4455L11.2171 13.0716L2.83008 4.69776L4.69972 2.82812L13.0736 11.2152L21.4475 2.84129L23.3039 4.69776L14.9301 13.0716L23.3039 21.4455L21.4475 23.3151Z' fill='white' fill-opacity='0.5'/%3E %3Cpath d='M5.40723 2.12109L13.0732 9.7998L20.7402 2.13379L21.4473 1.42676L24.0107 3.99023L24.7178 4.69824L24.0107 5.40527L16.3438 13.0713L24.7158 21.4434L24.0137 22.1504L22.1572 24.0195L21.4492 24.7324L20.7402 24.0215L13.0732 16.3428L5.40723 24.0215L4.7002 24.7295L3.99219 24.0225L2.12305 22.1523L1.41504 21.4453L2.12305 20.7383L9.80176 13.0713L2.12305 5.40527L1.41504 4.69824L4.7002 1.41309L5.40723 2.12109Z' stroke='white' stroke-opacity='0.5' stroke-width='2'/%3E %3Cpath d='M21.4475 23.3151L13.0736 14.9281L4.69972 23.3151L2.83008 21.4455L11.2171 13.0716L2.83008 4.69776L4.69972 2.82812L13.0736 11.2152L21.4475 2.84129L23.3039 4.69776L14.9301 13.0716L23.3039 21.4455L21.4475 23.3151Z' fill='%23BFA682'/%3E %3C/svg%3E "); }
.vknews-modal-close svg, .vknews-modal-close img { display:none; }

.vknews-popup-inner {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  max-height: 90vh;
  overflow: hidden;
}
.vknews-popup-inner.no-media .vknews-popup-media {
  flex: 0 0 62vw;
  max-width: 820px;
  min-width: 300px;
  height: 100%;
  position: relative;
  overflow: hidden;       /* ← СЛАЙДЕР обрезается здесь */
  background: #000;
  border-radius: var(--vkn-radius) 0 0 var(--vkn-radius);
}
.vknews-popup-inner.no-media .vknews-popup-body  { border-radius:var(--vkn-radius); }

/* Левая колонка — медиа: размер по контенту или видео */
.vknews-popup-media {
  flex: 0 0 auto;
  max-width: 74vw;
  min-width: 200px;
  position: relative;
  overflow: hidden;
  background: #111;
  border-radius: var(--vkn-radius) 0 0 var(--vkn-radius);
  /* Галерея внутри absolute — медиа-колонка должна иметь явный размер */
  display: block;
}

/* Правая колонка — инфо */
.vknews-popup-body {
  flex:0 0 480px; width:480px; min-width:360px;
  overflow-y:auto; padding:20px 20px 18px;
  display:flex; flex-direction:column;
  background:#fff;
  border-radius:0 var(--vkn-radius) var(--vkn-radius) 0;
}

/\* ═══ ГАЛЕРЕЯ ═══ \*/

/* Контейнер галереи — заполняет медиа-колонку полностью */
.vknews-popup-gallery {
  position: absolute;
  inset: 0;
  background: #111;
  overflow: hidden;   /* ← ключевое: обрезает соседние слайды */
}

/* Трек — горизонтальная полоса всех слайдов */
.vknews-gal-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  height: 100%;
  /* ширина = кол-во слайдов × 100% — задаётся через JS */
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}

/* Каждый слайд — ровно 100% ширины .vknews-popup-media */
.vknews-gal-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
  overflow: hidden;
}

/* Изображение — вписывается целиком без обрезки */
.vknews-gal-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  /* НЕ lazy — грузим все фото сразу */
  loading: eager;
}


/* Трек: все слайды в одну строку */
.vknews-gal-track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;  /* высота трека = высота картинки, не растягиваем */
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.vknews-gal-slide {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: #000;
  overflow: hidden;
}
.vknews-gal-slide img {
  /* Вписываем в доступное пространство по высоте, ширина авто */
  max-height: 88vh;
  max-width: 74vw;
  width: auto;
  height: auto;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  object-fit: contain;
}








/* Счётчик */










/* Стрелки галереи */
.vknews-gal-prev { position:absolute; top:50%; transform:translateY(-50%); left:12px; width:44px; height:44px; background:none; border:none; padding:0; cursor:pointer; z-index:10; opacity:.9; transition:opacity .15s; -webkit-tap-highlight-color:transparent; }
.vknews-gal-next { position:absolute; top:50%; transform:translateY(-50%); right:12px; width:44px; height:44px; background:none; border:none; padding:0; cursor:pointer; z-index:10; opacity:.9; transition:opacity .15s; -webkit-tap-highlight-color:transparent; }
.vknews-gal-prev:hover, .vknews-gal-next:hover { opacity:1; }
.vknews-gal-prev::after { content:''; display:flex; margin:auto; width:23px; height:41px; background:url("data:image/svg+xml,%3Csvg width='23' height='41' viewBox='0 0 23 41' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M19.6888 0L22.5357 2.87917L5.61092 20.5139L7.41554 22.3948L7.40654 22.3844L22.4447 38.0515L19.6387 40.974C15.4824 36.6439 3.87862 24.5547 0 20.5139C2.8807 17.5107 0.071421 20.4374 19.6888 0Z' fill='%23BFA682'/%3E%3C/svg%3E") center/contain no-repeat; }
.vknews-gal-next::after { content:''; display:flex; margin:auto; width:23px; height:41px; background:url("data:image/svg+xml,%3Csvg width='23' height='41' viewBox='0 0 23 41' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M2.84698 0L1.90735e-06 2.87917L16.9248 20.5139L15.1202 22.3948L15.1292 22.3844L0.091032 38.0515L2.89699 40.974C7.05336 36.6439 18.6571 24.5547 22.5357 20.5139C19.655 17.5107 22.4643 20.4374 2.84698 0Z' fill='%23BFA682'/%3E%3C/svg%3E") center/contain no-repeat; }

.vknews-gal-counter {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  background: rgba(0,0,0,.55); color: #fff; font-size: 12px;
  padding: 3px 12px; border-radius: 20px;
  pointer-events: none; z-index: 5; white-space: nowrap;
  font-family: -apple-system, sans-serif;
}

/* Видео */
.vknews-popup-video {
  background: #000;
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.vknews-popup-video iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Правая колонка — содержимое */






/* Шапка попапа: аватар + (имя / дата / кнопка) */
.vknews-popup-group-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}
.vknews-popup-group-avatar {
  width: 40px; height: 40px;
  border-radius: 50%; object-fit: cover;
  flex-shrink: 0; margin-top: 2px;
}
.vknews-popup-group-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.vknews-popup-group-name {
  font-size: 13px; font-weight: 700; color: #1a1a1a;
  text-decoration: none;
  line-height: 1.3;
}
.vknews-popup-group-name:hover { text-decoration: underline; }
.vknews-popup-group-date {
  font-size: 12px; color: #666;
}
.vknews-subscribe-btn {
  display:inline-flex; align-items:center; gap:5px;
  align-self:flex-start;
  margin-top:7px;
  padding:5px 12px;
  background:none;
  color:#2C3B4E;
  border:1px solid rgba(0,0,0,.2);
  border-radius:8px; font-size:12px; font-weight:600;
  cursor:pointer; text-decoration:none; white-space:nowrap;
  transition:color .15s, border-color .15s;
}
.vknews-subscribe-btn:hover { color:#1a2a3a; border-color:rgba(255,255,255,.9); }
.vknews-subscribe-btn svg { width:12px; height:12px; }
.vknews-popup-text { font-size:14px; line-height:1.72; color:#1a1a1a; margin-bottom:14px; white-space:pre-line; word-break:break-word; flex:1; }
.vknews-popup-footer { display:flex; align-items:center; gap:2px; border-top:1px solid rgba(0,0,0,.1); padding-top:12px; margin-top:auto; }
.vknews-popup-body::-webkit-scrollbar { width:4px; }
.vknews-popup-body::-webkit-scrollbar-thumb { background:#ddd; border-radius:99px; }

/* Мобильный попап */

/* ── Адаптив карусели ── */


/* ════════════════════════════════════
   МЕНЮ «ПОДЕЛИТЬСЯ»
════════════════════════════════════ */
.vknews-share-menu {
  position:fixed;
  background:#fff;
  border:1px solid rgba(0,0,0,.12);
  border-radius:14px;
  box-shadow:0 8px 40px rgba(0,0,0,.22);
  z-index:99999999;
  overflow:hidden;
  min-width:230px;
  animation:vknMenuIn .15s ease both;
}
@keyframes vknMenuIn {
  from { opacity:0; transform:scale(.95) translateY(-4px); }
  to   { opacity:1; transform:scale(1)   translateY(0); }
}
.vknews-share-item {
  display:flex; align-items:center; gap:12px;
  width:100%; padding:12px 18px;
  background:none; border:none;
  border-bottom:1px solid rgba(0,0,0,.07);
  cursor:pointer; color:#1a1a1a; font-size:13px; text-align:left;
  transition:background .12s; font-family:inherit;
}
.vknews-share-item:last-child { border-bottom:none; }
.vknews-share-item:hover { background:rgba(0,0,0,.05); color:#2C3B4E; }
.vknews-share-item svg { width:20px; height:20px; flex-shrink:0; }
.vknews-share-item img { width:20px; height:20px; flex-shrink:0; }


/* ════════════════════════════════════════
   ПЛИТКА (GRID MODE)
════════════════════════════════════════ */
.vknews-grid {
  display: grid;
  grid-template-columns: repeat(var(--vkn-grid-cols, 5), 1fr);
  gap: var(--vkn-gap, 16px);
  padding: 0;
}

/* Карточки в плитке — те же самые */
.vknews-grid .vknews-card {
  width: auto !important;
  margin: 0 !important;
  flex-shrink: unset !important;
  scroll-snap-align: unset !important;
}

/* Кнопка "Загрузить ещё" */
.vknews-grid-footer {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}
.vknews-load-more-btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 40px;
  background: var(--vkn-vk, #2C3B4E);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: opacity .2s;
  outline: none !important;
  box-shadow: none !important;
  -webkit-tap-highlight-color: transparent !important;
}
.vknews-load-more-btn:hover { opacity: .85; }
.vknews-load-more-btn:active,
.vknews-load-more-btn:focus { outline:none!important; background:var(--vkn-vk,#2C3B4E)!important; }

/* Мобильный grid: 1 колонка */
@media (max-width:600px) {
  .vknews-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  .vknews-grid .vknews-card {
    width: 100% !important;
    border-radius: 30px !important;
  }
}
/* ════════════════════════════════════
   МОБИЛЬНЫЙ (до 600px)
════════════════════════════════════ */
@media (max-width:600px) {

  /* ── 1. Карусель: 1 карточка строго по центру ── */
  .vknews-section { padding:20px 0; }
  .vknews-carousel-wrap { padding:0; }
  /* ── Карусель: scroll-snap слайдер ── */
  .vknews-carousel-wrap { padding:0; }

  /* Viewport = нативный горизонтальный скролл со snap */
  .vknews-viewport {
    padding:0 16px;
    box-sizing:border-box;
    overflow-x:scroll !important;
    overflow-y:hidden;
    scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
  }
  .vknews-viewport::-webkit-scrollbar { display:none; }

  /* Трек — flex без gap */
  .vknews-track {
    gap:0 !important;
    transform:none !important;
    transition:none !important;
  }

  /* Карточка — строго одна на экран, snap по центру */
  .vknews-card {
    width:calc(100vw - 32px) !important;
    flex-shrink:0 !important;
    scroll-snap-align:center;
    scroll-snap-stop:always;
    border-radius:30px !important;
    box-shadow:none !important;
    margin-right:0 !important;
  }
  .vknews-card, .vknews-card-body { box-shadow:none !important; }
  .vknews-nav { display:none !important; }

  /* ── Оверлей ── */
  .vknews-overlay {
    padding:0;
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
  }

  /* Скрываем боковые стрелки попапа */
  .vknews-popup-arrow { display:none !important; }

  /* ── Модал: 100% экрана минус нижняя панель ── */
  .vknews-modal {
    width:100vw !important;
    max-width:100vw !important;
    min-width:0 !important;
    flex:1;
    height:auto !important;
    max-height:none !important;
    border-radius:0 !important;
    overflow-y:auto;
    display:flex;
    flex-direction:column;
  }
  .vknews-modal-close { position:fixed; top:10px; right:10px; z-index:1000002; }
  .vknews-popup-counter { display:none !important; }

  /* ── Нижняя панель — вне модала, всегда внизу экрана ── */
  .vknews-popup-bottom-nav {
    display:flex !important;
    align-items:center;
    justify-content:center;
    gap:20px;
    padding:12px 0 max(16px, env(safe-area-inset-bottom));
    background:#fff;
    border-top:1px solid rgba(0,0,0,.08);
    flex-shrink:0;
    width:100vw;
  }
  .vknews-popup-bottom-nav .vknews-popup-arrow {
    display:flex !important;
    position:static !important;
    transform:none !important;
    background:none !important;
    width:44px; height:44px;
    opacity:0.9;
  }
  #vknews-popup-prev-b::after {
    content:''; display:flex; margin:auto; width:41px; height:41px;
    background:url("data:image/svg+xml,%3Csvg%20width='41'%20height='41'%20viewBox='0%200%2041%2041'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3E%3Cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M20.4876%200L23.4275%202.85398L7.843%2018.4383H40.9746V22.5357H7.843L23.3845%2038.0771L20.4876%2040.974C12.9873%2033.4738%207.17921%2027.6657%200.00056076%2020.487L20.4876%200Z'%20fill='%23BFA682'/%3E%3C/svg%3E") center/contain no-repeat;
  }
  #vknews-popup-next-b::after {
    content:''; display:flex; margin:auto; width:41px; height:41px;
    background:url("data:image/svg+xml,%3Csvg%20width='41'%20height='41'%20viewBox='0%200%2041%2041'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3E%3Cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M20.487%200L17.5471%202.85398L33.1316%2018.4383H0V22.5357H33.1316L17.5902%2038.0771L20.487%2040.974C27.9873%2033.4738%2033.7954%2027.6657%2040.974%2020.487L20.487%200Z'%20fill='%23BFA682'/%3E%3C/svg%3E") center/contain no-repeat;
  }
  .vknews-popup-bottom-counter {
    font-size:14px; color:rgba(0,0,0,.5);
    font-family:-apple-system,sans-serif;
    min-width:70px; text-align:center;
  }

  /* ── Медиа + инфо колонкой ── */
  .vknews-popup-inner {
    flex-direction:column !important;
    width:100% !important;
    height:auto !important;
    max-height:none !important;
    overflow:visible !important;
  }

  /* ── Медиа: ширина 100%, высота по содержимому ── */
  .vknews-popup-media {
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    height:auto !important;
    max-height:none !important;
    flex:none !important;
    border-radius:0 !important;
    position:relative !important;
  }

  /* ── Галерея: один слайд = 100% ── */
  .vknews-popup-gallery {
    position:relative !important; width:100%; height:auto !important; overflow:hidden !important;
  }
  .vknews-gal-viewport {
    position:relative !important; width:100%; overflow:hidden !important; height:auto !important;
  }
  .vknews-gal-track {
    height:auto !important;
    flex-wrap:nowrap;
  }
  .vknews-gal-slide {
    /* строго 100% ширины viewport (не vw!) */
    flex:0 0 100% !important;
    width:100% !important;
    height:auto !important;
  }
  .vknews-gal-slide img {
    width:100% !important;
    height:auto !important;
    max-width:100% !important;
    max-height:none !important;
    object-fit:contain !important;
  }

  /* Видео 16:9 */
  .vknews-popup-video { width:100% !important; aspect-ratio:16/9; height:auto !important; }
  .vknews-popup-video iframe { width:100% !important; height:100% !important; }

  /* Инфо-блок */
  .vknews-popup-body {
    width:100% !important;
    max-width:100% !important;
    flex:none !important;
    height:auto !important;
    border-radius:0 !important;
    padding:16px !important;
    overflow-y:auto !important;
  }
}

/* ════════════════════════════════════
   ПЛАНШЕТ
════════════════════════════════════ */
@media (min-width:601px) and (max-width:900px) {
  .vknews-card { width:calc((100% - 16px) / 2) !important; }
  .vknews-nav  { width:34px; height:34px; margin:0 4px; }
}
@media (min-width:901px) and (max-width:1200px) {
  .vknews-card { width:calc((100% - 32px) / 3) !important; }
}

/* ═══════════════════════════════════════════
   ПОЛНЫЙ СБРОС СИНЕГО ФОНА НА ВСЕХ КНОПКАХ
═══════════════════════════════════════════ */
.vknews-overlay button,
.vknews-overlay button:link,
.vknews-overlay button:visited,
.vknews-overlay button:hover,
.vknews-overlay button:focus,
.vknews-overlay button:active,
.vknews-overlay button:focus-visible,
.vknews-popup-body button,
.vknews-popup-body button:hover,
.vknews-popup-body button:focus,
.vknews-popup-body button:active,
.vknews-popup-body button:focus-visible,
.vknews-nav,
.vknews-nav:hover,
.vknews-nav:focus,
.vknews-nav:active,
.vknews-nav:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  background-color: transparent !important;
  -webkit-tap-highlight-color: transparent !important;
  -moz-appearance: none !important;
  appearance: none !important;
}

