/* ==========================================================================
   LOKMANGAL NEWS PORTAL (लोकमंगल न्यूज पोर्टल)
   1:1 Xapify Templateify Exact 3-Column Layout & Alignment
   ========================================================================== */

/* Fonts (Roboto + Noto Sans Devanagari) are loaded with <link> tags in index.html — faster than @import on mobile networks.
   Phone / tablet layout lives in css/responsive.css (loaded after this file). */

:root {
  --body-font: 'Roboto', 'Noto Sans Devanagari', -apple-system, BlinkMacSystemFont, sans-serif;
  --title-font: 'Roboto', 'Noto Sans Devanagari', sans-serif;
  --menu-font: 'Roboto', 'Noto Sans Devanagari', sans-serif;
  
  /* -------------------------------------------------------------
     Brick & Olive Official Palette (निवड • SHORTLIST • B7)
     वीट • भगवा • ऑलिव्ह | मातीचा रंग • उबदार • ग्रामीण विश्वास
     ------------------------------------------------------------- */
  --brick-maroon: #7F2A1D;       /* Logo, nav bar, links, numbers */
  --brick-maroon-dark: #631F15;
  --orange: #EE7B30;             /* Breaking news, main tag, menu underline */
  --olive-green: #5A7A2B;        /* WhatsApp button, category labels */
  --text-dark: #1E1A17;          /* Headlines, body text, footer */
  --text-muted: #6B625A;         /* Date, author, captions */
  --bg-page: #FBF8F3;            /* Page background */
  --surface: #FFFFFF;            /* Cards, header, sidebar */
  --border-cream: #ECE4DC;       /* Lines, dividers, chips */

  /* Semantic Component Mappings */
  --main-color: #7F2A1D;
  --main-color-dark: #631F15;
  --body-bg-color: #FBF8F3;
  --widget-bg: #FFFFFF;
  --title-color: #1E1A17;
  --title-hover-color: #EE7B30;
  --meta-color: #6B625A;
  --text-color: #1E1A17;
  --header-bg: #FFFFFF;
  --header-color: #1E1A17;
  --header-hover-color: #EE7B30;
  --submenu-bg: #FFFFFF;
  --submenu-color: #1E1A17;
  --submenu-hover-color: #7F2A1D;
  --border-color: #ECE4DC;
  --widget-shadow: 0 1px 3px rgba(30, 26, 23, 0.05);
  --button-bg: #7F2A1D;
  --button-hover-bg: #631F15;
  --accent-red: #7F2A1D;
  --accent-orange: #EE7B30;
  --accent-green: #5A7A2B;
  --border-radius: 4px;
  --transition: all 0.2s ease;
  --input-bg: #FFFFFF;
}

/* Dark Mode (Warm Brick & Olive Dark) */
html.is-dark {
  --body-bg-color: #171412;
  --widget-bg: #221E1B;
  --title-color: #FBF8F3;
  --title-hover-color: #EE7B30;
  --meta-color: #A39B93;
  --text-color: #D6CEC7;
  --header-bg: #1F1916;
  --header-color: #FBF8F3;
  --header-hover-color: #EE7B30;
  --submenu-bg: #282320;
  --submenu-color: #FBF8F3;
  --submenu-hover-color: #EE7B30;
  --border-color: #38322D;
  --widget-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  --input-bg: #171412;
  --button-bg: #EE7B30;
  --button-hover-bg: #D4671F;
}

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

body {
  font-family: var(--body-font);
  background-color: var(--body-bg-color);
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color var(--transition);
}

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

ul, ol {
  list-style: none;
}

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

button, input {
  font-family: inherit;
  border: none;
  outline: none;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 15px;
  width: 100%;
}

/* ==========================================================================
   1. STREAMLINED UNIFIED HEADER (Sticky Auto-Hide/Show Wrapper)
   ========================================================================== */
.site-header-wrapper {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--header-bg);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  will-change: transform;
}

.site-header-wrapper.header-hidden {
  transform: translateY(-100%);
  pointer-events: none;
}

.site-header-wrapper.header-visible {
  transform: translateY(0);
  pointer-events: auto;
}

.site-header-wrapper.is-scrolled {
  box-shadow: 0 4px 14px rgba(30, 26, 23, 0.08);
}

html.is-dark .site-header-wrapper.is-scrolled {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}

.main-header {
  position: relative;
  z-index: 2;
  background-color: var(--header-bg);
  border-bottom: 1px solid var(--border-color);
  height: 54px;
  transition: background-color var(--transition), border-color var(--transition);
}

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

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Hamburger button */
.mobile-menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--header-color);
  cursor: pointer;
  background: none;
  padding: 6px;
  transition: var(--transition);
}

.mobile-menu-toggle:hover {
  color: var(--header-hover-color);
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 2px 4px;
  text-decoration: none;
  background: transparent;
  border-radius: 4px;
}

.brand-logo .brand-logo-img {
  height: 42px;
  max-height: 46px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
  border: none;
  border-radius: 0;
  transition: transform 0.2s ease;
}

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

html.is-dark .brand-logo {
  background: #25201C;
  padding: 4px 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

html.is-dark .brand-logo .brand-logo-img {
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.45));
}

/* Logo shine animation from Xapify */
.brand-logo::after {
  content: "";
  position: absolute;
  top: 0;
  left: -80%;
  width: 30%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.6), transparent);
  animation: shineMove 3s infinite;
  pointer-events: none;
}

@keyframes shineMove {
  0% { left: -80%; }
  30% { left: 120%; }
  100% { left: 120%; }
}

/* Header Navigation Links */
.header-nav {
  display: flex;
  align-items: center;
  height: 54px;
}

.nav-item {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 100%;
  padding: 0 16px;
  font-family: var(--menu-font);
  font-size: 15px;
  font-weight: 600;
  color: var(--header-color);
  transition: color var(--transition), background-color var(--transition);
  position: relative;
  white-space: nowrap;
}

