/* ============================================
   Group Collector Blog - Ledger Design Language
   Warm paper, ink, evergreen, persimmon CTA.
   Scoped to blog pages only (body.blog, body.single-post)
   ============================================ */

:root {
    --gc-bg-primary: var(--paper, #FAF6EC);
    --gc-bg-secondary: var(--paper, #FAF6EC);
    --gc-bg-card: var(--paper-deep, #F3ECDC);
    --gc-bg-input: var(--paper-deep, #F3ECDC);
    --gc-text-primary: var(--ink, #211A12);
    --gc-text-secondary: var(--ink-soft, #5D5344);
    --gc-text-muted: var(--ink-faint, #93876F);
    --gc-accent-purple: var(--cta, #C94A21);
    --gc-accent-violet: var(--cta, #C94A21);
    --gc-border-color: var(--line, #E4DAC4);
    --gc-font-family: var(--sans, 'Plus Jakarta Sans'), -apple-system, BlinkMacSystemFont, sans-serif;
    --gc-font-heading: var(--serif, 'DM Serif Display'), serif;
}

/* ============================================
   SCOPED: Global overrides (blog pages only)
   ============================================ */

body.blog,
body.single-post,
body.category,
body.tag {
    background-color: var(--gc-bg-primary) !important;
    color: var(--gc-text-primary);
    font-family: var(--gc-font-family);
}

body.blog #wrap,
body.blog .site-content,
body.blog #main,
body.blog #content-wrap,
body.single-post #wrap,
body.single-post .site-content,
body.single-post #main,
body.single-post #content-wrap {
    background-color: var(--gc-bg-primary) !important;
}

/* ============================================
   SCOPED: Header (blog pages only)
   ============================================ */

/* Hide top bar on blog pages (empty, just adds space) */
body.blog #top-bar-wrap,
body.single-post #top-bar-wrap,
body.category #top-bar-wrap {
    display: none !important;
}

body.blog #site-header,
body.blog .site-header,
body.single-post #site-header,
body.single-post .site-header,
body.category #site-header,
body.category .site-header {
    background: rgba(250, 246, 236, 0.9) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    backdrop-filter: blur(14px) !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

body.blog #site-header-inner,
body.blog #site-navigation-wrap,
body.blog .after-header-content,
body.single-post #site-header-inner,
body.single-post #site-navigation-wrap,
body.single-post .after-header-content {
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Logo sizing - keep it compact like ClickUp blog */
body.blog #site-logo #site-logo-inner a img,
body.single-post #site-logo #site-logo-inner a img,
body.category #site-logo #site-logo-inner a img {
    max-height: 30px !important;
    width: auto !important;
}

/* Ensure only one logo is visible */
body.blog #site-logo #site-logo-inner a.custom-logo-link,
body.single-post #site-logo #site-logo-inner a.custom-logo-link,
body.category #site-logo #site-logo-inner a.custom-logo-link {
    display: block !important;
}

body.blog #site-logo #site-logo-inner a:not(.custom-logo-link),
body.single-post #site-logo #site-logo-inner a:not(.custom-logo-link),
body.category #site-logo #site-logo-inner a:not(.custom-logo-link) {
    display: none !important;
}

/* Hide OceanWP scroll-to-top button on blog pages */
body.blog #scroll-top,
body.single-post #scroll-top,
body.category #scroll-top {
    display: none !important;
}


/* Navigation */
body.blog #site-navigation-wrap .dropdown-menu > li > a,
body.blog .oceanwp-mobile-menu-icon a,
body.single-post #site-navigation-wrap .dropdown-menu > li > a,
body.single-post .oceanwp-mobile-menu-icon a {
    color: var(--gc-text-secondary) !important;
}

body.blog #site-navigation-wrap .dropdown-menu > li > a:hover,
body.blog #site-navigation-wrap .dropdown-menu > .current-menu-item > a,
body.single-post #site-navigation-wrap .dropdown-menu > li > a:hover,
body.single-post #site-navigation-wrap .dropdown-menu > .current-menu-item > a {
    color: var(--gc-text-primary) !important;
}

/* Header layout - flex for logo left, button right */
body.blog #site-header-inner,
body.single-post #site-header-inner,
body.category #site-header-inner {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    max-width: 1140px !important;
    margin: 0 auto !important;
    padding: 0 24px !important;
}

body.blog #site-logo,
body.single-post #site-logo,
body.category #site-logo {
    float: none !important;
    display: flex !important;
    align-items: center;
}

body.blog #site-logo-inner,
body.single-post #site-logo-inner,
body.category #site-logo-inner {
    height: auto !important;
}

/* Hide OceanWP nav on blog pages (replaced by signup button) */
body.blog #site-navigation-wrap,
body.single-post #site-navigation-wrap,
body.category #site-navigation-wrap {
    display: none !important;
}

/* Header Sign Up Button */
.gc-header-signup {
    margin-left: auto;
    margin-right: 20px;
}

.gc-header-signup a {
    display: inline-block;
    padding: 10px 28px;
    background: var(--gc-accent-purple);
    color: #ffffff !important;
    font-family: var(--gc-font-family);
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none !important;
    transition: background 0.2s;
}

.gc-header-signup a:hover {
    background: var(--cta-dark, #AC3B16);
}

/* Hide breadcrumbs and page title on blog */
body.blog .page-header,
body.blog .blog-entry-header,
body.blog .site-breadcrumbs,
body.blog #site-breadcrumbs,
body.single-post .page-header,
body.single-post .site-breadcrumbs,
body.single-post #site-breadcrumbs {
    display: none !important;
}

/* ============================================
   SCOPED: Footer (blog pages only)
   ============================================ */

body.blog #footer,
body.blog #footer-widgets,
body.blog .site-footer,
body.blog #footer-inner,
body.single-post #footer,
body.single-post #footer-widgets,
body.single-post .site-footer,
body.single-post #footer-inner {
    background-color: var(--ink, #211A12) !important;
    color: rgba(244, 238, 225, 0.62) !important;
    border-top: none !important;
}

body.blog #footer-bottom,
body.single-post #footer-bottom {
    background-color: var(--ink, #211A12) !important;
    border-top: 1px solid rgba(244, 238, 225, 0.12) !important;
}

body.blog #footer-widgets .widget-title,
body.single-post #footer-widgets .widget-title {
    color: rgba(244, 238, 225, 0.9) !important;
}

