/* ================================================
   COPELLA TOPICS - HOT TOPICS CAROUSEL
   Стили для .copella-ht (Hot Topics) - БЕЗ ГРАДИЕНТОВ
   ================================================ */

/* --- Шрифт Unbounded --- */
@import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@700;800;900&display=swap');

/* --- Стили блока "Горячие темы" --- */
.copella-ht{
  color:#fff;
  background:transparent;
  border-radius:0;
  padding:0 24px;
  font-family:'Unbounded', sans-serif;
  border:0;
}

.copella-ht .ht-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:18px;
}

.copella-ht .ht-titlebar{
  display:flex;
  align-items:center;
  gap:10px;
}

.copella-ht .ht-nav{
  background:transparent;
  border:0;
  color:#fff;
  opacity:.9;
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border-radius:10px;
  cursor:pointer;
  transition:background .2s ease,opacity .2s ease;
}

.copella-ht .ht-nav:hover{
  background:rgba(255,255,255,.06);
  opacity:1;
}

.copella-ht .ht-nav:disabled{
  opacity:0.25;
  pointer-events:none;
  background:transparent;
}

.copella-ht .ht-title{
  margin:0;
  font-size:20px;
  font-weight:800;
  font-family:'Unbounded', sans-serif;
  letter-spacing:-0.02em;
}

.copella-ht .ht-link{
  position:absolute;
  inset:0;
  z-index:3;
  border-radius:var(--ht-card-radius,20px);
  outline-offset:4px;
}

.copella-ht .ht-viewport{
  overflow:visible;
  padding-top:10px;
  padding-bottom:10px;
  position:relative;
}

.copella-ht .ht-track{
  display:flex;
  gap:var(--ht-gap,24px);
  padding:10px 0 10px 0;
  overflow-x:auto;
  overflow-y:visible;
  scrollbar-width:none;
  scroll-behavior:smooth;
  scroll-padding-left:0;
  scroll-padding-right:0;
}

.copella-ht .ht-track::-webkit-scrollbar{
  display:none;
  height:0;
}

/* --- Карточки - БЕЗ ГРАДИЕНТОВ --- */
.copella-ht .ht-card{
  position:relative;
  flex:0 0 auto;
  width:380px;
  color:inherit;
  text-decoration:none;
  transition:transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
              opacity 0.3s ease,
              box-shadow 0.3s ease;
  z-index:2;
}

.copella-ht .ht-card:hover{
  transform:translateY(-6px) scale(1.02);
  opacity:1;
  z-index:3;
}

.copella-ht.is-staggered .ht-card:nth-child(even){
  margin-top:var(--ht-stagger,56px);
}

/* --- Миниатюра карточки БЕЗ ГРАДИЕНТОВ --- */
.copella-ht .ht-thumb{
  display:block;
  width:100%;
  aspect-ratio:var(--ht-aspect-ratio,16/9);
  border-radius:var(--ht-card-radius,20px);
  overflow:hidden;
  position:relative;
  box-shadow:
    0 8px 24px rgba(0,0,0,0.4),
    0 4px 12px rgba(0,0,0,0.3);
  background:#1f1f1f;
  transition:box-shadow 0.3s ease, transform 0.3s ease;
}

.copella-ht .ht-card:hover .ht-thumb{
  box-shadow:
    0 12px 32px rgba(0,0,0,0.5),
    0 6px 16px rgba(0,0,0,0.4);
  transform:scale(1.03);
}

.copella-ht .ht-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  position:relative;
  z-index:0;
  transition:transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.copella-ht .ht-card:hover .ht-thumb img{
  transform:scale(1.08);
}

/* Фоллбэк для карточек без изображения */
.copella-ht .ht-fallback{
  position:absolute;
  inset:0;
  z-index:1;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#1f1f1f;
  font-size:48px;
  font-weight:900;
  color:rgba(255,255,255,0.1);
  font-family:'Unbounded', sans-serif;
}

/* --- Заголовок темы --- */
.copella-ht .ht-card-title{
  position:absolute;
  left:20px;
  right:20px;
  bottom:20px;
  z-index:2;
  font-weight:700;
  font-size:clamp(16px, 1.8vw, 24px);
  font-family:'Unbounded', sans-serif;
  color:#fff;
  text-shadow:0 2px 6px rgba(0,0,0,.5);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  line-height:1.3;
  letter-spacing:-0.01em;
  transition:transform 0.3s ease;
  transform:translateY(0);
}

.copella-ht .ht-card:hover .ht-card-title{
  transform:translateY(-2px);
}

/* --- Scheduled Topic Premiere Styles --- */
.copella-ht .ht-scheduled {
  cursor: default;
  pointer-events: none;
}

.copella-ht .ht-scheduled .ht-thumb img {
  filter: brightness(0.4) saturate(0.6);
}

.copella-ht .ht-premiere-banner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(2px);
  border-radius: var(--ht-card-radius, 28px) var(--ht-card-radius, 28px) 0 0;
  padding: 12px 16px;
  z-index: 2;
}

.copella-ht .ht-premiere-timer {
  text-align: center;
  color: #ffffff;
  font-family: 'Unbounded', 'Gilroy-SemiBold', sans-serif;
}

