/*
Theme Name:   Spencer Blog
Template:     generatepress
Version:      2.0.0
Description:  Child theme for Spencer Buys Houses blog. Exact replica of the Next.js design system.
*/

/* ─────────────────────────────────────────────────────────────────────────────
   FONT
───────────────────────────────────────────────────────────────────────────── */

@font-face {
    font-family: 'Geist';
    src: url('fonts/GeistVariable.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
    font-style: normal;
}

/* ─────────────────────────────────────────────────────────────────────────────
   DESIGN TOKENS — source of truth: Next.js globals.css + blog.css
───────────────────────────────────────────────────────────────────────────── */

:root {
    /* ── Backgrounds ── */
    --bg:          #0f1012;   /* --background (body)                        */
    --bg-900:      #0f0f23;   /* --color-bg-900 (header, mobile panel)      */
    --bg-800:      #1a1a2e;   /* --color-bg-800 (secondary dark blocks)     */
    --bg-card:     #242424;   /* card / blockquote / code background        */

    /* ── Brand colours ── */
    --yellow:      #ffd600;   /* --color-primary                            */
    --yellow-dark: #e6c000;   /* --color-primary-dark (footer heads, phone) */
    --yellow-text: #f8ed1a;   /* --color-text-yellow (H2, hover titles)     */
    --amber:       #f59e0b;   /* --color-amber (nav active, mobile CTA)     */
    --green:       #529e14;   /* links, list markers, author border, label  */
    --red:         #cc0000;   /* --color-secondary (CTA button)             */
    --red-dark:    #bd0202;   /* --color-secondary-dark                     */

    /* ── Text ── */
    --text-white:  #ffffff;
    --text-base:   #d1d5db;   /* gray-300 — body text                       */
    --text-dim:    #9ca3af;   /* gray-400 — secondary descriptions          */
    --text-muted:  #6b7280;   /* gray-500 — dates, meta, footer links       */

    /* ── Borders ── */
    --border:      #1f2937;   /* gray-800 — card / layout borders           */
    --border-mid:  #374151;   /* gray-700 — content borders, images         */

    /* ── Typography ── */
    --font:        'Geist', Arial, Helvetica, sans-serif;
    --font-mono:   'Geist Mono', 'Courier New', monospace;

    /* ── Radii ── */
    --r-sm:   0.375rem;   /* rounded     */
    --r-md:   0.5rem;     /* rounded-lg  */
    --r-lg:   0.75rem;    /* rounded-xl  */
    --r-xl:   1rem;       /* rounded-2xl */

    /* ── Layout ── */
    --max-w:      80rem;    /* max-w-7xl = 1280px */
    --max-w-post: 48rem;    /* max-w-3xl ≈ 768px  */
    --header-h:   4.5rem;   /* updated by JS      */
}

/* ─────────────────────────────────────────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.75;
    background-color: var(--bg);
    color: var(--text-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: var(--header-h);
}

img, video { max-width: 100%; height: auto; display: block; }

a {
    color: var(--green);
    text-decoration: none;
    transition: color .2s ease;
}
a:hover { color: var(--yellow); }

a:focus-visible {
    outline: 2px solid var(--amber);
    outline-offset: 3px;
    border-radius: var(--r-sm);
}

h1, h2, h3, h4, h5, h6 { margin: 0; line-height: 1.2; color: var(--text-white); }
p { margin-top: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ─────────────────────────────────────────────────────────────────────────────
   NEUTRALISE GENERATEPRESS DEFAULTS
───────────────────────────────────────────────────────────────────────────── */

/* These elements are output by GP's own header/footer which we override in PHP */
.site-header,
.main-navigation,
.site-footer,
.widget-area,
.nav-previous,
.nav-next { display: none !important; }

.site-content,
#page,
#primary,
#inner-content,
.generate-columns-container { padding: 0; max-width: none; }

.inside-article,
.entry-header,
.entry-content,
.entry-footer,
.hentry { max-width: none; margin: 0; padding: 0; }

/* ─────────────────────────────────────────────────────────────────────────────
   SKIP LINK + ACCESSIBILITY UTILITIES
───────────────────────────────────────────────────────────────────────────── */

.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    padding: .75rem 1.5rem;
    background-color: var(--amber);
    color: #000;
    font-weight: 700;
    z-index: 9999;
    text-decoration: none;
    border-radius: 0 0 var(--r-md) 0;
}
.skip-link:focus { top: 0; }

.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ─────────────────────────────────────────────────────────────────────────────
   HEADER