body.blog #footer-bottom a,
body.blog #footer-widgets a,
body.single-post #footer-bottom a,
body.single-post #footer-widgets a {
    color: rgba(244, 238, 225, 0.7) !important;
}

body.blog #footer-bottom a:hover,
body.blog #footer-widgets a:hover,
body.single-post #footer-bottom a:hover,
body.single-post #footer-widgets a:hover {
    color: var(--gold-soft, #F6C86B) !important;
}

body.blog #footer-bottom #copyright,
body.single-post #footer-bottom #copyright {
    color: rgba(244, 238, 225, 0.4) !important;
}

/* ============================================
   REMOVED: OceanWP container overrides
   ============================================
   This block neutralised the OLD OceanWP blog layout: .site-content,
   #content-wrap, .content-area, #sidebar, .blog-entry. None of those
   elements exist in this theme -- measured on production, every one of
   those selectors matched 0 elements on /blog/.

   One rule did still land, and it was the problem: a max-width:100%
   !important override on .container, scoped to body.blog and
   body.single-post.

   .container IS a class in this theme, used by the header and footer.
   So the only surviving effect of the block was to stretch the chrome
   edge to edge on /blog/ and on single posts, while every other page
   kept max-width:1160px. The logo and footer visibly jumped when you
   navigated into the blog -- 269px of shift at a 1698px viewport.

   /author/ was unaffected and is what made it findable: it uses the same
   blog templates but its body class is `author`, which these selectors
   do not match.
   ============================================ */
/* Search overlay */
body.blog #searchform-overlay,
body.single-post #searchform-overlay {
    background: rgba(250, 246, 236, 0.95) !important;
}

body.blog #searchform-overlay input,
body.single-post #searchform-overlay input {
    color: var(--gc-text-primary) !important;
}

/* ============================================
   BLOG HOMEPAGE (.gc-blog-home) styles
   Already scoped by unique class names
   ============================================ */

/* Hero Section.
   Top padding clears the fixed nav (~74px tall): at 60px the eyebrow on
   the category / author / search archives sat 11px behind it. */
.gc-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 110px 30px 50px;
    align-items: center;
}

.gc-hero-left h1 {
    font-family: var(--gc-font-heading);
    font-size: 52px;
    font-weight: 400;
    line-height: 1.15;
    color: var(--gc-text-primary);
    margin: 0 0 24px 0;
    letter-spacing: -1.5px;
}

