﻿/* =========================================================
   DisFlix - Layout Premium Estilo Streaming
   Troque cores globais no :root
   ========================================================= */
:root {
  --bg-main: #020712;
  --bg-soft: #061130;
  --surface: rgba(8, 18, 44, 0.8);
  --surface-strong: rgba(6, 14, 34, 0.92);
  --text-main: #f3f8ff;
  --text-soft: #a9bddc;
  --line-soft: rgba(126, 206, 255, 0.18);
  --line-strong: rgba(136, 221, 255, 0.45);
  --blue-neon: #25b5ff;
  --blue-electric: #176bff;
  --blue-crystal: #90e5ff;
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --shadow-premium: 0 16px 42px rgba(2, 15, 45, 0.52);
  --glow-premium: 0 0 0 1px rgba(136, 220, 255, 0.15), 0 14px 38px rgba(4, 35, 102, 0.45);
  --max-width: 1240px;
  --ease-premium: cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================================
   Reset + Base
   ========================================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", sans-serif;
  min-height: 100vh;
  color: var(--text-main);
  line-height: 1.55;
  overflow-x: hidden;
  background:
    radial-gradient(1200px 620px at 15% -16%, rgba(40, 128, 255, 0.21), transparent 62%),
    radial-gradient(980px 520px at 88% -20%, rgba(16, 170, 255, 0.18), transparent 60%),
    linear-gradient(180deg, #010611 0%, #020a1c 45%, #01050e 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: repeating-linear-gradient(
    to bottom,
    rgba(170, 226, 255, 0.025) 0,
    rgba(170, 226, 255, 0.025) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity: 0.18;
}

body.nav-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(var(--max-width), calc(100% - 2.8rem));
  margin: 0 auto;
}

.section {
  position: relative;
  padding: 5.9rem 0;
}

.section-contrast {
  background:
    linear-gradient(180deg, rgba(6, 13, 31, 0.82), rgba(4, 10, 24, 0.9)),
    radial-gradient(circle at 92% 8%, rgba(37, 167, 255, 0.12), transparent 38%);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.section-head {
  margin-bottom: 1.9rem;
}

.section-head h2 {
  font-size: clamp(1.7rem, 1.6vw + 1.1rem, 2.6rem);
  line-height: 1.2;
  letter-spacing: 0.01em;
  margin-bottom: 0.55rem;
  font-weight: 800;
}

.section-head p {
  color: var(--text-soft);
  max-width: 760px;
}

/* =========================================================
   Navbar fixa com transição elegante
   ========================================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 60;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.32s ease, border-color 0.32s ease, backdrop-filter 0.32s ease, box-shadow 0.32s ease;
}

.site-header.scrolled {
  background: rgba(3, 10, 24, 0.86);
  border-bottom-color: rgba(130, 215, 255, 0.18);
  backdrop-filter: blur(12px) saturate(130%);
  box-shadow: 0 12px 28px rgba(2, 10, 30, 0.45);
}

.header-wrap {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 190px;
  gap: 0.5rem;
}

.brand-logo {
  width: auto;
  height: 48px;
  max-width: 188px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(81, 190, 255, 0.42));
}

.brand-text {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: linear-gradient(96deg, #9ce7ff 8%, #2b90ff 56%, #7dd9ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.main-nav a {
  font-size: 0.81rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #c0d8fa;
  padding: 0.46rem 0.12rem;
  position: relative;
  transition: color 0.24s ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.1rem;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue-neon), var(--blue-electric));
  transition: width 0.3s var(--ease-premium);
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a.active {
  color: #ecf8ff;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after,
.main-nav a.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(8, 20, 48, 0.86);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #c8ebff;
  transition: transform 0.28s var(--ease-premium), opacity 0.2s ease;
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* =========================================================
   Botões
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.78rem 1.2rem;
  border: 1px solid transparent;
  font-size: 0.92rem;
  font-weight: 700;
  transition: transform 0.22s var(--ease-premium), box-shadow 0.3s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(112deg, transparent 30%, rgba(255, 255, 255, 0.24) 50%, transparent 70%);
  opacity: 0;
  transform: translateX(-130%);
  transition: transform 0.56s var(--ease-premium), opacity 0.24s ease;
}

.btn:hover::before {
  opacity: 1;
  transform: translateX(130%);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-header,
.btn-primary {
  color: #eaf8ff;
  background: linear-gradient(114deg, #1468ff 0%, #1790ff 48%, #4bc8ff 100%);
  box-shadow: 0 10px 28px rgba(17, 105, 255, 0.42);
}

.btn-secondary {
  background: rgba(8, 21, 52, 0.65);
  border-color: rgba(129, 214, 255, 0.35);
  color: #d5ecff;
}

.btn-secondary:hover {
  border-color: rgba(146, 227, 255, 0.6);
  box-shadow: 0 12px 30px rgba(4, 85, 179, 0.35);
}

/* =========================================================
   Hero Section com imagem grande + overlay gradiente
   ========================================================= */
.section-glow {
  overflow: clip;
}

.hero {
  min-height: 94vh;
  display: grid;
  align-items: center;
  position: relative;
  padding: 9rem 0 6rem;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -3;
  /* Troque a URL abaixo para sua imagem oficial do hero */
  background:
    linear-gradient(180deg, rgba(2, 8, 20, 0.46), rgba(1, 6, 16, 0.92)),
    linear-gradient(105deg, rgba(2, 10, 28, 0.8) 5%, rgba(2, 10, 28, 0.3) 45%, rgba(3, 11, 26, 0.9) 100%),
    url("https://images.unsplash.com/photo-1489599849927-2ee91cede3ba?auto=format&fit=crop&w=2200&q=80") center/cover no-repeat;
  transition: transform 0.35s ease-out;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 72% 28%, rgba(51, 176, 255, 0.22), transparent 46%);
}

