/* ─────────────────────────────────────────────────────
   FANATYCO HELP CENTER — Public Stylesheet
   Supports dark (default) and light themes
   All styles scoped under .fhc-wrap
   ───────────────────────────────────────────────────── */

/* ── Design Tokens — Dark Theme (default) ────────── */

.fhc-wrap {
    --fhc-purple-dark: #1A0A2E;
    --fhc-purple-deep: #0F0520;
    --fhc-purple-primary: #7B2FBE;
    --fhc-purple-light: #A855F7;
    --fhc-purple-muted: #2D1B4E;
    --fhc-accent-gold: #F5A623;
    --fhc-accent-gold-hover: #FFB940;
    --fhc-text-primary: #FFFFFF;
    --fhc-text-secondary: #B8A9CC;
    --fhc-text-muted: #8A7A9E;
    --fhc-bg-card: #241440;
    --fhc-bg-page: #0F0520;
    --fhc-border: rgba(123, 47, 190, 0.25);
    --fhc-border-hover: rgba(168, 85, 247, 0.5);
    --fhc-radius: 4px;
    --fhc-radius-sm: 4px;
    --fhc-shadow: 0 4px 24px rgba(10, 5, 20, 0.4);
    --fhc-shadow-hover: 0 8px 32px rgba(123, 47, 190, 0.25);
    --fhc-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --fhc-container: 1100px;
    --fhc-hero-bg: linear-gradient(135deg, #1A0A2E 0%, #2A1052 50%, #1A0A2E 100%);
    --fhc-hero-grid-color: rgba(123, 47, 190, 0.08);
    --fhc-hero-circle-color: rgba(123, 47, 190, 0.12);
    --fhc-hero-text: #FFFFFF;
    --fhc-hero-subtext: #B8A9CC;
    --fhc-search-bg: #241440;
    --fhc-search-color: #FFFFFF;
    --fhc-search-border: rgba(123, 47, 190, 0.25);
    --fhc-search-placeholder: #8A7A9E;
    --fhc-result-hover-bg: #2D1B4E;
    --fhc-pill-bg: rgba(123, 47, 190, 0.15);
    --fhc-btn-cta-bg: #F5A623;
    --fhc-btn-cta-color: #1A0A2E;
    --fhc-btn-cta-hover-bg: #FFB940;
    --fhc-btn-cta-hover-color: #1A0A2E;
    --fhc-link-color: #F5A623;
    --fhc-link-underline: rgba(245, 166, 35, 0.3);
}

/* ── Design Tokens — Light Theme ─────────────────── */

.fhc-wrap--light {
    --fhc-purple-dark: #F7F4FB;
    --fhc-purple-deep: #FFFFFF;
    --fhc-purple-primary: #7B2FBE;
    --fhc-purple-light: #6D28B9;
    --fhc-purple-muted: #EDE8F5;
    --fhc-accent-gold: #D4850A;
    --fhc-accent-gold-hover: #B8720A;
    --fhc-text-primary: #1A0A2E;
    --fhc-text-secondary: #4A3B5C;
    --fhc-text-muted: #7A6B8E;
    --fhc-bg-card: #FFFFFF;
    --fhc-bg-page: #F5F2FA;
    --fhc-border: rgba(123, 47, 190, 0.15);
    --fhc-border-hover: rgba(123, 47, 190, 0.35);
    --fhc-shadow: 0 2px 12px rgba(26, 10, 46, 0.08);
    --fhc-shadow-hover: 0 4px 20px rgba(123, 47, 190, 0.12);
    --fhc-hero-bg: linear-gradient(135deg, #7B2FBE 0%, #9B4FDE 50%, #7B2FBE 100%);
    --fhc-hero-grid-color: rgba(255, 255, 255, 0.08);
    --fhc-hero-circle-color: rgba(255, 255, 255, 0.12);
    --fhc-hero-text: #FFFFFF;
    --fhc-hero-subtext: rgba(255, 255, 255, 0.8);
    --fhc-search-bg: #FFFFFF;
    --fhc-search-color: #1A0A2E;
    --fhc-search-border: rgba(123, 47, 190, 0.2);
    --fhc-search-placeholder: #9A8BAE;
    --fhc-result-hover-bg: #F5F2FA;
    --fhc-pill-bg: rgba(123, 47, 190, 0.1);
    --fhc-btn-cta-bg: #7B2FBE;
    --fhc-btn-cta-color: #FFFFFF;
    --fhc-btn-cta-hover-bg: #6D28B9;
    --fhc-btn-cta-hover-color: #FFFFFF;
    --fhc-link-color: #7B2FBE;
    --fhc-link-underline: rgba(123, 47, 190, 0.3);
}

/* ── Base Reset (scoped) ───────────────────────────── */

.fhc-wrap {
    font-family: var(--fhc-font);
    background: var(--fhc-bg-page);
    color: var(--fhc-text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

.fhc-wrap a {
    color: var(--fhc-purple-light);
    text-decoration: none;
    transition: color 0.2s ease;
}

.fhc-wrap a:hover {
    color: var(--fhc-accent-gold);
}

/* ── Container ─────────────────────────────────────── */

.fhc-container {
    max-width: var(--fhc-container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Sections ──────────────────────────────────────── */

.fhc-section {
    padding: 48px 0;
}

.fhc-section-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 32px;
    color: var(--fhc-text-primary);
    text-align: center;
}

/* ── Hero ──────────────────────────────────────────── */

.fhc-hero {
    background: var(--fhc-hero-bg);
    position: relative;
    overflow: hidden;
    padding: 80px 24px;
}

.fhc-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 49px,
            var(--fhc-hero-grid-color) 49px,
            var(--fhc-hero-grid-color) 50px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 49px,
            var(--fhc-hero-grid-color) 49px,
            var(--fhc-hero-grid-color) 50px
        );
    pointer-events: none;
}

.fhc-hero::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    transform: translate(-50%, -50%);
    border: 2px solid var(--fhc-hero-circle-color);
    border-radius: 50%;
    pointer-events: none;
}

.fhc-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.fhc-hero-title {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 12px;
    color: var(--fhc-hero-text);
}

.fhc-hero-subtitle {
    font-size: 16px;
    color: var(--fhc-hero-subtext);
    margin: 0 0 32px;
}

/* ── Search Bar ────────────────────────────────────── */

.fhc-search-wrapper {
    position: relative;
    max-width: 560px;
    margin: 0 auto;
}

.fhc-search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.fhc-search-icon {
    position: absolute;
    left: 16px;
    color: var(--fhc-search-placeholder);
    display: flex;
    align-items: center;
    pointer-events: none;
    z-index: 1;
}

.fhc-search-input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    border: 2px solid var(--fhc-search-border);
    border-radius: var(--fhc-radius);
    background: var(--fhc-search-bg);
    color: var(--fhc-search-color);
    font-size: 16px;
    font-family: var(--fhc-font);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fhc-search-input::placeholder {
    color: var(--fhc-search-placeholder);
}

.fhc-search-input:focus {
    border-color: var(--fhc-purple-primary);
    box-shadow: 0 0 0 4px rgba(123, 47, 190, 0.2);
}

/* ── Search Results Dropdown ───────────────────────── */

.fhc-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--fhc-bg-card);
    border: 1px solid var(--fhc-border);
    border-radius: var(--fhc-radius);
    box-shadow: var(--fhc-shadow);
    z-index: 100;
    display: none;
    overflow: hidden;
}

