/*
 Theme Name:   B2O Masala Speed
 Theme URI:    https://b2omasala.co.in
 Description:  Ultra-fast Bollywood Masala child theme for GeneratePress. 98+ PageSpeed, AdSense-ready, mobile-first glamorous design.
 Author:       B2O Masala
 Author URI:   https://b2omasala.co.in
 Template:     generatepress
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  b2omasala-speed
 Tags:         bollywood, entertainment, news, fast, adsense
*/

/* ============================================
   CSS VARIABLES - DESIGN TOKENS
   ============================================ */
:root {
  /* Colors */
  --color-bg:          #0F0F0F;
  --color-bg-alt:      #181818;
  --color-bg-card:     #1A1A1A;
  --color-surface:     #222222;
  --color-border:      #2E2E2E;
  --color-red:         #E50914;
  --color-red-dark:    #B0070F;
  --color-gold:        #FFD700;
  --color-gold-muted:  #E5B567;
  --color-white:       #FFFFFF;
  --color-cream:       #F5F0E8;
  --color-text:        #E8E8E8;
  --color-text-muted:  #9A9A9A;
  --color-text-dark:   #111111;

  /* Typography */
  --font-body:         'Poppins', 'Segoe UI', sans-serif;
  --font-heading:      'Playfair Display', Georgia, serif;
  --font-size-base:    16px;
  --line-height-base:  1.7;

  /* Spacing */
  --space-xs:   4px;
  --space-sm:   8px;
  --space-md:   16px;
  --space-lg:   24px;
  --space-xl:   40px;
  --space-2xl:  64px;
  --space-3xl:  96px;

  /* Borders */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  20px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 20px rgba(0,0,0,0.6);
  --shadow-lg:  0 8px 40px rgba(0,0,0,0.8);
  --shadow-red: 0 4px 20px rgba(229,9,20,0.3);
  --shadow-gold:0 4px 20px rgba(255,215,0,0.2);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* Layout */
  --max-width: 1280px;
  --sidebar-width: 340px;
  --header-height: 70px;
  --z-header: 1000;
  --z-modal: 2000;
}

/* Light mode override */
body.light-mode {
  --color-bg:         #F8F8F8;
  --color-bg-alt:     #FFFFFF;
  --color-bg-card:    #FFFFFF;
  --color-surface:    #F0F0F0;
  --color-border:     #E0E0E0;
  --color-text:       #111111;
  --color-text-muted: #666666;
  --color-text-dark:  #111111;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  background-color: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
  color: var(--color-gold);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); }
h4 { font-size: clamp(1rem, 2vw, 1.4rem); }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--space-md);
  color: var(--color-text);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.text-red    { color: var(--color-red); }
.text-gold   { color: var(--color-gold); }
.text-muted  { color: var(--color-text-muted); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-primary {
  background: var(--color-red);
  color: var(--color-white);
  box-shadow: var(--shadow-red);
}

.btn-primary:hover {
  background: var(--color-red-dark);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(229,9,20,0.45);
}

.btn-outline {
  background: transparent;
  color: var(--color-gold);
  border: 1px solid var(--color-gold);
}

.btn-outline:hover {
  background: var(--color-gold);
  color: var(--color-text-dark);
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  color: var(--color-white);
  position: relative;
  padding-bottom: var(--space-md);
  margin-bottom: var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, var(--color-red), transparent);
}

.section-title .title-badge {
  background: var(--color-red);
  color: var(--color-white);
  font-size: 0.65rem;
  font-family: var(--font-body);
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
#site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgba(15,15,15,0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: box-shadow var(--transition-base);
}

#site-header.scrolled {
  box-shadow: 0 2px 30px rgba(0,0,0,0.7);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.site-logo a {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.logo-img {
  height: 44px;
  width: auto;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-b2o {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--color-white);
  letter-spacing: -0.02em;
}

.logo-masala {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 0.25em;
}

/* Primary Nav */
#primary-navigation {
  display: flex;
  align-items: center;
}

.primary-menu {
  display: flex;
  list-style: none;
  gap: 2px;
  align-items: center;
}