.gc-hero-subtitle {
    font-size: 16px;
    color: var(--gc-text-secondary);
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Newsletter Form */
.gc-newsletter-form {
    display: flex;
    gap: 0;
    margin-bottom: 28px;
}

.gc-newsletter-form input[type="email"] {
    flex: 1;
    padding: 14px 20px;
    background: var(--gc-bg-input);
    border: 1px solid var(--gc-border-color);
    border-right: none;
    border-radius: 8px 0 0 8px;
    color: var(--gc-text-primary);
    font-size: 15px;
    font-family: var(--gc-font-family);
    outline: none;
    transition: border-color 0.2s;
}

.gc-newsletter-form input[type="email"]::placeholder {
    color: var(--gc-text-muted);
}

.gc-newsletter-form input[type="email"]:focus {
    border-color: var(--gc-accent-purple);
}

.gc-newsletter-form button,
.gc-newsletter-form button[type="submit"],
.gc-blog-home .gc-newsletter-form button {
    padding: 14px 28px !important;
    background: var(--gc-text-primary) !important;
    border: 1px solid var(--gc-text-primary) !important;
    border-radius: 0 8px 8px 0 !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    font-family: var(--gc-font-family) !important;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    text-transform: none !important;
    letter-spacing: 0 !important;
    line-height: 1 !important;
    box-shadow: none !important;
}

.gc-newsletter-form button:hover,
.gc-newsletter-form button[type="submit"]:hover,
.gc-blog-home .gc-newsletter-form button:hover {
    background: var(--green, #14382A) !important;
    border-color: var(--green, #14382A) !important;
    color: #ffffff !important;
}

/* Social Links */
.gc-social-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gc-social-links span {
    color: var(--gc-text-muted);
    font-size: 14px;
}

.gc-social-links a {
    color: var(--gc-text-secondary);
    font-size: 20px;
    transition: color 0.2s;
    text-decoration: none;
}

.gc-social-links a:hover {
    color: var(--gc-text-primary);
}

/* Featured Post Card */
.gc-featured-card {
    background: var(--gc-bg-primary);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--gc-border-color);
    transition: background 0.2s;
}

.gc-featured-card:hover {
    background: var(--gc-bg-card);
}

.gc-featured-card a {
    text-decoration: none;
    color: inherit;
}

.gc-featured-card-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.gc-featured-card-body {
    padding: 20px 24px 24px;
}

.gc-featured-card-title {
    font-family: var(--gc-font-heading);
    font-size: 22px;
    font-weight: 400;
    color: var(--gc-text-primary);
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.gc-featured-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gc-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gc-author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gc-accent-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.gc-author-name {
    font-size: 14px;
    color: var(--gc-text-secondary);
    font-weight: 500;
}

.gc-reading-time {
    font-size: 13px;
    color: var(--gc-accent-violet);
    font-weight: 500;
}

/* Divider */
.gc-section-divider {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

.gc-section-divider hr {
    border: none;
    border-top: 1px solid var(--gc-border-color);
    margin: 0;
}

/* ---- Articles Section ---- */
.gc-articles-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 30px 80px;
}

.gc-articles-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

.gc-articles-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gc-articles-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--gc-text-secondary);
    margin: 0;
}

/* Tabs */
.gc-tabs {
    display: flex;
    gap: 0;
    background: transparent;
    border-radius: 8px;
    overflow: hidden;
}

.gc-tab,
.gc-blog-home .gc-tab {
    padding: 10px 24px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--gc-text-secondary) !important;
    cursor: pointer;
    border: none !important;
    background: transparent !important;
    font-family: var(--gc-font-family) !important;
    transition: all 0.2s;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
    line-height: 1.4 !important;
    border-radius: 8px !important;
}

.gc-tab.active,
.gc-blog-home .gc-tab.active {
    background: var(--gc-text-primary) !important;
    color: #ffffff !important;
}

.gc-tab:hover:not(.active),
.gc-blog-home .gc-tab:hover:not(.active) {
    color: var(--gc-text-primary) !important;
}

/* Articles Grid */
.gc-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Article Card */
.gc-article-card {
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--gc-border-color);
    transition: background 0.2s;
}

.gc-article-card:hover {
    background: var(--gc-bg-card);
}

.gc-article-card a {
    text-decoration: none;
    color: inherit;
}

.gc-card-image-wrap {
    position: relative;
    overflow: hidden;
    background: var(--gc-bg-card);
}

.gc-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.gc-card-body {
    padding: 20px 24px 24px;
}

