/*
Theme Name: NewsWave
Theme URI: https://example.com/newswave
Author: NewsWave Team
Author URI: https://example.com
Description: A modern, fast, and feature-rich News & Magazine WordPress theme inspired by professional media sites. Supports breaking news ticker, dark mode, multiple layouts, and AdSense-ready ad zones.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: newswave
Tags: news, magazine, blog, dark-mode, responsive, custom-menu, featured-images, post-formats, threaded-comments, translation-ready
*/

/* =========================================
   CSS CUSTOM PROPERTIES (TOKENS)
   ========================================= */
:root {
    /* Brand Colors */
    --nw-red:        #E8192C;
    --nw-red-dark:   #c0121e;
    --nw-red-light:  #ff4d5e;

    /* Neutrals */
    --nw-black:      #0d0d0d;
    --nw-dark:       #1a1a1a;
    --nw-dark-2:     #222222;
    --nw-dark-3:     #2e2e2e;
    --nw-mid:        #555555;
    --nw-muted:      #888888;
    --nw-border:     #e2e2e2;
    --nw-light:      #f5f5f5;
    --nw-white:      #ffffff;

    /* Typography */
    --font-display:  'Playfair Display', Georgia, serif;
    --font-body:     'Inter', system-ui, sans-serif;
    --font-mono:     'JetBrains Mono', monospace;

    /* Type Scale */
    --text-xs:   0.75rem;
    --text-sm:   0.875rem;
    --text-base: 1rem;
    --text-lg:   1.125rem;
    --text-xl:   1.25rem;
    --text-2xl:  1.5rem;
    --text-3xl:  1.875rem;
    --text-4xl:  2.25rem;
    --text-5xl:  3rem;

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

    /* Layout */
    --container-width: 1280px;
    --sidebar-width:   320px;
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,.16);

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --speed: 200ms;
}

/* Dark Mode Variables */
.dark-mode {
    --nw-white:  #0d0d0d;
    --nw-light:  #1a1a1a;
    --nw-border: #2e2e2e;
    --nw-mid:    #aaaaaa;
    --nw-muted:  #777777;
    --nw-black:  #f0f0f0;
    --nw-dark:   #e0e0e0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.4);
    --shadow-md: 0 4px 16px rgba(0,0,0,.5);
}

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

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

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--nw-black);
    background: var(--nw-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}

img { max-width: 100%; height: auto; display: block; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

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

.grid-2  { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap-lg); }
.grid-3  { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-lg); }
.grid-4  { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap-lg); }

.flex    { display: flex; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-sm  { gap: var(--gap-sm); }
.gap-md  { gap: var(--gap-md); }

.badge {
    display: inline-block;
    padding: 2px 10px;
    background: var(--nw-red);
    color: #fff;
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    border-radius: var(--radius-sm);
}

.section-title {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--nw-black);
    border-left: 4px solid var(--nw-red);
    padding-left: var(--gap-md);
    margin-bottom: var(--gap-lg);
    line-height: 1.2;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--nw-red);
    transition: gap var(--speed) var(--ease);
}
.read-more:hover { gap: 10px; }
.read-more::after { content: '→'; }

/* =========================================
   BREAKING NEWS TICKER
   ========================================= */
.breaking-bar {
    background: var(--nw-red);
    color: #fff;
    padding: 8px 0;
    overflow: hidden;
}

.breaking-bar__inner {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
}

.breaking-bar__label {
    flex-shrink: 0;
    font-size: var(--text-xs);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .1em;
    background: rgba(0,0,0,.25);
    padding: 3px 12px;
    border-radius: 2px;
    white-space: nowrap;
}

.breaking-bar__ticker {
    overflow: hidden;
    flex: 1;
}

.breaking-bar__track {
    display: flex;
    gap: var(--gap-xl);
    animation: ticker 30s linear infinite;
    white-space: nowrap;
}

.breaking-bar__track:hover { animation-play-state: paused; }

