/*
Theme Name: ItsNEWSMagi
Theme URI: https://Saleembaloch.com
Author: Saleem Baloch
Author URI: https://Saleembaloch.com
Description: Fast, full-width News & Magazine theme. Responsive, SEO ready, beautiful typography.
Version: 1.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: itsnewsmagi
Tags: news, magazine, blog, right-sidebar, full-width-template, custom-menu, featured-images, translation-ready
*/

/* ============ RESET ============ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #1a1a1a;
    background: #fff;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .2s ease; }
a:hover { color: #e63946; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ============ VARIABLES ============ */
:root {
    --primary: #e63946;
    --primary-dark: #c1121f;
    --dark: #111;
    --gray: #666;
    --light-gray: #f5f5f5;
    --border: #e5e5e5;
    --radius: 6px;
    --shadow: 0 2px 12px rgba(0,0,0,.06);
    --shadow-hover: 0 6px 24px rgba(0,0,0,.12);
    --container: 1280px;
    --share-bar-height: 60px;
}

/* ============ TYPOGRAPHY ============ */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--dark);
    margin-bottom: 12px;
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }
p { margin-bottom: 16px; }

/* ============ CONTAINER ============ */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============ HEADER (FORCED NON-STICKY) ============ */
.site-header,
.site-header.sticky,
header#masthead {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    background: #fff;
    border-bottom: 1px solid var(--border);
    z-index: 99;
}

.header-main { padding: 12px 0; }
.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.site-branding .site-title {
    font-family: 'Poppins', sans-serif;
    font-size: 24px;
    font-weight: 800;
    margin: 0;
    letter-spacing: -.5px;
    line-height: 1.2;
}
.site-branding .site-title a { color: var(--dark); }
.site-branding .site-title a span { color: var(--primary); }
.site-branding .site-description {
    font-size: 11px;
    color: var(--gray);
    margin: 0;
    display: none;
}
.site-branding img.custom-logo {
    max-height: 40px;
    width: auto;
}

/* Search Form */
.header-search {
    position: relative;
    max-width: 280px;
    flex: 1;
}
.header-search input[type="search"] {
    width: 100%;
    padding: 8px 40px 8px 14px;
    border: 1px solid var(--border);
    border-radius: 30px;
    font-size: 13px;
    outline: none;
    transition: border-color .2s ease;
    background: var(--light-gray);
}
.header-search input[type="search"]:focus { border-color: var(--primary); background: #fff; }
.header-search button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Navigation */
.main-nav { border-top: 1px solid var(--border); }
.main-nav ul { display: flex; align-items: center; gap: 2px; }
.main-nav > .container > ul > li { position: relative; }
.main-nav a {
    display: block;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: .3px;
    position: relative;
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 14px;
    right: 14px;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform .25s ease;
}
.main-nav a:hover::after,
.main-nav .current-menu-item > a::after { transform: scaleX(1); }
.main-nav a:hover { color: var(--primary); }
.main-nav .current-menu-item > a { color: var(--primary); }

/* Dropdown */
.main-nav ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 220px;
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all .25s ease;
    flex-direction: column;
    align-items: stretch;
    z-index: 99;
}
.main-nav li:hover > ul { opacity: 1; visibility: visible; transform: translateY(0); }
.main-nav ul ul a {
    padding: 9px 18px;
    font-size: 13px;
    text-transform: none;
    letter-spacing: 0;
}
.main-nav ul ul a::after { display: none; }
.main-nav ul ul li:hover { background: var(--light-gray); }

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    font-size: 20px;
    color: var(--dark);
    padding: 5px 8px;
}

