/*
Theme Name: News 1
Theme URI: https://example.com/news-1
Author: News Team
Author URI: https://example.com
Description: A clean, modern WordPress news theme inspired by Fox News — responsive, SEO-ready, no sidebar, with trending bar and sticky related articles.
Version: 1.1.0
Requires at least: 5.8
Tested up to: 6.6
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: news-1
Tags: news, blog, magazine, responsive, custom-menu, featured-images
*/

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

:root {
    --color-primary:      #c0392b;
    --color-primary-dark: #96281b;
    --color-dark:         #1a1a1a;
    --color-gray:         #555;
    --color-light-gray:   #f4f4f4;
    --color-border:       #e0e0e0;
    --color-white:        #fff;
    --font-main:          'Segoe UI', 'Roboto', Arial, sans-serif;
    --container-width:    1200px;
    --nav-height:         52px;
}

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

body {
    font-family: var(--font-main);
    color: var(--color-dark);
    background: #ebebeb;
    line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--color-primary); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ===== CONTAINER ===== */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 16px;
}

/* ===== HEADER ===== */
#site-header {
    background: var(--color-dark);
    color: var(--color-white);
}

.header-top {
    background: var(--color-primary);
    padding: 5px 0;
    font-size: 12px;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-top-date { opacity: .9; font-weight: 500; }

.header-social-top { display: flex; gap: 12px; }

.header-social-top a {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    opacity: .9;
    transition: opacity .15s;
    display: flex;
    justify-content: center;
    align-items: center;
}
.header-social-top a:hover { opacity: 1; color: #fff; }

.header-main { padding: 16px 0; }

.header-main .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-branding { display: flex; align-items: center; gap: 12px; }

.site-logo img { height: 50px; width: auto; }

.site-title {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -1px;
    color: #fff;
    line-height: 1;
}
.site-title a { color: inherit; }
.site-title span { color: var(--color-primary); }

.site-tagline {
    font-size: 11px;
    color: #aaa;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-search form {
    display: flex;
    border: 1px solid #444;
    border-radius: 4px;
    overflow: hidden;
}
.header-search input[type="search"] {
    background: #2a2a2a;
    border: none;
    color: #fff;
    padding: 8px 14px;
    width: 220px;
    font-size: 14px;
    outline: none;
}
.header-search input::placeholder { color: #888; }
.header-search button {
    background: var(--color-primary);
    border: none;
    color: #fff;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 16px;
    transition: background .2s;
}
.header-search button:hover { background: var(--color-primary-dark); }

/* ===== PRIMARY NAV (sticky) ===== */
#site-nav {
    background: #222;
    border-top: 3px solid var(--color-primary);
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

#site-nav .container { position: relative; }

.nav-menu { display: flex; align-items: center; opacity: 0; transition: opacity .15s; overflow: hidden; }

/* More (···) button */
#nav-more-item > a {
    display: block;
    color: #e0e0e0;
    padding: 13px 17px;
    font-size: 1.3rem;
    letter-spacing: 2px;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s, color .2s;
    text-decoration: none;
}
#nav-more-item > a:hover,
#nav-more-item.open > a {
    background: var(--color-primary);
    color: #fff;
}
#nav-more-item > .sub-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #2a2a2a;
    min-width: 180px;
    box-shadow: 0 4px 16px rgba(0,0,0,.35);
    border-top: 2px solid var(--color-primary);
    z-index: 1000;
}
#nav-more-item.open > .sub-menu { display: block; }
#nav-more-item .sub-menu a {
    display: block;
    color: #ccc;
    padding: 10px 16px;
    font-size: .85rem;
    font-weight: 700;
    letter-spacing: .06em;
    border-bottom: 1px solid #3a3a3a;
    transition: background .15s, color .15s;
    text-decoration: none;
}
#nav-more-item .sub-menu a:hover { background: var(--color-primary); color: #fff; }
.nav-menu > li { position: relative; }

