/* ==========================================================================
   STACKED THEME - Silverstripe CSS
   Brand colors, typography, and component styles
   Version: 2.1 - Updated styling fixes
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. IMPORT WEB FONT FALLBACKS
   -------------------------------------------------------------------------- */
@import url("../fonts/web-fonts.css");

/* --------------------------------------------------------------------------
   1. FONT LOADING STRATEGY
   -------------------------------------------------------------------------- */

/* Gotham fonts - only loading the weights we have available */
@font-face {
    font-family: "Gotham-Book";
    src: url("../fonts/Gotham-Book.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Gotham-Bold";
    src: url("../fonts/Gotham-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* --------------------------------------------------------------------------
   2. CSS VARIABLES
   -------------------------------------------------------------------------- */
:root {
    /* Brand Colors - from Stacked UX Brand Guidelines */
    --stacked-background: #161718; /* Stacked Slate */
    --stacked-background-light: #222323; /* Light Slate */
    --stacked-primary: #14afac; /* Stacked Teal */
    --stacked-primary-hover: #14afac; /* Keep palette-aligned teal */
    --stacked-accent: #ffffff; /* White - was Teal light mode */
    --stacked-text: #ffffff;
    --stacked-text-muted: #ffffff;
    --stacked-border: #222323;
    --stacked-card: #222323;

    /* Typography */
    --font-family:
        "Gotham", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, sans-serif;
    --font-family-heading:
        "Gotham", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, sans-serif;
    --font-family-body:
        "Gotham", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, sans-serif;
    --font-family-gotham:
        "Gotham", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, sans-serif;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    --header-height-desktop: 82px;
    --header-height-mobile: 78px;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

/* --------------------------------------------------------------------------
   3. BASE STYLES
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-family-gotham);
    font-weight: 400;
    line-height: 1.6;
    color: var(--stacked-text);
    background-color: var(--stacked-background);
    margin: 0;
    padding: 0;
}

/* Explicit Gotham font usage */
.font-gotham,
.font-gotham *,
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
div,
a,
button,
li {
    font-family: var(--font-family-gotham) !important;
}

/* --------------------------------------------------------------------------
   4. TYPOGRAPHY
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 var(--spacing-md) 0;
    color: var(--stacked-text);
}

h1 {
    font-size: 2.5rem;
}
h2 {
    font-size: 2rem;
}
h3 {
    font-size: 1.5rem;
}
h4 {
    font-size: 1.25rem;
}
h5 {
    font-size: 1rem;
}
h6 {
    font-size: 0.875rem;
}

p {
    margin: 0 0 var(--spacing-md) 0;
    color: var(--stacked-text);
}

a {
    color: var(--stacked-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--stacked-accent);
}

/* In-text content links use brand teal */
.page-intro a,
.article-body a,
.article-content a,
.news-article-content a,
.help-article-content a,
.category-description a,
.popular-article-content a,
.faq-answer a {
    color: var(--stacked-primary);
}

.page-intro a:hover,
.article-body a:hover,
.article-content a:hover,
.news-article-content a:hover,
.help-article-content a:hover,
.category-description a:hover,
.popular-article-content a:hover,
.faq-answer a:hover {
    color: var(--stacked-primary);
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   5. LAYOUT
   -------------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1.25rem, 3vw, 2rem);
}

.container-narrow {
    max-width: 800px;
}

/* --------------------------------------------------------------------------
   6. HEADER
   -------------------------------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #222323;
    backdrop-filter: blur(12px);
    border-bottom: none;
    padding: 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: var(--header-height-desktop);
    padding-top: 0.25rem;
}

.site-logo img {
    height: 61px;
    width: auto;
}

.site-logo-mobile {
    display: none;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    color: var(--stacked-text);
    border: 0;
    padding: 0.75rem;
    cursor: pointer;
}

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

.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(22, 23, 24, 0.8);
    z-index: 1001;
}

.mobile-menu-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: min(86vw, 360px);
    height: 100vh;
    overflow-y: auto;
    background: var(--stacked-background);
    border-left: 1px solid var(--stacked-border);
    z-index: 1002;
    padding: 5.5rem 1.25rem 1.5rem;
}

.mobile-menu-section {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.mobile-menu-label {
    color: var(--stacked-text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 0.25rem;
}

.mobile-menu-link {
    display: block;
    color: var(--stacked-accent);
    padding: 0.5rem 0.25rem;
    font-size: 0.9375rem;
}

.mobile-menu-link:hover {
    color: var(--stacked-text);
    text-decoration: underline;
}

.mobile-menu-cta {
    display: flex;
    gap: 0.625rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--stacked-border);
}

.mobile-menu-cta .btn {
    flex: 1;
    min-width: 0;
    padding: 0.65rem 0.75rem;
    font-size: 0.875rem;
}

body.mobile-menu-open {
    overflow: hidden;
}

body.mobile-menu-open .mobile-menu-overlay,
body.mobile-menu-open .mobile-menu-drawer {
    display: block;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
}

.main-nav a {
    color: var(--stacked-accent);
    font-size: 0.9375rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--stacked-accent);
}

.main-nav .btn-ghost,
.main-nav .btn-ghost:hover,
.main-nav .btn-primary,
.main-nav .btn-primary:hover {
    color: var(--stacked-text);
}

.site-header .main-nav .btn-primary,
.site-header .main-nav .btn-primary:hover {
    color: var(--stacked-background-light);
}

.header-cta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* --------------------------------------------------------------------------
   7. BUTTONS
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-family);
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--stacked-primary);
    color: var(--stacked-background);
    font-weight: 700;
}

.btn-primary:hover {
    background-color: var(--stacked-primary-hover);
    color: var(--stacked-background);
}

.btn-secondary {
    background-color: transparent;
    color: var(--stacked-accent);
    border: 1px solid var(--stacked-border);
}

.btn-secondary:hover {
    background-color: var(--stacked-background-light);
    color: var(--stacked-accent);
}

.btn-ghost {
    background-color: transparent;
    color: var(--stacked-accent);
}

.btn-ghost:hover {
    color: var(--stacked-accent);
}

/* --------------------------------------------------------------------------
   8. CARDS
   -------------------------------------------------------------------------- */
.card {
    background-color: var(--stacked-card);
    border: 1px solid var(--stacked-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    transition: border-color 0.2s ease;
}

.card:hover {
    border-color: var(--stacked-primary);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--stacked-text);
    margin-bottom: var(--spacing-sm);
}

.card-description {
    color: var(--stacked-text-muted);
    font-size: 0.9375rem;
}

/* --------------------------------------------------------------------------
   9. ARTICLE / CONTENT PAGES
   -------------------------------------------------------------------------- */
.page-content {
    padding: 1.75rem 2.5rem var(--spacing-3xl);
}

.article-header {
    margin-bottom: var(--spacing-2xl);
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--stacked-text);
    margin-bottom: var(--spacing-md);
}

.article-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    color: var(--stacked-text-muted);
    font-size: 0.875rem;
}

.article-meta .author {
    color: var(--stacked-accent);
}

.article-body {
    font-size: 1.0625rem;
    line-height: 1.8;
    padding: 2.5rem; /* 40px for readability */
}

.article-content {
    padding: 1.25rem 0 0; /* Standard gap from meta/date into article content */
}

.article-body h2 {
    margin-top: var(--spacing-2xl);
    margin-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--stacked-border);
    padding-bottom: 0.5rem;
    color: var(--stacked-text);
}