.fhc-search-results.fhc-active {
    display: block;
}

.fhc-search-result-item {
    display: block;
    padding: 12px 16px;
    border-bottom: 1px solid var(--fhc-border);
    transition: background 0.15s ease;
    text-decoration: none;
    color: var(--fhc-text-primary);
}

.fhc-search-result-item:last-child {
    border-bottom: none;
}

.fhc-search-result-item:hover,
.fhc-search-result-item.fhc-active-result {
    background: var(--fhc-result-hover-bg);
    color: var(--fhc-text-primary);
}

.fhc-result-category {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fhc-purple-light);
    margin-bottom: 2px;
}

.fhc-result-title {
    display: block;
    font-size: 14px;
    font-weight: 500;
}

.fhc-search-no-results {
    padding: 16px;
    text-align: center;
    color: var(--fhc-text-muted);
    font-size: 14px;
}

/* ── Category Grid ─────────────────────────────────── */

.fhc-category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.fhc-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 20px;
    background: var(--fhc-bg-card);
    border: 1px solid var(--fhc-border);
    border-radius: var(--fhc-radius);
    text-decoration: none;
    color: var(--fhc-text-primary);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.fhc-category-card:hover {
    transform: translateY(-4px);
    border-color: var(--fhc-border-hover);
    box-shadow: var(--fhc-shadow-hover);
    color: var(--fhc-text-primary);
}

