/*
Theme Name: JayRespawns
Theme URI: https://jayrespawns.com
Author: Jay
Author URI: https://jayrespawns.com
Description: A custom gaming news theme for JayRespawns.com — built with a split hero, sticky nav, breaking news ticker, 2-column post grid, full Customizer controls, dark mode, and a sidebar on single posts.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: jayrespawns
Tags: news, magazine, gaming, blog, custom-colors, custom-logo, featured-images, sticky-post, two-columns, dark-mode
*/

/* ============================================================
   CSS CUSTOM PROPERTIES (set by Customizer via wp_add_inline_style)
   ============================================================ */
:root {
    --color-primary:     #0f0f0f;
    --color-accent:      #e8ff00;
    --color-bg:          #ffffff;
    --color-surface:     #f5f5f5;
    --color-text:        #1a1a1a;
    --color-text-muted:  #6b6b6b;
    --color-border:      #e0e0e0;
    --color-header-bg:   #0f0f0f;
    --color-header-text: #ffffff;
    --color-ticker-bg:   #e8ff00;
    --color-ticker-text: #0f0f0f;

    --font-heading: 'Barlow Condensed', sans-serif;
    --font-body:    'Inter', sans-serif;

    --radius: 4px;
    --shadow: 0 2px 12px rgba(0,0,0,.10);
    --shadow-hover: 0 6px 24px rgba(0,0,0,.18);
    --transition: 0.22s ease;
    --container: 1280px;
    --sidebar-w: 300px;
}

/* Dark mode — all colors now come from body.dark-mode CSS vars
   set by the Customizer. This block just handles structural tweaks
   that aren't color-based. */
body.dark-mode {
    color-scheme: dark;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-bg);
    transition: background var(--transition), color var(--transition);
}

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

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================
   FIX 2: Visually hidden homepage H1 — accessible to crawlers
   and screen readers, invisible to sighted users
   ============================================================ */
.site-h1-seo {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ============================================================
   BREAKING NEWS TICKER
   ============================================================ */
#jr-ticker {
    background: var(--color-ticker-bg);
    color: var(--color-ticker-text);
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    height: 34px;
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    z-index: 200;
}

.ticker-label {
    flex-shrink: 0;
    background: var(--color-primary);
    color: var(--color-accent);
    padding: 0 16px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    white-space: nowrap;
}

.ticker-label svg { width: 14px; height: 14px; }

.ticker-track-wrap {
    flex: 1;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: center;
}

.ticker-track {
    display: flex;
    gap: 0;
    white-space: nowrap;
    animation: ticker-scroll 40s linear infinite;
    will-change: transform;
}

.ticker-track:hover { animation-play-state: paused; }

.ticker-item {
    padding: 0 32px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: opacity var(--transition);
}

.ticker-item:hover { opacity: .75; }
.ticker-item::after {
    content: '●';
    font-size: 7px;
    opacity: .4;
}

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

/* ============================================================
   HEADER
   ============================================================ */
#jr-header {
    background: var(--color-header-bg);
    color: var(--color-header-text);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 16px rgba(0,0,0,.3);
    transition: top var(--transition);
}

/* When ticker is visible, the header stickiness starts just below it */
.header-inner {
    display: flex;
    align-items: center;
    height: 60px;
    gap: 24px;
}

/* Logo */
.site-branding { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.site-branding .custom-logo { height: 38px; width: auto; }

.site-title {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.01em;
    text-transform: uppercase;
    color: var(--color-header-text);
    line-height: 1;
}

.site-title span { color: var(--color-accent); }

/* Nav */
#jr-nav { flex: 1; }

#jr-nav ul {
    display: flex;
    gap: 2px;
    align-items: center;
}

#jr-nav ul li a {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: rgba(255,255,255,.8);
    padding: 8px 12px;
    border-radius: var(--radius);
    transition: background var(--transition), color var(--transition);
    display: block;
}

#jr-nav ul li a:hover,
#jr-nav ul li.current-menu-item a {
    background: rgba(255,255,255,.08);
    color: var(--color-accent);
}