.article-body h3 {
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--stacked-border);
    padding-bottom: 0.25rem;
    color: var(--stacked-text);
}

.article-body p {
    margin-bottom: var(--spacing-lg);
}

.article-body ul,
.article-body ol {
    margin: 0 0 var(--spacing-lg) var(--spacing-xl);
    padding: 0;
}

.article-body li {
    margin-bottom: var(--spacing-sm);
}

.article-body blockquote {
    border-left: 3px solid var(--stacked-primary);
    padding-left: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
    color: var(--stacked-text-muted);
    font-style: italic;
}

.article-body code {
    background-color: var(--stacked-background-light);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    font-family: "SF Mono", Monaco, monospace;
    font-size: 0.875em;
}

.article-body pre {
    background-color: var(--stacked-background-light);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: var(--spacing-lg) 0;
}

.article-body pre code {
    background: none;
    padding: 0;
}

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: var(--spacing-lg) 0;
}

/* --------------------------------------------------------------------------
   10. NEWS / BLOG LISTING
   -------------------------------------------------------------------------- */
.news-listing-page,
.help-section-page,
.news-article-page,
.article-page {
    padding: 2rem 0 4rem;
}

.page-header {
    margin-bottom: 2rem;
}

.page-title {
    margin: 0 0 1rem;
    color: var(--stacked-primary);
}