.breaking-bar__item {
    font-size: var(--text-sm);
    font-weight: 500;
    flex-shrink: 0;
    transition: opacity var(--speed) var(--ease);
}
.breaking-bar__item:hover { opacity: .85; }
.breaking-bar__item a { color: #fff; }
.breaking-bar__sep { color: rgba(255,255,255,.4); margin: 0 4px; }

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

/* =========================================
   TOP BAR
   ========================================= */
.top-bar {
    background: var(--nw-light);
    border-bottom: 1px solid var(--nw-border);
    padding: 6px 0;
    font-size: var(--text-xs);
    color: var(--nw-mid);
}

.top-bar__left { display: flex; align-items: center; gap: var(--gap-md); }
.top-bar__right { display: flex; align-items: center; gap: var(--gap-md); }

.top-bar__date { font-weight: 500; }

.top-bar__social { display: flex; gap: var(--gap-sm); }
.top-bar__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--nw-border);
    border-radius: 50%;
    font-size: 11px;
    transition: background var(--speed) var(--ease), color var(--speed) var(--ease);
}
.top-bar__social a:hover { background: var(--nw-red); color: #fff; }

/* =========================================
   HEADER
   ========================================= */
.site-header {
    background: var(--nw-white);
    border-bottom: 1px solid var(--nw-border);
    padding: var(--gap-md) 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--speed) var(--ease);
}

.site-header.scrolled { box-shadow: var(--shadow-md); }

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap-lg);
}

/* Logo */
.site-logo { flex-shrink: 0; }
.site-logo a {
    display: flex;
    align-items: center;
    gap: var(--gap-sm);
    font-family: var(--font-display);
    font-size: var(--text-3xl);
    font-weight: 900;
    color: var(--nw-black);
    line-height: 1;
}
.site-logo__accent { color: var(--nw-red); }
.site-logo img { height: 44px; width: auto; }

/* Ad Banner Area */
.header__ad {
    flex: 1;
    text-align: center;
}
.header__ad-placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 728px;
    max-width: 100%;
    height: 90px;
    background: var(--nw-light);
    border: 1px dashed var(--nw-border);
    font-size: var(--text-xs);
    color: var(--nw-muted);
    border-radius: var(--radius-sm);
}

/* Header Actions */
.header__actions { display: flex; align-items: center; gap: var(--gap-md); flex-shrink: 0; }

.btn-search,
.btn-dark-mode {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--nw-border);
    border-radius: var(--radius-md);
    color: var(--nw-mid);
    font-size: 16px;
    transition: all var(--speed) var(--ease);
}
.btn-search:hover,
.btn-dark-mode:hover { border-color: var(--nw-red); color: var(--nw-red); }

.btn-subscribe {
    padding: 8px 20px;
    background: var(--nw-red);
    color: #fff;
    font-size: var(--text-sm);
    font-weight: 700;
    border-radius: var(--radius-md);
    transition: background var(--speed) var(--ease);
    white-space: nowrap;
}
.btn-subscribe:hover { background: var(--nw-red-dark); }

/* =========================================
   NAVIGATION
   ========================================= */
.main-nav {
    background: var(--nw-dark);
    position: relative;
}

.main-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-menu {
    display: flex;
    align-items: center;
}

.nav-menu > li { position: relative; }

.nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    color: rgba(255,255,255,.9);
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    transition: color var(--speed) var(--ease), background var(--speed) var(--ease);
    white-space: nowrap;
}
.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a { color: #fff; background: var(--nw-red); }

/* Dropdown */
.nav-menu .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--nw-white);
    border: 1px solid var(--nw-border);
    border-top: 3px solid var(--nw-red);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all var(--speed) var(--ease);
    z-index: 999;
}
.nav-menu li:hover > .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }

.dropdown li a {
    display: block;
    padding: 10px 16px;
    font-size: var(--text-sm);
    color: var(--nw-dark);
    border-bottom: 1px solid var(--nw-light);
    transition: all var(--speed) var(--ease);
}
.dropdown li:last-child a { border-bottom: none; }
.dropdown li a:hover { background: var(--nw-light); color: var(--nw-red); padding-left: 22px; }

/* Mobile Toggle */
.nav-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    color: rgba(255,255,255,.9);
    font-size: var(--text-sm);
    font-weight: 600;
    padding: 12px 0;
}