───────────────────────────────────────────────────────────────────────────── */

.sbh-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background-color: var(--bg);
    transition: box-shadow .3s ease, background-color .3s ease;
}

.sbh-header.is-scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,.6);
    background-color: var(--bg-900);
}

.sbh-header__inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: .375rem 1rem .25rem;
}

/* ── Top row: Logo / Phone / Actions ── */
.sbh-header__top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: .25rem 0;
}

.sbh-header__logo { display: flex; align-items: center; }

.sbh-header__logo img,
.sbh-header__logo .custom-logo { height: 2.5rem; width: auto; }

.sbh-header__site-name {
    font-weight: 900;
    font-size: 1.25rem;
    color: var(--yellow);
    text-decoration: none;
    letter-spacing: -.01em;
}
.sbh-header__site-name:hover { color: var(--yellow); opacity: .85; }

.sbh-header__phone { text-align: center; }

.sbh-header__phone a {
    color: var(--yellow-dark);
    font-weight: 600;
    font-size: 1.0625rem;
    text-decoration: none;
    transition: color .2s;
}
.sbh-header__phone a:hover { color: var(--amber); }

.sbh-header__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .75rem;
}

.sbh-header__main-site {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: color .2s;
    white-space: nowrap;
}
.sbh-header__main-site:hover { color: var(--yellow-dark); }

/* ── Desktop Nav row ── */
.sbh-header__nav { display: flex; justify-content: center; padding: .1875rem 0; }

.sbh-header__nav .sbh-nav__list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: .125rem;
    list-style: none;
    margin: 0; padding: 0;
}

.sbh-header__nav .sbh-nav__list a {
    display: block;
    padding: .3125rem .75rem;
    font-size: .875rem;
    font-weight: 500;
    color: #9ca3af;
    border-radius: var(--r-md);
    text-decoration: none;
    transition: color .2s ease, background-color .2s ease;
    white-space: nowrap;
    position: relative;
}
.sbh-header__nav .sbh-nav__list a:hover {
    color: var(--text-white);
    background-color: rgba(255,255,255,.05);
}

.sbh-header__nav .sbh-nav__list .current-menu-item > a,
.sbh-header__nav .sbh-nav__list .current_page_item > a,
.sbh-header__nav .sbh-nav__list .current-menu-ancestor > a {
    color: var(--yellow);
    background-color: rgba(255,214,0,.1);
}

.sbh-header__nav .sbh-nav__list .current-menu-item > a::after {
    content: '';
    position: absolute;
    bottom: 0; left: .5rem; right: .5rem;
    height: 2px;
    border-radius: 9999px;
    background-color: var(--amber);
}

/* ── Hamburger ── */
.sbh-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 2.5rem; height: 2.5rem;
    background: none;
    border: none;
    cursor: pointer;
    gap: .3125rem;
    padding: .375rem;
    border-radius: var(--r-sm);
    transition: background-color .2s;
}
.sbh-hamburger:hover { background-color: rgba(255,255,255,.05); }

.sbh-hamburger span {
    display: block;
    width: 1.375rem; height: 2px;
    background-color: var(--yellow-dark);
    border-radius: 9999px;
    transition: transform .25s ease, opacity .25s ease;
}

/* ── Mobile Menu overlay ── */
.sbh-mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
}
.sbh-mobile-menu.is-open { display: block; }

.sbh-mobile-menu__backdrop {
    position: absolute; inset: 0;
    background-color: rgba(0,0,0,.65);
    cursor: pointer;
}

.sbh-mobile-menu__panel {
    position: absolute;
    top: 0; left: 0; right: 0;
    background-color: var(--bg-900);
    box-shadow: 0 8px 30px rgba(0,0,0,.5);
    max-height: 100svh;
    overflow-y: auto;
}

.sbh-mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.sbh-mobile-menu__header span {
    font-weight: 700;
    color: var(--text-white);
    font-size: .9375rem;
}

.sbh-mobile-menu__close {
    background: none; border: none;
    cursor: pointer;
    color: var(--yellow-dark);
    font-size: 1.375rem;
    line-height: 1;
    padding: .25rem .5rem;
    border-radius: var(--r-sm);
    transition: color .2s;
}
.sbh-mobile-menu__close:hover { color: var(--yellow); }

.sbh-mobile-nav {
    list-style: none;
    margin: 0;
    padding: .5rem 1rem;
}