/* Dropdown */
#jr-nav ul li { position: relative; }

#jr-nav ul li ul {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--color-primary);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius);
    min-width: 180px;
    flex-direction: column;
    gap: 0;
    display: none;
    box-shadow: var(--shadow-hover);
    z-index: 50;
}

#jr-nav ul li:hover > ul { display: flex; }

#jr-nav ul li ul li a {
    padding: 10px 14px;
    border-radius: 0;
    font-size: 13px;
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.btn-search {
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,255,255,.7);
    padding: 6px;
    border-radius: var(--radius);
    transition: color var(--transition), background var(--transition);
    display: flex;
    align-items: center;
}

.btn-search:hover { color: var(--color-accent); background: rgba(255,255,255,.08); }
.btn-search svg { width: 18px; height: 18px; }

/* Dark mode toggle */
.btn-darkmode {
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 20px;
    cursor: pointer;
    width: 44px;
    height: 24px;
    position: relative;
    transition: background var(--transition);
    flex-shrink: 0;
}

.btn-darkmode::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255,255,255,.6);
    transition: transform var(--transition), background var(--transition);
}

body.dark-mode .btn-darkmode::after {
    transform: translateX(20px);
    background: var(--color-accent);
}

/* Mobile hamburger */
.btn-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    padding: 6px;
}

.btn-menu svg { width: 22px; height: 22px; }

/* Search overlay */
#jr-search-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    z-index: 999;
    align-items: flex-start;
    justify-content: center;
    padding-top: 140px;
}

#jr-search-overlay.open { display: flex; }

.search-overlay-inner { width: 100%; max-width: 660px; padding: 0 20px; }

.search-overlay-inner form {
    display: flex;
    gap: 0;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,.5);
}

.search-overlay-inner input[type="search"] {
    flex: 1;
    padding: 18px 22px;
    font-size: 20px;
    font-family: var(--font-body);
    border: none;
    outline: none;
    background: white;
    color: #111;
}

.search-overlay-inner button[type="submit"] {
    background: var(--color-accent);
    color: var(--color-primary);
    border: none;
    padding: 0 24px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .05em;
    text-transform: uppercase;
    cursor: pointer;
}

.search-close {
    margin-top: 16px;
    text-align: center;
    color: rgba(255,255,255,.5);
    font-size: 13px;
    cursor: pointer;
}

/* ============================================================
   HERO — SPLIT LAYOUT
   ============================================================ */
#jr-hero {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 28px 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 20px;
    align-items: start;
}

/* Main featured post */
.hero-main {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--color-primary);
    aspect-ratio: 16/9;
    cursor: pointer;
}

.hero-main:hover .hero-main-img { transform: scale(1.04); }

.hero-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    opacity: .85;
}

.hero-main-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.2) 55%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 28px;
}

.hero-category-badge {
    display: inline-block;
    background: var(--color-accent);
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 2px;
    margin-bottom: 10px;
    width: fit-content;
}

.hero-main-title {
    font-family: var(--font-heading);
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-bottom: 10px;
    text-shadow: 0 2px 8px rgba(0,0,0,.4);
}

.hero-main-title a { color: inherit; }
.hero-main-title a:hover { color: var(--color-accent); }

.hero-meta {
    font-size: 12px;
    color: rgba(255,255,255,.65);
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Side posts */
.hero-side {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hero-side-post {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
    cursor: pointer;
}

.hero-side-post:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.hero-side-thumb {
    width: 110px;
    height: 80px;
    object-fit: cover;
    flex-shrink: 0;
}

.hero-side-thumb-placeholder {
    width: 110px;
    height: 80px;
    background: var(--color-surface);
    flex-shrink: 0;
}

.hero-side-body {
    padding: 10px 12px 10px 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
}

.hero-side-cat {
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--color-accent);
    background: var(--color-primary);
    display: inline-block;
    padding: 2px 7px;
    border-radius: 2px;
    width: fit-content;
}

.hero-side-title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text);
}