/* =========================================
   SEARCH OVERLAY
   ========================================= */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 120px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--speed) var(--ease);
}
.search-overlay.active { opacity: 1; visibility: visible; }

.search-overlay__box { width: 100%; max-width: 680px; padding: 0 var(--gap-lg); }

.search-overlay__form {
    display: flex;
    align-items: center;
    background: var(--nw-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.search-overlay__input {
    flex: 1;
    padding: 18px 24px;
    font-size: var(--text-xl);
    border: none;
    outline: none;
    font-family: var(--font-body);
    background: transparent;
}
.search-overlay__btn {
    padding: 18px 24px;
    background: var(--nw-red);
    color: #fff;
    font-size: 20px;
    transition: background var(--speed) var(--ease);
}
.search-overlay__btn:hover { background: var(--nw-red-dark); }
.search-overlay__close {
    position: absolute;
    top: 24px;
    right: 24px;
    color: #fff;
    font-size: 32px;
    opacity: .8;
    transition: opacity var(--speed) var(--ease);
}
.search-overlay__close:hover { opacity: 1; }

/* =========================================
   HERO / FEATURED SECTION
   ========================================= */
.hero-section { padding: var(--gap-xl) 0; background: var(--nw-white); }

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    grid-template-rows: auto auto;
    gap: var(--gap-lg);
}

/* Main Hero Post */
.hero-main {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16 / 9;
    grid-row: span 2;
}

.hero-main__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms var(--ease);
}
.hero-main:hover .hero-main__img { transform: scale(1.03); }

.hero-main__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 50%, transparent 100%);
}

.hero-main__body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--gap-xl) var(--gap-lg) var(--gap-lg);
}

.hero-main__cat {
    display: inline-block;
    padding: 3px 12px;
    background: var(--nw-red);
    color: #fff;
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    border-radius: var(--radius-sm);
    margin-bottom: var(--gap-sm);
}

.hero-main__title {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: var(--gap-sm);
    text-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.hero-main__title a { color: inherit; }
.hero-main__title a:hover { color: var(--nw-red-light); }

.hero-main__meta {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    color: rgba(255,255,255,.75);
    font-size: var(--text-sm);
}

/* Hero Side Posts */
.hero-side { display: flex; flex-direction: column; gap: var(--gap-md); }

.hero-card {
    display: flex;
    gap: var(--gap-md);
    align-items: flex-start;
    padding: var(--gap-md);
    background: var(--nw-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--nw-border);
    transition: box-shadow var(--speed) var(--ease), transform var(--speed) var(--ease);
}
.hero-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.hero-card__img {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.hero-card__body { flex: 1; min-width: 0; }
.hero-card__cat { font-size: var(--text-xs); font-weight: 700; color: var(--nw-red); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.hero-card__title { font-family: var(--font-display); font-size: var(--text-base); font-weight: 700; line-height: 1.3; color: var(--nw-black); margin-bottom: 6px; }
.hero-card__title a:hover { color: var(--nw-red); }
.hero-card__meta { font-size: var(--text-xs); color: var(--nw-muted); }

/* =========================================
   AD BANNER
   ========================================= */
.ad-banner {
    text-align: center;
    padding: var(--gap-lg) 0;
    border-top: 1px solid var(--nw-border);
    border-bottom: 1px solid var(--nw-border);
    background: var(--nw-light);
}
.ad-banner__inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 970px;
    max-width: 100%;
    height: 90px;
    border: 1px dashed var(--nw-border);
    background: var(--nw-white);
    font-size: var(--text-xs);
    color: var(--nw-muted);
    border-radius: var(--radius-sm);
}

/* =========================================
   POST CARD
   ========================================= */
.post-card {
    background: var(--nw-white);
    border: 1px solid var(--nw-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow var(--speed) var(--ease), transform var(--speed) var(--ease);
    display: flex;
    flex-direction: column;
}
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.post-card__thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}
.post-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms var(--ease);
}
.post-card:hover .post-card__thumb img { transform: scale(1.05); }

.post-card__cat {
    position: absolute;
    top: var(--gap-sm);
    left: var(--gap-sm);
}

.post-card__body { padding: var(--gap-md); flex: 1; display: flex; flex-direction: column; }
.post-card__title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--nw-black);
    line-height: 1.3;
    margin-bottom: var(--gap-sm);
    flex: 1;
}
.post-card__title a:hover { color: var(--nw-red); }
.post-card__excerpt { font-size: var(--text-sm); color: var(--nw-mid); line-height: 1.6; margin-bottom: var(--gap-md); }
.post-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: var(--text-xs);
    color: var(--nw-muted);
    border-top: 1px solid var(--nw-border);
    padding-top: var(--gap-sm);
    margin-top: auto;
}
.post-card__author { display: flex; align-items: center; gap: 6px; }
.post-card__author img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }

