/*
Theme Name: BlogBhandar News
Theme URI: https://www.blogbhandar.com
Author: Antigravity AI
Author URI: https://www.blogbhandar.com
Description: An ultra-fast, SEO-optimized, editorial newspaper and news publishing theme for BlogBhandar. Custom color-matched to the BlogBhandar Open Book brand identity.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: blogbhandar-news
*/

:root {
  --font-serif: 'Merriweather', Georgia, 'Times New Roman', serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --brand-navy: #011b42;
  --brand-navy-light: #0d2856;
  --brand-orange: #fd6300;
  --brand-orange-hover: #e05500;
  --ink-primary: #011b42;
  --ink-secondary: #1e293b;
  --ink-muted: #64748b;
  --ink-light: #94a3b8;
  --border-color: #e2e8f0;
  --border-navy: #011b42;
  --shadow-sm: 0 1px 3px rgba(1, 27, 66, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(1, 27, 66, 0.08);
  --max-w: 1240px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--ink-secondary);
  line-height: 1.65;
}

a {
  color: var(--brand-navy);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--brand-orange);
}

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

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* --- TOP BAR --- */
.top-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.8125rem;
  color: var(--ink-muted);
  padding: 7px 0;
}
.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.top-bar-date {
  font-weight: 600;
  color: var(--brand-navy);
  letter-spacing: 0.02em;
}
.top-bar-trending {
  display: flex;
  align-items: center;
  gap: 8px;
}
.trending-badge {
  background: var(--brand-orange);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
  letter-spacing: 0.05em;
}
.top-bar-links a {
  margin-left: 15px;
  color: var(--ink-muted);
  font-weight: 500;
}
.top-bar-links a:hover {
  color: var(--brand-orange);
}

/* --- MASTHEAD (WITH BRAND LOGO) --- */
.site-masthead {
  background: #ffffff;
  border-bottom: 3px double var(--brand-navy);
  padding: 24px 0 20px;
  text-align: center;
}
.masthead-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.site-logo-link {
  display: inline-block;
  margin-bottom: 8px;
  transition: opacity 0.2s ease;
}
.site-logo-link:hover {
  opacity: 0.92;
}
.site-logo-img {
  max-height: 85px;
  width: auto;
  margin: 0 auto;
  display: block;
}
.site-tagline {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ink-muted);
  font-weight: 600;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 4px 18px;
  margin-top: 10px;
  display: inline-block;
}

/* --- MAIN NAVIGATION (BRAND NAVY) --- */
.main-nav-bar {
  background: var(--brand-navy);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(1, 27, 66, 0.18);
  border-bottom: 3px solid var(--brand-orange);
}
.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.primary-nav-menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.primary-nav-menu li a {
  color: #f8fafc;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 18px;
  display: block;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}
.primary-nav-menu li a:hover,
.primary-nav-menu li.current-menu-item a {
  background: rgba(253, 99, 0, 0.12);
  border-bottom-color: var(--brand-orange);
  color: #ffffff;
}

/* Mobile Toggle */
.mobile-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  padding: 10px 14px;
  cursor: pointer;
}

/* --- MAIN LAYOUT --- */
.site-main-content {
  padding: 36px 0 64px;
}
.main-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 36px;
}

/* --- HERO MAGAZINE SECTION --- */
.hero-magazine-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 2px solid var(--border-color);
}
.lead-story {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--brand-orange);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.lead-story img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.lead-story-body {
  padding: 26px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.category-pill {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-orange);
  margin-bottom: 8px;
  display: inline-block;
}
.lead-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--brand-navy);
  margin-bottom: 12px;
}
.lead-title a:hover {
  color: var(--brand-orange);
}
.lead-excerpt {
  color: var(--ink-secondary);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}
.article-meta {
  font-size: 0.8125rem;
  color: var(--ink-light);
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
}

/* --- SECTION HEADERS --- */
.section-heading-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--brand-navy);
  margin-bottom: 24px;
  padding-bottom: 8px;
}
.section-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-navy);
  position: relative;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--brand-orange);
}

/* --- NEWS GRID (FEED) --- */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
}
.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-top: 3px solid transparent;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.news-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-top-color: var(--brand-orange);
}
.news-card-img {
  aspect-ratio: 16/9;
  object-fit: cover;
  width: 100%;
}
.news-card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.news-card-title {
  font-family: var(--font-serif);
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--brand-navy);
  margin-bottom: 10px;
}
.news-card-title a:hover {
  color: var(--brand-orange);
}
.news-card-excerpt {
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.55;
  margin-bottom: 14px;
  flex: 1;
}

