/* ============================================
   FactRefinery — Enhanced News Site CSS
   Images, Sources, Modal, Sub-nav
   ============================================ */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;
  
  --bg-body: #f5f5f5;
  --bg-surface: #ffffff;
  --bg-header: #1a1a2e;
  --bg-sidebar: #f8f8f8;
  --border: #e0e0e0;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-muted: #888888;
  --accent: #0066cc;
  --accent-hover: #0052a3;
  --accent-soft: #e6f0fa;
  --hot-topic: #dc2626;
  --source-left: #dc2626;
  --source-center: #059669;
  --source-right: #2563eb;
}

[data-theme="dark"] {
  --bg-body: #0a0a0a;
  --bg-surface: #141414;
  --bg-header: #0d0d0d;
  --bg-sidebar: #1a1a1a;
  --border: #2a2a2a;
  --text-primary: #f5f5f5;
  --text-secondary: #b0b0b0;
  --text-muted: #888888;
  --accent: #4d9fff;
  --accent-hover: #6ab3ff;
  --accent-soft: #1a2633;
  --hot-topic: #ff4444;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ============================================
   TOP BAR
   ============================================ */
.top-bar {
  background: var(--bg-header);
  color: #fff;
  font-size: 13px;
  padding: 8px 0;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar .date { opacity: 0.8; }
.top-bar .tagline { font-weight: 500; letter-spacing: 0.5px; }

/* ============================================
   HEADER
   ============================================ */
.main-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
}

.logo-mark { font-size: 28px; }
.logo-text { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; }
.logo .accent { color: var(--accent); }

.main-nav {
  display: flex;
  gap: 8px;
}

.main-nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 6px;
  transition: all 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--accent);
  background: var(--accent-soft);
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================
   SUB NAVIGATION
   ============================================ */
.sub-nav {
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.sub-nav .container {
  display: flex;
  gap: 8px;
}

.sub-nav a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.2s;
}

.sub-nav a:hover,
.sub-nav a.active {
  color: var(--text-primary);
  background: var(--border);
}

.sub-nav a.hot-topic {
  color: var(--hot-topic);
  font-weight: 600;
}

.sub-nav a.hot-topic:hover,
.sub-nav a.hot-topic.active {
  background: rgba(220, 38, 38, 0.1);
}

/* Transition for sub-nav items */
#sub-nav-container {
  transition: opacity 0.15s;
}

.side-story .side-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 3px;
  margin: 0 12px 6px;
}

.side-story .side-label.hot {
  background: rgba(220, 38, 38, 0.1);
  color: var(--hot-topic);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin: 10px 0 0;
}

.hero-story {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.hero-story:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
  transform: translateY(-2px);
}

.hero-image {
  position: relative;
  width: 100%;
  height: 280px;
  max-height: 280px;
  overflow: hidden;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.hero-story:hover .hero-image img {
  transform: scale(1.03);
}

.image-credit,
.credit {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 4px;
}

.hero-story .label {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 4px;
  margin: 16px 20px 12px;
}

.hero-story h1 {
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1.2;
  margin: 0 20px 12px;
  font-weight: 700;
}

.hero-story .summary {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0 20px 16px;
  line-height: 1.5;
}

.hero-story .meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 20px;
}

.hero-story .score {
  color: var(--accent);
  font-weight: 600;
}

.sources-preview {
  display: flex;
  gap: 6px;
  margin: 10px 20px 16px;
  flex-wrap: wrap;
}

.source-tag {
  font-size: 12px;
  padding: 4px 10px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 4px;
}

/* Hero Side Stories */
.hero-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.side-story {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.2s;
}

.side-story:hover {
  border-color: var(--accent);
}

.side-image {
  position: relative;
  width: 100%;
  height: 80px;
  overflow: hidden;
}

.side-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.side-story:hover .side-image img {
  transform: scale(1.05);
}

.side-story h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 12px 16px 8px;
  line-height: 1.4;
}

.side-story .time {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 16px;
}

.sources-mini {
  font-size: 11px;
  color: var(--text-muted);
  margin: 8px 16px 12px;
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
  margin-bottom: 0;
  margin-top: 0;
}

.section[data-section] {
  display: none;
}

.section[data-section].section--visible,
#hero-section.section--visible,
#mixed-section.section--visible {
  display: block;
}

/* #mixed-section margin handled by hot-grid rules */

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
}

.section-title {
  font-size: 24px;
  font-weight: 700;
}

