/* ====================================================
   IKMAN.NEWS - Sri Lankan Sinhala-First Core Stylesheet
   Designed exclusively for Sinhala Typography & Modern UX
   ==================================================== */

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

:root {
  /* Typography */
  --font-sinhala: 'Noto Sans Sinhala', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-latin: 'Plus Jakarta Sans', sans-serif;
  
  /* Primary Brand Colors */
  --color-primary: #c8102e;        /* Royal Red (Sri Lankan Heritage) */
  --color-primary-dark: #9b0b21;
  --color-primary-light: #fef2f2;
  --color-accent: #d97706;         /* Ceylon Amber / Gold */
  --color-accent-light: #fef3c7;
  
  /* Neutral Color Palette (Light Mode) */
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-secondary: #f1f5f9;
  --bg-subtle: #f8fafc;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --border-subtle: #cbd5e1;
  
  /* UI Components */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  
  /* Container Width */
  --container-max: 1280px;
  --header-height: 80px;
}

[data-theme="dark"] {
  --bg-body: #090d16;
  --bg-surface: #111827;
  --bg-surface-secondary: #1f2937;
  --bg-subtle: #161e2e;
  --text-primary: #f9fafb;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: #243044;
  --border-subtle: #334155;
  --color-primary-light: #37121b;
  --color-accent-light: #3b280c;
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.6);
}

/* Base Reset & Typography Setup */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sinhala);
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.75;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Headings with Proper Sinhala Line-Height */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sinhala);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 0.65rem;
}

h1 { font-size: 2.15rem; font-weight: 800; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

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

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* ====================================================
   TOP UTILITY BAR
   ==================================================== */
.top-bar {
  background-color: var(--bg-surface-secondary);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.875rem;
  color: var(--text-muted);
  padding: 0.45rem 0;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.top-bar-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Language Switcher */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.15rem 0.35rem;
}

.lang-btn {
  padding: 0.2rem 0.65rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn.active {
  background-color: var(--color-primary);
  color: #ffffff;
}

.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

.theme-toggle-btn:hover {
  background-color: var(--bg-surface);
  color: var(--color-primary);
}

/* ====================================================
   HEADER & BRANDING
   ==================================================== */
.main-header {
  background-color: var(--bg-surface);
  border-bottom: 2px solid var(--border-color);
  padding: 1.25rem 0;
}

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

.brand-logo-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand-logo {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 2.1rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--color-primary);
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.brand-name span {
  color: var(--text-primary);
}

.brand-tagline {
  font-size: 0.825rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.15rem;
}

/* Header Search */
.header-search {
  position: relative;
  width: 100%;
  max-width: 360px;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  background-color: var(--bg-surface-secondary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.5rem 0.25rem 1rem;
  transition: all 0.2s ease;
}

.search-input-wrap:focus-within {
  border-color: var(--color-primary);
  background-color: var(--bg-surface);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.15);
}

.search-input {
  width: 100%;
  border: none;
  background: transparent;
  font-family: var(--font-sinhala);
  font-size: 0.925rem;
  color: var(--text-primary);
  outline: none;
}

.search-btn {
  background-color: var(--color-primary);
  color: #ffffff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.search-btn:hover {
  background-color: var(--color-primary-dark);
}

/* ====================================================
   NAVIGATION BAR & CATEGORY MENU
   ==================================================== */
.main-nav {
  background: linear-gradient(180deg, #161f30 0%, #0f172a 100%);
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 2px solid var(--color-primary);
}

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

.nav-menu {
  list-style: none;
  display: flex;
  align-items: center;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  gap: 0.2rem;
  padding: 0.15rem 0;
}

.nav-menu::-webkit-scrollbar {
  display: none;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.75rem 1.05rem;
  font-family: var(--font-sinhala);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.015em;
  color: #e2e8f0;
  transition: all 0.22s ease;
  border-bottom: 3px solid transparent;
  border-radius: 4px 4px 0 0;
}

.nav-link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.09);
  border-bottom-color: var(--color-accent);
}

.nav-link.active {
  color: #ffffff;
  background: linear-gradient(180deg, rgba(200, 16, 46, 0.25) 0%, rgba(200, 16, 46, 0.05) 100%);
  border-bottom-color: #ffcc00;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.4rem;
  padding: 0.6rem 0.85rem;
  cursor: pointer;
}

/* ====================================================
   BREAKING NEWS TICKER (උණුසුම් පුවත්)
   ==================================================== */
.breaking-news-bar {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
}

.breaking-news-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow: hidden;
}