/* List Style Card */
.post-list-card {
    display: flex;
    gap: var(--gap-md);
    padding-bottom: var(--gap-md);
    border-bottom: 1px solid var(--nw-border);
    align-items: flex-start;
}
.post-list-card:last-child { border-bottom: none; padding-bottom: 0; }

.post-list-card__thumb {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}
.post-list-card__body { flex: 1; min-width: 0; }
.post-list-card__cat { font-size: var(--text-xs); font-weight: 700; color: var(--nw-red); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.post-list-card__title { font-family: var(--font-display); font-size: var(--text-base); font-weight: 700; line-height: 1.35; color: var(--nw-black); margin-bottom: 6px; }
.post-list-card__title a:hover { color: var(--nw-red); }
.post-list-card__meta { font-size: var(--text-xs); color: var(--nw-muted); }

/* =========================================
   SECTIONS
   ========================================= */
.section { padding: var(--gap-xl) 0; }
.section--border-top { border-top: 1px solid var(--nw-border); }
.section--bg { background: var(--nw-light); }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--gap-lg);
}
.section-header .view-all {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--nw-red);
    display: flex;
    align-items: center;
    gap: 4px;
}
.section-header .view-all:hover { text-decoration: underline; }

/* =========================================
   CONTENT + SIDEBAR LAYOUT
   ========================================= */
.content-sidebar-wrap {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-width);
    gap: var(--gap-xl);
    padding: var(--gap-xl) 0;
}

/* =========================================
   SIDEBAR WIDGETS
   ========================================= */
.sidebar { display: flex; flex-direction: column; gap: var(--gap-xl); }

