/* ============================================================
   MANAV SAMACHAR — Global Stylesheet
   Palette + tokens live in :root. Dark mode overrides in .dark.
   ============================================================ */
:root {
  --primary: #C62828;
  --secondary: #8B0000;
  --accent: #EF4444;
  --bg: #FAFAFA;
  --card: #FFFFFF;
  --border: #E5E7EB;
  --heading: #111827;
  --body: #4B5563;
  --muted: #6B7280;
  --success: #22C55E;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(17, 24, 39, .04), 0 1px 3px rgba(17, 24, 39, .06);
  --shadow-md: 0 4px 12px rgba(17, 24, 39, .06), 0 2px 4px rgba(17, 24, 39, .04);
  --shadow-lg: 0 12px 32px rgba(17, 24, 39, .08);
  --transition: 200ms ease;
  --container-max: 1280px;
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

html.dark {
  --bg: #0B0F17;
  --card: #131a26;
  --border: #1f2937;
  --heading: #F9FAFB;
  --body: #D1D5DB;
  --muted: #9CA3AF;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--body);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--heading);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
}

h2 {
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
}

h3 {
  font-size: 1.2rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--secondary);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container-xxl {
  max-width: var(--container-max);
}

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
  background: var(--heading);
  color: #E5E7EB;
  font-size: 12.5px;
  padding: 8px 0;
}

html.dark .topbar {
  background: #000;
}

.topbar a {
  color: #E5E7EB;
}

.topbar a:hover {
  color: #fff;
}

.topbar .divider {
  opacity: .3;
  margin: 0 10px;
}

.topbar .social a {
  display: inline-flex;
  width: 26px;
  height: 26px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  margin-left: 4px;
  transition: background var(--transition), color var(--transition);
}

.topbar .social a:hover {
  background: var(--primary);
  color: #fff;
}

/* ============================================================
   BREAKING NEWS TICKER
   ============================================================ */
.breaking {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  overflow: hidden;
  height: 44px;
}

.breaking .tag {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 12.5px;
  letter-spacing: .04em;
  padding: 6px 14px;
  border-radius: 999px;
  margin: 0 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

.breaking .track {
  overflow: hidden;
  flex: 1;
  white-space: nowrap;
  position: relative;
  mask-image: linear-gradient(to right, transparent, #000 40px, #000 calc(100% - 40px), transparent);
}

.breaking .marquee {
  display: inline-block;
  padding-left: 100%;
  animation: marquee 45s linear infinite;
  color: var(--heading);
  font-weight: 500;
  font-size: 14px;
}

.breaking:hover .marquee {
  animation-play-state: paused;
}

.breaking .marquee span {
  margin-right: 40px;
}

.breaking .marquee span::before {
  content: '●';
  color: var(--primary);
  margin-right: 10px;
  font-size: 8px;
  vertical-align: middle;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-100%);
  }
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(198, 40, 40, .4);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(198, 40, 40, 0);
  }
}

/* ============================================================
   HEADER / NAVBAR
   ============================================================ */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
}

.brand-block {
  padding: 18px 0;
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  box-shadow: var(--shadow-sm);
}

.brand-text .name {
  font-size: 26px;
  line-height: 1;
  font-weight: 800;
}

.brand-text .tag {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 500;
}

.navbar-wrap {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.navbar-custom {
  padding: 0;
}

.navbar-custom .nav-link {
  color: var(--heading) !important;
  font-weight: 500;
  font-size: 14.5px;
  padding: 16px 14px !important;
  position: relative;
  transition: color var(--transition);
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
  color: var(--primary) !important;
}

.navbar-custom .nav-link.active::after,
.navbar-custom .nav-link:hover::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--heading);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.icon-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Mega menu */
.mega-menu {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-lg) !important;
  padding: 20px !important;
  min-width: 520px;
  background: var(--card) !important;
}

.mega-menu .dropdown-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--body);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.mega-menu .dropdown-item:hover {
  background: rgba(198, 40, 40, .08);
  color: var(--primary);
}

.mega-menu .dropdown-item i {
  color: var(--primary);
  font-size: 14px;
}