.nav-menu > li > a {
    display: block;
    color: #e0e0e0;
    padding: 13px 17px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    transition: background .2s, color .2s;
    white-space: nowrap;
}
.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a,
.nav-menu > li.current-menu-ancestor > a {
    background: var(--color-primary);
    color: #fff;
}

/* Sub-menu (2 levels max) */
.nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #2c2c2c;
    min-width: 210px;
    z-index: 300;
    box-shadow: 0 4px 16px rgba(0,0,0,.35);
    border-top: 2px solid var(--color-primary);
}
.nav-menu > li:hover > .sub-menu { display: block; }
.nav-menu .sub-menu a {
    display: block;
    color: #ccc;
    padding: 10px 16px;
    font-size: 13px;
    border-bottom: 1px solid #3a3a3a;
    transition: background .15s, color .15s;
}
.nav-menu .sub-menu a:hover { background: var(--color-primary); color: #fff; }

.sub-arrow { font-size: 10px; margin-left: 4px; }

.hamburger {
    display: none;
    color: #fff;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    padding: 12px 0;
}

/* ===== SECONDARY NAV: Trending + Latest ===== */
#secondary-nav {
    background: #f5f5f5;
    border-bottom: 2px solid var(--color-border);
    overflow: hidden;
}

.sec-nav-wrap {
    display: flex;
    align-items: stretch;
    height: 36px;
    overflow: hidden;
}

.sec-group {
    display: flex;
    align-items: center;
    overflow: hidden;
}

.sec-trending {
    flex: 1;
    border-right: 1px solid var(--color-border);
    min-width: 0;
}

.sec-latest {
    flex: 0 0 42%;
    max-width: 42%;
    overflow: hidden;
}

.sec-label {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    height: 100%;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.sec-label-trend  { background: var(--color-primary); color: #fff; }
.sec-label-latest { background: #333; color: #fff; }

.sec-marquee {
    font-size: 12px;
    color: #444;
    height: 36px;
    line-height: 36px;
}

.sec-link {
    color: #444;
    padding: 0 6px;
    font-size: 12px;
    white-space: nowrap;
    transition: color .15s;
}
.sec-link:hover { color: var(--color-primary); }

.sec-sep { color: #ccc; margin: 0 2px; }

.sec-latest-links {
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 0 6px;
    gap: 0;
}

.sec-latest .sec-link {
    display: inline-flex;
    align-items: center;
    height: 36px;
    border-right: 1px solid var(--color-border);
    padding: 0 10px;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== BREADCRUMB ===== */
.breadcrumb-bar {
    background: #fff;
    border-bottom: 1px solid var(--color-border);
    padding: 7px 0;
    font-size: 13px;
    color: #777;
}
.breadcrumb { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.breadcrumb a { color: var(--color-primary); }
.breadcrumb a:hover { text-decoration: underline; }

/* ===== MAIN CONTENT ===== */
#main-content { padding: 24px 0 32px; }

/* ===== SECTION TITLE ===== */
.section-title {
    font-size: 17px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-left: 4px solid var(--color-primary);
    padding-left: 12px;
    margin-bottom: 18px;
    color: var(--color-dark);
}

/* ===== HERO GRID (front page) ===== */
.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: auto auto;
    gap: 4px;
    margin-bottom: 28px;
    background: #bbb;
    border-radius: 4px;
    overflow: hidden;
}
.hero-main { grid-row: 1 / 3; position: relative; overflow: hidden; }
.hero-main img  { width: 100%; height: 420px; object-fit: cover; transition: transform .35s; }
.hero-main:hover img { transform: scale(1.03); }

.hero-side { position: relative; overflow: hidden; }
.hero-side img  { width: 100%; height: 208px; object-fit: cover; transition: transform .35s; }
.hero-side:hover img { transform: scale(1.04); }

.hero-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.82));
    padding: 30px 16px 14px;
    color: #fff;
}
.hero-cat {
    background: var(--color-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 2px;
    display: inline-block;
    margin-bottom: 6px;
}
.hero-main .hero-title { font-size: 22px; font-weight: 800; line-height: 1.3; }
.hero-side .hero-title { font-size: 15px; font-weight: 700; line-height: 1.3; }
.hero-overlay .hero-meta { font-size: 12px; color: #ccc; margin-top: 5px; }

/* ===== POST CARD ===== */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}
img.attachment-news-hero.size-news-hero.wp-post-image {
    width: 100%;
}
.post-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    transition: box-shadow .2s, transform .2s;
}
.post-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.14);
    transform: translateY(-2px);
}
.post-card-thumb { overflow: hidden; }
.post-card-thumb img { width: 100%; height: 185px; object-fit: cover; transition: transform .3s; }
.post-card:hover .post-card-thumb img { transform: scale(1.05); }
img.thumb-anchor-top { object-position: top center; }