.view-all {
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.view-all:hover {
  text-decoration: underline;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

/* ============================================
   ARTICLE CARDS
   ============================================ */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transform: translateY(-3px);
}

.card.hidden {
  display: none;
}

.card-image {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  padding: 14px;
}

.card .category {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 10px;
  display: inline-block;
}

.card .category.hot {
  color: var(--hot-topic);
}

.card h3 {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 8px;
}

.card p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card .meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.card .score {
  color: var(--accent);
  font-weight: 600;
}

.card .sources {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.card .source {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  text-decoration: none;
  transition: opacity 0.2s;
}

.card .source:hover {
  opacity: 0.8;
}

.source[data-perspective="far-left"] {
  background: #042C53;
  color: #B5D4F4;
}

.source[data-perspective="lean-left"] {
  background: #B5D4F4;
  color: #042C53;
}

.source[data-perspective="center"] {
  background: #C0DD97;
  color: #173404;
}

.source[data-perspective="lean-right"] {
  background: #F5C4B3;
  color: #4A1B0C;
}

.source[data-perspective="far-right"] {
  background: #D85A30;
  color: #FAECE7;
}

.source[data-perspective="neutral"],
.source.no-perspective {
  background: var(--bg-sidebar);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* ============================================
   MODAL
   ============================================ */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.8);
  z-index: 1000;
  overflow-y: auto;
  padding: 40px 20px;
}

.modal.active {
  display: block;
}

.modal-content {
  background: var(--bg-surface);
  max-width: 800px;
  margin: 0 auto;
  border-radius: 12px;
  position: relative;
  animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.modal-close:hover {
  background: rgba(0,0,0,0.8);
}

.modal-article {
  padding: 0;
}

.modal-image {
  position: relative;
  width: 100%;
  height: 350px;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-image .credit {
  bottom: 16px;
  right: 16px;
  font-size: 12px;
}

.modal-article .label {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 4px;
  margin: 28px 28px 16px;
}

.modal-article h2 {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 28px 16px;
}

.modal-meta {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 28px 20px;
}

.modal-meta .score {
  color: var(--accent);
  font-weight: 600;
}

.modal-summary {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin: 0 28px 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.sources-section,
.read-more {
  padding: 0 28px 28px;
}

.sources-section h3,
.read-more h3 {
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.sources-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.source-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}

.source-item.far-left {
  background: #042C53;
  border: 1px solid #0C447C;
}
.source-item.far-left .source-perspective { color: #B5D4F4; }
.source-item.far-left .source-name { color: #E6F1FB; }

.source-item.lean-left {
  background: #B5D4F4;
  border: 1px solid #8BC4F0;
}
.source-item.lean-left .source-perspective { color: #0C447C; }
.source-item.lean-left .source-name { color: #042C53; }

.source-item.center {
  background: #C0DD97;
  border: 1px solid #A8D170;
}
.source-item.center .source-perspective { color: #4A7C0F; }
.source-item.center .source-name { color: #173404; }

.source-item.lean-right {
  background: #F5C4B3;
  border: 1px solid #E8A08A;
}
.source-item.lean-right .source-perspective { color: #8C3A1F; }
.source-item.lean-right .source-name { color: #4A1B0C; }

.source-item.far-right {
  background: #D85A30;
  border: 1px solid #C44A20;
}
.source-item.far-right .source-perspective { color: #FAECE7; }
.source-item.far-right .source-name { color: #FFFFFF; }

.source-item.neutral {
  background: var(--bg-sidebar);
  border: 1px solid var(--border);
}
.source-item.neutral .source-perspective { color: var(--text-muted); }
.source-item.neutral .source-name { color: var(--text-primary); }

.source-item:hover {
  transform: translateY(-2px);
}

.source-perspective {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.source-item.neutral .source-perspective { color: var(--text-muted); }

.source-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.read-more-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.read-more-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-sidebar);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 14px;
  transition: all 0.2s;
}

.read-more-link:hover {
  background: var(--border);
}

.read-more-link .arrow {
  margin-left: auto;
  color: var(--accent);
}

/* ============================================
   FOOTER
   ============================================ */
.main-footer {
  background: var(--bg-header);
  color: #fff;
  padding: 48px 0;
  margin-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 3fr 1fr;
  gap: 48px;
  align-items: start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-brand .logo-mark { font-size: 32px; }
.footer-brand .logo-text { font-size: 20px; font-weight: 700; }
.footer-brand p { opacity: 0.7; font-size: 14px; }

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s;
}

.footer-links a:hover { color: #fff; }

.footer-legal { text-align: right; }
.footer-legal p { opacity: 0.5; font-size: 14px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; }
  .article-grid { grid-template-columns: 1fr; }
  .hot-grid { grid-template-columns: repeat(2, 1fr) !important; }
  
  .main-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    padding: 8px;
    justify-content: space-around;
    z-index: 100;
  }
  
  .main-nav a {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  .hero-story h1 { font-size: 28px; }
  
  .sources-grid { grid-template-columns: 1fr; }
  
  .modal { padding: 20px 10px; }
  .modal-image { height: 250px; }
  .modal-article h2 { font-size: 24px; }
}

@media (max-width: 768px) {
  .container { padding: 0 16px; }
  .sub-nav .container { flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* Section filtering - show/hide */
.section-filtered .section:not(.active-section) {
  display: none;
}

.section-filtered #hero-section {
  display: none;
}

.section-filtered .active-section {
  display: block !important;
}

main {
  padding-top: 4px;
}

/* ============================================
   SEARCH BOX (header)
   ============================================ */
.search-box {
  display: flex;
  align-items: center;
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  min-width: 220px;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-box input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 9px 16px;
  font-size: 14px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  outline: none;
  min-width: 0;
}

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

.search-btn {
  background: var(--accent);
  border: none;
  color: #fff;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-sans);
  font-weight: 500;
  white-space: nowrap;
}

.search-btn:hover { background: var(--accent-hover); }

/* ============================================
   SEARCH MODAL
   ============================================ */
.search-header {
  padding: 28px 28px 20px;
  border-bottom: 1px solid var(--border);
}

.search-header h2 {
  font-family: var(--font-serif);
  font-size: 22px;
  margin-bottom: 16px;
  color: var(--text-primary);
}

.search-input-wrapper {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-input-wrapper input {
  flex: 1;
  border: none;
  background: var(--bg-body);
  padding: 12px 16px;
  font-size: 15px;
  color: var(--text-primary);
  font-family: var(--font-sans);
  outline: none;
}

.search-input-wrapper input::placeholder { color: var(--text-muted); }
.search-input-wrapper .search-btn { padding: 12px 20px; font-size: 14px; }

#search-results {
  padding: 20px 28px 28px;
  max-height: 60vh;
  overflow-y: auto;
}

.search-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
  gap: 10px;
}

.search-loading::before {
  content: '';
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.search-result-item {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: opacity 0.2s;
}

.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { opacity: 0.75; }

.search-result-icon { font-size: 22px; flex-shrink: 0; margin-top: 2px; }

.search-result-body h4 {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
}

.search-result-body p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 6px;
}

.search-result-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.search-result-meta .cat-badge {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 2px 8px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.search-ai-summary {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 8px 8px 0;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.search-ai-summary .ai-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  margin-bottom: 6px;
}

.search-ai-summary p { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

.search-empty {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.search-empty .empty-icon { font-size: 40px; margin-bottom: 12px; }
.search-empty p { font-size: 15px; }

/* Header layout fix with search */
.main-header .container { gap: 16px; flex-wrap: nowrap; }

@media (max-width: 1200px) { .search-box { min-width: 160px; } }
@media (max-width: 1024px) { .search-box { display: none; } }

/* Design refinements */
.section-header { border-bottom-width: 3px; }
[data-theme="dark"] .card:hover { box-shadow: 0 4px 24px rgba(77,159,255,0.12); }
.hero-story .score { background: var(--accent-soft); padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 700; }
.top-bar { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); }
.logo-mark { filter: drop-shadow(0 0 6px rgba(0,102,204,0.4)); }
.sub-nav .container { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
.sub-nav .container::-webkit-scrollbar { display: none; }

/* ============================================
   HERO RELATED STORIES (fills vertical gap)
   ============================================ */
.hero-related {
  margin: 12px 20px 20px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-related-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.hero-related-item {
  display: flex;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.2s;
}

.hero-related-item:hover {
  background: var(--bg-body);
}

.hero-related-img {
  width: 72px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
}

.hero-related-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-related-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.hero-related-cat {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent);
}

.hero-related-text h4 {
  font-family: var(--font-serif);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

.hero-related-text .time {
  font-size: 11px;
  color: var(--text-muted);
}

/* ============================================
   HOT TOPICS GRID — enforced 2-col minimum
   ============================================ */
.hot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 16px;
}

@media (min-width: 900px) {
  .hot-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .hot-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Hero → Hot Topics breathing room */
#mixed-section {
  margin-top: 28px;
}

/* ============================================
   SECTION HERO (per-section top story)
   ============================================ */
.section-hero {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  margin-top: 16px;
  transition: box-shadow 0.3s;
}

.section-hero:hover {
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.section-hero-image {
  position: relative;
  min-height: 220px; max-height: 280px;
  overflow: hidden;
}

.section-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.section-hero:hover .section-hero-image img {
  transform: scale(1.03);
}

.section-hero-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}

.section-hero-body h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.25;
}

.section-hero-body p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.section-hero-body .label {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 4px;
  width: fit-content;
}

@media (max-width: 768px) {
  .section-hero {
    grid-template-columns: 1fr;
  }
  .section-hero-image {
    min-height: 200px;
  }
}