.gc-card-category {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.gc-card-title {
    font-family: var(--gc-font-heading);
    font-size: 19px;
    font-weight: 400;
    color: var(--gc-text-primary);
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.gc-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Load More Button */
.gc-load-more-wrap {
    text-align: center;
    margin-top: 50px;
}

.gc-load-more {
    display: inline-block;
    padding: 14px 40px;
    background: transparent;
    border: 1px solid var(--gc-border-color);
    border-radius: 8px;
    color: var(--gc-text-primary);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--gc-font-family);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.gc-load-more:hover {
    background: var(--gc-text-primary);
    border-color: var(--gc-text-primary);
    color: #ffffff;
}

/* ============================================
   SINGLE POST (.gc-single-post) styles
   ============================================ */

.gc-single-post {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Back link */
.gc-back-link {
    display: inline-block;
    color: var(--gc-text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    transition: color 0.2s;
}

.gc-back-link:hover {
    color: var(--gc-accent-purple);
}

/* Single post header */
.gc-single-header {
    max-width: 720px;
    padding: 50px 0 40px;
}

.gc-single-category {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.gc-single-title {
    font-family: var(--gc-font-heading);
    font-size: 44px;
    font-weight: 400;
    line-height: 1.15;
    color: var(--gc-text-primary);
    margin: 0 0 28px 0;
    letter-spacing: -1px;
}

.gc-single-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.gc-single-meta .gc-author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gc-meta-text {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gc-meta-text .gc-author-name {
    font-weight: 600;
    color: var(--gc-text-primary);
}

.gc-post-date {
    font-size: 14px;
    color: var(--gc-text-muted);
}

.gc-post-date::before {
    content: '|';
    margin-right: 8px;
    color: var(--gc-border-color);
}

/* Featured image */
.gc-single-featured-image {
    margin-bottom: 48px;
    border-radius: 16px;
    overflow: hidden;
}

.gc-single-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 500px;
    object-fit: cover;
}

/* Content + Sidebar layout */
.gc-single-content-wrap {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 60px;
    padding-bottom: 60px;
}

/* Post content */
.gc-single-content {
    max-width: 720px;
    font-size: 17px;
    line-height: 1.8;
    color: var(--gc-text-secondary);
}

/* Centre the column when there is no sidebar to fill the second track.
   .gc-single-content-wrap is a `1fr 320px` grid built for single.php, which
   renders .gc-single-sidebar. template-legal.php, template-affiliate-area.php
   and page.php do not, so 320px plus the 60px gap stayed reserved for a column
   that was never there, and the 720px prose sat hard against the left edge
   under a centred h1. Measured on /privacy-policy/ at 1280px: 10px of gap on
   the left against 430px on the right, down ~5,900px of page.

   The explicit class selectors cover the six known pages. The :has() rule
   catches page.php too, which shares single.php's article class so cannot be
   told apart any other way, and any future sidebar-less template. Browsers
   without :has() simply keep the old left-pinned layout rather than breaking. */
.gc-legal-post .gc-single-content-wrap,
.gc-affiliate-area .gc-single-content-wrap,
.gc-single-content-wrap:not(:has(.gc-single-sidebar)) {
    grid-template-columns: 1fr;
}

.gc-legal-post .gc-single-content,
.gc-affiliate-area .gc-single-content,
.gc-single-content-wrap:not(:has(.gc-single-sidebar)) .gc-single-content {
    margin-inline: auto;
}

.gc-single-content h2 {
    font-family: var(--gc-font-heading);
    font-size: 30px;
    font-weight: 400;
    color: var(--gc-text-primary);
    margin: 48px 0 20px;
    letter-spacing: -0.5px;
}

.gc-single-content h3 {
    font-family: var(--gc-font-heading);
    font-size: 22px;
    font-weight: 400;
    color: var(--gc-text-primary);
    margin: 36px 0 16px;
}

.gc-single-content h4 {
    font-family: var(--gc-font-heading);
    font-size: 18px;
    font-weight: 400;
    color: var(--gc-text-primary);
    margin: 28px 0 12px;
}

.gc-single-content p {
    margin-bottom: 24px;
    color: var(--gc-text-secondary);
}

.gc-single-content a {
    color: var(--gc-accent-purple);
    text-decoration: underline;
    text-decoration-color: rgba(201, 74, 33, 0.4);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.2s;
}

.gc-single-content a:hover {
    text-decoration-color: var(--gc-accent-purple);
}

.gc-single-content ul,
.gc-single-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.gc-single-content li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.gc-single-content blockquote {
    background: var(--gc-bg-card);
    border-left: 3px solid var(--gold, #D9A02B);
    border-radius: 0 12px 12px 0;
    padding: 24px 28px;
    margin: 32px 0;
    font-style: italic;
}

.gc-single-content blockquote p {
    font-family: var(--gc-font-heading);
    margin-bottom: 0;
    color: var(--gc-text-primary);
    font-size: 18px;
    font-weight: 400;
}

.gc-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 24px 0;
}

.gc-single-content pre {
    background: #1B1712;
    color: #F3ECDC;
    border: 1px solid var(--gc-border-color);
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    font-size: 14px;
    margin: 24px 0;
}

.gc-single-content code {
    background: var(--gc-bg-card);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.gc-single-content pre code {
    background: none;
    padding: 0;
}

/* Sidebar */
.gc-single-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.gc-sidebar-cta {
    background: var(--gc-text-primary);
    color: #ffffff;
    border-radius: 16px;
    padding: 32px 28px;
}

.gc-sidebar-cta h3 {
    font-family: var(--gc-font-family);
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: #ffffff;
}

.gc-sidebar-cta ul {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.gc-sidebar-cta li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(244, 238, 225, 0.85);
}

.gc-sidebar-cta li::before {
    content: '\2713';
    position: absolute;
    left: 0;
    color: var(--green-ok, #237A50);
    font-weight: 700;
}

.gc-cta-button {
    display: block;
    text-align: center;
    padding: 12px 24px;
    background: #ffffff;
    color: var(--gc-text-primary) !important;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.gc-cta-button:hover {
    background: var(--gc-bg-card);
    color: var(--gc-text-primary) !important;
}

/* Tags */
.gc-tags-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gc-tags-wrap a {
    display: inline-block;
    padding: 6px 14px;
    background: var(--gc-bg-card);
    border-radius: 6px;
    font-size: 13px;
    color: var(--gc-text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.gc-tags-wrap a:hover {
    background: var(--gc-accent-purple);
    color: #ffffff;
}

/* Related Posts */
.gc-related-section {
    padding-bottom: 80px;
}

.gc-related-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--gc-text-secondary);
    margin: 40px 0;
}

.gc-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Sparse grids.
   With fewer cards than columns the fixed three-track grid stretched a
   single card across a third of the page and left the other two thirds
   empty. Below three cards, size the tracks to the cards and centre them
   instead. Written with :has() rather than a server-rendered modifier
   class because load-more.js refills these grids by AJAX (pills, search,
   Recent/Popular), so the card count changes after render and the browser
   has to re-evaluate it on its own. */
.gc-articles-grid:not(:has(.gc-article-card:nth-child(3))),
.gc-related-grid:not(:has(.gc-article-card:nth-child(3))) {
    grid-template-columns: repeat(auto-fit, minmax(280px, 360px));
    justify-content: center;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 960px) {
    .gc-hero {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 96px 20px 40px;
    }

    .gc-hero-left h1 {
        font-size: 38px;
    }

    .gc-articles-grid,
    .gc-related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .gc-single-title {
        font-size: 34px;
    }

    .gc-single-content-wrap {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .gc-single-sidebar {
        position: static;
    }

    .gc-category-filters {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 8px;
    }

    .gc-articles-header {
        flex-wrap: wrap;
    }

    .gc-articles-header-right {
        width: 100%;
        justify-content: space-between;
    }

    .gc-search-input,
    .gc-blog-home .gc-search-input {
        width: 180px;
    }

    .gc-search-input:focus,
    .gc-blog-home .gc-search-input:focus {
        width: 220px;
    }

    .gc-post-nav {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .gc-hero-left h1 {
        font-size: 30px;
    }

    .gc-articles-grid,
    .gc-related-grid {
        grid-template-columns: 1fr;
    }

    .gc-articles-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .gc-newsletter-form {
        flex-direction: column;
    }

    .gc-newsletter-form input[type="email"] {
        border-radius: 8px;
        border-right: 1px solid var(--gc-border-color);
    }

    .gc-newsletter-form button {
        border-radius: 8px !important;
        border-left: 1px solid var(--gc-text-primary) !important;
    }

    .gc-single-title {
        font-size: 28px;
    }

    .gc-single-header {
        padding: 30px 0 24px;
    }

    .gc-single-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .gc-author-bio {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .gc-share-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .gc-articles-header-right {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .gc-search-bar {
        width: 100%;
    }

    .gc-search-input,
    .gc-blog-home .gc-search-input,
    .gc-search-input:focus,
    .gc-blog-home .gc-search-input:focus {
        width: 100% !important;
    }

    .gc-post-nav {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .gc-post-nav-next {
        text-align: left;
    }

    .gc-post-nav-next .gc-post-nav-label {
        justify-content: flex-start;
    }

    .gc-single-tags {
        flex-direction: column;
        gap: 8px;
    }

    .gc-tags-label {
        padding-top: 0;
    }
}

/* ============================================
   Table of Contents (auto-generated)
   ============================================ */
.gc-toc {
    background: var(--gc-bg-card, #F3ECDC);
    border-left: 3px solid var(--gold, #D9A02B);
    border-radius: 8px;
    padding: 24px 28px;
    margin: 32px 0;
}

.gc-toc-title {
    font-size: 16px !important;
    font-weight: 700 !important;
    margin: 0 0 12px !important;
    color: var(--gc-text-primary, #211A12);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gc-toc-list {
    list-style: decimal;
    padding-left: 20px;
    margin: 0;
}

.gc-toc-list li {
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.5;
}

.gc-toc-list li a {
    color: var(--gc-text-secondary, #5D5344);
    text-decoration: none;
    transition: color 0.2s;
}

.gc-toc-list li a:hover {
    color: var(--gc-accent-purple, #C94A21);
}

.gc-toc-list li.gc-toc-sub {
    margin-left: 20px;
    font-size: 13px;
}

/* ============================================
   Reading Progress Bar
   ============================================ */
.gc-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0;
    background: var(--cta, #C94A21);
    z-index: 100000;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
    pointer-events: none;
}

body.admin-bar .gc-progress-bar {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .gc-progress-bar {
        top: 46px;
    }
}

/* ============================================
   Social Share Buttons
   ============================================ */
.gc-share-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 0;
    margin: 40px 0 0;
    border-top: 1px solid var(--gc-border-color);
}

.gc-share-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gc-text-secondary);
    white-space: nowrap;
}

.gc-share-buttons {
    display: flex;
    gap: 8px;
}

.gc-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--gc-bg-card);
    color: var(--gc-text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-family: var(--gc-font-family);
    padding: 0;
}

.gc-share-btn:hover {
    color: #ffffff;
}

.gc-share-twitter:hover {
    background: #000000;
}

.gc-share-linkedin:hover {
    background: #0A66C2;
}

.gc-share-facebook:hover {
    background: #1877F2;
}

.gc-share-copy:hover {
    background: var(--gc-accent-purple);
}

.gc-share-copy.copied {
    background: var(--green-ok, #237A50);
    color: #ffffff;
}

/* ============================================
   Author Bio Box
   ============================================ */
.gc-author-bio {
    display: flex;
    gap: 24px;
    padding: 32px;
    background: var(--gc-bg-card);
    border-radius: 16px;
    max-width: 720px;
    margin-bottom: 48px;
}

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

.gc-author-bio-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.gc-author-bio-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gc-text-muted);
    display: block;
    margin-bottom: 4px;
}

.gc-author-bio-name {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px !important;
    color: var(--gc-text-primary);
}

.gc-author-bio-name a {
    color: inherit;
    text-decoration: none;
}

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

.gc-author-bio-desc {
    font-size: 15px;
    color: var(--gc-text-secondary);
    line-height: 1.6;
    margin: 0 0 8px;
}

.gc-author-bio-posts {
    font-size: 13px;
    color: var(--gc-text-muted);
    font-weight: 500;
}

/* ============================================
   Category Filter Pills
   ============================================ */
.gc-category-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.gc-filter-pill,
.gc-blog-home .gc-filter-pill {
    display: inline-block;
    padding: 8px 20px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--gc-text-secondary) !important;
    background: transparent !important;
    border: 1px solid var(--gc-border-color) !important;
    border-radius: 100px !important;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--gc-font-family) !important;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    box-shadow: none !important;
}

.gc-filter-pill:hover,
.gc-blog-home .gc-filter-pill:hover {
    border-color: var(--gc-text-primary) !important;
    color: var(--gc-text-primary) !important;
}

.gc-filter-pill.active,
.gc-blog-home .gc-filter-pill.active {
    background: var(--gc-text-primary) !important;
    border-color: var(--gc-text-primary) !important;
    color: #ffffff !important;
}

.gc-no-posts {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--gc-text-muted);
    padding: 40px 0;
    font-size: 16px;
}

/* ============================================
   Branded Footer
   ============================================ */
body.blog #footer-bottom,
body.single-post #footer-bottom {
    text-align: center;
    padding: 20px 0 !important;
}

body.blog #footer-bottom #copyright,
body.single-post #footer-bottom #copyright {
    font-size: 13px;
    color: rgba(244, 238, 225, 0.4) !important;
}

body.blog #footer-bottom #copyright a,
body.single-post #footer-bottom #copyright a {
    color: rgba(244, 238, 225, 0.5) !important;
    text-decoration: none;
    font-weight: 500;
}

body.blog #footer-bottom #copyright a:hover,
body.single-post #footer-bottom #copyright a:hover {
    color: var(--gold-soft, #F6C86B) !important;
}

/* ============================================
   Search Bar
   ============================================ */
.gc-search-bar {
    position: relative;
    display: flex;
    align-items: center;
}

.gc-search-icon {
    position: absolute;
    left: 12px;
    color: var(--gc-text-muted);
    pointer-events: none;
    flex-shrink: 0;
}

.gc-search-input,
.gc-blog-home .gc-search-input {
    width: 220px;
    padding: 9px 36px 9px 38px !important;
    font-size: 14px !important;
    font-family: var(--gc-font-family) !important;
    color: var(--gc-text-primary) !important;
    background: var(--gc-bg-card) !important;
    border: 1px solid var(--gc-border-color) !important;
    border-radius: 8px !important;
    outline: none;
    transition: border-color 0.2s, width 0.3s;
    box-shadow: none !important;
    line-height: 1.4 !important;
}

.gc-search-input:focus,
.gc-blog-home .gc-search-input:focus {
    border-color: var(--gc-accent-purple) !important;
    width: 280px;
}

.gc-search-input::placeholder {
    color: var(--gc-text-muted);
}

.gc-search-clear,
.gc-blog-home .gc-search-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none !important;
    background: var(--gc-bg-card) !important;
    color: var(--gc-text-muted);
    cursor: pointer;
    border-radius: 50%;
    padding: 0 !important;
    box-shadow: none !important;
    transition: color 0.2s, background 0.2s;
}

.gc-search-clear svg {
    display: block;
}

.gc-search-clear:hover,
.gc-blog-home .gc-search-clear:hover {
    color: var(--gc-text-primary);
    background: var(--gc-border-color) !important;
}

/* ============================================
   Tags Label Enhancement
   ============================================ */
.gc-single-tags {
    max-width: 720px;
    padding-bottom: 40px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.gc-tags-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gc-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    padding-top: 7px;
}

/* ============================================
   Prev/Next Post Navigation
   ============================================ */
.gc-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    max-width: 720px;
    padding: 32px 0 48px;
    border-top: 1px solid var(--gc-border-color);
}

.gc-post-nav-item a {
    display: block;
    text-decoration: none;
    padding: 20px;
    background: var(--gc-bg-card);
    border-radius: 12px;
    transition: all 0.2s;
    height: 100%;
}

.gc-post-nav-item a:hover {
    background: var(--gc-border-color);
    transform: translateY(-2px);
}

.gc-post-nav-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gc-text-muted);
    margin-bottom: 8px;
}

.gc-post-nav-label svg {
    flex-shrink: 0;
}

/* The line-clamp below is a backstop, not the truncation. It stopped working
   in Chrome 151: -webkit-box now computes to flow-root, so the clamp caps the
   height at two lines but never renders its ellipsis, and a third line was
   getting chopped mid-word. Titles are shortened in PHP instead, by
   flavor_nav_title() in functions.php. Kept here so an unexpectedly long
   title still cannot spill the card. */
.gc-post-nav-title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--gc-text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gc-post-nav-next {
    text-align: right;
}

.gc-post-nav-next .gc-post-nav-label {
    justify-content: flex-end;
}

/* ============================================
   Sticky Sidebar Admin Bar Fix
   ============================================ */
body.admin-bar .gc-single-sidebar {
    top: 132px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .gc-single-sidebar {
        top: 146px;
    }
}

/* ============================================
   RESPONSIVE OVERRIDES for Tier 2 features
   (must come after base definitions)
   ============================================ */
@media (max-width: 960px) {
    .gc-articles-header {
        flex-wrap: wrap;
    }

    .gc-articles-header-right {
        width: 100%;
        justify-content: space-between;
    }

    .gc-search-input,
    .gc-blog-home .gc-search-input {
        width: 180px;
    }

    .gc-search-input:focus,
    .gc-blog-home .gc-search-input:focus {
        width: 220px;
    }

    .gc-post-nav {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
}

@media (max-width: 600px) {
    .gc-articles-header-right {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .gc-search-bar {
        width: 100%;
    }

    .gc-search-input,
    .gc-blog-home .gc-search-input,
    .gc-search-input:focus,
    .gc-blog-home .gc-search-input:focus {
        width: 100% !important;
    }

    .gc-post-nav {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .gc-post-nav-next {
        text-align: left;
    }

    .gc-post-nav-next .gc-post-nav-label {
        justify-content: flex-start;
    }

    .gc-single-tags {
        flex-direction: column;
        gap: 8px;
    }

    .gc-tags-label {
        padding-top: 0;
    }
}

/* ============================================
   CATEGORY ARCHIVE - OceanWP overrides
   (mirrors body.blog / body.single-post scoping)
   ============================================ */

body.category #wrap,
body.category .site-content,
body.category #main,
body.category #content-wrap {
    background-color: var(--gc-bg-primary) !important;
}

body.category #site-header,
body.category .site-header,
body.category #site-header-inner,
body.category #site-navigation-wrap,
body.category .after-header-content {
    background-color: var(--gc-bg-secondary) !important;
    border: none !important;
    box-shadow: none !important;
}



body.category #site-navigation-wrap .dropdown-menu > li > a,
body.category .oceanwp-mobile-menu-icon a {
    color: var(--gc-text-secondary) !important;
}

body.category #site-navigation-wrap .dropdown-menu > li > a:hover,
body.category #site-navigation-wrap .dropdown-menu > .current-menu-item > a {
    color: var(--gc-text-primary) !important;
}

body.category .page-header,
body.category .site-breadcrumbs,
body.category #site-breadcrumbs {
    display: none !important;
}

body.category #footer,
body.category #footer-widgets,
body.category .site-footer,
body.category #footer-inner {
    background-color: var(--ink, #211A12) !important;
    color: rgba(244, 238, 225, 0.62) !important;
    border-top: none !important;
}

body.category #footer-bottom {
    background-color: var(--ink, #211A12) !important;
    border-top: 1px solid rgba(244, 238, 225, 0.12) !important;
}

body.category #footer-widgets .widget-title {
    color: rgba(244, 238, 225, 0.9) !important;
}

body.category #footer-bottom a,
body.category #footer-widgets a {
    color: rgba(244, 238, 225, 0.7) !important;
}

body.category #footer-bottom a:hover,
body.category #footer-widgets a:hover {
    color: var(--gold-soft, #F6C86B) !important;
}

/* The body.category equivalents of the OceanWP container overrides removed
   further up were here, and carried the same bug: .site-content,
   #content-wrap, .content-area and #sidebar do not exist in this theme, but
   `body.category .container { max-width:100% }` matched the header and footer
   and stretched them edge to edge on every category archive. Removed for the
   same reason. */

body.category #footer-bottom {
    text-align: center;
    padding: 20px 0 !important;
}