/* ============================================================
   CARDS
   ============================================================ */
.card-news {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-news:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card-news .thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--border);
}

.card-news .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}

.card-news:hover .thumb img {
  transform: scale(1.04);
}

.card-news .badge-cat {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
}

.card-news .body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-news .title {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--heading);
  margin: 0 0 10px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-news .title a {
  color: inherit;
}

.card-news .title a:hover {
  color: var(--primary);
}

.card-news .meta {
  color: var(--muted);
  font-size: 12.5px;
  margin-top: auto;
  display: flex;
  gap: 12px;
}

.card-news .meta i {
  color: var(--primary);
  margin-right: 4px;
}

/* Horizontal card */
.card-news.horizontal {
  flex-direction: row;
}

.card-news.horizontal .thumb {
  width: 140px;
  aspect-ratio: 1;
  flex-shrink: 0;
}

.card-news.horizontal .body {
  padding: 12px 14px;
}

.card-news.horizontal .title {
  font-size: 14.5px;
  -webkit-line-clamp: 2;
  margin-bottom: 6px;
}

/* Featured card */
.card-featured {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/10;
}

.card-featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms ease;
}

.card-featured:hover img {
  transform: scale(1.05);
}

.card-featured .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .3) 45%, transparent 70%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
}

.card-featured .overlay .badge-cat {
  position: static;
  align-self: flex-start;
  margin-bottom: 10px;
}

.card-featured .overlay h3 {
  color: #fff;
  font-size: clamp(1.1rem, 1.6vw, 1.6rem);
  margin: 0 0 8px;
}

.card-featured .overlay .meta {
  color: rgba(255, 255, 255, .8);
  font-size: 12.5px;
}

/* ============================================================
   SECTION HEADINGS
   ============================================================ */
.section {
  padding: 40px 0;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--border);
}

.section-title h2 {
  position: relative;
  padding-left: 14px;
  margin: 0;
  font-size: 1.35rem;
}

.section-title h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 4px;
  background: var(--primary);
  border-radius: 3px;
}

.section-title .link-more {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.section-title .link-more:hover {
  color: var(--primary);
}

/* ============================================================
   HERO SLIDER
   ============================================================ */
.hero {
  padding: 24px 0 0;
}

.hero-slider .carousel-item {
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-slide {
  position: relative;
  aspect-ratio: 16/8;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
}

.hero-slide .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, .9), rgba(0, 0, 0, .25) 60%, transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(20px, 4vw, 48px);
  color: #fff;
}

.hero-slide h2 {
  color: #fff;
  font-size: clamp(1.4rem, 3.2vw, 2.4rem);
  max-width: 780px;
  margin: 10px 0;
}

.hero-slide p {
  color: rgba(255, 255, 255, .85);
  max-width: 720px;
  margin: 0 0 14px;
  font-size: clamp(13px, 1.4vw, 15px);
}

.hero-slide .badge-cat {
  background: var(--primary);
  color: #fff;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .05em;
  align-self: flex-start;
  text-transform: uppercase;
}

.carousel-indicators [data-bs-target] {
  background-color: #fff;
  opacity: .6;
  border-radius: 999px;
  height: 6px;
  width: 22px;
}

.carousel-indicators .active {
  opacity: 1;
  background: var(--primary);
}

/* ============================================================
   SIDEBAR WIDGETS
   ============================================================ */
.widget {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

.widget-title {
  font-size: 1.05rem;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
  position: relative;
}

.widget-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 44px;
  height: 2px;
  background: var(--primary);
}

.widget .side-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}

.widget .side-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.widget .side-item .num {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  background: rgba(198, 40, 40, .08);
  color: var(--primary);
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.widget .side-item img {
  width: 74px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.widget .side-item .info {
  flex: 1;
}

.widget .side-item .info a {
  color: var(--heading);
  font-weight: 500;
  font-size: 13.5px;
  line-height: 1.4;
  display: block;
}

.widget .side-item .info a:hover {
  color: var(--primary);
}

.widget .side-item .info .meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 4px;
}

.cat-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cat-list li {
  border-bottom: 1px dashed var(--border);
}

.cat-list li:last-child {
  border: 0;
}

.cat-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  color: var(--heading);
  font-weight: 500;
  font-size: 14px;
}