.widget {
    background: var(--nw-white);
    border: 1px solid var(--nw-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.widget__title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    padding: var(--gap-md) var(--gap-lg);
    border-bottom: 1px solid var(--nw-border);
    border-left: 4px solid var(--nw-red);
    background: var(--nw-light);
    color: var(--nw-black);
}
.widget__body { padding: var(--gap-md) var(--gap-lg); }

/* Popular Posts Widget */
.popular-posts { display: flex; flex-direction: column; gap: var(--gap-md); }
.popular-post { display: flex; gap: var(--gap-md); align-items: flex-start; }
.popular-post__num {
    font-size: var(--text-3xl);
    font-weight: 900;
    color: var(--nw-border);
    font-family: var(--font-display);
    line-height: 1;
    min-width: 32px;
}
.popular-post__title { font-size: var(--text-sm); font-weight: 600; color: var(--nw-dark); line-height: 1.4; }
.popular-post__title a:hover { color: var(--nw-red); }
.popular-post__meta { font-size: var(--text-xs); color: var(--nw-muted); margin-top: 4px; }

/* Tags Widget */
.tag-cloud { display: flex; flex-wrap: wrap; gap: var(--gap-sm); }
.tag-cloud a {
    padding: 4px 12px;
    background: var(--nw-light);
    border: 1px solid var(--nw-border);
    border-radius: 100px;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--nw-mid);
    transition: all var(--speed) var(--ease);
}
.tag-cloud a:hover { background: var(--nw-red); border-color: var(--nw-red); color: #fff; }

/* Newsletter Widget */
.widget-newsletter { background: var(--nw-red); color: #fff; border-color: var(--nw-red); }
.widget-newsletter .widget__title { background: rgba(0,0,0,.15); border-color: transparent; color: #fff; }
.widget-newsletter .widget__body { padding: var(--gap-lg); }
.widget-newsletter p { font-size: var(--text-sm); opacity: .9; margin-bottom: var(--gap-md); line-height: 1.5; }
.newsletter-form { display: flex; flex-direction: column; gap: var(--gap-sm); }
.newsletter-form input {
    padding: 10px 14px;
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    outline: none;
    font-family: var(--font-body);
}
.newsletter-form button {
    padding: 10px;
    background: var(--nw-dark);
    color: #fff;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: var(--text-sm);
    transition: background var(--speed) var(--ease);
}
.newsletter-form button:hover { background: var(--nw-black); }

/* =========================================
   TABS (Latest / Trending / etc)
   ========================================= */
.tabs { }
.tabs__nav {
    display: flex;
    border-bottom: 2px solid var(--nw-border);
    margin-bottom: var(--gap-lg);
}
.tabs__btn {
    padding: 10px 20px;
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--nw-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--speed) var(--ease);
}
.tabs__btn.active { color: var(--nw-red); border-bottom-color: var(--nw-red); }
.tabs__panel { display: none; }
.tabs__panel.active { display: block; }

/* =========================================
   SINGLE POST
   ========================================= */
.single-post__header { padding: var(--gap-xl) 0 var(--gap-lg); }
.single-post__cat { margin-bottom: var(--gap-sm); }
.single-post__title {
    font-family: var(--font-display);
    font-size: var(--text-5xl);
    font-weight: 800;
    line-height: 1.15;
    color: var(--nw-black);
    margin-bottom: var(--gap-lg);
}
.single-post__meta {
    display: flex;
    align-items: center;
    gap: var(--gap-lg);
    padding: var(--gap-md) 0;
    border-top: 1px solid var(--nw-border);
    border-bottom: 1px solid var(--nw-border);
    margin-bottom: var(--gap-xl);
    flex-wrap: wrap;
}
.single-post__author { display: flex; align-items: center; gap: var(--gap-sm); }
.single-post__author img { width: 40px; height: 40px; border-radius: 50%; }
.single-post__author-name { font-weight: 700; font-size: var(--text-sm); color: var(--nw-dark); }
.single-post__author-title { font-size: var(--text-xs); color: var(--nw-muted); }
.single-post__date { font-size: var(--text-sm); color: var(--nw-muted); }

.single-post__featured {
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: var(--gap-xl);
}
.single-post__featured img { width: 100%; aspect-ratio: 16/8; object-fit: cover; }

.single-post__content {
    font-size: var(--text-lg);
    line-height: 1.8;
    color: var(--nw-dark);
}
.single-post__content h2 { font-family: var(--font-display); font-size: var(--text-3xl); font-weight: 700; margin: var(--gap-xl) 0 var(--gap-md); color: var(--nw-black); }
.single-post__content h3 { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700; margin: var(--gap-lg) 0 var(--gap-md); }
.single-post__content p { margin-bottom: var(--gap-lg); }
.single-post__content a { color: var(--nw-red); text-decoration: underline; }
.single-post__content blockquote {
    border-left: 4px solid var(--nw-red);
    padding: var(--gap-md) var(--gap-lg);
    background: var(--nw-light);
    font-size: var(--text-xl);
    font-style: italic;
    font-family: var(--font-display);
    margin: var(--gap-lg) 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.single-post__content ul, .single-post__content ol { padding-left: var(--gap-lg); margin-bottom: var(--gap-lg); }
.single-post__content li { margin-bottom: var(--gap-sm); }
.single-post__content ul li { list-style: disc; }
.single-post__content ol li { list-style: decimal; }
.single-post__content img { border-radius: var(--radius-md); margin: var(--gap-lg) 0; }
.single-post__content figcaption { font-size: var(--text-sm); color: var(--nw-muted); text-align: center; margin-top: -var(--gap-md); }

/* Share Bar */
.share-bar {
    display: flex;
    align-items: center;
    gap: var(--gap-md);
    padding: var(--gap-lg) 0;
    border-top: 1px solid var(--nw-border);
    border-bottom: 1px solid var(--nw-border);
    margin: var(--gap-xl) 0;
    flex-wrap: wrap;
}
.share-bar__label { font-weight: 700; font-size: var(--text-sm); color: var(--nw-dark); }
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 600;
    color: #fff;
    transition: opacity var(--speed) var(--ease);
}
.share-btn:hover { opacity: .85; }
.share-btn--fb { background: #1877f2; }
.share-btn--tw { background: #1da1f2; }
.share-btn--wa { background: #25d366; }
.share-btn--li { background: #0a66c2; }
.share-btn--cp { background: var(--nw-mid); }

/* =========================================
   CATEGORY PAGE HEADER
   ========================================= */
.cat-header {
    background: var(--nw-dark);
    padding: var(--gap-xl) 0;
    margin-bottom: var(--gap-xl);
}
.cat-header__name {
    font-family: var(--font-display);
    font-size: var(--text-4xl);
    font-weight: 800;
    color: #fff;
    margin-bottom: var(--gap-sm);
}
.cat-header__desc { font-size: var(--text-lg); color: rgba(255,255,255,.6); }
.cat-header__count { font-size: var(--text-sm); color: var(--nw-red); font-weight: 600; margin-top: var(--gap-sm); }

/* =========================================
   PAGINATION
   ========================================= */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap-sm);
    padding: var(--gap-xl) 0;
}
.page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--nw-border);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--nw-mid);
    transition: all var(--speed) var(--ease);
}
.page-numbers:hover,
.page-numbers.current { background: var(--nw-red); border-color: var(--nw-red); color: #fff; }
.page-numbers.dots { border: none; }
.page-numbers.prev, .page-numbers.next { width: auto; padding: 0 16px; }

/* =========================================
   COMMENTS
   ========================================= */
.comments-area { padding: var(--gap-xl) 0; border-top: 1px solid var(--nw-border); }
.comments-title { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700; margin-bottom: var(--gap-lg); }
.comment-list { display: flex; flex-direction: column; gap: var(--gap-lg); }
.comment { display: flex; gap: var(--gap-md); }
.comment__avatar { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; }
.comment__body { flex: 1; background: var(--nw-light); padding: var(--gap-md); border-radius: var(--radius-md); }
.comment__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--gap-sm); }
.comment__author { font-weight: 700; font-size: var(--text-sm); }
.comment__date { font-size: var(--text-xs); color: var(--nw-muted); }
.comment__text { font-size: var(--text-sm); color: var(--nw-dark); line-height: 1.6; }
.comment-reply-link { font-size: var(--text-xs); color: var(--nw-red); font-weight: 600; margin-top: var(--gap-sm); display: inline-block; }