.nav-item:hover > .nav-link {
  color: var(--orange, #EE7B30);
  background-color: rgba(127, 42, 29, 0.04);
}

.nav-item.active > .nav-link {
  color: var(--brick-maroon, #7F2A1D);
  background-color: rgba(127, 42, 29, 0.07);
}

.nav-item.active > .nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 3px;
  background-color: var(--orange, #EE7B30);
  border-radius: 2px 2px 0 0;
}

.nav-item:hover > .nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 14px;
  right: 14px;
  height: 2px;
  background-color: rgba(238, 123, 48, 0.7);
  border-radius: 2px 2px 0 0;
}

.nav-link .dropdown-caret {
  font-size: 10px;
  transition: transform 0.2s ease;
  margin-left: 2px;
}

/* Dropdown Menu (For News -> Samajik, Rajkiy) */
.dropdown-menu {
  position: absolute;
  top: 54px;
  left: 0;
  min-width: 200px;
  background-color: var(--submenu-bg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  padding: 6px 0;
  border: 1px solid var(--border-color);
  border-top: none;
  border-radius: 0 0 3px 3px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.2s ease;
  z-index: 1005;
}

.nav-item.open-dropdown .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-item.open-dropdown .dropdown-caret {
  transform: rotate(180deg);
}

/* Hover-open only for real mouse pointers; touch screens (iPad etc.) use the tap toggle,
   otherwise the menu gets "stuck" open after a tap. */
@media (hover: hover) {
  .nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-item:hover .dropdown-caret {
    transform: rotate(180deg);
  }
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  font-size: 14px;
  color: var(--submenu-color);
  font-weight: 400;
  transition: var(--transition);
}

.dropdown-link:hover {
  color: var(--brick-maroon, #7F2A1D);
  background-color: rgba(127, 42, 29, 0.06);
}

.dropdown-badge {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 2px;
  margin-left: auto;
  font-weight: 600;
  background: rgba(238, 123, 48, 0.15);
  color: var(--orange, #EE7B30);
}

/* Header Right Actions */
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--header-color);
  background: none;
  cursor: pointer;
  border-radius: 3px;
  transition: color var(--transition);
}

.icon-btn:hover {
  color: var(--header-hover-color);
}

.admin-top-badge-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, var(--orange, #EE7B30), #D4671F);
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(238, 123, 48, 0.35);
  transition: all 0.2s ease;
  margin-left: 6px;
}

.admin-top-badge-btn:hover {
  background: linear-gradient(135deg, #D4671F, #B85012);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(238, 123, 48, 0.5);
  color: #ffffff !important;
}

.admin-top-badge-btn i {
  font-size: 12px;
}

/* Search Input Overlay */
.search-overlay-bar {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--header-bg);
  border-bottom: 2px solid var(--main-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 12px 0;
  display: none;
  z-index: 999;
}

.search-overlay-bar.show {
  display: block;
}

.search-form-flex {
  display: flex;
  gap: 10px;
}

.search-form-flex input {
  flex: 1;
  padding: 9px 14px;
  font-size: 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--body-bg-color);
  color: var(--title-color);
}

.search-form-flex button {
  background: var(--main-color);
  color: #fff;
  padding: 9px 18px;
  border-radius: var(--border-radius);
  font-size: 14px;
  cursor: pointer;
}

/* ==========================================================================
   2. THREE-COLUMN XAPIFY LAYOUT (Left Sidebar + Center Main + Right Sidebar)
   ========================================================================== */
#content-wrapper {
  padding: 24px 0 40px;
}

.content-3col-grid {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr) 290px;
  gap: 24px;
  align-items: start;
}

/* Widget Card Shell */
.widget-box {
  background-color: var(--widget-bg);
  box-shadow: var(--widget-shadow);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  margin-bottom: 24px;
  padding: 18px;
}

/* Widget Title (Underline style from screenshot) */
.widget-title-wrap {
  position: relative;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 16px;
}

.widget-title-wrap::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 44px;
  height: 2px;
  background-color: var(--orange, #EE7B30);
}

html.is-dark .widget-title-wrap {
  border-bottom-color: #38322D;
}

.widget-title-text {
  font-family: var(--title-font);
  font-size: 16px;
  font-weight: 700;
  color: var(--title-color);
}

/* ==========================================================================
   COLUMN 1: LEFT SIDEBAR (Popular Posts + Labels)
   ========================================================================== */
.popular-posts-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Large card (item-0 of Popular / Latest Reviews / Videos / the menu, and the first story of the Home news list):
   the photo on top and ALL the text below it - nothing is written on a photo (see largeCardHTML in app.js) */
.popular-card-large {
  position: relative;
  display: block;
  cursor: pointer;
}

.popular-card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--border-radius);
  overflow: hidden;
  background-color: var(--body-bg-color);       /* grey placeholder while the photo loads */
  box-shadow: var(--widget-shadow);
}

.popular-card-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.popular-card-large:hover .popular-card-media img {
  transform: scale(1.05);
}

.popular-card-caption {
  padding: 10px 2px 0;
}

.drawer-popular-card .popular-card-media {
  aspect-ratio: 16 / 9;
}

.category-tag-badge {
  display: inline-block;
  margin-bottom: 6px;
  background-color: var(--main-color);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.popular-card-title {
  font-family: var(--title-font);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--title-color);
  margin-bottom: 4px;
}

.popular-card-large:hover .popular-card-title {
  color: var(--main-color);
}

.popular-card-byline {
  font-size: 11.5px;
  color: var(--meta-color);
}

/* Sub items list (Item 1 & Item 2) */
.popular-sub-item {
  display: flex;
  gap: 12px;
  cursor: pointer;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.popular-sub-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.popular-sub-thumb {
  width: 78px;
  height: 56px;
  border-radius: var(--border-radius);
  overflow: hidden;
  flex-shrink: 0;
}

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

.popular-sub-item:hover .popular-sub-thumb img {
  transform: scale(1.08);
}

.popular-sub-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.popular-sub-title {
  font-family: var(--title-font);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--title-color);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.popular-sub-item:hover .popular-sub-title {
  color: var(--title-hover-color);
}

.popular-sub-date {
  font-size: 11px;
  color: var(--meta-color);
  display: flex;
  flex-wrap: wrap;                /* length / views / date of a video wrap line by line instead of squeezing */
  align-items: center;
  gap: 2px 6px;
}

.popular-sub-date > span {
  white-space: nowrap;
}

.review-rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #f59e0b;
  font-size: 11px;
  font-weight: 700;
}

/* Responsive Ads Widget (Matching User Image Exactly) */
.responsive-ads-widget {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--border-radius);
}

/* Two ads, one after the other: a fixed 4:5 frame (nothing below it jumps), the ad that is not 4:5
   (the tall bank ad) is shown whole with its own blurred picture behind it. initAdSlider() in app.js
   moves the "active" class every 4 seconds; without JavaScript the first ad simply stays. */
.ad-slider {
  aspect-ratio: 4 / 5;
  background: #f3ece4;
}

.ad-slide {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0s linear 0.7s;
}

.ad-slide.active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.7s ease, visibility 0s;
}

.ad-bg {
  position: absolute;
  top: -12%;
  left: -12%;
  width: 124%;
  height: 124%;
  object-fit: cover;
  filter: blur(18px);
}

.ad-img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* an ad with a click link is an <a>; a video ad is muted and plays by itself (initAdSlider / adSync in app.js) */
a.ad-slide {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

a.ad-slide:focus-visible {
  outline: 2px solid var(--main-color);
  outline-offset: -2px;
}

/* every ad was deleted in the Admin Panel: the widget stays, with a quiet empty frame */
.ad-empty {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--meta-color);
  font-size: 13px;
}

.ad-empty i {
  font-size: 28px;
  opacity: 0.6;
}

@media (prefers-reduced-motion: reduce) {
  .ad-slide,
  .ad-slide.active {
    transition: none;
  }
}

/* Category Label List */
.label-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.label-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 2px;
  font-size: 13.5px;
  color: var(--text-color);
  cursor: pointer;
  transition: var(--transition);
}

.label-item:hover,
.label-item.active {
  background: rgba(127, 42, 29, 0.08);
  color: var(--main-color);
  font-weight: 600;
}