.page-intro {
    max-width: 900px;
    color: var(--stacked-accent);
    font-size: 1.0625rem;
    margin-bottom: var(--spacing-xl);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-xl);
}

.news-card {
    background-color: var(--stacked-card);
    border: 1px solid var(--stacked-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition:
        border-color 0.2s ease,
        transform 0.2s ease;
}

.news-card-link {
    display: block;
    color: inherit;
}

.news-card:hover {
    border-color: var(--stacked-primary);
    transform: translateY(-2px);
}

.news-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card-content {
    padding: var(--spacing-lg);
}

.news-card-date {
    display: block;
    color: var(--stacked-text-muted);
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
}

.news-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--stacked-text);
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
}

.news-card-title a {
    color: inherit;
}

.news-card-title a:hover {
    color: var(--stacked-text);
    text-decoration: underline;
}

.news-card-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    color: var(--stacked-text);
    font-size: 0.8125rem;
}

.news-card-excerpt {
    color: var(--stacked-text);
    font-size: 0.9375rem;
    margin-top: var(--spacing-md);
    line-height: 1.6;
}

.empty-state {
    border: 1px solid var(--stacked-border);
    border-radius: var(--radius-lg);
    background: var(--stacked-card);
    padding: 1.25rem 1.5rem;
    color: var(--stacked-accent);
}

/* --------------------------------------------------------------------------
   11. HELP / SUPPORT PAGES
   -------------------------------------------------------------------------- */
.help-sidebar {
    position: sticky;
    top: 100px;
}

.help-section-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2.5rem;
    align-items: start;
}

.help-main {
    min-width: 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-title {
    font-size: 0.875rem;
    font-family:
        "Gotham-Bold",
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif !important;
    font-weight: 700 !important;
    color: var(--stacked-text);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--stacked-text);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
}

.sidebar-link:hover {
    background-color: var(--stacked-background-light);
    color: var(--stacked-text);
    opacity: 0.85;
}

.sidebar-link.is-active {
    background-color: var(--stacked-primary);
    color: var(--stacked-background);
    font-weight: 600;
}

.help-header .page-title {
    color: var(--stacked-primary);
}

.section-title {
    color: var(--stacked-text);
}

.help-search {
    margin: 1.25rem 0 1.75rem;
}

.help-search-form {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: min(760px, 100%);
}

.help-search-input {
    flex: 1;
    min-width: 0;
    height: 48px;
    border: 1px solid var(--stacked-border);
    border-radius: 12px;
    background: var(--stacked-card);
    color: var(--stacked-accent);
    padding: 0 1rem;
    font-size: 1rem;
    -webkit-appearance: none;
    appearance: none;
}

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

.help-search .btn {
    height: 48px;
    padding: 0 1.5rem;
}

.help-search-submit span {
    position: relative;
    top: 2px;
}

/* Help section spacing rhythm */
.help-categories {
    margin-top: 0.25rem;
    margin-bottom: 2.25rem;
}

.help-category-card {
    display: block;
    padding-bottom: 0.875rem;
    margin-bottom: 1.125rem;
    border-bottom: 1px solid var(--stacked-border);
}

.help-categories .help-category-card:last-child {
    margin-bottom: 0;
}

/* Help Center: 2-col grid of root sections (above search) */
.help-root-sections {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 2rem;
    margin-bottom: 1.75rem;
}

.help-root-sections .help-root-card {
    margin-bottom: 0;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--stacked-border);
    background: var(--stacked-card);
}

