/* ============================================================
   CLASSIC TV PAKISTAN — NAVIGATION BARS, DRAWER & SEARCH MODAL
   ============================================================ */

/* Top Navigation Bar (Netflix Glassmorphism Desktop) */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  padding: 14px 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  transition: background 0.35s ease, padding 0.35s ease;
  background: linear-gradient(180deg, rgba(6, 11, 8, 0.95) 0%, rgba(6, 11, 8, 0.7) 60%, transparent 100%);
}

.topbar.scrolled {
  background: rgba(6, 11, 8, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 10px 5%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(245, 197, 66, 0.35));
  transition: transform 0.3s ease;
}

.brand:hover .brand-logo {
  transform: scale(1.05) rotate(-2deg);
}

.brand-titles {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 2px;
  color: #fff;
  line-height: 1.1;
}

.brand-sub {
  font-size: 9px;
  color: var(--gold);
  letter-spacing: 1.6px;
  text-transform: uppercase;
  font-weight: 700;
  margin-top: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.nav-link {
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  color: var(--gold);
}

/* Desktop Topbar Actions */
.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  background: rgba(14, 23, 18, 0.85);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 36px 8px 36px;
  color: #fff;
  font-size: 13px;
  width: 220px;
  transition: all 0.3s ease;
}

.search-input:focus {
  width: 280px;
  border-color: var(--gold);
  background: #09110c;
  outline: none;
  box-shadow: 0 0 0 3px rgba(245, 197, 66, 0.12);
}

.search-icon-svg {
  position: absolute;
  left: 12px;
  color: var(--text-dim);
  pointer-events: none;
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  background: none;
  color: var(--text-dim);
  font-size: 12px;
  display: none;
}

.search-clear-btn.visible {
  display: block;
}

/* ============================================================
   MOBILE TOP NAVIGATION & SUB-NAV STRIP (NETFLIX SCREEN 1)
   ============================================================ */
@media (max-width: 850px) {
  .topbar {
    padding: 10px 16px;
    background: rgba(6, 11, 8, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 200;
  }

  .mobile-hamburger-btn {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
  }

  .mobile-hamburger-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.2s ease;
  }

  .brand-group {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 8px;
    margin: 0;
  }

  .brand {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
    filter: drop-shadow(0 2px 8px rgba(245, 197, 66, 0.4));
  }

  .brand-name {
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: #fff;
    line-height: 1;
  }

  .brand-sub, .nav-links {
    display: none !important;
  }

  .topbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 32px;
  }

  .topbar-right .search-wrapper {
    display: none !important;
  }

  /* Sub-Navigation Strip (Dynamic Categories) */
  .mobile-nav-strip {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    padding: 10px 16px 8px;
    background: rgba(6, 11, 8, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 50px;
    z-index: 180;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-nav-strip::-webkit-scrollbar {
    display: none;
  }

  .m-pill {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.65);
    padding: 4px 6px 6px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
  }

  .m-pill:hover, .m-pill.active {
    color: #ffffff;
  }

  .m-pill.active {
    font-weight: 700;
  }

  .m-pill.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 4px;
    right: 4px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(245, 197, 66, 0.6);
  }
}

/* ============================================================
   MOBILE DRAWER SIDEBAR
   ============================================================ */
.mobile-drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-drawer-backdrop.open {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 82vw;
  background: #09120d;
  border-right: 1px solid var(--border-gold);
  z-index: 410;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 12px 0 36px rgba(0, 0, 0, 0.85);
}

.mobile-drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.drawer-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.drawer-section-title {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-left: 6px;
}

.drawer-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.drawer-link:hover, .drawer-link.active {
  background: rgba(245, 197, 66, 0.12);
  color: var(--gold);
}

.drawer-link.gold {
  color: var(--gold);
  font-weight: 700;
}

.drawer-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

.drawer-footer {
  margin-top: auto;
  padding: 12px 6px 0;
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.4;
}

/* ============================================================
   MOBILE FULLSCREEN SEARCH MODAL
   ============================================================ */
.mobile-search-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: #060b08;
  z-index: 500;
  flex-direction: column;
  padding: 12px 16px env(safe-area-inset-bottom);
}

.mobile-search-modal.open {
  display: flex;
}

.m-search-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.m-search-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.m-search-input-wrap svg {
  position: absolute;
  left: 12px;
  color: var(--text-dim);
  pointer-events: none;
}

.m-search-input-wrap input {
  width: 100%;
  background: #0d1712;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 36px 10px 36px;
  font-size: 14px;
  color: #fff;
  outline: none;
}

.m-search-input-wrap input:focus {
  border-color: var(--gold);
}

.m-search-clear {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 13px;
  cursor: pointer;
  padding: 4px;
}

.m-search-cancel {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding: 6px;
}

.m-search-results {
  flex: 1;
  overflow-y: auto;
  padding-top: 14px;
  padding-bottom: 60px;
}

.m-search-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.m-search-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-dim);
  text-align: center;
  gap: 10px;
}

.m-search-prompt span {
  font-size: 32px;
}
