/*
Theme Name: GameDay
Theme URI: https://heartsyncmedia.com
Author: HeartSync Media
Description: Premium sports news theme — dark, fast, clean. Per-site team colors via Customizer.
Version: 2.2.2
Text Domain: gameday
*/

/* CUSTOM PROPERTIES */
:root {
    --gd-primary:      #e63946;
    --gd-primary-dark: #c1121f;
    --gd-secondary:    #1d3557;
    --gd-bg:           #0f1114;
    --gd-bg-card:      #181b20;
    --gd-bg-elevated:  #1e2228;
    --gd-text:         #e8e8e8;
    --gd-text-muted:   #8a8f98;
    --gd-text-dim:     #5a5f68;
    --gd-border:       #2a2e35;
    --gd-border-light: #353a42;
    --gd-success:      #06d6a0;
    --gd-warning:      #ffd166;
    --gd-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --gd-max:     1200px;
    --gd-content: 740px;
    --gd-sidebar: 320px;
    --gd-gap:     1.5rem;
    --gd-radius:  6px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--gd-font);
    line-height: 1.6;
    background: var(--gd-bg);
    color: var(--gd-text);
    min-height: 100vh;
}

a { color: var(--gd-primary); text-decoration: none; }
a:hover { color: #ff4d5a; }
img, video { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
.sr-only:focus {
    position: static; width: auto; height: auto; clip: auto;
    white-space: normal; padding: .5rem 1rem;
    background: var(--gd-primary); color: #fff; z-index: 9999;
}

/* READING PROGRESS BAR */
.reading-progress {
    position: fixed; top: 0; left: 0;
    width: 0; height: 3px;
    background: var(--gd-primary);
    z-index: 9999;
    transition: width .1s linear;
    pointer-events: none;
}

/* SCORES TICKER */
.scores-ticker {
    background: var(--gd-secondary);
    border-bottom: 1px solid var(--gd-border);
    overflow: hidden; height: 36px;
    display: flex; align-items: center;
    position: relative;
}
.ticker-label {
    flex-shrink: 0; padding: 0 .75rem;
    font-size: .65rem; font-weight: 800; letter-spacing: .1em;
    color: var(--gd-warning); text-transform: uppercase; white-space: nowrap;
    background: var(--gd-secondary); z-index: 2;
}
.ticker-track {
    display: flex; align-items: center; gap: 1.5rem;
    white-space: nowrap; overflow: hidden;
    flex: 1; position: relative;
}
.ticker-track-inner {
    display: flex; align-items: center; gap: 1.5rem;
    white-space: nowrap;
}
.ticker-track-inner.scrolling {
    animation: ticker-scroll var(--ticker-duration, 30s) linear infinite;
}
.ticker-track-inner:hover { animation-play-state: paused; }

.ticker-game {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .75rem; font-weight: 600;
    letter-spacing: .03em; color: #fff;
    padding: 0 .5rem;
    border-right: 1px solid rgba(255,255,255,.15);
}
.ticker-game:last-child { border-right: none; }
.ticker-game.live { color: var(--gd-success); }
.ticker-teams { color: #fff; }
.ticker-score { color: var(--gd-warning); font-weight: 700; }
.ticker-divider { opacity: .5; margin: 0 .15rem; }
.ticker-status { font-size: .6rem; color: rgba(255,255,255,.5); text-transform: uppercase; letter-spacing: .05em; }
.ticker-status.final { color: rgba(255,255,255,.4); }
.ticker-live-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--gd-success);
    animation: live-pulse 1.5s ease-in-out infinite;
    margin-right: .25rem;
}
.ticker-period { font-size: .6rem; color: var(--gd-success); font-weight: 700; }
.ticker-empty, .ticker-loading {
    font-size: .7rem; color: rgba(255,255,255,.4); padding: 0 1rem;
}
@keyframes ticker-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
@keyframes live-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .3; }
}

