/*
Theme Name: CN News Portal - Hindi Blog Theme
Theme URI: https://calculator.net
Author: Calculator.net Themes
Description: Premium mobile-first Hindi/English News Blog WordPress Theme. Includes Breaking News Ticker, 15 AdSense slots, Social Media integration, Color Customizer, Compact Mobile Header, and Dynamic Category Sections. Perfect for News, Education, Results, and Magazine websites.
Version: 3.0.0
Requires at least: 5.8
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: calculator-net
Tags: news, blog, hindi, magazine, adsense, mobile-first, responsive, customizer, dark-nav
*/

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
    --cn-red: #E10600;
    --cn-red-dark: #B80000;
    --cn-black: #151515;
    --cn-heading: #1A1A1A;
    --cn-body: #555555;
    --cn-muted: #888888;
    --cn-border: #E8E8E8;
    --cn-bg: #F5F5F5;
    --cn-card: #FFFFFF;
    --cn-link: #D90000;
    --cn-link-hover: #A80000;

    --cn-primary: #E10600;
    --cn-primary-dark: #B80000;
    --cn-accent: #FFDD00;

    --cn-radius: 8px;
    --cn-shadow: 0 1px 3px rgba(21, 21, 21, .06), 0 1px 2px rgba(21, 21, 21, .04);
    --cn-shadow-hover: 0 10px 28px rgba(21, 21, 21, .10);

    --cn-font: 'Inter', 'Noto Sans Devanagari', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --cn-font-body: 'Inter', 'Noto Sans Devanagari', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --cn-font-heading: 'Inter', 'Noto Sans Devanagari', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --cn-font-logo: 'Inter', 'Noto Sans Devanagari', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --cn-body-size: 15px;
    --cn-section-size: 20px;
    --cn-logo-size: 34px;
    --cn-card-size: 16px;
    --cn-featured-size: 22px;
    --cn-small-size: 14px;
    --cn-menu-size: 14px;
}

@supports (color: color-mix(in srgb, red, black)) {
    :root { --cn-primary-dark: color-mix(in srgb, var(--cn-primary), black 14%); }
}

/* ============================================================
   2. RESET + BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--cn-font-body);
    font-size: var(--cn-body-size);
    line-height: 1.6;
    color: var(--cn-body);
    background: var(--cn-bg);
    overflow-x: hidden;
}
h1, h2, h3, h4, h5, h6 { color: var(--cn-heading); font-weight: 700; line-height: 1.3; font-family: var(--cn-font-heading); }
p { margin: 0 0 10px; }
img { max-width: 100%; height: auto; }
a { color: var(--cn-link); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--cn-link-hover); }
ul, ol { margin: 0; padding: 0; }

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

.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ============================================================
   3. TOP BAR
   ============================================================ */