.comment-respond { margin-top: var(--gap-xl); }
.comment-respond h3 { font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700; margin-bottom: var(--gap-lg); }
.comment-form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap-md); }
.comment-form .full { grid-column: 1 / -1; }
.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--nw-border);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-family: var(--font-body);
    background: var(--nw-white);
    color: var(--nw-dark);
    transition: border-color var(--speed) var(--ease);
    outline: none;
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--nw-red); }
.comment-form textarea { resize: vertical; min-height: 140px; }
.comment-form .submit-btn {
    display: inline-flex;
    padding: 12px 32px;
    background: var(--nw-red);
    color: #fff;
    font-weight: 700;
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    transition: background var(--speed) var(--ease);
}
.comment-form .submit-btn:hover { background: var(--nw-red-dark); }

/* =========================================
   FOOTER
   ========================================= */
.site-footer {
    background: var(--nw-dark);
    color: rgba(255,255,255,.8);
    padding-top: var(--gap-2xl);
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--gap-xl);
    padding-bottom: var(--gap-2xl);
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.footer-logo { font-family: var(--font-display); font-size: var(--text-3xl); font-weight: 900; color: #fff; margin-bottom: var(--gap-md); display: block; }
.footer-logo span { color: var(--nw-red); }
.footer-about { font-size: var(--text-sm); line-height: 1.7; opacity: .75; margin-bottom: var(--gap-lg); }
.footer-social { display: flex; gap: var(--gap-sm); }
.footer-social a {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 50%;
    font-size: 14px;
    transition: all var(--speed) var(--ease);
}
.footer-social a:hover { background: var(--nw-red); border-color: var(--nw-red); }

.footer-col__title {
    font-size: var(--text-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #fff;
    margin-bottom: var(--gap-lg);
    padding-bottom: var(--gap-sm);
    border-bottom: 2px solid var(--nw-red);
    display: inline-block;
}

.footer-menu { display: flex; flex-direction: column; gap: var(--gap-sm); }
.footer-menu a { font-size: var(--text-sm); opacity: .75; transition: all var(--speed) var(--ease); display: flex; align-items: center; gap: 6px; }
.footer-menu a::before { content: '›'; color: var(--nw-red); }
.footer-menu a:hover { opacity: 1; padding-left: 4px; }

.footer-recent { display: flex; flex-direction: column; gap: var(--gap-md); }
.footer-post { display: flex; gap: var(--gap-sm); }
.footer-post__img { width: 64px; height: 50px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.footer-post__title { font-size: var(--text-xs); font-weight: 600; color: rgba(255,255,255,.85); line-height: 1.4; }
.footer-post__title a:hover { color: var(--nw-red-light); }
.footer-post__date { font-size: 11px; opacity: .5; margin-top: 4px; }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--gap-md) 0;
    border-top: 1px solid rgba(255,255,255,.06);
    font-size: var(--text-xs);
    opacity: .6;
}
.footer-bottom-links { display: flex; gap: var(--gap-md); }
.footer-bottom-links a:hover { opacity: 1; color: var(--nw-red-light); }

/* =========================================
   BACK TO TOP
   ========================================= */
.back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 44px;
    height: 44px;
    background: var(--nw-red);
    color: #fff;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all var(--speed) var(--ease);
    z-index: 999;
    cursor: pointer;
    box-shadow: var(--shadow-md);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--nw-red-dark); }