/* ==========================================================================
   COLUMN 2: MIDDLE MAIN CONTENT (Main Story / Post Feed)
   ========================================================================== */
.main-content-box {
  background-color: var(--widget-bg);
  box-shadow: var(--widget-shadow);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 24px;
}

/* Breadcrumb Line (Home > Category) */
.breadcrumb-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--meta-color);
  margin-bottom: 12px;
}

.breadcrumb-bar a {
  color: var(--main-color);
  font-weight: 500;
}

.breadcrumb-bar a:hover {
  text-decoration: underline;
}

.breadcrumb-bar i {
  font-size: 9px;
}

/* Main Post Large Headline (Matching screenshot "Economic Growth Is Essential...") */
.main-post-headline {
  font-family: var(--title-font);
  font-size: 20px;
  font-weight: 700;
  color: var(--title-color);
  line-height: 1.25;
  margin-bottom: 14px;
  letter-spacing: -0.2px;
}

/* Author Meta Line */
.author-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.author-info-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-circle-avatar {
  width: 32px;
  height: 32px;
  background-color: #080808;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 2px solid var(--main-color);
}

.author-byline-text {
  font-size: 13px;
  color: var(--meta-color);
}

.author-byline-text .author-name {
  color: var(--title-color);
  font-weight: 600;
}

.author-meta-right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--meta-color);
}

/* Advertisement / Special Edition Banner */
.responsive-ad-banner {
  background: var(--body-bg-color);
  border: 1px dashed #cbd5e1;
  padding: 12px;
  text-align: center;
  font-size: 13px;
  color: #64748b;
  font-style: italic;
  border-radius: var(--border-radius);
  margin-bottom: 18px;
  cursor: pointer;
  transition: var(--transition);
}

.responsive-ad-banner:hover {
  background: rgba(127, 42, 29, 0.04);
  color: var(--main-color);
}

/* Featured Media Image in Main Column */
.main-featured-media {
  position: relative;
  width: 100%;
  height: 320px;
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: 18px;
  cursor: pointer;
}

.main-featured-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.main-featured-media:hover img {
  transform: scale(1.03);
}

/* Main Article Excerpt & Text */
.main-article-body {
  font-size: 15px;
  color: var(--text-color);
  line-height: 1.7;
  margin-bottom: 20px;
}

.main-article-body p {
  margin-bottom: 14px;
}

.article-action-buttons {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.btn-read-full {
  background: var(--button-bg);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: var(--border-radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition);
}

.btn-read-full:hover {
  background: var(--button-hover-bg);
}

.btn-listen-audio {
  background: var(--body-bg-color);
  border: 1px solid var(--border-color);
  color: var(--title-color);
  font-size: 13.5px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--border-radius);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-listen-audio:hover {
  background: rgba(127, 42, 29, 0.08);
  color: var(--main-color);
}

/* ==========================================================================
   Home Post Footer: Read More + Xapify Social Share Bar (Image 2 & 3)
   ========================================================================== */
.home-post-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
  margin-bottom: 24px;
  padding-top: 14px;
  border-top: 1px solid var(--border-color);
}

.footer-readmore-wrap {
  display: inline-flex;
  align-items: center;
}

.btn-xapify-readmore {
  background: var(--main-color);
  color: #ffffff;
  border: none;
  font-size: 13.5px;
  font-weight: 700;
  padding: 7px 18px;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-family: inherit;
}

.btn-xapify-readmore:hover {
  background: var(--brick-maroon-dark, #631F15);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(127, 42, 29, 0.25);
}

.btn-xapify-readmore i {
  font-size: 11px;
  transition: transform 0.2s ease;
}

.btn-xapify-readmore:hover i {
  transform: translateX(3px);
}

/* Xapify Social Share Pills */
.footer-share-wrap {
  display: inline-flex;
  align-items: center;
}

.xapify-share-pills {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.x-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 29px;
  min-width: 29px;
  padding: 0;
  border-radius: 3px;
  color: #ffffff;
  text-decoration: none;
  font-size: 13px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.15s ease;
  line-height: 1;
}

.x-share-btn:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Facebook pill with text and divider */
.x-share-btn.share-fb {
  background: #3b5998;
  padding: 0 10px;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
}

.x-share-btn.share-fb i {
  font-size: 13px;
}

.x-share-divider {
  opacity: 0.45;
  font-weight: 300;
  margin: 0 1px;
  font-size: 11px;
}

.x-share-text {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

/* Square icon buttons */
.x-share-btn.share-x {
  background: #000000;
  width: 29px;
}

.x-share-btn.share-wa {
  background: #25d366;
  width: 29px;
  font-size: 14.5px;
}

.x-share-btn.share-pin {
  background: #cb2027;
  width: 29px;
  font-size: 13px;
}

.x-share-btn.share-reddit {
  background: #ff4500;
  width: 29px;
  font-size: 13.5px;
}

.x-share-btn.share-linkedin {
  background: #0077b5;
  width: 29px;
  font-size: 13px;
}

.x-share-btn.share-tumblr {
  background: #35465c;
  width: 29px;
  font-size: 13px;
}

.x-share-btn.share-telegram {
  background: #0088cc;
  width: 29px;
  font-size: 13px;
}

.x-share-btn.share-email {
  background: #6c757d;
  width: 29px;
  font-size: 12px;
}

.x-share-btn.share-toggle-more {
  background: #f1f3f5;
  color: #495057;
  width: 29px;
  font-size: 12px;
  border: 1px solid #dee2e6;
}

html.is-dark .x-share-btn.share-toggle-more {
  background: #2a2a2a;
  color: #adb5bd;
  border-color: #3d3d3d;
}

.x-share-more-group {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  animation: fadeInShareGroup 0.2s ease-in-out;
}

@keyframes fadeInShareGroup {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* Secondary Articles Feed inside Center Column */
.more-posts-header {
  border-top: 2px solid var(--border-color);
  padding-top: 20px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.more-posts-title {
  font-family: var(--title-font);
  font-size: 18px;
  font-weight: 700;
  color: var(--title-color);
}

.secondary-post-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
}

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

.secondary-post-thumb {
  height: 95px;
  border-radius: var(--border-radius);
  overflow: hidden;
}

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

.secondary-post-item:hover .secondary-post-thumb img {
  transform: scale(1.06);
}

.secondary-post-details {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.secondary-post-title {
  font-family: var(--title-font);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--title-color);
  line-height: 1.35;
  transition: color 0.2s ease;
}

.secondary-post-item:hover .secondary-post-title {
  color: var(--title-hover-color);
}

.secondary-post-meta {
  font-size: 11.5px;
  color: var(--meta-color);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

/* ==========================================================================
   SINGLE ARTICLE IN-PAGE VIEW (Exact Xapify Layout in Center Column)
   ========================================================================== */
.single-post-headline {
  font-family: var(--title-font);
  font-size: 19px;
  font-weight: 800;
  color: var(--title-color);
  line-height: 1.3;
  margin-bottom: 12px;
}

.single-post-media {
  position: relative;
  width: 100%;
  max-height: 420px;
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: 20px;
}

.single-post-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.single-article-content {
  font-size: 15.5px;
  color: var(--text-color);
  line-height: 1.85;
}

.single-article-content p {
  margin-bottom: 16px;
}

.single-article-content blockquote {
  border-left: 4px solid var(--main-color);
  padding: 12px 18px;
  margin: 18px 0;
  background: rgba(0, 123, 255, 0.04);
  font-style: italic;
  font-weight: 500;
  color: var(--title-color);
  border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.single-share-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 14px 0;
  margin: 22px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.share-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--title-color);
  margin-right: 4px;
}

.author-bio-box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--body-bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  margin: 22px 0;
}

.post-navigation-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 22px 0;
  padding: 14px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.post-nav-item {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  border-radius: 4px;
  background: var(--body-bg-color);
  transition: all 0.2s ease;
}

.post-nav-item:hover {
  background: rgba(0, 123, 255, 0.08);
  transform: translateY(-2px);
}

.post-nav-item.next {
  text-align: right;
}

.nav-dir {
  font-size: 11px;
  color: var(--main-color);
  font-weight: 700;
  text-transform: uppercase;
}

.nav-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--title-color);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 14px;
}