.post-card-body { padding: 14px; }

.post-card-cat {
    color: var(--color-primary);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
    display: block;
}
.post-card-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.post-card-title a:hover { color: var(--color-primary); }
.post-card-meta {
    font-size: 12px;
    color: #999;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* ===== CATEGORY SECTION ===== */
.cat-section { margin-bottom: 32px; }

.cat-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.cat-see-all { font-size: 13px; color: var(--color-primary); font-weight: 700; white-space: nowrap; }
.cat-see-all:hover { text-decoration: underline; }

.cat-section-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
}

.cat-featured-post {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background: #ccc;
}

@media (max-width: 767px) {
    .cat-section-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== POST LIST ===== */
.post-list-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
}
.post-list-item:last-child { border-bottom: none; }
.post-list-thumb { flex-shrink: 0; overflow: hidden; border-radius: 3px; }
.post-list-thumb img { width: 100px; height: 70px; object-fit: cover; transition: transform .3s; }
.post-list-item:hover .post-list-thumb img { transform: scale(1.05); }
.post-list-body { flex: 1; }
.post-list-cat { color: var(--color-primary); font-size: 11px; font-weight: 700; text-transform: uppercase; margin-bottom: 4px; }
.post-list-title { font-size: 14px; font-weight: 700; line-height: 1.4; margin-bottom: 4px; }
.post-list-title a:hover { color: var(--color-primary); }
.post-list-meta { font-size: 12px; color: #999; }

/* ===== SINGLE POST LAYOUT ===== */
.single-content-wrap {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
}

.single-main { min-width: 0; }

/* Sticky related articles sidebar */
.single-related-sidebar {
    position: sticky;
    top: calc(var(--nav-height) + 8px);
    max-height: calc(100vh - var(--nav-height) - 24px);
    overflow-y: auto;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,.1);
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
}
.single-related-sidebar::-webkit-scrollbar { width: 4px; }
.single-related-sidebar::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

/* Related posts widget inside sidebar */
.related-posts-widget { padding: 18px; }

.related-title {
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 10px;
    margin-bottom: 14px;
    color: var(--color-dark);
}

.related-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}
.related-item:last-child { border-bottom: none; }

.related-thumb-link { flex-shrink: 0; overflow: hidden; border-radius: 3px; }
.related-thumb-link img { width: 80px; height: 56px; object-fit: cover; transition: transform .3s; }
.related-item:hover .related-thumb-link img { transform: scale(1.06); }

