@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
  --bbc-red: #b80000;
  --bbc-dark: #0f172a;
  --bbc-gray: #f8fafc;
  --bbc-border: #e2e8f0;
  --bbc-text: #1e293b;
  --bbc-muted: #64748b;
}

* { 
  box-sizing: border-box; 
}

body {
  margin: 0;
  font-family: 'Hind Siliguri', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--bbc-text);
  background: #ffffff;
  line-height: 1.5;
}

.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
}

a { 
  color: inherit; 
  text-decoration: none; 
}

a:hover { 
  color: var(--bbc-red); 
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */
.prothomalo-header {
  background: #ffffff;
  border-bottom: 2px solid var(--bbc-red);
}

.top-header-strip {
  padding: 16px 0;
  border-bottom: 1px solid var(--bbc-border);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand-logo {
  font-size: 32px;
  font-weight: 900;
  color: var(--bbc-dark);
  text-decoration: none;
  letter-spacing: -1.5px;
  white-space: nowrap;
}

.brand-logo span {
  color: var(--bbc-red);
}

.header-featured-strip {
  display: flex;
  align-items: center;
  gap: 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

.header-featured-strip::-webkit-scrollbar {
  display: none;
}

.featured-story-box {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  min-width: 220px;
  max-width: 280px;
  flex-shrink: 0;
  padding-right: 20px;
}

.featured-story-box:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 15%;
  height: 70%;
  width: 1px;
  background-color: #cbd5e1;
}

.featured-thumb {
  width: 55px;
  height: 55px;
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
  background: #f1f5f9;
}

.featured-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-info {
  display: flex;
  flex-direction: column;
}

.featured-headline {
  font-size: 13px;
  font-weight: 600;
  color: var(--bbc-text);
  text-decoration: none;
  line-height: 1.35;
  
  /* Multi-line truncation rules */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2; /* Standard modern specification */
  overflow: hidden;
  
  /* Clean text wrapping */
  word-break: break-word;
  transition: color 0.2s ease;
}

.featured-headline:hover {
  color: var(--bbc-red);
}

.media-icon {
  color: var(--bbc-red);
  margin-right: 4px;
  font-size: 12px;
  display: inline-block;
}

/* Category Navbar */
.prothomalo-navbar {
  background: #ffffff;
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-categories {
  display: flex;
  align-items: center;
  gap: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 10px 0;
}

.nav-categories::-webkit-scrollbar {
  display: none;
}

.cat-link {
  font-size: 15px;
  font-weight: 700;
  color: var(--bbc-text);
  text-decoration: none;
  white-space: nowrap;
}

.cat-link:hover,
.cat-link.active {
  color: var(--bbc-red);
}

.search-box {
  display: flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  overflow: hidden;
}

.search-box input {
  border: none;
  padding: 6px 10px;
  font-size: 13px;
  outline: none;
}

.search-box button {
  background: transparent;
  border: none;
  padding: 6px 10px;
  color: var(--bbc-muted);
  cursor: pointer;
}

.search-box button:hover {
  color: var(--bbc-red);
}

/* ==========================================
   BREAKING NEWS TICKER
   ========================================== */
.bbc-breaking-bar,
.breaking-bar {
  display: flex;
  align-items: center;
  background: #fff0f0;
  border: 1px solid #ffccd0;
  margin: 16px 0;
  padding: 8px 12px;
  gap: 12px;
  border-radius: 4px;
}

.breaking-badge,
.breaking-label {
  background: var(--bbc-red);
  color: #ffffff;
  font-weight: 900;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 2px;
}

.breaking-link,
.breaking-text {
  font-weight: 700;
  font-size: 14px;
  color: var(--bbc-text);
}

/* ==========================================
   HERO & ARTICLE LAYOUT GRIDS
   ========================================== */
.bbc-hero-grid,
.article-detail-grid,
.category-main-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  margin-top: 20px;
  align-items: start;
}

.hero-main-column,
.article-main-content {
  display: flex;
  flex-direction: column;
}

.hero-image-wrap {
  width: 100%;
  max-height: 440px;
  overflow: hidden;
  margin-bottom: 12px;
  border-radius: 4px;
}

.hero-image-wrap img {
  width: 100%;
  height: 440px;
  object-fit: cover;
}

.category-tag {
  color: var(--bbc-red);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 4px;
}

.hero-title,
.article-detail-title {
  font-size: 28px;
  line-height: 1.25;
  margin: 4px 0 12px;
  font-weight: 800;
  color: var(--bbc-dark);
}

.hero-summary,
.article-summary-lead {
  color: var(--bbc-muted);
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 12px;
}

.article-body-text {
  font-size: 17px;
  line-height: 1.7;
  color: #1e293b;
}

.article-meta-bar {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--bbc-muted);
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--bbc-border);
}

