/*
Theme Name:        NewsBlaze
Theme URI:         https://infoheadline.com/newsblaze
Author:            Sourav Mahapatra
Author URI:        https://infoheadline.com
Description:       A lightning-fast, SEO-optimized, Google AdSense policy-compliant news blog theme. Scores 90+ on Google PageSpeed Insights. Supports Core Web Vitals (LCP < 2.5s, CLS < 0.1, INP < 200ms) and is fully Gutenberg-compatible.
Version:           1.0.0
Requires at least: 6.0
Tested up to:      6.5
Requires PHP:      8.0
License:           GPL-2.0-or-later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       newsblaze
Tags:              news, blog, custom-background, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-images, footer-widgets, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, block-styles, wide-blocks, accessibility-ready
*/

/* ============================================================
   CSS CUSTOM PROPERTIES — DESIGN SYSTEM
   ============================================================ */
:root {
  /* Brand Colors */
  --primary:         #1a73e8;
  --primary-dark:    #1557b0;
  --primary-light:   #e8f0fe;
  --secondary:       #28a745;
  --secondary-dark:  #1e7e34;
  --danger:          #dc3545;
  --warning:         #fd7e14;

  /* Neutral Palette */
  --dark:            #1c1c1e;
  --gray-text:       #6c757d;
  --light-bg:        #f8f9fa;
  --white:           #ffffff;
  --border:          #e9ecef;
  --border-dark:     #dee2e6;

  /* Shadows */
  --shadow:          0 2px 8px rgba(0,0,0,0.08);
  --shadow-hover:    0 6px 20px rgba(0,0,0,0.15);
  --shadow-card:     0 1px 4px rgba(0,0,0,0.06);

  /* Social Colors */
  --telegram:   #0088cc;
  --whatsapp:   #25D366;
  --facebook:   #1877F2;
  --twitter:    #1DA1F2;
  --youtube:    #FF0000;

  /* Layout */
  --max-width:    1200px;
  --gutter:       24px;
  --radius:       8px;
  --radius-sm:    4px;
  --radius-lg:    12px;
  --transition:   all 0.25s ease;

  /* Typography */
  --font-primary:   'Roboto', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  --font-mono:      'Courier New', Courier, monospace;

  /* Z-index layers */
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-overlay:  300;
  --z-modal:    400;
  --z-toast:    500;
}

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

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

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.7;
  color: var(--dark);
  background-color: var(--light-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

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

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

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

a:hover {
  color: var(--primary-dark);
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: 48px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-heading h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  border-left: 4px solid var(--primary);
  padding-left: 12px;
  line-height: 1.3;
}

.section-heading .view-all {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
}

.section-heading .view-all:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Grid helpers */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gutter); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); }

/* Content layout */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 700;
  color: var(--dark);
}

h1 { font-size: 26px; }
h2 { font-size: 22px; }
h3 { font-size: 18px; font-weight: 600; }
h4 { font-size: 16px; font-weight: 600; }

p { margin-bottom: 1.5em; }
p:last-child { margin-bottom: 0; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  min-height: 44px;
  line-height: 1;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary);
  color: var(--white);
}

.btn-ghost {
  background: transparent;
  color: var(--gray-text);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--dark);
  border-color: var(--border-dark);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

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

/* ============================================================
   BADGES / CATEGORY PILLS
   ============================================================ */
.badge {
  display: inline-block;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-sm);
  line-height: 1.4;
}

.badge-primary   { background: var(--primary);   color: var(--white); }
.badge-secondary { background: var(--secondary); color: var(--white); }
.badge-danger    { background: var(--danger);    color: var(--white); }
.badge-warning   { background: var(--warning);   color: var(--white); }

/* ============================================================
   AD CONTAINER
   ============================================================ */
.ad-container {
  position: relative;
  margin-block: 16px;
  text-align: center;
  min-height: 50px;
}

.ad-label {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gray-text);
  margin-bottom: 6px;
  text-align: center;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: var(--transition);
}

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

.pagination .current { pointer-events: none; }

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 1024px) {
  .content-with-sidebar {
    grid-template-columns: 1fr 280px;
    gap: 24px;
  }
  h1 { font-size: 24px; }
}

@media (max-width: 768px) {
  :root { --gutter: 16px; }

  .content-with-sidebar {
    grid-template-columns: 1fr;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  h1 { font-size: 22px; }
  h2 { font-size: 19px; }
  h3 { font-size: 16px; }
  body { font-size: 15px; }

  .section { padding-block: 32px; }
}