.breaking-badge {
  background: linear-gradient(135deg, #c8102e, #9b0b21);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(200, 16, 46, 0.3);
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); box-shadow: 0 0 12px rgba(200, 16, 46, 0.6); }
  100% { transform: scale(1); }
}

.breaking-ticker-wrap {
  flex: 1;
  overflow: hidden;
  position: relative;
  height: 28px;
}

.breaking-ticker-content {
  display: flex;
  align-items: center;
  position: absolute;
  white-space: nowrap;
  animation: marquee 25s linear infinite;
}

.breaking-ticker-content:hover {
  animation-play-state: paused;
}

.breaking-item {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-right: 3rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.breaking-item::before {
  content: "✦";
  color: var(--color-primary);
}

@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ====================================================
   MAIN CONTENT & GRID SYSTEMS
   ==================================================== */
.main-wrapper {
  padding: 2rem 0 3rem;
}

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

/* Section Header in Sinhala */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  position: relative;
}

.section-header::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background-color: var(--color-primary);
}

.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0;
}

.section-more-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.section-more-link:hover {
  text-decoration: underline;
}

/* ====================================================
   HERO / LEAD STORY (ප්‍රධාන පුවත)
   ==================================================== */
.hero-lead-card {
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.hero-lead-card:hover {
  box-shadow: var(--shadow-md);
}

.hero-lead-image-wrap {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  background-color: #000;
}

.hero-lead-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-lead-card:hover .hero-lead-image {
  transform: scale(1.03);
}

.category-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: var(--color-primary);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  z-index: 2;
  box-shadow: var(--shadow-sm);
}

.hero-lead-content {
  padding: 1.5rem 1.75rem;
}

.hero-lead-title {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.45;
  margin-bottom: 0.75rem;
}

.hero-lead-subtitle {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.85rem;
}

.hero-lead-excerpt {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.news-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ====================================================
   NEWS CARDS & GRIDS
   ==================================================== */
.news-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

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

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

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

.news-card-thumb-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: var(--bg-surface-secondary);
}

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

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

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

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

.news-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1rem;
  flex: 1;
}

/* Horizontal News List Card */
.news-horizontal-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1rem;
  background-color: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  padding: 0.75rem;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
}

.news-horizontal-card:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--color-primary);
}

.news-horizontal-thumb {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

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

.news-horizontal-title {
  font-size: 0.975rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 0.4rem;
}

/* ====================================================
   SIDEBAR COMPONENTS
   ==================================================== */
.sidebar-widget {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.widget-title {
  font-size: 1.15rem;
  font-weight: 800;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.widget-title::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--color-primary);
}

/* Most Viewed Ranked List */
.ranked-news-list {
  list-style: none;
}

.ranked-news-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.ranked-news-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.rank-number {
  font-family: var(--font-latin);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-muted);
  width: 28px;
  flex-shrink: 0;
  text-align: center;
  line-height: 1;
  padding-top: 0.15rem;
}

