@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Kannada:wght@300;400;500;600;700;800&family=Noto+Serif+Kannada:wght@400;600;700&display=swap');

:root {
  --primary: #9b1b30;
  --primary-dark: #7a0f22;
  --secondary: #f4a51b;
  --accent: #e8b400;
  --dark: #1a1a1a;
  --gray: #6c757d;
  --light-gray: #f0f0f0;
  --border: #e0e0e0;
  --white: #ffffff;
  --card-shadow: 0 2px 12px rgba(0,0,0,0.1);
  --radius: 8px;
}

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

body {
  font-family: 'Noto Sans Kannada', sans-serif;
  background: #f5f5f5;
  color: var(--dark);
  font-size: 15px;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ---- TOP BAR ---- */
.top-bar {
  background: var(--dark);
  color: #ccc;
  font-size: 12px;
  padding: 6px 0;
}
.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar a { color: #ccc; margin-left: 12px; transition: color 0.2s; }
.top-bar a:hover { color: var(--secondary); }

/* ---- HEADER ---- */
.site-header {
  background: linear-gradient(135deg, var(--primary) 0%, #c0392b 100%);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 3px 10px rgba(0,0,0,0.3);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
}
.logo-icon {
  width: 54px;
  height: 54px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.logo-icon svg { width: 28px; height: 28px; fill: var(--primary); }
.logo-icon img { width: 54px; height: 54px; object-fit: cover; border-radius: 50%; }
.logo-text h1 {
  font-family: 'Noto Serif Kannada', serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.3px;
}
.logo-text p {
  font-size: 11px;
  opacity: 0.85;
  font-weight: 400;
}

.header-search {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 25px;
  overflow: hidden;
  max-width: 280px;
  width: 100%;
}
.header-search input {
  background: none;
  border: none;
  outline: none;
  color: white;
  padding: 8px 14px;
  width: 100%;
  font-family: 'Noto Sans Kannada', sans-serif;
  font-size: 13px;
}
.header-search input::placeholder { color: rgba(255,255,255,0.6); }
.header-search button {
  background: none;
  border: none;
  color: white;
  padding: 8px 14px;
  cursor: pointer;
  font-size: 16px;
}
.header-search button:hover { background: rgba(255,255,255,0.1); }

/* ---- NAV ---- */
.main-nav {
  background: var(--primary-dark);
  border-top: 2px solid var(--secondary);
}
.main-nav .container {
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
}
.main-nav .container::-webkit-scrollbar { display: none; }
.main-nav a {
  color: rgba(255,255,255,0.85);
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s;
  border-bottom: 3px solid transparent;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--secondary);
  border-bottom-color: var(--secondary);
  background: rgba(255,255,255,0.06);
}

/* ---- BREAKING NEWS ---- */
.breaking-news {
  background: var(--accent);
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 38px;
}
.breaking-label {
  background: var(--primary);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 0 16px;
  white-space: nowrap;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.breaking-label .dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: blink 1s infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.2} }

.ticker-wrap {
  overflow: hidden;
  flex: 1;
}
.ticker-content {
  display: inline-flex;
  animation: ticker 40s linear infinite;
  white-space: nowrap;
}
.ticker-content a {
  font-size: 13px;
  font-weight: 500;
  color: var(--dark);
  padding: 0 40px;
}
.ticker-content a:hover { text-decoration: underline; }
@keyframes ticker { 0%{transform:translateX(0)} 100%{transform:translateX(-50%)} }

/* ---- CONTAINER ---- */
.container { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ---- PAGE LAYOUT ---- */
.page-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  padding: 24px 0;
}

/* ---- SECTION TITLE ---- */
.section-title {
  font-family: 'Noto Serif Kannada', serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
  padding-bottom: 10px;
  border-bottom: 3px solid var(--primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ---- FEATURED ---- */
.featured-article {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
  background: var(--dark);
  min-height: 360px;
  box-shadow: var(--card-shadow);
  cursor: pointer;
}
.featured-article img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.65;
  position: absolute;
  inset: 0;
}
.featured-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary) 0%, #2c3e50 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
  opacity: 0.3;
}
.featured-body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
  padding: 32px 24px 24px;
  color: white;
}
.featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.featured-title {
  font-family: 'Noto Serif Kannada', serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
}
.featured-meta {
  font-size: 12px;
  opacity: 0.75;
  display: flex;
  gap: 16px;
}

/* ---- CATEGORY TABS ---- */
.category-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.cat-tab {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 2px solid var(--border);
  background: white;
  color: var(--gray);
  transition: all 0.2s;
  font-family: 'Noto Sans Kannada', sans-serif;
}
.cat-tab:hover,
.cat-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ---- NEWS GRID ---- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 24px;
}

