/*
Theme Name: News Themes
Version: 4.0 stable (no gaps)
*/
html, body {
  margin: 0;
  padding: 0;
}

/* BASE */
body {
  margin: 0;
  background: #f9fafb;
}

/* ===================== */
/* HERO SLIDER */
/* ===================== */

.hero-slider {
  position: relative;
  height: 500px;
  width: 100%;
  overflow: hidden;
}

/* TRACK */
.hero-track {
  display: flex;
  height: 100%;
  will-change: transform;
  transform: translate3d(0,0,0);
}

/* SLIDE */
.hero-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* IMAGE */
.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* OVERLAY */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

/* CONTENT */
.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;

  padding: 20px;
  color: #fff;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;

  min-height: 120px;

  background: linear-gradient(
    to top,
    rgba(0,0,0,0.85),
    rgba(0,0,0,0)
  );
}

/* CATEGORY */
.hero-content span {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 6px;
}

/* TITLE */
.hero-content h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 6px 0;
  line-height: 1.25;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* TEXT */
.hero-content p {
  font-size: 15px;
  font-weight: 500;
  margin: 0;
  line-height: 1.45;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;

  color: rgba(255,255,255,0.9);
}

/* BUTTONS */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;

  width: 42px;
  height: 42px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0,0,0,0.7);
  color: #fff;
  border-radius: 6px;
  cursor: pointer;
}

.nav-btn.prev { left: 20px; }
.nav-btn.next { right: 20px; }

/* DOTS */
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
}

.dot.active {
  background: #fff;
}

/* ===================== */
/* NEWS TICKER */
/* ===================== */

.news-ticker {
  position: relative;
  overflow: hidden;
}

/* TRACK */
.ticker-track {
  display: flex;
  width: max-content;
  animation: none;
}

/* ПАУЗА */
.news-ticker:hover .ticker-track {
  animation-play-state: paused;
}

/* ВНУТРЕННИЙ БЛОК */
.ticker-inner {
  display: flex;
}

/* ЭЛЕМЕНТ */
.ticker-item {
  margin-right: 10px; /* 🔥 расстояние между новостями */
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 500;
}

/* КРАСНАЯ ТОЧКА */
.ticker-item::before {
  content: "•";
  margin-right: 12px;
  font-weight: 900;
  font-size: 18px;
  color: #ef4444;
}

/* АНИМАЦИЯ */
@keyframes tickerMove {
  0% {
    transform: translate3d(0,0,0);
  }
  100% {
    transform: translate3d(-50%,0,0);
  }
}

/* MOBILE */
@media (max-width: 768px) {
  .ticker-track {
   
  }
}
.tv-row {
  transition: all 0.2s ease;
  cursor: pointer;
}

.tv-row:hover {
  background: #f9fafb;
  transform: translateX(4px);
}
.tv-date small {
  display: block;
  font-size: 11px;
  opacity: 0.6;
}

.tv-row {
  position: relative;
}

.tv-row::before {
  content: '';
  position: absolute;
  left: 110px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e5e7eb;
}

/* точка */
.tv-row::after {
  content: '';
  position: absolute;
  left: 106px;
  top: 50%;
  width: 8px;
  height: 8px;
  background: #9ca3af;
  border-radius: 50%;
  transform: translateY(-50%);
}

/* активная */
.tv-active::after {
  background: #ef4444;
  box-shadow: 0 0 0 4px rgba(239,68,68,0.2);
}
/* TAB BUTTONS */
.tab-btn {
  padding: 8px 14px;
  font-weight: 600;
  color: #6b7280;
  border-bottom: 2px solid transparent;
  transition: 0.2s;
}

.tab-btn:hover {
  color: #111;
}

.tab-btn.active {
  color: #ef4444;
  border-color: #ef4444;
}

/* CONTENT */
.tab-content {
  display: block;
}

.tab-content.hidden {
  display: none;
}
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
#about-more {
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.pdf-card {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.5s ease forwards;
}

.pdf-card:nth-child(1) { animation-delay: 0.05s; }
.pdf-card:nth-child(2) { animation-delay: 0.1s; }
.pdf-card:nth-child(3) { animation-delay: 0.15s; }
.pdf-card:nth-child(4) { animation-delay: 0.2s; }

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
body.modal-open {
  overflow: hidden;
}
#pdf-container {
  touch-action: none;
}
.program-hidden {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.program-card.active .program-hidden {
  max-height: 500px;
}
/* 🎬 МОДАЛКА */
#program-modal {
  backdrop-filter: blur(8px);
  transition: opacity 0.3s ease;
}

/* окно */
#program-modal > div {
  transform: scale(0.95);
  transition: all 0.3s ease;
}

#program-modal.flex > div {
  transform: scale(1);
}

