/* ============================================================================
   MY HEALTHY PUNJAB (ਮਾਈ ਹੈਲਦੀ ਪੰਜਾਬ)
   Editorial Design System & Typography Stylesheet
   Mobile-first, Responsive, High-contrast, Newspaper aesthetics
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Mukta:wght@400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;0,900;1,600&family=Noto+Sans+Gurmukhi:wght@400;500;600;700;800&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap');

:root {
  --bg-primary: #fdfbf7;
  --bg-surface: #ffffff;
  --bg-subtle: #f4efe6;
  --bg-dark: #121214;
  
  --text-primary: #18181a;
  --text-secondary: #4a4a50;
  --text-muted: #6e6e76;
  --text-inverse: #ffffff;
  
  --punjab-crimson: #8b1e0f;
  --punjab-crimson-hover: #6d150a;
  --punjab-mustard: #b8860b;
  --punjab-mustard-subtle: #fcf4dd;
  --punjab-green: #1b4332;
  --punjab-green-subtle: #e8f5e9;
  
  --border-subtle: #e6dfd5;
  --border-strong: #18181a;
  
  --font-editorial: 'Playfair Display', Georgia, serif;
  --font-sans: 'Mukta', 'Noto Sans Gurmukhi', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-gurmukhi: 'Noto Sans Gurmukhi', 'Mukta', sans-serif;
  
  --container-max: 1240px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-gurmukhi);
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a:hover {
  color: var(--punjab-crimson);
}

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

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

/* ----------------------------------------------------------------------------
   Header & Top Masthead
   ---------------------------------------------------------------------------- */
.site-top-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  padding: 0.35rem 0;
  color: var(--text-muted);
}

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

.lang-selector {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.lang-btn {
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--border-subtle);
  border-radius: 2px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-surface);
}

.lang-btn.active {
  background: var(--punjab-crimson);
  color: #fff;
  border-color: var(--punjab-crimson);
}

.masthead {
  background: var(--bg-surface);
  border-bottom: 2px solid var(--border-strong);
  padding: 1.5rem 0 1rem 0;
  text-align: center;
}

.brand-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.brand-wrapper img {
  display: block;
  margin: 0 auto;
  max-width: 95%;
  height: auto;
}

.brand-title {
  font-family: var(--font-editorial);
  font-size: 2.6rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  line-height: 1.1;
  text-transform: uppercase;
}

.brand-title span {
  color: var(--punjab-crimson);
}

.brand-gurmukhi-subtitle {
  font-family: var(--font-gurmukhi);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--punjab-crimson);
  margin-top: 0.2rem;
}

.brand-tagline {
  font-family: var(--font-gurmukhi);
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.2px;
}

/* ----------------------------------------------------------------------------
   Primary Navigation
   ---------------------------------------------------------------------------- */
.nav-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.nav-links {
  display: flex;
  list-style: none;
  overflow-x: auto;
  white-space: nowrap;
  gap: 0.1rem;
  padding: 0.25rem 0;
  scrollbar-width: none;
}

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

.nav-links a {
  display: block;
  padding: 0.6rem 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 2px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--punjab-crimson);
  border-bottom-color: var(--punjab-crimson);
}

.nav-search-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  font-size: 1rem;
}

/* ----------------------------------------------------------------------------
   Breaking News Ticker
   ---------------------------------------------------------------------------- */
.ticker-bar {
  background: var(--punjab-crimson);
  color: #fff;
  display: flex;
  align-items: center;
  font-size: 0.88rem;
  overflow: hidden;
  height: 38px;
}

.ticker-label {
  background: #5c140a;
  font-weight: 800;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  white-space: nowrap;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.ticker-content {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  padding-left: 1rem;
}

.ticker-link {
  color: #fff;
  font-weight: 500;
  display: inline-block;
  margin-right: 2.5rem;
}

.ticker-link:hover {
  color: var(--punjab-mustard-subtle);
}

/* ----------------------------------------------------------------------------
   Editorial Grid & Layout
   ---------------------------------------------------------------------------- */
.editorial-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  margin-top: 1.5rem;
}

@media (min-width: 900px) {
  .editorial-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.hero-story {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.5rem;
}

.hero-image-wrapper {
  position: relative;
  display: block;
  width: 100%;
  height: 380px;
  max-height: 400px;
  overflow: hidden;
  border-radius: 4px;
  background: #eee;
}

.hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transition: transform 0.35s ease;
  display: block;
}