/* ============ BREAKING NEWS TICKER ============ */
.breaking-news {
    background: var(--primary);
    color: #fff;
    padding: 8px 0;
    overflow: hidden;
}
.breaking-news .container {
    display: flex;
    align-items: center;
    gap: 14px;
}
.breaking-label {
    background: #fff;
    color: var(--primary);
    padding: 3px 10px;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    border-radius: 3px;
    flex-shrink: 0;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .6; }
}
.ticker-wrap { overflow: hidden; flex: 1; position: relative; }
.ticker {
    display: flex;
    gap: 40px;
    white-space: nowrap;
    animation: ticker 30s linear infinite;
}
.ticker:hover { animation-play-state: paused; }
.ticker a { color: #fff; font-size: 13px; font-weight: 500; }
.ticker a:hover { text-decoration: underline; }
@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============ HERO SECTION ============ */
.hero-section { padding: 30px 0; }
.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}
.hero-main {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    height: 100%;
    min-height: 460px;
}
.hero-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.hero-main:hover img { transform: scale(1.05); }
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.3) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    color: #fff;
}
.hero-cat {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 3px;
    margin-bottom: 12px;
    align-self: flex-start;
}
.hero-overlay h2 {
    color: #fff;
    font-size: 1.8rem;
    margin-bottom: 10px;
}
.hero-overlay h2 a { color: #fff; }
.hero-overlay h2 a:hover { color: var(--primary); }
.hero-meta { font-size: 13px; color: #ccc; display: flex; gap: 14px; }

.hero-side {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
}
.hero-small {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    min-height: 220px;
}
.hero-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.hero-small:hover img { transform: scale(1.05); }
.hero-small .hero-overlay { padding: 20px; }
.hero-small .hero-overlay h3 { font-size: 1.1rem; color: #fff; margin: 0; }
.hero-small .hero-overlay h3 a { color: #fff; }

/* ============ SECTION HEADING ============ */
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
}
.section-heading h2 {
    font-size: 1.35rem;
    margin: 0;
    position: relative;
    padding-left: 14px;
}
.section-heading h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 22px;
    background: var(--primary);
    border-radius: 2px;
}
.section-heading a { font-size: 13px; color: var(--primary); font-weight: 600; }

/* ============ CATEGORY BLOCK ============ */
.category-block { padding: 30px 0; }
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ============ POST CARD ============ */
.post-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform .3s ease, box-shadow .3s ease;
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}
.post-card-thumb {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: var(--light-gray);
}
.post-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.post-card:hover .post-card-thumb img { transform: scale(1.06); }
.post-card-cat {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: #fff;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 3px;
}
.post-card-cat:hover { color: #fff; }
.post-card-body { padding: 16px 4px; }
.post-card-body h3 {
    font-size: 1.1rem;
    line-height: 1.4;
    margin-bottom: 10px;
}
.post-card-body h3 a:hover { color: var(--primary); }
.post-card-meta {
    font-size: 12px;
    color: var(--gray);
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.post-card-meta span { display: flex; align-items: center; gap: 5px; }
.post-card-excerpt {
    font-size: 14px;
    color: var(--gray);
    margin-top: 10px;
    line-height: 1.6;
}

/* ============ MAIN LAYOUT ============ */
.site-main { padding: 40px 0; }
.content-wrap {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
}
.content-area { min-width: 0; }

/* ============ SIDEBAR ============ */
.widget-area {
    position: sticky;
    top: 20px;
    align-self: start;
}
.widget {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
}
.widget-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--primary);
    position: relative;
}

/* Latest News Widget */
.latest-news-list li {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.latest-news-list li:last-child { border-bottom: none; padding-bottom: 0; }
.latest-news-list li:first-child { padding-top: 0; }
.latest-news-thumb {
    flex-shrink: 0;
    width: 90px;
    height: 70px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--light-gray);
}
.latest-news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.latest-news-content { flex: 1; min-width: 0; }
.latest-news-content h4 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.latest-news-content h4 a:hover { color: var(--primary); }
.latest-news-date {
    font-size: 11px;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* Sidebar Category List */
.category-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    font-weight: 500;
}
.category-list li:last-child { border-bottom: none; }
.category-list li a { color: var(--dark); }
.category-list li a:hover { color: var(--primary); }
.category-list .count {
    background: var(--light-gray);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    color: var(--gray);
    font-weight: 600;
}
.category-list li:hover .count { background: var(--primary); color: #fff; }

/* ============ SINGLE POST ============ */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--primary);
    width: 0%;
    z-index: 9999;
    transition: width .1s ease;
}
.single-post-header { margin-bottom: 24px; }
.single-cat {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 5px 14px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 3px;
    margin-bottom: 14px;
}
.single-title {
    font-size: 2.4rem;
    line-height: 1.2;
    margin-bottom: 16px;
}
.single-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: var(--gray);
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.single-meta span { display: flex; align-items: center; gap: 6px; }

