/* ===========================
   CATEGORY PAGE – Premium Editorial
   =========================== */

/* ---- Google Font for serif headings ---- */
@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,200..800;1,6..72,200..800&display=swap');

/* ---- Layout ---- */
.category-main {
  margin-top: 0;
  padding-top: 48px;
  padding-bottom: 64px;
}

/* ---- Category Header ---- */
.category-header {
  margin-bottom: 48px;
  max-width: 760px;
}

.category-kicker {
  display: inline-block;
  text-transform: uppercase;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.2em;
  margin-bottom: 12px;
}

.category-header h1 {
  font-family: 'Newsreader', serif;
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.category-desc {
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.65;
  max-width: 65ch;
}

/* ---- Main Grid (content + sidebar) ---- */
.category-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 48px;
  align-items: start;
}

/* ================================================
   LEAD STORY – Hero-style featured article
   ================================================ */
.category-lead {
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}

.category-lead .label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 14px;
}

.category-lead h2 {
  font-family: 'Newsreader', serif;
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 14px;
  letter-spacing: -0.01em;
}

.category-lead h2 a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.category-lead h2 a:hover {
  color: var(--primary);
  text-decoration: none;
}

.category-lead>p {
  color: var(--muted);
  font-family: 'Newsreader', serif;
  font-size: 1.15rem;
  line-height: 1.6;
  max-width: 70ch;
}

.category-lead .lead-image {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 16 / 9;
  margin-bottom: 20px;
  background: var(--surface-2);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
}

.category-lead .lead-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.7s ease-out;
}

.category-lead .lead-image:hover img {
  transform: scale(1.02);
}

.category-lead .lead-image .image-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 24px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
  font-style: italic;
}

.category-lead .meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.category-lead .meta .sep {
  color: var(--border);
}

/* Lead Sub-Features Grid */
.lead-sub-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  border-top: 1px solid var(--border);
  padding-top: 28px;
  margin-top: 28px;
}

.lead-sub-feature h3 {
  font-family: 'Newsreader', serif;
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 10px;
  line-height: 1.25;
}

.lead-sub-feature h3:hover {
  text-decoration: underline;
  cursor: pointer;
}

.lead-sub-feature p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

/* ================================================
   STORY STREAM – Article list
   ================================================ */
.story-stream {
  display: grid;
  gap: 0;
}

.stream-item {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 20px;
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s ease;
}

.stream-item:first-child {
  padding-top: 0;
}

.stream-item:last-child {
  border-bottom: none;
}

/* Image */
.stream-media {
  order: 2;
  margin: 0;
}

.stream-media a {
  display: block;
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
}

.stream-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
  transition: transform 0.5s ease;
}

.stream-media a:hover img {
  transform: scale(1.04);
}

/* Content */
.stream-content {
  order: 1;
}

.stream-content h3 {
  font-family: 'Newsreader', serif;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
}

.stream-content h3 a {
  text-decoration: none;
  transition: color 0.15s ease;
}

.stream-content h3 a:hover {
  color: var(--primary);
  text-decoration: none;
}

.stream-content p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stream-meta {
  font-size: 0.75rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stream-meta time {
  font-weight: 500;
}

/* ---- Pagination ---- */
.pagination {
  margin-top: 40px;
  text-align: center;
}

.pagination .btn {
  width: 100%;
  max-width: 280px;
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.pagination .btn:hover {
  background: var(--surface-2);
  border-color: var(--muted);
}

/* ================================================
   SIDEBAR
   ================================================ */
.category-sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
  position: sticky;
  top: 120px;
}

/* ---- Sidebar section headings ---- */
.sidebar-box {
  padding: 0;
}

.sidebar-box h4 {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: var(--muted);
  margin-bottom: 24px;
}

.sidebar-box h4::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ================================================
   TRENDING / MOST READ
   ================================================ */
.sidebar-trending {
  background: var(--surface-2);
  padding: 24px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.sidebar-trending h4 {
  margin-bottom: 20px;
}

.most-read {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: trending;
}

.most-read li {
  counter-increment: trending;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
}

.most-read li:first-child {
  padding-top: 0;
}

.most-read li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.most-read li::before {
  content: counter(trending, decimal-leading-zero);
  font-family: 'Newsreader', serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--border);
  line-height: 1;
  min-width: 38px;
  flex-shrink: 0;
  transition: color 0.2s ease;
}

.most-read li:hover::before {
  color: var(--primary);
}

.most-read-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 2px;
  min-width: 0;
}

.most-read-text a {
  font-weight: 700;
  font-size: 0.88rem;
  line-height: 1.4;
  text-decoration: none;
  color: var(--text);
  transition: color 0.15s ease;
}

.most-read li:hover .most-read-text a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.most-read-category {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
}

/* ================================================
   TOPICS
   ================================================ */
.sidebar-topics {
  background: var(--surface-2);
  padding: 24px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.topic-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topic-list li a {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.topic-list li a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(236, 19, 55, 0.18);
  transform: translateY(-1px);
}

/* Subscribe CTA */
.sidebar-subscribe {
  background: var(--primary);
  color: #fff;
  padding: 28px 24px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.sidebar-subscribe h4 {
  font-family: 'Newsreader', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  text-transform: none;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.sidebar-subscribe h4::after {
  display: none;
}

.sidebar-subscribe p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.88rem;
  line-height: 1.55;
  margin-bottom: 18px;
}

.sidebar-subscribe .btn-primary,
.sidebar-subscribe .btn-full {
  display: block;
  width: 100%;
  background: #fff;
  color: var(--primary);
  font-weight: 900;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 14px 18px;
  border-radius: 8px;
  text-align: center;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: background 0.2s ease;
}

.sidebar-subscribe .btn-primary:hover,
.sidebar-subscribe .btn-full:hover {
  background: rgba(255, 255, 255, 0.92);
  text-decoration: none;
}

/* ---- Editorial Standards Link ---- */
.sidebar-standards {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
  background: var(--surface-2);
}

.sidebar-standards p {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.55;
}

.sidebar-standards a {
  color: var(--primary);
  font-weight: 700;
}

/* ================================================
   RESPONSIVE
   ================================================ */

/* Tablet */
@media (min-width: 768px) and (max-width: 1024px) {
  .category-grid {
    grid-template-columns: 1fr 300px;
    gap: 32px;
  }

  .category-header h1 {
    font-size: 2.8rem;
  }

  .category-lead h2 {
    font-size: 2rem;
  }

  .stream-item {
    grid-template-columns: 1fr 160px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .category-main {
    padding-top: 28px;
    padding-bottom: 40px;
  }

  .category-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .category-header {
    margin-bottom: 32px;
  }

  .category-header h1 {
    font-size: 2.2rem;
  }

  .category-lead h2 {
    font-size: 1.7rem;
  }

  .category-lead>p {
    font-size: 1rem;
  }

  .lead-sub-features {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .stream-item {
    grid-template-columns: 1fr 120px;
    gap: 14px;
    padding: 18px 0;
  }

  .stream-content h3 {
    font-size: 1.05rem;
  }

  .category-sidebar {
    position: static;
  }

  .sidebar-subscribe h4 {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .category-header h1 {
    font-size: 1.8rem;
  }

  .category-lead h2 {
    font-size: 1.4rem;
  }

  .stream-item {
    grid-template-columns: 1fr;
  }

  .stream-media {
    order: -1;
  }

  .stream-media a {
    aspect-ratio: 16 / 9;
  }
}