.cat-list a:hover {
  color: var(--primary);
  padding-left: 6px;
}

.cat-list .count {
  background: var(--bg);
  color: var(--muted);
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.tag-cloud a {
  display: inline-block;
  padding: 6px 12px;
  margin: 3px;
  background: var(--bg);
  color: var(--body);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
}

.tag-cloud a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ============================================================
   AD SLOTS
   ============================================================ */
.ad-slot {
  background: repeating-linear-gradient(45deg, var(--bg), var(--bg) 10px, var(--card) 10px, var(--card) 20px);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  margin: 24px 0;
}

.ad-slot.leaderboard {
  min-height: 90px;
}

.ad-slot.rectangle {
  min-height: 250px;
}

.ad-slot.skyscraper {
  min-height: 600px;
}

/* ============================================================
   NEWSLETTER
   ============================================================ */
.newsletter {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 56px);
  text-align: center;
  margin: 40px 0;
}

.newsletter h2 {
  color: #fff;
  margin: 0 0 8px;
}

.newsletter p {
  color: rgba(255, 255, 255, .9);
  margin: 0 auto 20px;
  max-width: 520px;
}

.newsletter form {
  display: flex;
  gap: 8px;
  max-width: 480px;
  margin: 0 auto;
  background: rgba(255, 255, 255, .14);
  padding: 6px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.newsletter input {
  flex: 1;
  background: transparent;
  border: 0;
  color: #fff;
  padding: 10px 16px;
  outline: none;
  font-size: 14px;
}

.newsletter input::placeholder {
  color: rgba(255, 255, 255, .75);
}

.newsletter button {
  background: #fff;
  color: var(--primary);
  border: 0;
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform var(--transition);
}

.newsletter button:hover {
  transform: translateY(-1px);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #0F172A;
  color: #CBD5E1;
  padding: 56px 0 0;
  margin-top: 40px;
}

html.dark .site-footer {
  background: #05070c;
}

.site-footer h5 {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 18px;
}

.site-footer a {
  color: #CBD5E1;
  font-size: 14px;
}

.site-footer a:hover {
  color: #fff;
  padding-left: 4px;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer ul li {
  padding: 6px 0;
}

.site-footer .about-block .brand-text .name {
  color: #fff;
  font-size: 22px;
}

.site-footer .about-block .brand-text .tag {
  color: #94A3B8;
}

.site-footer .contact-list li {
  display: flex;
  gap: 10px;
  align-items: start;
}

.site-footer .contact-list i {
  color: var(--accent);
  margin-top: 3px;
}

.site-footer .social a {
  display: inline-flex;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  align-items: center;
  justify-content: center;
  margin-right: 6px;
}

.site-footer .social a:hover {
  background: var(--primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 18px 0;
  margin-top: 40px;
  font-size: 13px;
  color: #94A3B8;
}

/* ============================================================
   BUTTONS / MISC
   ============================================================ */
.btn-primary-brand {
  background: var(--primary);
  color: #fff;
  border: 0;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 14px;
  transition: background var(--transition), transform var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary-brand:hover {
  background: var(--secondary);
  color: #fff;
  transform: translateY(-1px);
}

.btn-outline-brand {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 14px;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-outline-brand:hover {
  background: var(--primary);
  color: #fff;
}

/* Back to top */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  border: 0;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 1050;
  transition: transform var(--transition);
}

.back-to-top.show {
  display: inline-flex;
}

.back-to-top:hover {
  transform: translateY(-3px);
  background: var(--secondary);
}

/* Floating share */
.share-float {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1020;
}

.share-float a {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--heading);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
}

.share-float a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateX(3px);
}

@media (max-width: 991px) {
  .share-float {
    display: none;
  }
}

/* Breadcrumb */
.breadcrumb-wrap {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}

.breadcrumb {
  margin: 0;
  font-size: 13.5px;
}

.breadcrumb-item a {
  color: var(--muted);
}

.breadcrumb-item.active {
  color: var(--heading);
  font-weight: 500;
}

/* Pagination */
.pagination-brand {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 40px 0;
  flex-wrap: wrap;
}

.pagination-brand a,
.pagination-brand span {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--heading);
  font-weight: 500;
  font-size: 14px;
  transition: all var(--transition);
}

.pagination-brand a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.pagination-brand .current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Article */
.article-body {
  font-size: 16px;
  line-height: 1.85;
  color: var(--body);
}

.article-body p {
  margin: 0 0 18px;
}

.article-body h2,
.article-body h3 {
  margin: 32px 0 14px;
}

.article-body blockquote {
  border-left: 4px solid var(--primary);
  background: var(--bg);
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: var(--radius-sm);
  font-style: italic;
  color: var(--heading);
}

.article-body img {
  border-radius: var(--radius);
  margin: 20px 0;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 24px 0;
  font-size: 13.5px;
  color: var(--muted);
}

.article-meta .author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.article-meta .author img {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
}

.article-meta .author strong {
  color: var(--heading);
  font-weight: 600;
}

.share-inline {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.share-inline a {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--heading);
  transition: all var(--transition);
}

.share-inline a:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: sk 1.4s infinite;
  border-radius: var(--radius-sm);
}

