/* ── Mobile-specific styles (max-width: 1023px) ─────────────── */

/* Mobile movie card */
@media (max-width: 1023px) {

  /* Container padding on mobile */
  .container_large {
    padding-left: 12px;
    padding-right: 12px;
  }

  /* Mobile nav */
  .mobile-hidden { display: none !important; }
  .mobile-visible { display: flex !important; }

  /* Mobile card: poster fills the card, title below */
  .m-card {
    background: #1d232c;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #273240;
    transition: background 0.2s;
  }
  .m-card:hover { background: #232d3a; }
  .m-card-img {
    width: 100%;
    padding-top: 140%; /* ~2:3 poster ratio */
    position: relative;
    overflow: hidden;
  }
  .m-card-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
  }
  .m-card:hover .m-card-img img { transform: scale(1.05); }
  .m-card-year {
    position: absolute;
    top: 6px;
    right: 6px;
    background: #22c55e;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
  }
  .m-card-title {
    font-size: 12px;
    color: #a4badb;
    text-align: center;
    padding: 6px 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Horizontal scroll row */
  .h-scroll-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .h-scroll-row::-webkit-scrollbar { display: none; }
  .h-scroll-row .m-card {
    /* Show exactly 2 cards + tiny peek of 3rd on mobile screens */
    flex: 0 0 calc(50vw - 20px);
    width: calc(50vw - 20px);
    max-width: 170px; /* Don't let them get too huge on tablets */
  }

  /* Section header */
  .m-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #232F3D;
  }
  .m-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #A5BBDC;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }
  .m-section-title-bar {
    width: 3px;
    height: 18px;
    background: #0693BD;
    border-radius: 2px;
    flex-shrink: 0;
  }
  .m-section-more {
    font-size: 11px;
    color: #0693BD;
    font-weight: 600;
    white-space: nowrap;
  }

  /* Quick category pills */
  .m-cat-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 10px 0;
  }
  .m-cat-pills::-webkit-scrollbar { display: none; }
  .m-cat-pill {
    flex: 0 0 auto;
    background: #24303d;
    border: 1px solid #304156;
    color: #a5bbdc;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
  }
  .m-cat-pill:hover, .m-cat-pill.active {
    background: #0693BD;
    color: #fff;
    border-color: #0693BD;
  }

  /* Mobile hero slider */
  .m-hero { margin-bottom: 16px; }
  .m-hero swiper-container { border-radius: 8px; overflow: hidden; }

  /* Mobile bottom nav bar */
  .m-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a2230;
    border-top: 1px solid #304156;
    z-index: 100;
    padding: 6px 0 env(safe-area-inset-bottom, 6px);
  }
  .m-bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #6E879F;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 4px 0;
    transition: color 0.15s;
  }
  .m-bottom-nav a i { font-size: 18px; }
  .m-bottom-nav a:hover, .m-bottom-nav a.active { color: #0693BD; }

  /* Add padding at bottom so content not hidden behind bottom nav */
  body { padding-bottom: 64px; }

  /* Detail page mobile */
  .detail-meta-row {
    display: flex;
    border-bottom: 1px solid #1d2835;
  }
  .detail-meta-label {
    flex: 0 0 80px;
    background: #304156;
    color: #a5bbdc;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    text-align: center;
  }
  .detail-meta-value {
    flex: 1;
    background: #222933;
    color: #a5bbdc;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    padding: 8px 10px;
    overflow: hidden;
  }
}

/* Desktop — remove bottom nav */
@media (min-width: 1024px) {
  .m-bottom-nav { display: none !important; }
  body { padding-bottom: 0 !important; }
}
