/* ============================================================
   NEWS 10 — Category / Listing Page CSS
   Extends style.css | Custom CSS
   ============================================================ */

/* ── Breadcrumb (reused from detail.css) ─────────────────── */
.breadcrumb-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-pale);
  padding: 10px 0;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  font-size: .78rem;
  font-family: var(--font-en);
  color: var(--gray);
}
.breadcrumb a {
  color: var(--gray);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
}
.breadcrumb a:hover { color: var(--red); }
.bc-sep { color: var(--gray-light); font-size: .65rem; }
.bc-current { color: var(--dark); font-weight: 600; }

/* ── Category Hero Banner ─────────────────────────────────── */
.cat-hero-banner {
  position: relative;
  overflow: hidden;
  height: 220px;
}
.cat-hero-bg {
  position: absolute;
  inset: 0;
}
.cat-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cat-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
    rgba(26,35,66,.92) 0%,
    rgba(230,0,0,.75) 100%);
}
.cat-hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 22px;
}
.cat-hero-icon {
  font-size: 4rem;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.4));
  flex-shrink: 0;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.cat-hero-title {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 6px;
  text-shadow: 0 4px 16px rgba(0,0,0,.4);
}
.cat-hero-sub {
  font-size: .92rem;
  color: rgba(255,255,255,.75);
  margin-bottom: 14px;
}
.cat-hero-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.cat-hero-stats span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: rgba(255,255,255,.8);
  background: rgba(255,255,255,.12);
  padding: 5px 12px;
  border-radius: 20px;
  font-family: var(--font-en);
  border: 1px solid rgba(255,255,255,.2);
}
.cat-hero-stats i { color: var(--orange); }

/* ── Sub-category Tabs Bar ────────────────────────────────── */
.subcat-bar {
  background: var(--white);
  border-bottom: 2px solid var(--gray-pale);
  position: sticky;
  top: 0;
  z-index: 998;
  box-shadow: var(--shadow-sm);
}
.subcat-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.subcat-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
}
.subcat-tabs::-webkit-scrollbar { display: none; }
.subcat-tab {
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 14px 18px;
  font-family: var(--font-hindi);
  font-size: .88rem;
  font-weight: 600;
  color: var(--gray);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
  position: relative;
}
.subcat-tab:hover { color: var(--dark); }
.subcat-tab.active {
  color: var(--red);
  border-bottom-color: var(--red);
}
.subcat-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--red);
  border-radius: 50%;
}

/* Sort Dropdown */
.subcat-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.sort-label {
  color: var(--gray);
  font-size: .9rem;
}
.sort-select {
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-family: var(--font-hindi);
  font-size: .82rem;
  color: var(--dark);
  outline: none;
  cursor: pointer;
  transition: border-color .25s;
  background: var(--white);
}
.sort-select:focus { border-color: var(--red); }

/* ── Category Main Layout ─────────────────────────────────── */
.cat-main { padding: 24px 0 40px; }
.cat-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

/* ── Top Story ────────────────────────────────────────────── */
.top-story-wrap { margin-bottom: 6px; }
.top-story-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.ts-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--red), var(--orange));
  color: var(--white);
  font-size: .75rem;
  font-weight: 800;
  padding: 5px 14px;
  border-radius: 20px;
  font-family: var(--font-en);
  letter-spacing: .5px;
  text-transform: uppercase;
  box-shadow: 0 3px 10px rgba(230,0,0,.35);
}
.top-story-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  color: inherit;
  border: 1px solid var(--gray-pale);
}
.top-story-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-3px);
}
.top-story-img {
  position: relative;
  overflow: hidden;
  min-height: 260px;
}
.top-story-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.top-story-card:hover .top-story-img img { transform: scale(1.06); }
.top-story-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,.15), transparent);
}
.ts-live-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
}
.top-story-body {
  padding: 24px 24px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}
.ts-cats { display: flex; gap: 8px; flex-wrap: wrap; }
.top-story-title {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--dark);
  line-height: 1.4;
  transition: color .25s;
}
.top-story-card:hover .top-story-title { color: var(--red); }
.top-story-excerpt {
  font-size: .88rem;
  color: var(--dark-3);
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.top-story-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .75rem;
  color: var(--gray);
  font-family: var(--font-en);
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--gray-pale);
}
.ts-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gray-light);
}
.ts-author { font-weight: 700; color: var(--dark); font-size: .78rem; }
.ts-dot { color: var(--gray-light); }
.top-story-meta i { color: var(--red); }

/* ── Filter Bar ───────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-pale);
}
.filter-result-count {
  font-size: .85rem;
  color: var(--gray);
  font-family: var(--font-en);
}
.filter-result-count #result-count {
  font-weight: 800;
  color: var(--red);
  font-size: 1rem;
}
.view-toggle {
  display: flex;
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.view-btn {
  background: none;
  border: none;
  padding: 7px 12px;
  cursor: pointer;
  color: var(--gray);
  font-size: .9rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
}
.view-btn.active {
  background: var(--red);
  color: var(--white);
}
.view-btn:hover:not(.active) { background: var(--gray-pale); color: var(--dark); }

/* ── Article Cards Container ──────────────────────────────── */
.articles-container { min-height: 200px; transition: var(--transition); }

