/*
Theme Name: sa-help
Theme URI: https://sharparchive.com
Author: Sharp Archive
Author URI: https://sharparchive.com
Description: Dedicated, clean, and responsive Knowledge Base theme for Sharp Archive Help Center strictly following the Sharp Archive design specifications.
Version: 1.0.0
Text Domain: sa-help
*/

/* --- SHARED STYLES (sharparchive.com theme) --- */
:root {
    --brand-orange: #EE7420; 
    --orange-dark: #D96410; 
    --orange-tint: #FDF0E3;
    --brand-blue: #3A4A63; /* slate heading color, as on sharparchive.com */
    --navy: #171E2C; 
    --navy-2: #1E2738;
    --text-dark: #4B5563; 
    --text-light: #ffffff;
    --border-color: #E8EAED; 
    --card-bg: #ffffff; 
    --body-bg: #F4F5F6;
    --shadow-card: 0 2px 12px rgba(23, 30, 44, 0.06);
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
}

html {
    scroll-behavior: smooth;
}

body { 
    background-color: var(--body-bg); 
    color: var(--text-dark); 
    line-height: 1.7; 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
}

a { 
    text-decoration: none; 
    color: inherit; 
    transition: color 0.2s, opacity 0.2s, background 0.2s; 
} 

ul { 
    list-style: none; 
}

/* --- Header (transparent overlay on hero section) --- */
.site-header { 
    background-color: transparent; 
    padding: 1.25rem 2.5rem; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    gap: 1rem; 
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 20;
}

.admin-bar .site-header {
    top: 32px;
}

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

.header-left { 
    display: flex; 
    align-items: center; 
    gap: 1rem; 
}

.logo-area { 
    display: inline-flex; 
}

.logo-area img { 
    width: 48px; 
    height: auto; 
    display: block; 
}

.header-divider { 
    width: 1px; 
    height: 26px; 
    background: rgba(255,255,255,0.18); 
}

.header-label { 
    color: #C7CBD4; 
    font-size: 0.9rem; 
    font-weight: 500; 
    letter-spacing: 0.4px; 
}

.header-right {
    display: flex;
    align-items: center;
}

.header-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 1.15rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.25s ease;
}

.header-cta-btn:hover {
    background: var(--brand-orange);
    border-color: var(--brand-orange);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(238, 116, 32, 0.35);
}

.header-cta-btn svg {
    opacity: 0.85;
    transition: transform 0.2s ease;
}

.header-cta-btn:hover svg {
    transform: translate(1px, -1px);
    opacity: 1;
}

/* --- Footer (exact replica of sharparchive.com footer) --- */
.site-footer { 
    background-color: var(--navy); 
    color: #C7CBD4; 
    padding: 1.5rem 2rem; 
    margin-top: auto; 
    font-size: 0.85rem; 
}

.footer-inner { 
    max-width: 1140px; 
    margin: 0 auto; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    gap: 1.5rem; 
    flex-wrap: wrap; 
}

.footer-inner p {
    margin: 0;
    padding: 0;
    line-height: 1.5;
    color: #C7CBD4;
}

.footer-links { 
    display: flex; 
    align-items: center;
    gap: 2.25rem; 
    margin: 0;
    padding: 0;
    list-style: none;
    line-height: 1.5;
}

.footer-links li {
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
}

.footer-links a { 
    color: var(--brand-orange); 
    font-weight: 500; 
    display: inline-block;
}

.footer-links a:hover { 
    text-decoration: underline; 
}


/* --- Back to top (orange circle, like sharparchive.com) --- */
.back-to-top { 
    position: fixed; 
    right: 1.5rem; 
    bottom: 1.5rem; 
    width: 44px; 
    height: 44px; 
    border-radius: 50%; 
    background: var(--brand-orange); 
    color: #fff; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    box-shadow: 0 6px 16px rgba(238,116,32,0.45); 
    font-size: 1.15rem; 
    z-index: 50; 
}

.back-to-top:hover { 
    background: var(--orange-dark); 
    color: #fff;
}

/* --- HOMEPAGE / HERO STYLES --- */
.hero-section {
    background:
        radial-gradient(620px 320px at 12% -10%, rgba(84, 110, 70, 0.28), transparent 60%),
        radial-gradient(520px 280px at 88% 110%, rgba(238, 116, 32, 0.14), transparent 60%),
        var(--navy);
    color: var(--text-light); 
    text-align: center; 
    padding: 6.5rem 2rem 5.5rem;
    border-bottom-left-radius: 50% 48px; 
    border-bottom-right-radius: 50% 48px;
    position: relative;
}

.hero-section.compact-hero {
    padding: 5.5rem 2rem 3rem;
}

.hero-title { 
    font-size: 2.6rem; 
    margin-bottom: 0.9rem; 
    font-weight: 600; 
    letter-spacing: -0.5px; 
    line-height: 1.25; 
}

