/*
Theme Name: NewsStream Pro
Theme URI: https://example.com/newsstream-pro
Author: OpenAI
Author URI: https://openai.com/
Description: A secure, responsive news and live-video WordPress theme with breaking-news bars, editorial hero layouts, category sections, video modules, widget areas, dark mode, and extensive Customizer controls.
Version: 1.0.0
Requires at least: 6.8
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: newsstream-pro
Tags: news, magazine, blog, entertainment, one-column, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, theme-options, threaded-comments, translation-ready, block-styles, wide-blocks
*/

:root {
  --nsp-accent: #d9272e;
  --nsp-navy: #0b1f3a;
  --nsp-ink: #101828;
  --nsp-muted: #667085;
  --nsp-line: #e4e7ec;
  --nsp-surface: #ffffff;
  --nsp-page: #f5f7fa;
  --nsp-radius: 8px;
  --nsp-shadow: 0 10px 30px rgba(16, 24, 40, .08);
  --nsp-container: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--nsp-ink);
  background: var(--nsp-page);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover, a:focus { color: var(--nsp-accent); }
button, input, select, textarea { font: inherit; }
button, [type="button"], [type="submit"] { cursor: pointer; }
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; margin: -1px;
  overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important;
}
.screen-reader-text:focus {
  background: #fff; clip: auto !important; clip-path: none; color: #000; display: block; font-size: 14px;
  height: auto; left: 8px; line-height: normal; padding: 12px 16px; top: 8px; width: auto; z-index: 100000;
}
.nsp-container { width: min(100% - 32px, var(--nsp-container)); margin-inline: auto; }
.nsp-main { padding-block: 28px 48px; }
.nsp-section { margin-block: 34px; }
.nsp-section-title {
  align-items: center; border-bottom: 3px solid var(--nsp-navy); display: flex; gap: 14px; justify-content: space-between;
  margin: 0 0 20px; padding-bottom: 9px;
}
.nsp-section-title h2, .nsp-section-title h1 { font-size: clamp(1.35rem, 2vw, 1.8rem); line-height: 1.15; margin: 0; }
.nsp-section-title a { color: var(--nsp-accent); font-size: .86rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }

