/* Тизерные блоки. Префикс abt-, всё с запасом против стилей темы (a, span, img). */
.abt, .abt * { box-sizing: border-box; }
.abt [hidden], .abt-sheet[hidden], .abt[hidden] { display: none !important; }

.abt {
  --abt-gap: 16px;
  width: 100%;
  max-width: var(--abt-max, none);
  margin: 1.75rem auto;
  font-family: inherit;
  clear: both;
}
.abt__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--abt-accent, #e11d48);
}
.abt__heading {
  font-size: 1.15em;
  font-weight: 800;
  line-height: 1.25;
  color: inherit;
}
.abt__label {
  flex: none;
  font: 600 11px/1.3 system-ui, sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #94a3b8;
}
.abt__grid {
  display: grid;
  grid-template-columns: repeat(var(--abt-cols, 2), minmax(0, 1fr));
  gap: var(--abt-gap);
}
.abt a.abt-item {
  position: relative;
  display: block;
  overflow: hidden;
  color: inherit;
  text-decoration: none !important;
  border: 0;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}
.abt a.abt-item:focus-visible { outline: 3px solid var(--abt-accent, #e11d48); outline-offset: 2px; }
.abt .abt-img {
  display: block;
  width: 100%;
  aspect-ratio: var(--abt-ratio, 4/3);
  background-color: #e2e8f0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  transition: transform .5s ease;
}
.abt .abt-img--empty { background-image: linear-gradient(135deg, #cbd5e1, #94a3b8); }
.abt .abt-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  font-weight: 800;
  line-height: 1.25;
  word-break: break-word;
}

/* 1. Заголовок поверх фото — как в сетках рекомендаций. */
.abt--overlay a.abt-item { border-radius: 14px; background: #0f172a; box-shadow: 0 6px 20px rgba(15, 23, 42, .12); }
.abt--overlay a.abt-item::after {
  content: '';
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .55) 45%, rgba(0, 0, 0, .9));
  pointer-events: none;
}
.abt--overlay .abt-title {
  position: absolute;
  z-index: 2;
  left: 20px;
  right: 20px;
  bottom: 20px;
  padding: 0;
  color: #fff;
  font-size: clamp(16px, 2.2vw, 24px);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}

/* 2. Карточки: фото, заголовок под ним. */
.abt--card a.abt-item {
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 4px 16px rgba(15, 23, 42, .06);
  color: #0f172a !important;
}
/* Отступ снизу — margin, а не padding: в padding у line-clamp проглядывает лишняя строка. */
.abt--card .abt-title { padding: 0; margin: 12px 14px 14px; font-size: 16px; -webkit-line-clamp: 3; }
.abt--card a.abt-item:hover .abt-title { color: var(--abt-accent, #e11d48); }

/* 3. Список с миниатюрами. */
.abt--list .abt__grid { gap: 0; }
.abt--list a.abt-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, .35);
}
.abt--list a.abt-item:last-child { border-bottom: 0; }
.abt--list .abt-img { flex: none; width: 108px; aspect-ratio: 4/3; border-radius: 10px; }
.abt--list .abt-title { font-size: 16px; -webkit-line-clamp: 3; }
.abt--list a.abt-item:hover .abt-title { color: var(--abt-accent, #e11d48); text-decoration: underline; }

/* 4. Журнал: первый тизер крупно поверх фото, остальные списком. */
.abt--magazine .abt__grid { grid-template-columns: 1fr; gap: 0; }
.abt--magazine a.abt-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(148, 163, 184, .35);
}
.abt--magazine a.abt-item:last-child { border-bottom: 0; }
.abt--magazine .abt-img { flex: none; width: 108px; aspect-ratio: 4/3; border-radius: 10px; }
.abt--magazine .abt-title { font-size: 16px; -webkit-line-clamp: 3; }
.abt--magazine a.abt-item--lead { display: block; padding: 0; margin-bottom: 6px; border: 0; border-radius: 14px; background: #0f172a; }
.abt--magazine a.abt-item--lead .abt-img { width: 100%; aspect-ratio: 16/9; border-radius: 0; }
.abt--magazine a.abt-item--lead::after {
  content: '';
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .88));
  pointer-events: none;
}
.abt--magazine a.abt-item--lead .abt-title {
  position: absolute;
  z-index: 2;
  left: 20px;
  right: 20px;
  bottom: 20px;
  padding: 0;
  color: #fff;
  font-size: clamp(18px, 2.6vw, 28px);
}

/* 5. Карусель: листается пальцем, на десктопе видно столько, сколько колонок. */
.abt--carousel { position: relative; }
.abt--carousel .abt__grid {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.abt--carousel .abt__grid::-webkit-scrollbar { display: none; }
.abt--carousel a.abt-item {
  flex: 0 0 calc((100% - (var(--abt-cols, 2) - 1) * var(--abt-gap)) / var(--abt-cols, 2) - 12px);
  scroll-snap-align: start;
  border-radius: 14px;
  background: #0f172a;
}
.abt--carousel a.abt-item::after {
  content: '';
  position: absolute;
  inset: 35% 0 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, .88));
  pointer-events: none;
}
.abt--carousel .abt-title { position: absolute; z-index: 2; left: 16px; right: 16px; bottom: 16px; padding: 0; color: #fff; font-size: 17px; -webkit-line-clamp: 3; }

/* Эффекты. */
.abt--fx-zoom a.abt-item:hover .abt-img { transform: scale(1.06); }
.abt--fx-shine a.abt-item .abt-img { position: relative; }
.abt--fx-shine a.abt-item::before {
  content: '';
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  width: 45%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: translateX(-160%) skewX(-12deg);
  animation: abt-shine 5s ease-in-out infinite;
  pointer-events: none;
}
.abt--fx-shine a.abt-item:nth-child(2)::before { animation-delay: .6s; }
.abt--fx-shine a.abt-item:nth-child(3)::before { animation-delay: 1.2s; }
.abt--fx-shine a.abt-item:nth-child(4)::before { animation-delay: 1.8s; }
/* Свечение и пульс — только у карточек с фото; строки списка от них рябят. */
.abt--fx-glow:not(.abt--list):not(.abt--magazine) a.abt-item, .abt--fx-glow.abt--magazine a.abt-item--lead { animation: abt-glow 3.5s ease-in-out infinite; }
.abt--fx-pulse:not(.abt--list):not(.abt--magazine) a.abt-item, .abt--fx-pulse.abt--magazine a.abt-item--lead { animation: abt-pulse 4s ease-in-out infinite; }
@keyframes abt-shine { 0%, 15% { transform: translateX(-160%) skewX(-12deg); } 55%, 100% { transform: translateX(330%) skewX(-12deg); } }
@keyframes abt-glow { 0%, 100% { box-shadow: 0 0 0 1px rgba(0, 0, 0, .04), 0 6px 18px rgba(15, 23, 42, .12); } 50% { box-shadow: 0 0 0 2px var(--abt-accent, #e11d48), 0 0 26px var(--abt-accent, #e11d48); } }
@keyframes abt-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.015); } }

@media (max-width: 767px) {
  .abt { --abt-gap: 12px; margin: 1.25rem auto; }
  .abt__grid { grid-template-columns: repeat(var(--abt-cols-m, 1), minmax(0, 1fr)); }
  .abt--magazine .abt__grid, .abt--list .abt__grid { grid-template-columns: 1fr; }
  .abt--overlay .abt-title { left: 16px; right: 16px; bottom: 16px; font-size: 19px; }
  .abt--carousel a.abt-item { flex-basis: 78%; }
  .abt--list .abt-img, .abt--magazine a.abt-item:not(.abt-item--lead) .abt-img { width: 92px; }
  .abt--list .abt-title, .abt--magazine .abt-title { font-size: 15px; }
}
@media (max-width: 767px) {
  /* Две колонки на телефоне — заголовок поверх фото мельче, иначе закрывает всю картинку. */
  .abt--overlay[style*="--abt-cols-m:2"] .abt-title { font-size: 15px; left: 12px; right: 12px; bottom: 12px; }
}

/* Выезжающая панель снизу (как «Вам может понравиться»). */
.abt-sheet {
  position: fixed;
  z-index: 2147483000;
  left: 50%;
  bottom: 0;
  width: min(640px, 100%);
  max-height: 72vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #0f172a;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -10px 40px rgba(15, 23, 42, .28);
  transform: translate(-50%, 105%);
  transition: transform .35s cubic-bezier(.2, .8, .2, 1);
  font-family: inherit;
}
.abt-sheet.is-open { transform: translate(-50%, 0); }
.abt-sheet--right { left: auto; right: 20px; bottom: 20px; width: min(380px, calc(100% - 24px)); border-radius: 18px; transform: translateY(calc(100% + 30px)); }
.abt-sheet--right.is-open { transform: translateY(0); }
.abt-sheet__bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px 12px 18px;
  background: #eef2f7;
  border-radius: inherit;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-top: 3px solid var(--abt-accent, #e11d48);
}
.abt-sheet__title { flex: 1; font-weight: 700; font-size: 16px; line-height: 1.3; color: #334155; }
.abt-sheet .abt__label { margin-right: 4px; }
.abt-sheet__close {
  flex: none;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: #0f172a;
  font-size: 24px;
  line-height: 34px;
  padding: 0;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .18);
}
.abt-sheet__close:hover { background: #f1f5f9; }
.abt-sheet__body { overflow-y: auto; padding: 4px 16px 16px; overscroll-behavior: contain; }
.abt-sheet .abt { margin: 8px 0 0; max-width: none; }
.abt-sheet--preview { position: relative; left: auto; bottom: auto; right: auto; transform: none; margin: 0 auto; max-height: 520px; }

@media (prefers-reduced-motion: reduce) {
  .abt .abt-img, .abt-sheet { transition: none; }
  .abt--fx-shine a.abt-item::before, .abt--fx-glow a.abt-item, .abt--fx-pulse a.abt-item { animation: none; }
}

/* Стрелки карусели — для мыши; на телефоне листают пальцем, стрелки скрыты. */
.abt .abt-arrow {
  display: none;
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  color: #0f172a;
  font: 700 22px/44px system-ui, sans-serif;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(15, 23, 42, .28);
  transition: opacity .2s, transform .2s;
}
.abt .abt-arrow:hover { transform: scale(1.08); background: #fff; }
.abt .abt-arrow--prev { left: 8px; }
.abt .abt-arrow--next { right: 8px; }
.abt .abt-arrow[disabled] { opacity: 0; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .abt--carousel .abt-arrow { display: block; }
}

/* Плашки на фото: «горячее», «эфир», «новое» — ставятся вручную у тизера. */
.abt .abt-badge {
  position: absolute;
  z-index: 4;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: calc(100% - 20px);
  padding: 4px 10px;
  border-radius: 999px;
  color: #fff;
  font: 800 12px/1.3 system-ui, sans-serif;
  letter-spacing: .03em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}
.abt .abt-badge b { font-weight: inherit; overflow: hidden; text-overflow: ellipsis; }
.abt .abt-badge--hot { background: linear-gradient(135deg, #f97316, #e11d48); }
.abt .abt-badge--live { background: #dc2626; }
.abt .abt-badge--new { background: #16a34a; }
.abt .abt-badge--plain { background: rgba(15, 23, 42, .82); }
.abt .abt-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: abt-live 1.2s ease-in-out infinite; }
@keyframes abt-live { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .25; transform: scale(.7); } }
.abt .abt-comments {
  position: absolute;
  z-index: 4;
  top: 10px;
  right: 10px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, .78);
  color: #fff;
  font: 700 12px/1.3 system-ui, sans-serif;
}
/* В списке плашка мельче и сидит на миниатюре. */
.abt--list .abt-badge, .abt--magazine a.abt-item:not(.abt-item--lead) .abt-badge { top: 18px; left: 4px; padding: 2px 6px; font-size: 9px; max-width: 100px; }
.abt--list .abt-dot, .abt--magazine a.abt-item:not(.abt-item--lead) .abt-dot { width: 6px; height: 6px; }
.abt--list .abt-comments, .abt--magazine a.abt-item:not(.abt-item--lead) .abt-comments { position: static; order: 3; flex: none; margin-left: auto; background: #f1f5f9; color: #475569; }
.abt--list .abt-title, .abt--magazine a.abt-item:not(.abt-item--lead) .abt-title { order: 2; }
@media (prefers-reduced-motion: reduce) { .abt .abt-dot { animation: none; } }