.related-body { flex: 1; min-width: 0; }
.related-cat  { color: var(--color-primary); font-size: 10px; font-weight: 700; text-transform: uppercase; margin-bottom: 3px; }
.related-post-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.related-post-title a:hover { color: var(--color-primary); }
.related-date { font-size: 11px; color: #999; margin-top: 3px; }

/* ===== SINGLE POST ARTICLE ===== */
.single-post-wrap {
    background: #fff;
    border-radius: 4px;
    padding: 26px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

.single-post-header { margin-bottom: 20px; }
.single-post-cats { margin-bottom: 10px; }
.single-post-cats a {
    background: var(--color-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 2px;
    margin-right: 6px;
    text-transform: uppercase;
}
.single-post-title {
    font-size: 28px;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 14px;
    color: var(--color-dark);
}
.single-post-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #888;
    flex-wrap: wrap;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--color-border);
}
.single-post-meta a { color: var(--color-primary); font-weight: 600; }

.single-post-thumb { margin-bottom: 20px; border-radius: 4px; overflow: hidden; }
.single-post-thumb img { width: 100%; max-height: 480px; object-fit: contain; }
.thumb-caption { font-size: 12px; color: #888; margin-top: 6px; font-style: italic; text-align: center; }

.single-post-content {
    font-size: 16px;
    line-height: 1.9;
    color: #333;
}
.single-post-content p    { margin-bottom: 18px; }
.single-post-content h2   { font-size: 22px; font-weight: 800; margin: 28px 0 12px; }
.single-post-content h3   { font-size: 18px; font-weight: 700; margin: 22px 0 10px; }
.single-post-content ul,
.single-post-content ol   { margin: 0 0 18px 24px; list-style: revert; }
.single-post-content li   { margin-bottom: 6px; }
.single-post-content blockquote {
    border-left: 4px solid var(--color-primary);
    padding: 14px 20px;
    background: #fafafa;
    color: #555;
    font-style: italic;
    margin: 20px 0;
    border-radius: 0 4px 4px 0;
}
.single-post-content img  { border-radius: 4px; margin: 14px 0; }
.single-post-content a    { color: var(--color-primary); text-decoration: underline; }

/* Tags */
.post-tags { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--color-border); }
.post-tags-label { font-size: 13px; font-weight: 700; margin-right: 8px; color: #555; }
.post-tags a {
    display: inline-block;
    background: var(--color-light-gray);
    color: #555;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 3px;
    margin: 4px 4px 4px 0;
    border: 1px solid var(--color-border);
    transition: background .2s, color .2s;
}
.post-tags a:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* Share buttons */
.post-share { margin-top: 18px; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.post-share-label { font-size: 12px; font-weight: 700; text-transform: uppercase; color: #555; }
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: opacity .2s;
    height: 36px;
    min-width: 36px;
    justify-content: center;
}
.share-btn:hover { opacity: .87; color: #fff; }
.share-btn.facebook { background: #1877f2; }
.share-btn.twitter  { background: #000; }
.share-btn.reddit   { background: #ff4500; }
.share-btn.copy     { background: #555; }

/* Post nav prev/next */
.post-nav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 22px;
}
.post-nav-item {
    background: #fff;
    padding: 14px;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    display: block;
    transition: box-shadow .2s;
}
.post-nav-item:hover { box-shadow: 0 3px 12px rgba(0,0,0,.12); }
.post-nav-label { font-size: 11px; color: #999; margin-bottom: 5px; }
.post-nav-title { font-size: 14px; font-weight: 700; line-height: 1.4; }

/* Author tooltip */
.author-trigger-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.author-popup-trigger {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: var(--color-primary);
    font-weight: 600;
    font-size: inherit;
    cursor: pointer;
    font-family: inherit;
    line-height: inherit;
}
.author-popup-trigger:hover { text-decoration: underline; }

.author-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 14px 16px;
    width: 300px;
    box-shadow: 0 4px 20px rgba(0,0,0,.13);
    z-index: 999;
    font-size: 13px;
    line-height: 1;
}
.author-trigger-wrap.tooltip-open .author-tooltip { display: block; }

.author-tooltip-name {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 8px;
}
.author-tooltip-bio {
    margin: 0;
    color: #555;
    font-size: 13px;
    line-height: 1.65;
}

/* ===== COMMENTS ===== */
.comments-wrap {
    background: #fff;
    border-radius: 6px;
    padding: 28px;
    margin-top: 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.comments-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--color-primary);
    display: inline-block;
}

/* Comment list reset */
.comment-list,
.comment-list li,
.comment-list .children,
.comment-list .children li {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

/* Single comment block */
.comment-list .comment {
    display: block;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}
.comment-list .comment:last-child { border-bottom: none; }
.comment-list .comment-inner {
    display: flex;
    gap: 12px;
}

/* Avatar circle */
.comment-list .comment-avatar {
    flex-shrink: 0;
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background: var(--color-primary) !important;
    background-color: var(--color-primary) !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 700;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    line-height: 1;
    overflow: hidden;
}

.comment-body { flex: 1; min-width: 0; }

.comment-meta-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.comment-author-name {
    font-weight: 700;
    font-size: 14px;
    color: #111;
}
.comment-date-info { font-size: 12px; color: #aaa; }

.comment-text {
    font-size: 14px;
    color: #333;
    line-height: 1.65;
    margin-bottom: 8px;
    word-break: break-word;
}

.comment-actions { display: flex; align-items: center; gap: 16px; }
.comment-reply-link {
    font-size: 12px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color .15s;
}
.comment-reply-link:before { content: "↩"; font-size: 13px; }
.comment-reply-link:hover { color: var(--color-primary); }

.comment-pending {
    font-size: 12px;
    color: #e8a000;
    background: #fff8e6;
    border: 1px solid #f5dfa0;
    border-radius: 4px;
    padding: 4px 10px;
    display: inline-block;
    margin-bottom: 6px;
}

/* Nested replies */
.comment-list .children {
    margin-left: 50px;
    border-left: 2px solid #eee;
    padding-left: 16px;
    margin-top: 0;
}
.comment-list .children .comment-avatar {
    width: 30px !important;
    height: 30px !important;
    font-size: 13px !important;
    background: #6c757d !important;
    background-color: #6c757d !important;
}

/* Load more comments */
#load-more-comments {
    display: none;
    width: 100%;
    margin-top: 16px;
    background: #f7f7f7;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 11px 20px;
    font-size: 13px;
    font-weight: 700;
    color: #555;
    cursor: pointer;
    transition: background .2s;
    text-transform: uppercase;
    letter-spacing: .4px;
}
#load-more-comments:hover { background: #ececec; }

/* Comment form */
.comment-form-wrap {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #f0f0f0;
}
.comment-form-wrap h3 {
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.comment-form-wrap .cancel-reply { font-size: 13px; margin-left: 10px; color: #888; }
.comment-form-wrap .cancel-reply a { color: var(--color-primary); }

.comment-form .form-row     { margin-bottom: 14px; }
.comment-form label         { display: block; font-size: 12px; font-weight: 700; margin-bottom: 5px; text-transform: uppercase; letter-spacing: .4px; color: #555; }
.comment-form-cookies-consent { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; margin-bottom: 8px; }
.comment-form-cookies-consent input[type="checkbox"] { flex-shrink: 0; margin-top: 2px; }
.comment-form-cookies-consent label { display: inline; font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; color: #666; margin-bottom: 0; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 13px;
    font-size: 14px;
    font-family: var(--font-main);
    outline: none;
    transition: border-color .2s;
    background: #fafafa;
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--color-primary); background: #fff; }
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form .submit-btn {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 11px 28px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: .6px;
    transition: background .2s;
}
.comment-form .submit-btn:hover { background: var(--color-primary-dark); }

/* ===== ARCHIVE / CATEGORY ===== */
.archive-header {
    background: #fff;
    padding: 18px 22px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid var(--color-primary);
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.archive-header h1 { font-size: 22px; font-weight: 900; }
.archive-header p  { color: #777; font-size: 14px; margin-top: 4px; }

/* Tag sort controls */
.tag-sort-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 13px;
}
.tag-sort-bar .sort-label { font-weight: 600; color: #555; }
.tag-sort-bar a {
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid var(--color-border);
    color: #555;
    font-weight: 600;
    transition: all .2s;
}
.tag-sort-bar a:hover,
.tag-sort-bar a.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* ===== PAGE ===== */
.page-wrap {
    background: #fff;
    border-radius: 4px;
    padding: 28px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    max-width: 860px;
    margin: 0 auto;
}
.page-title {
    font-size: 26px;
    font-weight: 900;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--color-border);
}
.page-content {
    font-size: 16px;
    line-height: 1.9;
    color: #333;
}
.page-content p    { margin-bottom: 18px; }
.page-content h2   { font-size: 22px; font-weight: 800; margin: 28px 0 12px; }
.page-content h3   { font-size: 18px; font-weight: 700; margin: 22px 0 10px; }
.page-content ul,
.page-content ol   { margin: 0 0 18px 24px; list-style: revert; }
.page-content a    { color: var(--color-primary); text-decoration: underline; }

/* ===== 404 ===== */
.error-404-wrap {
    background: #fff;
    border-radius: 4px;
    padding: 60px 28px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    max-width: 600px;
    margin: 0 auto;
}
.error-404-wrap .code { font-size: 100px; font-weight: 900; color: var(--color-primary); line-height: 1; }
.error-404-wrap h2    { font-size: 26px; font-weight: 800; margin: 10px 0 12px; }
.error-404-wrap p     { color: #666; margin-bottom: 24px; }

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    padding: 11px 28px;
    border-radius: 4px;
    font-weight: 700;
    display: inline-block;
    transition: background .2s;
    font-size: 15px;
}
.btn-primary:hover { background: var(--color-primary-dark); color: #fff; }

/* ===== SEARCH ===== */
.search-form-wrap {
    background: #fff;
    padding: 18px;
    border-radius: 4px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.search-form-wrap .search-form {
    display: flex;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    overflow: hidden;
}
.search-form-wrap input[type="search"] {
    flex: 1;
    border: none;
    padding: 10px 14px;
    font-size: 15px;
    outline: none;
}
.search-form-wrap button {
    background: var(--color-primary);
    border: none;
    color: #fff;
    padding: 10px 18px;
    cursor: pointer;
    font-size: 15px;
    transition: background .2s;
}
.search-form-wrap button:hover { background: var(--color-primary-dark); }

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 28px;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    border: 1px solid var(--color-border);
    background: #fff;
    color: var(--color-dark);
    transition: background .2s, color .2s, border-color .2s;
}
.pagination a:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.pagination .current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* ===== FOOTER ===== */
#site-footer { background: #1a1a1a; color: #ccc; margin-top: 40px; }

/* Footer top bar: brand + social */
.footer-top-bar {
    background: #111;
    border-bottom: 3px solid var(--color-primary);
    padding: 20px 0;
}
.footer-top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.footer-brand {}
.footer-site-name {
    font-size: 22px;
    font-weight: 900;
    color: #fff;
    letter-spacing: -1px;
    display: block;
}
.footer-tagline { font-size: 12px; color: #888; margin-top: 3px; }

.footer-social-icons { display: flex; gap: 10px; flex-wrap: wrap; }

.footer-social-btn {
    min-width: 43px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    transition: opacity .2s;
    justify-content: center;
}
.footer-social-btn:hover { opacity: .85; color: #fff; }
.social-icon { font-weight: 900; font-size: 15px; }
.footer-social-fb     { background: #1877f2; }
.footer-social-x      { background: #000; border: 1px solid #333; }
.footer-social-reddit { background: #ff4500; }

/* Footer widgets */
.footer-widgets {
    padding: 36px 0 28px;
    border-bottom: 1px solid #2a2a2a;
}
.footer-widgets-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.footer-widget-title {
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-primary);
}
.footer-widget p { font-size: 13px; line-height: 1.8; color: #aaa; }
.footer-widget ul li { padding: 5px 0; border-bottom: 1px solid #252525; }
.footer-widget ul li:last-child { border-bottom: none; }
.footer-widget ul a { font-size: 13px; color: #aaa; transition: color .2s; }
.footer-widget ul a:hover { color: var(--color-primary); }
.footer-widget ul a::before { content: '› '; color: var(--color-primary); }

/* WordPress nav_menu in footer */
.footer-widget .menu { }
.footer-widget .menu li { padding: 5px 0; border-bottom: 1px solid #252525; }
.footer-widget .menu li:last-child { border-bottom: none; }
.footer-widget .menu a { font-size: 13px; color: #aaa; transition: color .2s; }
.footer-widget .menu a::before { content: '› '; color: var(--color-primary); }
.footer-widget .menu a:hover { color: var(--color-primary); }

/* Footer bottom */
.footer-bottom { padding: 16px 0; }
.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    flex-wrap: wrap;
    gap: 8px;
}
.footer-bottom-inner a { color: var(--color-primary); }
.footer-legal-links { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== CONTACT PAGE ===== */
.contact-page-wrap {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    background: #fff;
    border-radius: 6px;
    padding: 40px;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    margin-bottom: 32px;
}
.contact-page-title {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--color-primary);
    display: inline-block;
}
.contact-intro {
    font-size: 14px;
    color: #555;
    line-height: 1.7;
    margin-bottom: 28px;
}
.contact-info-items { display: flex; flex-direction: column; gap: 16px; }
.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.contact-info-icon { font-size: 20px; line-height: 1.4; }
.contact-info-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #999; margin-bottom: 2px; }
.contact-info-value { font-size: 14px; color: #333; }

.contact-success {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #2e7d32;
    border-radius: 4px;
    padding: 14px 18px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.contact-success span { font-size: 20px; }

.contact-error-list {
    background: #fdecea;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 12px 18px;
    margin-bottom: 20px;
}
.contact-error-item { font-size: 13px; color: #b71c1c; margin-bottom: 4px; }
.contact-error-item:last-child { margin-bottom: 0; }

.contact-form-row--half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.contact-field { margin-bottom: 16px; }
.contact-field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #555;
    margin-bottom: 6px;
}
.contact-field label span { color: var(--color-primary); }
.contact-field input,
.contact-field textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px 13px;
    font-size: 14px;
    font-family: var(--font-main);
    outline: none;
    background: #fafafa;
    transition: border-color .2s, background .2s;
}
.contact-field input:focus,
.contact-field textarea:focus { border-color: var(--color-primary); background: #fff; }
.contact-field textarea { min-height: 160px; resize: vertical; }

.contact-submit {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 12px 32px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .5px;
    transition: background .2s;
}
.contact-submit:hover { background: var(--color-primary-dark); }

@media (max-width: 767px) {
    .contact-page-wrap { grid-template-columns: 1fr; padding: 24px; gap: 24px; }
    .contact-form-row--half { grid-template-columns: 1fr; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .single-content-wrap { grid-template-columns: 1fr 260px; }
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-widgets-grid { grid-template-columns: repeat(2, 1fr); }
    .sec-latest { max-width: 35%; }
}

@media (max-width: 768px) {
    .single-content-wrap { grid-template-columns: 1fr; }
    .single-related-sidebar { position: static; max-height: none; margin-top: 20px; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-main { grid-row: auto; }
    .hero-main img { height: 260px; }
    .hero-side img { height: 180px; }
    .single-post-title { font-size: 22px; }
    .posts-grid { grid-template-columns: 1fr; }
    .footer-widgets-grid { grid-template-columns: 1fr 1fr; }
    .header-main .container { flex-direction: column; align-items: flex-start; }
    .header-search input[type="search"] { width: 160px; }
    .hamburger { display: block; }
    .nav-menu { display: none; flex-direction: column; align-items: stretch; }
    .nav-menu.open { display: flex; }
    .nav-menu > li > a { padding: 12px 16px; border-bottom: 1px solid #333; }
    .nav-menu .sub-menu {
        position: static;
        display: none;
        box-shadow: none;
        border-top: none;
        background: #1a1a1a;
    }
    .nav-menu > li.open > .sub-menu { display: block; }
    .sec-latest { display: none; }
    .post-nav-grid { grid-template-columns: 1fr; }
    .footer-top-bar .container { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
    .footer-widgets-grid { grid-template-columns: 1fr; }
    .footer-bottom-inner { flex-direction: column; align-items: flex-start; }
    .site-title { font-size: 22px; }
    .error-404-wrap .code { font-size: 70px; }
    .hero-main img { height: 210px; }
    #secondary-nav { display: none; }
    .comment-list .children {
        margin-left: 20px;
    }
}