@keyframes sk {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Fade-in */
.fade-in {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 500ms ease, transform 500ms ease;
}

.fade-in.visible {
  opacity: 1;
  transform: none;
}

/* Gallery */
.masonry {
  column-count: 3;
  column-gap: 16px;
}

.masonry .item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.masonry .item img {
  transition: transform 400ms ease;
}

.masonry .item:hover img {
  transform: scale(1.05);
}

@media (max-width: 991px) {
  .masonry {
    column-count: 2;
  }
}

@media (max-width: 576px) {
  .masonry {
    column-count: 1;
  }
}

/* Video card */
.video-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}

.video-card .thumb {
  position: relative;
  aspect-ratio: 16/9;
}

.video-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-card .play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .25);
  color: #fff;
  font-size: 40px;
  transition: background var(--transition);
}

.video-card:hover .play {
  background: rgba(198, 40, 40, .5);
}

.video-card .body {
  padding: 14px;
}

.video-card .body h3 {
  font-size: 15px;
  margin: 0 0 6px;
  color: var(--heading);
}

/* Search modal */
.modal-content {
  border: 0;
  border-radius: var(--radius);
  background: var(--card);
}

.search-input {
  border: 0;
  border-bottom: 2px solid var(--border);
  padding: 16px 4px;
  font-size: 20px;
  width: 100%;
  background: transparent;
  color: var(--heading);
  outline: none;
}

.search-input:focus {
  border-color: var(--primary);
}

/* Reporter profile */
.reporter-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
}

.reporter-card img {
  width: 120px;
  height: 120px;
  border-radius: 999px;
  margin: 0 auto 16px;
  object-fit: cover;
  border: 4px solid var(--card);
  box-shadow: var(--shadow-md);
}

.reporter-card h2 {
  margin: 0 0 4px;
}

.reporter-card .role {
  color: var(--primary);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* Forms */
.form-control-brand {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--heading);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  width: 100%;
}

.form-control-brand:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(198, 40, 40, .12);
}

.form-label-brand {
  color: var(--heading);
  font-weight: 500;
  font-size: 13.5px;
  margin-bottom: 6px;
  display: block;
}

/* Utility */
.text-primary-brand {
  color: var(--primary) !important;
}

.bg-card {
  background: var(--card);
}

.divider-x {
  height: 1px;
  background: var(--border);
  margin: 24px 0;
  border: 0;
}

/* Responsive nav collapse tweaks */
@media (max-width: 991px) {
  .brand-block {
    padding: 14px 0;
  }

  .brand-text .name {
    font-size: 22px;
  }

  .mega-menu {
    min-width: 100%;
  }

  .navbar-custom .nav-link {
    padding: 12px 4px !important;
  }

  .navbar-custom .nav-link.active::after,
  .navbar-custom .nav-link:hover::after {
    display: none;
  }
}

