/* ============================================================
   HOME PAGE – GLOBAL WRAPPER
   Dark cinematic look for news + movies + trailers + live
============================================================ */

.home-page {
  min-height: 100vh;
  padding: 0 1.25rem 3rem;
  background: radial-gradient(circle at top, #020617, #020617 40%, #020617)
    fixed;
  color: #e5e7eb; /* slate-200 */
}

/* Make content width friendly on large screens */
@media (min-width: 1024px) {
  .home-page {
    padding-left: 2.5rem;
    padding-right: 2.5rem;
  }
}

/* ============================================================
   HERO SECTION
============================================================ */

.home-hero {
  position: relative;
  margin-top: 1.5rem;
  margin-bottom: 2.5rem;
  border-radius: 1.5rem;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: stretch;
  isolation: isolate;
}

/* Background image (hero overlay) with Ken Burns animation */
.home-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(4px) brightness(0.7);
  transform: scale(1.05);
  z-index: -2;
  animation: homeHeroKenBurns 18s ease-in-out infinite alternate;
}

@keyframes homeHeroKenBurns {
  0% {
    transform: scale(1.05) translate3d(0, 0, 0);
    filter: blur(4px) brightness(0.7);
  }
  50% {
    transform: scale(1.08) translate3d(-8px, -6px, 0);
    filter: blur(4px) brightness(0.78);
  }
  100% {
    transform: scale(1.1) translate3d(6px, 4px, 0);
    filter: blur(4px) brightness(0.7);
  }
}

.home-hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(
      circle at top left,
      rgba(245, 178, 0, 0.3),
      transparent 55%
    ),
    radial-gradient(
      circle at bottom right,
      rgba(15, 23, 42, 0.9),
      rgba(15, 23, 42, 0.98)
    );
  z-index: -1;
}

.home-hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 1.75rem;
  padding: 1.8rem 1.6rem;
}

/* On small screens, stack hero columns */
@media (max-width: 768px) {
  .home-hero-inner {
    grid-template-columns: minmax(0, 1fr);
    padding: 1.6rem 1.25rem;
  }
}

/* HERO – COPY COLUMN */

.home-hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.9rem;
}

.home-hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.22rem 0.85rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  border: 1px solid rgba(220, 252, 231, 0.6); /* green-100 */
  background-color: rgba(22, 163, 74, 0.2); /* green-600 */
  color: #ecfdf5;
}

.home-hero-title {
  font-family: Poppins, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  font-size: 2rem;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin: 0;
}

@media (min-width: 640px) {
  .home-hero-title {
    font-size: 2.4rem;
  }
}

@media (min-width: 1024px) {
  .home-hero-title {
    font-size: 2.9rem;
  }
}

.home-hero-subtitle {
  margin: 0.1rem 0 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #d1d5db; /* slate-300 */
  max-width: 40rem;
}

.home-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.8rem;
  color: #9ca3af; /* slate-400 */
}

.home-hero-meta span {
  white-space: nowrap;
}

.home-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 0.75rem;
}

/* HERO BUTTONS */

.home-hero-btn-primary,
.home-hero-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.6rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease,
    background 0.15s ease, border-color 0.15s ease;
}

.home-hero-btn-primary {
  background: linear-gradient(135deg, #f5b200, #f97316);
  color: #020617;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
}

.home-hero-btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.7);
}

.home-hero-btn-secondary {
  background: rgba(15, 23, 42, 0.7);
  color: #e5e7eb;
  border-color: rgba(148, 163, 184, 0.6); /* slate-400 */
}

.home-hero-btn-secondary:hover {
  background: rgba(15, 23, 42, 0.95);
}

/* HERO – MEDIA COLUMN */

.home-hero-media {
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-hero-media-poster {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
  background: radial-gradient(circle at top, #111827, #020617);
  max-width: 380px;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.home-hero-media-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Hero media badges (LIVE / MOVIE / TRAILER) */

.home-hero-media-badge {
  position: absolute;
  top: 0.9rem;
  left: 0.9rem;
  padding: 0.25rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 0.999rem;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(248, 250, 252, 0.4);
  color: #f5b200;
}

/* On narrow screens, hero media goes below copy */
@media (max-width: 768px) {
  .home-hero {
    min-height: auto;
  }

  .home-hero-media {
    margin-top: 1.25rem;
  }

  .home-hero-media-poster {
    max-width: 100%;
  }
}

/* ============================================================
   MAIN LAYOUT: COLUMN + SIDEBAR
============================================================ */

.home-main-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.1fr);
  gap: 2rem;
}

/* Single column on smaller screens */
@media (max-width: 1024px) {
  .home-main-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ============================================================
   SECTIONS – GENERAL
============================================================ */

.home-section {
  margin-bottom: 2rem;
}

.home-section--full {
  margin-top: 1rem;
}

/* Section header */

.home-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1rem;
  gap: 1rem;
}

.home-section-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f5b200;
}