/* =========================================
   READING PROGRESS BAR
   ========================================= */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--nw-red);
    z-index: 9999;
    width: 0%;
    transition: width 100ms linear;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
    .hero-main { aspect-ratio: 16/7; grid-row: span 1; }
    .hero-side { flex-direction: row; flex-wrap: wrap; }
    .hero-card { flex: 1; min-width: 280px; }
    .footer-top { grid-template-columns: 1fr 1fr; }
    .content-sidebar-wrap { grid-template-columns: 1fr; }
    .sidebar { order: -1; }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .hero-main__title { font-size: var(--text-2xl); }
    .single-post__title { font-size: var(--text-3xl); }
    .nav-menu { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--nw-dark); padding: var(--gap-md) 0; z-index: 100; }
    .nav-menu.open { display: flex; }
    .nav-menu > li > a { padding: 12px var(--gap-lg); }
    .nav-toggle { display: flex; }
    .header__ad { display: none; }
    .footer-top { grid-template-columns: 1fr; }
    .comment-form { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: var(--gap-sm); text-align: center; }
    .share-bar { gap: var(--gap-sm); }
    .share-btn span { display: none; }
}

@media (max-width: 480px) {
    :root { --gap-lg: 16px; }
    .container { padding: 0 var(--gap-md); }
    .hero-main__title { font-size: var(--text-xl); }
    .hero-side { flex-direction: column; }
    .hero-card { flex-direction: column; }
    .hero-card__img { width: 100%; height: 160px; }
    .top-bar { display: none; }
}

/* =========================================
   PRINT STYLES
   ========================================= */
@media print {
    .site-header, .main-nav, .breaking-bar, .sidebar,
    .site-footer, .share-bar, .back-to-top,
    .ad-banner { display: none !important; }
    .content-sidebar-wrap { grid-template-columns: 1fr; }
    body { font-size: 12pt; color: #000; }
    a { color: #000; text-decoration: none; }
    .single-post__title { font-size: 24pt; }
}

/* =========================================
   ACCESSIBILITY
   ========================================= */
:focus-visible {
    outline: 2px solid var(--nw-red);
    outline-offset: 3px;
    border-radius: 2px;
}
.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;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