.copella-ht .ht-premiere-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 4px;
  line-height: 1;
}

.copella-ht .ht-premiere-time {
  display: block;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  letter-spacing: 0.3px;
}

/* --- Пагинация --- */
.copella-ht .ht-pagination{
  display:flex;
  gap:10px;
  justify-content:center;
  margin-top:18px;
}

.copella-ht .ht-pagination a{
  color:#fff;
  text-decoration:none;
  padding:6px 10px;
  border-radius:10px;
  background:rgba(255,255,255,.06);
  font-family:'Unbounded', sans-serif;
  font-size:14px;
  font-weight:600;
  transition:all 0.2s ease;
}

.copella-ht .ht-pagination a:hover{
  background:rgba(255,255,255,.12);
}

.copella-ht .ht-pagination a.is-active{
  background:#fff;
  color:#000;
}

/* --- Пустое состояние --- */
.copella-ht .ht-empty{
  padding:40px;
  text-align:center;
  font-family:'Unbounded', sans-serif;
  font-size:16px;
  font-weight:600;
  color:rgba(255,255,255,0.6);
}

/* Aspect ratio fallback для старых браузеров */
@supports not (aspect-ratio: 1 / 1) {
  .copella-ht .ht-thumb{
    padding-top:56.25%; /* 16:9 ratio */
  }
  .copella-ht .ht-thumb img{
    position:absolute;
    top:0;
    right:0;
    bottom:0;
    left:0;
  }
}

/* Responsive Design */
@media (min-width: 1024px){
  .copella-ht .ht-viewport{
    overflow:visible;
  }
  .copella-ht .ht-track{
    overflow-x:auto;
    overflow-y:visible;
    padding:10px 0 10px 0;
  }
}

@media (max-width: 1024px){
  .copella-ht .ht-viewport{
    overflow-x:auto;
    overflow-y:visible;
    padding:10px 0 10px 0;
    scrollbar-width:none;
  }
  .copella-ht .ht-viewport::-webkit-scrollbar{
    display:none;
  }
  .copella-ht .ht-track{
    display:flex;
    overflow-x:auto;
    overflow-y:visible;
    scroll-snap-type:x mandatory;
    padding:10px 0 10px 0;
    gap:var(--ht-gap,20px);
  }
  .copella-ht .ht-card{
    flex:0 0 280px;
    scroll-snap-align:start;
    width:280px;
  }
}

@media (max-width: 768px){
  .copella-ht .ht-card{
    flex-basis:340px;
    width:340px;
  }
  
  .copella-ht .ht-thumb{
    aspect-ratio:16/9;
    border-radius:12px;
  }
  
  .copella-ht .ht-link{
    border-radius:12px;
  }
  
  .copella-ht .ht-premiere-banner {
    border-radius:12px 12px 0 0;
  }
  
  .copella-ht .ht-card-title{
    font-size:clamp(14px, 3.5vw, 20px);
    left:16px;
    right:16px;
    bottom:16px;
  }
}

@media (max-width: 640px){
  .copella-ht{
    margin-left:0;
    margin-right:0;
    border-radius:0;
    padding:0 16px;
  }
  .copella-ht .ht-track{
    padding:10px 0 10px 0;
    gap:var(--ht-gap, 16px);
  }
  .copella-ht .ht-card{
    flex-basis:300px;
    width:300px;
    max-width:none;
  }
  
  .copella-ht .ht-thumb{
    aspect-ratio:16/9;
    border-radius:12px;
  }
  
  .copella-ht .ht-link{
    border-radius:12px;
  }
  
  .copella-ht .ht-premiere-banner {
    border-radius:12px 12px 0 0;
  }
  
  .copella-ht .ht-card-title{
    font-size:clamp(13px, 3.5vw, 18px);
    left:14px;
    right:14px;
    bottom:14px;
  }
  
  .copella-ht .ht-title{
    font-size:24px;
  }
  
  .copella-ht .ht-premiere-banner {
    padding: 10px 12px;
  }
  .copella-ht .ht-premiere-label {
    font-size: 10px;
    margin-bottom: 3px;
  }
  .copella-ht .ht-premiere-time {
    font-size: 20px;
  }
}

/* Flex gap fallback для старых браузеров */
@supports not (gap: 1rem) {
  .copella-ht .ht-track{
    margin-left:0;
  }
  .copella-ht .ht-track > *{
    margin-left:24px;
  }
  .copella-ht .ht-track > *:first-child{
    margin-left:0;
  }
  
  @media (max-width: 640px){
    .copella-ht .ht-track{
      margin-left:0;
    }
    .copella-ht .ht-track > *{
      margin-left:16px;
    }
    .copella-ht .ht-track > *:first-child{
      margin-left:0;
    }
  }
}

@media (max-width: 1024px) and (min-width: 641px){
  .copella-ht{
    padding:0 20px;
  }
}

/* --- Fix: ensure site header is always clickable above carousels --- */
.site-header,
#masthead,
header.site-header{
  position: relative;
  z-index: 9999;
  pointer-events: auto;
}
