/*
Theme Name: EE Samachar News
Theme URI: https://eesamachara.com/
Author: Deneb Studios
Author URI: https://share.google/V739ro1IUA3ifTv3r
Description: Ultra-lightweight, Pingdom 95+ performance-optimized WordPress theme designed exclusively for Kannada News Channel "ಈ ಸಮಾಚಾರ" (EE Samachar). Features automatic WebP image optimization, breaking news flash ticker, responsive category layouts, and high-legibility Kannada typography.
Version: 1.0.0
Tested up to: 6.7
Requires at least: 5.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: ee-samachar
*/

/* ==========================================================================
   CSS VARIABLES & DESIGN TOKENS
   ========================================================================== */
:root {
  --primary-color: #c8102e;       /* Kannada News Channel Crimson Red */
  --primary-dark: #9f0a22;
  --primary-light: #fef2f2;
  --secondary-color: #0f172a;     /* Deep Slate Navy */
  --accent-gold: #d97706;         /* Gold Highlights */
  --accent-blue: #1d4ed8;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --font-kannada: 'Noto Sans Kannada', 'Tiro Kannada', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1240px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  --shadow-hover: 0 10px 15px -3px rgba(0,0,0,0.12);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & BASE STYLES (Lightweight, No Bootstrap bloat)
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-kannada);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-color);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* ==========================================================================
   TOP BAR (Date, Kannada Time, Flash Ticker)
   ========================================================================== */
.site-topbar {
  background-color: var(--secondary-color);
  color: #f8fafc;
  font-size: 0.85rem;
  border-bottom: 2px solid var(--primary-color);
  padding: 6px 0;
}

.topbar-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.topbar-date {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  white-space: nowrap;
}

.topbar-date svg {
  width: 15px;
  height: 15px;
  fill: var(--accent-gold);
}

.topbar-ticker {
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 700px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
}

.ticker-badge {
  background-color: var(--primary-color);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 2px;
  margin-right: 8px;
  white-space: nowrap;
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.75; }
}

.ticker-content {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.82rem;
}

.ticker-content a {
  color: #f1f5f9;
}
.ticker-content a:hover {
  color: var(--accent-gold);
}

/* ==========================================================================
   HEADER & LOGO AREA
   ========================================================================== */
.site-header {
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-color);
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  gap: 1.5rem;
}

.site-branding {
  display: flex;
  align-items: center;
}

.site-logo-link {
  display: inline-flex;
  align-items: center;
}

.site-logo {
  height: auto;
  max-height: 70px;
  width: auto;
  max-width: 290px;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.site-logo:hover {
  transform: scale(1.02);
}

.header-ads-or-tagline {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tagline-badge {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary-color);
  background: var(--primary-light);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px dashed var(--primary-color);
}

.header-social {
  display: flex;
  gap: 8px;
}

.social-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #f1f5f9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
  transition: var(--transition);
}

.social-icon-btn:hover {
  background: var(--primary-color);
  color: #ffffff;
}

/* ==========================================================================
   NAVIGATION BAR & DROPDOWNS (News Categories - Dark Blue Background)
   ========================================================================== */
.site-nav {
  background-color: #0e2d54; /* Deep Navy Blue (matching EE Samachar brand) */
  background: linear-gradient(90deg, #0a1f3a 0%, #0e2d54 50%, #0a1f3a 100%);
  position: sticky;
  top: 0;
  z-index: 999;
  border-bottom: 3px solid var(--primary-color);
  box-shadow: 0 3px 12px rgba(10, 31, 58, 0.4);
}

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

.main-menu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.main-menu > li {
  position: relative;
}

.main-menu > li > a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0.85rem 1.15rem;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.2px;
  border-bottom: 3px solid transparent;
  transition: var(--transition);
}

.main-menu > li:hover > a,
.main-menu > li.current-menu-item > a {
  background: rgba(255, 255, 255, 0.12);
  border-bottom-color: var(--accent-gold);
  color: #ffffff;
}

/* Dropdown styling */
.main-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #ffffff;
  box-shadow: var(--shadow-hover);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  border-top: 3px solid var(--accent-gold);
  z-index: 1000;
}

.main-menu > li:hover .sub-menu {
  display: block;
}

.main-menu .sub-menu li a {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--secondary-color);
  font-size: 0.92rem;
  font-weight: 600;
  border-bottom: 1px solid #f1f5f9;
}

.main-menu .sub-menu li a:hover {
  background: var(--primary-light);
  color: var(--primary-color);
  padding-left: 1.25rem;
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  padding: 0.5rem;
  cursor: pointer;
}

/* ==========================================================================
   BREAKING NEWS & TRENDING BAR
   ========================================================================== */
.trending-topics-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
  font-size: 0.88rem;
}