.help-root-sections .help-root-card:hover {
    background: var(--stacked-card);
    border-color: var(--stacked-primary);
}

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

.category-count {
    display: inline-block;
    margin-top: 0.75rem;
    color: var(--stacked-text-muted);
    font-size: 0.9375rem;
}

.category-title {
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.category-description {
    margin: 0;
    line-height: 1.45;
}

.help-popular {
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
}

.section-title {
    margin: 0 0 1rem;
    line-height: 1.2;
}

.help-faq {
    margin-top: 2.5rem;
}

.help-contact {
    margin-top: 2.75rem;
}

input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
}

/* Help article layout and navigation */
.help-article-page {
    padding: 2rem 0 4rem;
}

.help-article-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2.5rem;
    align-items: start;
}

.help-article-main {
    min-width: 0;
}

.help-article-title {
    color: var(--stacked-text);
    margin-bottom: 0.5rem;
}

.help-article-updated {
    color: var(--stacked-text-muted);
    font-size: 0.875rem;
}

.help-article-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--stacked-border);
}

.help-article-nav a {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.875rem 1rem;
    border: 1px solid var(--stacked-border);
    border-radius: var(--radius-md);
    background: var(--stacked-background-light);
    min-height: 84px;
}

.help-article-nav .nav-next {
    text-align: right;
}

.help-article-nav .nav-direction {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--stacked-text-muted);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.help-article-nav .nav-next .nav-direction {
    justify-content: flex-end;
}

.help-article-nav .nav-title {
    display: block;
    color: var(--stacked-accent);
    font-size: 0.96875rem;
    font-weight: 500;
    line-height: 1.35;
}

/* -------------------------------------------------------------------------
   HELP ARTICLE ENHANCEMENTS (Instagram & GifGaf style)
   -------------------------------------------------------------------------- */

/* Popular Articles Section (GifGaf-style) */
.popular-help-articles {
    margin-top: 2.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--stacked-border);
}

.popular-help-articles h3 {
    color: var(--stacked-accent);
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
}

.popular-articles-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    max-width: 680px;
}

.popular-article-card {
    display: block;
    padding: 0.625rem 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--stacked-border);
    border-radius: 0;
    text-decoration: none;
    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}

.popular-article-card:hover {
    color: var(--stacked-text);
    opacity: 0.95;
}

.popular-article-content h4 {
    color: var(--stacked-text);
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.35;
}

.popular-article-card:hover .popular-article-content h4 {
    color: var(--stacked-accent);
}

.popular-article-content p {
    display: none;
}

/* Still Need Help Section (GifGaf-style) */
.help-contact-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--stacked-border);
}

.help-contact-card {
    background: linear-gradient(
        135deg,
        var(--stacked-background-light) 0%,
        var(--stacked-card) 100%
    );
    border: 1px solid var(--stacked-border);
    border-radius: var(--radius-xl);
    padding: 3rem;
    text-align: center;
}

.help-contact-header {
    margin-bottom: 2rem;
}

.help-contact-header .contact-icon {
    color: var(--stacked-text);
    margin-bottom: 1.5rem;
}

.help-contact-header h3 {
    color: var(--stacked-text);
    margin-bottom: 1rem;
    font-size: 2rem;
}

.help-contact-header p {
    color: var(--stacked-text);
    font-size: 1.125rem;
    max-width: 500px;
    margin: 0 auto;
}

.help-contact-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.contact-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--stacked-background);
    border: 1px solid var(--stacked-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.2s ease;
}

.contact-option:hover {
    border-color: var(--stacked-primary);
    background: var(--stacked-background-light);
    transform: translateY(-2px);
}

.contact-option .option-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--stacked-primary);
    color: var(--stacked-background);
    border-radius: 50%;
}

