/* ==========================================================================
   RESET + VARIABLES
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #c1121f;
  --primary-dark: #8f0e18;
  --light: #f8f9fa;
  --dark: #212529;
  --gray: #6c757d;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--dark);
  line-height: 1.6;
  background: black;
  background-repeat: round;
  align-content: center;
}

/* ==========================================================================
   HEADER + NAVEGACIÓN
   ========================================================================== */
header {
  background: var(--dark);
  color: white;
  padding: 1rem;
  position: static;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--primary);
  text-decoration: none;
}

nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  transition: all 0.2s;
}

nav a:hover,
nav a.active {
  background: var(--primary);
  color: white;
}

/* Menú hamburguesa para móvil */
.menu-toggle {
  display: none;
  font-size: 1.8rem;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}
  
    h1 {
      text-align: center;
      font-size: clamp(2.8rem, 7vw, 5.5rem);
      font-weight: 900;
      letter-spacing: -2px;
      margin-bottom: 1.5rem;
      background: linear-gradient(90deg, #f43f5e, #c084fc, #7dd3fc);
      -webkit-text-fill-color: transparent;
    }

    .subtitle {
      text-align: center;
      font-size: 1.4rem;
      opacity: 0.8;
      margin-bottom: 3.5rem;
    }

    .billboard-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(160px, 3fr));
      gap: 2.5rem;
      padding: 1rem 0;
    }

    .movie-card {
      position: relative;
      aspect-ratio: 2 / 3;
      border-radius: 16px;
      overflow: hidden;
      background: var(--card);
      box-shadow: 0 8px 35px rgba(0,0,0,0.6);
      transition: all 0.4s ease;
      cursor: pointer;
    }

    .movie-card:hover {
      transform: translateY(-18px) scale(1.04);
      box-shadow: 0 30px 70px rgba(225,29,72,0.35);
    }

    .poster {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.7s ease;
    }

    .movie-card:hover .poster {
      transform: scale(1.08);
    }

    .info {
      position: absolute;
      inset: 0;
      background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 60%);
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      padding: 1.8rem;
      opacity: 0;
      transition: opacity 0.4s ease;
    }

    .movie-card:hover .info {
      opacity: 1;
    }

    .title {
      font-size: 1.6rem;
      font-weight: 700;
      margin-bottom: 0.5rem;
      text-shadow: 0 2px 8px black;
      color: white;
    }

    .genre {
      font-size: 1rem;
      opacity: 0.9;
      margin-bottom: 0.8rem;
      color: white;
    }

    .rating {
      font-size: 1.1rem;
      font-weight: bold;
      color: #fbbf24;
    }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
  }

  nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    margin-top: 1rem;
  }

  nav ul.show {
    display: flex;
  }

  .menu-toggle {
    display: block;
    position: absolute;
    right: 1.5rem;
    top: 1.8rem;
  }
}

h2{
  color: white;
  background: #212529;
  opacity: 0.75;
}
