/*
Theme Name: BetterBuys Developer
Theme URI: https://betterbuys.com
Author: BetterBuys
Author URI: https://betterbuys.com
Description: A premium editorial theme for software reviews. Clean, modern design inspired by top-tier editorial publications, built for reviewing and comparing business software.
Version: 4.7.1
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: betterbuys
Tags: editorial, reviews, software, business, custom-logo, custom-menu, featured-images

BetterBuys Developer Theme
Copyright 2024-2026 BetterBuys
*/

/* ==========================================================================
   @font-face — Satoshi (local)
   ========================================================================== */

@font-face { font-family: 'Satoshi'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/satoshi-400.woff2') format('woff2'); }
@font-face { font-family: 'Satoshi'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/fonts/satoshi-500.woff2') format('woff2'); }
@font-face { font-family: 'Satoshi'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/satoshi-700.woff2') format('woff2'); }
@font-face { font-family: 'Satoshi'; font-style: normal; font-weight: 900; font-display: swap; src: url('assets/fonts/satoshi-900.woff2') format('woff2'); }

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
    /* Colors */
    --color-white: #FFFFFF;
    --color-offwhite: #F8FAFC;
    --color-gray-50: #F9FAFB;
    --color-gray-100: #F3F4F6;
    --color-gray-200: #E5E7EB;
    --color-gray-300: #D1D5DB;
    --color-gray-400: #9CA3AF;
    --color-gray-500: #6B7280;
    --color-gray-600: #4B5563;
    --color-gray-700: #374151;
    --color-gray-800: #1F2937;
    --color-charcoal: #1A1A2E;
    --color-footer-bg: #0F1520;
    --color-teal: #2D8CFF;
    --color-teal-dark: #1A7AEE;
    --color-teal-light: #E0EFFE;
    --color-star: #F59E0B;
    --color-success: #10B981;
    --color-danger: #EF4444;

    /* Typography */
    --font-heading: 'Satoshi', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

    /* Font Sizes — modular scale (1.25) */
    --text-xs: 0.75rem;
    --text-sm: 0.8125rem;
    --text-base: 1rem;
    --text-md: 1.0625rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;

    /* Font Weights */
    --weight-normal: 400;
    --weight-medium: 500;
    --weight-semibold: 600;
    --weight-bold: 700;

    /* Line Heights */
    --leading-tight: 1.2;
    --leading-snug: 1.375;
    --leading-normal: 1.6;
    --leading-relaxed: 1.75;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Layout */
    --container-max: 1200px;
    --container-narrow: 800px;
    --container-wide: 1400px;
    --sidebar-width: 320px;

    /* Borders */
    --border-thin: 1px solid var(--color-gray-200);
    --border-medium: 2px solid var(--color-gray-200);
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 10px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;

    /* Z-index layers */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-toast: 500;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

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

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

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--weight-normal);
    line-height: var(--leading-normal);
    color: var(--color-charcoal);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

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

a {
    color: var(--color-teal);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-teal-dark);
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: var(--weight-bold);
    line-height: var(--leading-tight);
    color: var(--color-charcoal);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
    margin-bottom: var(--space-md);
}

p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-xl);
    padding-right: var(--space-xl);
}

.container--narrow {
    max-width: var(--container-narrow);
}

.container--wide {
    max-width: var(--container-wide);
}

.site-content {
    min-height: 60vh;
}

/* ==========================================================================
   Site Header — v5 (design_5)
   ========================================================================== */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #e5e7eb;
}

.header .container {
    display: flex;
    align-items: center;
    height: 72px;
    gap: 32px;
}

/* ---- Logo ---- */
.logo { display: flex; align-items: center; text-decoration: none; flex: 1 1 0; min-width: 0; }
.logo-img { height: 38px; width: auto; display: block; }
.logo-img--footer { height: 34px; }