.hero-title img.emoji {
    height: 1.1em !important;
    width: 1.1em !important;
    margin: 0 0.1em !important;
    vertical-align: -0.18em !important;
    display: inline-block !important;
}

.hero-section.compact-hero .hero-title {
    font-size: 2.6rem;
    letter-spacing: -0.5px;
    line-height: 1.25;
}

.hero-title::after { 
    content: ""; 
    display: block; 
    width: 56px; 
    height: 3px; 
    border-radius: 2px; 
    background: var(--brand-orange); 
    margin: 1.1rem auto 0; 
}

.hero-section.compact-hero .hero-title::after {
    width: 56px;
    margin: 1.1rem auto 0;
}

/* --- Modern pill search --- */
.search-shell { 
    position: relative; 
    max-width: 680px; 
    margin: 1.9rem auto 0; 
}

.hero-section.compact-hero .search-shell {
    max-width: 620px;
    margin: 1.4rem auto 0;
}

.search-form {
    position: relative;
    width: 100%;
}

.search-input { 
    width: 100%; 
    padding: 1.05rem 7.2rem 1.05rem 3.4rem; 
    border: 1px solid transparent; 
    border-radius: 999px; 
    font-size: 1rem; 
    background-color: #ffffff; 
    color: var(--brand-blue); 
    box-shadow: 0 16px 38px rgba(0,0,0,0.30); 
    font-family: inherit;
}

.hero-section.compact-hero .search-input {
    padding: 0.95rem 6.9rem 0.95rem 3.3rem;
    font-size: 0.98rem;
}

.search-input::placeholder { 
    color: #9AA3B0; 
}

.search-input:focus { 
    outline: none; 
    border-color: var(--brand-orange); 
    box-shadow: 0 0 0 4px rgba(238,116,32,0.22), 0 16px 38px rgba(0,0,0,0.30); 
}

.search-icon { 
    position: absolute; 
    left: 17px; 
    top: 50%; 
    transform: translateY(-50%); 
    color: var(--brand-orange); 
    pointer-events: none;
}

.search-btn { 
    position: absolute; 
    right: 7px; 
    top: 50%; 
    transform: translateY(-50%); 
    border: none; 
    cursor: pointer; 
    background: var(--brand-orange); 
    color: #fff; 
    font-weight: 600; 
    font-size: 0.92rem; 
    padding: 0.62rem 1.5rem; 
    border-radius: 999px; 
    box-shadow: 0 6px 14px rgba(238,116,32,0.4); 
    transition: background 0.2s; 
    font-family: inherit; 
}

.search-clear-btn {
    position: absolute;
    right: 6.8rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: #8E9BAE;
    font-size: 1.4rem;
    line-height: 1;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
}

.hero-section.compact-hero .search-clear-btn {
    right: 5.8rem;
}

.search-clear-btn:hover {
    color: var(--navy);
    background: #EDF1F7;
}

/* --- Live AJAX Search Autocomplete Dropdown (Matches Design Image) --- */
.sa-search-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 16px 45px rgba(23, 30, 44, 0.18), 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border-color);
    z-index: 999;
    text-align: left;
    max-height: 480px;
    overflow-y: auto;
    display: none;
}

.sa-search-dropdown.is-open {
    display: block;
    animation: saDropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.sa-search-header {
    padding: 1.15rem 1.5rem 0.75rem;
    font-size: 1.18rem;
    font-weight: 700;
    color: var(--navy);
    border-bottom: 1px solid #EEF2F6;
    background: #ffffff;
    letter-spacing: -0.2px;
}

.sa-search-header .sa-search-term {
    color: var(--navy);
}

.sa-search-results-list {
    display: flex;
    flex-direction: column;
}

.sa-search-item {
    display: block;
    padding: 1rem 1.5rem;
    text-decoration: none;
    border-bottom: 1px solid #F1F4F8;
    transition: background 0.15s ease, transform 0.15s ease;
    text-align: left;
}

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

.sa-search-item:hover,
.sa-search-item.is-selected {
    background: #F7F9FC;
}

.sa-item-title {
    font-size: 1.15rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.3rem;
    line-height: 1.35;
}

.sa-item-title strong {
    font-weight: 700;
    color: var(--navy);
    background: none !important;
    padding: 0 !important;
}

.sa-search-item:hover .sa-item-title {
    color: var(--brand-orange);
}

.sa-search-item:hover .sa-item-title strong {
    color: var(--orange-dark);
}

.sa-item-path {
    font-size: 0.88rem;
    color: #8A94A6;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.sa-search-empty,
.sa-search-loading {
    padding: 2.25rem 1.5rem;
    text-align: center;
    color: #64748B;
    font-size: 0.96rem;
}

.sa-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #E2E8F0;
    border-top-color: var(--brand-orange);
    border-radius: 50%;
    animation: saSpinnerRotate 0.6s linear infinite;
    vertical-align: -2px;
    margin-right: 6px;
}

@keyframes saSpinnerRotate {
    to {
        transform: rotate(360deg);
    }
}

/* --- Category grid: exactly 3 cards per row --- */
.category-grid-container { 
    max-width: 1280px; 
    margin: -3.5rem auto 4.5rem; 
    padding: 0 2rem; 
    position: relative; 
    z-index: 10;
}

.category-grid { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 1.75rem; 
}

.category-card { 
    background: var(--card-bg); 
    padding: 2.25rem; 
    border-radius: 10px; 
    box-shadow: var(--shadow-card); 
    transition: transform 0.3s ease, box-shadow 0.3s ease; 
    border: 1px solid var(--border-color); 
    display: flex; 
    flex-direction: column; 
}

.category-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 18px 32px rgba(23, 30, 44, 0.12); 
}