.featured-image {
    margin: 24px 0;
    border-radius: var(--radius);
    overflow: hidden;
}
.featured-image img { width: 100%; height: auto; }
.featured-caption {
    font-size: 13px;
    color: var(--gray);
    text-align: center;
    padding: 8px 0;
    font-style: italic;
}

/* Post Content */
.entry-content {
    font-size: 17px;
    line-height: 1.85;
    color: #222;
}
.entry-content p { margin-bottom: 20px; }
.entry-content h2 { margin: 32px 0 16px; font-size: 1.7rem; }
.entry-content h3 { margin: 26px 0 12px; font-size: 1.35rem; }
.entry-content h4 { margin: 22px 0 10px; }
.entry-content ul, .entry-content ol { margin: 16px 0 20px 24px; }
.entry-content ul li { list-style: disc; margin-bottom: 8px; }
.entry-content ol li { list-style: decimal; margin-bottom: 8px; }
.entry-content img { border-radius: var(--radius); margin: 20px 0; }
.entry-content a { color: var(--primary); text-decoration: underline; }
.entry-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 12px 20px;
    margin: 24px 0;
    background: var(--light-gray);
    font-style: italic;
    border-radius: 0 var(--radius) var(--radius) 0;
}
.entry-content pre {
    background: var(--dark);
    color: #eee;
    padding: 16px;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 20px 0;
}
.entry-content code {
    background: var(--light-gray);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 14px;
    font-family: 'Courier New', monospace;
}
.entry-content pre code { background: none; padding: 0; }
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}
.entry-content th, .entry-content td {
    border: 1px solid var(--border);
    padding: 10px 14px;
    text-align: left;
}
.entry-content th { background: var(--light-gray); font-weight: 600; }