.home-section-link {
  font-size: 0.8rem;
  color: #9ca3af;
  text-decoration: none;
}

.home-section-link:hover {
  color: #e5e7eb;
}

/* ============================================================
   GENERIC HORIZONTAL CAROUSEL
   (Used for Latest Trailers + Featured Movies)
============================================================ */

.home-carousel {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
}

/* Track: horizontal flex row, swipeable on mobile */
.home-carousel-track {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.1rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  padding-bottom: 0.2rem;
  flex: 1 1 auto;
  scroll-snap-type: x mandatory;
}

.home-carousel-track::-webkit-scrollbar {
  display: none; /* Chrome / Safari */
}

/* Each card snaps nicely */
.home-trailer-card,
.home-movie-card {
  scroll-snap-align: start;
}

/* Navigation buttons */
.home-carousel-btn {
  flex: 0 0 auto;
  align-self: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: radial-gradient(circle at top, #020617, #020617);
  color: #e5e7eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease,
    transform 0.12s ease;
}

.home-carousel-btn:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: #f5b200;
  transform: translateY(-1px);
}

/* Hide buttons on very small screens (swipe only) */
@media (max-width: 640px) {
  .home-carousel-btn {
    display: none;
  }
}

/* Adjust card widths so multiple are visible on desktop */
.home-trailer-card {
  flex: 0 0 230px;
}

@media (min-width: 1024px) {
  .home-trailer-card {
    flex: 0 0 260px;
  }
}

/* Movie cards as carousel items */
.home-movie-card {
  flex: 0 0 170px;
}

@media (min-width: 768px) {
  .home-movie-card {
    flex: 0 0 190px;
  }
}

@media (min-width: 1280px) {
  .home-movie-card {
    flex: 0 0 210px;
  }
}

/* ============================================================
   TOP STORIES (NEWS)
============================================================ */

.home-top-stories-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.3fr);
  gap: 1.5rem;
}

/* On smaller screens, stack */
@media (max-width: 900px) {
  .home-top-stories-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.home-top-story-card {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 1.1rem;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.8); /* slate-700 */
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.home-top-story-card--large {
  grid-row: span 2;
}

/* Image */

.home-top-story-image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.home-top-story-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.home-top-story-card:hover .home-top-story-image-wrapper img {
  transform: scale(1.03);
}

/* Badge on the image */

.home-top-story-badge {
  position: absolute;
  top: 0.8rem;
  left: 0.8rem;
  padding: 0.22rem 0.7rem;
  font-size: 0.7rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  color: #f5b200;
  border: 1px solid rgba(148, 163, 184, 0.7);
}

/* Content */

.home-top-story-content {
  padding: 0.9rem 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.home-top-story-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #9ca3af;
}

.home-top-story-title {
  font-size: 0.98rem;
  margin: 0;
}

.home-top-story-title a {
  text-decoration: none;
  color: #f9fafb;
}

.home-top-story-title a:hover {
  color: #f5b200;
}

.home-top-story-meta {
  font-size: 0.78rem;
  color: #9ca3af;
}

/* ============================================================
   LATEST TRAILERS – CARD VISUALS
============================================================ */

.home-trailer-card {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 0.9rem;
  border: 1px solid rgba(51, 65, 85, 0.85);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.home-trailer-thumb-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.home-trailer-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.home-trailer-card:hover .home-trailer-thumb-wrapper img {
  transform: scale(1.04);
}

/* Duration pill (bottom-right) */

.home-trailer-duration {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  padding: 0.1rem 0.45rem;
  border-radius: 0.4rem;
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.85);
  color: #e5e7eb;
}

/* Tag (top-left) */

.home-trailer-tag {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  padding: 0.1rem 0.45rem;
  border-radius: 0.4rem;
  font-size: 0.7rem;
  background: rgba(245, 158, 11, 0.9);
  color: #111827;
}

.home-trailer-body {
  padding: 0.65rem 0.7rem 0.8rem;
}

.home-trailer-category {
  font-size: 0.75rem;
  color: #9ca3af;
}

.home-trailer-title {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
}

.home-trailer-title a {
  text-decoration: none;
  color: #f9fafb;
}

.home-trailer-title a:hover {
  color: #f5b200;
}

/* ============================================================
   BLOG GRID
============================================================ */

.home-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
}

.home-blog-card {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 0.9rem;
  overflow: hidden;
  border: 1px solid rgba(51, 65, 85, 0.8);
  display: flex;
  flex-direction: column;
}

.home-blog-thumb-wrapper {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.home-blog-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}

.home-blog-card:hover .home-blog-thumb-wrapper img {
  transform: scale(1.03);
}

.home-blog-tag {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  padding: 0.1rem 0.6rem;
  font-size: 0.7rem;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.9); /* sky-500 */
  color: #0f172a;
}