.fhc-category-card-icon {
    margin-bottom: 12px;
    opacity: 0.9;
}

.fhc-category-card-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 6px;
    color: var(--fhc-text-primary);
}

.fhc-category-card-count {
    font-size: 12px;
    color: var(--fhc-text-muted);
}

/* ── Article Grid ──────────────────────────────────── */

.fhc-article-grid {
    display: grid;
    gap: 20px;
}

.fhc-article-grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.fhc-article-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    background: var(--fhc-bg-card);
    border: 1px solid var(--fhc-border);
    border-radius: var(--fhc-radius);
    text-decoration: none;
    color: var(--fhc-text-primary);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.fhc-article-card:hover {
    transform: translateY(-2px);
    border-color: var(--fhc-border-hover);
    box-shadow: var(--fhc-shadow-hover);
    color: var(--fhc-text-primary);
}

.fhc-article-card-category {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fhc-purple-light);
    margin-bottom: 8px;
}

.fhc-article-card-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    line-height: 1.4;
    color: var(--fhc-text-primary);
}

.fhc-article-card-excerpt {
    font-size: 13px;
    color: var(--fhc-text-secondary);
    margin: 0 0 12px;
    flex: 1;
}

.fhc-article-card-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--fhc-accent-gold);
}

.fhc-article-card:hover .fhc-article-card-link {
    color: var(--fhc-accent-gold-hover);
}

/* ── Single Article Layout ─────────────────────────── */

.fhc-single-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    padding: 40px 0;
}

/* ── Article Content ───────────────────────────────── */

.fhc-article-content {
    min-width: 0;
}

.fhc-category-pill {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--fhc-purple-light);
    background: var(--fhc-pill-bg);
    padding: 4px 12px;
    border-radius: var(--fhc-radius);
    margin-bottom: 12px;
}

.fhc-article-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 24px;
    line-height: 1.3;
}

.fhc-article-body {
    font-size: 15px;
    line-height: 1.7;
    color: var(--fhc-text-secondary);
}

.fhc-article-body h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--fhc-text-primary);
    margin: 32px 0 12px;
}

.fhc-article-body h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--fhc-text-primary);
    margin: 24px 0 10px;
}

.fhc-article-body p {
    margin: 0 0 16px;
}

.fhc-article-body ul,
.fhc-article-body ol {
    margin: 0 0 16px;
    padding-left: 24px;
}

.fhc-article-body li {
    margin-bottom: 6px;
}

.fhc-article-body strong {
    color: var(--fhc-text-primary);
}

.fhc-article-body a {
    color: var(--fhc-link-color);
    text-decoration: underline;
    text-decoration-color: var(--fhc-link-underline);
    text-underline-offset: 2px;
}

.fhc-article-body a:hover {
    text-decoration-color: var(--fhc-link-color);
}

/* ── Helpful Feedback ──────────────────────────────── */

.fhc-helpful {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--fhc-border);
    text-align: center;
}

.fhc-helpful p {
    font-size: 14px;
    color: var(--fhc-text-muted);
    margin: 0 0 12px;
}

.fhc-helpful-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.fhc-helpful-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border: 1px solid var(--fhc-border);
    border-radius: var(--fhc-radius);
    background: transparent;
    color: var(--fhc-text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    font-family: var(--fhc-font);
}

.fhc-helpful-btn:hover {
    border-color: var(--fhc-purple-primary);
    background: rgba(123, 47, 190, 0.1);
    color: var(--fhc-text-primary);
}

/* ── Sidebar ───────────────────────────────────────── */

.fhc-sidebar {
    position: sticky;
    top: 24px;
    align-self: start;
}

.fhc-sidebar-section {
    background: var(--fhc-bg-card);
    border: 1px solid var(--fhc-border);
    border-radius: var(--fhc-radius);
    padding: 20px;
    margin-bottom: 20px;
}

.fhc-sidebar-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--fhc-text-primary);
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--fhc-purple-primary);
}

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

.fhc-sidebar-links li {
    margin-bottom: 8px;
}