.card-icon { 
    font-size: 1.7rem; 
    margin-bottom: 1.2rem; 
    width: 60px; 
    height: 60px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    background: var(--orange-tint); 
    border-radius: 12px; 
}

.card-title { 
    font-size: 1.25rem; 
    font-weight: 600; 
    margin-bottom: 0.6rem; 
    color: var(--brand-blue); 
}

.card-description { 
    color: var(--text-dark); 
    font-size: 0.95rem; 
    margin-bottom: 1.5rem; 
    flex-grow: 1; 
}

.card-link { 
    color: var(--brand-orange); 
    font-weight: 600; 
    font-size: 0.95rem; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.card-link::after { 
    content: "→"; 
    transition: transform 0.2s; 
}

.category-card:hover .card-link::after { 
    transform: translateX(5px); 
}

/* --- Breadcrumbs --- */
.page-shell { 
    position: relative; 
    flex: 1 0 auto;
}

.breadcrumb-bar { 
    max-width: 1280px; 
    margin: 1.6rem auto 0; 
    padding: 0 2rem; 
    position: relative; 
    z-index: 2; 
}

.breadcrumbs { 
    display: flex; 
    align-items: center; 
    flex-wrap: wrap; 
    gap: 0.35rem 0.6rem; 
    font-size: 0.88rem; 
    list-style: none; 
    margin: 0; 
    padding: 0; 
}

.breadcrumbs a { 
    color: var(--text-dark); 
    font-weight: 500; 
}

.breadcrumbs a:hover { 
    color: var(--brand-orange); 
}

.crumb-sep { 
    color: #A8AFBB; 
}

.crumb-current { 
    color: var(--brand-orange); 
    font-weight: 600; 
}

/* --- Main Layout --- */
.main-container { 
    max-width: 1280px; 
    margin: 1.4rem auto 3.5rem; 
    padding: 0 2rem; 
    display: grid; 
    grid-template-columns: 330px 1fr; 
    gap: 3rem; 
    align-items: start; 
    position: relative; 
    z-index: 1; 
}

.main-container.full-width {
    grid-template-columns: 1fr;
}

/* --- Sidebar (card style) --- */
.kb-sidebar { 
    position: sticky; 
    top: 1.5rem; 
    background: var(--card-bg); 
    border: 1px solid var(--border-color); 
    border-radius: 12px; 
    padding: 1.6rem 1.2rem; 
    box-shadow: var(--shadow-card); 
}

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

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

.sidebar-title { 
    font-weight: 600; 
    color: var(--brand-blue); 
    margin-bottom: 0.55rem; 
    font-size: 0.82rem; 
    text-transform: uppercase; 
    letter-spacing: 0.8px; 
    padding-left: 0.7rem; 
}

.sidebar-links li { 
    margin-bottom: 0.15rem; 
}

.sidebar-links a { 
    display: block; 
    padding: 0.42rem 0.7rem; 
    border-radius: 8px; 
    color: var(--text-dark); 
    font-size: 0.92rem; 
}

.sidebar-links a:hover { 
    background: var(--body-bg); 
    color: var(--brand-orange); 
}

.sidebar-links a.active { 
    background: var(--orange-tint); 
    color: var(--orange-dark); 
    font-weight: 600; 
    box-shadow: inset 3px 0 0 var(--brand-orange); 
}

/* --- Nested Subcategory in Sidebar --- */
.sidebar-cat-item {
    margin-bottom: 0.35rem;
}

.sidebar-subcategories {
    list-style: none;
    margin: 0.2rem 0 0.5rem 0.85rem;
    padding-left: 0.5rem;
    border-left: 1.5px solid var(--border-color);
}

.sidebar-subcat-item {
    margin-bottom: 0.1rem;
}

.sidebar-subcat-link {
    display: block;
    padding: 0.32rem 0.6rem;
    font-size: 0.86rem;
    color: var(--text-muted, #555e6d);
    border-radius: 6px;
    transition: all 0.15s ease;
}

.sidebar-subcat-link:hover {
    background: var(--body-bg);
    color: var(--brand-orange);
}

.sidebar-subcat-link.active {
    background: var(--orange-tint);
    color: var(--orange-dark);
    font-weight: 600;
    box-shadow: inset 2.5px 0 0 var(--brand-orange);
}

/* --- Subcategory Listing on Category Content Area --- */
.kb-subcategory-listing {
    margin-bottom: 2.2rem;
}

.kb-subcategory-listing:last-child {
    margin-bottom: 0;
}

.kb-subcategory-title {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--brand-blue);
    margin-bottom: 0.9rem;
    padding-bottom: 0.45rem;
    border-bottom: 1.5px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kb-subcategory-title a {
    color: inherit;
    text-decoration: none;
}

.kb-subcategory-title a:hover {
    color: var(--brand-orange);
}

/* --- Article --- */
.kb-article { 
    background: var(--card-bg); 
    padding: 3rem; 
    border-radius: 12px; 
    box-shadow: var(--shadow-card); 
    border: 1px solid var(--border-color); 
}

.article-title { 
    font-size: 2.25rem; 
    font-weight: 600; 
    color: var(--brand-blue); 
    margin-bottom: 1.5rem; 
    line-height: 1.25; 
}

.article-title::after { 
    content: ""; 
    display: block; 
    width: 56px; 
    height: 3px; 
    border-radius: 2px; 
    background: var(--brand-orange); 
    margin-top: 0.9rem; 
}

.article-section { 
    margin-bottom: 2.5rem; 
}

.section-label { 
    font-size: 0.8rem; 
    font-weight: 600; 
    text-transform: uppercase; 
    color: var(--brand-orange); 
    letter-spacing: 1px; 
    margin-bottom: 0.5rem; 
    display: block; 
}

h2.section-heading,
.kb-article h2 { 
    font-size: 1.35rem; 
    font-weight: 600; 
    color: var(--brand-blue); 
    margin-bottom: 1rem; 
    margin-top: 1.5rem; 
}

.kb-article h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--brand-blue);
    margin-bottom: 0.8rem;
    margin-top: 1.2rem;
}