.ranked-news-item:nth-child(1) .rank-number { color: #dc2626; font-size: 1.7rem; }
.ranked-news-item:nth-child(2) .rank-number { color: #ea580c; font-size: 1.6rem; }
.ranked-news-item:nth-child(3) .rank-number { color: #d97706; font-size: 1.5rem; }

.ranked-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 0.25rem;
}

/* Opinion Poll Widget */
.poll-question {
  font-size: 0.975rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.poll-option-label {
  display: block;
  background-color: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s;
}

.poll-option-label:hover {
  border-color: var(--color-primary);
  background-color: var(--color-primary-light);
}

.poll-submit-btn {
  width: 100%;
  background-color: var(--color-primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  font-family: var(--font-sinhala);
  font-size: 0.925rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 0.5rem;
}

.poll-submit-btn:hover {
  background-color: var(--color-primary-dark);
}

/* Exchange Rate Table */
.rates-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.rates-table th, .rates-table td {
  padding: 0.5rem 0.4rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.rates-table th {
  color: var(--text-muted);
  font-weight: 600;
}

.rates-table td:last-child {
  text-align: right;
  font-weight: 700;
}

/* Newsletter Box */
.newsletter-box {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  color: #ffffff;
  border-radius: var(--radius-md);
  padding: 1.5rem;
  margin-bottom: 1.75rem;
}

.newsletter-box h4 {
  color: #ffffff;
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}

.newsletter-box p {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 1rem;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
}

.newsletter-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 0.55rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  outline: none;
}

.newsletter-btn {
  background-color: var(--color-accent);
  color: #ffffff;
  border: none;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sinhala);
  font-weight: 700;
  cursor: pointer;
}

/* ====================================================
   ARTICLE DETAIL PAGE (සම්පූර්ණ පුවත)
   ==================================================== */
.article-header {
  margin-bottom: 1.75rem;
}

.article-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.article-title {
  font-size: 2.35rem;
  font-weight: 800;
  line-height: 1.45;
  color: var(--text-primary);
  margin-bottom: 0.85rem;
}

.article-subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.55;
}

.article-author-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 1.5rem;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  object-fit: cover;
  border: 2px solid var(--color-primary);
}

.author-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.author-role {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Audio Player Bar */
.article-audio-box {
  background-color: var(--color-primary-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.audio-play-btn {
  background-color: var(--color-primary);
  color: #ffffff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.audio-play-btn:hover {
  transform: scale(1.05);
}

/* Text Size Controls */
.font-resizer {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.font-size-btn {
  background-color: var(--bg-surface-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

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

/* Featured Article Image */
.article-featured-image-wrap {
  margin-bottom: 1.75rem;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.article-caption {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.5rem 0.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
}

/* Article Body Content */
.article-body {
  font-size: 1.125rem;
  line-height: 1.85;
  color: var(--text-primary);
  margin-bottom: 2.5rem;
}

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

.article-body p.lead {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.article-body blockquote {
  border-left: 4px solid var(--color-primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background-color: var(--bg-surface-secondary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 1.15rem;
  font-weight: 600;
  font-style: italic;
}

.article-body blockquote cite {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-style: normal;
}

/* Social Share Bar */
.share-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.share-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-right: 0.5rem;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.share-btn:hover {
  opacity: 0.9;
}

.share-btn-wa { background-color: #25d366; }
.share-btn-fb { background-color: #1877f2; }
.share-btn-x  { background-color: #000000; }
.share-btn-tg { background-color: #229ed9; }
.share-btn-copy { background-color: #64748b; }

/* Comments Section */
.comments-section {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  margin-top: 2rem;
}

.comment-form {
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-body);
  color: var(--text-primary);
  font-family: var(--font-sinhala);
  font-size: 0.95rem;
  outline: none;
}

.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.15);
}

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

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

.comment-author {
  font-weight: 700;
  font-size: 0.95rem;
}

.comment-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.comment-text {
  margin-top: 0.35rem;
  font-size: 0.95rem;
  line-height: 1.65;
}

/* ====================================================
   FOOTER
   ==================================================== */
.main-footer {
  background-color: #0b0f19;
  color: #94a3b8;
  padding: 3.5rem 0 1.5rem;
  border-top: 4px solid var(--color-primary);
  font-size: 0.9rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  color: #ffffff;
  font-size: 1.65rem;
  margin-bottom: 0.5rem;
}

.footer-brand p {
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.footer-title {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 0.4rem;
  display: inline-block;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: #cbd5e1;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ====================================================
   RESPONSIVE BREAKPOINTS (Mobile-First Sinhala UX)
   ==================================================== */
@media (max-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .top-bar {
    font-size: 0.75rem;
    padding: 0.35rem 0;
  }
  .top-bar-inner {
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
  }
  .top-bar-left {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
  }
  .top-bar-item {
    font-size: 0.75rem;
    gap: 0.2rem;
  }
  .top-bar-right {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
  }
  .lang-btn {
    padding: 0.15rem 0.45rem;
    font-size: 0.725rem;
  }
  .theme-toggle-btn {
    padding: 0.15rem 0.45rem;
    font-size: 0.725rem;
  }
  .header-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }
  .brand-logo-wrap {
    justify-content: center;
  }
  .header-search {
    max-width: 100%;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    background-color: #0f172a;
    padding: 0.5rem 0;
  }
  .nav-menu.open {
    display: flex;
  }
  .nav-link {
    width: 100%;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #1e293b;
    border-radius: 0;
  }
  .news-grid-2, .news-grid-3 {
    grid-template-columns: 1fr;
  }
  .hero-lead-image-wrap {
    height: 240px;
  }
  .hero-lead-title {
    font-size: 1.35rem;
  }
  .article-title {
    font-size: 1.65rem;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