.fhc-sidebar-links a {
    font-size: 13px;
    color: var(--fhc-text-secondary);
    display: block;
    padding: 6px 0;
    border-bottom: 1px solid var(--fhc-border);
    transition: color 0.2s ease;
}

.fhc-sidebar-links li:last-child a {
    border-bottom: none;
}

.fhc-sidebar-links a:hover {
    color: var(--fhc-accent-gold);
}

.fhc-sidebar-cta {
    text-align: center;
}

.fhc-sidebar-cta p {
    font-size: 13px;
    color: var(--fhc-text-muted);
    margin: 0 0 12px;
}

/* ── Breadcrumbs ───────────────────────────────────── */

.fhc-breadcrumbs {
    padding: 20px 0;
    font-size: 13px;
    color: var(--fhc-text-muted);
}

.fhc-breadcrumbs a {
    color: var(--fhc-text-secondary);
}

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

.fhc-breadcrumb-sep {
    margin: 0 8px;
    color: var(--fhc-purple-muted);
}

.fhc-breadcrumb-current {
    color: var(--fhc-text-muted);
}

/* ── Category Header (taxonomy archive) ────────────── */

.fhc-category-header {
    text-align: center;
    padding: 32px 0;
}

.fhc-category-header-icon {
    margin-bottom: 12px;
}

.fhc-category-header-title {
    font-size: 28px;
    font-weight: 800;
    margin: 0 0 8px;
}

.fhc-category-header-desc {
    font-size: 15px;
    color: var(--fhc-text-secondary);
    margin: 0;
}

/* ── Related Articles ──────────────────────────────── */

.fhc-related {
    padding: 40px 0 20px;
    margin-top: 20px;
    border-top: 1px solid var(--fhc-border);
}

.fhc-related-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 24px;
}

/* ── CTA Section ───────────────────────────────────── */

.fhc-cta-section {
    padding-bottom: 64px;
}

.fhc-cta {
    text-align: center;
    background: var(--fhc-bg-card);
    border: 1px solid var(--fhc-border);
    border-radius: var(--fhc-radius);
    padding: 40px;
}

.fhc-cta h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px;
}

.fhc-cta p {
    font-size: 15px;
    color: var(--fhc-text-secondary);
    margin: 0 0 20px;
}

/* ── Buttons ───────────────────────────────────────── */

.fhc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--fhc-radius);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--fhc-font);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    border: none;
}

.fhc-btn--gold {
    background: var(--fhc-btn-cta-bg);
    color: var(--fhc-btn-cta-color);
}

.fhc-btn--gold:hover {
    background: var(--fhc-btn-cta-hover-bg);
    color: var(--fhc-btn-cta-hover-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(123, 47, 190, 0.2);
}

.fhc-btn--small {
    padding: 8px 20px;
    font-size: 13px;
    background: var(--fhc-purple-primary);
    color: #fff;
}

.fhc-btn--small:hover {
    background: var(--fhc-purple-light);
    color: #fff;
}

/* ── No Content Fallback ───────────────────────────── */

.fhc-no-content {
    text-align: center;
    color: var(--fhc-text-muted);
    font-size: 14px;
    padding: 40px 0;
}

/* ── Pagination ────────────────────────────────────── */

.fhc-wrap .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 32px 0;
}

.fhc-wrap .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--fhc-border);
    border-radius: var(--fhc-radius-sm);
    background: var(--fhc-bg-card);
    color: var(--fhc-text-secondary);
    font-size: 14px;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.fhc-wrap .page-numbers.current,
.fhc-wrap .page-numbers:hover {
    border-color: var(--fhc-purple-primary);
    color: var(--fhc-purple-light);
    background: rgba(123, 47, 190, 0.1);
}

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

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

    .fhc-single-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .fhc-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .fhc-hero {
        padding: 48px 20px;
    }

    .fhc-hero-title {
        font-size: 26px;
    }

    .fhc-category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .fhc-article-grid--3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .fhc-section {
        padding: 32px 0;
    }

    .fhc-article-title {
        font-size: 22px;
    }
}

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

    .fhc-article-grid--3 {
        grid-template-columns: 1fr;
    }

    .fhc-hero-title {
        font-size: 22px;
    }

    .fhc-search-input {
        font-size: 14px;
        padding: 12px 16px 12px 42px;
    }

    .fhc-cta {
        padding: 28px 20px;
    }
}