/* ---- Navigation ---- */
.nav-links { display: flex; gap: 24px; align-items: center; list-style: none; margin: 0; padding: 0; }
.nav-links li { list-style: none; margin: 0; padding: 0; }
.nav-links a,
.nav-links li a { font-size: 1.02rem; font-weight: 500; color: #374151; transition: color .2s; text-decoration: none; white-space: nowrap; }
.nav-links a:hover,
.nav-links li a:hover,
.nav-links a.active,
.nav-links .current-menu-item > a { color: #0aa1e2; }

/* ---- Categories Mega Menu ---- */
.nav-dropdown { position: relative; list-style: none; margin: 0; padding: 0; }
.nav-dropdown__trigger { display: inline-flex; align-items: center; cursor: pointer; }
.nav-dropdown__trigger i,
.nav-dropdown__trigger svg { transition: transform .25s ease; transform-origin: center center; }
.nav-dropdown:hover .nav-dropdown__trigger i,
.nav-dropdown:hover .nav-dropdown__trigger svg { transform: rotate(180deg) translateY(2px); }
.nav-dropdown__panel { position: absolute; top: calc(100% + 10px); left: 0; right: auto; width: 560px; background: #fff; border: 1px solid #e5e7eb; border-radius: 14px; box-shadow: 0 16px 40px -8px rgba(11,18,32,.14); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .2s, transform .2s, visibility .2s; z-index: 110; }
.nav-dropdown:hover .nav-dropdown__panel,
.nav-dropdown__panel:hover { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-dropdown__inner { max-width: none; margin: 0; padding: 14px; }
.nav-dropdown__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px 6px; }
.nav-dropdown__item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 8px; font-size: 0.85rem; font-weight: 500; color: #374151; transition: background .15s, color .15s; text-decoration: none; }
.nav-dropdown__item:hover { background: #f0f9ff; color: #0aa1e2; }
.nav-dropdown__item i { font-size: 15px; color: #9ca3af; transition: color .15s; width: 18px; text-align: center; }
.nav-dropdown__item:hover i { color: #0aa1e2; }
.nav-dropdown__footer { margin-top: 14px; padding-top: 14px; border-top: 1px solid #e5e7eb; text-align: center; }
.nav-dropdown__footer a { font-size: 0.85rem; font-weight: 600; color: #0aa1e2; text-decoration: none; }
.nav-dropdown__footer a:hover { text-decoration: underline; }

/* ---- Header actions ---- */
.header-actions { display: flex; align-items: center; gap: 12px; flex: 1 1 0; justify-content: flex-end; }
.header-cta { display: inline-flex; align-items: center; gap: 8px; background: #0aa1e2; color: #fff; font-family: var(--font-body), sans-serif; font-size: 0.95rem; font-weight: 600; padding: 11px 22px; border-radius: 10px; white-space: nowrap; transition: background .2s, transform .15s, box-shadow .2s; }
.header-cta:hover { background: #0880b5; color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(10,161,226,.25); }

/* Search bar */
.header-search { display: flex; align-items: center; position: relative; }
.header-search__input { width: 260px; height: 40px; padding: 0 40px 0 14px; border: 1.5px solid #e5e7eb; border-radius: 10px; font-family: var(--font-body); font-size: 0.88rem; font-weight: 400; color: #111827; background: #f9fafb; outline: none; transition: all .2s; }
.header-search__input::placeholder { color: #9ca3af; font-weight: 400; }
.header-search__input:focus { border-color: #0aa1e2; background: #fff; box-shadow: 0 0 0 3px rgba(10,161,226,.1); width: 300px; }
.header-search__btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: #9ca3af; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 6px; transition: color .2s; }
.header-search__btn:hover { color: #0aa1e2; }
.header-search__btn svg { width: 16px; height: 16px; }

.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body); font-weight: 600; border: none; cursor: pointer; transition: all .2s; border-radius: 10px; font-size: 0.95rem; padding: 14px 28px; text-decoration: none; }
.btn-primary { background: #0aa1e2; color: #fff; }
.btn-primary:hover { background: #0880b5; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(10,161,226,.25); }

/* ---- Search Toggle (tablet/mobile) ---- */
.search-toggle { display: none; background: none; border: none; cursor: pointer; color: #111827; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 8px; transition: background .2s; }
.search-toggle:hover { background: #f9fafb; }

/* ---- Search Overlay ---- */
.search-overlay { display: none; background: #fff; border-bottom: 1px solid #e5e7eb; padding: 0; }
.search-overlay.open { display: block; }
.search-overlay__inner { padding: 10px 16px; max-width: 1200px; margin: 0 auto; }
.search-overlay__form { display: flex; align-items: center; gap: 12px; max-width: 600px; margin: 0 auto; }
.search-overlay__input { flex: 1; height: 40px; padding: 0 14px; border: 1px solid #e5e7eb; border-radius: 8px; font-family: var(--font-body); font-size: 0.9rem; color: #111827; background: #f9fafb; outline: none; -webkit-appearance: none; }
.search-overlay__input:focus { border-color: #0aa1e2; background: #fff; box-shadow: 0 0 0 3px rgba(10,161,226,.1); }
.search-overlay__input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.search-overlay__close { background: none; border: none; cursor: pointer; color: #9ca3af; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: color .2s; flex-shrink: 0; }
.search-overlay__close:hover { color: #111827; }
.search-overlay__close svg { width: 18px; height: 18px; stroke-width: 2; }

/* ---- Mobile Toggle ---- */
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; color: #111827; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 8px; transition: background .2s; }
.mobile-toggle:hover { background: #f9fafb; }

/* ---- Mobile Menu ---- */
.mobile-menu { display: none; position: fixed; top: 56px; left: 0; width: 100%; bottom: 0; background: #fff; z-index: 9999; padding: 16px; flex-direction: column; gap: 0; overflow-y: auto; border-top: 1px solid #e5e7eb; animation: menuSlideDown .25s ease-out; }
.mobile-menu.open { display: flex; }
.mobile-menu a { display: block; padding: 12px 14px; font-size: 0.95rem; font-weight: 600; color: #374151; border-radius: 8px; transition: all .15s; text-decoration: none; }
.mobile-menu a:hover,
.mobile-menu a.active { background: #f9fafb; color: #0aa1e2; }
.mobile-menu .mobile-cta { margin-top: 12px; text-align: center; justify-content: center; padding: 12px 20px; font-size: 0.9rem; }

.mobile-menu li { list-style: none; }
.mobile-menu li a { display: block; padding: 14px 16px; font-size: 1.05rem; font-weight: 600; color: #374151; border-radius: 10px; transition: all .15s; text-decoration: none; }
.mobile-menu li a:hover { background: #f9fafb; color: #0aa1e2; }

/* ---- Mobile Menu Dropdown (Categories) ---- */
.mobile-menu__dropdown { }
.mobile-menu__dropdown-trigger { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 12px 14px; font-size: 0.95rem; font-weight: 600; color: #374151; background: none; border: none; border-radius: 8px; cursor: pointer; text-align: left; transition: all .15s; font-family: var(--font-body); }
.mobile-menu__dropdown-trigger:hover { background: #f9fafb; color: #0aa1e2; }
.mobile-menu__dropdown-trigger svg { transition: transform .25s; flex-shrink: 0; }
.mobile-menu__dropdown.open .mobile-menu__dropdown-trigger svg { transform: rotate(180deg); }
.mobile-menu__dropdown-panel { display: none; padding: 4px 0 8px 16px; }
.mobile-menu__dropdown.open .mobile-menu__dropdown-panel { display: block; }
.mobile-menu__dropdown-panel a { display: block; padding: 10px 16px; font-size: 0.95rem; font-weight: 500; color: #4b5563; border-radius: 8px; text-decoration: none; transition: all .15s; }
.mobile-menu__dropdown-panel a:hover { background: #f0f9ff; color: #0aa1e2; }
.mobile-menu__cat-all { font-weight: 600 !important; color: #0aa1e2 !important; border-bottom: 1px solid #e5e7eb; margin-bottom: 4px; padding-bottom: 10px !important; }

@keyframes menuSlideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Skip link ---- */
.skip-link { position: absolute; top: -100%; left: 16px; z-index: 200; padding: 12px 24px; background: #111827; color: #fff; font-family: var(--font-body); font-weight: 600; font-size: 0.9rem; border-radius: 0 0 8px 8px; transition: top .2s; text-decoration: none; }
.skip-link:focus { top: 0; }

/* ==========================================================================
   Footer — v5 (design_5) 4-column grid
   ========================================================================== */

.footer { background: #111827; color: rgba(255,255,255,.7); padding: 56px 0 24px; font-family: var(--font-body); }
.footer a { text-decoration: none; color: inherit; }
.footer-top { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-brand > p { font-size: 0.9rem; margin-top: 14px; line-height: 1.7; }
.footer-contact { margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.footer-contact-item { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.footer-contact-item i { color: #0aa1e2; font-size: 14px; }
.footer-social { display: flex; gap: 10px; margin-top: 20px; }
.footer-social a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.15); display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.6); font-size: 15px; transition: all .2s; }
.footer-social a:hover { border-color: #0aa1e2; color: #0aa1e2; background: rgba(10,161,226,.1); }
.footer-col h4 { font-size: 0.9rem; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 18px; font-family: var(--font-heading); }
.footer-col ul { display: flex; flex-direction: column; gap: 12px; list-style: none; margin: 0; padding: 0; }
.footer-col a { font-size: 0.9rem; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding-top: 24px; font-size: 0.85rem; color: rgba(255,255,255,.4); }
.footer-bottom-links { display: flex; gap: 20px; }
.footer-bottom-links a { color: rgba(255,255,255,.4); transition: color .2s; }
.footer-bottom-links a:hover { color: rgba(255,255,255,.7); }

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
    background: var(--color-white);
    border: var(--border-thin);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}

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

.card__image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.card:hover .card__image img {
    transform: scale(1.03);
}

.card__badge {
    position: absolute;
    top: var(--space-md);
    left: var(--space-md);
    padding: 4px 10px;
    background: var(--color-teal);
    color: var(--color-white);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.card__body {
    padding: var(--space-lg);
}

.card__category {
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    color: var(--color-teal);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: var(--space-sm);
}

.card__title {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: var(--weight-bold);
    line-height: var(--leading-snug);
    margin-bottom: var(--space-sm);
}

.card__title a {
    color: var(--color-charcoal);
}

.card__title a:hover {
    color: var(--color-teal);
}

.card__excerpt {
    font-size: var(--text-sm);
    color: var(--color-gray-600);
    line-height: var(--leading-normal);
    margin-bottom: var(--space-md);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card__meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--text-xs);
    color: var(--color-gray-500);
}

.card__meta-divider {
    width: 3px;
    height: 3px;
    background: var(--color-gray-300);
    border-radius: var(--radius-full);
}

/* ==========================================================================
   Posts Grid
   ========================================================================== */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

/* ==========================================================================
   Page Hero
   ========================================================================== */

.page-hero {
    margin-bottom: var(--space-2xl);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.page-hero__image {
    width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   No Results
   ========================================================================== */

.no-results {
    text-align: center;
    padding: var(--space-4xl) var(--space-xl);
}

.no-results h2 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-md);
}

.no-results p {
    color: var(--color-gray-500);
    font-size: var(--text-lg);
    margin-bottom: var(--space-xl);
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}

.no-results .search-form {
    display: flex;
    max-width: 400px;
    margin: 0 auto;
    gap: var(--space-sm);
}

.no-results .search-field {
    flex-grow: 1;
    padding: 12px 16px;
    border: var(--border-thin);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    outline: none;
    transition: border-color var(--transition-fast);
}

.no-results .search-field:focus {
    border-color: var(--color-teal);
}

.no-results .search-submit {
    padding: 12px 24px;
    background: var(--color-teal);
    color: var(--color-white);
    border: none;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.no-results .search-submit:hover {
    background: var(--color-teal-dark);
}

/* ==========================================================================
   Star Rating
   ========================================================================== */

.star-rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.star-rating__star {
    color: var(--color-gray-300);
    width: 16px;
    height: 16px;
}

.star-rating__star--filled {
    color: var(--color-star);
}

.star-rating__star--half {
    color: var(--color-star);
}

.star-rating__value {
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    color: var(--color-charcoal);
    margin-left: var(--space-xs);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 12px 24px;
    font-size: var(--text-sm);
    font-weight: var(--weight-semibold);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    line-height: 1;
    white-space: nowrap;
}

.btn--primary {
    background: var(--color-teal);
    color: var(--color-white);
}

.btn--primary:hover {
    background: var(--color-teal-dark);
    color: var(--color-white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn--outline {
    background: transparent;
    color: var(--color-teal);
    border: 1px solid var(--color-teal);
}

.btn--outline:hover {
    background: var(--color-teal);
    color: var(--color-white);
}

.btn--ghost {
    background: transparent;
    color: var(--color-gray-600);
}

.btn--ghost:hover {
    color: var(--color-charcoal);
    background: var(--color-gray-100);
}

.btn--sm {
    padding: 8px 16px;
    font-size: var(--text-xs);
}

.btn--lg {
    padding: 16px 32px;
    font-size: var(--text-base);
}

/* ==========================================================================
   Page Templates
   ========================================================================== */

.page-header {
    padding: var(--space-3xl) 0;
    background: var(--color-offwhite);
    border-bottom: var(--border-thin);
}

.page-header__title {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-sm);
}

.page-header__subtitle {
    font-size: var(--text-lg);
    color: var(--color-gray-500);
    font-family: var(--font-body);
    font-weight: var(--weight-normal);
}

.page-body {
    padding: var(--space-3xl) 0;
}

.page-body .entry-content {
    max-width: var(--container-narrow);
    margin: 0 auto;
}

.entry-content h2 {
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
}

.entry-content h3 {
    margin-top: var(--space-xl);
    margin-bottom: var(--space-md);
}

.entry-content p {
    margin-bottom: var(--space-md);
    line-height: var(--leading-relaxed);
}

.entry-content ul,
.entry-content ol {
    margin-bottom: var(--space-md);
    padding-left: var(--space-xl);
}

.entry-content ul {
    list-style: disc;
}

.entry-content ol {
    list-style: decimal;
}

.entry-content li {
    margin-bottom: var(--space-sm);
    line-height: var(--leading-normal);
}

.entry-content blockquote {
    border-left: 3px solid var(--color-teal);
    padding-left: var(--space-xl);
    margin: var(--space-xl) 0;
    font-style: italic;
    color: var(--color-gray-600);
}

.entry-content img {
    border-radius: var(--radius-md);
    margin: var(--space-xl) 0;
}

.entry-content a {
    color: var(--color-teal);
    text-decoration: underline;
    text-decoration-color: rgba(8, 145, 178, 0.3);
    text-underline-offset: 2px;
}

.entry-content a:hover {
    text-decoration-color: var(--color-teal);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: var(--space-2xl) 0;
}

.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: var(--weight-medium);
    color: var(--color-gray-600);
    transition: all var(--transition-fast);
}

.pagination .page-numbers:hover {
    background: var(--color-gray-100);
    color: var(--color-charcoal);
}

.pagination .page-numbers.current {
    background: var(--color-teal);
    color: var(--color-white);
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    word-wrap: normal;
}

.screen-reader-text:focus {
    clip: auto;
    display: block;
    width: auto;
    height: auto;
    left: 5px;
    top: 5px;
    padding: 15px 23px;
    background: var(--color-white);
    color: var(--color-charcoal);
    font-size: var(--text-sm);
    font-weight: var(--weight-bold);
    z-index: 100000;
    border: 2px solid var(--color-teal);
    border-radius: var(--radius-sm);
}

:focus-visible {
    outline: 2px solid var(--color-teal);
    outline-offset: 2px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    :root {
        --text-4xl: 1.875rem;
        --text-3xl: 1.5rem;
        --text-2xl: 1.25rem;
    }

    .container {
        padding-left: var(--space-md);
        padding-right: var(--space-md);
    }

    /* Header: compact on mobile */
    .header .container { height: 56px; gap: 12px; }
    .logo-img { height: 30px; }
    .nav-links { display: none; }
    .header-actions { display: none !important; }
    .mobile-toggle { display: flex; width: 36px; height: 36px; }
    .search-toggle { display: flex; margin-left: auto; width: 36px; height: 36px; }
    .nav-dropdown__panel { display: none !important; }

    /* Footer: stack on small screens */
    .footer-top { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }

    .page-header {
        padding: var(--space-xl) 0;
    }

    .page-body {
        padding: var(--space-xl) 0;
    }
}

@media (max-width: 782px) {
    html #wpadminbar ~ #mobileMenu.open,
    .admin-bar .mobile-menu.open { margin-top: 47px; }
}

@media (max-width: 480px) {
    .logo-name { font-size: 1.1rem; }
}

@media (max-width: 1024px) {
    .footer-top { grid-template-columns: 1fr 1fr; }
    .header-actions { display: none !important; }
    .search-toggle { display: flex; margin-left: auto; }
    .mobile-toggle { display: flex; }
    .header .container { gap: 16px; }
}
