/* ==========================================================================
   VideoHub - Responsive Media Queries
   Mobile-First & Fluid Breakpoints
   ========================================================================== */

/* Large Tablets & Small Desktops (max-width: 1024px) */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.8rem;
  }

  .platform-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

/* Tablets (max-width: 768px) */
@media (max-width: 768px) {
  .site-header {
    height: 68px;
  }

  .nav-inner {
    height: 68px;
  }

  /* Hamburger & Mobile Navigation */
  .hamburger-btn {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 68px;
    left: 0;
    width: 100%;
    height: calc(100vh - 68px);
    background: var(--bg-primary);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 3rem 1.5rem;
    gap: 2rem;
    transform: translateX(100%);
    transition: transform var(--transition-normal);
    z-index: 99;
    border-bottom: 1px solid var(--glass-border);
  }

  .nav-menu.open {
    transform: translateX(0);
  }

  .nav-link {
    font-size: 1.25rem;
  }

  /* Hero adjustments */
  .hero-section {
    padding: 3.5rem 0 2rem;
  }

  .hero-title {
    font-size: 2.3rem;
    letter-spacing: -0.5px;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .search-box-glass {
    flex-direction: column;
    border-radius: var(--radius-lg);
    padding: 1rem;
    gap: 0.75rem;
  }

  .search-input {
    width: 100%;
    text-align: center;
    padding: 0.5rem 0;
  }

  .search-actions-group {
    width: 100%;
    justify-content: stretch;
  }

  .btn-paste, .btn-search {
    flex: 1;
    justify-content: center;
  }

  /* Platform Cards (2 per row on tablets) */
  .platform-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Downloader Page adjustments */
  .downloader-title {
    font-size: 2.2rem;
  }

  .result-media-header {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .result-thumbnail-wrap {
    max-width: 400px;
    margin: 0 auto;
  }

  /* Format Tables Horizontal Scroll */
  .formats-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .formats-table th,
  .formats-table td {
    padding: 0.75rem 0.85rem;
    font-size: 0.85rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* Mobile Phones (max-width: 480px) */
@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero-title {
    font-size: 1.9rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  /* 1 card per row on mobile phones */
  .platform-grid {
    grid-template-columns: 1fr;
  }

  .features-grid,
  .steps-container {
    grid-template-columns: 1fr;
  }

  .toast-container {
    right: 1rem;
    left: 1rem;
    width: auto;
    bottom: 1rem;
  }

  .history-list {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* Touch Devices (Disable tilt rotation on touch for smooth scroll) */
@media (hover: none) and (pointer: coarse) {
  .card-3d-wrapper {
    transform: none !important;
  }
}
