/* ================================================================
   PHAROS 8K — Content Catalog Stylesheet
   Tabs, Search, Package Cards & Category Groups
   ================================================================ */


/* ----------------------------------------------------------------
   1. TABS BAR — Sticky Below Navigation
   ---------------------------------------------------------------- */
.tabs-wrap {
  position: sticky;
  top: 72px;
  z-index: 50;
  background: rgba(9, 12, 20, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0;
}

.tabs-container {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.tabs-container::-webkit-scrollbar {
  display: none;
}

/* Individual tab button */
.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 1.25rem;
  font-family: 'Tajawal', 'Cairo', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  background: none;
  cursor: pointer;
  transition: color 0.3s var(--ease),
              border-color 0.3s var(--ease),
              background 0.3s var(--ease);
}

.tab-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.tab-btn svg,
.tab-btn .tab-icon {
  width: 18px;
  height: 18px;
  opacity: 0.7;
  flex-shrink: 0;
}

.tab-btn.active svg,
.tab-btn.active .tab-icon {
  opacity: 1;
}

/* Count pill inside tab */
.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--bg-dark);
  background: var(--text-muted);
  border-radius: 999px;
  transition: background 0.3s var(--ease);
}

.tab-btn.active .tab-count {
  background: var(--gold);
}


/* ----------------------------------------------------------------
   2. TAB CONTENT — Show/Hide
   ---------------------------------------------------------------- */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: tabFadeIn 0.35s var(--ease);
}

@keyframes tabFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ----------------------------------------------------------------
   3. SEARCH — Full-Width Pill Input
   ---------------------------------------------------------------- */
.search-wrap {
  position: relative;
  max-width: 560px;
  margin: 1.5rem auto 2rem;
}

.search-icon {
  position: absolute;
  top: 50%;
  right: 1.15rem;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  pointer-events: none;
  transition: color 0.3s var(--ease);
}

.search-input {
  width: 100%;
  padding: 0.85rem 1.25rem 0.85rem 3.25rem;
  padding-right: 3rem;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.3s var(--ease),
              box-shadow 0.3s var(--ease),
              background 0.3s var(--ease);
}

.search-input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
  background: var(--bg-card2);
}

.search-input:focus ~ .search-icon {
  color: var(--gold);
}


/* ----------------------------------------------------------------
   4. CATEGORY GROUPS
   ---------------------------------------------------------------- */
.cat-group {
  margin-bottom: 2.5rem;
}

.cat-group-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Tajawal', 'Cairo', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold);
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.cat-group-title .emoji {
  font-size: 1.3rem;
  line-height: 1;
}


/* ----------------------------------------------------------------
   5. PACKAGE GRID & CARDS
   ---------------------------------------------------------------- */
.pkg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.pkg-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: default;
  transition: transform 0.3s var(--ease),
              box-shadow 0.3s var(--ease),
              border-color 0.3s var(--ease);
}

.pkg-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
  border-color: var(--border-hover);
}

.pkg-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

/* Count badge with colour variants */
.pkg-count {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 22px;
  padding: 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  color: var(--bg-dark);
  background: var(--gold);
}

.pkg-count.count-green {
  background: var(--green);
}

.pkg-count.count-blue {
  background: var(--blue);
}

.pkg-count.count-purple {
  background: var(--purple);
}

.pkg-count.count-orange {
  background: var(--orange);
}


/* ----------------------------------------------------------------
   6. QUALITY / STATUS BADGES
   ---------------------------------------------------------------- */
.badge-4k,
.badge-8k,
.badge-hd,
.badge-new {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: 4px;
  margin-right: 0.4rem;
}

.badge-8k {
  color: var(--bg-dark);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
}