/* GRID VIEW */
.articles-container.grid-view {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* LIST VIEW */
.articles-container.list-view {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.articles-container.list-view .art-card {
  flex-direction: row;
  border-radius: 0;
  border-bottom: 1px solid var(--gray-pale);
  box-shadow: none;
}
.articles-container.list-view .art-card:first-child { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.articles-container.list-view .art-card:last-child  { border-radius: 0 0 var(--radius-md) var(--radius-md); border-bottom: none; }
.articles-container.list-view .art-card-img {
  width: 200px;
  flex-shrink: 0;
  height: 130px;
}
.articles-container.list-view .art-card-img img { height: 130px; }
.articles-container.list-view .art-card-body { padding: 16px 20px; }
.articles-container.list-view .art-card-title { font-size: 1rem; -webkit-line-clamp: 2; }
.articles-container.list-view .art-card-excerpt { display: block !important; -webkit-line-clamp: 2; }

/* Article Card (shared) */
.art-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
  color: inherit;
  border: 1px solid transparent;
  text-decoration: none;
}
.art-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: rgba(230,0,0,.15);
}
.art-card-img {
  position: relative;
  overflow: hidden;
  height: 185px;
}
.art-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.art-card:hover .art-card-img img { transform: scale(1.08); }
.art-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
}
.art-card-body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.art-card-title {
  font-size: .92rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .25s;
  flex: 1;
}
.art-card:hover .art-card-title { color: var(--red); }
.art-card-excerpt {
  font-size: .8rem;
  color: var(--gray);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  display: none; /* hidden in grid view, shown in list view */
}
.art-card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .7rem;
  color: var(--gray);
  font-family: var(--font-en);
  padding-top: 10px;
  border-top: 1px solid var(--gray-pale);
  flex-wrap: wrap;
}
.art-author-img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gray-light);
}
.art-author { font-weight: 700; color: var(--dark-2); font-size: .72rem; }
.art-dot { color: var(--gray-light); }
.art-card-meta i { color: var(--red); }

/* ── Pagination ───────────────────────────────────────────── */
.pagination-wrap {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}
.load-more-wrap { width: 100%; }
.load-more-btn {
  width: 100%;
  background: none;
  border: 2px solid var(--red);
  color: var(--red);
  padding: 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-hindi);
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.load-more-btn:hover:not(:disabled) {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(230,0,0,.35);
}
.load-more-btn:disabled { opacity: .6; cursor: default; }
.lm-count {
  font-family: var(--font-en);
  font-size: .75rem;
  opacity: .7;
}

/* Pagination Numbers */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pg-btn {
  min-width: 38px;
  height: 38px;
  background: var(--white);
  border: 1.5px solid var(--gray-light);
  border-radius: var(--radius-sm);
  color: var(--dark-2);
  font-family: var(--font-en);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.pg-btn:hover:not(.disabled):not(.active) {
  border-color: var(--red);
  color: var(--red);
}
.pg-btn.active {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
  box-shadow: 0 3px 10px rgba(230,0,0,.3);
}
.pg-btn.disabled {
  opacity: .4;
  cursor: default;
}
.pg-dots {
  color: var(--gray);
  font-size: 1rem;
  line-height: 1;
  padding: 0 4px;
}

/* ── Category Sidebar ─────────────────────────────────────── */
.cat-sidebar {}
.cat-sidebar-sticky {
  position: sticky;
  top: 140px;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--gray-light) transparent;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-right: 4px;
  border-radius: var(--radius-lg);
}
.cat-sidebar-sticky::-webkit-scrollbar       { width: 4px; }
.cat-sidebar-sticky::-webkit-scrollbar-track { background: transparent; }
.cat-sidebar-sticky::-webkit-scrollbar-thumb { background: var(--gray-light); border-radius: 4px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 1100px) {
  .cat-layout { grid-template-columns: 1fr 300px; }
  .articles-container.grid-view { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .cat-layout { grid-template-columns: 1fr; }
  .cat-sidebar-sticky {
    position: static;
    overflow-y: visible;
    max-height: none;
    padding-right: 0;
  }
}

@media (max-width: 768px) {
  .cat-hero-banner   { height: 170px; }
  .cat-hero-title    { font-size: 1.8rem; }
  .cat-hero-sub      { display: none; }
  .cat-hero-stats    { gap: 8px; }
  .top-story-card    { grid-template-columns: 1fr; }
  .top-story-img     { min-height: 200px; }
  .articles-container.grid-view { grid-template-columns: repeat(2, 1fr); }
  .articles-container.list-view .art-card-img { width: 140px; }
  .subcat-sort       { display: none; }
}

@media (max-width: 480px) {
  .cat-hero-banner   { height: 140px; }
  .cat-hero-title    { font-size: 1.4rem; }
  .cat-hero-icon     { font-size: 2.5rem; }
  .articles-container.grid-view  { grid-template-columns: 1fr; }
  .articles-container.list-view .art-card { flex-direction: column; }
  .articles-container.list-view .art-card-img { width: 100%; height: 160px; }
  .pagination        { flex-wrap: wrap; justify-content: center; }
}
