/* =========================================================================
   🌐 LATEST NEWS PAGE STYLESHEET (latest.css - Editorial Stream Edition)
   ========================================================================= */

:root {
  --nv-red: #B71C1C;
  --nv-red-dark: #8B0000;
  --nv-dark: #0F172A;
  --nv-text: #1E293B;
  --nv-muted: #64748B;
  --nv-bg: #FFFFFF;
  --nv-surface: #F8FAFC;
  --nv-border: #E2E8F0;
  --nv-border-light: #F1F5F9;
  --nv-radius: 8px;
  --nv-radius-sm: 4px;
  --nv-font: 'SolaimanLipi', 'Noto Sans Bengali', -apple-system, sans-serif;
}

body {
  background-color: var(--nv-bg);
  color: var(--nv-text);
  font-family: var(--nv-font);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

/* ১. মেইন শেল কন্টেইনার */
.nv-latest-shell {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.nv-latest-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 32px;
  align-items: start;
  margin-top: 20px;
}

@media (max-width: 1024px) {
  .nv-latest-grid {
    grid-template-columns: 1fr;
  }
}

/* ২. ব্রেডক্রাম্ব */
.nv-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--nv-muted);
  margin: 14px 0 10px 0;
}

.nv-breadcrumb a {
  color: var(--nv-muted);
  text-decoration: none;
}

.nv-breadcrumb a:hover {
  color: var(--nv-red);
}

/* ৩. পেজ টাইটেল ও টুলবার */
.nv-page-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid var(--nv-dark);
  padding-bottom: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.nv-page-title-box h1 {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--nv-dark);
  margin: 0 0 4px 0;
}

.nv-page-title-box p {
  font-size: 0.88rem;
  color: var(--nv-muted);
  margin: 0;
}

.nv-layout-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nv-view-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--nv-border);
  background: #FFFFFF;
  border-radius: var(--nv-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--nv-muted);
  transition: all 0.2s;
}

.nv-view-btn.active, .nv-view-btn:hover {
  background: var(--nv-red);
  color: #FFFFFF;
  border-color: var(--nv-red);
}

.nv-view-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ৪. ফিল্টার পিলস (Filter Pills) */
.nv-filter-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  margin-bottom: 24px;
  padding-bottom: 4px;
}

.nv-filter-pills::-webkit-scrollbar { display: none; }

.nv-pill-item {
  padding: 6px 16px;
  background: var(--nv-surface);
  border: 1px solid var(--nv-border);
  border-radius: 20px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--nv-muted);
  text-decoration: none !important;
  transition: all 0.2s;
}

.nv-pill-item:hover, .nv-pill-item.active {
  background: var(--nv-red);
  color: #FFFFFF;
  border-color: var(--nv-red);
}

/* ৫. নিউজ ফিড লিস্ট মোড (List View) */
.nv-feed-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nv-news-item-card {
  display: flex;
  gap: 18px;
  background: #FFFFFF;
  border: 1px solid var(--nv-border);
  border-radius: var(--nv-radius);
  padding: 16px;
  text-decoration: none !important;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
}

.nv-news-item-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.nv-news-thumb-box {
  width: 220px;
  height: 135px;
  flex-shrink: 0;
  border-radius: var(--nv-radius-sm);
  overflow: hidden;
  background: var(--nv-surface);
}

.nv-news-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.nv-news-item-card:hover .nv-news-thumb-box img {
  transform: scale(1.05);
}

.nv-news-content {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
}

.nv-news-cat-tag {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--nv-red);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.nv-news-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--nv-dark);
  line-height: 1.4;
  margin: 0 0 8px 0;
  transition: color 0.2s;
}

.nv-news-item-card:hover .nv-news-title {
  color: var(--nv-red);
}

.nv-news-meta-row {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.82rem;
  color: var(--nv-muted);
  margin-top: auto;
  flex-wrap: wrap;
}

.nv-news-meta-row span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nv-bookmark-btn-inline {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--nv-muted);
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
}

.nv-bookmark-btn-inline:hover, .nv-bookmark-btn-inline.is-saved {
  color: #F59E0B;
}

/* গ্রিড ভিউ সাপোর্ট মোড (Grid Switcher Class) */
.nv-feed-container.is-grid-mode {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.nv-feed-container.is-grid-mode .nv-news-item-card {
  flex-direction: column;
}

.nv-feed-container.is-grid-mode .nv-news-thumb-box {
  width: 100%;
  height: 180px;
}

@media (max-width: 640px) {
  .nv-news-item-card {
    flex-direction: column;
    padding: 12px;
  }
  .nv-news-thumb-box {
    width: 100%;
    height: 180px;
  }
  .nv-feed-container.is-grid-mode {
    grid-template-columns: 1fr;
  }
}

/* ৬. প্রফেশনাল পেজিনেশন স্টাইল */
.nv-pagination-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 40px 0 20px 0;
  flex-wrap: wrap;
}

.nv-page-link {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--nv-border);
  background: #FFFFFF;
  color: var(--nv-text);
  border-radius: var(--nv-radius-sm);
  text-decoration: none !important;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all 0.2s;
}

.nv-page-link:hover {
  background: var(--nv-surface);
  border-color: #CBD5E1;
}

.nv-page-link.active {
  background: var(--nv-red);
  color: #FFFFFF;
  border-color: var(--nv-red);
}

/* ৭. ইমেজ প্লেসহোল্ডার ফলব্যাক স্টাইল */
.nv-img-fallback {
  object-fit: contain !important;
  padding: 12px !important;
  background: var(--nv-surface) !important;
}

/* ৮. মোবাইল বটম ন্যাভিগেশন বার */
.nv-mobile-app-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 58px;
  background: #FFFFFF;
  border-top: 1px solid #E2E8F0;
  box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.06);
  z-index: 999999;
  justify-content: space-between;
  align-items: center;
  box-sizing: border-box;
  padding: 0 4px;
}

@media (max-width: 768px) {
  .nv-mobile-app-nav { display: flex; }
  body { padding-bottom: 60px !important; }
}

.nv-app-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #64748B;
  text-decoration: none !important;
  font-size: 0.72rem;
  font-weight: 700;
  flex: 1;
  height: 100%;
  gap: 3px;
}

.nv-app-nav-item svg {
  width: 20px !important;
  height: 20px !important;
  fill: currentColor;
}

.nv-app-nav-item.active { color: var(--nv-red); }



/* =========================================================================
   ♾️ ইনফিনিট স্ক্রলিং ও লোডার স্টাইল
   ========================================================================= */
.nv-infinite-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 0;
  margin: 20px 0;
  color: var(--nv-muted);
  font-size: 0.9rem;
  font-weight: 700;
  border-top: 1px dashed var(--nv-border);
}

.nv-spinner {
  width: 26px;
  height: 26px;
  border: 3px solid #E2E8F0;
  border-top-color: var(--nv-red);
  border-radius: 50%;
  animation: nvSpin 0.75s linear infinite;
}

@keyframes nvSpin {
  100% { transform: rotate(360deg); }
}