.top-bar {
    background: var(--cn-topbar-bg, #141414);
    color: var(--cn-topbar-text, #B9B9B9);
    font-size: 12.5px;
}
.top-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 36px;
    flex-wrap: wrap;
}
.top-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.top-date { color: var(--cn-accent); font-size: 13px; }
.top-date-text { white-space: nowrap; }
.top-sep { color: #4A4A4A; }
.top-links { display: flex; align-items: center; gap: 14px; }
.top-links a { color: var(--cn-topbar-text, #B9B9B9); font-weight: 500; }
.top-links a:hover { color: var(--cn-header-link-hover, #fff); }
.top-social { display: flex; align-items: center; gap: 6px; }
.top-social a {
    width: 24px; height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .10);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    transition: background .2s ease;
}
.top-social a:hover { background: var(--cn-primary); color: #fff; }

/* ============================================================
   4. MAIN WRAPPER + BRAND HEADER
   ============================================================ */
.main-wrapper { max-width: 1200px; margin: 0 auto; }

.site-header { background: var(--cn-header-bg, var(--cn-card)); border-bottom: 1px solid var(--cn-border); }
.site-header .header-inner {
    padding-left: 8px;
    padding-right: 8px;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
    flex-wrap: wrap;
}
.brand { min-width: 0; margin-right: 28px; }
.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    font-family: var(--cn-font-logo);
    font-size: var(--cn-logo-size);
    font-weight: 900;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    color: var(--cn-black);
    line-height: 1.05;
}
.site-logo:hover { color: var(--cn-black); }
.site-logo-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: 0 2px 10px rgba(21, 21, 21, .14), 0 0 0 1px var(--cn-border);
    transition: transform .25s ease, box-shadow .25s ease;
}
.site-logo:hover .site-logo-img { transform: scale(1.05); box-shadow: 0 4px 16px rgba(21, 21, 21, .18), 0 0 0 1px var(--cn-border); }
.site-logo-text {
    display: inline-flex;
    align-items: baseline;
    gap: 9px;
    line-height: 1;
}
.site-logo .logo-hi {
    position: relative;
    color: var(--cn-primary);
    letter-spacing: .4px;
}
.site-logo .logo-hi::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -3px;
    height: 3px;
    border-radius: 2px;
    background: var(--cn-primary);
}
.site-tagline {
    font-size: 12px;
    font-weight: 500;
    color: var(--cn-muted);
    margin: 4px 0 0 61px;
    letter-spacing: .2px;
}
.site-tagline::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cn-primary);
    margin-right: 7px;
    vertical-align: 1px;
}
.custom-logo { max-height: 60px; width: auto; border-radius: 50%; object-fit: cover; }

.header-search { width: 340px; flex-shrink: 0; }
.search-form {
    display: flex;
    align-items: stretch;
    border: 2px solid var(--cn-border);
    border-radius: 50px;
    background: var(--cn-header-bg, #fff);
    overflow: hidden;
    transition: border-color .2s ease;
}
.search-form:focus-within { border-color: var(--cn-primary); }
.search-form label { flex: 1; display: flex; margin: 0; }
.search-form .search-field {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    padding: 9px 16px;
    font-size: 14px;
    font-family: inherit;
    color: var(--cn-heading);
    outline: none;
}
.search-form .search-field::placeholder { color: #A0A0A0; }
.search-form .search-submit {
    border: none;
    background: var(--cn-primary);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    padding: 9px 18px;
    cursor: pointer;
    transition: background .2s ease;
}
.search-form .search-submit::before { content: "Search"; }
.search-form .search-submit:hover { background: var(--cn-primary-dark); }

/* ============================================================
   5. MAIN NAVIGATION
   ============================================================ */
.main-nav {
    background: var(--cn-card);
    border-bottom: 2px solid var(--cn-primary);
    box-shadow: var(--cn-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}
.nav-inner { display: flex; align-items: center; gap: 8px; }

.nav-toggle {
    display: none;
    background: #fff;
    border: 1px solid var(--cn-border);
    border-radius: 8px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0;
    box-shadow: var(--cn-shadow);
    transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
    flex-shrink: 0;
}
.nav-toggle span {
    display: block;
    width: 20px; height: 2px;
    background: var(--cn-heading);
    border-radius: 2px;
    transition: transform .25s ease, opacity .25s ease, background .2s ease;
}
.nav-toggle:hover { border-color: var(--cn-primary); box-shadow: 0 3px 10px rgba(225, 6, 0, .12); }
.nav-toggle:hover span { background: var(--cn-primary); }
.nav-toggle.open {
    background: var(--cn-primary);
    border-color: var(--cn-primary);
    box-shadow: 0 3px 12px rgba(225, 6, 0, .28);
}
.nav-toggle.open span { background: #fff; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    flex-wrap: wrap;
}
.nav-menu > li { position: relative; }
.nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 13px 15px;
    font-size: var(--cn-menu-size, 14px);
    font-weight: 600;
    color: var(--cn-nav-text, var(--cn-heading));
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}
.nav-menu > li > a:hover { color: var(--cn-nav-hover, var(--cn-primary)); }
.nav-menu .current-menu-item > a,
.nav-menu .current-menu-ancestor > a {
    color: var(--cn-nav-hover, var(--cn-primary));
    border-bottom-color: var(--cn-nav-hover, var(--cn-primary));
}

/* Dropdown arrow */
.nav-menu > li.menu-item-has-children > a::after {
    content: "";
    width: 6px; height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    opacity: .6;
}

/* Sub menus */
.nav-menu li ul {
    position: absolute;
    top: 100%; left: 0;
    min-width: 220px;
    background: var(--cn-header-bg, #fff);
    border: 1px solid var(--cn-border);
    border-top: 2px solid var(--cn-primary);
    border-radius: 0 0 var(--cn-radius) var(--cn-radius);
    box-shadow: var(--cn-shadow-hover);
    list-style: none;
    padding: 6px 0;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    z-index: 100;
}
.nav-menu li:hover > ul,
.nav-menu li:focus-within > ul,
.nav-menu li.open > ul {
    opacity: 1;
    visibility: visible;
    transform: none;
}
.nav-menu li ul li { position: relative; }
.nav-menu li ul a {
    display: block;
    padding: 9px 16px;
    font-size: calc(var(--cn-menu-size, 14px) - 1px);
    font-weight: 500;
    color: var(--cn-heading);
    border-bottom: none;
    margin-bottom: 0;
}
.nav-menu li ul a:hover { background: #FAFAFA; color: var(--cn-primary); }
.nav-menu li ul li ul { top: -7px; left: 100%; border-radius: var(--cn-radius); }

/* ============================================================
   6. TRENDING BAR (TICKER)
   ============================================================ */
.trending-bar {
    background: #fff;
    border-bottom: 1px solid var(--cn-border);
}
.trending-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.trending-badge {
    background: var(--cn-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    padding: 6px 12px;
    border-radius: 4px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.ticker-viewport { flex: 1; overflow: hidden; }
.ticker-track {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    animation: cn-ticker 45s linear infinite;
}
.ticker-viewport:hover .ticker-track { animation-play-state: paused; }
.ticker-group { display: inline-flex; align-items: center; }
.ticker-item { font-size: 13px; font-weight: 600; color: var(--cn-heading); }
.ticker-item a { color: var(--cn-heading); }
.ticker-item a:hover { color: var(--cn-primary); }
.ticker-dot { color: var(--cn-primary); margin: 0 14px; }

@keyframes cn-ticker {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ============================================================
   7. LAYOUT GRID
   ============================================================ */
.homepage-grid,
.content-area {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
    padding: 24px 0 32px;
}
.left-col { min-width: 0; }
.right-col { min-width: 0; }

/* ============================================================
   8. SECTION HEADERS
   ============================================================ */
.section-wrap { margin-bottom: 34px; }
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--cn-border);
    padding-bottom: 10px;
    margin-bottom: 18px;
    font-family: var(--cn-font-heading);
    font-size: var(--cn-section-size);
    font-weight: 800;
    color: var(--cn-heading);
}
.sec-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--cn-font-heading);
    font-size: var(--cn-section-size);
    font-weight: 800;
    color: var(--cn-heading);
    line-height: 1.2;
}
.sec-title::before {
    content: "";
    width: 5px;
    height: 24px;
    background: var(--cat-accent, var(--cn-primary));
    border-radius: 3px;
    flex-shrink: 0;
}
.view-all {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--cn-muted);
    white-space: nowrap;
}
.view-all:hover { color: var(--cat-accent, var(--cn-primary)); }

/* ============================================================
   Category-specific visual identity (uses --cat-accent from section)
   ============================================================ */
.cat-section .cat-badge { background: var(--cat-accent); }
.cat-section .cat-badge:hover { background: color-mix(in srgb, var(--cat-accent), black 15%); }
.cat-section .post-card-title a:hover { color: var(--cat-accent); }
.cat-section .num-badge { background: var(--cat-accent); }
.cat-section .overlay-cat { background: var(--cat-accent); }
.cat-section .mosaic-item .cat-badge { background: var(--cat-accent); }
.cat-section .masonry-item .cat-badge { background: var(--cat-accent); }
.cat-section .featured-card .cat-badge { background: var(--cat-accent); }

/* Per-category font size & weight for post titles */
.cat-section .post-card-title,
.cat-section .hero-feature .post-card-title,
.cat-section .featured-card .post-card-title,
.cat-section .compact-card .post-card-title,
.cat-section .top2-card .post-card-title,
.cat-section .grid4-card .post-card-title,
.cat-section .masonry-item .post-card-title,
.cat-section .mosaic-item .post-card-title,
.cat-section .num-item h4,
.cat-section .list-rows .post-card-title,
.cat-section .hero-item h4,
.cat-section .overlay-title,
.cat-section .sb-popular h4 {
    font-size: var(--cat-font-size, var(--cn-card-size));
    font-weight: var(--cat-font-weight, 700);
}

/* Subtle accent border on cards for visual distinction */
.cat-section .post-card,
.cat-section .featured-card,
.cat-section .masonry-item,
.cat-section .mosaic-item,
.cat-section .num-item,
.cat-section .list-rows-item,
.cat-section .hero-item {
    border-color: color-mix(in srgb, var(--cat-accent), transparent 85%);
}
.cat-section .post-card:hover,
.cat-section .featured-card:hover,
.cat-section .masonry-item:hover,
.cat-section .mosaic-item:hover {
    box-shadow: 0 12px 32px color-mix(in srgb, var(--cat-accent), transparent 88%);
}

/* Legacy colored headers (kept for compatibility) */
.section-header.dark { color: #333; }
.section-header.blue { color: #1565c0; }
.section-header.green { color: #2e7d32; }
.section-header.orange { color: #e65100; }
.section-header.purple { color: #6a1b9a; }

/* ============================================================
   9. MEDIA + CARD PRIMITIVES
   ============================================================ */
.media-frame {
    position: relative;
    display: block;
    overflow: hidden;
    background: #EDEDED;
    aspect-ratio: 16 / 9;
    border-radius: var(--cn-radius);
}
.media-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease;
}
a.media-frame:hover img,
.hero-feature:hover .media-frame img,
.featured-card:hover .media-frame img,
.post-card:hover .media-frame img,
.list-rows-item:hover .media-frame img,
.hero-item:hover .media-frame img,
.num-item:hover .media-frame img { transform: scale(1.04); }

.cat-badge {
    position: absolute;
    left: 12px; top: 12px;
    background: var(--cn-primary);
    color: #fff;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    z-index: 2;
}
.cat-badge:hover { color: #fff; background: var(--cn-primary-dark); }

.post-card-title {
    font-size: var(--cat-font-size, var(--cn-card-size));
    font-weight: var(--cat-font-weight, 700);
    line-height: 1.45;
    margin: 0;
}
.post-card-title a { color: var(--cn-heading); }
.post-card-title a:hover { color: var(--cat-accent, var(--cn-primary)); }

.post-excerpt {
    font-size: 13.5px;
    color: var(--cn-body);
    line-height: 1.6;
    margin: 8px 0 0;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: var(--cn-muted);
    margin-top: 10px;
}
.meta-date { display: inline-flex; align-items: center; gap: 5px; }

.img-ph {
    width: 100%;
    height: 100%;
    min-height: 80px;
    background: linear-gradient(135deg, #ECECEC, #DCDCDC);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9A9A9A;
    font-size: 26px;
}

/* ============================================================
   10. HERO (TOP STORIES)
   ============================================================ */
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}
.hero-feature {
    background: var(--cn-card);
    border: 1px solid var(--cn-border);
    border-radius: var(--cn-radius);
    overflow: hidden;
    box-shadow: var(--cn-shadow);
    transition: box-shadow .25s ease, transform .25s ease;
}
.hero-feature:hover { box-shadow: var(--cn-shadow-hover); transform: translateY(-2px); }
.hero-feature .media-frame { border-radius: 0; }
.hero-feature-body { padding: 16px 18px 20px; }
.hero-feature .post-card-title {
    font-size: var(--cat-font-size, var(--cn-featured-size));
    font-weight: var(--cat-font-weight, 700);
}
.hero-feature .post-excerpt { margin-top: 10px; }

.hero-side { display: flex; flex-direction: column; }
.hero-item {
    display: flex;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--cn-border);
    align-items: flex-start;
}
.hero-item:first-child { padding-top: 0; }
.hero-item:last-child { border-bottom: none; padding-bottom: 0; }
.hero-item .media-frame {
    width: 118px;
    aspect-ratio: 4 / 3;
    flex-shrink: 0;
}
.hero-item-text { min-width: 0; }
.hero-item h4 {
    font-size: var(--cat-font-size, var(--cn-small-size));
    font-weight: var(--cat-font-weight, 700);
    line-height: 1.45;
    margin: 0;
}
.hero-item h4 a { color: var(--cn-heading); }
.hero-item h4 a:hover { color: var(--cn-primary); }
.hero-item .post-meta { margin-top: 6px; }

/* ============================================================
   11. LAYOUT : FEATURED SPLIT (category)
   ============================================================ */
.featured-split {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}
.featured-card {
    background: var(--cn-card);
    border: 1px solid var(--cn-border);
    border-radius: var(--cn-radius);
    overflow: hidden;
    box-shadow: var(--cn-shadow);
    transition: box-shadow .25s ease, transform .25s ease;
}
.featured-card:hover { box-shadow: var(--cn-shadow-hover); transform: translateY(-2px); }
.featured-card .media-frame { border-radius: 0; }
.featured-card-body { padding: 15px 18px 18px; }
.featured-card .post-card-title {
    font-size: calc(var(--cat-font-size, var(--cn-card-size)) + 2px);
    font-weight: var(--cat-font-weight, 700);
}

/* ============================================================
   12. LAYOUT : CARD GRID
   ============================================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.post-card {
    background: var(--cn-card);
    border: 1px solid var(--cn-border);
    border-radius: var(--cn-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--cn-shadow);
    transition: box-shadow .25s ease, transform .25s ease;
}
.post-card:hover { box-shadow: var(--cn-shadow-hover); transform: translateY(-2px); }
.post-card .media-frame { border-radius: 0; aspect-ratio: 16 / 10; }
.post-card-body { padding: 14px 16px 17px; display: flex; flex-direction: column; flex: 1; }
.post-card .post-card-title {
    font-size: var(--cat-font-size, var(--cn-card-size));
    font-weight: var(--cat-font-weight, 700);
}
.post-card .post-excerpt { font-size: 13px; }
.post-card .post-meta { margin-top: auto; padding-top: 10px; }

/* ============================================================
   12b. LAYOUT : COMPACT GRID (2×2 cards, smaller)
   ============================================================ */
.compact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
.compact-card {
    background: var(--cn-card);
    border: 1px solid var(--cn-border);
    border-radius: var(--cn-radius);
    overflow: hidden;
    box-shadow: var(--cn-shadow);
    transition: box-shadow .25s ease, transform .25s ease;
}
.compact-card:hover { box-shadow: var(--cn-shadow-hover); transform: translateY(-2px); }
.compact-card .media-frame {
    aspect-ratio: 16 / 10;
    position: relative;
}
.compact-card .media-frame img { width: 100%; height: 100%; object-fit: cover; }
.compact-card .cat-badge { position: absolute; top: 10px; left: 10px; z-index: 2; }
.compact-card-body { padding: 12px 14px 14px; }
.compact-card .post-card-title {
    font-size: calc(var(--cat-font-size, var(--cn-card-size)) - 1px);
    font-weight: var(--cat-font-weight, 700);
    line-height: 1.35;
    margin: 0 0 6px;
}
.compact-card .post-card-title a { color: var(--cn-heading); }
.compact-card .post-card-title a:hover { color: var(--cat-accent, var(--cn-primary)); }
.compact-card .post-meta {
    font-size: 11.5px;
    color: var(--cn-muted);
}
.compact-card .meta-date { display: inline-flex; align-items: center; gap: 5px; }

@media (max-width: 768px) {
    .compact-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   12c. LAYOUT : TOP 2 + GRID 4 (Girls exclusive)
   ============================================================ */
.top2-grid4 { display: flex; flex-direction: column; gap: 20px; }

/* Top 2 row - side by side featured cards */
.top2-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.top2-card {
    background: var(--cn-card);
    border: 1px solid var(--cn-border);
    border-radius: var(--cn-radius);
    overflow: hidden;
    box-shadow: var(--cn-shadow);
    transition: box-shadow .25s ease, transform .25s ease;
    display: flex;
    flex-direction: column;
}
.top2-card:hover { box-shadow: var(--cn-shadow-hover); transform: translateY(-3px); }
.top2-card .media-frame {
    aspect-ratio: 16 / 9;
    position: relative;
}
.top2-card .media-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.top2-card:hover .media-frame img { transform: scale(1.04); }
.top2-card .cat-badge { position: absolute; top: 12px; left: 12px; z-index: 2; }
.top2-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.top2-card .post-card-title {
    font-size: calc(var(--cat-font-size, var(--cn-card-size)) + 2px);
    font-weight: var(--cat-font-weight, 700);
    line-height: 1.35;
    margin: 0 0 8px;
}
.top2-card .post-card-title a { color: var(--cn-heading); }
.top2-card .post-card-title a:hover { color: var(--cat-accent, var(--cn-primary)); }
.top2-card .post-excerpt { font-size: 13.5px; color: var(--cn-body); line-height: 1.6; margin: 0 0 12px; }
.top2-card .post-meta { font-size: 12px; color: var(--cn-muted); }

/* Grid 4 row - 4 cards in a row */
.grid4-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.grid4-card {
    background: var(--cn-card);
    border: 1px solid var(--cn-border);
    border-radius: var(--cn-radius);
    overflow: hidden;
    box-shadow: var(--cn-shadow);
    transition: box-shadow .25s ease, transform .25s ease;
}
.grid4-card:hover { box-shadow: var(--cn-shadow-hover); transform: translateY(-2px); }
.grid4-card .media-frame {
    aspect-ratio: 16 / 10;
    position: relative;
}
.grid4-card .media-frame img { width: 100%; height: 100%; object-fit: cover; }
.grid4-card .cat-badge { position: absolute; top: 8px; left: 8px; z-index: 2; }
.grid4-card-body { padding: 12px 13px 14px; }
.grid4-card .post-card-title {
    font-size: calc(var(--cat-font-size, var(--cn-card-size)) - 1px);
    font-weight: var(--cat-font-weight, 700);
    line-height: 1.35;
    margin: 0 0 6px;
}
.grid4-card .post-card-title a { color: var(--cn-heading); }
.grid4-card .post-card-title a:hover { color: var(--cat-accent, var(--cn-primary)); }
.grid4-card .post-meta { font-size: 11px; color: var(--cn-muted); }
.grid4-card .meta-date { display: inline-flex; align-items: center; gap: 4px; }

/* Responsive */
@media (max-width: 1024px) {
    .grid4-row { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .top2-row { gap: 14px; }
}

@media (max-width: 768px) {
    .top2-row { grid-template-columns: 1fr; }
    .grid4-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .top2-card .media-frame { aspect-ratio: 16 / 10; }
    .grid4-card .media-frame { aspect-ratio: 16 / 10; }
}

@media (max-width: 560px) {
    .grid4-row { grid-template-columns: 1fr; gap: 10px; }
    .top2-card-body { padding: 14px 15px 16px; }
    .grid4-card-body { padding: 11px 12px 13px; }
}

/* ============================================================
   13. LAYOUT : LIST ROWS
   ============================================================ */
.list-rows { display: flex; flex-direction: column; }
.list-rows-item {
    display: flex;
    gap: 18px;
    padding: 15px 0;
    border-bottom: 1px solid var(--cn-border);
    align-items: flex-start;
}
.list-rows-item:first-child { padding-top: 0; }
.list-rows-item:last-child { border-bottom: none; padding-bottom: 0; }
.list-rows-item .media-frame {
    width: 130px;
    aspect-ratio: 4 / 3;
    flex-shrink: 0;
}
.list-rows-text { flex: 1; min-width: 0; }
.list-rows-cat { margin-bottom: 4px; }
.list-rows-cat a {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--cn-primary);
}
.list-rows .post-card-title {
    font-size: var(--cat-font-size, var(--cn-card-size));
    font-weight: var(--cat-font-weight, 700);
}
.list-rows .post-excerpt { font-size: 13px; margin-top: 5px; }
.list-rows .post-meta { margin-top: 7px; }

/* ============================================================
   14. LAYOUT : IMAGE GRID (overlay cards)
   ============================================================ */
.image-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}
.overlay-card {
    position: relative;
    display: block;
    height: 175px;
    border-radius: var(--cn-radius);
    overflow: hidden;
    background: #222;
}
.overlay-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease, opacity .35s ease;
    opacity: .95;
}
.overlay-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .82), rgba(0, 0, 0, .05) 62%);
}
.overlay-card:hover img { transform: scale(1.05); opacity: 1; }
.overlay-text {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 16px 12px 10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-height: 100%;
    overflow: hidden;
}
.overlay-cat {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--cn-accent);
}
.overlay-title {
    color: #fff;
    font-size: var(--cat-font-size, 13px);
    font-weight: var(--cat-font-weight, 700);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ============================================================
   15. LAYOUT : FEATURED + NUMBERED LIST
   ============================================================ */
.num-split {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 26px;
    align-items: start;
}
.num-list { display: flex; flex-direction: column; }
.num-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--cn-border);
}
.num-item:first-child { padding-top: 0; }
.num-item:last-child { border-bottom: none; padding-bottom: 0; }
.num-badge {
    width: 26px; height: 26px;
    border-radius: 50%;
    background: var(--cn-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}
.num-item .media-frame {
    width: 72px;
    aspect-ratio: 4 / 3;
    flex-shrink: 0;
    border-radius: 6px;
}
.num-item-text { flex: 1; min-width: 0; }
.num-item h4 {
    font-size: var(--cat-font-size, var(--cn-small-size));
    font-weight: var(--cat-font-weight, 700);
    line-height: 1.45;
    margin: 0;
}
.num-item h4 a { color: var(--cn-heading); }
.num-item h4 a:hover { color: var(--cat-accent, var(--cn-primary)); }
.num-item .post-meta { margin-top: 5px; }

/* ============================================================
   15b. MASONRY GRID (mixed-size cards)
   ============================================================ */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.masonry-item {
    background: var(--cn-card);
    border: 1px solid var(--cn-border);
    border-radius: var(--cn-radius);
    overflow: hidden;
    box-shadow: var(--cn-shadow);
    transition: box-shadow .25s ease, transform .25s ease;
    display: flex;
    flex-direction: column;
}
.masonry-item:hover { box-shadow: var(--cn-shadow-hover); transform: translateY(-2px); }
.masonry-item .media-frame { aspect-ratio: 16 / 10; position: relative; }
.masonry-item .media-frame img { width: 100%; height: 100%; object-fit: cover; }
.masonry-large .media-frame { aspect-ratio: 16 / 9; }
.masonry-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.masonry-item .post-card-title {
    font-size: var(--cat-font-size, var(--cn-card-size));
    font-weight: var(--cat-font-weight, 700);
    line-height: 1.4;
}
.masonry-large .post-excerpt { margin-top: 8px; font-size: 13px; color: var(--cn-body); line-height: 1.6; }
.masonry-small .post-excerpt { display: none; }
.masonry-item .post-meta { margin-top: auto; padding-top: 8px; }

@media (max-width: 768px) {
    .masonry-grid { grid-template-columns: 1fr; }
    .masonry-large .media-frame { aspect-ratio: 16 / 10; }
}

@media (max-width: 560px) {
    .masonry-grid { gap: 12px; }
    .masonry-body { padding: 12px 14px 14px; }
}

/* ============================================================
   15c. MAGAZINE HERO (Girls exclusive: cover + asymmetric mosaic)
   ============================================================ */
.magazine-hero { display: flex; flex-direction: column; gap: 24px; }

/* Full-width cover story */
.magazine-cover {
    position: relative;
    border-radius: var(--cn-radius);
    overflow: hidden;
    box-shadow: var(--cn-shadow);
    background: var(--cn-card);
    min-height: 420px;
    display: flex;
    flex-direction: column;
}
.magazine-cover .media-frame {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.magazine-cover .media-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.25,.46,.45,.94);
}
.magazine-cover:hover .media-frame img { transform: scale(1.04); }
.magazine-cover .media-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(15,15,15,.78) 100%);
    z-index: 1;
}
.magazine-cover .media-frame::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--cat-accent) 0%, transparent 50%);
    opacity: 0.08;
    z-index: 1;
    pointer-events: none;
}
.magazine-cover .cat-badge { position: absolute; top: 16px; left: 16px; z-index: 3; background: var(--cat-accent); }
.magazine-cover-content {
    position: relative;
    z-index: 2;
    margin-top: auto;
    padding: 28px 32px 32px;
    color: #fff;
}
.magazine-cover-content .post-card-title {
    font-size: clamp(28px, 3.5vw, 42px);
    font-weight: var(--cat-font-weight, 900);
    line-height: 1.15;
    margin: 0 0 14px;
    text-shadow: 0 2px 12px rgba(0,0,0,.45);
}
.magazine-cover-content .post-card-title a { color: #fff; }
.magazine-cover-content .post-card-title a:hover { color: var(--cat-accent); }
.magazine-cover-content .post-excerpt {
    font-size: 17px;
    line-height: 1.65;
    margin: 0 0 18px;
    opacity: .95;
    max-width: 90%;
    text-shadow: 0 1px 6px rgba(0,0,0,.35);
}
.magazine-cover-content .meta-date {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .5px;
    text-transform: uppercase;
    opacity: .85;
}

/* Asymmetric mosaic grid */
.magazine-mosaic {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, minmax(220px, auto));
    gap: 16px;
}
.mosaic-item {
    position: relative;
    background: var(--cn-card);
    border: 1px solid var(--cn-border);
    border-radius: var(--cn-radius);
    overflow: hidden;
    box-shadow: var(--cn-shadow);
    transition: box-shadow .25s ease, transform .25s ease;
    display: flex;
    flex-direction: column;
}
.mosaic-item:hover { box-shadow: var(--cn-shadow-hover); transform: translateY(-3px); }
.mosaic-item .media-frame {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}
.mosaic-item .media-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.mosaic-item:hover .media-frame img { transform: scale(1.05); }
.mosaic-item .cat-badge { position: absolute; top: 12px; left: 12px; z-index: 2; }
.mosaic-content { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.mosaic-large { grid-column: span 1; }
.mosaic-large .mosaic-content .post-card-title {
    font-size: calc(var(--cat-font-size, var(--cn-card-size)) + 3px);
    font-weight: var(--cat-font-weight, 700);
    line-height: 1.35;
}
.mosaic-large .post-excerpt { margin-top: 8px; font-size: 13.5px; color: var(--cn-body); line-height: 1.6; }
.mosaic-small .post-excerpt { display: none; }
.mosaic-small .post-card-title {
    font-size: var(--cat-font-size, var(--cn-card-size));
    font-weight: var(--cat-font-weight, 700);
    line-height: 1.4;
}
.mosaic-content .post-meta { margin-top: auto; padding-top: 8px; }

/* Specific mosaic positions: first 2 large, last 2 small */
.magazine-mosaic .mosaic-item:nth-child(1) { grid-column: 1 / 2; grid-row: 1 / 2; }
.magazine-mosaic .mosaic-item:nth-child(2) { grid-column: 2 / 3; grid-row: 1 / 2; }
.magazine-mosaic .mosaic-item:nth-child(3) { grid-column: 1 / 2; grid-row: 2 / 3; }
.magazine-mosaic .mosaic-item:nth-child(4) { grid-column: 2 / 3; grid-row: 2 / 3; }

@media (max-width: 900px) {
    .magazine-cover { min-height: 360px; }
    .magazine-cover-content { padding: 24px 28px 28px; }
    .magazine-mosaic { grid-template-rows: repeat(2, minmax(200px, auto)); }
}

@media (max-width: 768px) {
    .magazine-hero { gap: 20px; }
    .magazine-cover { min-height: 320px; }
    .magazine-cover-content { padding: 20px 22px 22px; }
    .magazine-cover-content .post-card-title { font-size: clamp(24px, 5vw, 32px); }
    .magazine-cover-content .post-excerpt { font-size: 15px; }
    .magazine-mosaic {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 14px;
    }
    .magazine-mosaic .mosaic-item:nth-child(n) { grid-column: auto; grid-row: auto; }
    .mosaic-large .mosaic-content .post-card-title { font-size: calc(var(--cn-card-size) + 2px); }
}

@media (max-width: 560px) {
    .magazine-cover { min-height: 280px; }
    .magazine-cover-content { padding: 16px 18px 18px; }
    .magazine-cover-content .post-card-title { font-size: clamp(20px, 6vw, 26px); }
    .magazine-cover-content .post-excerpt { font-size: 13.5px; }
    .magazine-mosaic { gap: 10px; }
    .mosaic-content { padding: 14px 15px 16px; }
    .mosaic-item .media-frame { aspect-ratio: 16 / 9; }
}

/* ============================================================
   16. LEGACY LISTS (compatibility: index/single/archive)
   ============================================================ */
.small-news-list { list-style: none; }
.small-news-list li {
    border-bottom: 1px dotted var(--cn-border);
    padding: 9px 0;
    font-size: 14px;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.small-news-list li::before { content: "»"; color: var(--cn-primary); font-weight: bold; flex-shrink: 0; }
.small-news-list li a { color: var(--cn-heading); }
.small-news-list li a:hover { color: var(--cn-primary); }

.trending-list { list-style: none; counter-reset: trend; }
.trending-list li {
    counter-increment: trend;
    padding: 11px 10px 11px 36px;
    border-bottom: 1px solid var(--cn-border);
    position: relative;
    font-size: 14px;
    line-height: 1.5;
}
.trending-list li::before {
    content: counter(trend);
    position: absolute;
    left: 6px; top: 12px;
    background: var(--cn-primary);
    color: #fff;
    width: 22px; height: 22px;
    text-align: center;
    line-height: 22px;
    font-size: 11.5px;
    font-weight: bold;
    border-radius: 50%;
}
.trending-list li a { color: var(--cn-heading); }
.trending-list li a:hover { color: var(--cn-primary); }

.horiz-news {
    display: flex;
    gap: 12px;
    border-bottom: 1px dotted var(--cn-border);
    padding: 10px 0;
    align-items: flex-start;
}
.horiz-news img {
    width: 100px; height: 70px;
    object-fit: cover;
    flex-shrink: 0;
    background: #ccc;
    border-radius: 4px;
}
.horiz-news .hn-text h3 { font-size: 14px; font-weight: 700; color: var(--cn-heading); }
.horiz-news .hn-text h3 a { color: var(--cn-heading); }
.horiz-news .hn-text h3 a:hover { color: var(--cn-primary); }

.news-item {
    background: var(--cn-card);
    border: 1px solid var(--cn-border);
    border-radius: var(--cn-radius);
    padding: 10px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .2s ease;
}
.news-item:hover { transform: translateY(-2px); box-shadow: var(--cn-shadow-hover); }
.news-item img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    display: block;
    border-radius: 4px;
}
.news-item h3 { font-size: 14px; font-weight: 700; color: var(--cn-heading); margin-top: 8px; }
.news-item h3 a { color: var(--cn-heading); }
.news-item h3 a:hover { color: var(--cn-primary); }
.news-item p { font-size: 12.5px; color: var(--cn-body); margin-top: 5px; line-height: 1.5; }
.news-item .date { font-size: 11.5px; color: var(--cn-muted); margin-top: 5px; }

.featured-box {
    background: var(--cn-card);
    border: 1px solid var(--cn-border);
    border-radius: var(--cn-radius);
    padding: 10px;
    margin-bottom: 15px;
    overflow: hidden;
}
.featured-box img {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    display: block;
    border-radius: 4px;
    margin-bottom: 10px;
}
.featured-box h2 { font-size: 18px; font-weight: 800; color: var(--cn-heading); line-height: 1.4; }
.featured-box h2 a { color: var(--cn-heading); }
.featured-box h2 a:hover { color: var(--cn-primary); }
.featured-box p { font-size: 13px; color: var(--cn-body); margin-top: 8px; line-height: 1.6; }
.featured-box .date { font-size: 12px; color: var(--cn-muted); }

.two-col { display: flex; gap: 20px; }
.two-col > div { flex: 1; min-width: 0; }
.three-col { display: flex; gap: 20px; }
.three-col > div { flex: 1; min-width: 0; }
.cat-featured-side { flex: 1.2 !important; display: flex; flex-direction: column; gap: 10px; }
.cat-list-side { flex: 1 !important; }

.section-body { background: var(--cn-card); border: 1px solid var(--cn-border); border-radius: var(--cn-radius); padding: 16px 18px; }

/* ============================================================
   17. SIDEBAR
   ============================================================ */
.sidebar-box {
    background: var(--cn-card);
    border: 1px solid var(--cn-border);
    border-radius: var(--cn-radius);
    margin-bottom: 22px;
    overflow: hidden;
    box-shadow: var(--cn-shadow);
}
.sb-header {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 13px 16px;
    border-bottom: 1px solid var(--cn-border);
    font-size: 15px;
    font-weight: 800;
    color: var(--cn-heading);
}
.sb-header::before {
    content: "";
    width: 4px;
    height: 16px;
    background: var(--cn-primary);
    border-radius: 2px;
    flex-shrink: 0;
}
.sb-content { padding: 8px 16px 14px; }

/* Social follow */
.social-follow {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px;
    padding-top: 8px;
}
.social-follow a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 6px;
    border-radius: 6px;
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    transition: opacity .2s ease, transform .2s ease;
}
.social-follow a:hover { opacity: .85; transform: translateY(-1px); color: #fff; }

/* Popular posts */
.sb-popular { list-style: none; padding-top: 4px; }
.sb-popular li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--cn-border);
}
.sb-popular li:last-child { border-bottom: none; padding-bottom: 0; }
.sb-popular .num-badge { width: 24px; height: 24px; font-size: 12px; }
.sb-popular .media-frame {
    width: 66px;
    aspect-ratio: 4 / 3;
    flex-shrink: 0;
    border-radius: 6px;
}
.sb-popular-text { flex: 1; min-width: 0; }
.sb-popular h4 {
    font-size: var(--cat-font-size, var(--cn-small-size));
    font-weight: var(--cat-font-weight, 700);
    line-height: 1.45;
    margin: 0;
}
.sb-popular h4 a { color: var(--cn-heading); }
.sb-popular h4 a:hover { color: var(--cat-accent, var(--cn-primary)); }
.sb-popular .post-meta { margin-top: 5px; }