.home-blog-body {
  padding: 0.8rem 0.9rem 0.9rem;
}

.home-blog-title {
  margin: 0;
  font-size: 0.9rem;
}

.home-blog-title a {
  color: #f9fafb;
  text-decoration: none;
}

.home-blog-title a:hover {
  color: #f5b200;
}

.home-blog-meta {
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

/* ============================================================
   SIDEBAR – LIVE NOW
============================================================ */

.home-sidebar-section {
  background: rgba(15, 23, 42, 0.95);
  border-radius: 1.1rem;
  border: 1px solid rgba(51, 65, 85, 0.9);
  padding: 1rem 1rem 1.2rem;
}

.home-sidebar-section + .home-sidebar-section {
  margin-top: 1.2rem;
}

.home-live-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.home-live-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 0.6rem;
}

.home-live-item--featured {
  background: radial-gradient(
    circle at top,
    rgba(245, 158, 11, 0.1),
    transparent
  );
  padding: 0.35rem;
  border-radius: 0.85rem;
}

.home-live-thumb-wrapper {
  position: relative;
  border-radius: 0.7rem;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.home-live-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* LIVE pill */

.home-live-pill {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  padding: 0.1rem 0.45rem;
  font-size: 0.68rem;
  border-radius: 999px;
  background: #dc2626; /* red-600 */
  color: #f9fafb;
  font-weight: 600;
}

/* Live text */

.home-live-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  justify-content: center;
}

.home-live-title {
  margin: 0;
  font-size: 0.86rem;
}

.home-live-title a {
  color: #f9fafb;
  text-decoration: none;
}

.home-live-title a:hover {
  color: #f5b200;
}

.home-live-meta {
  font-size: 0.76rem;
  color: #9ca3af;
}

.home-live-viewers {
  font-size: 0.76rem;
  color: #facc15; /* yellow-400 */
}

/* ============================================================
   SIDEBAR – TRENDING TAGS
============================================================ */

.home-tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.home-tag-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.8);
  text-decoration: none;
}

.home-tag-chip:hover {
  background: rgba(15, 23, 42, 0.9);
}

/* ============================================================
   SIDEBAR – NEWSLETTER
============================================================ */

.home-newsletter-text {
  font-size: 0.84rem;
  color: #d1d5db;
  margin-bottom: 0.75rem;
}

.home-newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 0.45rem;
}

.home-newsletter-input {
  border-radius: 0.7rem;
  border: 1px solid rgba(75, 85, 99, 0.9);
  padding: 0.55rem 0.7rem;
  font-size: 0.85rem;
  background: #020617;
  color: #e5e7eb;
}

.home-newsletter-input::placeholder {
  color: #6b7280; /* slate-500 */
}

.home-newsletter-button {
  border-radius: 0.7rem;
  border: none;
  padding: 0.55rem 0.7rem;
  font-size: 0.86rem;
  font-weight: 600;
  background: linear-gradient(135deg, #f5b200, #f97316);
  color: #020617;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
}

.home-newsletter-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
}

.home-newsletter-note {
  font-size: 0.7rem;
  color: #9ca3af;
}

/* ============================================================
   FEATURED MOVIES – CARD VISUALS
============================================================ */

.home-movie-card {
  background: rgba(15, 23, 42, 0.95);
  border-radius: 1rem;
  border: 1px solid rgba(51, 65, 85, 0.9);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.home-movie-poster-wrapper {
  position: relative;
  aspect-ratio: 2 / 3; /* vertical poster */
  overflow: hidden;
}

.home-movie-poster-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.home-movie-card:hover .home-movie-poster-wrapper img {
  transform: scale(1.05);
}

/* Movie badge */

.home-movie-badge {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  padding: 0.1rem 0.6rem;
  font-size: 0.7rem;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.95); /* amber-400 */
  color: #0f172a;
}

/* Rating tag */

.home-movie-rating {
  position: absolute;
  bottom: 0.7rem;
  right: 0.7rem;
  padding: 0.1rem 0.5rem;
  font-size: 0.7rem;
  border-radius: 0.4rem;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
}

/* Movie text */

.home-movie-body {
  padding: 0.7rem 0.8rem 0.9rem;
}

.home-movie-title {
  margin: 0;
  font-size: 0.9rem;
}

.home-movie-title a {
  color: #f9fafb;
  text-decoration: none;
}

.home-movie-title a:hover {
  color: #f5b200;
}

.home-movie-meta {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: #9ca3af;
}

.home-movie-tagline {
  margin-top: 0.4rem;
  font-size: 0.8rem;
  color: #d1d5db;
}

/* ============================================================
   RESPONSIVE TWEAKS
============================================================ */

@media (max-width: 640px) {
  .home-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .home-section-title {
    font-size: 0.95rem;
  }

  .home-section-link {
    font-size: 0.78rem;
  }
}
