/* ============================================
   hero.css — WatchLane Step 4
   Import tokens.css lebih dulu dari HTML
   ============================================ */

/* ── Hero Section ── */
.hero-section {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding-top: var(--nav-h);
}

.hero-backdrop-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-backdrop {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: opacity 0.5s ease;
}

.hero-gradient-left {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 60%;
  background: linear-gradient(to right, var(--bg) 0%, transparent 100%);
  z-index: 1;
}

.hero-gradient-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, var(--bg) 0%, transparent 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  padding: 0 40px 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.hero-main {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 12px;
}

.hero-genres {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.hero-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 700;
  line-height: 1.1;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.4s ease;
}

.hero-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 14px;
  color: var(--text-2);
  font-family: 'Space Grotesk', sans-serif;
}

.hero-meta .meta-sep {
  color: var(--text-3);
}

.hero-meta .meta-rating {
  color: var(--yellow);
  font-weight: 600;
}

.hero-meta .meta-badge {
  padding: 2px 8px;
  border: 1px solid var(--border-hi);
  border-radius: var(--r-sm);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
}

.hero-overview {
  max-width: 560px;
  font-size: 14px;
  color: var(--text-2);
  -webkit-line-clamp: 3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

/* ── Hero Sidebar ── */
.hero-sidebar {
  background: rgba(8, 9, 14, 0.6);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  border-radius: var(--r-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-self: flex-end;
}

.hero-sidebar h3 {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.sidebar-item {
  display: flex;
  gap: 12px;
  cursor: pointer;
  border-radius: var(--r-sm);
  padding: 6px;
  transition: background 0.15s;
}

.sidebar-item:hover {
  background: var(--surface-2);
}

.sidebar-thumb-wrap {
  position: relative;
  width: 72px;
  height: 48px;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  overflow: hidden;
}

.sidebar-thumb {
  width: 72px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--r-sm);
}

.sidebar-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.2s;
  font-size: 14px;
  color: white;
}

.sidebar-item:hover .sidebar-play-icon {
  opacity: 1;
}

.sidebar-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
}

.sidebar-title {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-meta {
  font-size: 11px;
  color: var(--text-3);
}

/* ── Hero Dots ── */
.hero-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 3;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.hero-dot.active {
  background: var(--red);
  width: 24px;
  border-radius: 4px;
  box-shadow: var(--red-shadow);
}

/* ── Progress Bar ── */
.hero-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border);
  z-index: 3;
}

.hero-progress-fill {
  height: 100%;
  background: var(--red);
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: var(--red-shadow);
}

/* ── Genre Pills ── */
.genre-pills-wrap {
  position: sticky;
  top: var(--nav-h);
  z-index: 100;
  background: linear-gradient(to bottom, var(--bg) 80%, transparent);
  padding: 12px 0 4px;
  border-bottom: 1px solid var(--border);
}

.genre-pills {
  display: flex;
  gap: 8px;
  padding: 0 40px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.genre-pills::-webkit-scrollbar {
  display: none;
}

.pill {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.pill:hover {
  color: var(--text-1);
  border-color: var(--border-hi);
  background: var(--surface-3);
}

.pill.active {
  color: var(--red);
  border-color: var(--red-border);
  background: var(--red-dim);
  box-shadow: var(--red-shadow);
}

/* ── Main Content ── */
.main-content {
  padding: 24px 0 60px;
}

/* ── Content Row ── */
.content-row {
  margin-bottom: 32px;
  padding: 0 40px;
}

.row-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.row-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-1);
  flex: 1;
}

.view-all {
  font-size: 13px;
  color: var(--text-2);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  transition: color 0.15s;
  white-space: nowrap;
}

.view-all:hover {
  color: var(--red);
}

.row-nav {
  display: flex;
  gap: 6px;
}

.row-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
}

.row-btn:hover:not(:disabled) {
  background: var(--surface-3);
  border-color: var(--border-hi);
  color: var(--text-1);
}

.row-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ── Row Track (carousel container) ── */
.row-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 8px;
}

.row-track::-webkit-scrollbar {
  display: none;
}

/* ── Top 10 Ranked ── */
.row-track--ranked .card-wrapper {
  position: relative;
}

.rank-number {
  position: absolute;
  bottom: -4px;
  left: -12px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  color: var(--surface-3);
  -webkit-text-stroke: 2px var(--text-3);
  z-index: 2;
  user-select: none;
  pointer-events: none;
}

.rank-number.rank-top3 {
  color: transparent;
  -webkit-text-stroke: 2px var(--red);
  text-shadow: 0 0 20px rgba(255, 23, 68, 0.4);
}

/* ── Skeleton placeholders dalam row ── */
.skeleton-row-cards {
  display: flex;
  gap: 12px;
}

/* ── Hero Skeleton ── */
#heroSkeleton {
  position: absolute;
  inset: 0;
  z-index: 10;
  border-radius: 0;
  display: none;
}

#heroSkeleton.visible {
  display: block;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  .hero-section {
    min-height: 320px;
  }

  .hero-content {
    grid-template-columns: 1fr;
    padding: 0 16px 24px;
  }

  .hero-sidebar {
    display: none;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-overview {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }

  .genre-pills {
    padding: 0 16px;
  }

  .content-row {
    padding: 0 16px;
  }

  .hero-gradient-left {
    width: 100%;
    background: linear-gradient(to top, var(--bg) 30%, rgba(8,9,14,0.5) 100%);
  }
}

@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-ghost {
    width: 100%;
    justify-content: center;
  }
}