/* --- SIDEBAR --- */
.site-sidebar {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.widget-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--brand-navy);
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
  margin-bottom: 16px;
  position: relative;
}
.widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 45px;
  height: 2px;
  background: var(--brand-orange);
}
.widget-list {
  list-style: none;
}
.widget-list li {
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}
.widget-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.widget-list a {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink-secondary);
  line-height: 1.4;
}
.widget-list a:hover {
  color: var(--brand-orange);
}

/* Newsletter Box */
.newsletter-widget {
  background: linear-gradient(145deg, #011b42 0%, #0d2856 100%);
  color: #fff;
  border: none;
  box-shadow: var(--shadow-md);
}
.newsletter-widget .widget-title {
  color: #fff;
  border-color: rgba(255,255,255,0.15);
}
.newsletter-desc {
  font-size: 0.875rem;
  color: #cbd5e1;
  margin-bottom: 14px;
}
.newsletter-form input[type="email"] {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #334155;
  border-radius: 4px;
  background: #001330;
  color: #fff;
  font-size: 0.875rem;
  margin-bottom: 10px;
}
.newsletter-form button {
  width: 100%;
  background: var(--brand-orange);
  color: #fff;
  border: none;
  padding: 12px;
  font-weight: 700;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.newsletter-form button:hover {
  background: var(--brand-orange-hover);
}

/* --- SINGLE ARTICLE VIEW --- */
.article-header {
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}
.article-headline {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.8vw, 2.75rem);
  font-weight: 900;
  line-height: 1.2;
  color: var(--brand-navy);
  margin: 12px 0 16px;
}
.article-featured-img {
  margin: 24px 0 32px;
  border-radius: 6px;
  overflow: hidden;
}
.article-featured-img img {
  width: 100%;
}

/* Prose Typography */
.prose {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #1e293b;
}
.prose p {
  margin-bottom: 1.5rem;
}
.prose h2 {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--brand-navy);
  margin: 2.2rem 0 1rem;
  line-height: 1.3;
}
.prose h3 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--brand-navy);
  margin: 1.8rem 0 0.8rem;
}
.prose ul, .prose ol {
  margin: 0 0 1.5rem 1.8rem;
}
.prose li {
  margin-bottom: 0.5rem;
}
.prose blockquote {
  border-left: 4px solid var(--brand-orange);
  padding: 14px 22px;
  margin: 1.8rem 0;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--brand-navy);
  background: #f1f5f9;
  border-radius: 0 4px 4px 0;
}

/* Breadcrumbs */
.breadcrumbs {
  font-size: 0.8125rem;
  color: var(--ink-light);
  margin-bottom: 14px;
}
.breadcrumbs a {
  color: var(--ink-muted);
}
.breadcrumbs a:hover {
  color: var(--brand-orange);
}

/* Author Box */
.author-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--brand-navy);
  border-radius: 6px;
  padding: 22px;
  margin: 40px 0;
  display: flex;
  gap: 18px;
  align-items: center;
}
.author-avatar {
  border-radius: 50%;
  width: 70px;
  height: 70px;
}
.author-info h4 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--brand-navy);
  margin-bottom: 4px;
}
.author-info p {
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* --- FOOTER (NAVY BLUE THEMED) --- */
.site-footer {
  background: var(--brand-navy);
  color: #cbd5e1;
  padding: 52px 0 26px;
  border-top: 4px solid var(--brand-orange);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}
.footer-col h4 {
  font-family: var(--font-serif);
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding-bottom: 8px;
}
.footer-col p {
  font-size: 0.875rem;
  line-height: 1.6;
}
.footer-col ul {
  list-style: none;
}
.footer-col ul li {
  margin-bottom: 8px;
}
.footer-col a {
  color: #cbd5e1;
  font-size: 0.875rem;
}
.footer-col a:hover {
  color: var(--brand-orange);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.8125rem;
  color: #94a3b8;
}
.footer-bottom strong {
  color: #ffffff;
}

/* --- RESPONSIVE BREAKPOINTS --- */
@media (max-width: 992px) {
  .main-grid {
    grid-template-columns: 1fr;
  }
  .hero-magazine-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .site-logo-img {
    max-height: 60px;
  }
  .mobile-nav-toggle {
    display: block;
  }
  .primary-nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
  }
  .primary-nav-menu.is-active {
    display: flex;
  }
  .primary-nav-menu li {
    width: 100%;
  }
  .primary-nav-menu li a {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
