:root {
  --primary-red: #cc0000;
  --dark-red: #990000;
  --light-gray: #f8f9fa;
  --medium-gray: #6c757d;
  --dark-gray: #343a40;
  --white: #ffffff;
  --black: #000000;
  --border-color: #dee2e6;
  --shadow: 0 2px 4px rgba(0,0,0,0.1);
  --shadow-hover: 0 4px 8px rgba(0,0,0,0.15);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: var(--dark-gray);
  background-color: var(--white);
}

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

/* Header Styles */
.header {
  background-color: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  background-color: var(--primary-red);
  color: var(--white);
  padding: 8px 0;
  font-size: 0.875rem;
}

.header-main {
  padding: 1rem 0;
}

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

.logo {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-red);
  text-decoration: none;
  letter-spacing: -1px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--dark-gray);
}

.main-nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav li {
  margin-left: 2rem;
}

.main-nav a {
  text-decoration: none;
  color: var(--dark-gray);
  font-weight: 500;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

.main-nav a:hover {
  color: var(--primary-red);
}

/* Hero Section */
.hero {
  background-color: var(--light-gray);
  padding: 2rem 0;
}

.hero-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.hero-main {
  position: relative;
}

.hero-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 8px;
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: var(--white);
  padding: 2rem;
  border-radius: 0 0 8px 8px;
}

.hero-category {
  background-color: var(--primary-red);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.hero-title a {
  color: var(--white);
  text-decoration: none;
}

.hero-meta {
  font-size: 0.875rem;
  opacity: 0.9;
}

.hero-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-item {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s ease;
}

.sidebar-item:hover {
  box-shadow: var(--shadow-hover);
}

.sidebar-item img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.sidebar-content {
  padding: 1rem;
}

.sidebar-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.sidebar-title a {
  color: var(--dark-gray);
  text-decoration: none;
}

.sidebar-title a:hover {
  color: var(--primary-red);
}

.sidebar-meta {
  font-size: 0.8rem;
  color: var(--medium-gray);
}

/* Main Content */
.main-content {
  padding: 3rem 0;
}

.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

.articles-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--primary-red);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.article-card {
  background-color: var(--white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.article-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-content {
  padding: 1.5rem;
}

.article-category {
  background-color: var(--primary-red);
  color: var(--white);
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
  margin-bottom: 1rem;
}

.article-title {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.article-title a {
  color: var(--dark-gray);
  text-decoration: none;
}

.article-title a:hover {
  color: var(--primary-red);
}

.article-excerpt {
  color: var(--medium-gray);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: var(--medium-gray);
}

.read-more {
  color: var(--primary-red);
  text-decoration: none;
  font-weight: 500;
}

.read-more:hover {
  text-decoration: underline;
}

/* Sidebar */
.sidebar {
  background-color: var(--light-gray);
  padding: 2rem;
  border-radius: 8px;
  height: fit-content;
}

.sidebar h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-red);
}

.trending-list {
  list-style: none;
}

.trending-item {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

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

.trending-title {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.trending-title a {
  color: var(--dark-gray);
  text-decoration: none;
}

.trending-title a:hover {
  color: var(--primary-red);
}

.trending-meta {
  font-size: 0.8rem;
  color: var(--medium-gray);
}

/* Footer */
.footer {
  background-color: var(--dark-gray);
  color: var(--white);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--white);
}

.footer-section ul {
  list-style: none;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: #adb5bd;
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-section a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid #495057;
  padding-top: 1rem;
  text-align: center;
  color: #adb5bd;
  font-size: 0.875rem;
}

/* Google AdSense Compliance Styles */
.ad-container {
  margin: 2rem 0;
  text-align: center;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  padding: 1rem;
  background-color: #f8f9fa;
}

.ad-label {
  font-size: 0.75rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

/* Schema.org structured data support */
.article-schema {
  display: none;
}

/* Accessibility improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles for accessibility */
a:focus,
button:focus {
  outline: 2px solid #cc0000;
  outline-offset: 2px;
}

/* Random News Tabs */
.tab-button {
  border: none;
  background: none;
  cursor: pointer;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tab-button.active {
  background-color: rgba(34, 197, 94, 0.1);
  border-radius: 4px;
}

.tab-button:hover {
  background-color: rgba(34, 197, 94, 0.05);
}

/* Loading animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Categories Section */
.categories-list {
  list-style: none;
}

.category-item {
  transition: all 0.3s ease;
}

.category-item:hover {
  transform: translateX(5px);
}

/* Ad Space Styling */
.ad-space {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.ad-space:hover {
  border-color: #d1d5db;
  background-color: #f9fafb;
}

.ad-space::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transition: left 0.5s;
}

.ad-space:hover::before {
  left: 100%;
}

/* Latest News Cards */
.latest-news-card {
    transition: all 0.3s ease;
}

.latest-news-card:hover {
    transform: translateY(-5px);
}

.latest-news-card .card-overlay {
    background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 100%);
}

/* Reading time badge */
.reading-time-badge {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Stats icons */
.stats-icon {
    transition: color 0.2s ease;
}

.stats-icon:hover {
    color: #cc0000;
}

/* AdSense compliance styles */
.adsbygoogle {
  display: block !important;
}

/* Single Article Page */
.article-header {
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-color);
}

.article-title-page {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--dark-gray);
}

.article-meta-page {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--medium-gray);
  font-size: 0.95rem;
}

.article-body {
  padding: 2rem 0;
  max-width: 800px;
}

.article-body img {
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
  border-radius: 8px;
}

.article-body p {
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.7;
}

.article-body h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2rem 0 1rem;
  color: var(--dark-gray);
}

.article-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.5rem 0 1rem;
  color: var(--dark-gray);
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }
  
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--white);
    box-shadow: var(--shadow);
  }
  
  .main-nav.active {
    display: block;
  }
  
  .main-nav ul {
    flex-direction: column;
    padding: 1rem;
  }
  
  .main-nav li {
    margin: 0.5rem 0;
  }
  
  .hero-content {
    grid-template-columns: 1fr;
  }
  
  .hero-title {
    font-size: 1.5rem;
  }
  
  .content-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .articles-grid {
    grid-template-columns: 1fr;
  }
  
  .article-title-page {
    font-size: 2rem;
  }
  
  .container {
    padding: 0 15px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.25rem;
  }
  
  .article-title-page {
    font-size: 1.75rem;
  }
  
  .logo {
    font-size: 1.5rem;
  }
  
  .hero-overlay {
    padding: 1rem;
  }
  
  .article-content {
    padding: 1rem;
  }
}