/* Daily 8 News - Clean, Modern Stylesheet */

:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --text: #333;
  --text-light: #666;
  --bg: #f5f6f8;
  --card-bg: #fff;
  --border: #e1e4e8;
  --cat-world: #2196F3;
  --cat-politics: #9C27B0;
  --cat-business: #4CAF50;
  --cat-technology: #FF9800;
  --cat-science: #00BCD4;
  --cat-sports: #F44336;
  --cat-health: #E91E63;
  --cat-environment: #8BC34A;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* ── Header ── */
.site-header {
  background: #fff;
  border-bottom: 3px solid var(--primary);
  padding: 18px 0;
}

.logo {
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
}

.logo span { color: var(--primary); }

.tagline {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 4px;
}

/* ── Section 8News ── */
.section-8news {
  padding: 32px 0 24px;
}

.section-heading {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 16px;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.heading-8 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-size: 32px;
  font-weight: 900;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  line-height: 1;
}

.heading-date {
  font-size: 18px;
  color: var(--text-light);
  font-weight: 400;
}

/* ── Section: Date Index ── */
.section-date-index {
  padding: 16px 0 24px;
  border-top: 2px solid var(--border);
}

.date-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.date-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s;
}

.date-card:hover { border-color: var(--primary); background: #e8f0fe; }

.date-card.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.date-card-day {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.date-card-month {
  font-size: 14px;
  font-weight: 600;
  margin-top: 4px;
}

.date-card-weekday {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 2px;
}

.date-card.active .date-card-weekday { color: rgba(255,255,255,0.8); }

.date-card-count {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 6px;
}

.date-card.active .date-card-count { color: rgba(255,255,255,0.7); }

/* ── News Grid ── */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.news-item {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.news-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.news-cat {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 8px;
}

/* Category color badges */
.cat-world { background: var(--cat-world); color: #fff; }
.cat-politics { background: var(--cat-politics); color: #fff; }
.cat-business { background: var(--cat-business); color: #fff; }
.cat-technology { background: var(--cat-technology); color: #fff; }
.cat-science { background: var(--cat-science); color: #fff; }
.cat-sports { background: var(--cat-sports); color: #fff; }
.cat-health { background: var(--cat-health); color: #fff; }
.cat-environment { background: var(--cat-environment); color: #fff; }

.news-title {
  font-size: 17px;
  line-height: 1.4;
  margin: 4px 0 8px;
}

.news-title a { color: var(--text); text-decoration: none; }
.news-title a:hover { color: var(--primary); }

.news-summary {
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.5;
}

/* ── Section: 8 Categories ── */
.section-categories {
  padding: 8px 0 32px;
  border-top: 2px solid var(--border);
}

.section-heading-sub {
  font-size: 24px;
  font-weight: 700;
  margin: 16px 0;
  color: var(--text);
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.cat-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-radius: 8px;
  text-decoration: none;
  color: #fff;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.2s;
}

.cat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }

.cat-card.cat-world { background: var(--cat-world); }
.cat-card.cat-politics { background: var(--cat-politics); }
.cat-card.cat-business { background: var(--cat-business); }
.cat-card.cat-technology { background: var(--cat-technology); }
.cat-card.cat-science { background: var(--cat-science); }
.cat-card.cat-sports { background: var(--cat-sports); }
.cat-card.cat-health { background: var(--cat-health); }
.cat-card.cat-environment { background: var(--cat-environment); }

.cat-count { font-size: 12px; font-weight: 400; opacity: 0.9; }
.cat-arrow { font-size: 18px; }

/* ── Article Detail ── */
.article-page { padding: 32px 0; }

.article-full { max-width: 760px; margin: 0 auto; }

.article-full h1 {
  font-size: 32px;
  line-height: 1.3;
  margin-bottom: 12px;
}

.article-full time { color: var(--text-light); font-size: 14px; }
.article-full .views { color: var(--text-light); font-size: 14px; margin-left: 16px; }

.article-cat {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 12px;
}

.article-image { margin: 20px 0; }
.article-image img { max-width: 50%; border-radius: 8px; }

.article-content {
  margin-top: 24px;
  font-size: 17px;
  line-height: 1.8;
}

.article-content h2 { font-size: 24px; margin: 24px 0 12px; }
.article-content h3 { font-size: 20px; margin: 20px 0 10px; }
.article-content p { margin-bottom: 16px; }
.article-content ul, .article-content ol { margin: 16px 0; padding-left: 24px; }
.article-content li { margin-bottom: 8px; }
.article-content a { color: var(--primary); }
.article-content blockquote {
  border-left: 3px solid var(--primary);
  padding: 12px 20px;
  margin: 16px 0;
  background: rgba(26,115,232,0.05);
  font-style: italic;
}

/* ── Related Articles ── */
.related-articles { max-width: 760px; margin: 32px auto 0; }
.related-articles h3 { font-size: 20px; margin-bottom: 16px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.related-grid .card { padding: 14px; }
.related-grid .card h4 { font-size: 15px; line-height: 1.3; }
.related-grid .card h4 a { color: var(--text); text-decoration: none; }

/* ── Category Page ── */
.category-title { font-size: 28px; margin-bottom: 8px; }
.category-count { color: var(--text-light); font-size: 14px; margin-bottom: 20px; }

/* ── 404 ── */
.not-found { text-align: center; padding: 80px 0; }
.not-found h1 { font-size: 32px; margin-bottom: 16px; }
.back-link { color: var(--primary); text-decoration: none; font-weight: 600; }

.no-articles { text-align: center; padding: 60px 0; color: var(--text-light); }

/* ── Footer ── */
.site-footer {
  background: #333;
  color: #fff;
  padding: 24px 0;
  margin-top: 16px;
  text-align: center;
  font-size: 14px;
}

.footer-disclaimer {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  margin-top: 10px;
  line-height: 1.6;
  max-width: 600px;
}

/* ── Article Source ── */
.article-source {
  margin-top: 16px;
  padding: 10px 16px;
  background: rgba(26,115,232,0.08);
  border-left: 3px solid var(--primary);
  font-size: 14px;
  color: var(--text-light);
  border-radius: 0 6px 6px 0;
}

.news-source {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .news-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .section-heading { font-size: 28px; }
  .heading-8 { width: 36px; height: 36px; font-size: 26px; }
  .heading-date { font-size: 15px; }
  .article-full h1 { font-size: 24px; }
  .article-content { font-size: 15px; }
  .related-grid { grid-template-columns: 1fr; }
}