/* Categories */
.sb-cats { list-style: none; padding-top: 4px; }
.sb-cats li { border-bottom: 1px solid var(--cn-border); }
.sb-cats li:last-child { border-bottom: none; }
.sb-cats a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 11px 4px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--cn-heading);
}
.sb-cats a:hover { color: var(--cn-primary); }
.sb-cats .count {
    background: var(--cn-bg);
    color: var(--cn-muted);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
    flex-shrink: 0;
}

/* Newsletter */
.newsletter-note { font-size: 13px; color: var(--cn-body); line-height: 1.6; margin: 0 0 12px; padding-top: 8px; }
.newsletter-form { display: flex; gap: 8px; padding-top: 6px; }
.newsletter-form input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--cn-border);
    border-radius: 6px;
    padding: 10px 13px;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--cn-heading);
    outline: none;
    transition: border-color .2s ease;
}
.newsletter-form input:focus { border-color: var(--cn-primary); }
.newsletter-form button {
    background: var(--cn-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-family: inherit;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: background .2s ease;
}
.newsletter-form button:hover { background: var(--cn-primary-dark); }
.newsletter-success {
    background: #EFF7EF;
    border: 1px solid #CDE5CD;
    color: #2E7D32;
    font-size: 13px;
    line-height: 1.6;
    padding: 11px 13px;
    border-radius: 6px;
    margin: 8px 0 0;
}

/* Generic WP widgets inside sidebar */
.sidebar-box ul { list-style: none; }
.sidebar-box .textwidget { font-size: 13.5px; line-height: 1.7; }
.sidebar-box select,
.sidebar-box input[type="text"],
.sidebar-box input[type="email"],
.sidebar-box input[type="search"] {
    width: 100%;
    border: 1px solid var(--cn-border);
    border-radius: 6px;
    padding: 9px 12px;
    font-family: inherit;
    font-size: 13.5px;
}
.sidebar-box .wp-block-search .wp-block-search__button {
    background: var(--cn-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
}
.sidebar-box a { color: var(--cn-heading); }
.sidebar-box a:hover { color: var(--cn-primary); }

/* ============================================================
   18. PAGINATION
   ============================================================ */
.nav-links {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 18px;
}
.nav-links .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    background: var(--cn-card);
    border: 1px solid var(--cn-border);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--cn-heading);
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.nav-links .page-numbers:hover { border-color: var(--cn-primary); color: var(--cn-primary); }
.nav-links .page-numbers.current {
    background: var(--cn-primary);
    border-color: var(--cn-primary);
    color: #fff;
}

/* ============================================================
   20. FOOTER
   ============================================================ */
.site-footer {
    background: #141414;
    color: #A6A6A6;
    margin-top: 40px;
    padding-top: 48px;
    font-size: 13.5px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.25fr 1fr 1fr 1fr;
    gap: 34px;
    padding-bottom: 40px;
}
.footer-logo {
    font-size: 26px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .3px;
    line-height: 1.1;
}
.footer-logo-img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #2A2A2A;
}
.footer-logo-hi { color: var(--cn-accent); }
.footer-about {
    font-size: 13px;
    line-height: 1.75;
    color: var(--cn-footer-text, #9C9C9C);
    margin: 14px 0 0;
}
.footer-social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.footer-social a {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--cn-footer-bg, #232323);
    color: var(--cn-footer-text, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease;
}
.footer-social a:hover { background: var(--cn-primary); color: #fff; }

.footer-col h4 {
    color: var(--cn-footer-heading, #fff);
    font-size: 15px;
    font-weight: 800;
    margin: 0 0 16px;
    padding-bottom: 11px;
    border-bottom: 1px solid var(--cn-footer-border, #2A2A2A);
    position: relative;
}
.footer-col h4::after {
    content: "";
    position: absolute;
    left: 0; bottom: -1px;
    width: 36px; height: 2px;
    background: var(--cn-primary);
}
.footer-col ul { list-style: none; }
.footer-col ul li { padding: 5px 0; }
.footer-col ul li a {
    color: var(--cn-footer-link, #A6A6A6);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.footer-col ul li a::before {
    content: "";
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--cn-primary);
    flex-shrink: 0;
}
.footer-col ul li a:hover { color: var(--cn-footer-link-hover, #fff); }

.footer-newsletter { display: flex; gap: 8px; margin-top: 6px; }
.footer-newsletter input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--cn-footer-border, #333);
    background: var(--cn-footer-bg, #1E1E1E);
    color: var(--cn-footer-text, #eee);
    border-radius: 6px;
    padding: 10px 13px;
    font-size: 13.5px;
    font-family: inherit;
    outline: none;
    transition: border-color .2s ease;
}
.footer-newsletter input:focus { border-color: var(--cn-primary); }
.footer-newsletter input::placeholder { color: var(--cn-footer-text, #6A6A6A); opacity: 0.6; }
.footer-newsletter button {
    background: var(--cn-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 15px;
    font-family: inherit;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: background .2s ease;
}
.footer-newsletter button:hover { background: var(--cn-primary-dark); }

.footer-bottom {
    background: var(--cn-footer-bottom-bg, #0E0E0E);
    border-top: 1px solid var(--cn-footer-border, #222);
    padding: 17px 0;
    font-size: 12.5px;
    color: var(--cn-footer-text, #8A8A8A);
}
.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.footer-bottom-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-bottom a { color: var(--cn-footer-link, #8A8A8A); }
.footer-bottom a:hover { color: var(--cn-footer-link-hover, #fff); }

/* ============================================================
   21. SCROLL TO TOP
   ============================================================ */
#cn-scroll-top {
    position: fixed;
    bottom: 24px; right: 24px;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--cn-primary);
    color: #fff;
    border: none;
    font-size: 18px;
    font-family: inherit;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
    transition: background .2s ease, transform .2s ease;
}
#cn-scroll-top:hover { background: var(--cn-primary-dark); transform: translateY(-2px); }

/* ============================================================
   22. AD SLOTS
   ============================================================ */
.cn-ad-wrap { margin: 26px 0; text-align: center; clear: both; }

/* ============================================================
   23. RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .homepage-grid, .content-area { grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }
    .header-search { width: 280px; }
    .card-grid { grid-template-columns: repeat(2, 1fr); }
    .image-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .hero-grid { grid-template-columns: 1fr; }
    .hero-side { flex-direction: row; flex-wrap: wrap; gap: 0 20px; }
    .hero-item { flex: 1 1 45%; }
    .num-split { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .main-nav { box-shadow: none; }
    .nav-toggle { display: flex; order: 2; }
    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        border-top: 1px solid var(--cn-border);
        padding: 8px 0 12px;
        max-height: calc(100vh - 140px);
        overflow-y: auto;
    }
    .nav-menu.open { display: flex; }
    .nav-menu-close {
        display: flex;
        align-items: center;
        justify-content: center;
        align-self: flex-end;
        gap: 6px;
        background: none;
        border: none;
        color: var(--cn-muted);
        font-size: 13px;
        font-weight: 700;
        font-family: inherit;
        cursor: pointer;
        padding: 10px 12px;
    }
    .nav-menu-close:hover { color: var(--cn-primary); }
    .brand { margin-right: 0; }
    .nav-menu > li > a {
        padding: 12px 6px;
        border-bottom: 1px solid var(--cn-border);
        margin-bottom: 0;
        justify-content: space-between;
    }
    .nav-menu .current-menu-item > a,
    .nav-menu .current-menu-ancestor > a { border-bottom: 1px solid var(--cn-border); }
    .nav-menu li ul {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-left: 2px solid var(--cn-border);
        border-radius: 0;
        padding: 0 0 0 14px;
        margin: 0 6px;
        display: none;
    }
    .nav-menu li.open > ul { display: block; }
    .nav-menu li ul a { padding: 9px 6px; }
    .nav-menu li ul li ul { padding-left: 12px; }
    .header-inner { flex-wrap: wrap; }
    .header-search { width: 100%; order: 3; }
    .featured-split { grid-template-columns: 1fr; }
    .list-rows-item .media-frame { width: 110px; }
}

@media (max-width: 768px) {
    .homepage-grid, .content-area { grid-template-columns: 1fr; gap: 0; padding: 16px 0 24px; }
    .right-col { margin-top: 30px; }
    .hero-item { flex: 1 1 100%; }
    .hero-item .media-frame { width: 104px; }
    .hero-feature .post-card-title { font-size: calc(var(--cn-featured-size) - 3px); }
    .sec-title, .section-header { font-size: calc(var(--cn-section-size) - 2px); }
    .container { padding: 0 14px; }
    .card-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .image-grid { grid-template-columns: repeat(2, 1fr); }
    .overlay-card { height: 170px; }
    .site-logo { font-size: calc(var(--cn-logo-size) - 8px); gap: 10px; }
    .site-logo-img { width: 42px; height: 42px; border-radius: 50%; }
    .site-tagline { font-size: 11px; margin-left: 52px; }
}

@media (max-width: 560px) {
    .card-grid { grid-template-columns: 1fr; }
    .top-links { display: none; }
    .top-bar-inner { justify-content: center; }
    .site-logo { font-size: calc(var(--cn-logo-size) - 12px); gap: 9px; }
    .site-logo-img { width: 36px; height: 36px; border-radius: 50%; }
    .site-logo-text { gap: 6px; }
    .site-tagline { margin-left: 45px; }
    .list-rows-item { gap: 12px; }
    .list-rows-item .media-frame { width: 96px; }
    .list-rows .post-excerpt { display: none; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .footer-bottom-inner { justify-content: center; text-align: center; }
    .newsletter-form { flex-direction: column; }
    .newsletter-form button { width: 100%; }
    .footer-newsletter { flex-direction: column; }
    .footer-newsletter button { width: 100%; }
    .image-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
    .overlay-card { height: 148px; }
    .overlay-title { font-size: 12px; }
    .trending-inner { padding: 8px 14px; }
    .ticker-item { font-size: 12px; }
    .ticker-dot { margin: 0 9px; }
    .num-item .media-frame { width: 60px; }
    .hero-item h4 { font-size: calc(var(--cn-small-size) - 0.5px); }
    .search-form .search-submit::before { content: "Go"; }
}

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

/* ============================================================
   24. DEFAULT POST LISTS (Archive / Search / Blog)
   ============================================================ */
.page-header { padding: 0 0 12px; margin-bottom: 16px; border-bottom: 2px solid var(--cn-primary); }
.page-title { font-size: 24px; font-weight: 800; margin: 0 0 4px; display: inline; color: var(--cn-heading); }
.page-count { font-size: 12px; color: var(--cn-muted); margin-left: 10px; }
.archive-description { margin-top: 10px; padding: 10px 14px; background: #fff8f8; border-left: 4px solid var(--cn-primary); font-size: 13px; color: #555; }
.posts-list { display: flex; flex-direction: column; gap: 0; }
.posts-list .entry {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid var(--cn-border);
    background: var(--cn-card);
}
.entry-thumb { flex-shrink: 0; width: 220px; }
.entry-thumb img { width: 100%; height: 130px; object-fit: cover; border-radius: 6px; display: block; }
.entry-body { flex: 1; min-width: 0; }
.entry-title { font-size: 18px; font-weight: 700; line-height: 1.4; margin: 0 0 6px; font-family: var(--cn-font-heading); }
.entry-title a { color: var(--cn-heading); }
.entry-title a:hover { color: var(--cn-primary); }
.entry-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--cn-muted); margin-bottom: 8px; }
.entry-cats a { color: var(--cn-primary); font-weight: 600; }
.entry-summary { font-size: 14px; color: #666; line-height: 1.6; margin-bottom: 8px; }
.entry-read-more { display: inline-block; font-size: 13px; font-weight: 700; color: var(--cn-primary); }
.entry-read-more:hover { color: var(--cn-primary-dark); }
.no-posts { padding: 30px 0; text-align: center; color: var(--cn-muted); }
.no-results { text-align: center; padding: 40px 20px; }
.no-results-form { max-width: 400px; margin: 16px auto 0; display: flex; gap: 8px; }
.no-results-form input { flex: 1; padding: 10px 14px; border: 2px solid var(--cn-primary); border-radius: 6px; font-size: 14px; outline: none; }
.no-results-form button { background: var(--cn-primary); color: #fff; border: none; padding: 10px 18px; border-radius: 6px; font-weight: 700; cursor: pointer; }

/* ============================================================
   25. SINGLE POST (content styled by Gutenberg blocks)
   ============================================================ */
.single-post-card { background: var(--cn-card); border-radius: var(--cn-radius); box-shadow: var(--cn-shadow); padding: 24px; }
.single-breadcrumb { font-size: 12px; color: var(--cn-muted); margin-bottom: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.single-breadcrumb a { color: var(--cn-primary); }
.single-breadcrumb .bc-sep { color: #bbb; }
.single-breadcrumb .bc-current { color: #666; }
.single-cats { margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.single-post-card .entry-title { font-size: 28px; font-weight: 900; line-height: 1.3; margin: 0 0 12px; font-family: var(--cn-font-heading); color: var(--cn-heading); }
.single-post-card .entry-meta { padding-bottom: 12px; border-bottom: 2px solid var(--cn-border); }
.single-featured { margin: 16px 0; }
.single-featured-img { width: 100%; height: auto; border-radius: 6px; display: block; }
.single-featured-caption { font-size: 11px; color: var(--cn-muted); text-align: center; margin: 6px 0 0; }
.single-tags { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--cn-border); }
.single-tags-label { font-size: 13px; font-weight: 700; margin-right: 8px; }
.single-tag { display: inline-block; background: #f5f5f5; color: #555; font-size: 12px; padding: 3px 10px; border-radius: 20px; margin: 3px; border: 1px solid #e0e0e0; }
.single-tag:hover { background: var(--cn-primary); color: #fff; border-color: var(--cn-primary); }
.single-share { margin-top: 18px; padding: 14px; background: #f9f9f9; border-radius: 6px; }
.single-share-label { font-size: 14px; font-weight: 700; display: block; margin-bottom: 10px; }
.single-share-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn { color: #fff; padding: 8px 16px; border-radius: 4px; font-size: 13px; font-weight: 700; }
.share-btn:hover { color: #fff; opacity: .85; }
.share-fb { background: #3b5998; }
.share-tw { background: #111; }
.share-wa { background: #25d366; }
.share-tg { background: #0088cc; }
.share-em { background: #ea4335; }
.related-section { margin-top: 20px; }

/* ============================================================
   26. ENTRY CONTENT (Gutenberg block base — blocks control styling)
   ============================================================ */
.entry-content { font-size: 16px; line-height: 1.8; color: #2c2c2c; word-wrap: break-word; }
.entry-content > * { max-width: 100%; }
.entry-content p { margin: 0 0 1.2em; }
.entry-content h2, .entry-content h3, .entry-content h4,
.entry-content h5, .entry-content h6 { margin: 1.4em 0 .6em; }
.entry-content img { height: auto; }
.entry-content .alignleft { float: left; margin: .4em 1.5em 1em 0; }
.entry-content .alignright { float: right; margin: .4em 0 1em 1.5em; }
.entry-content .aligncenter { display: block; margin-left: auto; margin-right: auto; }
.entry-content .alignwide, .entry-content .alignfull { margin-left: 0; margin-right: 0; }
.entry-content .wp-caption { max-width: 100%; }
.entry-content .wp-caption img { height: auto; }
.entry-content blockquote { border-left: 4px solid var(--cn-primary); margin: 1.5em 0; padding: .6em 1.2em; background: #fafafa; font-style: italic; }
.entry-content ul, .entry-content ol { padding-left: 1.5em; margin: 0 0 1.2em; }
.entry-content li { margin-bottom: .4em; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; }
.entry-content th, .entry-content td { border: 1px solid var(--cn-border); padding: 8px 10px; }
.entry-content pre { background: #f5f5f5; padding: 14px; border-radius: 6px; overflow-x: auto; }
.entry-content code { background: #f5f5f5; padding: 2px 6px; border-radius: 3px; font-size: .9em; }
.entry-content iframe, .entry-content embed, .entry-content video { max-width: 100%; }
.entry-content .wp-block-embed iframe { max-width: 100%; }
.entry-content .wp-block-gallery { display: flex; flex-wrap: wrap; gap: 12px; list-style: none; padding: 0; }
.entry-content .wp-block-gallery .blocks-gallery-item { list-style: none; }
.entry-content .wp-block-image img { height: auto; }

@media (max-width: 768px) {
    .posts-list .entry { flex-direction: column; }
    .entry-thumb { width: 100%; }
    .entry-thumb img { height: 180px; }
    .single-post-card { padding: 16px; }
    .entry-title { font-size: 22px; }
}
