@import url("./tokens.css");

.cb-home-hero {
  position: relative;
  overflow: hidden;
  min-height: clamp(420px, 70vh, 640px);
  display: flex;
  align-items: center;
  background-color: var(--cb-color-dark);
  color: #fff;
}

.cb-home-hero--height-compact {
  min-height: clamp(320px, 50vh, 480px);
}
.cb-home-hero--height-tall {
  min-height: clamp(520px, 85vh, 760px);
}
.cb-home-hero--height-full {
  min-height: 100vh;
}

.cb-home-hero--align-center .cb-home-hero__inner {
  margin-inline: auto;
  text-align: center;
}

.cb-home-hero--align-center .cb-home-hero__actions,
.cb-home-hero--align-center .cb-hero-rating {
  align-items: center;
  justify-content: center;
}

.cb-home-hero:not(.cb-home-hero--marquee) {
  background-image: linear-gradient(
    135deg,
    #0a0a0a 0%,
    #1a1a1a 50%,
    #0d2240 100%
  );
}

.cb-home-hero__marquee {
  position: absolute;
  inset: -30% -35%;
  z-index: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(12px, 2.5vw, 20px);
  pointer-events: none;
  transform: scale(1.18);
}

.cb-hero-row {
  overflow: hidden;
  width: 100%;
}
.cb-hero-row--1,
.cb-hero-row--2,
.cb-hero-row--3 {
  transform: rotate(-5deg);
}

.cb-hero-row__track {
  display: flex;
  flex-wrap: nowrap;
  gap: clamp(10px, 2vw, 18px);
  width: max-content;
  will-change: transform;
}

.cb-hero-row--rtl .cb-hero-row__track {
  animation: cb-marquee-rtl 45s linear infinite;
}
.cb-hero-row--ltr .cb-hero-row__track {
  animation: cb-marquee-ltr 50s linear infinite;
}

@keyframes cb-marquee-rtl {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes cb-marquee-ltr {
  from {
    transform: translateX(-50%);
  }
  to {
    transform: translateX(0);
  }
}

.cb-hero-card {
  flex: 0 0 auto;
  width: clamp(110px, 20vw, 190px);
  aspect-ratio: 3 / 4;
  border-radius: var(--cb-radius);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  background: #222;
}

.cb-hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cb-home-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.48) 0%,
      rgba(0, 0, 0, 0.64) 45%,
      rgba(0, 0, 0, 0.76) 100%
    ),
    radial-gradient(
      ellipse at 50% 85%,
      rgba(2, 108, 223, 0.18) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse at 15% 45%,
      rgba(2, 108, 223, 0.1) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.cb-home-hero__inner {
  position: relative;
  z-index: 2;
  padding: clamp(48px, 10vh, 96px) 16px;
  max-width: 720px;
}

.cb-home-hero__inner > * {
  position: relative;
  z-index: 1;
}

.cb-home-hero__title,
.cb-home-hero__inner .wp-block-heading.cb-home-hero__title {
  font-size: clamp(32px, 6vw, 56px);
  margin: 0 0 16px;
  color: #fff;
}

.cb-home-hero__subtitle,
.cb-home-hero__inner p.cb-home-hero__subtitle {
  font-size: clamp(16px, 2.5vw, 20px);
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.92);
  max-width: 540px;
}

.cb-hero-rating {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 24px;
  font-size: 14px;
}

.cb-hero-rating__star {
  color: var(--cb-color-trust);
}

.cb-home-hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 12px;
}

.cb-home-hero__actions .wp-block-button__link {
  border-radius: 999px;
  padding: 14px 26px;
  font-weight: 600;
}

.cb-home-hero__inner .wp-block-buttons {
  margin-top: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .cb-hero-row__track {
    animation: none !important;
  }
}

.cb-genres-banner-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (min-width: 992px) {
  .cb-genres-banner-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