/* ============================================================
   HERO OVERFLOW FIX (mobile)
   ============================================================ */
html,
body {
  overflow-x: hidden;
}

.hero-slide .overlay {
  overflow: hidden;
}

.hero-slide h2,
.hero-slide h2 a {
  word-break: break-word;
}

@media (max-width: 575.98px) {
  .hero {
    padding: 12px 0 0;
  }

  .hero-slide {
    aspect-ratio: auto;
    min-height: 360px;
    max-height: 70vh;
  }

  .hero-slide .overlay {
    padding: 16px 16px 22px;
    background: linear-gradient(to top, rgba(0, 0, 0, .92), rgba(0, 0, 0, .35) 55%, rgba(0, 0, 0, .15));
  }

  .hero-slide h2 {
    font-size: 1.1rem !important;
    line-height: 1.35;
    margin: 8px 0 6px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero-slide p {
    font-size: 12.5px !important;
    line-height: 1.5;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero-slide .badge-cat {
    padding: 4px 10px;
    font-size: 10.5px;
  }

  .carousel-control-prev,
  .carousel-control-next {
    width: 12%;
  }

  .carousel-indicators {
    margin-bottom: 8px;
  }

  .carousel-indicators [data-bs-target] {
    width: 16px;
    height: 4px;
  }

  .card-featured .overlay h3 {
    font-size: 15px !important;
  }
}

/* ============================================================
   APP-LIKE MOBILE SHELL (<992px)
   ============================================================ */
@media (max-width: 991.98px) {

  html,
  body {
    -webkit-tap-highlight-color: transparent;
  }

  .topbar {
    display: none;
  }

  .site-header {
    display: none;
  }

  .navbar-wrap {
    box-shadow: 0 1px 0 var(--border), 0 6px 16px rgba(17, 24, 39, .06);
    padding-top: env(safe-area-inset-top);
  }

  .navbar-custom {
    min-height: 56px;
    padding: 6px 0;
  }

  .navbar-custom .container,
  .navbar-custom .container-xxl {
    padding-left: 14px;
    padding-right: 14px;
  }

  .navbar-custom .navbar-toggler {
    padding: 6px 10px 6px 0;
    color: var(--heading);
    display: inline-flex;
    align-items: center;
  }

  .navbar-custom .navbar-toggler::after {
    content: 'Manav Samachar';
    font-family: var(--font);
    font-weight: 800;
    font-size: 17px;
    color: var(--heading);
    letter-spacing: -0.01em;
    margin-left: 8px;
  }

  .navbar-custom .navbar-toggler i {
    font-size: 26px;
    vertical-align: middle;
  }

  .breaking {
    height: 38px;
  }

  .breaking .tag {
    font-size: 10.5px;
    padding: 4px 10px;
  }

  .breaking .marquee {
    font-size: 13px;
  }

  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom));
  }

  .back-to-top {
    bottom: calc(80px + env(safe-area-inset-bottom));
    right: 16px;
  }

  .btn,
  .btn-primary-brand,
  .icon-btn {
    min-height: 44px;
  }

  .navbar-custom .nav-link {
    min-height: 48px;
    display: flex;
    align-items: center;
    font-size: 15px;
  }

  .card-news {
    border-radius: 16px;
  }

  .widget {
    border-radius: 16px;
  }

  .share-float {
    display: none !important;
  }
}

/* Bottom tab bar */
.app-tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1040;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 20px rgba(17, 24, 39, .06);
}

.app-tabbar .row-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
}

.app-tabbar a,
.app-tabbar button {
  background: transparent;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 4px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 12px;
  transition: color var(--transition), background var(--transition);
  min-height: 52px;
}

.app-tabbar a i,
.app-tabbar button i {
  font-size: 20px;
  line-height: 1;
}

.app-tabbar a.active,
.app-tabbar button.active {
  color: var(--primary);
}

.app-tabbar a:active,
.app-tabbar button:active {
  background: rgba(198, 40, 40, .08);
}

@media (max-width: 991.98px) {
  .app-tabbar {
    display: block;
  }
}