.sbh-mobile-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .9375rem 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
    color: var(--text-white);
    font-size: .9375rem;
    font-weight: 400;
    text-decoration: none;
    transition: color .2s;
}
.sbh-mobile-nav a:hover { color: var(--yellow-dark); }
.sbh-mobile-nav .current-menu-item > a { color: var(--amber); font-weight: 500; }

.sbh-mobile-menu__cta {
    display: block;
    margin: 1rem;
    padding: .875rem 1.5rem;
    text-align: center;
    font-weight: 700;
    font-size: .9375rem;
    background-color: var(--amber);
    color: #000;
    border-radius: var(--r-lg);
    text-decoration: none;
    transition: background-color .2s;
}
.sbh-mobile-menu__cta:hover { background-color: var(--yellow-dark); color: #000; }

/* ─────────────────────────────────────────────────────────────────────────────
   BLOG INDEX
───────────────────────────────────────────────────────────────────────────── */

.sbh-blog-index {
    min-height: 100svh;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 4rem 1rem 6rem;
}

/* ── Page header ── */
.sbh-blog-index__header {
    text-align: center;
    margin-bottom: 4rem;
    animation: sbh-fade-up .4s ease both;
}

.sbh-label {
    display: inline-block;
    color: var(--green);
    font-weight: 900;
    font-size: .75rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-bottom: .75rem;
}

.sbh-blog-index__title {
    font-size: clamp(2.5rem, 6vw, 3.75rem);
    font-weight: 900;
    color: var(--text-white);
    text-transform: uppercase;
    letter-spacing: -.025em;
    line-height: 1;
    margin-bottom: 1rem;
}

.sbh-yellow { color: var(--yellow-text); }

.sbh-blog-index__desc {
    color: var(--text-dim);
    font-size: 1.125rem;
    max-width: 36rem;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── Post grid ── */
.sbh-post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* ── Card ── */
.sbh-card {
    border-radius: var(--r-xl);
    overflow: hidden;
    border: 1px solid var(--border);
    background-color: var(--bg-card);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.4), 0 2px 4px -2px rgba(0,0,0,.3);
    transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
    animation: sbh-fade-up .4s ease both;
}

.sbh-card:hover {
    border-color: rgba(248,237,26,.6);
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,.6), 0 8px 10px -6px rgba(0,0,0,.5);
}

/* stagger */
.sbh-post-grid .sbh-card:nth-child(2) { animation-delay: .06s; }
.sbh-post-grid .sbh-card:nth-child(3) { animation-delay: .12s; }
.sbh-post-grid .sbh-card:nth-child(4) { animation-delay: .18s; }
.sbh-post-grid .sbh-card:nth-child(5) { animation-delay: .24s; }
.sbh-post-grid .sbh-card:nth-child(6) { animation-delay: .30s; }

.sbh-card__link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}
.sbh-card__link:hover { color: inherit; }

.sbh-card__media {
    position: relative;
    height: 13rem;           /* h-52 ≈ 208px */
    overflow: hidden;
    background-color: #111827;
    flex-shrink: 0;
}

.sbh-card__img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.sbh-card:hover .sbh-card__img { transform: scale(1.05); }

.sbh-card__placeholder {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 3rem; opacity: .2;
}

/* gradient overlay from card bg at bottom — mirrors Next.js implementation */
.sbh-card__overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, var(--bg-card) 0%, transparent 60%);
}

.sbh-card__body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sbh-card__date {
    font-size: .625rem;
    font-weight: 900;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: .75rem;
}

/* White by default → bright yellow on hover — exactly as Next.js */
.sbh-card__title {
    font-size: 1.0625rem;
    font-weight: 900;
    color: var(--text-white);
    text-transform: uppercase;
    letter-spacing: -.01em;
    line-height: 1.3;
    margin-bottom: .75rem;
    transition: color .2s ease;
}
.sbh-card:hover .sbh-card__title { color: var(--yellow-text); }