.primary-menu > li > a {
  display: block;
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a {
  color: var(--color-gold);
  background: rgba(255,215,0,0.08);
}

/* Dropdown */
.primary-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  min-width: 200px;
  box-shadow: var(--shadow-lg);
  padding: var(--space-sm) 0;
  z-index: 100;
  list-style: none;
}

.primary-menu li {
  position: relative;
}

.primary-menu li:hover > .sub-menu {
  display: block;
}

.primary-menu .sub-menu li a {
  display: block;
  padding: 9px 18px;
  font-size: 0.82rem;
  color: var(--color-text);
  transition: all var(--transition-fast);
}

.primary-menu .sub-menu li a:hover {
  color: var(--color-gold);
  background: rgba(255,215,0,0.05);
  padding-left: 24px;
}

/* Header Controls */
.header-controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1rem;
}

.header-btn:hover {
  border-color: var(--color-gold);
  color: var(--color-gold);
  background: rgba(255,215,0,0.08);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 8px;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: calc(var(--z-header) - 1);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--color-bg-alt);
  border-bottom: 2px solid var(--color-red);
  z-index: var(--z-header);
  padding: var(--space-md) 0;
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
}

.mobile-menu.active,
.mobile-menu.active + .mobile-menu-overlay {
  display: block;
}

.mobile-menu ul {
  list-style: none;
}

.mobile-menu ul li a {
  display: block;
  padding: 12px var(--space-lg);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  transition: all var(--transition-fast);
}

.mobile-menu ul li a:hover {
  color: var(--color-gold);
  background: rgba(255,215,0,0.05);
  padding-left: calc(var(--space-lg) + 8px);
}

/* Breaking News Ticker */
.breaking-ticker {
  background: var(--color-red);
  padding: 6px 0;
  overflow: hidden;
}

.breaking-ticker .ticker-inner {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.breaking-ticker .ticker-label {
  background: var(--color-text-dark);
  color: var(--color-white);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  white-space: nowrap;
  flex-shrink: 0;
}

.breaking-ticker .ticker-content {
  overflow: hidden;
  flex: 1;
}

.ticker-track {
  display: flex;
  gap: 60px;
  animation: ticker-scroll 30s linear infinite;
  white-space: nowrap;
}

.ticker-track:hover {
  animation-play-state: paused;
}

.ticker-track span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-white);
}

.ticker-track span a {
  color: var(--color-white);
}

.ticker-track span a:hover {
  color: var(--color-gold);
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
  position: relative;
  background: var(--color-bg);
  overflow: hidden;
}

.hero-featured {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero-featured { min-height: 620px; }
}

.hero-featured-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.95) 0%,
    rgba(0,0,0,0.6) 40%,
    rgba(0,0,0,0.15) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: var(--space-xl) var(--space-lg);
  max-width: 800px;
}

.hero-category {
  display: inline-block;
  background: var(--color-red);
  color: var(--color-white);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 4.5vw, 3.2rem);
  font-weight: 900;
  color: var(--color-white);
  line-height: 1.15;
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.hero-excerpt {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.85);
  max-width: 560px;
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.hero-meta span {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ============================================
   TRENDING CAROUSEL
   ============================================ */
.trending-section {
  background: var(--color-bg-alt);
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  overflow: hidden;
}

.trending-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-md);
}

.trending-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-gold);
}

.trending-label::before {
  content: '🔥';
}

.trending-track-wrapper {
  overflow: hidden;
  position: relative;
}

.trending-track-wrapper::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 80px;
  background: linear-gradient(to right, transparent, var(--color-bg-alt));
  pointer-events: none;
  z-index: 1;
}

.trending-track {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 4px;
  cursor: grab;
  user-select: none;
}

.trending-track::-webkit-scrollbar { display: none; }

.trending-card {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-sm) var(--space-md);
  min-width: 260px;
  flex-shrink: 0;
  text-decoration: none;
  transition: all var(--transition-base);
}

.trending-card:hover {
  border-color: var(--color-red);
  transform: translateY(-2px);
  box-shadow: var(--shadow-red);
}

.trending-card-num {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--color-red);
  line-height: 1;
  min-width: 32px;
  text-align: center;
}

.trending-card-img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  object-fit: cover;
  flex-shrink: 0;
}