/* ▶ кнопка */
.play-btn {
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* карточки */
.program-card {
  transition: all 0.3s ease;
}

.program-card:hover {
  transform: translateY(-6px);
}

/* плавное появление iframe */
iframe {
  animation: fadeIn 0.4s ease;
}
/* ===================== */
/* 🔍 LIVE SEARCH */
/* ===================== */

#liveSearchResults {
  max-height: 420px;
  overflow-y: auto;

  background: white;
  backdrop-filter: blur(6px);

  transform: translateY(5px);
  opacity: 0;
  pointer-events: none;

  transition: all 0.2s ease;
}

/* АКТИВНОЕ СОСТОЯНИЕ */
#liveSearchResults.show {
 opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}

/* ===================== */
/* 📌 СЕКЦИИ */
/* ===================== */

.search-section-title,
.suggest-section-title {
  font-size: 11px;
  text-transform: uppercase;
  color: #9ca3af;
  padding: 6px 12px;
}

/* ===================== */
/* 📦 ЭЛЕМЕНТ */
/* ===================== */

.search-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  transition: all 0.2s ease;
  cursor: pointer;
}

.search-item:hover {
  background: #f3f4f6;
}

.search-item.active {
  background: #eef2ff;
  outline: 1px solid #e0e7ff;
}

/* первый элемент */
.search-item:first-child {
  background: #f9fafb;
}

/* ===================== */
/* 🖼 КАРТИНКА */
/* ===================== */

.search-thumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

/* ===================== */
/* 📝 ТЕКСТ */
/* ===================== */

.search-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.search-date {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 2px;
}

/* ===================== */
/* ➖ РАЗДЕЛИТЕЛЬ */
/* ===================== */

.search-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 6px 0;
}

/* ===================== */
/* 🔘 КНОПКА */
/* ===================== */

.search-all {
  display: block;
  text-align: center;
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #ef4444;
}

.search-all:hover {
  background: #f9fafb;
}

/* ===================== */
/* ❌ ПУСТО */
/* ===================== */

.search-empty {
  padding: 12px;
  text-align: center;
  color: #9ca3af;
}

/* ===================== */
/* 🔥 ПОДСВЕТКА */
/* ===================== */

.hl {
  background: #fee2e2;
  color: #b91c1c;
  padding: 1px 3px;
  border-radius: 4px;
}

/* ===================== */
/* 💀 SKELETON */
/* ===================== */

.skeleton {
  display: flex;
  gap: 10px;
  padding: 10px;
}

.skeleton-box {
  width: 50px;
  height: 50px;
  background: #e5e7eb;
  border-radius: 8px;
  animation: pulse 1.2s infinite;
}

.skeleton-text {
  flex: 1;
  height: 14px;
  background: #e5e7eb;
  border-radius: 4px;
  margin-top: 8px;
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}
.suggest-item {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#ghostInput {
  z-index: 0;
  color: #9ca3af;
pointer-events: none;
}

#liveSearchInput {
  z-index: 10;
  background: transparent;
}
.hl {
  background: #ffe58a;
  padding: 0 2px;
  border-radius: 2px;
}

#ghostInputMobile {
  z-index: 0;
  pointer-events: none;

  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;

  color: rgba(156, 163, 175, 0.6);
}


#mobileSearchInput {
  position: relative;
  z-index: 10;
  background: transparent !important;
   color: #9ca3af;
}
#mobileSearchResults.show {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: translateY(0) !important;
}
#mobileSearch {
  z-index: 9999;
}

#searchToggle {
  position: relative;
  z-index: 10000;
}
#mobileSearchResults {
  max-height: 420px;
  overflow-y: auto;

  background: white;

  transform: translateY(5px);
  opacity: 0;
  pointer-events: none;

  transition: all 0.2s ease;
}
.remove-item {
  font-size: 12px;
  opacity: 0;
  transition: 0.2s;
}

.suggest-item:hover .remove-item {
  opacity: 1;
}
#resultsContainer {
  transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.apple-loading {
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.65);
  transform: scale(0.98);
}

.apple-card {
  display: flex;
  gap: 12px;

  min-height: 96px; /* 🔥 фикс */
  align-items: stretch; /* важно */

  transform: translateY(12px) scale(0.97);
  opacity: 0;

  transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.apple-card img {
  display: block;
}
.apple-card.show {
  transform: translateY(0) scale(1);
  opacity: 1;
}
#resultsContainer .apple-card {
  opacity: 1;
  transform: none;
}
#resultsContainer .apple-card.show {
  transform: translateY(0) scale(1);
  opacity: 1;
}
body:not(.js-loaded) #resultsContainer .apple-card {
  opacity: 1;
  transform: none;
}
 @media (max-width: 768px) {

  .apple-card {
    align-items: flex-start;
    transition: all 0.25s ease;
  }

  .apple-card h2 {
    font-size: 14px;
  }
.apple-card:active {
  transform: scale(0.98);
}
}