body.category #footer-bottom #copyright {
    font-size: 13px;
    color: rgba(244, 238, 225, 0.4) !important;
}

body.category #footer-bottom #copyright a {
    color: rgba(244, 238, 225, 0.5) !important;
    text-decoration: none;
    font-weight: 500;
}

body.category #footer-bottom #copyright a:hover {
    color: var(--gold-soft, #F6C86B) !important;
}

body.category #searchform-overlay {
    background: rgba(250, 246, 236, 0.95) !important;
}

body.category #searchform-overlay input {
    color: var(--gc-text-primary) !important;
}

/* ============================================
   Category Archive Header
   ============================================ */

.gc-category-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 30px 50px;
}

.gc-category-header .gc-back-link {
    margin-bottom: 20px;
}

.gc-category-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.gc-category-title {
    font-family: var(--gc-font-heading);
    font-size: 48px;
    font-weight: 400;
    line-height: 1.15;
    color: var(--gc-text-primary);
    margin: 0 0 16px 0;
    letter-spacing: -1.5px;
}

.gc-category-desc {
    font-size: 17px;
    color: var(--gc-text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
    max-width: 600px;
}

.gc-category-count {
    display: inline-block;
    font-size: 14px;
    color: var(--gc-text-muted);
    font-weight: 500;
}

.gc-category-archive .gc-articles-section {
    padding-top: 40px;
}

@media (max-width: 600px) {
    .gc-category-header {
        padding: 30px 20px;
    }
    .gc-category-title {
        font-size: 32px;
    }
}


/* ============================================================
   Search results page (search.php)
   ============================================================ */
.gc-search-form {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    max-width: 560px;
    flex-wrap: wrap;
}
.gc-search-form .gc-search-bar {
    flex: 1;
    min-width: 240px;
}
.gc-search-submit {
    white-space: nowrap;
}
.gc-no-results {
    text-align: center;
    padding: 40px 0 24px;
}
.gc-no-results-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Numbered pagination (search results + any paged archive) */
.gc-pagination {
    margin: 48px 0 16px;
}
.gc-pagination .nav-links {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}
.gc-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid var(--border, #E4DAC4);
    background: var(--card, #FFFDF7);
    color: var(--text, #211A12);
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
    transition: all .2s ease;
}
.gc-pagination .page-numbers:hover {
    border-color: var(--primary, #C94A21);
    color: var(--primary, #C94A21);
}
.gc-pagination .page-numbers.current {
    background: var(--primary, #C94A21);
    border-color: var(--primary, #C94A21);
    color: #fff;
}
.gc-pagination .page-numbers.dots {
    border: none;
    background: transparent;
}
@media (max-width: 600px) {
    .gc-search-form { flex-direction: column; }
    .gc-search-submit { width: 100%; }
}