.trending-card-info {
  flex: 1;
  min-width: 0;
}

.trending-card-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trending-card-cat {
  font-size: 0.68rem;
  color: var(--color-gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 3px;
}

/* ============================================
   AD ZONES
   ============================================ */
.ad-zone {
  text-align: center;
  padding: var(--space-md) 0;
}

.ad-zone-label {
  font-size: 0.6rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.ad-banner-wrapper {
  display: inline-block;
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  min-height: 90px;
  min-width: 320px;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ad-header {
  background: var(--color-bg-alt);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
}

/* ============================================
   MAIN CONTENT / LAYOUT
   ============================================ */
#page-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--space-2xl);
}

@media (max-width: 1024px) {
  #page-wrapper {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   NEWS GRID
   ============================================ */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

@media (max-width: 900px) {
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .news-grid { grid-template-columns: 1fr; }
}

.news-card {
  background: var(--color-bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: all var(--transition-base);
  display: flex;
  flex-direction: column;
}

.news-card:hover {
  border-color: var(--color-red);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.news-card-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.news-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.news-card-thumb .cat-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--color-red);
  color: var(--color-white);
  font-size: 0.62rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  z-index: 1;
}

.news-card-body {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.3;
  margin-bottom: var(--space-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-title a {
  color: inherit;
  text-decoration: none;
}

.news-card-title a:hover {
  color: var(--color-gold);
}

.news-card-excerpt {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-bottom: var(--space-sm);
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-sm);
  margin-top: auto;
}

.news-card-meta .date {
  display: flex;
  align-items: center;
  gap: 4px;
}

.news-card-meta .read-more {
  color: var(--color-red);
  font-weight: 600;
  font-size: 0.72rem;
  transition: color var(--transition-fast);
}

.news-card-meta .read-more:hover {
  color: var(--color-gold);
}

/* ============================================
   CATEGORY SECTIONS
   ============================================ */
.category-section {
  margin-bottom: var(--space-2xl);
}

.category-grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

@media (max-width: 600px) {
  .category-grid-2col { grid-template-columns: 1fr; }
}

.cat-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/10;
  display: block;
  text-decoration: none;
  transition: transform var(--transition-base);
}

.cat-card:hover {
  transform: scale(1.02);
}

.cat-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.cat-card:hover img {
  transform: scale(1.08);
}

.cat-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 60%);
}

.cat-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-md);
  z-index: 2;
}

.cat-card-category {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-gold);
  margin-bottom: 4px;
}

.cat-card-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-white);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Featured big card */
.cat-card-big {
  grid-column: span 2;
  aspect-ratio: 21/9;
}

@media (max-width: 600px) {
  .cat-card-big { grid-column: span 1; aspect-ratio: 16/10; }
}

.cat-card-big .cat-card-title {
  font-size: 1.3rem;
}

/* ============================================
   IN-CONTENT AD
   ============================================ */
.in-content-ad {
  margin: var(--space-xl) 0;
  padding: var(--space-md);
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  text-align: center;
}

.in-content-ad .ad-zone-label {
  display: block;
  margin-bottom: var(--space-sm);
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  position: relative;
}

.sidebar-inner {
  position: sticky;
  top: calc(var(--header-height) + var(--space-md));
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.widget {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.widget-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-white);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-red);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

/* Popular Posts Widget */
.popular-posts-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.popular-posts-list li {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}

.popular-posts-list li img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.popular-post-info a {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--transition-fast);
}

.popular-post-info a:hover {
  color: var(--color-gold);
}

.popular-post-info .date {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-top: 3px;
}

/* Newsletter Widget */
.newsletter-widget input[type="email"] {
  width: 100%;
  padding: 10px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.85rem;
  margin-bottom: var(--space-sm);
  transition: border-color var(--transition-fast);
}

.newsletter-widget input[type="email"]:focus {
  outline: none;
  border-color: var(--color-red);
}

.newsletter-widget input[type="email"]::placeholder {
  color: var(--color-text-muted);
}

.newsletter-widget .btn {
  width: 100%;
  justify-content: center;
}

/* Tags Widget */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.tag-cloud a {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: 20px;
  transition: all var(--transition-fast);
}

