/* ============================================================
   Animeverse — Homepage Styles (homepage/homepage.css)
   Uses the color tokens defined in /shared/layout.css (:root)
   ============================================================ */

.av-home {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
}

/* ---------- Hero Carousel ---------- */

.av-hero {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  margin: 1.25rem 0 2.5rem;
  aspect-ratio: 16 / 7;
  background: var(--av-surface);
}

.av-hero-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.av-hero-slide {
  flex: 0 0 100%;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  color: var(--av-text);
  text-decoration: none;
}

.av-hero-slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent 60%);
  z-index: 0;
}

.av-hero-caption,
.av-hero-slide .av-badge {
  position: relative;
  z-index: 1;
}

.av-hero-caption h3 {
  margin: 0.4rem 0 0;
  font-size: 1.3rem;
}

.av-hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  z-index: 2;
}
.av-hero-arrow-left { left: 12px; }
.av-hero-arrow-right { right: 12px; }

.av-hero-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}

.av-hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}
.av-hero-dot.is-active {
  background: var(--av-spark);
}

/* ---------- Section headings ---------- */

.av-section { margin-bottom: 2.5rem; }
.av-section h2 {
  color: var(--av-text);
  font-size: 1.15rem;
  margin-bottom: 1rem;
}

/* ---------- Grid + Poster Cards ---------- */

.av-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 1rem;
}

.av-card {
  text-decoration: none;
  color: var(--av-text);
  display: block;
}

/* Portrait poster (New Episode / All-Time Classic) — 2:3 ratio */
.av-card-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  background-color: var(--av-surface);
  overflow: hidden;
}

.av-card-info { padding: 0.4rem 0.1rem; }
.av-card-title {
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.25;
}
.av-card-sub {
  font-size: 0.75rem;
  color: var(--av-text-muted);
  margin: 0.15rem 0 0;
}

/* Rectangular poster with blurred-stretched sides (Trending) */
.av-card-poster-rect {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}
.av-card-poster-blur {
  position: absolute;
  inset: -12px;
  background-size: cover;
  background-position: center;
  filter: blur(16px) brightness(0.55);
  transform: scale(1.15);
}
.av-card-poster-sharp {
  position: absolute;
  inset: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

/* ---------- Badges ---------- */

.av-badge {
  position: absolute;
  top: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  z-index: 1;
}
.av-badge-accent {
  left: 8px;
  background: var(--av-accent-2);
  color: white;
}
.av-badge-status {
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
}

/* ---------- Pagination ---------- */

.av-pagination {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1rem;
}
.av-page-btn,
.av-page-next {
  background: var(--av-surface);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--av-text-muted);
  border-radius: 6px;
  padding: 0.3rem 0.65rem;
  cursor: pointer;
  font-size: 0.85rem;
}
.av-page-btn.is-active {
  background: var(--av-accent);
  color: white;
}

/* ---------- Trending ---------- */

.av-trending-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.av-tab {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--av-text-muted);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  cursor: pointer;
  font-size: 0.85rem;
}
.av-tab.is-active {
  background: var(--av-accent);
  color: white;
  border-color: transparent;
}

.av-trending-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.av-trending-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.av-trending-rank {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--av-text-muted);
  width: 2rem;
  text-align: center;
  flex-shrink: 0;
}
.av-trending-item .av-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.av-trending-item .av-card-poster-rect {
  width: 160px;
  flex-shrink: 0;
  aspect-ratio: 16/9;
}