.hero-image-wrapper:hover img {
  transform: scale(1.02);
}

@media (max-width: 768px) {
  .hero-image-wrapper {
    height: 230px;
    max-height: 250px;
  }
}

.hero-meta {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.85rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.badge-tag {
  background: var(--punjab-crimson);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
  text-transform: uppercase;
}

.badge-district {
  background: var(--punjab-green);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 2px;
}

.hero-headline {
  font-family: var(--font-gurmukhi);
  font-size: 1.85rem;
  line-height: 1.52;
  font-weight: 700;
  margin-top: 0.75rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  word-break: break-word;
}

.hero-headline a {
  color: var(--text-primary);
  line-height: inherit;
  display: inline;
}

.hero-headline a:hover {
  color: var(--punjab-crimson);
}

@media (min-width: 900px) {
  .hero-headline {
    font-size: 2.15rem;
    line-height: 1.5;
  }
}

.hero-summary {
  font-family: var(--font-gurmukhi);
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-top: 0.75rem;
  line-height: 1.68;
  word-break: break-word;
}

/* Secondary & Supporting Stories */
.supporting-stories-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.supporting-card {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1rem;
  align-items: start;
}

.supporting-card-thumb {
  width: 110px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 3px;
  overflow: hidden;
  background: #eee;
  display: block;
}

.supporting-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.supporting-card-title {
  font-family: var(--font-gurmukhi);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.48;
  color: var(--text-primary);
  word-break: break-word;
}

.supporting-card-title a {
  color: var(--text-primary);
  line-height: inherit;
}

.supporting-card-title a:hover {
  color: var(--punjab-crimson);
}

.supporting-card-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* ----------------------------------------------------------------------------
   Section Headers (Newspaper rule style)
   ---------------------------------------------------------------------------- */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 2px solid var(--punjab-crimson);
  padding-bottom: 0.45rem;
  margin: 2.5rem 0 1.25rem 0;
}

.section-title {
  font-family: var(--font-gurmukhi);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--punjab-crimson);
  line-height: 1.4;
  letter-spacing: 0.2px;
}

.section-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
}

.section-link:hover {
  color: var(--punjab-crimson);
}

/* ----------------------------------------------------------------------------
   Multi-column Magazine Feeds
   ---------------------------------------------------------------------------- */
.news-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.card-editorial {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.card-thumb {
  width: 100%;
  height: 195px;
  background: #eee;
  overflow: hidden;
  display: block;
}

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

.card-editorial:hover .card-thumb img {
  transform: scale(1.03);
}

/* Elegant Text-First Editorial Card for Articles without Images */
.card-editorial.card-no-image {
  border-top: 3px solid var(--punjab-crimson);
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfb 100%);
  min-height: 240px;
}

.card-editorial.card-no-image .card-body {
  padding: 1.5rem 1.25rem;
  justify-content: space-between;
}

.card-editorial.card-no-image .card-headline {
  font-size: 1.25rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.card-editorial.card-no-image .card-excerpt {
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

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

.card-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.card-headline {
  font-family: var(--font-gurmukhi);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 0.6rem;
  word-break: break-word;
}

.card-headline a {
  color: var(--text-primary);
  line-height: inherit;
}

.card-headline a:hover {
  color: var(--punjab-crimson);
}

.card-excerpt {
  font-family: var(--font-gurmukhi);
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.62;
  margin-bottom: 1rem;
  flex: 1;
  word-break: break-word;
}

.card-footer {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--punjab-crimson);
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.65rem;
  display: flex;
  justify-content: space-between;
}

/* ----------------------------------------------------------------------------
   Desi Nuskhe & Health Highlights Box
   ---------------------------------------------------------------------------- */
.health-accent-box {
  background: #f7faf7;
  border: 1px solid #c8e6c9;
  border-left: 4px solid var(--punjab-green);
  padding: 1.25rem;
  border-radius: 4px;
  margin-bottom: 2rem;
}

.medical-disclaimer-pill {
  background: #fff3e0;
  border: 1px solid #ffe0b2;
  color: #e65100;
  font-size: 0.82rem;
  padding: 0.5rem 0.85rem;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

/* ----------------------------------------------------------------------------
   Article Reading Page - 2-Column Responsive Layout
   ---------------------------------------------------------------------------- */
.article-page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 2.25rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .article-page-layout {
    grid-template-columns: 1fr;
  }
}

.article-container {
  max-width: 100%;
  margin: 0 0 2rem 0;
  background: var(--bg-surface);
  padding: 2.25rem;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

@media (max-width: 640px) {
  .article-container {
    padding: 1.25rem;
  }
}

.article-sidebar {
  width: 100%;
}

/* Sidebar Widgets */
.sidebar-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 1.25rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.sidebar-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--punjab-crimson);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
}