.badge-4k {
  color: var(--bg-dark);
  background: linear-gradient(135deg, var(--blue) 0%, #3b82f6 100%);
}

.badge-hd {
  color: var(--bg-dark);
  background: linear-gradient(135deg, var(--green) 0%, #10b981 100%);
}

.badge-new {
  color: var(--bg-dark);
  background: linear-gradient(135deg, var(--orange) 0%, #f97316 100%);
}


/* ----------------------------------------------------------------
   7. NO RESULTS MESSAGE
   ---------------------------------------------------------------- */
.no-results {
  display: none;
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--text-muted);
  font-size: 1rem;
}

.no-results.visible {
  display: block;
}

.no-results .no-results-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.no-results p {
  color: var(--text-muted);
  font-size: 0.95rem;
}


/* ----------------------------------------------------------------
   8. FEATURED CONTENT — Ramadan / Special Sections
   ---------------------------------------------------------------- */
.featured-content {
  position: relative;
  padding: 2rem;
  margin-bottom: 2.5rem;
  background: linear-gradient(135deg, rgba(245, 200, 66, 0.05) 0%, rgba(9, 12, 20, 0.9) 100%);
  border: 1px solid var(--border);
  border-image: linear-gradient(135deg, var(--gold), rgba(245, 200, 66, 0.2)) 1;
  border-radius: 0;
  overflow: hidden;
}

/* Fix border-radius with border-image (use outline or pseudo approach) */
.featured-content {
  border: none;
  border-radius: var(--radius);
  outline: 1px solid var(--border);
  box-shadow: inset 0 0 0 1px rgba(245, 200, 66, 0.15);
}

.featured-content::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1.5px;
  background: linear-gradient(135deg, var(--gold), rgba(245, 200, 66, 0.15));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.featured-content h3 {
  font-family: 'Tajawal', 'Cairo', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.featured-content p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.75;
}


/* ----------------------------------------------------------------
   9. HERO STATS — Channel/Movie/Series Counts
   ---------------------------------------------------------------- */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 2rem 0;
}

.hero-stats .stat-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 1.25rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 140px;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.hero-stats .stat-box:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.hero-stats .stat-number {
  font-family: 'Tajawal', 'Cairo', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.hero-stats .stat-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}


/* ----------------------------------------------------------------
   10. RESPONSIVE — Mobile & Tablet
   ---------------------------------------------------------------- */
@media (max-width: 768px) {
  .tabs-wrap {
    top: 60px;
  }

  .tabs-container {
    padding: 0 1rem;
    gap: 0;
  }

  .tab-btn {
    padding: 0.85rem 1rem;
    font-size: 0.84rem;
  }

  .search-wrap {
    margin: 1rem 1rem 1.5rem;
    max-width: none;
  }

  .pkg-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .pkg-card {
    padding: 0.85rem 1rem;
  }

  .hero-stats {
    gap: 1rem;
  }

  .hero-stats .stat-box {
    padding: 1rem 1.25rem;
    min-width: 100px;
  }

  .hero-stats .stat-number {
    font-size: 1.5rem;
  }

  .featured-content {
    padding: 1.5rem;
  }

  .cat-group-title {
    font-size: 1.05rem;
  }
}

@media (max-width: 480px) {
  .tab-btn {
    padding: 0.75rem 0.8rem;
    font-size: 0.8rem;
    gap: 0.35rem;
  }

  .tab-count {
    font-size: 0.65rem;
    min-width: 18px;
    height: 17px;
  }

  .hero-stats {
    flex-direction: column;
    align-items: center;
  }

  .hero-stats .stat-box {
    width: 100%;
    flex-direction: row;
    justify-content: center;
    gap: 0.75rem;
  }
}

/* ============================================
   Premium 2026 Enhancements
   ============================================ */

/* Tab switch micro-animation */
.tab-btn {
  position: relative;
}
.tab-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: var(--gold);
  border-radius: 3px 3px 0 0;
  transition: width 0.3s ease, left 0.3s ease;
}
.tab-btn.active::after {
  width: 100%;
  left: 0;
}

/* Package card shine on hover */
.pkg-card {
  position: relative;
  overflow: hidden;
}
.pkg-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(245,200,66,0.05), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.pkg-card:hover::after { opacity: 1; }

/* Category header icon bounce */
.cat-group-title .emoji {
  display: inline-block;
  transition: transform 0.3s ease;
}
.cat-group:hover .cat-group-title .emoji {
  transform: scale(1.2) rotate(-5deg);
}

/* Featured content pulse border */
.featured-content {
  position: relative;
}
.featured-content::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: conic-gradient(from 0deg, var(--gold), transparent 30%, transparent 70%, var(--gold));
  animation: borderSpin 4s linear infinite;
  z-index: -1;
  opacity: 0.3;
}

@keyframes borderSpin {
  to { transform: rotate(360deg); }
}

/* Search input glow on focus */
.search-input:focus {
  box-shadow: 0 0 20px rgba(245,200,66,0.15);
}