/* ==========================================
   SIDEBAR & LATEST STORIES
   ========================================== */
.hero-sidebar,
.article-sidebar {
  width: 100%;
}

.sidebar-heading {
  font-size: 18px;
  font-weight: 800;
  margin: 0 0 16px;
  border-bottom: 2px solid var(--bbc-dark);
  padding-bottom: 4px;
}

.side-item {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--bbc-border);
}

.side-item:last-child { 
  border-bottom: none; 
}

.side-title {
  font-size: 15px;
  line-height: 1.3;
  margin: 2px 0 4px;
  font-weight: 700;
}

/* ==========================================
   GRID CARDS & SECTIONS
   ========================================== */
.bbc-section { 
  margin: 40px 0; 
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  border-top: 3px solid var(--bbc-dark);
  padding-top: 8px;
  margin-bottom: 20px;
}

.bbc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.bbc-card {
  background: #ffffff;
  border: 1px solid var(--bbc-border);
  display: flex;
  flex-direction: column;
  border-radius: 4px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.card-body { 
  padding: 12px; 
}

.card-title {
  font-size: 16px;
  line-height: 1.25;
  margin: 4px 0 8px;
  font-weight: 700;
}

.card-summary {
  font-size: 13px;
  color: var(--bbc-muted);
  margin: 0;
}

/* ==========================================
   ADVERTISEMENT CONTAINERS & SLIDER CAROUSEL
   ========================================== */
.ad-container {
  margin: 16px 0 24px;
  text-align: center;
}

.ad-label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.ad-banner-slot {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

/* Leaderboard 970x90 Box */
.ad-leaderboard .ad-banner-slot {
  width: 100%;
  max-width: 970px;
  min-height: 90px;
}

.ad-leaderboard img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* Sidebar 300x250 Carousel Box */
.ad-sidebar-box {
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

.ad-carousel-slot {
  position: relative;
  width: 100%;
  aspect-ratio: 300 / 250;
  overflow: hidden;
  background-color: #f8fafc;
  border-radius: 4px;
}

.ad-carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.ad-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease-in-out, visibility 0.6s ease-in-out;
}

.ad-slide.active {
  opacity: 1;
  visibility: visible;
}

.ad-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Fallback Placeholders */
.ad-fallback-box {
  width: 100%;
  padding: 30px 15px;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  background: #f1f5f9;
}

.ad-fallback-box.rectangle {
  padding: 100px 15px;
}

/* ==========================================
   PORTAL FOOTER
   ========================================== */
.portal-footer {
  background-color: #e5e7eb;
  color: #1f2937;
  border-top: 1px solid #d1d5db;
  margin-top: 60px;
}

.footer-top-strip {
  background: #f3f4f6;
  border-bottom: 1px solid #d1d5db;
  padding: 14px 0;
}

.footer-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.editor-info {
  font-size: 15px;
  color: #374151;
}

.editor-info strong {
  color: #111827;
}

.footer-brand-logo a {
  font-size: 24px;
  font-weight: 900;
  color: #111827;
  text-decoration: none;
}

.footer-brand-logo span {
  color: var(--bbc-red);
}

.footer-main-strip {
  padding: 24px 0;
  border-bottom: 1px solid #d1d5db;
}

.footer-main-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-categories-grid {
  display: flex;
  gap: 48px;
  padding-left: 12px;
  border-left: 3px solid var(--bbc-red);
}

.footer-cat-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-cat-col a {
  font-size: 15px;
  font-weight: 700;
  color: #1f2937;
  text-decoration: none;
}

.footer-cat-col a:hover {
  color: var(--bbc-red);
}

.footer-apps-social {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.app-box-title {
  font-size: 13px;
  font-weight: 700;
  color: #4b5563;
  margin-bottom: 8px;
  display: block;
  text-align: right;
}

.app-buttons {
  display: flex;
  gap: 10px;
}

.store-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #9ca3af;
  border-radius: 6px;
  padding: 6px 14px;
  text-decoration: none;
  color: #111827;
}

.store-btn i {
  font-size: 22px;
}

.btn-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.btn-text small {
  font-size: 9px;
  color: #6b7280;
  text-transform: uppercase;
}

.btn-text strong {
  font-size: 13px;
}

.social-follow-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

.social-icons {
  display: flex;
  gap: 10px;
}

.social-icons a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #d1d5db;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #374151;
  text-decoration: none;
}

.social-icons a:hover {
  background: var(--bbc-red);
  color: #ffffff;
  border-color: var(--bbc-red);
}

.footer-bottom-strip {
  background: #d1d5db;
  padding: 12px 0;
  font-size: 13px;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.legal-links a {
  color: var(--bbc-red);
  font-weight: 600;
  margin: 0 4px;
}

.copyright-text {
  font-weight: 700;
  color: #1f2937;
}

/* ==========================================
   RESPONSIVE MEDIA QUERIES
   ========================================== */
@media (max-width: 1023px) {
  .bbc-hero-grid,
  .article-detail-grid,
  .category-main-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
}

@media (max-width: 767px) {
  .wrap {
    padding-left: 12px;
    padding-right: 12px;
  }

  .bbc-grid {
    grid-template-columns: 1fr;
  }

  .hero-title,
  .article-detail-title {
    font-size: 22px;
  }

  .footer-main-inner {
    flex-direction: column;
  }

  .footer-apps-social {
    align-items: flex-start;
  }

  .app-box-title {
    text-align: left;
  }

  .footer-categories-grid {
    flex-direction: column;
    gap: 16px;
  }
}

/* Mobile Header & Navigation Fixes */
@media (max-width: 767px) {
  .header-inner {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .nav-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 8px 12px;
  }

  .nav-categories {
    width: 100%;
    justify-content: flex-start;
    padding-bottom: 4px;
  }

  .search-box {
    width: 100%;
  }

  .search-box input {
    width: 100%;
  }
}

/* ==========================================
   RESPONSIVE HEADER & NAVIGATION FIXES
   ========================================== */

.top-header-strip {
  padding: 12px 0;
  border-bottom: 1px solid var(--bbc-border);
  overflow: hidden;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.search-box {
  display: flex;
  align-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  background: #ffffff;
  flex-shrink: 0;
}

.search-box input {
  border: none;
  padding: 6px 10px;
  font-size: 13px;
  outline: none;
  min-width: 100px;
}

/* Mobile Screens (Under 768px) */
@media (max-width: 767px) {
  .header-inner {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  /* Hide ticker strip on mobile to prevent horizontal viewport breaking */
  .header-featured-strip {
    display: none;
  }

  .nav-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 8px 12px;
  }

  .nav-categories {
    width: 100%;
    display: flex;
    gap: 14px;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 6px;
    scrollbar-width: none;
  }

  .nav-categories::-webkit-scrollbar {
    display: none;
  }

  .search-box {
    width: 100%;
    justify-content: space-between;
  }

  .search-box input {
    width: 100%;
  }
}
/* ==========================================
   CSS MASONRY LAYOUT (SEAMLESS CARD STACKING)
   ========================================== */

.bbc-grid {
  /* Replace flex/standard grid with multi-column layout */
  column-count: 3;
  column-gap: 20px;
  width: 100%;
}

.bbc-card {
  background: #ffffff;
  border: 1px solid var(--bbc-border);
  display: flex;
  flex-direction: column;
  border-radius: 4px;
  overflow: hidden;
  
  /* Critical for CSS Masonry: prevents cards from breaking across columns */
  break-inside: avoid;
  page-break-inside: avoid;
  margin-bottom: 20px; /* Space between vertically stacked cards */
  width: 100%;
}

.bbc-card .card-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  flex-shrink: 0;
}

.bbc-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bbc-card .card-body {
  padding: 12px;
}

.bbc-card .card-title {
  font-size: 15px;
  line-height: 1.35;
  margin: 4px 0 8px;
  font-weight: 700;
}

.bbc-card .card-summary {
  font-size: 13px;
  color: var(--bbc-muted);
  margin: 0;
  line-height: 1.45;
}

/* Responsive Masonry Columns across devices */
@media (max-width: 1023px) and (min-width: 601px) {
  .bbc-grid {
    column-count: 2;
    column-gap: 16px;
  }
}

@media (max-width: 600px) {
  .bbc-grid {
    column-count: 1;
    column-gap: 0;
  }
}
/* Sticky Sidebar Ad Container */
.hero-sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sticky-sidebar-ad {
  position: sticky;
  top: 20px;
  z-index: 10;
}

@media (max-width: 1023px) {
  .sticky-sidebar-ad {
    position: static;
  }
}

/* ==========================================
   POP-UP ADVERTISEMENT OVERLAY STYLES
   ========================================== */
.ad-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(2px);
}

.ad-popup-overlay.show {
  opacity: 1;
  visibility: visible;
}

.ad-popup-content {
  position: relative;
  background: #ffffff;
  padding: 16px;
  border-radius: 8px;
  max-width: 90%;
  max-height: 90vh;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  animation: popupScale 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ad-popup-content img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

.ad-popup-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 32px;
  height: 32px;
  background-color: #b80000;
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  transition: background 0.2s ease;
}

.ad-popup-close:hover {
  background-color: #960000;
}

@keyframes popupScale {
  from {
    transform: scale(0.85);
  }
  to {
    transform: scale(1);
  }
}

/* Pop-up Advertisement Overlay */
.ad-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.75);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(2px);
}

.ad-popup-overlay.show {
  opacity: 1;
  visibility: visible;
}

.ad-popup-content {
  position: relative;
  background: #ffffff;
  padding: 16px;
  border-radius: 8px;
  max-width: 90%;
  max-height: 90vh;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  animation: popupScale 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.ad-popup-content img {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

.ad-popup-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 32px;
  height: 32px;
  background-color: #b80000;
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  transition: background 0.2s ease;
}

.ad-popup-close:hover {
  background-color: #960000;
}

@keyframes popupScale {
  from { transform: scale(0.85); }
  to { transform: scale(1); }
}

/* Expandable Header Logo Styling */
.top-header-strip .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
  max-height: 90px; /* Expands parent container height limit */
  overflow: visible;
}

.header-logo-img {
  height: 120px; /* Increases logo height to fill the bar */
  width: auto;
  max-width: 380px; /* Allows wider banner logos to expand fully */
  object-fit: contain;
  display: block;
}

/* Mobile Viewport Scaling */
@media (max-width: 768px) {
  .brand-logo {
    max-height: 55px;
  }

  .header-logo-img {
    height: 50px;
    max-width: 220px;
  }
}