.kb-article p,
p { 
    margin-bottom: 1rem; 
    color: var(--text-dark); 
}

ul.article-ul,
.kb-article ul:not(.step-list) { 
    list-style: disc; 
    margin-left: 1.5rem; 
    margin-bottom: 1rem; 
}

li.article-li,
.kb-article li { 
    margin-bottom: 0.5rem; 
}

.step-list,
.kb-article ol.step-list { 
    counter-reset: step; 
    list-style: none; 
    margin-left: 0.5rem; 
}

.step-list li,
.kb-article ol.step-list li { 
    position: relative; 
    padding-left: 2.2rem; 
    margin-bottom: 1rem; 
}

.step-list li::before,
.kb-article ol.step-list li::before { 
    counter-increment: step; 
    content: counter(step); 
    position: absolute; 
    left: 0; 
    top: 0.15rem; 
    background-color: var(--brand-orange); 
    color: white; 
    width: 1.5rem; 
    height: 1.5rem; 
    border-radius: 50%; 
    text-align: center; 
    line-height: 1.5rem; 
    font-size: 0.85rem; 
    font-weight: 600; 
    box-shadow: 0 3px 8px rgba(238,116,32,0.35); 
}

/* Step blocks: number circle + clear boundaries (sms-guide style) */
.step { 
    padding-top: 2.4rem; 
    margin-top: 2.4rem; 
    border-top: 1px solid var(--border-color); 
    scroll-margin-top: 1.5rem; 
}
.step:first-of-type {
    border-top: none;
    margin-top: 1.2rem;
    padding-top: 0.8rem;
}
.step-head { 
    display: flex; 
    align-items: center; 
    gap: 0.85rem; 
    margin-bottom: 1.1rem; 
}
.step-num { 
    flex: none; 
    width: 34px; 
    height: 34px; 
    border-radius: 50%; 
    background: var(--brand-orange); 
    color: #fff; 
    font-weight: 600; 
    font-size: 1rem; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    box-shadow: 0 3px 8px rgba(238,116,32,0.35); 
}
.step-title { 
    font-size: 1.3rem; 
    font-weight: 600; 
    color: var(--brand-blue); 
    line-height: 1.35; 
    margin: 0 !important;
}