.sbh-card__excerpt {
    color: var(--text-dim);
    font-size: .875rem;
    line-height: 1.65;
    flex: 1;
    margin-bottom: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.sbh-card__read {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: 1.25rem;
    color: var(--green);
    font-weight: 900;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .075em;
    transition: gap .2s ease;
}
.sbh-card:hover .sbh-card__read { gap: 1rem; }

.sbh-card__arrow { display: inline-block; transition: transform .2s ease; }
.sbh-card:hover .sbh-card__arrow { transform: translateX(.25rem); }

/* ── Empty state ── */
.sbh-empty {
    text-align: center;
    padding: 8rem 1.5rem;
    border: 2px dashed var(--border);
    border-radius: var(--r-xl);
}
.sbh-empty__icon { font-size: 3rem; opacity: .2; margin-bottom: 1rem; }
.sbh-empty__text {
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: .875rem;
}

/* ─────────────────────────────────────────────────────────────────────────────
   SINGLE POST
───────────────────────────────────────────────────────────────────────────── */

.sbh-post {
    min-height: 100svh;
    padding: 2rem 0 6rem;
}

.sbh-post__inner {
    max-width: var(--max-w-post);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Breadcrumb ── */
.sbh-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .375rem;
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}
.sbh-breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color .2s;
}
.sbh-breadcrumb a:hover { color: var(--text-white); }
.sbh-breadcrumb__sep { color: var(--text-muted); }
.sbh-breadcrumb__current {
    color: var(--yellow-text);
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: bottom;
}

/* ── Post title ── */
.sbh-post__title {
    font-size: clamp(1.75rem, 4vw, 3rem);
    font-weight: 900;
    color: var(--text-white);
    text-transform: uppercase;
    letter-spacing: -.025em;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

/* ── Meta row ── */
.sbh-post__meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-bottom: 2rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255,214,0,.4);
}

.sbh-post__author { display: flex; align-items: center; gap: .75rem; }

.sbh-post__avatar {
    width: 2.5rem; height: 2.5rem;
    border-radius: 9999px;
    border: 2px solid var(--green);
    object-fit: cover;
    flex-shrink: 0;
}

.sbh-post__author-name {
    font-size: .875rem;
    font-weight: 900;
    color: var(--text-white);
    text-transform: uppercase;
    margin: 0 0 .125rem;
}
.sbh-post__author-date {
    font-size: .6875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin: 0;
}

/* ── Cover image ── */
.sbh-post__cover {
    position: relative;
    width: 100%;
    border-radius: var(--r-xl);
    overflow: hidden;
    margin-bottom: 3rem;
    border: 1px solid var(--border);
    box-shadow: 0 25px 50px -12px rgba(0,0,0,.7);
    aspect-ratio: 16/9;
}
.sbh-post__cover img,
.sbh-post__cover-img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Author bio ── */
.sbh-author-bio {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-top: 4rem;
    padding: 1.5rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
}
.sbh-author-bio__avatar {
    width: 4rem; height: 4rem;
    border-radius: 9999px;
    border: 2px solid var(--green);
    object-fit: cover;
    flex-shrink: 0;
}
.sbh-author-bio__label {
    font-size: .625rem;
    font-weight: 900;
    color: var(--green);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin: 0 0 .25rem;
}
.sbh-author-bio__name {
    font-size: 1.125rem;
    font-weight: 900;
    color: var(--text-white);
    text-transform: uppercase;
    margin: 0 0 .5rem;
}
.sbh-author-bio__text {
    font-size: .875rem;
    color: var(--text-dim);
    line-height: 1.65;
    margin: 0;
}

/* ── CTA ── */
.sbh-post__cta { margin-top: 3rem; text-align: center; }

.sbh-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: 1rem 2rem;
    border-radius: var(--r-lg);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: background-color .2s ease;
}
.sbh-btn:focus-visible {
    outline: 2px solid rgba(255,255,255,.4);
    outline-offset: 3px;
}
.sbh-btn--red {
    background-color: var(--red);
    color: var(--text-white);
    border: 1px solid rgba(255,255,255,.2);
}
.sbh-btn--red:hover { background-color: var(--red-dark); color: var(--text-white); }

/* ─────────────────────────────────────────────────────────────────────────────
   BLOG CONTENT TYPOGRAPHY
   Exact mirror of Next.js app/styles/blog.css
───────────────────────────────────────────────────────────────────────────── */

.blog-content {
    color: var(--text-base);
    font-size: 1.125rem;
    line-height: 1.8;
    word-break: break-word;
}

.blog-content > *:first-child { margin-top: 0; }

