/* ============================================
   CircularCarousel — ванильный порт reactbits.dev <CircularCarousel />
   3D-кольцо карточек (cylinder/orbit/wheel/panorama) для главной страницы:
   новости, релизы, артисты.
   ============================================ */

.cc {
  --cc-fade: var(--bg-dark, #0a0a0a);
  --cc-radius: 12px;
  --cc-inner: 0.4;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  outline: none;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.cc[data-axis='x'] {
  touch-action: pan-x;
}

.cc[data-draggable] {
  cursor: grab;
}

.cc[data-dragging] {
  cursor: grabbing;
}

.cc:focus-visible {
  box-shadow: inset 0 0 0 2px rgba(0, 176, 185, 0.55);
  border-radius: var(--radius-lg, 8px);
}

.cc__view {
  position: absolute;
  inset: 0;
}

.cc[data-shape='wheel'] .cc__view {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent);
}

.cc[data-shape='panorama'] .cc__view {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}

.cc__stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.45s ease;
}

.cc[data-ready] .cc__stage {
  opacity: 1;
}

.cc__camera,
.cc__ring,
.cc__card {
  width: 0;
  height: 0;
  transform-style: preserve-3d;
}

.cc__camera {
  position: relative;
}

.cc__ring,
.cc__card {
  position: absolute;
  left: 0;
  top: 0;
}

.cc__tile {
  position: absolute;
  outline: 1px solid transparent;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.cc__frame {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(0, 176, 185, 0.14), transparent 65%),
    var(--bg-surface, #101010);
  background-image:
    url('/assets/icons/disc.svg'),
    radial-gradient(circle at 50% 45%, rgba(0, 176, 185, 0.14), transparent 65%);
  background-repeat: no-repeat, no-repeat;
  background-position: center, center;
  background-size:
    38% auto,
    auto;
}

.cc__photo {
  position: absolute;
  display: block;
  max-width: none;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.cc__shade,
.cc__inner {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cc__shade {
  background: var(--cc-fade);
  opacity: var(--cc-depth, 0);
}

.cc__inner {
  background: #000000;
  opacity: var(--cc-inner);
}

/* ===== Подпись под кольцом (title/subtitle + счётчик) ===== */

.cc__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 0 16px;
  color: var(--text-white);
  text-align: center;
  pointer-events: none;
}

.cc__title {
  display: flex;
  max-width: 100%;
  flex-direction: column;
  align-items: center;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.cc__subtitle {
  font-weight: 400;
  font-size: 13px;
  opacity: 0.65;
}

.cc__count {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  opacity: 0.5;
}

.cc__slash {
  opacity: 0.6;
}

.cc__digits {
  display: inline-flex;
}

.cc__digit {
  display: inline-block;
  height: 1em;
  overflow: hidden;
}

.cc__reel {
  display: flex;
  flex-direction: column;
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.cc__reel > span {
  height: 1em;
}

.cc__live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .cc__stage,
  .cc__reel {
    transition: none;
  }
}

/* ============================================
   Интеграция на главной: контейнер секции + панель
   активного элемента (анонс/дата/исполнители/кнопки).
   ============================================ */

.home-carousel {
  position: relative;
  width: 100%;
}

.home-carousel__stage {
  position: relative;
  height: clamp(360px, 40vw, 520px);
}

.home-carousel .cc-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 6px;
  padding: 16px 18px;
  background: var(--card, rgba(19, 19, 19, 0.72));
  border: 1px solid var(--border);
  border-radius: 14px;
  animation: cc-panel-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.home-carousel .cc-panel[hidden] {
  display: none;
}

.cc-panel__text {
  font-family: var(--font-display, 'Unbounded', 'Manrope', sans-serif);
  font-weight: 700;
  font-size: clamp(0.98rem, 1.5vw, 1.15rem);
  line-height: 1.5;
  letter-spacing: -0.01em;
  color: var(--text);
}

.cc-panel__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 8px;
  font-family: var(--font-display, 'Unbounded', sans-serif);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
}

.cc-panel__actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
}

.cc-panel__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 13px 24px;
  background: var(--primary);
  color: #04141a;
  border: 1px solid var(--primary);
  border-radius: 10px;
  font-family: var(--font-display, 'Unbounded', sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 12px 26px -14px rgba(0, 176, 185, 0.9);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}

.cc-panel__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px -14px rgba(0, 176, 185, 1);
}

.cc-panel__btn:active {
  transform: translateY(0);
}

.cc-panel__btn:focus-visible {
  outline: 2px solid var(--primary-light);
  outline-offset: 3px;
}

.cc-panel__btn--ghost {
  background: transparent;
  color: var(--primary);
  box-shadow: none;
}

.cc-panel__btn--ghost:hover {
  background: var(--primary);
  color: #04141a;
  box-shadow: 0 16px 32px -14px rgba(0, 176, 185, 1);
}

:root[data-theme='light'] .cc-panel__btn {
  color: #ffffff;
}

:root[data-theme='light'] .cc-panel__btn--ghost {
  color: var(--primary);
}

:root[data-theme='light'] .cc-panel__btn--ghost:hover {
  color: #ffffff;
}

@keyframes cc-panel-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .home-carousel__stage {
    height: 360px;
  }

  .home-carousel .cc-panel {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 14px;
    gap: 14px;
  }

  .cc-panel__meta {
    justify-content: center;
  }

  /* Кнопки остаются по размеру контента и по центру —
     не растягиваются на всю ширину панели. */
  .cc-panel__actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .cc-panel__btn {
    padding: 12px 20px;
  }
}