/* Screenshot frame system: clean card treatment for screenshots */
.shot { 
    margin: 1.25rem 0 1.5rem; 
    background: var(--body-bg); 
    border: 1px solid var(--border-color); 
    border-radius: 12px; 
    padding: 1rem; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
}
.shot img { 
    display: block; 
    max-width: 100%; 
    height: auto; 
    border-radius: 8px; 
    border: 1px solid var(--border-color); 
}
.shot .w-phone { width: 280px; }
.shot .w-modal { width: 480px; }
.shot .w-wide { width: 560px; }
.shot figcaption { 
    margin-top: 0.7rem; 
    font-size: 0.82rem; 
    color: #6B7280; 
    text-align: center; 
    line-height: 1.5; 
}
.shot-pair { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 1rem; 
    width: 100%; 
    max-width: 580px; 
}
.shot-pair img { 
    width: 100%; 
}

/* Video Guide Card & Player */
.video-guide-card {
    margin: 1.75rem 0 2.2rem;
    background: var(--body-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 4px 14px rgba(23, 30, 44, 0.05);
}

.video-guide-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--brand-blue);
    margin-bottom: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.video-wrapper {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

.video-wrapper video {
    display: block;
    width: 100%;
    height: auto;
    max-height: 520px;
    border-radius: 8px;
    outline: none;
}

/* Big Play Overlay Button */
.video-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.35);
    transition: opacity 0.3s ease, visibility 0.3s ease, background 0.2s ease;
    z-index: 5;
    pointer-events: auto;
}

.video-play-overlay:hover {
    background: rgba(15, 23, 42, 0.48);
}

.video-play-btn {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--brand-orange);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 26px rgba(238, 116, 32, 0.55), 0 0 0 8px rgba(255, 255, 255, 0.22);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.2s ease, box-shadow 0.25s ease;
    border: none;
    cursor: pointer;
}

.video-play-btn svg {
    margin-left: 5px;
    width: 32px;
    height: 32px;
    fill: #ffffff;
    stroke: none;
}

.video-wrapper:hover .video-play-btn {
    transform: scale(1.12);
    background: var(--orange-dark);
    box-shadow: 0 10px 30px rgba(238, 116, 32, 0.7), 0 0 0 10px rgba(255, 255, 255, 0.3);
}

.video-wrapper.is-playing .video-play-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.wp-video,
.wp-video-shortcode {
    width: 100% !important;
    max-width: 100% !important;
}

.wp-video video {
    width: 100% !important;
    height: auto !important;
    border-radius: 8px;
}


/* Alert / Tip box (matches sharparchive.com orange callout card) */
.alert { 
    display: flex; 
    gap: 0.9rem; 
    align-items: flex-start; 
    background-color: var(--orange-tint); 
    border: 1px solid #F5DCC2; 
    border-left: 4px solid var(--brand-orange); 
    padding: 1.05rem 1.25rem; 
    margin-bottom: 1.25rem; 
    margin-top: 1.25rem;
    border-radius: 10px; 
    font-size: 0.95rem; 
}

.alert-ico { 
    flex: none; 
    width: 34px; 
    height: 34px; 
    border-radius: 50%; 
    background: #fff; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    color: var(--brand-orange); 
    box-shadow: 0 3px 8px rgba(238,116,32,0.25); 
    margin-top: 2px; 
}

.alert strong { 
    background: none; 
    color: var(--orange-dark); 
}

/* Note Callout Box (teal/cyan highlight card) */
.note-box { 
    background-color: #EBF8F7; 
    border-left: 4px solid #3DB9B2; 
    padding: 1.1rem 1.4rem; 
    margin-top: 1.25rem; 
    margin-bottom: 1.25rem; 
    border-radius: 0 6px 6px 0; 
    font-size: 0.95rem; 
    line-height: 1.65; 
    color: #171E2C; 
}

.note-box strong,
.note-box .note-prefix { 
    background: none; 
    color: #171E2C; 
    font-weight: 700; 
    padding: 0; 
}

/* Table of Contents Box (IdeaScale / KB Style) */
.toc-box { 
    background-color: #FDF2F2; 
    border-left: 4px solid #F87171; 
    padding: 1.25rem 1.5rem; 
    margin: 1.5rem 0; 
    border-radius: 0 6px 6px 0; 
}

.toc-title { 
    font-size: 0.92rem; 
    font-weight: 700; 
    letter-spacing: 0.5px; 
    text-transform: uppercase; 
    color: #171E2C; 
    margin-bottom: 0.85rem; 
}

.toc-list { 
    list-style: none !important; 
    margin: 0 !important; 
    padding: 0 !important; 
    display: flex; 
    flex-direction: column; 
    gap: 0.45rem; 
}

.toc-list li { 
    margin: 0 !important; 
    padding: 0 !important; 
    font-size: 0.95rem; 
    line-height: 1.5; 
}

.toc-list li a { 
    color: var(--brand-blue); 
    text-decoration: underline; 
    text-underline-offset: 3px; 
    font-weight: 500; 
    transition: color 0.2s ease; 
}