/* ============ TABLE OF CONTENTS (Accordion) ============ */
.toc {
    background: var(--light-gray);
    border-left: 4px solid var(--primary);
    padding: 0;
    border-radius: var(--radius);
    margin: 24px 0;
    overflow: hidden;
}
.toc-title {
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--dark);
    padding: 14px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background .2s ease;
}
.toc-title:hover { background: rgba(230, 57, 70, .06); }
.toc-toggle-icon {
    font-size: 12px;
    color: var(--primary);
    transition: transform .3s ease;
}
.toc.open .toc-toggle-icon { transform: rotate(180deg); }
.toc-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease, padding .35s ease;
    padding: 0 22px;
}
.toc.open .toc-body {
    max-height: 800px;
    padding: 0 22px 16px;
}
.toc ul { margin: 0; padding-left: 18px; }
.toc ul li {
    list-style: disc;
    font-size: 14px;
    margin-bottom: 6px;
    line-height: 1.5;
}
.toc ul li a { color: #333; }
.toc ul li a:hover { color: var(--primary); }
.toc ul ul { margin-top: 6px; margin-left: 12px; }

/* Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 30px 0;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.post-tags a {
    background: var(--light-gray);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    color: #444;
    transition: all .2s ease;
}
.post-tags a:hover { background: var(--primary); color: #fff; }

/* Author Box */
.author-box {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: var(--light-gray);
    border-radius: var(--radius);
    margin: 30px 0;
    align-items: center;
}
.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-info h4 { margin-bottom: 6px; font-size: 1.1rem; }
.author-info p { font-size: 14px; color: var(--gray); margin: 0; }

/* Related Posts */
.related-posts {
    margin: 40px 0 0;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

/* Post Navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 30px 0;
}
.post-nav-item {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color .2s ease;
}
.post-nav-item:hover { border-color: var(--primary); }
.post-nav-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 700;
    letter-spacing: .5px;
    margin-bottom: 6px;
    display: block;
}
.post-nav-item h4 { font-size: 14px; margin: 0; line-height: 1.4; }

/* ============ PAGINATION ============ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 40px 0;
    flex-wrap: wrap;
}
.pagination .page-numbers {
    padding: 10px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    transition: all .2s ease;
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ============ ARCHIVE / BREADCRUMB ============ */
.breadcrumbs {
    font-size: 13px;
    color: var(--gray);
    margin-bottom: 20px;
}
.breadcrumbs a { color: var(--primary); }
.breadcrumbs span.sep { margin: 0 6px; }

.archive-header { margin-bottom: 30px; }
.archive-title {
    font-size: 2rem;
    margin-bottom: 8px;
}
.archive-description { color: var(--gray); font-size: 15px; }

/* ============ SHARE BUTTONS ============ */
/* Floating share icons (wide desktop only) */
.share-float {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    display: none;
    flex-direction: column;
    gap: 10px;
    z-index: 997;
    transition: opacity .3s ease, transform .3s ease;
}
.share-float.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) translateX(-100%);
}
.share-float a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    transition: transform .2s ease;
    box-shadow: var(--shadow);
}
.share-float a:hover { transform: scale(1.15); color: #fff; }
.share-fb { background: #1877f2; }
.share-tw { background: #000; }
.share-wa { background: #25d366; }
.share-li { background: #0a66c2; }
.share-tg { background: #0088cc; }
.share-cp { background: #555; }

@media (min-width: 1480px) {
    .share-float { display: flex; }
}

/* Bottom share bar */
.share-bottom {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 12px rgba(0,0,0,.08);
    padding: 10px;
    justify-content: center;
    gap: 10px;
    z-index: 1000;
    transition: transform .3s ease;
}
.share-bottom.hidden { transform: translateY(100%); }
.share-bottom a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 15px;
}

@media (max-width: 1479px) {
    .share-bottom { display: flex; }

    /* Add breathing space at the bottom so share bar doesn't hide content */
    body.single {
        padding-bottom: var(--share-bar-height);
    }
    /* When share bar is hidden, remove padding */
    body.single.share-hidden {
        padding-bottom: 0;
    }
}

/* ============ BACK TO TOP ============ */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all .3s ease;
    z-index: 1001; /* ABOVE share bar */
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.back-to-top:hover { background: var(--primary-dark); color: #fff; }

/* Move back-to-top UP on mobile/small screens so it sits above share bar */
@media (max-width: 1479px) {
    .back-to-top { bottom: calc(var(--share-bar-height) + 15px); }
}

/* On very small screens, back-to-top above share bar */
@media (max-width: 600px) {
    .back-to-top {
        bottom: calc(var(--share-bar-height) + 15px);
        right: 16px;
        width: 42px;
        height: 42px;
    }
}

/* ============ COMMENTS ============ */
.comments-area {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}
.comments-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
}
.comment-list { margin-bottom: 30px; }
.comment-list ol.children { margin-left: 40px; }
.comment-body {
    padding: 18px 0;
    border-bottom: 1px solid var(--border);
}
.comment-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.comment-author img { border-radius: 50%; width: 42px; height: 42px; }
.comment-author .fn { font-weight: 700; font-style: normal; }
.comment-meta { font-size: 12px; color: var(--gray); }
.comment-content { font-size: 15px; line-height: 1.7; }
.reply a {
    display: inline-block;
    margin-top: 8px;
    font-size: 12px;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
}

.comment-form { margin-top: 20px; }
.comment-form p { margin-bottom: 14px; }
.comment-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color .2s ease;
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--primary); }
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form input[type="submit"] {
    background: var(--primary);
    color: #fff;
    padding: 12px 30px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s ease;
    border: none;
}
.comment-form input[type="submit"]:hover { background: var(--primary-dark); }

/* ============ 404 ============ */
.error-404 {
    text-align: center;
    padding: 80px 20px;
    max-width: 600px;
    margin: 0 auto;
}
.error-404 .error-code {
    font-size: 8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 10px;
}
.error-404 h1 { font-size: 1.8rem; margin-bottom: 12px; }
.error-404 p { color: var(--gray); margin-bottom: 24px; }
.error-404 .btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 12px 30px;
    border-radius: var(--radius);
    font-weight: 600;
    transition: background .2s ease;
}
.error-404 .btn:hover { background: var(--primary-dark); color: #fff; }

/* ============ FOOTER ============ */
.site-footer {
    background: var(--dark);
    color: #bbb;
    padding: 50px 0 0;
    margin-top: 40px;
}
.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    padding-bottom: 40px;
    border-bottom: 1px solid #2a2a2a;
}
.footer-widgets .widget {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}
.footer-widgets .widget-title {
    color: #fff;
    border-bottom-color: var(--primary);
    font-size: .95rem;
}
.footer-widgets a { color: #bbb; }
.footer-widgets a:hover { color: var(--primary); }
.footer-widgets ul li {
    padding: 6px 0;
    font-size: 14px;
    border-bottom: 1px solid #222;
}
.footer-bottom {
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: #888;
}
.footer-bottom a { color: var(--primary); }

/* ============ HELPERS ============ */
.screen-reader-text {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}
.alignleft { float: left; margin: 0 20px 20px 0; }
.alignright { float: right; margin: 0 0 20px 20px; }
.aligncenter { display: block; margin: 20px auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 13px; color: var(--gray); text-align: center; margin-top: 6px; }
.sticky { border-left: 3px solid var(--primary); padding-left: 16px; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .content-wrap { grid-template-columns: 1fr 300px; gap: 30px; }
    .post-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-widgets { grid-template-columns: repeat(2, 1fr); }
    .hero-grid { grid-template-columns: 1fr 1fr; }
    .hero-main { min-height: 380px; }
    .hero-overlay h2 { font-size: 1.5rem; }
}

@media (max-width: 860px) {
    .menu-toggle { display: block; }
    .main-nav { display: none; }
    .main-nav.open {
        display: block;
        background: #fff;
        box-shadow: var(--shadow);
        border-top: 1px solid var(--border);
    }
    .main-nav.open > .container > ul {
        flex-direction: column;
        align-items: stretch;
        padding: 10px 0;
    }
    .main-nav.open ul ul {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 20px;
        display: none;
    }
    .main-nav.open li:hover > ul { display: block; }
    .header-main .container { flex-wrap: wrap; }
    .header-search { max-width: 100%; order: 3; flex-basis: 100%; }

    .content-wrap { grid-template-columns: 1fr; }
    .widget-area { position: static; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-main { min-height: 320px; }
    .hero-side { grid-template-rows: auto; grid-template-columns: 1fr 1fr; }
    .hero-small { min-height: 180px; }

    .single-title { font-size: 1.7rem; }
    .entry-content { font-size: 16px; }
    .entry-content h2 { font-size: 1.4rem; }
    .entry-content h3 { font-size: 1.2rem; }
}

@media (max-width: 600px) {
    .container { padding: 0 16px; }
    .site-branding .site-title { font-size: 20px; }
    .site-branding img.custom-logo { max-height: 34px; }
    .breaking-label { font-size: 10px; padding: 2px 8px; }
    .ticker a { font-size: 12px; }
    .main-nav a { padding: 9px 12px; font-size: 12px; }

    .post-grid { grid-template-columns: 1fr; }
    .hero-side { grid-template-columns: 1fr; }
    .hero-main { min-height: 260px; }
    .hero-overlay { padding: 20px; }
    .hero-overlay h2 { font-size: 1.2rem; }

    .single-title { font-size: 1.4rem; }
    .single-meta { gap: 12px; font-size: 13px; }
    .author-box { flex-direction: column; text-align: center; }
    .post-navigation { grid-template-columns: 1fr; }

    .footer-widgets { grid-template-columns: 1fr; gap: 24px; }

    .error-404 .error-code { font-size: 5rem; }
    .error-404 h1 { font-size: 1.3rem; }

    .toc-title { padding: 12px 16px; font-size: 13px; }
    .toc-body { padding: 0 16px; }
    .toc.open .toc-body { padding: 0 16px 14px; }
}