/* ---- Article Header ---- */
.article-header {
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e0e0e0;
}

.article-title {
  font-size: 1.85rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.25;
  margin-bottom: 12px;
  font-family: 'Roboto', sans-serif;
}

.article-lead {
  margin-bottom: 12px;
  line-height: 1.7;
}

.article-meta { margin-top: 8px; }

.badge-category {
  display: inline-block;
    background-color: #ee000012;
    color: #ee0000;
    border: 1px solid #ee0000;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---- Section Cards ---- */

.section-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 22px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.section-card-header {
  padding: 10px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #fff;
}

.section-card-body {
  padding: 16px;
}

/* People & Companies */
.people-header { background-color: #2c3e50; }

.tag-group { display: flex; flex-wrap: wrap; gap: 8px; }

.entity-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  border-radius: 3px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #3f3f3f !important;
  text-decoration: none !important;
  transition: opacity 0.2s, transform 0.15s;
}
.entity-tag:hover { opacity: 0.85; transform: translateY(-1px); }

.person-tag { background-color: #e2e2e2; border: 1px solid #cdcdcd; }
.company-tag {     background-color: #e2e2e2; border: 1px solid #cdcdcd; }

/* Top Insights */
.insights-header { background-color: #13b0cd; }

.insights-body { padding: 0; }

.insight-item {
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
}
.insight-item:hover { background-color: #fafff8; }
.insight-item.last-insight { border-bottom: none; }

.insight-title {
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.insight-text {
  margin: 0;
  line-height: 1.55;
}

/* Timeline */
.timeline-header { background-color: #c0392b; }

.timeline-body { padding: 16px 16px 8px; }

.timeline { position: relative; }
.timeline::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 24px;
  width: 2px;
  background: linear-gradient(to bottom, #c0392b, #e74c3c80);
}

.timeline-item {
  position: relative;
  padding-left: 30px;
  padding-bottom: 22px;
}
.timeline-item.last-timeline-item { padding-bottom: 8px; }

.timeline-dot {
  position: absolute;
  left: 0;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #c0392b;
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px #c0392b;
  z-index: 1;
}

.timeline-date {
  font-size: 0.72rem;
  font-weight: 700;
  color: #c0392b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.timeline-event-title {
  font-weight: 700;
  margin-bottom: 3px;
}

.timeline-event-desc {
  margin: 0;
}

/* Latest Articles */
.articles-header { background-color: #2b6cb0; }

.articles-count-badge {
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(255,255,255,0.2);
  padding: 3px 10px;
  border-radius: 10px;
  color: #fff;
}

.article-list-item {
  display: flex;
  align-items: flex-start;
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
  gap: 14px;
}
.article-list-item:hover { background-color: #f7f9fc; }
.article-list-item.last-article-item { border-bottom: none; }

.article-thumb-wrap {
  flex-shrink: 0;
}

.article-thumb {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 3px;
  border: 1px solid #e0e0e0;
  display: block;
}

.article-list-content { flex: 1; min-width: 0; }

.article-list-title {
  font-weight: 700;
  display: block;
  margin-bottom: 4px;
  line-height: 1.4;
  text-decoration: none !important;
}
.article-list-title:hover { color: #2b6cb0 !important; text-decoration: underline !important; }

.article-list-desc {
  margin-bottom: 5px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-list-meta {
  font-size: 0.72rem;
  color: #999;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar-col { padding-left: 10px; }

.sidebar-widget {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.sidebar-widget-header {
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #fff;
  text-align: center;
}

.top-stories-header { background-color: #c0392b; }
.popular-header { background-color: #d4a007; }

/* Sidebar Tabs */
.sidebar-widget-tabs { border-bottom: none; }

.sidebar-tabs {
  border-bottom: 2px solid #e0e0e0;
  padding: 0 8px;
  background: #fafafa;
}

.sidebar-tabs .nav-item { flex: 1; text-align: center; }

.sidebar-tabs .nav-link {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  padding: 8px 6px;
  margin-bottom: -2px;
  transition: color 0.2s, border-color 0.2s;
}

.sidebar-tabs .nav-link:hover { color: #333; }

.sidebar-tabs .nav-link.active {
  color: #c0392b;
  border-bottom: 2px solid #c0392b;
  background: transparent;
}

/* Sidebar Story List */
.sidebar-tab-content { padding: 0; }

.sidebar-story-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-story-item {
  padding: 10px 14px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
}
.sidebar-story-item:last-child { border-bottom: none; }
.sidebar-story-item:hover { background: #f8f8f8; }

.sidebar-story-link {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #2c3e50 !important;
  line-height: 1.4;
  margin-bottom: 4px;
  text-decoration: none !important;
}
.sidebar-story-link:hover { color: #c0392b !important; }

.sidebar-story-date {
  font-size: 0.7rem;
  color: #aaa;
}

/* See More */
.see-more-wrap {
  padding: 8px 14px 10px;
  text-align: right;
  border-top: 1px solid #f0f0f0;
}

.see-more-link {
  font-size: 0.72rem;
  font-weight: 700;
  color: #c0392b !important;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none !important;
  transition: opacity 0.2s;
}
.see-more-link:hover { opacity: 0.75; }

/* Trending Tags */
.trending-tags {
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.trending-tag {
  display: inline-block;
  background: #f0f4f8;
  color: #2c3e50 !important;
  border: 1px solid #d0dae4;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 3px;
  text-decoration: none !important;
  transition: background 0.2s, color 0.2s;
}
.trending-tag:hover {
  background: #c0392b;
  color: #fff !important;
  border-color: #c0392b;
}

/* AI Badge */
.ai-badge-box {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid #334;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.ai-badge-inner {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  gap: 14px;
}

.ai-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6c3bde, #3b82f6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
  color: #fff;
  animation: aiPulse 2.5s infinite;
}

@keyframes aiPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(108, 59, 222, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(108, 59, 222, 0); }
}

.ai-text {
  display: flex;
  flex-direction: column;
}

.ai-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #a78bfa;
  letter-spacing: 0.4px;
}

.ai-sublabel {
  font-size: 0.72rem;
  color: #7a8aa0;
  margin-top: 2px;
}

/* ---- Footer ---- */
.site-footer {
  background-color: #1a1a2e;
  color: #aaa;
  padding: 28px 0 20px;
  margin-top: 20px;
}

.footer-brand {
  font-size: 1.4rem;
  font-weight: 700;
}

.footer-desc {
  font-size: 0.8rem;
  color: #888;
  max-width: 320px;
}

.footer-copy {
  font-size: 0.78rem;
  color: #666;
  margin-bottom: 10px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2c3e50;
  color: #ccc !important;
  margin-left: 6px;
  font-size: 0.8rem;
  text-decoration: none !important;
  transition: background 0.2s, color 0.2s;
}
.footer-social a:hover {
  background: #c0392b;
  color: #fff !important;
}

/* ---- Animations ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.article-header   { animation: fadeInUp 0.5s ease both; }
.section-card:nth-child(1) { animation: fadeInUp 0.5s ease 0.05s both; }
.section-card:nth-child(2) { animation: fadeInUp 0.5s ease 0.10s both; }
.section-card:nth-child(3) { animation: fadeInUp 0.5s ease 0.15s both; }
.section-card:nth-child(4) { animation: fadeInUp 0.5s ease 0.20s both; }
.sidebar-widget    { animation: fadeInUp 0.5s ease 0.25s both; }

/* ---- Typewriter Cursor ---- */
.tw-cursor {
  display: inline-block;
  color: #c0392b;
  font-weight: 300;
  margin-left: 1px;
  opacity: 1;
  font-size: 1em;
  line-height: 1;
  vertical-align: baseline;
  animation: none;
}

.tw-cursor-blink {
  animation: twBlink 0.5s step-start 0s 4;
}

@keyframes twBlink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* Prevent layout shift while text is hidden before typing */
.article-title,
.article-lead,
.badge-category,
.section-card-header,
.insight-title,
.insight-text,
.timeline-date,
.timeline-event-title,
.timeline-event-desc,
.article-list-title,
.article-list-desc {
  min-height: 1em;
}

/* Subtle green underline glow on insight titles as they type */
.insight-title {
  display: inline-block;
  border-bottom: 2px solid transparent;
  transition: border-color 0.4s ease 0.3s;
}
.insight-title.tw-done {
  border-bottom-color: #27ae60;
}

/* Red left-border pulse on timeline dates as they type */
.timeline-date {
  position: relative;
}

/* ---- Responsive ---- */
@media (max-width: 767.98px) {
  .article-title { font-size: 1.4rem; }
  .sidebar-col { padding-left: 15px; margin-top: 20px; }

  .article-list-item { flex-direction: column; }
  .article-thumb { width: 100%; height: 160px; }
}

.tw-cursor {
    display: none !important;
}