.toc-list li a:hover { 
    color: var(--brand-orange); 
}

.kb-article h1[id],
.kb-article h2[id],
.kb-article h3[id],
.kb-article h4[id] { 
    scroll-margin-top: 90px; 
}

/* --- Expandable Subcategory / Article Listing (IdeaScale & HubSpot KB Style) --- */
.hs-kb-subcategory-listing { 
    margin: 2rem 0 2.5rem; 
}

.hs-kb-subcategory-listing h2 { 
    font-size: 1.45rem; 
    font-weight: 600; 
    color: var(--brand-blue); 
    margin-bottom: 1.1rem; 
}

.hs-kb-category-article-list { 
    list-style: none !important; 
    margin: 0 !important; 
    padding: 0 !important; 
}

.hs-kb-category-article-list--bordered { 
    border-top: 1px solid var(--border-color); 
}

.hs-kb-category-article-list li { 
    margin: 0 !important; 
    padding: 0 !important; 
    border-bottom: 1px solid var(--border-color); 
    transition: background 0.15s ease; 
}

.hs-kb-category-article-list li:hover { 
    background-color: #FAFBFD; 
}

.hs-kb-category-article-list li.-hidden { 
    display: none; 
}

.hs-kb-category-article-list.is-expanded li.-hidden { 
    display: block; 
    animation: fadeInArticle 0.25s ease-out; 
}

.hs-kb-category-article-list__link { 
    display: block; 
    padding: 0.85rem 0.5rem; 
    color: var(--brand-blue); 
    font-size: 1rem; 
    font-weight: 500; 
    text-decoration: none; 
    line-height: 1.45; 
    transition: color 0.2s ease, padding-left 0.2s ease; 
}

.hs-kb-category-article-list__link:hover { 
    color: var(--brand-orange); 
    padding-left: 0.85rem; 
}

.hs-kb-category-article-list__toggle { 
    display: inline-flex; 
    align-items: center; 
    gap: 0.45rem; 
    background: transparent; 
    border: none; 
    color: var(--brand-blue); 
    font-size: 0.92rem; 
    font-weight: 600; 
    font-family: inherit; 
    padding: 0.75rem 0.5rem; 
    cursor: pointer; 
    margin-top: 0.35rem; 
    transition: color 0.2s ease; 
}

.hs-kb-category-article-list__toggle:hover { 
    color: var(--brand-orange); 
}

.hs-kb-category-article-list__toggle-icon { 
    display: inline-block; 
    font-size: 0.75rem; 
    transition: transform 0.25s ease; 
}

.hs-kb-category-article-list__toggle.is-expanded .hs-kb-category-article-list__toggle-icon { 
    transform: rotate(180deg); 
}

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

/* Highlight tokens */
.kb-article strong,
strong { 
    color: var(--brand-blue); 
    font-weight: 600; 
}

.ui-path { 
    font-weight: 600; 
    color: var(--orange-dark); 
    background: var(--orange-tint); 
    border: 1px solid #F5D9BE; 
    border-radius: 6px; 
    padding: 0.08rem 0.5rem; 
    font-size: 0.9em; 
}

.btn-ref { 
    display: inline-block; 
    background: #fff; 
    border: 1.5px solid var(--brand-orange); 
    color: var(--orange-dark); 
    border-radius: 999px; 
    padding: 0.02rem 0.68rem; 
    font-weight: 600; 
    font-size: 0.88em; 
    box-shadow: 0 2px 6px rgba(238,116,32,0.18); 
    line-height: 1.55; 
}

.key { 
    display: inline-block; 
    font-weight: 600; 
    font-size: 0.85em; 
    color: var(--brand-blue); 
    background: #fff; 
    border: 1px solid #D8DCE2; 
    border-bottom: 2px solid #C6CBD3; 
    border-radius: 6px; 
    padding: 0.02rem 0.5rem; 
    box-shadow: 0 1px 0 rgba(23,30,44,0.05); 
}

code.inline-code,
.kb-article code { 
    font-family: "Courier New", monospace; 
    font-weight: 700; 
    font-size: 0.92em; 
    color: var(--orange-dark); 
    background: #fff; 
    border: 1px dashed var(--brand-orange); 
    border-radius: 6px; 
    padding: 0.02rem 0.45rem; 
}

.link-orange { 
    color: var(--brand-orange); 
    font-weight: 600; 
}

.link-orange:hover { 
    color: var(--orange-dark); 
    text-decoration: underline; 
}

/* Search results & Archive styles */
.results-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.results-header h1 {
    color: var(--brand-blue);
    font-size: 1.8rem;
    font-weight: 600;
}

.results-header p {
    color: #6B7280;
    margin-top: 0.3rem;
}

.article-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.article-list-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
}

.article-list-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(23, 30, 44, 0.08);
    border-color: #F0C89F;
}