/* SITE HEADER — STICKY */
.site-header {
    position: sticky; top: 0; z-index: 900;
    background: var(--gd-bg-card);
    border-bottom: 1px solid var(--gd-border);
}
.header-inner {
    max-width: var(--gd-max); margin: 0 auto;
    padding: .75rem 1rem;
    display: flex; align-items: center;
    justify-content: space-between; gap: 1rem;
}
.site-brand { display: flex; align-items: center; gap: .625rem; }
.site-logo-mark {
    width: 40px; height: 40px;
    background: var(--gd-primary);
    border-radius: var(--gd-radius);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
}
.site-logo-landmark { width: 28px; height: 28px; color: #fff; }
.landmark-svg { width: 100%; height: 100%; }
.site-logo-initials { font-size: 1rem; font-weight: 800; color: #fff; letter-spacing: -.02em; }
.site-logo-img { height: 40px; width: auto; }
.site-brand-text { display: flex; flex-direction: column; line-height: 1; }
.site-brand-prefix { font-size: .75rem; font-weight: 700; letter-spacing: .1em; color: var(--gd-text-muted); }
.site-brand-city { font-size: 1.125rem; font-weight: 800; letter-spacing: -.02em; color: var(--gd-text); }

.header-meta { display: none; }
.header-date { display: flex; flex-direction: column; align-items: flex-end; gap: .1rem; }
.header-date-day { font-size: .65rem; font-weight: 600; letter-spacing: .08em; color: var(--gd-text-muted); text-transform: uppercase; }
.header-date-full { font-size: .75rem; font-weight: 500; color: var(--gd-text); }

.site-nav-bar {
    background: var(--gd-primary);
    display: flex; align-items: center;
    justify-content: space-between; padding: 0 1rem;
}
.site-nav {
    display: flex; align-items: center; gap: .125rem;
    overflow-x: auto; scrollbar-width: none;
    max-width: calc(var(--gd-max) - 60px);
}
.site-nav::-webkit-scrollbar { display: none; }
.site-nav li { list-style: none; display: inline; }
.site-nav a {
    display: block; padding: .5rem .75rem;
    font-size: .8rem; font-weight: 600;
    letter-spacing: .04em; text-transform: uppercase;
    color: rgba(255,255,255,.85); white-space: nowrap;
    border-radius: var(--gd-radius);
    transition: background .15s, color .15s;
}
.site-nav a:hover, .site-nav .current-menu-item > a {
    color: #fff; background: rgba(0,0,0,.2);
}
.nav-right { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.nav-search-btn {
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.8); border-radius: var(--gd-radius);
    transition: background .15s;
}
.nav-search-btn:hover { background: rgba(0,0,0,.2); color: #fff; }

.breaking-bar {
    background: #b91c1c;
    display: flex; align-items: center; gap: .75rem;
    padding: .5rem 1rem; font-size: .8rem;
}
.breaking-label {
    background: #fff; color: #b91c1c; font-weight: 800;
    font-size: .65rem; letter-spacing: .1em;
    padding: .1rem .4rem; border-radius: 2px; white-space: nowrap;
}
.breaking-text { color: #fff; font-weight: 500; }

/* AD ZONES — CLS prevention via min-height */
.gd-ad-zone {
    display: flex; align-items: center; justify-content: center;
    background: var(--gd-bg-elevated);
    border: 1px dashed var(--gd-border);
    border-radius: var(--gd-radius);
    margin: 1.25rem 0; overflow: hidden;
    min-height: 90px;
}
.ad-size--728x90  { min-height: 90px; }
.ad-size--300x250 { min-height: 250px; max-width: 300px; margin-left: auto; margin-right: auto; }
.ad-size--300x600 { min-height: 600px; max-width: 300px; }
.ad-size--flexible { min-height: 90px; }
.gd-ad-incontent  { margin: 1.5rem auto; }

/* ARTICLE LAYOUT */
main { min-height: 60vh; }

.article-wrapper {
    max-width: var(--gd-max); margin: 0 auto;
    padding: var(--gd-gap) 1rem;
    display: grid; grid-template-columns: 1fr; gap: var(--gd-gap);
}

.breadcrumbs {
    display: flex; align-items: center; gap: .5rem;
    flex-wrap: wrap; font-size: .8rem;
    color: var(--gd-text-muted); margin-bottom: .75rem;
}
.breadcrumbs a { color: var(--gd-text-muted); }
.breadcrumbs a:hover { color: var(--gd-primary); }
.breadcrumb-sep { color: var(--gd-text-dim); }

.article-category {
    display: inline-block;
    background: var(--gd-primary); color: #fff;
    font-size: .7rem; font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase;
    padding: .2rem .6rem; border-radius: var(--gd-radius);
    margin-bottom: .75rem;
}
.article-category a { color: inherit; }

.article-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem); font-weight: 800;
    line-height: 1.15; letter-spacing: -.02em;
    color: var(--gd-text); margin-bottom: .75rem;
}
.article-subtitle {
    font-size: 1.15rem; font-weight: 400;
    color: var(--gd-text-muted); line-height: 1.5; margin-bottom: 1rem;
}

.article-meta {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: .75rem 1rem; padding-bottom: 1rem;
    border-bottom: 1px solid var(--gd-border);
    margin-bottom: 1rem; font-size: .8rem; color: var(--gd-text-muted);
}
.article-meta-author { display: flex; align-items: center; gap: .5rem; }
.author-avatar-small {
    width: 32px; height: 32px; border-radius: 50%;
    object-fit: cover; border: 2px solid var(--gd-border);
}
.author-avatar-initials {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--gd-primary); color: #fff;
    font-size: .75rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.article-meta strong { color: var(--gd-text); }

.article-featured-image {
    margin-bottom: 1.25rem; border-radius: var(--gd-radius);
    overflow: hidden; background: var(--gd-bg-elevated);
}
.article-featured-image img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.image-caption { font-size: .75rem; color: var(--gd-text-dim); padding: .5rem .75rem; font-style: italic; }

/* ARTICLE BODY */
.key-takeaways {
    background: var(--gd-bg-elevated);
    border: 1px solid var(--gd-border);
    border-left: 4px solid var(--gd-primary);
    border-radius: var(--gd-radius);
    padding: 1rem 1.25rem; margin: 1.25rem 0;
}
.key-takeaways-header {
    display: flex; align-items: center; gap: .5rem;
    font-size: .8rem; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase;
    color: var(--gd-primary); margin-bottom: .75rem;
}
.key-takeaways ul { display: flex; flex-direction: column; gap: .5rem; }
.key-takeaways li {
    font-size: .9rem; padding-left: 1.25rem;
    position: relative; color: var(--gd-text);
}
.key-takeaways li::before {
    content: ''; position: absolute; left: 0; top: .55em;
    width: 6px; height: 6px;
    background: var(--gd-primary); border-radius: 50%;
}

.article-body { font-size: 1rem; line-height: 1.8; color: var(--gd-text); }
.article-body p { margin-bottom: 1.25rem; }
.article-body h2 { font-size: 1.5rem; font-weight: 700; margin: 2rem 0 .75rem; color: var(--gd-text); }
.article-body h3 { font-size: 1.2rem; font-weight: 700; margin: 1.5rem 0 .5rem; color: var(--gd-text); }
.article-body ul, .article-body ol { margin: 0 0 1.25rem 1.5rem; }
.article-body li { margin-bottom: .4rem; }
.article-body blockquote {
    border-left: 4px solid var(--gd-primary);
    margin: 1.5rem 0; padding: 1rem 1.5rem;
    background: var(--gd-bg-elevated);
    border-radius: 0 var(--gd-radius) var(--gd-radius) 0;
    font-size: 1.05rem; color: var(--gd-text-muted);
}
.article-body a { color: var(--gd-primary); border-bottom: 1px solid rgba(230,57,70,.3); }
.article-body a:hover { border-bottom-color: var(--gd-primary); }
.article-body strong { color: var(--gd-text); font-weight: 700; }
.article-body img { border-radius: var(--gd-radius); margin: 1.25rem 0; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.25rem 0; font-size: .9rem; }
.article-body th, .article-body td { padding: .6rem .75rem; border: 1px solid var(--gd-border); }
.article-body th { background: var(--gd-bg-elevated); font-weight: 600; }
.article-body td { color: var(--gd-text-muted); }

.article-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.5rem 0; }
.article-tag {
    padding: .25rem .75rem;
    background: var(--gd-bg-elevated);
    border: 1px solid var(--gd-border); border-radius: 100px;
    font-size: .75rem; color: var(--gd-text-muted);
    transition: border-color .15s, color .15s;
}
.article-tag:hover { border-color: var(--gd-primary); color: var(--gd-primary); }

/* FAQ */
.faq-section { margin: 2rem 0; }
.faq-section-title {
    font-size: 1.15rem; font-weight: 700; color: var(--gd-text);
    margin-bottom: 1rem; padding-bottom: .5rem;
    border-bottom: 2px solid var(--gd-primary); display: inline-block;
}
.faq-item { border-bottom: 1px solid var(--gd-border); }
.faq-question {
    width: 100%; display: flex; align-items: center;
    justify-content: space-between; gap: 1rem; padding: 1rem 0;
    font-size: .95rem; font-weight: 600;
    color: var(--gd-text); text-align: left;
}
.faq-question:hover { color: var(--gd-primary); }
.faq-chevron { width: 18px; height: 18px; flex-shrink: 0; transition: transform .2s; }
.faq-item.open .faq-chevron { transform: rotate(180deg); }
.faq-answer { display: none; padding: 0 0 1rem; font-size: .9rem; color: var(--gd-text-muted); line-height: 1.7; }
.faq-item.open .faq-answer { display: block; }

/* SHARE BAR */
.share-bar {
    display: flex; align-items: center; gap: .5rem;
    padding: 1rem 0; flex-wrap: wrap;
    border-top: 1px solid var(--gd-border);
    border-bottom: 1px solid var(--gd-border);
    margin: 1.5rem 0;
}
.share-bar-label { font-size: .75rem; font-weight: 600; color: var(--gd-text-muted); text-transform: uppercase; letter-spacing: .06em; margin-right: .5rem; }
.share-btn {
    display: flex; align-items: center; gap: .4rem;
    padding: .4rem .9rem; border-radius: var(--gd-radius);
    font-size: .8rem; font-weight: 600; color: #fff;
    transition: opacity .15s;
}
.share-btn:hover { opacity: .85; color: #fff; }
.share-btn--x    { background: #000; }
.share-btn--fb   { background: #1877f2; }
.share-btn--copy { background: var(--gd-bg-elevated); border: 1px solid var(--gd-border); color: var(--gd-text); }

.share-mobile {
    position: fixed; bottom: 1rem; left: 50%;
    transform: translateX(-50%); z-index: 800;
    background: var(--gd-bg-card); border: 1px solid var(--gd-border);
    border-radius: 100px; padding: .4rem .75rem;
    display: flex; gap: .5rem;
    box-shadow: 0 4px 16px rgba(0,0,0,.4);
}

/* AUTHOR BIO */
.author-bio {
    display: flex; align-items: flex-start; gap: 1rem;
    background: var(--gd-bg-elevated); border: 1px solid var(--gd-border);
    border-radius: var(--gd-radius); padding: 1.25rem; margin: 2rem 0;
}
.author-avatar {
    width: 64px; height: 64px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
    border: 3px solid var(--gd-primary);
}
.author-avatar-fallback {
    width: 64px; height: 64px; border-radius: 50%;
    background: var(--gd-primary); color: #fff;
    font-size: 1.25rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.author-name { font-size: .9rem; color: var(--gd-text-muted); margin-bottom: .25rem; }
.author-name strong { color: var(--gd-text); font-size: 1rem; }
.author-description { font-size: .875rem; color: var(--gd-text-muted); line-height: 1.6; }

/* RELATED ARTICLES */
.related-section { margin: 2rem 0; }
.related-title {
    font-size: 1rem; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--gd-text-muted);
    margin-bottom: 1rem; padding-bottom: .5rem;
    border-bottom: 2px solid var(--gd-primary);
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.related-card { display: block; }
.related-card:hover .related-card-title { color: var(--gd-primary); }
.related-card-img {
    border-radius: var(--gd-radius); overflow: hidden;
    background: var(--gd-bg-elevated); margin-bottom: .5rem; aspect-ratio: 16/9;
}
.related-card-img img { width: 100%; height: 100%; object-fit: cover; }
.related-card-category { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gd-primary); margin-bottom: .25rem; }
.related-card-title { font-size: .875rem; font-weight: 600; color: var(--gd-text); line-height: 1.4; transition: color .15s; }

/* Newsletter inline */
.newsletter-inline {
    background: var(--gd-bg-elevated); border: 1px solid var(--gd-border);
    border-radius: var(--gd-radius); padding: 1.5rem; margin: 2rem 0; text-align: center;
}
.newsletter-inline h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.newsletter-inline p { font-size: .875rem; color: var(--gd-text-muted); margin-bottom: 1rem; }
.newsletter-inline .gd-newsletter-form { flex-direction: row; max-width: 400px; margin: 0 auto; }

/* SIDEBAR */
.article-sidebar { display: none; }
.sidebar-section {
    background: var(--gd-bg-card); border: 1px solid var(--gd-border);
    border-radius: var(--gd-radius); padding: 1.25rem; margin-bottom: 1.25rem;
}
.sidebar-section h3 { font-size: .9rem; font-weight: 700; color: var(--gd-text); margin-bottom: .5rem; }
.sidebar-section p { font-size: .85rem; color: var(--gd-text-muted); margin-bottom: .75rem; }
.sidebar-section-title {
    font-size: .75rem; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--gd-text-muted);
    margin-bottom: 1rem; padding-bottom: .5rem;
    border-bottom: 1px solid var(--gd-border);
}
.sidebar-trending-item {
    display: flex; align-items: flex-start; gap: .75rem;
    padding: .75rem 0; border-bottom: 1px solid var(--gd-border);
}
.sidebar-trending-item:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-trending-item:hover .sidebar-trending-title { color: var(--gd-primary); }
.sidebar-trending-num { font-size: 1.25rem; font-weight: 800; color: var(--gd-border-light); min-width: 1.5rem; line-height: 1; }
.sidebar-trending-title { font-size: .85rem; font-weight: 600; color: var(--gd-text); line-height: 1.4; margin-bottom: .2rem; transition: color .15s; }
.sidebar-trending-meta { font-size: .75rem; color: var(--gd-text-dim); }

.gd-newsletter-form { display: flex; flex-direction: column; gap: .5rem; }
.gd-newsletter-form input {
    padding: .6rem .875rem; background: var(--gd-bg);
    border: 1px solid var(--gd-border); border-radius: var(--gd-radius);
    color: var(--gd-text); font: inherit; font-size: .875rem;
}
.gd-newsletter-form input:focus { outline: none; border-color: var(--gd-primary); }
.newsletter-submit {
    padding: .6rem 1rem; background: var(--gd-primary); color: #fff;
    font-weight: 600; font-size: .875rem; border-radius: var(--gd-radius);
    transition: background .15s;
}
.newsletter-submit:hover { background: var(--gd-primary-dark); }

/* HOMEPAGE / ARCHIVE */
.posts-grid {
    max-width: var(--gd-max); margin: 0 auto;
    padding: var(--gd-gap) 1rem;
    display: grid; grid-template-columns: 1fr; gap: 1.25rem;
}
.post-card {
    display: grid; grid-template-columns: 120px 1fr; gap: .875rem;
    background: var(--gd-bg-card); border: 1px solid var(--gd-border);
    border-radius: var(--gd-radius); overflow: hidden;
    transition: border-color .15s;
}
.post-card:hover { border-color: var(--gd-primary); }
.post-card-img { aspect-ratio: 1; overflow: hidden; background: var(--gd-bg-elevated); }
.post-card-img img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: .875rem .875rem .875rem 0; display: flex; flex-direction: column; gap: .25rem; }
.post-card-category { font-size: .65rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gd-primary); }
.post-card-title { font-size: .925rem; font-weight: 700; color: var(--gd-text); line-height: 1.35; transition: color .15s; }
.post-card:hover .post-card-title { color: var(--gd-primary); }
.post-card-meta { font-size: .7rem; color: var(--gd-text-dim); margin-top: auto; }

.post-card-hero { grid-template-columns: 1fr; }
.post-card-hero .post-card-img { aspect-ratio: 16/9; }
.post-card-hero .post-card-body { padding: 1rem; }
.post-card-hero .post-card-title { font-size: 1.25rem; }

/* FOOTER */
footer {
    border-top: 1px solid var(--gd-border); background: var(--gd-bg-card);
    padding: 2rem 1rem; margin-top: 3rem;
}
.footer-inner {
    max-width: var(--gd-max); margin: 0 auto;
    display: flex; flex-wrap: wrap; gap: 1rem;
    justify-content: space-between; align-items: center;
    font-size: .8rem; color: var(--gd-text-muted);
}

/* RESPONSIVE */
@media (min-width: 768px) {
    .header-meta { display: flex; }
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
    .post-card { grid-template-columns: 160px 1fr; }
}

@media (min-width: 1024px) {
    .article-wrapper {
        grid-template-columns: var(--gd-content) var(--gd-sidebar);
        gap: 2rem;
    }
    .article-main { min-width: 0; }
    .article-sidebar { display: block; }
    .posts-grid { grid-template-columns: repeat(3, 1fr); }
    .share-mobile { display: none; }
}

@media (max-width: 640px) {
    .related-grid { grid-template-columns: 1fr; }
    .article-title { font-size: 1.5rem; }
    .newsletter-inline .gd-newsletter-form { flex-direction: column; }
}

/* HOMEPAGE / ARCHIVE — hero grid + card grid */
.hero-grid {
    max-width: var(--gd-max); margin: 0 auto;
    padding: var(--gd-gap) 1rem 0;
    display: grid; grid-template-columns: 1fr; gap: 1rem;
}
.hero-main {
    display: block; position: relative;
    border-radius: var(--gd-radius); overflow: hidden;
    background: var(--gd-bg-elevated); aspect-ratio: 16/9;
}
.hero-main img { width: 100%; height: 100%; object-fit: cover; }
.hero-main:hover .hero-main-title { color: #fff; }
.hero-main-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.1) 60%, transparent 100%);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding: 1.25rem;
}
.hero-main-category {
    display: inline-block; background: var(--gd-primary); color: #fff;
    font-size: .65rem; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; padding: .15rem .5rem;
    border-radius: var(--gd-radius); margin-bottom: .5rem; align-self: flex-start;
}
.hero-main-title {
    font-size: clamp(1.1rem, 2.5vw, 1.75rem); font-weight: 800;
    line-height: 1.2; color: #fff; transition: color .15s;
}
.hero-sidebar-stack { display: flex; flex-direction: column; gap: .75rem; }
.hero-side-card {
    display: grid; grid-template-columns: 100px 1fr; gap: .75rem; align-items: center;
    background: var(--gd-bg-card); border: 1px solid var(--gd-border);
    border-radius: var(--gd-radius); overflow: hidden; padding: .5rem;
    transition: border-color .15s;
}
.hero-side-card:hover { border-color: var(--gd-primary); }
.hero-side-card img { width: 100px; height: 70px; object-fit: cover; border-radius: 4px; }
.hero-side-title {
    font-size: .875rem; font-weight: 700; color: var(--gd-text);
    line-height: 1.35; margin-bottom: .25rem;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-side-meta { font-size: .7rem; color: var(--gd-text-dim); }

.archive-header {
    max-width: var(--gd-max); margin: 1.5rem auto 1rem;
    padding: 0 1rem;
    border-bottom: 2px solid var(--gd-primary); padding-bottom: .75rem;
}
.archive-title { font-size: 1.1rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--gd-text); }
.archive-description { font-size: .875rem; color: var(--gd-text-muted); margin-top: .25rem; }