.hero-side-title a { color: inherit; }
.hero-side-title a:hover { color: var(--color-accent); }

.hero-side-meta {
    font-size: 11px;
    color: var(--color-text-muted);
}

/* ============================================================
   CATEGORY TABS / SECTION FILTERS
   ============================================================ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-primary);
}

body.dark-mode .section-header { border-bottom-color: var(--color-accent); }

.section-title,
p.section-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0; /* reset browser p margin */
}

.section-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 22px;
    background: var(--color-accent);
    border-radius: 2px;
}

.section-link {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    transition: color var(--transition);
}

.section-link:hover { color: var(--color-accent); }

/* ============================================================
   MAIN LAYOUT — 2-col posts + sidebar
   ============================================================ */
#jr-main { padding: 36px 0 48px; }

.main-layout {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-w);
    gap: 32px;
    align-items: start;
}

/* ============================================================
   POST GRID — 2 columns
   ============================================================ */
.post-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

/* Post card */
.post-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.post-card-thumb-wrap {
    position: relative;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--color-surface);
}

.post-card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-card:hover .post-card-thumb { transform: scale(1.05); }

.post-card-cat {
    position: absolute;
    bottom: 8px;
    left: 10px;
    background: var(--color-accent);
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    padding: 3px 9px;
    border-radius: 2px;
}

.post-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.post-card-title {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text);
}

.post-card-title a { color: inherit; }
.post-card-title a:hover { color: var(--color-accent); }

.post-card-excerpt {
    font-size: 13.5px;
    color: var(--color-text-muted);
    line-height: 1.55;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--color-text-muted);
    margin-top: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--color-border);
}

.post-card-author { display: flex; align-items: center; gap: 5px; }
.post-card-author img { width: 20px; height: 20px; border-radius: 50%; }

/* Layout: list mode */
body.layout-list .post-grid {
    grid-template-columns: 1fr;
}

body.layout-list .post-card {
    flex-direction: row;
    max-height: 130px;
}

body.layout-list .post-card-thumb-wrap {
    width: 200px;
    flex-shrink: 0;
    aspect-ratio: auto;
    height: 130px;
}

body.layout-list .post-card-cat {
    position: static;
    display: inline-block;
    margin-bottom: 4px;
}

body.layout-list .post-card-excerpt { display: none; }

/* Layout: magazine mode (mixed) */
body.layout-magazine .post-grid {
    grid-template-columns: 1fr 1fr;
}

body.layout-magazine .post-grid .post-card:first-child {
    grid-column: 1 / -1;
    flex-direction: row;
}

body.layout-magazine .post-grid .post-card:first-child .post-card-thumb-wrap {
    width: 55%;
    flex-shrink: 0;
    aspect-ratio: auto;
}

body.layout-magazine .post-grid .post-card:first-child .post-card-title { font-size: 22px; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar { display: flex; flex-direction: column; gap: 28px; }

.sidebar-widget {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
}

.widget-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-accent);
    color: var(--color-text);
}

/* Recent posts in sidebar */
.sidebar-post-list { display: flex; flex-direction: column; gap: 14px; }

.sidebar-post {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 10px;
    align-items: center;
}

.sidebar-post-thumb {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 2px;
}

.sidebar-post-title {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text);
}

.sidebar-post-title a { color: inherit; }
.sidebar-post-title a:hover { color: var(--color-accent); }

.sidebar-post-date { font-size: 11px; color: var(--color-text-muted); margin-top: 3px; }

/* Category list */
.category-list { display: flex; flex-direction: column; gap: 8px; }

.category-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--color-text);
    padding: 6px 0;
    border-bottom: 1px solid var(--color-border);
    transition: color var(--transition);
}

.category-list li a:hover { color: var(--color-accent); }
.category-count {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 1px 8px;
    border-radius: 20px;
    font-size: 11px;
    color: var(--color-text-muted);
}