.article-list-item .item-cat {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--brand-orange);
    letter-spacing: 0.8px;
    margin-bottom: 0.35rem;
}

.article-list-item .item-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--brand-blue);
    margin-bottom: 0.5rem;
}

.article-list-item .item-title a:hover {
    color: var(--brand-orange);
}

.article-list-item .item-excerpt {
    font-size: 0.92rem;
    color: var(--text-dark);
    margin-bottom: 0.8rem;
}

.article-list-item .item-link {
    color: var(--brand-orange);
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
}

.article-list-item .item-link::after {
    content: "→";
    transition: transform 0.2s;
}

.article-list-item:hover .item-link::after {
    transform: translateX(4px);
}

/* Empty state / 404 */
.empty-state {
    text-align: center;
    padding: 3.5rem 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h2 {
    color: var(--brand-blue);
    margin-bottom: 0.5rem;
}

/* --- Article Helpful Feedback Box --- */
.article-feedback-wrap {
    border-top: 1px solid var(--border-color);
    padding: 1.6rem 0;
    margin: 2.8rem 0 1.5rem;
}

.article-feedback-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.feedback-prompt {
    color: var(--brand-blue);
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: -0.2px;
}

.feedback-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.feedback-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 1.6rem;
    min-width: 72px;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: inherit;
    color: var(--brand-blue);
    background-color: #f0f4f8;
    border: 1px solid #c9d5e2;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.feedback-btn:hover:not(:disabled) {
    background-color: #e2eaf2;
    border-color: #b5c4d4;
    color: var(--navy);
}

.feedback-btn:active:not(:disabled) {
    transform: translateY(1px);
}

.feedback-btn:disabled {
    cursor: default;
    opacity: 0.65;
}

.feedback-btn.active {
    background-color: var(--brand-orange);
    border-color: var(--brand-orange);
    color: #ffffff;
}

.feedback-message {
    color: #2e7d32;
    font-weight: 500;
    font-size: 1rem;
    background: #e8f5e9;
    padding: 0.6rem 1.1rem;
    border-radius: 6px;
    border: 1px solid #c8e6c9;
}

/* Negative Feedback Review Form */
.feedback-negative-form {
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px dashed var(--border-color);
    width: 100%;
}

.feedback-label {
    display: block;
    color: var(--brand-blue);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.feedback-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #c9d5e2;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--navy);
    background: #ffffff;
    resize: vertical;
    min-height: 80px;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.feedback-textarea:focus {
    outline: none;
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(238, 116, 32, 0.15);
}

.feedback-form-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.feedback-submit-btn {
    background: var(--brand-orange);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(238, 116, 32, 0.3);
    transition: background 0.2s;
}

.feedback-submit-btn:hover:not(:disabled) {
    background: var(--orange-dark);
}

.feedback-submit-btn:disabled {
    opacity: 0.65;
    cursor: default;
}

.feedback-skip-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-size: 0.88rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.feedback-skip-btn:hover {
    color: var(--navy);
    background: #f0f4f8;
}

/* Side vector illustrations */
.side-art { 
    position: fixed; 
    width: 190px; 
    pointer-events: none; 
    z-index: 0; 
    animation: floaty 7s ease-in-out infinite alternate; 
}

.side-art.left { 
    left: calc(50% - 640px - 205px); 
    top: 400px; 
}

.side-art.right { 
    right: calc(50% - 640px - 205px); 
    top: 620px; 
    animation-delay: 1.6s; 
}

@keyframes floaty { 
    from { transform: translateY(0); } 
    to { transform: translateY(-14px); } 
}

@media (prefers-reduced-motion: reduce) { 
    .side-art { animation: none; } 
}

@media (max-width: 1679px) { 
    .side-art { display: none; } 
}

/* --- Responsive Media Queries --- */
@media (max-width: 1200px) {
    .main-container {
        grid-template-columns: 290px 1fr;
        gap: 2rem;
        padding: 0 1.5rem;
    }
}

@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 270px 1fr;
        gap: 1.75rem;
    }
    .category-grid-container {
        padding: 0 1.5rem;
        margin-top: -2.5rem;
    }
    .category-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 1.25rem;
    }
    .kb-article {
        padding: 2.2rem;
    }
}