.blog-content p {
    color: var(--text-base);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.blog-content h2 {
    color: var(--yellow-text);
    font-size: 1.875rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-top: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.blog-content h3 {
    color: var(--text-white);
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: .75rem;
}

.blog-content h4 {
    color: var(--text-white);
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1.75rem;
    margin-bottom: .5rem;
}

.blog-content a { color: var(--green); text-decoration: none; transition: opacity .2s; }
.blog-content a:hover { text-decoration: underline; opacity: .9; }

.blog-content ul,
.blog-content ol {
    color: var(--text-base);
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
    list-style: revert;
}
.blog-content ul { list-style-type: disc; }
.blog-content ol { list-style-type: decimal; }
.blog-content li { margin-bottom: .5rem; padding-left: .25rem; }
.blog-content li::marker { color: var(--green); }

.blog-content blockquote {
    border-left: 4px solid var(--green);
    background-color: var(--bg-card);
    padding: 1rem 1.5rem;
    border-radius: 0 var(--r-xl) var(--r-xl) 0;
    font-style: normal;
    margin: 2rem 0;
    color: var(--text-base);
}
.blog-content blockquote p { margin-bottom: 0; }

.blog-content code {
    background-color: var(--bg-card);
    color: var(--yellow-text);
    font-family: var(--font-mono);
    padding: .15rem .4rem;
    border-radius: var(--r-sm);
    font-size: .9rem;
}

.blog-content pre {
    background-color: var(--bg-card);
    border: 1px solid var(--border-mid);
    border-radius: var(--r-xl);
    padding: 1rem;
    overflow-x: auto;
    margin: 2rem 0;
}
.blog-content pre code {
    background: none;
    padding: 0;
    color: var(--text-base);
    font-size: .9rem;
}

.blog-content img {
    border-radius: var(--r-xl);
    border: 1px solid var(--border-mid);
    margin: 2rem 0;
    max-width: 100%;
    height: auto;
}

.blog-content hr {
    border: none;
    border-top: 1px solid var(--border-mid);
    margin: 3rem 0;
}

.blog-content table { width: 100%; border-collapse: collapse; margin: 2rem 0; font-size: .9375rem; }
.blog-content th {
    background-color: var(--bg-card);
    color: var(--text-white);
    font-weight: 700;
    text-align: left;
    padding: .75rem 1rem;
    border: 1px solid var(--border-mid);
}
.blog-content td {
    padding: .75rem 1rem;
    border: 1px solid var(--border);
    color: var(--text-base);
}
.blog-content tr:nth-child(even) td { background-color: rgba(36,36,36,.4); }

/* ─────────────────────────────────────────────────────────────────────────────
   ARCHIVE / CATEGORY PAGE
───────────────────────────────────────────────────────────────────────────── */

.sbh-archive {
    min-height: 100svh;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 4rem 1rem 6rem;
}
.sbh-archive__header { text-align: center; margin-bottom: 4rem; }
.sbh-archive__title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 900;
    color: var(--text-white);
    text-transform: uppercase;
    letter-spacing: -.025em;
    line-height: 1;
    margin-bottom: .75rem;
}
.sbh-archive__desc { color: var(--text-muted); font-size: 1rem; max-width: 32rem; margin: 0 auto; }

/* ─────────────────────────────────────────────────────────────────────────────
   STATIC PAGES
───────────────────────────────────────────────────────────────────────────── */

.sbh-page {
    max-width: var(--max-w-post);
    margin: 0 auto;
    padding: 4rem 1.5rem 6rem;
}
.sbh-page__title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    color: var(--text-white);
    text-transform: uppercase;
    letter-spacing: -.025em;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255,214,0,.3);
}
.sbh-page .blog-content { margin-top: 0; }

/* ─────────────────────────────────────────────────────────────────────────────
   404
───────────────────────────────────────────────────────────────────────────── */

.sbh-404 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: calc(100svh - 12rem);
    padding: 2rem 1.5rem;
}
.sbh-404__code {
    font-size: 8rem;
    font-weight: 900;
    color: var(--yellow-text);
    line-height: 1;
    letter-spacing: -.04em;
}
.sbh-404__title {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-white);
    text-transform: uppercase;
    margin: 1rem 0 .75rem;
}
.sbh-404__desc { color: var(--text-muted); margin-bottom: 2rem; max-width: 28rem; }

/* ─────────────────────────────────────────────────────────────────────────────
   PAGINATION
───────────────────────────────────────────────────────────────────────────── */

/* WordPress the_posts_pagination() wraps links in .nav-links */
.sbh-pagination { margin-top: 3rem; }

.sbh-pagination .nav-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: .5rem;
}

.sbh-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 .75rem;
    background-color: var(--bg-card);
    color: var(--text-base);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    font-size: .875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background-color .2s, border-color .2s, color .2s;
}
.sbh-pagination .page-numbers:hover,
.sbh-pagination .page-numbers.current {
    background-color: var(--yellow);
    border-color: var(--yellow);
    color: #000;
    font-weight: 700;
}

/* ─────────────────────────────────────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────────────────────────────────────── */