/* Ad placeholder */
.sidebar-ad {
    background: var(--color-surface);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius);
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 6px;
    color: var(--color-text-muted);
    font-size: 13px;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* ============================================================
   PAGINATION — forced horizontal row
   ============================================================ */
.jr-pagination {
    display: flex;
    flex-direction: row;      /* explicit: never vertical */
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 36px;
}

/* WordPress outputs plain <a> and <span> — target both */
.jr-pagination > a,
.jr-pagination > span,
.jr-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 6px;
    border-radius: var(--radius);
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    border: 1px solid var(--color-border);
    color: var(--color-text);
    transition: all var(--transition);
    white-space: nowrap;
}

.jr-pagination a:hover,
.jr-pagination a.page-numbers:hover       { background: var(--color-primary); color: var(--color-accent); border-color: var(--color-primary); }
.jr-pagination span.current,
.jr-pagination .page-numbers.current      { background: var(--ec-pagination-active, var(--color-accent)); color: var(--color-primary); border-color: var(--ec-pagination-active, var(--color-accent)); }
.jr-pagination .page-numbers.dots         { border-color: transparent; background: none; cursor: default; }

/* ============================================================
   IN-ARTICLE ADS
   ============================================================ */
.jr-ad-inline {
    margin: 24px auto;
    text-align: center;
    overflow: hidden;
    clear: both;
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.single-layout {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-w);
    gap: 32px;
    align-items: start;
    padding: 36px 0 48px;
}

.article-header { margin-bottom: 24px; }

.article-cats { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }

.article-cat-badge {
    background: var(--color-accent);
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 2px;
}

.article-title {
    font-family: var(--font-heading);
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -.01em;
    color: var(--color-text);
    margin-bottom: 14px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--color-text-muted);
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.article-meta strong { color: var(--color-text); }
.article-meta a:hover { color: var(--color-accent); }

.article-featured-img {
    width: 100%;
    border-radius: var(--radius);
    margin-bottom: 28px;
    aspect-ratio: 16/9;
    object-fit: cover;
}

/* Article body */
.article-content { font-size: 16.5px; line-height: 1.75; color: var(--color-text); }

.article-content h2 {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    margin: 32px 0 14px;
    color: var(--color-text);
    text-transform: uppercase;
    letter-spacing: .02em;
}

.article-content h3 {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    margin: 24px 0 10px;
    color: var(--color-text);
}

.article-content p { margin-bottom: 18px; }

.article-content a { color: var(--color-accent); border-bottom: 1px solid currentColor; }
body.dark-mode .article-content a { color: var(--color-accent); }

.article-content img { border-radius: var(--radius); margin: 20px 0; }

.article-content blockquote {
    border-left: 4px solid var(--color-accent);
    margin: 24px 0;
    padding: 14px 20px;
    background: var(--color-surface);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 18px;
    font-style: italic;
    color: var(--color-text);
}

.article-content ul,
.article-content ol {
    margin: 14px 0 14px 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.article-content ul { list-style: disc; }
.article-content ol { list-style: decimal; }

/* Tags */
.article-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}

.tag-pill {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    transition: all var(--transition);
    font-family: var(--font-heading);
    letter-spacing: .04em;
    text-transform: uppercase;
    font-size: 11px;
    font-weight: 600;
}

.tag-pill:hover { background: var(--color-primary); color: var(--color-accent); border-color: var(--color-primary); }

/* Related posts */
.related-posts { margin-top: 40px; }

/* ============================================================
   FOOTER
   ============================================================ */
#jr-footer {
    background: var(--color-primary);
    color: rgba(255,255,255,.7);
    padding: 48px 0 0;
}

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

.footer-brand .site-title { font-size: 28px; margin-bottom: 12px; }

.footer-brand p {
    font-size: 13.5px;
    line-height: 1.6;
    max-width: 280px;
    color: rgba(255,255,255,.5);
}

.footer-col h4 {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255,255,255,.9);
    margin-bottom: 16px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 8px; }