.related-post-card {
  cursor: pointer;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  background: var(--widget-bg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-post-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.related-post-thumb {
  width: 100%;
  height: 105px;
  overflow: hidden;
}

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

.related-post-card:hover .related-post-thumb img {
  transform: scale(1.06);
}

.related-post-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--title-color);
  padding: 8px 10px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Comments Section Styling */
.comments-section-wrap {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 2px solid var(--border-color);
}

.comments-heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--title-color);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.comments-heading i {
  color: var(--main-color);
}

.comments-list-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.comment-item-card {
  display: flex;
  gap: 12px;
  padding: 14px;
  background: var(--body-bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  transition: border-color 0.2s ease, transform 0.2s ease;
  animation: fadeInComment 0.3s ease-in-out;
}

@keyframes fadeInComment {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.comment-avatar {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  font-size: 13px;
  border: none;
}

.comment-body-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.comment-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.comment-user-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--title-color);
}

.comment-time-badge {
  font-size: 11px;
  color: var(--meta-color);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.comment-text-content {
  font-size: 13.5px;
  color: var(--text-color);
  line-height: 1.55;
  margin-top: 2px;
}

.comment-actions-bar {
  display: flex;
  gap: 14px;
  margin-top: 6px;
}

.comment-action-btn {
  background: transparent;
  border: none;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--meta-color);
  cursor: pointer;
  padding: 2px 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s ease;
}

.comment-action-btn:hover,
.comment-action-btn.active {
  color: var(--main-color);
}

/* Add Comment Form */
.add-comment-wrapper {
  background: var(--widget-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.add-comment-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--title-color);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.comment-inputs-row {
  margin-bottom: 10px;
}

.comment-name-input {
  width: 100%;
  max-width: 280px;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease;
}

.comment-name-input:focus {
  border-color: var(--main-color);
}

.comment-textarea-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--input-bg);
  color: var(--text-color);
  font-size: 13.5px;
  font-family: inherit;
  resize: vertical;
  min-height: 75px;
  outline: none;
  transition: border-color 0.2s ease;
}

.comment-textarea-input:focus {
  border-color: var(--main-color);
}