/* ---- NEWS CARD ---- */
.news-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.news-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}
.card-image {
  height: 180px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.news-card:hover .card-image img { transform: scale(1.05); }
.card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
  color: #bbb;
}
.card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.card-category {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.card-title {
  font-family: 'Noto Serif Kannada', serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--dark);
  margin-bottom: 8px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-summary {
  font-size: 13px;
  color: var(--gray);
  line-height: 1.5;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: #999;
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: auto;
}
.card-meta span { display: flex; align-items: center; gap: 4px; }
.breaking-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
}

/* Category colors */
.cat-ರಾಜ್ಯ    { background: #fdecea; color: #c62828; }
.cat-ರಾಷ್ಟ್ರ   { background: #e3f2fd; color: #1565c0; }
.cat-ಅಂತರರಾಷ್ಟ್ರೀಯ { background: #f3e5f5; color: #6a1b9a; }
.cat-ರಾಜಕೀಯ  { background: #fff3e0; color: #e65100; }
.cat-ಕ್ರೀಡೆ    { background: #e8f5e9; color: #2e7d32; }
.cat-ಮನರಂಜನೆ { background: #fce4ec; color: #880e4f; }
.cat-ತಂತ್ರಜ್ಞಾನ { background: #e0f7fa; color: #00695c; }
.cat-ಆರೋಗ್ಯ  { background: #e8f5e9; color: #1b5e20; }
.cat-ವ್ಯಾಪಾರ  { background: #fbe9e7; color: #bf360c; }
.cat-ಶಿಕ್ಷಣ    { background: #e8eaf6; color: #283593; }

/* ---- PAGINATION ---- */
.pagination {
  display: flex;
  gap: 8px;
  justify-content: center;
  padding: 20px 0;
}
.page-btn {
  width: 38px; height: 38px;
  border: 2px solid var(--border);
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Noto Sans Kannada', sans-serif;
  font-size: 14px;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.page-btn:hover, .page-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---- SIDEBAR ---- */
.sidebar { display: flex; flex-direction: column; gap: 20px; }

.sidebar-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
}
.sidebar-card-header {
  background: var(--primary);
  color: white;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-news-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}
.sidebar-news-item:last-child { border-bottom: none; }
.sidebar-news-item:hover { background: #f9f9f9; }
.sidebar-news-thumb {
  width: 64px; height: 64px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.sidebar-news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-thumb-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #bbb;
}
.sidebar-news-text { flex: 1; }
.sidebar-news-title {
  font-family: 'Noto Serif Kannada', serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sidebar-news-date { font-size: 11px; color: #999; margin-top: 4px; }

/* ---- WEATHER WIDGET ---- */
.weather-widget {
  background: linear-gradient(135deg, var(--primary) 0%, #c0392b 100%);
  color: white;
  padding: 20px;
  border-radius: var(--radius);
  text-align: center;
}
.weather-widget h3 { font-size: 13px; opacity: 0.85; margin-bottom: 6px; }
.weather-city { font-size: 16px; font-weight: 700; margin-bottom: 2px; opacity: 0.9; }
#weatherTemp { font-size: 36px; font-weight: 800; margin: 2px 0; letter-spacing: -1px; }
#weatherDesc { font-size: 13px; opacity: 0.85; margin-bottom: 8px; }
#weatherExtra { font-size: 11px; opacity: 0.75; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
#weatherExtra span { background: rgba(255,255,255,0.15); padding: 2px 8px; border-radius: 10px; }

/* ---- FOOTER ---- */
.site-footer {
  background: var(--dark);
  color: #ccc;
  margin-top: 40px;
}
.footer-main {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding: 40px 0;
}
.footer-brand h3 {
  font-family: 'Noto Serif Kannada', serif;
  color: white;
  font-size: 20px;
  margin-bottom: 12px;
}
.footer-brand p { font-size: 13px; line-height: 1.7; opacity: 0.75; }
.footer-col h4 { color: white; font-size: 14px; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid var(--primary); }
.footer-col a {
  display: block;
  color: #aaa;
  font-size: 13px;
  padding: 4px 0;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--secondary); }
.footer-bottom {
  border-top: 1px solid #333;
  padding: 16px 0;
  text-align: center;
  font-size: 12px;
  opacity: 0.6;
}

/* ---- LOADING / EMPTY ---- */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--gray);
  gap: 14px;
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid #eee;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 14px; }
.empty-state p { font-size: 15px; }

/* ---- LANGUAGE TOGGLE ---- */
.lang-toggle {
  background: rgba(255,255,255,0.15);
  border: 1.5px solid rgba(255,255,255,0.45);
  color: white;
  padding: 5px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-family: 'Noto Sans Kannada', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: background 0.2s, border-color 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.lang-toggle:hover {
  background: rgba(255,255,255,0.3);
  border-color: rgba(255,255,255,0.7);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { order: -1; }
}
@media (max-width: 640px) {
  .news-grid { grid-template-columns: 1fr; }
  .logo-text h1 { font-size: 18px; }
  .featured-title { font-size: 18px; }
  .footer-main { grid-template-columns: 1fr; gap: 24px; }
  .header-search { display: none; }
}