.footer-col ul li a {
    font-size: 13px;
    color: rgba(255,255,255,.5);
    transition: color var(--transition);
}

.footer-col ul li a:hover { color: var(--color-accent); }

.footer-bottom {
    padding: 18px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12.5px;
    color: rgba(255,255,255,.35);
}

/* ============================================================
   PAGE — ARCHIVE / CATEGORY
   ============================================================ */
.archive-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 32px 0;
    margin-bottom: 0;
}

.archive-title {
    font-family: var(--font-heading);
    font-size: 36px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -.01em;
    display: flex;
    align-items: center;
    gap: 12px;
}

.archive-title .cat-color-bar {
    width: 6px;
    height: 40px;
    background: var(--color-accent);
    border-radius: 3px;
}

.archive-desc { font-size: 14px; color: var(--color-text-muted); margin-top: 6px; }

/* ============================================================
   UTILITIES
   ============================================================ */
.screen-reader-text {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}

.no-thumbnail {
    background: var(--color-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-border);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1080px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    :root { --sidebar-w: 260px; }
}

@media (max-width: 860px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-side { flex-direction: row; flex-wrap: wrap; }
    .hero-side-post { flex: 1; min-width: 200px; }

    .main-layout,
    .single-layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }

    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
    .post-grid { grid-template-columns: 1fr; }
    #jr-nav { display: none; }
    #jr-nav.open {
        display: block;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--color-primary);
        border-top: 1px solid rgba(255,255,255,.08);
        padding: 12px 20px;
        z-index: 99;
    }
    #jr-nav.open ul { flex-direction: column; }
    #jr-nav.open ul li ul { position: static; display: flex; border: none; box-shadow: none; padding-left: 12px; }
    .btn-menu { display: flex; }
    .footer-grid { grid-template-columns: 1fr; }

    body.layout-list .post-card { max-height: none; flex-direction: column; }
    body.layout-list .post-card-thumb-wrap { width: 100%; height: auto; aspect-ratio: 16/9; }
    body.layout-magazine .post-grid .post-card:first-child { flex-direction: column; }
    body.layout-magazine .post-grid .post-card:first-child .post-card-thumb-wrap { width: 100%; }
}

/* ============================================================
   SHARE BUTTON OVERRIDES
   Covers Jetpack/Sharedaddy, AddToAny, Social Warfare,
   Sassy Social Share, and generic share button plugins.
   Forces a consistent small size regardless of plugin settings.
   ============================================================ */

/* ── Jetpack / Sharedaddy ─────────────────────────────────── */
.sharedaddy .sd-content ul li a.share-icon,
.sharedaddy .sd-content ul li a,
.sharedaddy .sd-button {
    width: auto !important;
    height: auto !important;
    padding: 5px 10px !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
}

.sharedaddy .sd-content ul li a svg,
.sharedaddy .sd-content ul li a img,
.sharedaddy .sd-button svg,
.sharedaddy .sd-button img {
    width: 14px !important;
    height: 14px !important;
}

/* ── AddToAny ─────────────────────────────────────────────── */
.a2a_kit a,
.a2a_button_facebook,
.a2a_button_twitter,
.a2a_button_x,
.a2a_button_reddit,
.a2a_button_whatsapp,
.a2a_dd {
    width: auto !important;
    height: auto !important;
    line-height: 1.4 !important;
    font-size: 12px !important;
    padding: 5px 10px !important;
}

.a2a_kit a img,
.a2a_kit a svg,
.a2a_kit span.a2a_svg {
    width: 14px !important;
    height: 14px !important;
}

/* ── Generic share icon/button patterns ───────────────────── */
.wp-block-jetpack-sharing-buttons a,
.jetpack-sharing-buttons__services-list a,
[class*="share-"] svg,
[class*="share-"] img,
[class*="sharedaddy"] svg,
[class*="sharedaddy"] img {
    width: 14px !important;
    height: 14px !important;
}