/* Header */
.nsp-topbar { background: #061426; color: #d0d5dd; font-size: .82rem; }
.nsp-topbar-inner { align-items: center; display: flex; justify-content: space-between; min-height: 34px; }
.nsp-topbar a { color: #fff; }
.nsp-date { white-space: nowrap; }
.nsp-social-links { display: flex; gap: 14px; }
.nsp-site-header { background: var(--nsp-navy); color: #fff; position: relative; z-index: 100; }
.nsp-site-header.is-sticky { position: sticky; top: 0; }
.admin-bar .nsp-site-header.is-sticky { top: 32px; }
.nsp-brand-row { align-items: center; display: grid; gap: 20px; grid-template-columns: minmax(180px, 1fr) auto; min-height: 92px; }
.nsp-branding { align-items: center; display: flex; gap: 14px; min-width: 0; }
.custom-logo { max-height: 62px; width: auto; }
.nsp-site-title { color: #fff; font-size: clamp(1.55rem, 3vw, 2.45rem); font-weight: 900; letter-spacing: -.04em; line-height: 1; }
.nsp-tagline { color: #b9c2cf; font-size: .8rem; margin-top: 5px; }
.nsp-header-actions { align-items: center; display: flex; gap: 10px; }
.nsp-button { align-items: center; background: var(--nsp-accent); border: 0; border-radius: 4px; color: #fff; display: inline-flex; font-weight: 800; gap: 8px; justify-content: center; line-height: 1.2; padding: 12px 17px; }
.nsp-button:hover, .nsp-button:focus { background: #a71920; color: #fff; }
.nsp-icon-button { background: transparent; border: 1px solid rgba(255,255,255,.35); border-radius: 4px; color: #fff; min-height: 42px; min-width: 42px; padding: 8px; }
.nsp-primary-nav { background: #fff; border-bottom: 1px solid var(--nsp-line); color: var(--nsp-ink); }
.nsp-primary-nav .nsp-container { align-items: center; display: flex; min-height: 48px; }
.nsp-menu { display: flex; flex-wrap: wrap; gap: 0; list-style: none; margin: 0; padding: 0; }
.nsp-menu > li { position: relative; }
.nsp-menu > li > a { display: block; font-size: .88rem; font-weight: 800; padding: 14px 15px; text-transform: uppercase; }
.nsp-menu > li.current-menu-item > a, .nsp-menu > li > a:hover { color: var(--nsp-accent); }
.nsp-menu .sub-menu { background: #fff; box-shadow: var(--nsp-shadow); display: none; left: 0; list-style: none; margin: 0; min-width: 210px; padding: 8px 0; position: absolute; top: 100%; }
.nsp-menu li:hover > .sub-menu, .nsp-menu li:focus-within > .sub-menu { display: block; }
.nsp-menu .sub-menu a { display: block; padding: 9px 16px; }
.nsp-menu-toggle { display: none; }
.nsp-search-panel { background: #fff; box-shadow: var(--nsp-shadow); color: var(--nsp-ink); display: none; padding: 18px; position: absolute; right: max(16px, calc((100% - var(--nsp-container))/2)); top: 76px; width: min(420px, calc(100% - 32px)); }
.nsp-search-panel.is-open { display: block; }
.search-form { display: flex; gap: 8px; }
.search-field { border: 1px solid var(--nsp-line); border-radius: 4px; min-width: 0; padding: 11px 12px; width: 100%; }
.search-submit { background: var(--nsp-accent); border: 0; border-radius: 4px; color: #fff; font-weight: 800; padding: 10px 15px; }
.nsp-breaking { background: #fff; border-bottom: 1px solid var(--nsp-line); }
.nsp-breaking-inner { align-items: center; display: flex; min-height: 42px; overflow: hidden; }
.nsp-breaking-label { background: var(--nsp-accent); color: #fff; flex: 0 0 auto; font-size: .75rem; font-weight: 900; letter-spacing: .06em; margin-right: 14px; padding: 5px 10px; text-transform: uppercase; }
.nsp-breaking-text { font-size: .9rem; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Cards and home */
.nsp-card { background: var(--nsp-surface); border-radius: var(--nsp-radius); overflow: hidden; }
.nsp-card-media { aspect-ratio: 16/9; background: #d0d5dd; overflow: hidden; position: relative; }
.nsp-card-media img { height: 100%; object-fit: cover; transition: transform .25s ease; width: 100%; }
.nsp-card:hover .nsp-card-media img { transform: scale(1.025); }
.nsp-card-body { padding: 15px; }
.nsp-kicker { color: var(--nsp-accent); display: inline-block; font-size: .72rem; font-weight: 900; letter-spacing: .055em; margin-bottom: 6px; text-transform: uppercase; }
.nsp-card-title { font-size: 1.08rem; font-weight: 850; letter-spacing: -.018em; line-height: 1.23; margin: 0; }
.nsp-card-title a:hover { color: var(--nsp-accent); }
.nsp-meta { color: var(--nsp-muted); display: flex; flex-wrap: wrap; font-size: .76rem; gap: 8px; margin-top: 9px; }
.nsp-excerpt { color: #475467; font-size: .9rem; margin: 10px 0 0; }
.nsp-play-badge { align-items: center; background: rgba(0,0,0,.75); border-radius: 50%; bottom: 12px; color: #fff; display: flex; height: 42px; justify-content: center; left: 12px; position: absolute; width: 42px; }
.nsp-hero-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.nsp-hero-lead { box-shadow: var(--nsp-shadow); }
.nsp-hero-lead .nsp-card-media { aspect-ratio: 16/9; }
.nsp-hero-lead .nsp-card-body { padding: 20px; }
.nsp-hero-lead .nsp-card-title { font-size: clamp(1.6rem, 3.25vw, 2.65rem); }
.nsp-hero-side { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.nsp-hero-side .nsp-card { box-shadow: 0 6px 20px rgba(16,24,40,.07); }
.nsp-hero-side .nsp-card-title { font-size: .98rem; }
.nsp-live-panel { background: #081729; border-radius: var(--nsp-radius); color: #fff; display: grid; gap: 24px; grid-template-columns: minmax(0, 1.65fr) minmax(250px, .8fr); overflow: hidden; padding: 22px; }
.nsp-live-player { aspect-ratio: 16/9; background: #000; }
.nsp-live-player iframe, .nsp-live-player video { height: 100%; width: 100%; }
.nsp-live-copy { align-self: center; }
.nsp-live-dot { color: #ff4545; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.nsp-live-copy h2 { font-size: clamp(1.55rem, 3vw, 2.4rem); line-height: 1.08; margin: 10px 0; }
.nsp-content-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) 330px; }
.nsp-post-grid { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nsp-post-grid .nsp-card { box-shadow: 0 5px 18px rgba(16,24,40,.06); }
.nsp-sidebar-stack { display: grid; gap: 20px; align-content: start; }
.nsp-widget, .widget { background: #fff; border-radius: var(--nsp-radius); padding: 18px; }
.nsp-widget-title, .widget-title { border-left: 4px solid var(--nsp-accent); font-size: 1.05rem; margin: 0 0 15px; padding-left: 10px; text-transform: uppercase; }
.nsp-trending-list { counter-reset: nsp-trending; list-style: none; margin: 0; padding: 0; }
.nsp-trending-list li { border-bottom: 1px solid var(--nsp-line); counter-increment: nsp-trending; display: grid; gap: 12px; grid-template-columns: 32px 1fr; padding: 11px 0; }
.nsp-trending-list li:last-child { border-bottom: 0; }
.nsp-trending-list li::before { color: var(--nsp-accent); content: counter(nsp-trending, decimal-leading-zero); font-size: 1.05rem; font-weight: 900; }
.nsp-trending-list a { font-size: .9rem; font-weight: 800; line-height: 1.3; }
.nsp-category-row { display: grid; gap: 20px; grid-template-columns: repeat(4, minmax(0,1fr)); }
.nsp-category-row .nsp-card:first-child { grid-column: span 2; grid-row: span 2; }
.nsp-category-row .nsp-card:first-child .nsp-card-title { font-size: 1.45rem; }
.nsp-video-grid { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nsp-newsletter { align-items: center; background: linear-gradient(135deg, var(--nsp-navy), #163d6c); border-radius: var(--nsp-radius); color: #fff; display: grid; gap: 20px; grid-template-columns: 1fr auto; padding: 30px; }
.nsp-newsletter h2 { font-size: clamp(1.55rem, 3vw, 2.2rem); line-height: 1.15; margin: 0 0 6px; }
.nsp-newsletter p { color: #d0d5dd; margin: 0; }

/* Content */
.nsp-layout { display: grid; gap: 30px; grid-template-columns: minmax(0, 1fr) 330px; }
.nsp-article, .nsp-page-content { background: #fff; border-radius: var(--nsp-radius); padding: clamp(20px, 4vw, 44px); }
.nsp-article-header { margin-bottom: 22px; }
.nsp-article-title { font-size: clamp(2rem, 5vw, 3.6rem); letter-spacing: -.045em; line-height: 1.05; margin: 6px 0 13px; }
.nsp-deck { color: #475467; font-size: 1.15rem; line-height: 1.5; margin: 0 0 14px; }
.nsp-featured-image { margin: 0 0 24px; }
.nsp-featured-image img { border-radius: var(--nsp-radius); width: 100%; }
.nsp-entry-content { font-family: Georgia, "Times New Roman", serif; font-size: 1.08rem; }
.nsp-entry-content > * { max-width: 760px; }
.nsp-entry-content > .alignwide { max-width: 1080px; }
.nsp-entry-content > .alignfull { margin-left: calc(50% - 50vw); max-width: 100vw; width: 100vw; }
.nsp-entry-content h2, .nsp-entry-content h3, .nsp-entry-content h4 { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.2; }
.nsp-entry-content a { color: #0b5cad; text-decoration: underline; text-decoration-thickness: .08em; text-underline-offset: .14em; }
.nsp-entry-content blockquote { border-left: 5px solid var(--nsp-accent); font-size: 1.2rem; font-style: italic; margin-left: 0; padding-left: 20px; }
.nsp-entry-content iframe, .nsp-video-embed iframe { aspect-ratio: 16/9; height: auto; max-width: 100%; width: 100%; }
.nsp-video-embed { background: #000; margin-bottom: 24px; }
.nsp-author-box { align-items: center; background: #f8fafc; border-radius: var(--nsp-radius); display: grid; gap: 16px; grid-template-columns: 64px 1fr; margin-top: 32px; padding: 18px; }
.nsp-author-box img { border-radius: 50%; }
.nsp-post-nav { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; margin-top: 24px; }
.nsp-post-nav a { background: #fff; border-radius: var(--nsp-radius); display: block; padding: 16px; }
.nsp-comments { background: #fff; border-radius: var(--nsp-radius); margin-top: 24px; padding: 24px; }
.nsp-comments .comment-list { list-style: none; padding: 0; }
.nsp-comments .comment-body { border-bottom: 1px solid var(--nsp-line); padding: 16px 0; }
.nsp-pagination { margin-top: 28px; }
.nsp-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.nsp-pagination a, .nsp-pagination span { background: #fff; border-radius: 4px; padding: 8px 12px; }
.nsp-pagination .current { background: var(--nsp-accent); color: #fff; }
.nsp-empty { background: #fff; border-radius: var(--nsp-radius); padding: 40px; text-align: center; }

/* Footer */
.nsp-site-footer { background: #061426; color: #c7d0dc; margin-top: 40px; }
.nsp-footer-widgets { display: grid; gap: 26px; grid-template-columns: 1.2fr repeat(3, 1fr); padding-block: 42px; }
.nsp-site-footer .widget { background: transparent; padding: 0; }
.nsp-site-footer .widget-title { color: #fff; }
.nsp-footer-brand .nsp-site-title { display: inline-block; margin-bottom: 12px; }
.nsp-footer-bottom { border-top: 1px solid rgba(255,255,255,.12); font-size: .82rem; padding-block: 18px; }
.nsp-footer-bottom-inner { align-items: center; display: flex; gap: 20px; justify-content: space-between; }
.nsp-footer-menu { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; margin: 0; padding: 0; }

/* Dark mode */
body.nsp-dark-mode { --nsp-ink: #f4f7fb; --nsp-muted: #aab4c2; --nsp-line: #2c3c52; --nsp-surface: #122238; --nsp-page: #091423; }
body.nsp-dark-mode .nsp-primary-nav, body.nsp-dark-mode .nsp-breaking, body.nsp-dark-mode .nsp-search-panel,
body.nsp-dark-mode .nsp-widget, body.nsp-dark-mode .widget, body.nsp-dark-mode .nsp-article,
body.nsp-dark-mode .nsp-page-content, body.nsp-dark-mode .nsp-post-nav a, body.nsp-dark-mode .nsp-comments,
body.nsp-dark-mode .nsp-pagination a, body.nsp-dark-mode .nsp-pagination span, body.nsp-dark-mode .nsp-empty { background: #122238; }
body.nsp-dark-mode .nsp-excerpt, body.nsp-dark-mode .nsp-deck { color: #c7d0dc; }
body.nsp-dark-mode .search-field { background: #091423; color: #fff; }

@media (max-width: 1050px) {
  .nsp-post-grid, .nsp-video-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .nsp-category-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .nsp-footer-widgets { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 850px) {
  .nsp-hero-grid, .nsp-content-grid, .nsp-layout, .nsp-live-panel { grid-template-columns: 1fr; }
  .nsp-brand-row { grid-template-columns: 1fr auto; min-height: 74px; }
  .nsp-header-cta { display: none; }
  .nsp-menu-toggle { display: inline-flex; }
  .nsp-primary-nav .nsp-container { display: block; }
  .nsp-primary-nav { display: none; }
  .nsp-primary-nav.is-open { display: block; }
  .nsp-menu { display: block; padding-block: 8px; }
  .nsp-menu > li > a { padding: 10px 4px; }
  .nsp-menu .sub-menu { box-shadow: none; display: block; padding-left: 14px; position: static; }
  .nsp-sidebar { order: 2; }
}
@media (max-width: 620px) {
  .nsp-container { width: min(100% - 22px, var(--nsp-container)); }
  .nsp-topbar-inner { justify-content: center; }
  .nsp-social-links { display: none; }
  .nsp-brand-row { gap: 10px; }
  .nsp-site-title { font-size: 1.35rem; }
  .nsp-tagline { display: none; }
  .nsp-hero-side, .nsp-post-grid, .nsp-video-grid, .nsp-category-row, .nsp-footer-widgets, .nsp-post-nav { grid-template-columns: 1fr; }
  .nsp-category-row .nsp-card:first-child { grid-column: auto; grid-row: auto; }
  .nsp-newsletter { grid-template-columns: 1fr; padding: 22px; }
  .nsp-article-title { font-size: 2rem; }
  .nsp-article, .nsp-page-content { padding: 20px; }
  .nsp-footer-bottom-inner { align-items: flex-start; flex-direction: column; }
  .admin-bar .nsp-site-header.is-sticky { top: 46px; }
}