.contact-option .option-content h4 {
    color: var(--stacked-text);
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.contact-option .option-content p {
    color: var(--stacked-text);
    margin: 0;
    font-size: 0.875rem;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    padding-left: 0;
    padding-right: 0;
    font-size: 0.875rem;
    color: var(--stacked-text-muted);
    margin-bottom: 1rem;
    line-height: 1.35;
}

.breadcrumbs a {
    color: var(--stacked-text-muted);
}

.breadcrumbs a:hover {
    color: var(--stacked-accent);
}

.breadcrumbs .separator {
    color: var(--stacked-text-muted);
    opacity: 0.55;
    margin: 0 0.625rem;
}

main {
    padding-top: var(--header-height-desktop);
}

/* --------------------------------------------------------------------------
   12. FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
    background-color: var(--stacked-background-light);
    border-top: 1px solid var(--stacked-border);
    padding: var(--spacing-3xl) 0 var(--spacing-xl);
    margin-top: var(--spacing-3xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-2xl);
    margin-bottom: var(--spacing-2xl);
}

.footer-column-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--stacked-text);
    margin-bottom: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: var(--stacked-text);
    font-size: 0.9375rem;
}

.footer-links a:hover {
    color: var(--stacked-accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--stacked-border);
    color: var(--stacked-text-muted);
    font-size: 0.8125rem;
}

.footer-bottom-legal {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.footer-bottom-tagline {
    text-align: right;
    flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   13. PAGINATION
   -------------------------------------------------------------------------- */

ul.pagination {
    list-style: none;
}
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-2xl);
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.pagination .pagination-link,
.pagination .pagination-current,
.pagination .pagination-ellipsis {
    width: 40px;
    min-width: 40px;
    padding: 0;
}

.pagination a {
    color: var(--stacked-text-muted);
    border: 1px solid var(--stacked-border);
}

.pagination a:hover {
    border-color: var(--stacked-primary);
    color: var(--stacked-accent);
}

.pagination .current {
    background-color: var(--stacked-primary);
    color: var(--stacked-background);
    border: 1px solid var(--stacked-primary);
}

.pagination-current {
    background-color: var(--stacked-primary);
    color: var(--stacked-background);
    border: 1px solid var(--stacked-primary);
}

/* --------------------------------------------------------------------------
   14. FORMS
   -------------------------------------------------------------------------- */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--stacked-accent);
    margin-bottom: var(--spacing-sm);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-family);
    font-size: 1rem;
    color: var(--stacked-text);
    background-color: var(--stacked-background);
    border: 1px solid var(--stacked-border);
    border-radius: var(--radius-md);
    transition: border-color 0.2s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--stacked-primary);
}

