/* ============================================
   RESPONSIVE DESIGN - Netflix Clone
   ============================================ */

/* Large desktops */
@media (max-width: 1400px) {
  .navbar { padding: 16px 40px; }
  .hero { padding: 0 40px; }
  .row { padding: 0 40px; }
}

/* Small desktops / Large tablets */
@media (max-width: 1200px) {
  .navbar { padding: 14px 30px; }
  .hero { padding: 0 30px; }
  .row { padding: 0 30px; }
  
  .hero-content { max-width: 45%; min-width: 400px; }
  
  .card { width: 165px; }
  .card-poster { width: 165px; }
}

/* Tablet */
@media (max-width: 1024px) {
  .navbar { padding: 12px 25px; gap: 15px; }
  .nav-left { gap: 20px; }
  .nav-links { gap: 18px; }
  
  .hero {
    height: 75vh;
    min-height: 550px;
    padding: 0 25px;
  }
  
  .hero-content { max-width: 60%; min-width: 340px; }
  .hero-title { font-size: clamp(2rem, 5vw, 3.5rem); }
  .hero-overview { font-size: 15px; }
  
  .row { padding: 0 25px; }
  
  .card { width: 155px; }
  .card-poster { width: 150px; }
  
  .modal-hero {
    height: 360px;
    padding: 30px;
  }
  
  .modal-details {
    grid-template-columns: 1fr;
    padding: 20px 25px;
    gap: 20px;
  }
  
  .explore-all { opacity: 1; }
}

/* Mobile Landscape / Small Tablet */
@media (max-width: 768px) {
  .navbar {
    padding: 12px 4%;
  }
  
  .logo { font-size: 26px; }
  
  .nav-links {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    flex-direction: column;
    padding: 20px;
    gap: 0;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
  }
  
  .nav-links.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  
  .nav-links a {
    font-size: 15px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    display: block;
    width: 100%;
  }
  
  .nav-links li:last-child a {
    border-bottom: none;
  }

  .nav-links li {
    width: 100%;
  }

  /* Keep mobile nav scrollable for long menus */
  .nav-links.active {
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Hide hero indicators on mobile to avoid overlapping menu */
  .nav-links.active ~ .hero .hero-indicators,
  body:has(.nav-links.active) .hero-indicators {
    display: none;
  }
  
  .menu-toggle { display: block; }
  .nav-left { gap: 15px; }
  .nav-right { gap: 14px; }
  
  /* Hero */
  .hero {
    height: 70vh;
    min-height: 500px;
    padding: 0 5%;
  }
  
  .hero-content {
    max-width: 100%;
    min-width: 0;
  }
  
  .hero::before {
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 60%, rgba(0,0,0,0.85) 100%);
  }
  
  .hero-title {
    font-size: clamp(1.8rem, 7vw, 2.6rem);
  }
  
  .hero-overview {
    font-size: 14px;
    margin-bottom: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .hero-meta {
    font-size: 12px;
    gap: 10px;
  }
  
  .hero-actions { gap: 8px; flex-wrap: wrap; }
  
  .btn {
    padding: 10px 18px;
    font-size: 14px;
    min-height: 44px;
  }
  
  .btn i { font-size: 18px; }
  
  .hero-indicators {
    bottom: 132px;
    right: 4%;
    max-width: calc(100vw - 24px);
    padding: 5px 7px;
    gap: 6px;
  }

  .indicator {
    width: clamp(16px, 5.5vw, 22px);
    height: 3px;
    min-width: 14px;
  }

  .indicator.active {
    width: clamp(24px, 8vw, 34px);
  }
  
  /* Rows */
  .row {
    padding: 0 4%;
    margin-bottom: 28px;
  }
  
  .row-title { font-size: 16px; }
  
  .card { width: 145px; }
  .card-poster { width: 125px; }
  
  .card:hover { transform: scale(1.06); }
  .card:hover .card-info { opacity: 1; }
  
  .card-info h3 { font-size: 12px; }
  .card-meta { font-size: 10px; gap: 6px; }
  
  .btn-icon {
    width: 44px;
    height: 44px;
    font-size: 14px;
  }
  
  .scroll-btn { display: none; }
  
  /* Modal */
  .modal { padding: 0; }
  
  .modal-content {
    border-radius: 0;
    min-height: 100vh;
    margin: 0;
    max-width: 100%;
  }
  
  .modal-hero {
    height: 280px;
    padding: 20px;
  }
  
  .modal-hero h1 {
    font-size: 1.8rem;
    margin-bottom: 14px;
  }
  
  .modal-actions { gap: 8px; }
  
  .modal-actions .btn {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  .btn-circle {
    width: 44px;
    height: 44px;
    font-size: 16px;
  }
  
  .modal-details {
    padding: 20px;
    gap: 15px;
  }
  
  .modal-overview { font-size: 15px; }
  
  /* Search */
  .search-container {
    padding: 90px 4% 40px;
  }
  
  .search-bar {
    font-size: 16px;
    padding: 14px 50px 14px 20px;
  }
  
  .search-icon-big {
    right: 20px;
    font-size: 18px;
  }
  
  .search-results {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }
  
  /* Page title */
  .page-title-section {
    padding: 90px 4% 15px;
  }
  
  .page-title { font-size: 26px; }
  
  .page-hero {
    height: 50vh;
    min-height: 300px;
  }
  
  /* Trailer modal */
  .trailer-modal { padding: 10px; }
  
  /* Footer */
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Toast */
  .toast {
    font-size: 13px;
    padding: 12px 18px;
    max-width: 90%;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .logo { font-size: 22px; }
  
  .hero {
    height: 65vh;
    min-height: 450px;
  }
  
  .hero-badge { font-size: 12px; margin-bottom: 12px; }
  .n-logo { width: 22px; height: 22px; font-size: 16px; }
  
  .hero-title { font-size: clamp(1.5rem, 8vw, 2.2rem); }
  
  .hero-overview {
    font-size: 13px;
    -webkit-line-clamp: 2;
  }

  .hero-indicators {
    bottom: 118px;
    right: 3.5%;
    max-width: calc(100vw - 18px);
    padding: 4px 6px;
    gap: 5px;
  }

  .indicator {
    width: clamp(14px, 6vw, 18px);
    height: 3px;
    min-width: 12px;
  }

  .indicator.active {
    width: clamp(20px, 9vw, 28px);
  }
  
  .btn {
    padding: 8px 14px;
    font-size: 13px;
  }
  
  .btn i { font-size: 16px; }
  
  .card { width: 130px; }
  .card-poster { width: 120px; }
  
  .search-results {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  .modal-hero {
    height: 220px;
    padding: 16px;
  }
  
  .modal-hero h1 { font-size: 1.5rem; }
  
  .page-title { font-size: 22px; }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Very small */
@media (max-width: 360px) {
  .card { width: 116px; }
  .nav-links a { font-size: 14px; }
  .hero-meta { gap: 8px; font-size: 11px; }
  .hd-badge { font-size: 10px; padding: 1px 6px; }
}

/* Desktop large screens */
@media (min-width: 1600px) {
  .card { width: 190px; }
  .card-poster { width: 200px; }
  .hero-content { max-width: 40%; }
}

/* Extra large */
@media (min-width: 1920px) {
  .card { width: 210px; }
  .hero { height: 90vh; }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .card:hover { transform: none; }
}

/* Print */
@media print {
  .navbar, .footer, .btn, .scroll-btn { display: none !important; }
  body { background: white; color: black; }
}
