/* Base Settings */
:root {
  --accent: #dc2626; /* Red-600 */
  --text-main: #111827;
  --text-muted: #6b7280;
  --bg-body: #ffffff;
  --max-w: 1200px;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  margin: 0;
}

.container-custom {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
}

/* Nav Links */
nav a {
  position: relative;
  transition: color 0.3s;
}
nav a.active {
  color: var(--accent);
}
nav a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--accent);
}

/* Ticker Animation */
.ticker-track {
  animation: ticker 80s linear infinite;
}
.ticker-track:hover {
  animation-play-state: paused;
}
@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Hero Section */
.hero-card {
  position: relative;
  height: 500px; /* Taller hero */
  border-radius: 4px;
  overflow: hidden;
  display: block;
}
.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s;
}
.hero-card:hover img {
  transform: scale(1.05);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 40px;
}
.hero-cat {
  background: var(--accent);
  color: white;
  padding: 4px 12px;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 16px;
  align-self: flex-start;
  letter-spacing: 0.5px;
}
.hero-title {
  color: white;
  font-size: 36px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 16px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
@media (max-width: 768px) {
    .hero-card { height: 350px; }
    .hero-title { font-size: 24px; }
    .hero-overlay { padding: 20px; }
}

/* Article Card */
.article-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  group: hover;
}
.article-thumb {
  height: 240px;
  overflow: hidden;
  margin-bottom: 16px;
  position: relative;
  border-radius: 4px;
}
.article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}
.article-card:hover .article-thumb img {
  transform: scale(1.1);
}
.article-meta {
    font-size: 11px;
    color: #9ca3af;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.article-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.4;
  margin-bottom: 10px;
  color: var(--text-main);
  transition: color 0.2s;
}
.article-card:hover .article-title {
  color: var(--accent);
}

/* Sidebar */
.top-news-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  text-decoration: none;
}
.top-news-number {
    font-size: 30px;
    font-weight: 900;
    color: #e5e7eb;
    line-height: 1;
}
.top-news-content h5 {
    font-weight: 700;
    font-size: 15px;
    line-height: 1.4;
    margin-bottom: 4px;
    transition: color 0.2s;
}
.top-news-item:hover h5 { color: var(--accent); }

/* Pagination */
.page-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  background: white;
  color: var(--text-main);
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.page-btn:hover, .page-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Loader */
#loading-overlay {
  position: fixed; inset: 0; background: white;
  display: flex; justify-content: center; align-items: center; z-index: 1000;
}
.spinner {
  width: 50px; height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: white;
  padding: 14px 0;
  transition: box-shadow 0.25s ease;
}

/* shadow when scrolled */
header.scrolled {
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}