.form-input::placeholder {
    color: var(--stacked-text-muted);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

/* --------------------------------------------------------------------------
   15. UTILITIES
   -------------------------------------------------------------------------- */
.text-primary {
    color: var(--stacked-primary);
}
.text-accent {
    color: var(--stacked-accent);
}
.text-muted {
    color: var(--stacked-text-muted);
}

.bg-dark {
    background-color: var(--stacked-background);
}
.bg-card {
    background-color: var(--stacked-card);
}

.mt-0 {
    margin-top: 0;
}
.mt-1 {
    margin-top: var(--spacing-sm);
}
.mt-2 {
    margin-top: var(--spacing-md);
}
.mt-3 {
    margin-top: var(--spacing-lg);
}
.mt-4 {
    margin-top: var(--spacing-xl);
}

.mb-0 {
    margin-bottom: 0;
}
.mb-1 {
    margin-bottom: var(--spacing-sm);
}
.mb-2 {
    margin-bottom: var(--spacing-md);
}
.mb-3 {
    margin-bottom: var(--spacing-lg);
}
.mb-4 {
    margin-bottom: var(--spacing-xl);
}

.text-center {
    text-align: center;
}
.text-left {
    text-align: left;
}
.text-right {
    text-align: right;
}

/* --------------------------------------------------------------------------
   16. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.5rem;
    }
    h3 {
        font-size: 1.25rem;
    }

    .site-logo-desktop {
        display: none;
    }

    .site-logo-mobile {
        display: block;
        height: 44px;
        width: auto;
    }

    .main-nav {
        display: none;
    }

    .header-cta {
        display: none;
    }

    .mobile-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .help-article-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .help-sidebar {
        display: none;
    }

    .help-section-layout {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .help-search-form {
        width: 100%;
        gap: 0.5rem;
    }

    .help-search .btn {
        padding: 0 1.125rem;
    }

    .news-listing-page,
    .help-section-page,
    .news-article-page,
    .article-page,
    .help-article-page {
        padding: 1.25rem 0 2rem;
    }

    .page-header {
        margin-bottom: 1.5rem;
    }

    .help-search {
        margin: 1rem 0 1.5rem;
    }

    .help-categories {
        margin-bottom: 1.75rem;
    }

    .help-popular {
        margin-top: 1.75rem;
        margin-bottom: 2rem;
    }

    .help-contact {
        margin-top: 2rem;
    }

    .help-contact-card {
        padding: 1.5rem 1rem;
    }

    .help-contact-header h3 {
        font-size: 1.625rem;
    }

    .help-contact-header p,
    .contact-option .option-content p,
    .news-card-excerpt,
    .category-description,
    .page-intro {
        color: var(--stacked-text);
    }

    .pagination {
        margin-top: 1.5rem;
    }

    .pagination a,
    .pagination span {
        height: 38px;
        min-width: 38px;
    }

    .breadcrumbs {
        padding-left: 0;
        padding-right: 0;
        margin-bottom: 0.875rem;
    }

    .help-article-nav {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .help-article-nav .nav-next {
        text-align: left;
    }

    .help-article-nav .nav-next .nav-direction {
        justify-content: flex-start;
    }

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

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

    main {
        padding-top: var(--header-height-mobile);
    }

    .page-content {
        padding: 1rem 1.25rem var(--spacing-2xl);
    }

    .article-content {
        padding-top: 0.875rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }

    .footer-bottom-tagline {
        text-align: center;
    }

    .article-title {
        font-size: 1.75rem;
    }
}

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

    .btn {
        width: 100%;
    }

    .help-search .btn,
    .pagination .pagination-link,
    .pagination .pagination-current,
    .pagination .pagination-next,
    .pagination .pagination-prev {
        width: auto;
    }

    .help-search-form {
        align-items: stretch;
    }

    .help-search-input,
    .help-search .btn {
        height: 46px;
    }
}

/* -------------------------------------------------------------------------
   17. FONT LOADING OPTIMIZATION
   -------------------------------------------------------------------------- */

/* Prevent FOIT (Flash of Invisible Text) */
.font-loading {
    visibility: hidden;
}

.font-loaded {
    visibility: visible;
}

/* Font loading states for JavaScript control */
.wf-loading body {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wf-active body {
    font-family: var(--font-family);
}

.wf-inactive body {
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif;
}

/* -------------------------------------------------------------------------
   18. FONT UTILITY CLASSES
   -------------------------------------------------------------------------- */

/* Font family utilities */
.font-gotham {
    font-family: var(--font-family);
}
.font-inter {
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif;
}
.font-system {
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Font weight utilities */
.weight-thin {
    font-weight: 100;
}
.weight-xlight {
    font-weight: 200;
}
.weight-light {
    font-weight: 300;
}
.weight-book {
    font-weight: 400;
}
.weight-normal {
    font-weight: 400;
}
.weight-medium {
    font-weight: 500;
}
.weight-bold {
    font-weight: 700;
}
.weight-black {
    font-weight: 800;
}
.weight-ultra {
    font-weight: 900;
}

/* Font size utilities */
.text-xs {
    font-size: 0.75rem;
}
.text-sm {
    font-size: 0.875rem;
}
.text-base {
    font-size: 1rem;
}
.text-lg {
    font-size: 1.125rem;
}
.text-xl {
    font-size: 1.25rem;
}
.text-2xl {
    font-size: 1.5rem;
}
.text-3xl {
    font-size: 1.875rem;
}
.text-4xl {
    font-size: 2.25rem;
}
.text-5xl {
    font-size: 3rem;
}

/* Line height utilities */
.leading-none {
    line-height: 1;
}
.leading-tight {
    line-height: 1.25;
}
.leading-snug {
    line-height: 1.375;
}
.leading-normal {
    line-height: 1.5;
}
.leading-relaxed {
    line-height: 1.625;
}
.leading-loose {
    line-height: 2;
}

/* Letter spacing utilities */
.tracking-tighter {
    letter-spacing: -0.05em;
}
.tracking-tight {
    letter-spacing: -0.025em;
}
.tracking-normal {
    letter-spacing: 0;
}
.tracking-wide {
    letter-spacing: 0.025em;
}
.tracking-wider {
    letter-spacing: 0.05em;
}
.tracking-widest {
    letter-spacing: 0.1em;
}

/* -------------------------------------------------------------------------
   19. PRINT STYLES
   -------------------------------------------------------------------------- */

@media print {
    body {
        font-family: "Times New Roman", Times, serif;
        color: var(--stacked-background);
        background: var(--stacked-accent);
    }

    .site-header,
    .site-footer,
    .btn {
        display: none;
    }

    .page-content {
        padding-top: 0;
    }
}

/* ==========================================================================
   GOTHAM FONT ENFORCEMENT
   Enforce Gotham Bold for H1, Gotham Book for everything else
   ========================================================================== */

/* H1 Headings - Gotham Bold Only */
h1 {
    font-family:
        "Gotham-Bold",
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif !important;
    font-weight: 700 !important;
}

/* H2-H6 Headings - Gotham Book */
h2,
h3,
h4,
h5,
h6 {
    font-family:
        "Gotham-Book",
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif !important;
    font-weight: 400 !important;
}

/* Body Text - Gotham Book */
body,
p,
span,
div,
li,
td,
th {
    font-family:
        "Gotham-Book",
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif !important;
    font-weight: 400 !important;
}

/* Buttons - Gotham Book */
.btn,
button {
    font-family:
        "Gotham-Book",
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif !important;
    font-weight: 400 !important;
}

/* Links - Gotham Book */
a {
    font-family:
        "Gotham-Book",
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif !important;
    font-weight: 400 !important;
}

/* Navigation - Gotham Book */
.main-nav a,
.sidebar-link,
.footer-links a {
    font-family:
        "Gotham-Book",
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif !important;
    font-weight: 400 !important;
}

/* Specific Elements - Gotham Book */
.card-title,
.news-card-title,
.article-title,
.help-article-title {
    font-family:
        "Gotham-Book",
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif !important;
    font-weight: 400 !important;
}

/* Forms - Gotham Book */
input,
textarea,
select {
    font-family:
        "Gotham-Book",
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif !important;
    font-weight: 400 !important;
}

/* ── Article Feedback ── */
.article-feedback {
    text-align: center;
    padding: 2rem 0;
    margin: 2rem 0;
    border-top: 1px solid #e5e7eb;
}
.feedback-question {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}
.feedback-buttons {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}
.feedback-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.25rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #374151;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.15s ease;
}
.feedback-btn:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}
.feedback-btn.active,
.feedback-btn:disabled {
    opacity: 0.6;
    cursor: default;
}
.feedback-yes.active {
    background: #ecfdf5;
    border-color: #10b981;
    color: #059669;
    opacity: 1;
}
.feedback-no.active {
    background: #fef2f2;
    border-color: #ef4444;
    color: #dc2626;
    opacity: 1;
}

/* Feedback Modal */
.feedback-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9998;
}
.feedback-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    padding: 1.75rem;
    width: 90%;
    max-width: 480px;
    z-index: 9999;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}
.feedback-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.feedback-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    color: #111827;
}
.feedback-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.feedback-modal-close:hover {
    color: #374151;
}
.feedback-modal p {
    color: #6b7280;
    margin: 0 0 1rem;
    font-size: 0.95rem;
}
#feedback-comment {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.95rem;
    resize: vertical;
    box-sizing: border-box;
}
#feedback-comment:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}
#feedback-comment.feedback-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}
.feedback-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
}
.feedback-modal-skip {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    font-size: 0.9rem;
}
.feedback-modal-skip:hover {
    background: #f9fafb;
}
.feedback-modal-submit {
    padding: 0.5rem 1.25rem;
    border: none;
    border-radius: 8px;
    background: #4f46e5;
    color: #fff;
    cursor: pointer;
    font-size: 0.9rem;
}
.feedback-modal-submit:hover {
    background: #4338ca;
}
.feedback-modal-submit:disabled {
    opacity: 0.6;
    cursor: default;
}