.sidebar-widget-title {
  font-family: var(--font-gurmukhi);
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--punjab-crimson);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sidebar-item-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.sidebar-item-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f0f0f0;
}

.sidebar-item-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar-item-card:hover .sidebar-item-title {
  color: var(--punjab-crimson);
}

.sidebar-item-thumb {
  width: 85px;
  height: 60px;
  border-radius: 4px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f1f3f5;
}

.sidebar-item-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.sidebar-item-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--punjab-crimson);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
}

.sidebar-item-content {
  flex: 1;
  min-width: 0;
}

.sidebar-item-title {
  font-family: var(--font-gurmukhi);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 0.25rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-primary);
}

.sidebar-item-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.ad-slot-wrapper {
  margin: 1.5rem auto;
  text-align: center;
}

.ad-sticky-sidebar {
  position: sticky;
  top: 1rem;
  z-index: 5;
}

.article-header {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 1.25rem;
}

.article-headline {
  font-family: var(--font-gurmukhi);
  font-size: 2.15rem;
  line-height: 1.5;
  font-weight: 800;
  margin: 0.75rem 0;
  color: var(--text-primary);
  word-break: break-word;
}

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

.article-featured-image {
  margin: 1.5rem 0;
  border-radius: 4px;
  overflow: hidden;
  background: #f8f9fa;
}

.article-featured-image img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.article-image-caption {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.35rem 0.25rem;
  font-style: italic;
  border-bottom: 1px solid var(--border-subtle);
}

.article-body {
  font-size: 1.15rem;
  line-height: 1.8;
  color: #222;
}

.article-body h2 {
  font-family: var(--font-gurmukhi);
  font-size: 1.5rem;
  line-height: 1.45;
  margin: 1.85rem 0 0.85rem 0;
  color: var(--punjab-crimson);
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.35rem;
}

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

.article-body ul, .article-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.article-body li {
  margin-bottom: 0.5rem;
}

.article-sources-box {
  background: var(--bg-subtle);
  border-left: 3px solid var(--border-strong);
  padding: 1rem;
  margin: 2rem 0;
  font-size: 0.88rem;
}

.article-sources-box h4 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.article-sources-box ul {
  list-style: none;
  padding: 0;
}

.article-sources-box li {
  margin-bottom: 0.35rem;
}

/* ----------------------------------------------------------------------------
   Newsletter Box
   ---------------------------------------------------------------------------- */
.newsletter-section {
  background: #1b1b1e;
  color: #fff;
  padding: 3rem 1rem;
  margin-top: 3rem;
  border-top: 4px solid var(--punjab-crimson);
}

.newsletter-box {
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
}

.newsletter-box h3 {
  font-family: var(--font-editorial);
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.newsletter-box p {
  font-size: 0.95rem;
  color: #ccc;
  margin-bottom: 1.5rem;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid #444;
  border-radius: 2px;
  font-size: 0.95rem;
  outline: none;
}

.newsletter-btn {
  background: var(--punjab-crimson);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  border-radius: 2px;
  cursor: pointer;
  transition: background 0.15s;
}

.newsletter-btn:hover {
  background: var(--punjab-crimson-hover);
}

/* ----------------------------------------------------------------------------
   Footer
   ---------------------------------------------------------------------------- */
.site-footer {
  background: #0f0f11;
  color: #a0a0a5;
  padding: 3.5rem 0 1.5rem 0;
  font-size: 0.9rem;
  border-top: 1px solid #222;
  margin-top: auto;
}

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

.footer-col h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #28282b;
  padding-bottom: 0.5rem;
}

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

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

.footer-col a:hover {
  color: #fff;
}

.footer-bottom {
  border-top: 1px solid #222;
  padding-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #777;
}

/* ----------------------------------------------------------------------------
   Alerts & Notifications
   ---------------------------------------------------------------------------- */
.alert {
  padding: 0.85rem 1.25rem;
  border-radius: 2px;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.alert-success {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #1b5e20;
}

.alert-error {
  background: #ffebee;
  border: 1px solid #ffcdd2;
  color: #b71c1c;
}