.jetpack-sharing-buttons__services-list a,
.wp-block-jetpack-sharing-buttons a {
    font-size: 12px !important;
    padding: 4px 10px !important;
    gap: 5px !important;
}

/* ── Social Warfare ───────────────────────────────────────── */
.swp_social_panel .nc_tweetContainer,
.swp_social_panel .swp_social_btn {
    min-width: 60px !important;
    height: 36px !important;
    font-size: 11px !important;
}

/* ── Sassy Social Share ───────────────────────────────────── */
.heateor_sss_sharing_container .heateor_sss_svg,
.heateor_sss_sharing_container img {
    width: 22px !important;
    height: 22px !important;
}

/* ============================================================
   AUTHOR BIO BOX
   ============================================================ */
.author-bio-box {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 16px;
    align-items: start;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-accent);
    border-radius: var(--radius);
    padding: 20px;
    margin: 32px 0;
}

.author-bio-avatar img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-border);
}

.author-bio-name {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.author-bio-name a {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--color-text);
}

.author-bio-name a:hover { color: var(--color-accent); }

.author-bio-role {
    font-size: 11px;
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    padding: 2px 8px;
    border-radius: 20px;
}

.author-bio-text {
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin: 0 0 10px;
}

.author-bio-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.author-bio-link {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--color-accent);
    background: var(--color-primary);
    padding: 4px 12px;
    border-radius: 2px;
    transition: opacity var(--transition);
}

.author-bio-link:hover { opacity: .75; color: var(--color-accent); }

@media (max-width: 480px) {
    .author-bio-box { grid-template-columns: 1fr; }
    .author-bio-avatar { display: none; }
}

/* ============================================================
   ARTICLE BREADCRUMB
   ============================================================ */
.article-breadcrumb {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.article-breadcrumb a {
    color: var(--color-text-muted);
    transition: color var(--transition);
}

.article-breadcrumb a:hover { color: var(--color-accent); }

.article-breadcrumb span[aria-current] {
    color: var(--color-text);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 240px;
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.jr-breadcrumbs {
    padding: 12px 0 0;
    margin-bottom: 20px;
}

.jr-breadcrumbs__list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 12px;
    font-family: var(--font-heading);
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.jr-breadcrumbs__item { display: flex; align-items: center; }

.jr-breadcrumbs__link {
    color: var(--color-text-muted);
    transition: color var(--transition);
}

.jr-breadcrumbs__link:hover { color: var(--color-accent); }

.jr-breadcrumbs__sep {
    color: var(--color-text-muted);
    margin: 0 6px;
    font-size: 14px;
    font-weight: 400;
}

.jr-breadcrumbs__current {
    color: var(--color-text);
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

/* ============================================================
   AUTHOR BIO CARD
   ============================================================ */
.jr-author-bio {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-accent);
    border-radius: var(--radius);
    padding: 24px;
    margin: 36px 0;
}

.author-bio-inner {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.author-bio-avatar { flex-shrink: 0; }

.author-avatar-img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-border);
}

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

.author-bio-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.author-bio-name {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--color-text);
    text-decoration: none;
}

.author-bio-name:hover { color: var(--color-accent); }

.author-bio-job {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    background: var(--color-border);
    padding: 2px 8px;
    border-radius: 2px;
}

.author-bio-desc {
    font-size: 14px;
    line-height: 1.65;
    color: var(--color-text-muted);
    margin: 0 0 12px;
}

.author-bio-link {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--color-accent);
    background: var(--color-primary);
    padding: 5px 12px;
    border-radius: var(--radius);
    display: inline-block;
    transition: opacity var(--transition);
}

.author-bio-link:hover { opacity: .8; color: var(--color-accent); }

/* Author job title inline in article meta */
.author-meta-job {
    font-size: 12px;
    color: var(--color-text-muted);
    font-style: italic;
}

@media (max-width: 480px) {
    .author-bio-inner { flex-direction: column; align-items: center; text-align: center; }
    .author-bio-header { justify-content: center; }
    .jr-breadcrumbs__current { max-width: 160px; }
}