.archive-grid {
    max-width: var(--gd-max); margin: 0 auto;
    padding: 0 1rem var(--gd-gap);
    display: grid; grid-template-columns: 1fr; gap: 1rem;
}
.archive-card {
    display: grid; grid-template-columns: 120px 1fr; gap: .875rem;
    background: var(--gd-bg-card); border: 1px solid var(--gd-border);
    border-radius: var(--gd-radius); overflow: hidden; transition: border-color .15s;
}
.archive-card:hover { border-color: var(--gd-primary); }
.archive-card:hover .archive-card-title { color: var(--gd-primary); }
.archive-card-img { aspect-ratio: 1; overflow: hidden; background: var(--gd-bg-elevated); }
.archive-card-img img { width: 100%; height: 100%; object-fit: cover; }
.archive-card-body { padding: .875rem .875rem .875rem 0; display: flex; flex-direction: column; gap: .25rem; }
.archive-card-category { font-size: .65rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gd-primary); }
.archive-card-title { font-size: .925rem; font-weight: 700; color: var(--gd-text); line-height: 1.35; transition: color .15s; }
.archive-card-excerpt { font-size: .8rem; color: var(--gd-text-muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.archive-card-meta { font-size: .7rem; color: var(--gd-text-dim); margin-top: auto; display: flex; gap: .75rem; }

.pagination {
    max-width: var(--gd-max); margin: 0 auto 2rem;
    padding: 0 1rem; display: flex; gap: .5rem; flex-wrap: wrap;
}
.pagination .page-numbers {
    padding: .4rem .875rem; background: var(--gd-bg-card);
    border: 1px solid var(--gd-border); border-radius: var(--gd-radius);
    font-size: .875rem; color: var(--gd-text-muted); transition: border-color .15s, color .15s;
}
.pagination .page-numbers:hover, .pagination .page-numbers.current {
    border-color: var(--gd-primary); color: var(--gd-primary);
}

/* FOOTER */
.footer-grid {
    display: grid; grid-template-columns: 1fr; gap: 2rem;
    margin-bottom: 2rem;
}
.footer-col-title {
    font-size: .8rem; font-weight: 700; letter-spacing: .08em;
    text-transform: uppercase; color: var(--gd-text);
    margin-bottom: .75rem; padding-bottom: .5rem;
    border-bottom: 1px solid var(--gd-border);
}
.footer-links { display: flex; flex-direction: column; gap: .4rem; }
.footer-links a { font-size: .875rem; color: var(--gd-text-muted); transition: color .15s; }
.footer-links a:hover { color: var(--gd-primary); }
.footer-bottom {
    border-top: 1px solid var(--gd-border); padding-top: 1.25rem;
    font-size: .8rem; color: var(--gd-text-dim); text-align: center;
}

/* RESPONSIVE — archive + hero + footer */
@media (min-width: 640px) {
    .archive-grid { grid-template-columns: repeat(2, 1fr); }
    .archive-card { grid-template-columns: 1fr; }
    .archive-card-img { aspect-ratio: 16/9; }
    .archive-card-body { padding: .875rem; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .hero-grid { grid-template-columns: 2fr 1fr; }
    .hero-main { aspect-ratio: auto; min-height: 420px; }
    .archive-grid { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: repeat(3, 1fr); }
}


/* ============================================================
   HOMEPAGE DENSE LAYOUT — Newspaper-style article density
   ============================================================ */

/* Main + sidebar on homepage */
.home-content-wrap {
    max-width: var(--gd-max);
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr var(--gd-sidebar);
    gap: var(--gd-gap);
}
.home-main-col { min-width: 0; }
.home-sidebar { min-width: 0; }

/* ---- HEADLINE RIVER (dense text list) ---- */
.headline-river {
    display: flex;
    flex-direction: column;
    border-top: 2px solid var(--gd-primary);
    margin-bottom: 1.5rem;
}
.headline-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 0;
    border-bottom: 1px solid var(--gd-border);
    color: var(--gd-text);
    transition: background .15s;
}
.headline-item:hover {
    background: var(--gd-bg-card);
    padding-left: .5rem;
    margin-left: -.5rem;
    padding-right: .5rem;
    margin-right: -.5rem;
}
.headline-featured {
    padding: .75rem 0;
}
.headline-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 56px;
    border-radius: var(--gd-radius);
    overflow: hidden;
}
.headline-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.headline-content {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .25rem .5rem;
    min-width: 0;
}
.headline-category {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gd-primary);
    flex-shrink: 0;
}
.headline-title {
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--gd-text);
    flex: 1;
    min-width: 200px;
}
.headline-featured .headline-title {
    font-size: 1rem;
    font-weight: 700;
}
.headline-time {
    font-size: .7rem;
    color: var(--gd-text-muted);
    flex-shrink: 0;
    white-space: nowrap;
}