.tag-cloud a:hover {
  background: var(--color-red);
  border-color: var(--color-red);
  color: var(--color-white);
}

/* Sidebar Ad */
.sidebar-ad {
  text-align: center;
  padding: var(--space-md) 0;
}

.sidebar-ad-block {
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  width: 300px;
  max-width: 100%;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0 auto;
}

/* ============================================
   SINGLE POST / ARTICLE
   ============================================ */
.single-article {
  max-width: 800px;
}

.article-header {
  margin-bottom: var(--space-xl);
}

.article-category {
  display: inline-block;
  background: var(--color-red);
  color: var(--color-white);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-md);
}

.article-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin-bottom: var(--space-md);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.article-author {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.article-thumbnail {
  margin: var(--space-xl) 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16/9;
}

.article-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text);
}

.article-content p {
  margin-bottom: var(--space-lg);
}

.article-content h2,
.article-content h3 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.article-content img {
  border-radius: var(--radius-md);
  margin: var(--space-lg) 0;
}

.article-content blockquote {
  border-left: 4px solid var(--color-red);
  padding: var(--space-md) var(--space-lg);
  margin: var(--space-xl) 0;
  background: var(--color-bg-alt);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--color-cream);
}

/* Share Buttons */
.share-buttons {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin: var(--space-xl) 0;
  padding: var(--space-md) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
  text-decoration: none;
}

