/* ============================================================
   BEVERLY FILMS — Mobile Override CSS  v10
   Applied to ALL pages on screens ≤ 1024px
   ============================================================ */

@media (max-width: 1024px) {

  /* ----------------------------------------------------------
     1. BOTTOM NAVIGATION BAR
     ---------------------------------------------------------- */
  .bf-bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 9999 !important;
    background: rgba(4, 20, 26, 0.8) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  /* Active nav item glow */
  .bf-bottom-nav a.active,
  .bf-bottom-nav button.active {
    color: white !important;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
  }

  /* Body padding to prevent content hiding behind nav */
  body {
    padding-bottom: calc(60px + env(safe-area-inset-bottom)) !important;
  }

  /* ----------------------------------------------------------
     2. HOMEPAGE: Hide PREV / NEXT buttons
     ---------------------------------------------------------- */
  .home-prev, .home-next {
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    z-index: -1 !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  /* Shrink the home-link tap area so it doesn't cover bottom nav */
  .home-link {
    bottom: 80px !important;
    height: calc(100% - 140px) !important;
  }

  /* ----------------------------------------------------------
     3. HIDE Beaucoup's menu & toggler (replaced by our JS menu)
     ---------------------------------------------------------- */
  .header-mobile-toggler {
    display: none !important;
  }

  .header-menu {
    display: none !important;
  }

  /* ----------------------------------------------------------
     4. SMART HEADER (auto-hide on scroll)
     ---------------------------------------------------------- */
  .header {
    background: rgba(0, 0, 0, 0.35) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.35s ease !important;
  }

  .header.bf-header-hidden {
    transform: translateY(-100%) !important;
  }

  /* ----------------------------------------------------------
     5. PROJECT GRID (Films, Music Videos pages)
     ---------------------------------------------------------- */
  .grid-layout {
    padding-bottom: 80px !important;
  }

  .grid-layout-item {
    width: 100% !important;
    max-width: 100% !important;
  }

  .projects-counter,
  .grid-counter {
    bottom: calc(70px + env(safe-area-inset-bottom)) !important;
  }

  /* ----------------------------------------------------------
     6. LIST VIEW — Fix huge text
     ---------------------------------------------------------- */
  .slider-item .body-48,
  .grid-layout-item .body-48 {
    font-size: 1.6rem !important;
    line-height: 1.2 !important;
  }

  .slider-item .body-25 {
    font-size: 1.1rem !important;
  }

  /* ----------------------------------------------------------
     7. Grid/List Toggle Buttons
     ---------------------------------------------------------- */
  .grid-toggle,
  .list-toggle,
  [class*="toggle-grid"],
  [class*="toggle-list"] {
    background: rgba(4, 20, 26, 0.7) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 6px !important;
    padding: 6px !important;
  }

  /* ----------------------------------------------------------
     8. BEVERLY FILMS overlay — smaller on mobile
     ---------------------------------------------------------- */
  [style*="mix-blend-mode: overlay"] {
    opacity: 0.6 !important;
  }

  [style*="mix-blend-mode: overlay"] span {
    font-size: clamp(24px, 6vw, 48px) !important;
  }

  /* ----------------------------------------------------------
     9. MOBILE HOVER OVERLAY FIX (Prevents disappearing images on tap)
     ---------------------------------------------------------- */
  .card-production:hover .card-production-overlay,
  .card-production:active .card-production-overlay,
  .card-production:focus .card-production-overlay,
  .slider-item:hover .card-production-overlay,
  .slider-item:active .card-production-overlay,
  .slider-item.a .card-production-overlay,
  .grid-layout-item:hover .card-production-overlay,
  .grid-layout-item:active .card-production-overlay,
  .grid-layout-item.a .card-production-overlay {
    opacity: 0.15 !important;
  }
}

/* MUSIC VIDEOS QUALITY/SIZE ADJUSTMENTS */
[data-term-id="9"] .slider-item {
  /* Desktop: reduce height to make them look more cinematic and letterboxed instead of huge */
  height: 75% !important;
  margin-top: auto;
  margin-bottom: auto;
}

@media (max-width: 1023px) {
  [data-term-id="9"] .slider-item {
    /* Mobile: reduce the width slightly so they look like neat cards instead of bleeding edge-to-edge */
    width: 90vw !important;
    margin-left: auto !important;
    margin-right: auto !important;
    height: auto !important;
    aspect-ratio: 16/9 !important;
  }
  
  [data-term-id="9"] .slider-item .card-production {
    padding: 0 !important;
    border-radius: 12px;
    overflow: hidden;
  }
}