.trending-list {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.trending-label {
  font-weight: 700;
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.trending-tag {
  background: #f1f5f9;
  padding: 3px 10px;
  border-radius: 14px;
  font-weight: 500;
  color: var(--text-main);
}
.trending-tag:hover {
  background: var(--primary-color);
  color: #fff;
}

/* ==========================================================================
   MAIN CONTENT & MAGAZINE GRID
   ========================================================================== */
.site-content {
  padding: 2rem 0;
}

.news-layout-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
}

/* Hero Section */
.hero-news-section {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.hero-main-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.hero-main-card .thumbnail-wrapper {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.hero-main-card .thumbnail-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-main-card:hover .thumbnail-wrapper img {
  transform: scale(1.04);
}

.category-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary-color);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero-main-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hero-main-title {
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  color: var(--secondary-color);
}

.hero-main-title a:hover {
  color: var(--primary-color);
}

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

.hero-sub-item {
  display: flex;
  gap: 0.85rem;
  background: var(--bg-card);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.hero-sub-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.hero-sub-thumb {
  width: 110px;
  height: 75px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.hero-sub-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-sub-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
}

.post-meta-line {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 4px;
}

/* ==========================================================================
   CATEGORY SECTION HEADINGS & BLOCKS
   ========================================================================== */
.category-block {
  margin-bottom: 2.5rem;
}

.category-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--primary-color);
  margin-bottom: 1.25rem;
  padding-bottom: 0.4rem;
}

.category-block-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--secondary-color);
  position: relative;
  padding-left: 0.85rem;
}

.category-block-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  height: 70%;
  width: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

.category-view-all {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.category-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.category-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.news-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.news-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f1f5f9;
}

.news-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.news-card:hover .news-card-thumb img {
  transform: scale(1.05);
}

.news-card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.news-card-excerpt {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ==========================================================================
   SIDEBAR & WIDGETS
   ========================================================================== */
.site-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.sidebar-widget {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--secondary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.trending-ranked-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.ranked-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.ranked-num {
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--primary-color);
  line-height: 1;
  min-width: 24px;
}

.ranked-title {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
}

.category-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.category-pill {
  background: #f1f5f9;
  color: var(--text-main);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border: 1px solid #e2e8f0;
}

.category-pill:hover {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.category-count {
  background: rgba(0,0,0,0.1);
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.72rem;
}

/* ==========================================================================
   SINGLE POST ARTICLE VIEW
   ========================================================================== */
.single-article {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.article-header {
  margin-bottom: 1.5rem;
}

.article-title {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.35;
  color: var(--secondary-color);
  margin: 0.75rem 0;
}

.article-featured-img {
  margin: 1.5rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.article-content {
  font-size: 1.15rem;
  line-height: 1.85;
  color: #27272a;
}

.article-content p {
  margin-bottom: 1.25rem;
}

.social-share-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 0;
  margin: 1.5rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
}

.share-whatsapp { background-color: #25d366; }
.share-facebook { background-color: #1877f2; }
.share-twitter  { background-color: #000000; }
.share-telegram { background-color: #0088cc; }

/* ==========================================================================
   FOOTER (With Deneb Studios Credit & Love Icon)
   ========================================================================== */
.site-footer {
  background-color: var(--secondary-color);
  color: #cbd5e1;
  padding-top: 3rem;
  margin-top: 3rem;
  border-top: 4px solid var(--primary-color);
}

.footer-widgets-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35px;
  height: 2px;
  background: var(--accent-gold);
}

.footer-col ul li {
  margin-bottom: 0.65rem;
}

.footer-col ul li a {
  color: #94a3b8;
  font-size: 0.92rem;
}

.footer-col ul li a:hover {
  color: #ffffff;
  padding-left: 4px;
}

.footer-about-text {
  font-size: 0.92rem;
  line-height: 1.7;
  color: #94a3b8;
  margin-top: 0.75rem;
}

.footer-logo {
  max-width: 240px;
  height: auto;
  display: block;
  transition: transform 0.2s ease;
}

.footer-logo:hover {
  transform: scale(1.02);
}

/* Bottom Credit Bar */
.footer-bottom {
  padding: 1.25rem 0;
  background: #090d16;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.88rem;
}

.footer-copyright {
  color: #94a3b8;
}

.footer-credit {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #cbd5e1;
  font-weight: 500;
}

.footer-credit a {
  color: #f1f5f9;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--primary-color);
  text-underline-offset: 3px;
}

.footer-credit a:hover {
  color: var(--accent-gold);
  text-decoration-color: var(--accent-gold);
}

.heart-icon {
  display: inline-block;
  color: #ef4444;
  margin: 0 3px;
  animation: heart-beat 1.5s infinite;
  transform-origin: center;
}

@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  15% { transform: scale(1.25); }
  30% { transform: scale(1); }
  45% { transform: scale(1.15); }
}

/* ==========================================================================
   RESPONSIVE DESIGN (Mobile, Tablet, Desktop)
   ========================================================================== */
@media (max-width: 1024px) {
  .news-layout-grid {
    grid-template-columns: 1fr;
  }
  .hero-news-section {
    grid-template-columns: 1fr;
  }
  .footer-widgets-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-main {
    flex-direction: column;
    text-align: center;
  }
  .site-logo {
    max-height: 55px;
  }
  .category-grid-3,
  .category-grid-2 {
    grid-template-columns: 1fr;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .main-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #0a1f3a;
  }
  .main-menu.is-active {
    display: flex;
  }
  .main-menu > li {
    width: 100%;
  }
  .main-menu > li > a {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .main-menu .sub-menu {
    position: static;
    display: block;
    background: #0f172a;
    box-shadow: none;
    border-top: none;
    padding-left: 1rem;
  }
  .main-menu .sub-menu li a {
    color: #cbd5e1;
    border-bottom: none;
  }
  .footer-widgets-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }
  .article-title {
    font-size: 1.5rem;
  }
}