@media (max-width: 900px) {
    .main-container { 
        display: flex;
        flex-direction: column;
        gap: 2.2rem; 
        padding: 0 1.25rem;
    }
    .kb-article,
    .kb-content-area {
        order: 1;
        width: 100%;
    }
    .kb-sidebar { 
        position: static; 
        order: 2;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 0.9rem 1.25rem;
    }
    .logo-area img {
        height: 28px;
    }
    .header-label {
        font-size: 0.92rem;
    }
    .header-cta-btn {
        padding: 0.4rem 1rem;
        font-size: 0.82rem;
    }
    .hero-section {
        padding: 4.5rem 1.25rem 4rem;
        border-bottom-left-radius: 30px;
        border-bottom-right-radius: 30px;
    }
    .hero-section.compact-hero {
        padding: 3.5rem 1.25rem 2.25rem;
    }
    .hero-title,
    .hero-section.compact-hero .hero-title { 
        font-size: 1.85rem; 
        letter-spacing: -0.3px;
    }
    .search-shell,
    .hero-section.compact-hero .search-shell {
        margin-top: 1.25rem;
        max-width: 100%;
    }
    .search-input,
    .hero-section.compact-hero .search-input { 
        padding: 0.85rem 5.8rem 0.85rem 2.9rem;
        font-size: 0.94rem;
    }
    .search-icon {
        left: 14px;
        width: 18px;
        height: 18px;
    }
    .search-btn { 
        padding: 0.48rem 1.15rem; 
        font-size: 0.84rem; 
        right: 6px;
    }
    .search-clear-btn,
    .hero-section.compact-hero .search-clear-btn {
        right: 5.4rem;
    }
    .breadcrumb-bar {
        padding: 0 1.25rem;
        margin-top: 1.2rem;
    }
    .breadcrumbs {
        font-size: 0.82rem;
    }
    .category-grid-container {
        padding: 0 1.25rem;
        margin-top: -2rem;
        margin-bottom: 3rem;
    }
    .category-card {
        padding: 1.6rem;
    }
    .article-title { 
        font-size: 1.65rem; 
        margin-bottom: 1.2rem;
    }
    .kb-article { 
        padding: 1.5rem 1.25rem; 
        border-radius: 10px;
    }
    .results-header h1 {
        font-size: 1.45rem;
    }
    .article-feedback-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.9rem;
    }
    .footer-inner { 
        flex-direction: column; 
        justify-content: center; 
        text-align: center; 
        gap: 1.2rem;
    }
    .footer-links { 
        gap: 1.25rem; 
        flex-wrap: wrap; 
        justify-content: center; 
    }
}

@media (max-width: 585px) {
    .video-guide-card {
        margin: 1.75rem 0 2.2rem;
        background: transparent;
        border: none;
        border-radius: 0;
        padding: 0;
        box-shadow: 0 4px 14px rgba(23, 30, 44, 0.05);
    }
    .video-play-btn {
        width: 60px;
        height: 60px;
    }
    .video-play-btn svg {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 600px) {
    .header-label, 
    .header-divider { 
        display: none; 
    }
    .site-header { 
        padding: 0.75rem 1rem; 
    }
    .header-cta-btn {
        padding: 0.35rem 0.8rem;
        font-size: 0.76rem;
    }
    .category-grid { 
        grid-template-columns: 1fr; 
        gap: 1rem;
    }
    .hero-title,
    .hero-section.compact-hero .hero-title { 
        font-size: 1.55rem; 
    }
    .kb-subcategory-title {
        font-size: 1.2rem;
    }
    .hs-kb-category-article-list__link {
        font-size: 0.94rem;
        padding: 0.75rem 0.35rem;
    }
    .back-to-top {
        right: 1rem;
        bottom: 1rem;
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
}

@media (max-width: 420px) {
    .hero-title,
    .hero-section.compact-hero .hero-title { 
        font-size: 1.4rem; 
    }
    .search-input,
    .hero-section.compact-hero .search-input { 
        padding: 0.8rem 4.8rem 0.8rem 2.6rem;
        font-size: 0.88rem;
    }
    .search-btn {
        padding: 0.42rem 0.85rem;
        font-size: 0.78rem;
    }
    .search-clear-btn,
    .hero-section.compact-hero .search-clear-btn {
        right: 4.5rem;
    }
    .article-title {
        font-size: 1.45rem;
    }
}

/* --- Image Zoom & Lightbox Modal --- */
.kb-article img,
.sa-zoomable-img {
    cursor: zoom-in;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

.kb-article img:hover,
.sa-zoomable-img:hover {
    box-shadow: 0 8px 24px rgba(23, 30, 44, 0.12);
}

.sa-image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sa-image-lightbox.is-active {
    opacity: 1;
    visibility: visible;
}

.sa-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: zoom-out;
}

.sa-lightbox-container {
    position: relative;
    z-index: 2;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sa-lightbox-close {
    position: absolute;
    top: -48px;
    right: 0;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.sa-lightbox-close:hover {
    background: var(--brand-orange);
    border-color: var(--brand-orange);
    transform: scale(1.08);
}

.sa-lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sa-image-lightbox.is-active .sa-lightbox-content {
    transform: scale(1);
}

.sa-lightbox-img {
    max-width: 88vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
    background: #ffffff;
}

.sa-lightbox-caption {
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    max-width: 700px;
    line-height: 1.4;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 16px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