/* ---- CATEGORY BLOCKS (2-column section grid) ---- */
.category-blocks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.category-block {
    border-top: 2px solid var(--gd-primary);
    padding-top: .75rem;
}
.category-block-header {
    margin-bottom: .75rem;
}
.category-block-title {
    font-size: .8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.category-block-title a {
    color: var(--gd-text);
}
.category-block-title a:hover {
    color: var(--gd-primary);
}
.category-lead {
    display: block;
    margin-bottom: .75rem;
    color: var(--gd-text);
}
.category-lead-img {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: var(--gd-radius);
    overflow: hidden;
    margin-bottom: .5rem;
}
.category-lead-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.category-lead-title {
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: .25rem;
}
.category-lead:hover .category-lead-title {
    color: var(--gd-primary);
}
.category-lead-excerpt {
    font-size: .8rem;
    color: var(--gd-text-muted);
    line-height: 1.45;
}
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.category-list li {
    border-top: 1px solid var(--gd-border);
}
.category-list-link {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .5rem;
    padding: .45rem 0;
    font-size: .82rem;
    font-weight: 500;
    color: var(--gd-text);
    line-height: 1.35;
}
.category-list-link:hover {
    color: var(--gd-primary);
}
.category-list-time {
    font-size: .65rem;
    color: var(--gd-text-dim);
    flex-shrink: 0;
    white-space: nowrap;
}

/* ---- COMPACT GRID (bottom more stories) ---- */
.compact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .75rem;
    margin-bottom: 2rem;
}
.compact-card {
    display: flex;
    gap: .65rem;
    padding: .5rem;
    border-radius: var(--gd-radius);
    background: var(--gd-bg-card);
    border: 1px solid var(--gd-border);
    color: var(--gd-text);
    transition: border-color .15s;
}
.compact-card:hover {
    border-color: var(--gd-primary);
}
.compact-card-img {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 4px;
    overflow: hidden;
}
.compact-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.compact-card-body {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    min-width: 0;
}
.compact-card-cat {
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--gd-primary);
}
.compact-card-title {
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.compact-card-meta {
    font-size: .65rem;
    color: var(--gd-text-muted);
    margin-top: auto;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
    .home-content-wrap {
        grid-template-columns: 1fr;
    }
    .home-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
}
@media (max-width: 768px) {
    .category-blocks {
        grid-template-columns: 1fr;
    }
    .compact-grid {
        grid-template-columns: 1fr;
    }
    .headline-thumb {
        width: 60px;
        height: 42px;
    }
    .home-sidebar {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   v2.2.0 FIXES — Image placeholders, hero sidebar, compact grid
   ============================================================ */

/* IMAGE PLACEHOLDERS — branded gradient when no image exists */
.hero-main:not(:has(img)),
.hero-side-card:not(:has(img)) > div:first-child,
.category-lead-img:empty,
.compact-card-img:empty,
.related-card-img:empty,
.archive-card-img:empty,
.article-featured-image:empty,
.headline-thumb:empty {
    background: linear-gradient(135deg, var(--gd-bg-elevated) 0%, var(--gd-border) 50%, var(--gd-bg-elevated) 100%) !important;
    background-size: 200% 200% !important;
    position: relative;
}

/* Fallback for browsers without :has() — target img-less containers via pseudo */
.hero-main,
.category-lead-img,
.compact-card-img,
.related-card-img,
.archive-card-img {
    background: linear-gradient(135deg, var(--gd-bg-elevated) 0%, color-mix(in srgb, var(--gd-primary) 15%, var(--gd-bg-elevated)) 50%, var(--gd-bg-elevated) 100%);
}

/* HERO SIDEBAR — remove title truncation, let full titles show */
.hero-side-title {
    -webkit-line-clamp: unset !important;
    display: block !important;
    overflow: visible !important;
    font-size: .82rem;
}
.hero-side-card {
    grid-template-columns: 90px 1fr;
    padding: .6rem;
    align-items: flex-start;
}
.hero-side-card img {
    width: 90px;
    height: 64px;
    border-radius: 4px;
}
.hero-side-meta {
    font-size: .68rem;
    margin-top: .2rem;
}

/* COMPACT GRID — proper 2-col with image fallback */
.compact-card {
    min-height: 80px;
}
.compact-card-img {
    background: linear-gradient(135deg, var(--gd-bg-elevated) 0%, color-mix(in srgb, var(--gd-primary) 12%, var(--gd-bg-elevated)) 100%);
    min-width: 72px;
    min-height: 72px;
}
.compact-card-title {
    -webkit-line-clamp: 3;
}

/* CATEGORY BLOCKS — image fallback + spacing */
.category-lead-img {
    min-height: 160px;
}

/* RELATED CARDS — image fallback */
.related-card-img {
    min-height: 120px;
}

/* ARCHIVE CARDS — image fallback */
.archive-card-img {
    min-height: 120px;
}

/* HERO MAIN — ensure overlay text is visible on gradient bg */
.hero-main {
    min-height: 300px;
}
@media (min-width: 1024px) {
    .hero-main { min-height: 420px; }
}

/* SIDEBAR — show on homepage at desktop */
@media (max-width: 1024px) {
    .home-content-wrap {
        grid-template-columns: 1fr !important;
    }
}

/* FOOTER — clean up category list */
.footer-links a {
    display: block;
    padding: .2rem 0;
}

/* HIDE FEATURED IMAGE ON SINGLE POSTS — AI images look bad at full size */
.article-featured-image {
    display: none !important;
}
