:root {
  --primary-color: #2563eb;
  --secondary-color: #f1f5f9;
  --bg-color: #f8fafc;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --border-color: #e2e8f0;
  --card-bg: #ffffff;
}

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

body {
  font-family: 'Noto Sans Malayalam', 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.main-header {
  background: var(--card-bg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.menu-toggle {
  display: block;
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-primary);
  cursor: pointer;
}

.logo { display: flex; align-items: center; }
.logo img { max-height: 40px; }
.logo h2 { font-size: 1.25rem; margin: 0; color: var(--primary-color); }

.desktop-nav { display: none; }
.desktop-nav ul { list-style: none; display: flex; gap: 1.5rem; }
.desktop-nav a { font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
.desktop-nav a:hover { color: var(--primary-color); }

.header-actions button { background: none; border: none; font-size: 1.1rem; cursor: pointer; color: var(--text-primary); }

/* Mobile Nav */
.mobile-nav {
  position: fixed;
  top: 0;
  left: -280px;
  width: 280px;
  height: 100%;
  background: var(--card-bg);
  z-index: 1000;
  box-shadow: 2px 0 8px rgba(0,0,0,0.1);
  transition: left 0.3s ease;
  overflow-y: auto;
}
.mobile-nav.active { left: 0; }
.mobile-nav-header {
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
}
.close-menu { background: none; border: none; font-size: 1.25rem; cursor: pointer; color: var(--text-secondary); }
.mobile-nav ul { list-style: none; }
.mobile-nav ul li a {
  display: block;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  font-weight: 500;
}

.mobile-nav-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.mobile-nav-overlay.active { display: block; opacity: 1; }

/* Main Content */
.main-content { padding: 1.5rem 0; min-height: 60vh; }

/* News List Layout */
.news-list { display: flex; flex-direction: column; }

.news-item {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--border-color);
  background: transparent;
  transition: opacity 0.2s;
}

.news-item:hover { opacity: 0.8; }
.news-item:last-child { border-bottom: none; }

.news-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.news-content h3 {
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-excerpt {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.news-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.news-meta .category {
  font-size: 0.75rem;
  font-weight: 600;
  color: #3b5998;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.news-meta i {
  color: #9ca3af;
  font-size: 1.1rem;
}

.news-image {
  width: 110px;
  height: 95px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
}

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

/* Ads */
.ad-container {
  margin: 1rem 0;
  text-align: center;
  background: #f1f5f9;
  padding: 0.5rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: #94a3b8;
}
.ad-container::before { content: 'Advertisement'; display: block; margin-bottom: 0.25rem; }
.ad-container img { max-width: 100%; height: auto; border-radius: 4px; }

/* Footer */
.main-footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 2rem;
  text-align: center;
}
.footer-logo { max-height: 40px; margin-bottom: 1rem; }
.footer-about p { color: var(--text-secondary); font-size: 0.9rem; max-width: 600px; margin: 0 auto 1.5rem auto; }
.footer-social { display: flex; justify-content: center; gap: 1rem; margin-bottom: 1.5rem; }
.footer-social a {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  background: var(--secondary-color);
  color: var(--text-primary);
  border-radius: 50%;
  transition: all 0.2s;
}
.footer-social a:hover { background: var(--primary-color); color: white; transform: translateY(-2px); }
.footer-copyright { color: var(--text-secondary); font-size: 0.8rem; }

/* Responsive adjustments */
@media (min-width: 768px) {
  .menu-toggle { display: none; }
  .desktop-nav { display: block; }
  
  .news-image { width: 200px; height: 130px; }
  .news-content h3 { font-size: 1.25rem; }
  .news-excerpt { font-size: 0.95rem; }
  .news-meta .category { font-size: 0.85rem; }
}

/* Single Article Page */
.article-container { display: flex; flex-direction: column; gap: 2rem; padding: 1rem 0; }
.article-main { flex: 1; }
.article-sidebar { display: none; width: 320px; flex-shrink: 0; }

.article-header { margin-bottom: 1.5rem; }
.article-category { background: var(--primary-color); color: white; padding: 0.2rem 0.6rem; border-radius: 4px; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; display: inline-block; margin-bottom: 1rem; }
.article-title { font-size: 1.6rem; line-height: 1.4; margin-bottom: 1rem; font-weight: 700; color: var(--text-primary); }
.article-meta { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 1rem; display: flex; gap: 1rem; align-items: center; }

.article-featured-image { width: 100%; border-radius: 8px; overflow: hidden; margin-bottom: 2rem; }
.article-featured-image img { width: 100%; height: auto; display: block; object-fit: cover; }

.article-content { font-size: 1.05rem; line-height: 1.8; color: var(--text-primary); margin-bottom: 2rem; }
.article-content p { margin-bottom: 1.5rem; }
.article-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 1.5rem 0; display: block; }

.sidebar-widget { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 8px; padding: 1.25rem; margin-bottom: 2rem; }
.sidebar-widget h3 { margin-bottom: 1rem; font-size: 1.1rem; border-bottom: 2px solid var(--primary-color); padding-bottom: 0.5rem; display: inline-block; color: var(--text-primary); }

.sidebar-news-list { display: flex; flex-direction: column; gap: 1rem; }
.sidebar-news-item { display: flex; gap: 0.75rem; border-bottom: 1px solid var(--border-color); padding-bottom: 1rem; transition: opacity 0.2s; }
.sidebar-news-item:hover { opacity: 0.8; }
.sidebar-news-item:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-news-img { width: 80px; height: 60px; flex-shrink: 0; border-radius: 4px; overflow: hidden; }
.sidebar-news-img img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-news-content h4 { font-size: 0.9rem; line-height: 1.3; font-weight: 600; color: var(--text-primary); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

@media (min-width: 992px) {
  .article-container { flex-direction: row; }
  .article-sidebar { display: block; }
  .article-title { font-size: 2rem; }
}

/* WhatsApp Share Button */
.whatsapp-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #25D366;
    color: white !important;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background-color 0.2s;
}
.whatsapp-share-btn:hover {
    background-color: #128C7E;
}