.share-btn-fb { background: #1877F2; color: white; }
.share-btn-tw { background: #1DA1F2; color: white; }
.share-btn-wa { background: #25D366; color: white; }
.share-btn-tg { background: #0088CC; color: white; }

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  color: white;
  filter: brightness(1.1);
}

/* Related Posts */
.related-posts {
  margin-top: var(--space-2xl);
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

@media (max-width: 640px) {
  .related-posts-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   SEARCH RESULTS
   ============================================ */
.search-header {
  padding: var(--space-2xl) 0 var(--space-xl);
  border-bottom: 1px solid var(--color-border);
  margin-bottom: var(--space-xl);
}

.search-header h1 span {
  color: var(--color-red);
}

.search-form-main {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  max-width: 560px;
}

.search-form-main input {
  flex: 1;
  padding: 12px 18px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.9rem;
}

.search-form-main input:focus {
  outline: none;
  border-color: var(--color-red);
}

.search-form-main button {
  padding: 12px 22px;
}

/* ============================================
   ARCHIVE / CATEGORY
   ============================================ */
.archive-header {
  padding: var(--space-xl) 0;
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--color-border);
}

.archive-title {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.archive-title .cat-dot {
  width: 12px;
  height: 12px;
  background: var(--color-red);
  border-radius: 50%;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-2xl);
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-fast);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  background: var(--color-bg-card);
}

.pagination a:hover {
  background: var(--color-red);
  border-color: var(--color-red);
  color: var(--color-white);
}

.pagination span.current {
  background: var(--color-red);
  border-color: var(--color-red);
  color: var(--color-white);
}

/* ============================================
   404 PAGE
   ============================================ */
.page-404 {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
}

.page-404 .error-num {
  font-family: var(--font-heading);
  font-size: clamp(5rem, 15vw, 10rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--color-red), var(--color-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: var(--space-md);
}

.page-404 h2 {
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.page-404 p {
  color: var(--color-text-muted);
  max-width: 400px;
  margin: 0 auto var(--space-xl);
}

/* ============================================
   FOOTER
   ============================================ */
#site-footer {
  background: var(--color-bg-alt);
  border-top: 2px solid var(--color-red);
  margin-top: var(--space-2xl);
}

.footer-top {
  padding: var(--space-2xl) 0;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-2xl);
}

@media (max-width: 900px) {
  .footer-top { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .footer-top { grid-template-columns: 1fr; }
}

.footer-brand .logo-b2o {
  font-size: 1.8rem;
}

.footer-brand p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: var(--space-md);
  max-width: 280px;
  line-height: 1.6;
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  transition: all var(--transition-base);
  text-decoration: none;
}

.social-link:hover {
  background: var(--color-red);
  border-color: var(--color-red);
  color: var(--color-white);
  transform: translateY(-3px);
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-gold);
  margin-bottom: var(--space-md);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-links a::before {
  content: '›';
  color: var(--color-red);
}

.footer-links a:hover {
  color: var(--color-gold);
}

.footer-bottom {
  padding: var(--space-md) 0;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 0;
}

.footer-bottom a {
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

.footer-bottom a:hover {
  color: var(--color-gold);
}

/* ============================================
   SEARCH MODAL
   ============================================ */
.search-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: rgba(0,0,0,0.9);
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
}

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

.search-modal-inner {
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  width: 100%;
  max-width: 600px;
  margin: 0 var(--space-md);
  border: 1px solid var(--color-border);
}

.search-modal-input {
  width: 100%;
  padding: 14px 18px;
  background: var(--color-surface);
  border: 2px solid var(--color-red);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 1.1rem;
  font-family: var(--font-body);
}

.search-modal-input:focus {
  outline: none;
}

.search-modal-close {
  float: right;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color var(--transition-fast);
  line-height: 1;
  margin-bottom: var(--space-md);
  display: block;
}

.search-modal-close:hover {
  color: var(--color-red);
}

/* ============================================
   BACK TO TOP
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 46px;
  height: 46px;
  background: var(--color-red);
  border: none;
  border-radius: var(--radius-md);
  color: var(--color-white);
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-red);
  transition: all var(--transition-base);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-gold);
  color: var(--color-text-dark);
  transform: translateY(-3px);
}

/* ============================================
   LOADING SKELETON
   ============================================ */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.skeleton {
  background: linear-gradient(
    to right,
    var(--color-bg-alt) 8%,
    var(--color-surface) 18%,
    var(--color-bg-alt) 33%
  );
  background-size: 1200px 100%;
  animation: shimmer 1.5s linear infinite;
  border-radius: var(--radius-md);
}

/* ============================================
   MEDIA QUERIES - RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .hamburger { display: flex; }
  #primary-navigation { display: none; }
  
  .footer-top {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --space-xl: 28px;
    --space-2xl: 44px;
  }
  
  .container { padding: 0 var(--space-md); }
  
  #page-wrapper {
    padding: var(--space-xl) var(--space-md);
  }
}

@media (max-width: 480px) {
  :root {
    --space-xl: 20px;
    --space-2xl: 36px;
  }
  
  .hero-featured { min-height: 380px; }
  .hero-excerpt { display: none; }
  
  .back-to-top {
    bottom: var(--space-md);
    right: var(--space-md);
  }
}

/* ============================================
   NEWS TABS – Hollywood / Hindi
   ============================================ */
.latest-news-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-border);
}

.news-tabs {
  display: flex;
  gap: 4px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 4px;
}

.news-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  color: var(--color-text-muted);
  transition: all var(--transition-base);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.news-tab:hover {
  color: var(--color-text);
  background: rgba(255,255,255,0.06);
}

.news-tab.active {
  background: var(--color-red);
  color: var(--color-white);
  box-shadow: var(--shadow-red);
}

.tab-panel {
  animation: tabFadeIn 0.25s ease forwards;
}

.tab-panel.hidden {
  display: none;
}

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

.tab-panel-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
  padding: var(--space-sm) var(--space-md);
  background: var(--color-bg-alt);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--color-red);
}

.tab-cat-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.tab-cat-count {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-surface);
  padding: 2px 8px;
  border-radius: 10px;
}

.no-posts-msg {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  color: var(--color-text-muted);
  font-size: 0.9rem;
  background: var(--color-bg-alt);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--color-border);
}

@media (max-width: 540px) {
  .latest-news-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .news-tabs { width: 100%; }
  .news-tab {
    flex: 1;
    justify-content: center;
    padding: 9px 12px;
    font-size: 0.78rem;
  }
  .tab-panel-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  #site-header,
  .breaking-ticker,
  .trending-section,
  .ad-zone,
  .in-content-ad,
  .sidebar,
  #site-footer,
  .share-buttons,
  .back-to-top { display: none !important; }
  
  body { background: white; color: black; }
  a { color: black; }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
:focus-visible {
  outline: 2px solid var(--color-red);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