.sbh-footer {
    background-color: var(--bg);
    color: var(--text-white);
    padding: 3rem 0 0;
}

.sbh-footer__inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1rem;
}

.sbh-footer__grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    align-items: start;
    padding-bottom: 2rem;
}

.sbh-footer__heading {
    font-size: .875rem;
    font-weight: 600;
    color: var(--yellow-dark);
    margin-bottom: .75rem;
}

.sbh-footer__links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .375rem .75rem;
    list-style: none;
    margin: 0; padding: 0;
}
.sbh-footer__links li a {
    font-size: .8125rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color .2s;
}
.sbh-footer__links li a:hover { color: var(--yellow-dark); }

.sbh-footer__col--center { text-align: center; }

.sbh-footer__brand {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--yellow-dark);
    text-decoration: none;
    display: inline-block;
    margin-bottom: .75rem;
}
.sbh-footer__brand:hover { color: var(--yellow); }

.sbh-footer__tagline {
    font-size: .8125rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.sbh-footer__col--right { text-align: right; }

.sbh-footer__phone {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    font-size: .8125rem;
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: .75rem;
    transition: color .2s;
    margin-top: 1.75rem;
}
.sbh-footer__phone:hover { color: var(--yellow-dark); }

.sbh-footer__social {
    display: flex;
    justify-content: flex-end;
    gap: .625rem;
    flex-wrap: wrap;
    margin-top: .75rem;
}
.sbh-footer__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.875rem;
    height: 1.875rem;
    color: #9ca3af;
    border-radius: var(--r-sm);
    transition: color .2s;
    text-decoration: none;
}
.sbh-footer__social a:hover { color: var(--text-white); }
.sbh-footer__social svg { width: 1rem; height: 1rem; fill: currentColor; flex-shrink: 0; }

.sbh-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.25rem 0 1.5rem;
    border-top: 1px solid rgba(255,255,255,.1);
}
.sbh-footer__copy { font-size: .8125rem; color: var(--text-muted); margin: 0; }
.sbh-footer__legal { display: flex; gap: 1.5rem; }
.sbh-footer__legal a {
    font-size: .8125rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color .2s;
}
.sbh-footer__legal a:hover { color: var(--yellow-dark); }

/* ─────────────────────────────────────────────────────────────────────────────
   ANIMATIONS
───────────────────────────────────────────────────────────────────────────── */

@keyframes sbh-fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────────────────────────────────────────────
   WORDPRESS BLOCK / GUTENBERG OVERRIDES
───────────────────────────────────────────────────────────────────────────── */

.wp-block-image img { border-radius: var(--r-xl); border: 1px solid var(--border-mid); }
.wp-block-quote {
    border-left: 4px solid var(--green);
    background: var(--bg-card);
    padding: 1rem 1.5rem;
    border-radius: 0 var(--r-xl) var(--r-xl) 0;
    margin: 2rem 0;
}
.wp-block-code { background: var(--bg-card); border: 1px solid var(--border-mid); color: var(--text-base); border-radius: var(--r-xl); }
.wp-block-separator { border-color: var(--border-mid); }

/* Comments — kept hidden (Disable Comments plugin) */
.comments-area { display: none; }

/* ─────────────────────────────────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────────────────────────────────── */

@media (min-width: 640px) {
    .sbh-post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
    .sbh-post-grid { grid-template-columns: repeat(3, 1fr); }
    .sbh-header__inner { padding: .375rem 2rem .25rem; }
}

@media (min-width: 768px) {
    .sbh-hamburger { display: none !important; }
}

@media (max-width: 767px) {
    .sbh-header__top { grid-template-columns: 1fr auto; }
    .sbh-header__phone { display: none; }
    .sbh-header__main-site { display: none; }
    .sbh-header__nav { display: none; }
    .sbh-hamburger { display: flex !important; }

    .sbh-post-grid { grid-template-columns: 1fr; gap: 1.25rem; }
    .sbh-blog-index { padding: 2.5rem 1rem 4rem; }
    .sbh-blog-index__header { margin-bottom: 2.5rem; }

    .sbh-footer__grid { grid-template-columns: 1fr; }
    .sbh-footer__col--center,
    .sbh-footer__col--right { text-align: left; }
    .sbh-footer__social { justify-content: flex-start; }
    .sbh-footer__phone { margin-top: 0; }
    .sbh-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ─────────────────────────────────────────────────────────────────────────────
   REDUCED MOTION
───────────────────────────────────────────────────────────────────────────── */

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