.hero-content {
  text-align: center;
  max-width: 880px;
  margin: 0 auto;
  padding: 2rem 1.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(140, 221, 255, 0.22);
  background: linear-gradient(145deg, rgba(7, 19, 45, 0.62), rgba(5, 12, 29, 0.62));
  backdrop-filter: blur(5px);
  box-shadow: var(--glow-premium);
}

.hero-kicker {
  display: inline-flex;
  margin-bottom: 1rem;
  padding: 0.32rem 0.72rem;
  border: 1px solid rgba(147, 224, 255, 0.34);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #cdeeff;
  background: rgba(10, 26, 56, 0.64);
}

.hero h1 {
  font-size: clamp(2.1rem, 4.1vw + 1rem, 4.5rem);
  font-weight: 800;
  line-height: 1.07;
  margin-bottom: 1rem;
  text-wrap: balance;
  text-shadow: 0 8px 28px rgba(3, 20, 60, 0.45);
}

.hero p {
  margin: 0 auto;
  max-width: 740px;
  color: #b8cfea;
  font-size: clamp(1rem, 0.4vw + 0.95rem, 1.15rem);
}

.hero-actions {
  margin-top: 1.8rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.78rem;
}

/* =========================================================
   Carrossel horizontal estilo Netflix
   ========================================================= */
.carousel-row {
  margin-top: 2.2rem;
}

.row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.75rem;
}

.row-head h3 {
  font-size: 1.04rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.row-controls {
  display: inline-flex;
  gap: 0.45rem;
}

.carousel-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line-soft);
  background: rgba(8, 21, 49, 0.86);
  color: #ddf4ff;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.carousel-btn:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(76, 181, 255, 0.16);
}

.carousel-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.25rem;
}

.carousel-viewport::-webkit-scrollbar {
  height: 8px;
}

.carousel-viewport::-webkit-scrollbar-track {
  background: rgba(8, 19, 44, 0.45);
  border-radius: 999px;
}

.carousel-viewport::-webkit-scrollbar-thumb {
  background: rgba(132, 216, 255, 0.46);
  border-radius: 999px;
}

.carousel-track {
  display: flex;
  gap: 0.85rem;
  width: max-content;
  padding-right: 0.3rem;
}

/* =========================================================
   Cards Premium de mídia
   ========================================================= */
.media-card {
  width: clamp(156px, 16vw, 220px);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  background: var(--surface-strong);
  box-shadow: var(--shadow-premium);
  scroll-snap-align: start;
  transition: transform 0.3s var(--ease-premium), border-color 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}

.media-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 36%);
  pointer-events: none;
}

.media-card:hover {
  transform: translateY(-8px) scale(1.03);
  border-color: rgba(141, 223, 255, 0.52);
  box-shadow: 0 20px 44px rgba(3, 32, 90, 0.44), 0 0 0 2px rgba(72, 183, 255, 0.26);
}

.media-card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.media-card h4 {
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.7rem 0.62rem 0.78rem;
  line-height: 1.35;
  background: linear-gradient(180deg, rgba(10, 23, 53, 0.72), rgba(5, 13, 30, 0.92));
}

.media-trailer h4::before {
  content: "▶ Trailer";
  display: inline-block;
  margin-right: 0.38rem;
  color: #8ae2ff;
  font-size: 0.74rem;
  font-weight: 700;
}

/* =========================================================
   Seção de novidades
   ========================================================= */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.news-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--line-soft);
  background: linear-gradient(165deg, rgba(8, 22, 52, 0.86), rgba(5, 13, 30, 0.9));
  padding: 1.12rem 1.02rem;
  box-shadow: var(--shadow-premium);
  transition: transform 0.25s var(--ease-premium), border-color 0.25s ease, box-shadow 0.3s ease;
}