.comment-submit-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.btn-submit-comment {
  padding: 9px 20px;
  background: var(--main-color);
  color: #fff;
  border: none;
  border-radius: var(--border-radius);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-submit-comment:hover {
  background: var(--brick-maroon-dark, #631F15);
  transform: translateY(-1px);
}

/* ==========================================================================
   COLUMN 3: RIGHT SIDEBAR (Random Posts 2x2 Grid + Weekly Showcase)
   ========================================================================== */
/* 2x2 Grid exactly matching screenshot */
.random-posts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.random-grid-item {
  display: flex;
  flex-direction: column;
  cursor: pointer;
}

.random-grid-thumb {
  width: 100%;
  height: 82px;
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: 6px;
}

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

.random-grid-item:hover .random-grid-thumb img {
  transform: scale(1.08);
}

.random-grid-title {
  font-family: var(--title-font);
  font-size: 12px;
  font-weight: 700;
  color: var(--title-color);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
  transition: color 0.2s ease;
}

.random-grid-item:hover .random-grid-title {
  color: var(--title-hover-color);
}

.random-grid-date {
  font-size: 11px;
  color: var(--meta-color);
}

/* Weekly publication Showcase in Right Sidebar */
.weekly-showcase-box {
  background: linear-gradient(145deg, rgba(238, 123, 48, 0.08), rgba(127, 42, 29, 0.05));
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.weekly-mini-cover {
  width: 140px;
  height: 185px;
  border-radius: 2px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
  border: 2px solid #fff;
  cursor: pointer;
  overflow: hidden;
}

.weekly-mini-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.weekly-box-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--title-color);
}

.weekly-box-subtitle {
  font-size: 11.5px;
  color: var(--meta-color);
}

.weekly-btn-row {
  display: flex;
  gap: 6px;
  width: 100%;
}

.weekly-btn-row button {
  flex: 1;
  padding: 7px 10px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.weekly-btn-read {
  background: var(--main-color);
  color: #fff;
}

.weekly-btn-down {
  background: rgba(238, 123, 48, 0.12);
  color: var(--orange, #EE7B30);
  border: 1px solid rgba(238, 123, 48, 0.4);
}

/* Social Follow Widget */
.social-icons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.social-icon-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 2px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 500;
}

.social-icon-box.fb { background-color: #3b5998; }
.social-icon-box.tw { background-color: #000000; }          /* X (Twitter) is black everywhere: Follow us + the share bar under an article */
html.is-dark .social-icon-box.tw { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22); }   /* a hairline, so black stays visible on the dark page */
.social-icon-box.yt { background-color: #cd201f; }
.social-icon-box.wa { background-color: #25d366; }
.social-icon-box.cp { background-color: #0284c7; }

/* Follow Us widget: the intro line and the small sub-labels are only shown on phones / tablets
   (css/responsive.css). On desktop the cards look exactly like the plain coloured buttons. */
.follow-intro,
.follow-sub {
  display: none;
}

.follow-txt {
  display: contents;
}

/* Share-bar buttons under an article (these used to be inline styles in app.js) */
.share-btn {
  padding: 6px 14px;
  font-size: 12.5px;
  border: none;
  cursor: pointer;
}

.back-home-wrap {
  text-align: center;
  margin-top: 26px;
}

/* Last crumb of the article breadcrumb: single line, ellipsis */
.crumb-title {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   FEATURED VIDEOS WIDGET (Matching Popular Posts with Video Badges & Play UI)
   ========================================================================== */
.video-card-large {
  position: relative;
}

.video-badge {
  background-color: #dc2626 !important;
}

.video-play-center-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  background: rgba(220, 38, 38, 0.95);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  padding-left: 4px;
  box-shadow: 0 4px 18px rgba(220, 38, 38, 0.65), 0 0 0 4px rgba(255, 255, 255, 0.6);
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  z-index: 5;
  pointer-events: none;
}

.video-card-large:hover .video-play-center-btn {
  transform: translate(-50%, -50%) scale(1.15);
  background: #ef4444;
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.8), 0 0 0 6px rgba(255, 255, 255, 0.6);
}

.video-sub-thumb {
  position: relative;
}

.video-mini-play-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.video-mini-play-overlay i {
  width: 24px;
  height: 24px;
  background: rgba(220, 38, 38, 0.95);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  padding-left: 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, background 0.2s ease;
}

.video-sub-item:hover .video-mini-play-overlay i {
  transform: scale(1.2);
  background: #ef4444;
}

/* Video Player Modal Styling */
.video-player-wrapper {
  display: flex;
  flex-direction: column;
}

.video-player-screen {
  position: relative;
  width: 100%;
  height: 320px;
  background: #000000;
  border-radius: var(--border-radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.65;
}

.video-playing-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.85) 100%);
}

.video-playing-pulse {
  font-size: 54px;
  color: #ef4444;
  cursor: pointer;
  filter: drop-shadow(0 4px 10px rgba(239, 68, 68, 0.6));
  animation: pulsePlay 2s infinite ease-in-out;
}

@keyframes pulsePlay {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.video-details-pad {
  padding-top: 14px;
}

.video-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Featured Videos with no video yet: the section stays, with a short note; "अधिक पहा" opens the rest */
.video-empty {
  padding: 22px 12px;
  text-align: center;
  color: var(--meta-color);
  font-size: 14px;
}

.video-empty i {
  display: block;
  margin-bottom: 8px;
  font-size: 26px;
  opacity: 0.45;
}

.video-empty p {
  margin: 0;
}

/* "अधिक पहा" under the Featured Videos: a small outline pill (not the big filled weekly button) */
.load-more-wrap.video-more-wrap {
  margin: 8px 0 2px;
  padding: 0;
}

.video-more-wrap .btn-load-more {
  gap: 6px;
  padding: 5px 15px;
  background: transparent;
  color: var(--main-color, #7F2A1D);
  border: 1.5px solid var(--main-color, #7F2A1D);
  font-size: 13px;
  box-shadow: none;
}

.video-more-wrap .btn-load-more i {
  font-size: 11px;
}

.video-more-wrap .btn-load-more:hover {
  background: var(--main-color, #7F2A1D);
  border-color: var(--main-color, #7F2A1D);
  color: #ffffff;
  transform: none;
  box-shadow: none;
}

html.is-dark .video-more-wrap .btn-load-more {
  color: var(--title-color);
  border-color: currentColor;
}

html.is-dark .video-more-wrap .btn-load-more:hover {
  background: var(--main-color, #7F2A1D);
  border-color: var(--main-color, #7F2A1D);
}

/* A video the owner uploaded: the browser's own player (play / pause, seeking, volume, full screen) in a black box */
.video-player-screen.video-player-real {
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
}

.video-player-el {
  display: block;
  width: 100%;
  max-height: 70vh;
  max-height: 70dvh;
  background: #000000;
  outline: none;
}

/* A YouTube link: YouTube's own player in a 16:9 box */
.video-player-screen.video-player-yt {
  height: auto;
  max-height: none;
  aspect-ratio: 16 / 9;
}

.video-player-yt iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-player-error {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  text-align: center;
  color: #ffffff;
  background: rgba(0, 0, 0, 0.88);
  font-size: 14px;
}

.video-player-error[hidden] {
  display: none;
}

.video-player-error i {
  font-size: 26px;
  color: #f59e0b;
}

/* ==========================================================================
   3. CLEAN COMPACT FOOTER & MODALS
   ========================================================================== */
.site-footer {
  background: var(--text-dark, #1E1A17);
  color: var(--border-cream, #ECE4DC);
  padding: 24px 0 16px;
  border-top: 3px solid var(--brick-maroon, #7F2A1D);
  margin-top: 40px;
}

/* Footer columns (like a classic footer): Quick Links | Office contact. One column on a phone. */
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 28px 48px;
  margin-bottom: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-col-title {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
}

/* Quick Links: the header's sections as a plain list, one below the other (the section you are in is orange) */
.footer-quick-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.footer-quick-link {
  padding: 7px 0;
  border: 0;
  background: none;
  color: var(--border-cream, #ECE4DC);
  font: inherit;
  font-size: 15px;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s ease;
}

.footer-quick-link:hover,
.footer-quick-link.active {
  color: var(--orange, #EE7B30);
}

.footer-quick-link.active {
  font-weight: 700;
}

.footer-quick-link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
  border-radius: 2px;
}

/* Office contact: address, phone, e-mail */
.footer-contact-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.footer-contact-item > i {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--orange, #EE7B30);
  font-size: 14px;
}

.footer-contact-text {
  min-width: 0;
}

.footer-contact-label {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
  color: rgba(236, 228, 220, 0.7);
}

.footer-contact-value {
  display: block;
  font-size: 13.5px;
  font-style: normal;
  line-height: 1.55;
  color: var(--border-cream, #ECE4DC);
  overflow-wrap: anywhere;
}

a.footer-contact-value:hover {
  color: var(--orange, #EE7B30);
}

@media (max-width: 760px) {
  .footer-top {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
}

@media (max-width: 600px) {
  /* comfortable tap targets */
  .footer-quick-link {
    padding: 11px 0;
    font-size: 16px;
  }

  a.footer-contact-value {
    padding: 6px 0;
    margin: -4px 0;                 /* (the tap area grows, the look stays the same as the address line) */
  }
}

.footer-inner-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-copy {
  font-size: 13px;
  color: var(--border-cream, #ECE4DC);
}

.footer-copy strong {
  color: #ffffff;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(3px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--widget-bg);
  border-radius: 3px;
  max-width: 780px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}

.modal-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: var(--widget-bg);
  z-index: 10;
}

.modal-close-icon {
  background: none;
  font-size: 20px;
  color: var(--meta-color);
  cursor: pointer;
  flex-shrink: 0;
}

.modal-title {
  color: var(--title-color);
  font-size: 15px;
  min-width: 0;
}

.modal-body-pad {
  padding: 20px;
}

.modal-card--epaper { max-width: 720px; }
.modal-card--video { max-width: 760px; }

/* Weekly e-paper preview (kept as classes so it can be made responsive) */
.epaper-body { text-align: center; }

.epaper-sheet {
  background: #fdfdfd;
  color: #111;
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 2px;
  margin-bottom: 16px;
  text-align: left;
}

.epaper-masthead {
  border-bottom: 2px solid #000;
  padding-bottom: 8px;
  margin-bottom: 12px;
  text-align: center;
}

.epaper-name {
  font-size: 26px;
  font-weight: 800;
  color: var(--main-color, #7F2A1D);
  margin-bottom: 2px;
}

.epaper-meta {
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2px 10px;
  color: var(--meta-color, #6B625A);
}

.epaper-headline {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.epaper-text {
  font-size: 13px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 10px;
}

.epaper-photo {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 2px;
  margin-bottom: 10px;
}

.epaper-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.epaper-actions button {
  padding: 10px 20px;
}

/* Slide-Out Drawer (Exact Xapify Slide Menu matching Image 2) */
.mobile-drawer {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 320px;
  max-width: 88vw;
  background: var(--widget-bg);
  z-index: 2500;
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.25);
  /* Closed state uses transform + visibility (not left:-340px) so no shadow peeks in at the screen edge
     and the hidden drawer cannot be reached with Tab / screen readers. */
  transform: translateX(-105%);
  visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s linear 0.3s;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
}

.mobile-drawer.open {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2400;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0s;
}

/* Drawer Header with Search Box & Close Button (Matching Image 2) */
.slide-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
  background: var(--widget-bg);
  position: sticky;
  top: 0;
  z-index: 10;
  gap: 10px;
}

.drawer-search-box {
  display: flex;
  align-items: center;
  flex: 1;
  background: var(--widget-bg);
  border: 1px solid #cbd5e1;
  border-radius: var(--border-radius);
  padding: 2px 8px;
  height: 38px;
}

html.is-dark .drawer-search-box {
  border-color: rgba(255, 255, 255, 0.15);
}

.drawer-search-box input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  color: var(--title-color);
  padding: 4px;
}

.drawer-search-btn {
  background: none;
  border: none;
  color: var(--meta-color);
  font-size: 14px;
  cursor: pointer;
}

.drawer-close-action {
  background: none;
  border: none;
  color: var(--title-color);
  font-size: 18px;
  cursor: pointer;
  padding: 4px 6px;
  transition: color var(--transition);
}

.drawer-close-action:hover {
  color: var(--accent-red);
}



/* Popular Items Section inside Drawer (Matching Image 2) */
.drawer-popular-section {
  padding: 14px;
}

.drawer-popular-title {
  font-family: var(--title-font);
  font-size: 14px;
  font-weight: 700;
  color: var(--title-color);
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
}

.drawer-popular-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Floating Back to Top */
#back-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 36px;
  height: 36px;
  background: var(--main-color);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
  cursor: pointer;
  z-index: 999;
  padding: 0;
}

/* Toast */
.toast-bar {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: #0f172a;
  color: #fff;
  padding: 8px 18px;
  font-size: 13px;
  line-height: 1.5;
  border-radius: 20px;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 3000;
  pointer-events: none;
  /* A fixed element with left:50% only gets 50% of the screen width to wrap in -> long Marathi
     messages broke into 3-4 narrow lines on phones. Size to content, capped to the screen. */
  width: max-content;
  max-width: min(92vw, 440px);
  text-align: center;
}

.toast-bar.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   40+ Weekly Publications Archive & Card Styles
   ========================================================================== */
.weekly-archive-promo-card {
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.05), rgba(185, 28, 28, 0.06));
  border: 1px solid rgba(0, 123, 255, 0.18);
  border-radius: var(--border-radius);
  padding: 18px 20px;
  margin-top: 10px;
  margin-bottom: 24px;
  text-align: center;
}

html.is-dark .weekly-archive-promo-card {
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.12), rgba(185, 28, 28, 0.12));
  border-color: rgba(255, 255, 255, 0.12);
}

.archive-promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-red);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}

.archive-promo-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--title-color);
  margin-bottom: 6px;
}

.archive-promo-desc {
  font-size: 13.5px;
  color: var(--text-color);
  line-height: 1.55;
  margin-bottom: 14px;
}

.btn-goto-weekly-archive {
  background: var(--main-color);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 13.5px;
  font-weight: 700;
  padding: 9px 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.25);
  font-family: inherit;
}

.btn-goto-weekly-archive:hover {
  background: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.35);
}

/* Home Page Minimal Weekly Archive CTA */
.home-weekly-archive-cta {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed var(--border-color);
  text-align: center;
}

.btn-archive-pill {
  background: var(--body-bg-color);
  border: 1.5px solid var(--border-color);
  color: var(--title-color);
  padding: 10px 24px;
  border-radius: 30px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.25s ease;
  font-family: inherit;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.btn-archive-pill:hover {
  background: var(--main-color);
  color: #fff;
  border-color: var(--main-color);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 123, 255, 0.25);
}

.btn-archive-pill:hover i {
  color: #fff !important;
}

html.is-dark .btn-archive-pill {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: #f1f5f9;
}

html.is-dark .btn-archive-pill:hover {
  background: var(--main-color);
  border-color: var(--main-color);
}

/* Weekly Search & Filter Toolbar */
.weekly-search-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.weekly-search-input-wrap {
  flex: 1;
  min-width: 240px;
  position: relative;
  display: flex;
  align-items: center;
}

.weekly-search-input-wrap i {
  position: absolute;
  left: 12px;
  color: var(--meta-color);
  font-size: 13px;
  pointer-events: none;
}

.weekly-search-input-wrap input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--input-bg);
  color: var(--title-color);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}

.weekly-search-input-wrap input:focus {
  border-color: var(--main-color);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.15);
}

/* Year filter under the search box: "सर्व" + one pill per year */
.weekly-year-pills {
  margin: -4px 0 16px;
  gap: 8px;
}

.weekly-year-pill {
  min-width: 56px;
  padding: 6px 16px;
}

/* Weekly Edition Card Specifics */
.weekly-edition-item {
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.weekly-edition-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.07);
}

/* the small cover in the list: the top of the front page (masthead + headline + main photo) */
.weekly-edition-item .secondary-post-thumb img {
  object-position: top;
}

.edition-no-badge {
  display: inline-block;
  background: rgba(127, 42, 29, 0.1);
  color: var(--main-color, #7F2A1D);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 3px;
  margin-bottom: 4px;
  width: fit-content;
}

html.is-dark .edition-no-badge {
  background: rgba(238, 123, 48, 0.2);
  color: var(--orange, #EE7B30);
}

.weekly-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.btn-card-read {
  background: var(--main-color);
  color: #fff;
  border: none;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: opacity 0.2s;
  font-family: inherit;
}

.btn-card-read:hover {
  opacity: 0.9;
}

.btn-card-pdf {
  background: var(--orange, #EE7B30);
  color: #fff;
  border: none;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: opacity 0.2s;
  font-family: inherit;
}

.btn-card-pdf:hover {
  opacity: 0.9;
}

/* ==========================================================================
   VIEWS: Home "News" section · Weekly publication section · weekly issue page · PDF reader
   (phone / tablet adjustments for all of this live in css/responsive.css)
   ========================================================================== */

/* ---- colour-coded section chips / badges (Brick & Olive Authentic Mapping) ---- */
.cat-chip {
  display: inline-block;
  padding: 1px 9px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.65;
  background: rgba(127, 42, 29, 0.1);
  color: var(--main-color);
}

.cat-chip.cat-rajkiy  { background: rgba(127, 42, 29, 0.12); color: #7F2A1D; }
.cat-chip.cat-samajik { background: rgba(90, 122, 43, 0.14); color: #5A7A2B; }
.cat-chip.cat-weekly  { background: rgba(238, 123, 48, 0.14); color: #EE7B30; }
.cat-chip.cat-blogs   { background: rgba(107, 98, 90, 0.14); color: #6B625A; }
.cat-chip.cat-review  { background: rgba(238, 123, 48, 0.14); color: #EE7B30; }

html.is-dark .cat-chip.cat-rajkiy  { background: rgba(127, 42, 29, 0.25); color: #EE7B30; }
html.is-dark .cat-chip.cat-samajik { background: rgba(90, 122, 43, 0.25); color: #84AC45; }
html.is-dark .cat-chip.cat-weekly  { background: rgba(238, 123, 48, 0.25); color: #EE7B30; }
html.is-dark .cat-chip.cat-blogs   { background: rgba(107, 98, 90, 0.25); color: #DCD4CC; }
html.is-dark .cat-chip.cat-review  { background: rgba(238, 123, 48, 0.25); color: #EE7B30; }

.category-tag-badge.cat-rajkiy  { background-color: #7F2A1D; color: #FFFFFF; }
.category-tag-badge.cat-samajik { background-color: #5A7A2B; color: #FFFFFF; }
.category-tag-badge.cat-weekly  { background-color: #EE7B30; color: #FFFFFF; }
.category-tag-badge.cat-blogs   { background-color: #6B625A; color: #FFFFFF; }
.category-tag-badge.cat-review  { background-color: #EE7B30; color: #FFFFFF; }

.empty-note {
  padding: 16px 0;
  color: var(--meta-color);
}

/* ---- Home: News section (header with filter pills + a big first story) ---- */
.news-section-head {
  flex-wrap: wrap;
  gap: 10px 16px;
}

.more-title-sub {
  font-size: 0.78em;
  font-weight: 500;
  color: var(--meta-color);
}

.news-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.news-pill {
  padding: 5px 14px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--body-bg-color);
  color: var(--title-color);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.news-pill:hover {
  border-color: var(--main-color);
  color: var(--main-color);
}

.news-pill.active {
  background: var(--main-color);
  border-color: var(--main-color);
  color: #ffffff;
}

.news-featured {
  margin: 4px 0 6px;
}

.news-featured .popular-card-media {
  aspect-ratio: 16 / 9;
}

.news-featured .popular-card-caption {
  padding: 12px 2px 0;
}

.news-featured .popular-card-title {
  font-size: 15px;
  line-height: 1.4;
  margin-bottom: 6px;
}

.news-featured .popular-card-byline {
  font-size: 12.5px;
}

/* ---- Load More Button for Tajya Batamya ---- */
.load-more-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 18px 0 10px;
  padding: 8px 0;
}

.btn-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 28px;
  border-radius: 999px;
  background: var(--brick-maroon, #7F2A1D);
  color: #ffffff;
  border: 1px solid var(--brick-maroon, #7F2A1D);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(127, 42, 29, 0.22);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-load-more:hover {
  background: var(--orange, #EE7B30);
  border-color: var(--orange, #EE7B30);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(238, 123, 48, 0.35);
}

.btn-load-more:active {
  transform: translateY(0);
}

.btn-load-more i {
  font-size: 14px;
  transition: transform 0.2s ease;
}

.btn-load-more:hover i {
  transform: translateY(2px);
}

.btn-load-more .load-more-count {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 12.5px;
  font-weight: 600;
}

.load-more-end {
  text-align: center;
  padding: 18px 12px;
  color: var(--meta-color, #6B625A);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.load-more-end i {
  color: var(--olive-green, #5A7A2B);
  font-size: 16px;
}

.load-more-wrap[hidden],
.load-more-end[hidden] {
  display: none;
}

/* Read More + PDF button side by side */
.footer-readmore-wrap {
  flex-wrap: wrap;
  gap: 8px;
}

.btn-xapify-pdf {
  background: var(--orange, #EE7B30);
  color: #ffffff;
  border: none;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-xapify-pdf:hover {
  background: var(--orange-dark, #D4671F);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(238, 123, 48, 0.3);
}

/* PDF tag sits on the thumbnail itself, wherever the thumbnail is (left on desktop, right on phones) */
.secondary-post-thumb {
  position: relative;
}

/* Text that is read by screen readers and search engines but not shown (the Weekly page has no banner, yet keeps its main heading) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---- Weekly publication section ---- */
/* Weekly publication before the first issue is published: one calm card instead of an empty list */
.weekly-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
  padding: 38px 22px 34px;
  border: 1px dashed var(--border-color);
  border-radius: 4px;
  background: var(--widget-bg);
  text-align: center;
}

.weekly-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(127, 42, 29, 0.08);
  color: var(--main-color);
  font-size: 28px;
}

html.is-dark .weekly-empty-icon {
  background: rgba(238, 123, 48, 0.14);
  color: var(--accent-orange);
}

html.is-dark .weekly-empty .btn-archive-pill i {
  color: var(--accent-orange) !important;   /* beats the inline brick colour, which is too dark on the dark card */
}

.weekly-empty-title {
  margin: 6px 0 0;
  font-family: var(--title-font);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.4;
  color: var(--title-color);
}

.weekly-empty-text {
  max-width: 460px;
  margin: 0 0 10px;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--meta-color);
}

.weekly-latest {
  display: grid;
  grid-template-columns: minmax(0, 42%) minmax(0, 1fr);
  gap: 18px;
  margin-bottom: 24px;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: var(--widget-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* The cover of an issue is the front page of its PDF: a portrait A4 page, shown whole (nothing cut off) */
.weekly-latest-cover {
  position: relative;
  align-self: start;
  aspect-ratio: 210 / 297;
  overflow: hidden;
  border-radius: 3px;
  background: var(--body-bg-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
  cursor: pointer;
}

.weekly-latest-cover img {
  position: absolute;
  top: 0;
  left: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.weekly-latest-cover:hover img {
  transform: scale(1.04);
}

/* "नवीनतम अंक": a small label above the headline of the newest issue (not on the cover) */
.latest-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: 3px;
  background: var(--main-color, #7F2A1D);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 800;
}

.weekly-latest-title {
  margin: 6px 0 8px;
  font-family: var(--title-font);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.4;
  color: var(--title-color);
  cursor: pointer;
}

.weekly-latest-title:hover {
  color: var(--title-hover-color);
}

.weekly-latest-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-bottom: 8px;
  font-size: 12.5px;
  color: var(--meta-color);
}

.weekly-latest-excerpt {
  margin-bottom: 14px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-color);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.weekly-latest-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* latest-issue card buttons: the main one takes the first row, the other two share the second */
.weekly-latest-actions .btn-pdf-read {
  flex: 1 1 100%;
  justify-content: center;
}

.weekly-latest-actions .btn-card-read,
.weekly-latest-actions .btn-pdf-dl {
  flex: 1 1 0;
  justify-content: center;
  padding-top: 9px;
  padding-bottom: 9px;
  font-size: 13.5px;
}

.btn-pdf-read,
.btn-pdf-dl,
.btn-pdf-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-pdf-read {
  background: var(--orange, #EE7B30);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(238, 123, 48, 0.25);
}

.btn-pdf-read:hover {
  background: var(--orange-dark, #D4671F);
  transform: translateY(-1px);
}

.btn-pdf-dl,
.btn-pdf-open {
  background: var(--body-bg-color);
  border-color: var(--border-color);
  color: var(--title-color);
}

.btn-pdf-dl:hover,
.btn-pdf-open:hover {
  border-color: var(--main-color);
  color: var(--main-color);
}

/* ---- One weekly issue: cover + PDF card ---- */
.issue-pdf-card {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  margin-bottom: 22px;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  background: linear-gradient(135deg, rgba(238, 123, 48, 0.06), rgba(127, 42, 29, 0.04));
}

.issue-pdf-cover {
  position: relative;
  aspect-ratio: 210 / 297;
  overflow: hidden;
  border-radius: 3px;
  background: var(--body-bg-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
  cursor: pointer;
}

.issue-pdf-cover img {
  position: absolute;
  top: 0;
  left: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.issue-pdf-cover:hover img {
  transform: scale(1.04);
}

.issue-pdf-title {
  margin: 6px 0 4px;
  font-family: var(--title-font);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.4;
  color: var(--title-color);
}

.issue-pdf-meta {
  margin-bottom: 12px;
  font-size: 12.5px;
  color: var(--meta-color);
}

.issue-pdf-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.issue-pdf-actions .btn-pdf-read,
.issue-pdf-actions .btn-pdf-dl,
.issue-pdf-actions .btn-pdf-open {
  justify-content: center;
}

.issue-all-link {
  margin: 4px 0 10px;
  text-align: center;
}

/* Back links at the bottom of an article / issue */
.back-home-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* ---- PDF e-paper reader (the modal) ---- */
.modal-card--reader {
  width: 100%;
  max-width: 900px;
  height: min(92vh, 940px);
  overflow: hidden;
}

.modal-card--reader .modal-header-bar {
  flex: 0 0 auto;
}

.reader-body {
  --zoom: 1;
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px;
  overflow: auto;                     /* both ways: a zoomed page scrolls sideways too */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: #e6e8ec;
}

html.is-dark .reader-body {
  background: #141414;
}

.reader-pages {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: calc(100% * var(--zoom));
  min-width: 100%;
}

.reader-page {
  position: relative;
  width: 100%;
  max-width: 820px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.reader-body[data-zoom]:not([data-zoom="1"]) .reader-page {
  max-width: none;
}

.reader-canvas {
  display: block;
  width: 100%;
  height: auto;
}

/* a page that is not drawn yet shows its number on a soft shimmer, so nobody thinks the PDF is broken */
.reader-page:not([data-state])::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(100deg, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.06) 50%, rgba(0, 0, 0, 0) 70%);
  background-size: 250% 100%;
  animation: readerShimmer 1.4s linear infinite;
}

.reader-page:not([data-state])::after {
  content: attr(data-label);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #9aa0a6;
  font-size: 15px;
  font-weight: 700;
}

@keyframes readerShimmer {
  from { background-position: 150% 0; }
  to   { background-position: -100% 0; }
}

.reader-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 240px;
  padding: 30px 20px;
  text-align: center;
  line-height: 1.6;
  color: var(--text-color);
}

.reader-status[hidden] {
  display: none;
}

.reader-status strong {
  font-size: 16px;
  color: var(--title-color);
}

.reader-status small {
  min-height: 1.2em;
  font-size: 12.5px;
  color: var(--meta-color);
}

.reader-spin {
  font-size: 26px;
  color: var(--main-color);
}

.reader-ico {
  font-size: 32px;
  color: var(--meta-color);
}

.reader-ico.warn {
  color: #d97706;
}

.reader-progress {
  width: min(320px, 82%);
  height: 6px;
  overflow: hidden;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.12);
}

html.is-dark .reader-progress {
  background: rgba(255, 255, 255, 0.18);
}

.reader-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 6px;
  background: var(--main-color);
  transition: width 0.25s ease;
}

.reader-progress.indeterminate i {
  width: 38%;
  animation: readerSlide 1.1s ease-in-out infinite;
}

@keyframes readerSlide {
  from { transform: translateX(-110%); }
  to   { transform: translateX(290%); }
}

.reader-slow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--meta-color);
}

.reader-slow[hidden] {
  display: none;
}

.reader-fallback {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.reader-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--border-color);
  background: var(--widget-bg);
}

.reader-page-ind {
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--title-color);
  white-space: nowrap;
}

.reader-zoom {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.reader-zoom-val {
  min-width: 48px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--title-color);
}

.reader-actions {
  display: flex;
  gap: 8px;
}

.btn-reader {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--body-bg-color);
  color: var(--title-color);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.btn-reader.primary {
  background: var(--main-color);
  border-color: var(--main-color);
  color: #ffffff;
}

.btn-reader.icon {
  width: 40px;
  padding: 0;
}

.btn-reader:hover {
  border-color: var(--main-color);
}

.btn-reader:disabled {
  opacity: 0.4;
  cursor: default;
}

.btn-reader:disabled:hover {
  border-color: var(--border-color);
}

.btn-reader .sz:not(:empty)::before,
.pdf-size:not(:empty)::before {
  content: "•";
  margin: 0 5px 0 1px;
  opacity: 0.6;
}

/* PDF file missing: the buttons are hidden (app.js) and this note takes their place */
.pdf-missing-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 10px 14px;
  border: 1px dashed var(--border-color);
  border-radius: 6px;
  background: var(--body-bg-color);
  color: var(--meta-color);
  font-size: 13.5px;
}

[data-pdf-action][hidden],
.pdf-missing-note[hidden] {
  display: none !important;
}

/* ==========================================================================
   RESPONSIVE: all tablet / phone rules (1100 · 980 · 600 · 400 · 340px, landscape, safe-areas,
   touch polish) live in css/responsive.css, which is loaded right after this file.
   ========================================================================== */

/* ============================================================
   Language switch (मराठी | EN) and the word "by"
   ============================================================ */
.lang-switch {
  display: inline-flex;
  align-items: center;
  margin-right: 6px;
  padding: 3px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--body-bg-color);
}

.lang-opt {
  min-width: 42px;
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--title-color);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-opt:hover {
  color: var(--main-color);
}

.lang-opt.active {
  background: var(--main-color);
  color: #ffffff;
}

.lang-opt:focus-visible {
  outline: 2px solid var(--main-color);
  outline-offset: 2px;
}

.drawer-lang {
  display: flex;
  padding: 4px var(--pad-l, 16px) 12px;
}

.lang-switch-drawer {
  width: 100%;
  margin: 0;
}

.lang-switch-drawer .lang-opt {
  flex: 1;
  min-height: 40px;
  font-size: 14px;
}

/* the English "by" before an author's name is shown in English only */
html:lang(mr) .by-word {
  display: none;
}