.news-card:hover {
  transform: translateY(-6px);
  border-color: rgba(142, 224, 255, 0.48);
  box-shadow: 0 18px 36px rgba(2, 27, 74, 0.36);
}

.news-tag {
  display: inline-flex;
  margin-bottom: 0.66rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(145, 222, 255, 0.34);
  color: #97e3ff;
  font-size: 0.72rem;
  font-weight: 700;
}

.news-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
  line-height: 1.34;
}

.news-card p {
  color: var(--text-soft);
  font-size: 0.92rem;
}

/* =========================================================
   CTA Final
   ========================================================= */
.cta-final .container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(140, 224, 255, 0.34);
  padding: 2.7rem 1.25rem;
  text-align: center;
  background:
    radial-gradient(900px 340px at 78% -32%, rgba(48, 184, 255, 0.24), transparent 58%),
    linear-gradient(160deg, rgba(8, 23, 54, 0.9), rgba(4, 11, 27, 0.96));
  box-shadow: var(--glow-premium);
}

.cta-final h2 {
  font-size: clamp(1.6rem, 2.2vw + 1rem, 2.8rem);
  line-height: 1.2;
  margin-bottom: 0.6rem;
}

.cta-final p {
  color: #bfd8f4;
  max-width: 710px;
  margin: 0 auto 1.12rem;
}

/* =========================================================
   Rodapé
   ========================================================= */
.site-footer {
  margin-top: 2.2rem;
  border-top: 1px solid var(--line-soft);
  background: linear-gradient(180deg, rgba(4, 11, 28, 0.9), rgba(1, 6, 16, 0.96));
  padding-top: 2.2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.45fr repeat(3, 1fr);
  gap: 1.2rem;
}

.site-footer h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.46rem;
}

.site-footer h4 {
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.44rem;
  color: #e0f2ff;
}

.site-footer p,
.site-footer li,
.site-footer a {
  color: #a7c2e4;
  font-size: 0.9rem;
}

.site-footer ul {
  list-style: none;
  display: grid;
  gap: 0.33rem;
}

.site-footer a:hover {
  color: #e2f4ff;
}

.footer-bottom {
  margin-top: 1.25rem;
  border-top: 1px solid rgba(132, 213, 255, 0.14);
  padding: 0.98rem 0 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

.footer-bottom a {
  color: #7fd8ff;
  font-weight: 700;
}

/* =========================================================
   Botão Voltar ao Topo
   ========================================================= */
.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(142, 223, 255, 0.42);
  background: linear-gradient(165deg, rgba(8, 28, 62, 0.96), rgba(3, 11, 29, 0.96));
  color: #e6f6ff;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(1, 15, 42, 0.46);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.24s ease, transform 0.24s ease;
  z-index: 55;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

/* =========================================================
   Reveal on scroll
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(20px) scale(0.995);
  transition: opacity 0.56s var(--ease-premium), transform 0.56s var(--ease-premium);
  transition-delay: var(--delay, 0s);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* =========================================================
   Responsividade
   ========================================================= */
@media (max-width: 1100px) {
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: 82vh;
    padding: 8rem 0 5rem;
  }

  .hero-content {
    padding: 1.65rem 1.1rem;
  }

  .section {
    padding: 5.1rem 0;
  }
}

@media (max-width: 820px) {
  .container {
    width: min(var(--max-width), calc(100% - 1.9rem));
  }

  .header-wrap {
    min-height: 72px;
  }

  .brand {
    min-width: auto;
  }

  .brand-logo {
    height: 40px;
    max-width: 150px;
  }

  .menu-toggle {
    display: inline-flex;
    order: 3;
  }

  .btn-header {
    display: none;
  }

  .main-nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    display: grid;
    gap: 0.32rem;
    padding: 0.72rem 1rem 1rem;
    background: linear-gradient(180deg, rgba(5, 13, 31, 0.97), rgba(4, 10, 24, 0.98));
    border-top: 1px solid rgba(124, 210, 255, 0.16);
    border-bottom: 1px solid rgba(124, 210, 255, 0.16);
    transform: translateY(-14px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.26s var(--ease-premium), opacity 0.2s ease;
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .main-nav a {
    font-size: 0.79rem;
    padding: 0.62rem 0.12rem;
  }

  .row-controls {
    display: none;
  }

  .hero-actions .btn {
    flex: 1;
    min-width: 145px;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(var(--max-width), calc(100% - 1.45rem));
  }

  .section {
    padding: 4.55rem 0;
  }

  .hero {
    min-height: 76vh;
    padding: 7rem 0 4.2rem;
  }

  .hero-content {
    border-radius: 20px;
    padding: 1.3rem 0.95rem;
  }

  .news-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .media-card {
    width: clamp(142px, 46vw, 190px);
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
