/**
 * T7 Knowledge Base CSS
 * Based on Theory7 Theme styles
 */

/* =========================================
   CSS Variables (from Theory7)
   ========================================= */
:root {
    --t7red-dark: rgb(99, 24, 24);
    --t7red: hsl(0, 67%, 59%);
    --t7red-light: hsl(0, 80%, 70%);
    --t7red-lightest: hsl(9, 100%, 77%);
    --t7red-lightest-transparant: hsla(9, 100%, 77%, 0.5);
    --t7blue: rgb(100, 103, 242);
    --t7blue-dark: hsl(239, 86%, 60%);
    --t7blue-light: hsl(250, 75%, 88%);
    --t7blue-lightest: hsla(250, 75%, 95%, 0.5);
    --t7green: hsl(142, 71%, 45%);
    --t7green-light: hsl(142, 77%, 73%);
    --t7green-medium: hsl(144, 61%, 40%);
    --t7green-dark: hsl(144, 61%, 20%);
    --gray-lightest: hsl(40, 9%, 98%);
    --gray-light: hsl(28deg 2% 95%);
    --gray: hsl(50 5% 93% / 1);
    --gray-medium: hsl(50 5% 86% / 1);
    --gray-dark: hsl(240, 5%, 65%);
    --paragraph-clr: hsla(0, 0%, 0%, 0.9);
    --large-btn-text: 1.125rem;
    --border: 2px solid #EDEDED;
    --bold: 700;
    --semibold: 600;
    --medium: 500;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-no: 0 4px 6px -1px rgb(0 0 0 / 0), 0 2px 4px -2px rgb(0 0 0 / 0);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --text-h1: 2.85rem;
    --text-h2: 2.175rem;
    --text-h3: 1.85rem;
    --text-h4: 1.55rem;
    --text-h5: 1.3rem;
    --text-p: 1.125rem;
    --tiny-text: 0.9rem;
    --small-text: 1rem;
    --medium-text: 1.2rem;
    --big-text: 1.375rem;
}

@media (max-width:900px) {
    :root {
        --text-h1: 2.2rem;
        --text-h2: 2rem;
        --text-h3: 1.75rem;
        --big-text: 1.15rem;
        --medium-text: 1.15rem;
        --small-text: 1rem;
        --text-p: 1rem;
    }
}

/* =========================================
   Reset & Base (from Theory7)
   ========================================= */
*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
    font: inherit;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--gray-lightest);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    pointer-events: none;
    user-select: none;
}

button {
    border: none;
    cursor: pointer;
}

/* =========================================
   Typography (from Theory7)
   ========================================= */
h1, h2, h3, h4, h5 {
    font-weight: var(--bold);
    letter-spacing: 0.015rem;
    text-wrap: balance;
    color: hsl(0deg 0% 0% / 90%);
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); font-weight: var(--semibold); }
h5 { font-size: var(--text-h5); font-weight: var(--semibold); }

p {
    font-size: var(--text-p);
    line-height: 1.61;
    color: var(--paragraph-clr);
    text-wrap: pretty;
}

strong {
    font-weight: var(--bold);
}

a {
    text-decoration: none;
    color: var(--t7red);
    font-weight: 600;
}

a:hover {
    color: var(--paragraph-clr);
}

/* =========================================
   Utility Classes (from Theory7)
   ========================================= */
.text-tiny { font-size: var(--tiny-text); }
.text-small { font-size: var(--small-text); }
.text-center { text-align: center; }
.ml-025 { margin-left: 0.25rem; }
.ml-05 { margin-left: 0.5rem; }
.mr-05 { margin-right: 0.5rem; }
.mt-05 { margin-top: 0.5rem; }
.mt-15 { margin-top: 1.5rem; }
.green { color: var(--t7green); }

.container {
    width: min(100% - 4rem, 1300px);
    margin-inline: auto;
}

/* =========================================
   Button (from Theory7)
   ========================================= */
.button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--gray);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    letter-spacing: 0.02rem;
    border-radius: 0.4rem;
    color: black;
    transition:
        transform 0.2s ease-in-out,
        color 0.2s ease-in-out,
        background-color 0.2s ease-in-out,
        box-shadow 0.2s ease-in-out;
    box-shadow: 0px 1px 0px 0px rgba(255, 255, 255, .3) inset;
}

.button:hover {
    background-color: var(--t7red-lightest);
    color: var(--t7red-dark);
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0px 1px 0px 0px rgba(255, 255, 255, .3) inset, var(--shadow-xl);
}

.button.red {
    background-color: var(--t7red);
    color: white;
}

.button.red:hover {
    background-color: var(--t7red-lightest);
    color: var(--t7red-dark);
}

.button.active {
    background-color: var(--t7red-lightest);
    color: var(--t7red-dark);
}

.button i {
    font-size: 1rem;
}

/* =========================================
   Navigation (from Theory7)
   ========================================= */
nav:not(.breadcrumbs) {
    display: flex;
    width: min(100% - 0rem, 1700px);
    margin-inline: auto;
    background-color: white;
    padding: 1rem 1rem 1rem 1.4rem;
    position: sticky;
    top: 0rem;
    z-index: 100;
    box-shadow: var(--shadow-lg);
    transition: 0.2s ease;
}

@media (min-width: 1170px) {
    nav:not(.breadcrumbs) {
        width: min(100% - 1rem, 1700px);
        border-radius: 0.9rem;
        margin-top: 0.5rem;
        background-color: #fffffff1;
        backdrop-filter: blur(15px);
        top: 0.5rem;
    }
}

.nav-container {
    display: flex;
    width: 100%;
    max-width: 100%;
    gap: 2rem;
    align-items: center;
}

.logo {
    line-height: 0.5;
}

.desktop-logo {
    display: block;
    width: 150px;
    max-width: none;
    transition: 0.2s ease;
    pointer-events: all;
}

.desktop-logo:hover {
    transform: scale(1.05);
}

.navbar-logo {
    width: 150px;
}

.nav-menus {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.nav-menu-left, .nav-menu-right {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    list-style: none;
}

.nav-menu-left {
    gap: 1rem;
}

.nav-menu-left a {
    font-weight: 600;
}

.nav-menu-right {
    gap: 0.5rem;
}

.nav-menus li {
    list-style: none;
}

.nav-menus li a, footer a:not(.footer-rating a) {
    display: block;
    color: black;
}

.nav-menus a:hover, footer a:hover {
    color: var(--t7red);
}

.nav-menus .button:hover {
    color: var(--t7red-dark);
}

/* =========================================
   Hover Menu Dropdowns (from Theory7)
   ========================================= */
.hover-menu-parent {
    position: relative;
}

.hover-menu-accordion {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    cursor: pointer;
    padding-block: 0.6rem;
}

.dropdown-toggle i {
    font-size: 0.6rem;
    transform: translateY(-1px);
    transition: transform 0.3s ease-in-out;
}

.hover-menu-parent:hover .dropdown-toggle i {
    transform: rotate(180deg) translateY(1px);
}

.hover-menu {
    --spacer: 1rem;
    display: none;
    opacity: 0;
    box-shadow: var(--shadow-lg);
    background-color: white;
    margin-left: calc(var(--spacer) * -1);
    padding: 0.75rem;
    padding-top: 1rem;
    border-radius: 1rem;
    min-width: max-content;
    transform: translateX(-35%) translateY(0);
    border: 1px solid var(--gray-light);
    list-style: none;
    top: 100%;
}

/* Invisible bridge to prevent gap between trigger and menu */
.hover-menu::before {
    content: '';
    position: absolute;
    top: -1rem;
    left: 0;
    right: 0;
    height: 1rem;
}

.hover-menu-parent:hover > .hover-menu,
.hover-menu-parent:focus-within > .hover-menu {
    opacity: 1;
    position: absolute;
    display: grid;
    animation: hover-popup 0.2s ease;
}

@keyframes hover-popup {
    0% {
        transform: translateY(0.5rem) translateX(-35%) scale(0.98);
        opacity: 0;
    }
    100% {
        transform: translateY(0) translateX(-35%) scale(1);
        opacity: 1;
    }
}

.hover-menu a {
    padding: 0.75rem;
    border-radius: 0.5rem;
    transition: 0.15s;
}

.hover-menu a:hover span {
    color: black;
}

.hover-menu a:hover {
    background-color: var(--t7red-light);
}

.hover-menu-inner {
    display: grid;
    gap: 0.25rem;
}

.hover-menu-inner .menu-hover-item {
    display: grid;
    align-items: center;
    gap: 1rem;
    grid-template-columns: auto 1fr;
}

.menu-hover-item i {
    font-size: 1.25rem;
    color: var(--paragraph-clr);
    transition: 0.2s ease;
}

.menu-hover-item:hover i {
    color: var(--t7red);
}

.nav-icon-bg {
    background-color: var(--gray-light);
    display: grid;
    place-items: center;
    padding: 0.75rem;
    aspect-ratio: 1;
    border-radius: 0.5rem;
    transition: 0.2s ease;
}

.hover-menu a:hover > .nav-icon-bg {
    background-color: white;
}

.hover-menu a:hover > .nav-icon-bg i {
    transform: scale(1.25);
}

.menu-item p {
    opacity: 0.85;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    max-width: 35ch;
    font-weight: 500;
}

.divider {
    height: 1px;
    background-color: var(--gray-medium);
    margin: 0.5rem 0;
}

/* =========================================
   Click Menu (MyT7 dropdown - from Theory7)
   ========================================= */
.click-menu-parent {
    position: relative;
}

.click-menu {
    display: none;
    --spacer: 1rem;
    position: absolute;
    z-index: 50;
    right: 0;
    box-shadow: var(--shadow-lg);
    transform: translateY(0.5rem);
    background-color: white;
    padding: calc(var(--spacer) * 1.5);
    border-radius: 0.5rem;
    animation: click-popup 0.2s ease-in-out;
    border-top: 0.5rem solid var(--t7red-light);
}

.click-menu[data-visible="true"] {
    display: block;
    min-width: 200px;
}

.click-menu-inner {
    max-width: 100%;
    display: grid;
    gap: 1rem;
}

@keyframes click-popup {
    0% {
        transform: translateY(1.6rem) scale(0.98);
        opacity: 0;
    }
    100% {
        transform: translateY(0.5rem) scale(1);
        opacity: 1;
    }
}

/* =========================================
   Mobile Navigation
   ========================================= */
.mobile-container {
    display: none;
}

.mobile-nav-toggle {
    display: none;
}

.mobile-logo {
    width: 120px;
}

.fa-svg {
    width: 1.25em;
    height: 1.25em;
    vertical-align: -0.125em;
}

@media (max-width: 1100px) {
    .nav-container {
        display: none;
    }

    .nav-container[data-visible="true"] {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        padding: 2rem;
        z-index: 200;
        overflow-y: auto;
    }

    .nav-container[data-visible="true"] .nav-menus {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-container[data-visible="true"] .nav-menu-left,
    .nav-container[data-visible="true"] .nav-menu-right {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .mobile-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 1rem;
    }

    .mobile-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--gray);
        padding: 0.75rem;
        border-radius: 0.5rem;
        order: -1;
    }

    .hover-menu {
        position: relative;
        transform: none;
        margin: 0;
        box-shadow: none;
        border: none;
        padding: 0.5rem;
        background: var(--gray-light);
    }

    .hover-menu-parent:hover > .hover-menu,
    .hover-menu-parent:focus-within > .hover-menu {
        animation: none;
        transform: none;
    }

    .button .text,
    .button .text-reverse {
        display: none;
    }
}

@media (min-width: 1101px) {
    .button .text-reverse {
        display: none;
    }
}

/* =========================================
   KB Hero Section
   ========================================= */
.kb-hero {
    background: linear-gradient(135deg, var(--t7red-lightest-transparant) 0%, var(--gray-lightest) 100%);
    padding: 4rem 2rem 3rem;
    text-align: center;
}

.kb-hero-container {
    max-width: 700px;
    margin: 0 auto;
}

.kb-hero-title {
    font-size: var(--text-h1);
    font-weight: var(--bold);
    margin-bottom: 1.5rem;
    color: hsl(0deg 0% 0% / 90%);
}

/* Search Form */
.kb-search-form {
    position: relative;
    margin-bottom: 1.5rem;
}

.kb-search-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 0.5rem;
    padding: 0.5rem 0.5rem 0.5rem 1rem;
    box-shadow: var(--shadow-lg);
    gap: 1rem;
}

.kb-search-wrapper i {
    color: var(--gray-dark);
    font-size: 1.25rem;
}

.kb-search-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 0.5rem;
    background: transparent;
}

.kb-search-wrapper input::placeholder {
    color: var(--gray-dark);
}

.kb-search-wrapper .button {
    padding: 0.75rem 1.5rem;
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 0.5rem 0.5rem;
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 50;
    margin-top: 2px;
}

.search-suggestions a {
    display: block;
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: var(--paragraph-clr);
    border-bottom: 1px solid var(--gray-light);
}

.search-suggestions a:hover {
    background: var(--gray-light);
    color: var(--t7red);
}

.search-suggestions a:last-child {
    border-bottom: none;
}

/* USP Bar */
.kb-usp-bar {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: var(--small-text);
    color: var(--paragraph-clr);
}

.kb-usp-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kb-usp-item i {
    color: var(--t7green);
}

/* =========================================
   Breadcrumbs
   ========================================= */
.breadcrumbs {
    background: white;
    padding: 1rem 0;
    font-size: var(--small-text);
    border-bottom: 1px solid var(--gray-light);
}

.breadcrumbs-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    flex-wrap: wrap;
}

.breadcrumbs-list a {
    color: var(--paragraph-clr);
    font-weight: 500;
}

.breadcrumbs-list a:hover {
    color: var(--t7red);
}

.breadcrumbs-list .separator {
    color: var(--gray-dark);
}

.breadcrumbs-list .current {
    color: var(--gray-dark);
}

/* =========================================
   KB Main Content
   ========================================= */
.kb-main {
    padding: 2rem 0;
    min-height: 50vh;
}

.kb-main .container {
    padding: 0 2rem;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.category-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
}

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

.category-card h3 {
    font-size: var(--text-h5);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.category-card h3 i {
    color: var(--t7red);
    font-size: 1.5rem;
}

.category-card p {
    font-size: var(--small-text);
    color: var(--gray-dark);
    margin-bottom: 1rem;
}

.category-card .article-count {
    font-size: var(--tiny-text);
    color: var(--gray-dark);
}

/* Articles List */
.articles-list {
    display: grid;
    gap: 0.75rem;
}

.article-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    text-decoration: none;
}

.article-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.article-item-icon {
    color: var(--t7red);
    font-size: 1.25rem;
}

.article-item-content {
    flex: 1;
}

.article-item-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--paragraph-clr);
    margin-bottom: 0.25rem;
}

.article-item-content p {
    font-size: var(--tiny-text);
    color: var(--gray-dark);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-item-arrow {
    color: var(--gray-dark);
    font-size: 0.875rem;
}

.article-item:hover .article-item-arrow {
    color: var(--t7red);
}

/* =========================================
   Article Page - Clean 2 Column Layout
   ========================================= */

/* Container */
.article-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Wrapper - 2 column grid */
.article-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 900px) {
    .article-wrapper {
        grid-template-columns: 1fr 280px;
        gap: 3rem;
    }
}

/* Main Article Content */
.article-content {
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    padding: 2.5rem;
    overflow-x: hidden;
    max-width: 100%;
}

@media (max-width: 600px) {
    .article-content {
        padding: 1.5rem;
        border-radius: 0.5rem;
    }
}

/* Article Header */
.article-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-light);
}

.article-header h1 {
    font-size: 2rem;
    line-height: 1.3;
    margin: 0 0 1rem 0;
    color: hsl(0deg 0% 10%);
}

@media (max-width: 600px) {
    .article-header h1 {
        font-size: 1.5rem;
    }
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    color: var(--gray-dark);
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.meta-item i {
    font-size: 0.8rem;
    opacity: 0.7;
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.meta-badge.internal {
    background: var(--t7blue-lightest);
    color: var(--t7blue-dark);
}

/* Article Body - Clean Typography */
.article-body {
    font-size: 1rem;
    line-height: 1.75;
    color: hsl(0deg 0% 20%);
    overflow-x: hidden;
}

.article-body * {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.article-body h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2rem 0 1rem 0;
    color: hsl(0deg 0% 10%);
}

.article-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.75rem 0 0.75rem 0;
    color: hsl(0deg 0% 15%);
}

.article-body h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem 0;
}

.article-body p {
    margin: 0 0 1rem 0;
}

.article-body ul,
.article-body ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.article-body li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

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

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

.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
    cursor: zoom-in;
    pointer-events: auto;
}

.article-body pre {
    background: #f6f8fa;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.25rem 0;
    font-size: 0.875rem;
    border: 1px solid var(--gray-medium);
    max-width: 100%;
}

.article-body code {
    font-family: 'SF Mono', Monaco, Consolas, monospace;
    font-size: 0.875em;
    background: #f6f8fa;
    padding: 0.15rem 0.35rem;
    border-radius: 0.25rem;
    word-break: break-all;
}

.article-body pre code {
    background: none;
    padding: 0;
    word-break: normal;
    white-space: pre;
}

.article-body blockquote {
    border-left: 3px solid var(--t7red);
    padding: 0.5rem 0 0.5rem 1.25rem;
    margin: 1.25rem 0;
    background: var(--gray-lightest);
    border-radius: 0 0.25rem 0.25rem 0;
}

.article-body blockquote p {
    margin: 0;
    color: var(--gray-dark);
}

/* Responsive table wrapper */
.article-body .table-wrapper {
    overflow-x: auto;
    margin: 1.25rem 0;
    -webkit-overflow-scrolling: touch;
}

.article-body table {
    width: 100%;
    min-width: 400px;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

/* Tables without wrapper get inline scroll */
.article-body > table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.25rem 0;
}

.article-body th,
.article-body td {
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--gray-medium);
    text-align: left;
    white-space: nowrap;
}

@media (min-width: 768px) {
    .article-body th,
    .article-body td {
        white-space: normal;
    }
}

.article-body th {
    background: var(--gray-light);
    font-weight: 600;
}

.article-body hr {
    border: none;
    border-top: 1px solid var(--gray-light);
    margin: 2rem 0;
}

/* Feedback Section */
.article-feedback {
    margin-top: 2.5rem;
    padding: 1.5rem;
    background: var(--gray-lightest);
    border-radius: 0.5rem;
    text-align: center;
}

.feedback-question {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.feedback-question > span {
    font-weight: 600;
    font-size: 1rem;
    color: hsl(0deg 0% 20%);
}

.feedback-buttons {
    display: flex;
    gap: 0.5rem;
}

.feedback-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    background: white;
    border: 1px solid var(--gray-medium);
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.feedback-btn:hover {
    background: var(--t7red-lightest);
    border-color: var(--t7red-light);
    color: var(--t7red-dark);
}

.feedback-btn.voted-up {
    background: var(--t7green-light);
    border-color: var(--t7green);
    color: var(--t7green-dark);
}

.feedback-btn.voted-down {
    background: var(--t7red-lightest);
    border-color: var(--t7red-light);
    color: var(--t7red-dark);
}

.feedback-count {
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--gray-dark);
}

/* Related Section */
.related-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-light);
}

.related-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: hsl(0deg 0% 20%);
}

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

.related-list li {
    margin: 0;
}

.related-list a {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 0;
    font-size: 0.9375rem;
    color: var(--paragraph-clr);
    text-decoration: none;
    border-bottom: 1px solid var(--gray-light);
    transition: color 0.15s ease;
}

.related-list li:last-child a {
    border-bottom: none;
}

.related-list a i {
    font-size: 0.875rem;
    color: var(--t7red);
    opacity: 0.7;
}

.related-list a:hover {
    color: var(--t7red);
}

.related-list a:hover i {
    opacity: 1;
}

/* Sidebar */
.article-sidebar {
    display: none;
}

@media (min-width: 900px) {
    .article-sidebar {
        display: block;
        align-self: start;
        position: sticky;
        top: 7rem;
    }
}

.sidebar-sticky {
    /* Container for sticky elements */
}

/* TOC Card */
.toc-card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    border: 1px solid var(--gray-light);
}

.toc-card h4 {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-dark);
    margin-bottom: 0.75rem;
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

nav#toc-nav {
    box-shadow: none;
    padding: 0;
}

.toc-nav a {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.4;
    color: var(--paragraph-clr);
    text-decoration: none;
    border-radius: 0.25rem;
    border-left: 2px solid transparent;
    margin-left: -0.75rem;
    padding-left: calc(0.75rem - 2px);
    transition: all 0.15s ease;
}

.toc-nav a.level-3 {
    padding-left: calc(1.5rem - 2px);
    font-size: 0.8125rem;
    color: var(--gray-dark);
}

.toc-nav a:hover {
    background: var(--gray-lightest);
    color: var(--t7red);
}

.toc-nav a.active {
    background: var(--t7red-lightest);
    color: var(--t7red-dark);
    border-left-color: var(--t7red);
    font-weight: 500;
}

/* Back Link */
.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--paragraph-clr);
    background: var(--gray-lightest);
    border-radius: 0.375rem;
    text-decoration: none;
    transition: all 0.15s ease;
}

.back-link:hover {
    background: var(--t7red-lightest);
    color: var(--t7red-dark);
}

.back-link i {
    font-size: 0.75rem;
}

/* Help CTA */
.help-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
}

.help-cta-content h2 {
    font-size: 1.25rem;
    margin: 0 0 0.375rem 0;
}

.help-cta-content p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--gray-dark);
}

.help-cta-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .help-cta {
        flex-direction: column;
        text-align: center;
    }

    .help-cta-actions {
        justify-content: center;
    }
}

/* =========================================
   Search Results
   ========================================= */
.search-results-section {
    margin-bottom: 2rem;
}

.search-results-header {
    margin-bottom: 1.5rem;
}

.search-results-header h1 {
    font-size: var(--text-h3);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
}

.empty-state i {
    font-size: 3rem;
    color: var(--gray-dark);
    margin-bottom: 1rem;
}

.empty-state h2 {
    font-size: var(--text-h4);
    margin-bottom: 0.75rem;
}

.empty-state p {
    color: var(--gray-dark);
    max-width: 50ch;
    margin: 0 auto 1.5rem;
}

/* Contact CTA */
.contact-cta {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    margin-top: 2rem;
}

.contact-cta h2 {
    font-size: var(--text-h4);
    margin-bottom: 0.5rem;
}

.contact-cta p {
    color: var(--gray-dark);
    margin-bottom: 1.5rem;
}

.contact-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.contact-cta-buttons .button.outline {
    background: transparent;
    border: 2px solid var(--gray);
}

.contact-cta-buttons .button.outline:hover {
    background: var(--gray);
}

/* =========================================
   Footer (from Theory7)
   ========================================= */
.footer-illustration {
    max-width: min(100% - 4rem, 1300px);
    margin-inline: auto;
    position: relative;
    z-index: -1;
    transform: translateY(50%);
}

.footer-illustration img {
    max-height: 7rem;
    display: block;
    margin-inline: auto;
}

footer {
    background-color: var(--gray);
    padding-block: 2.5rem 3rem;
    font-size: var(--tiny-text);
}

.footercontainer {
    width: min(100% - 4rem, 1300px);
    gap: 2rem;
    margin-inline: auto;
    display: grid;
}

.topfooter {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.topfooter .left, .topfooter .right {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.topfooter .right i {
    font-size: 1.5rem;
}

.middle-footer {
    margin-inline: -0.25rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 1.3rem 1.5rem;
    row-gap: 1.5rem;
    column-gap: 3rem;
    background-color: hsla(0, 0%, 100%, 0.3);
    border-radius: 0.75rem;
}

@media (max-width: 1260px) {
    .middle-footer {
        justify-content: flex-start;
    }
}

.footer-rating {
    display: flex;
    gap: 1rem;
}

.footer-rating a {
    font-weight: var(--bold);
}

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

.footer-rating-stars {
    color: var(--t7green);
}

.botfooter {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.botfooter ul {
    list-style: none;
    line-height: 2.5;
}

.footer-title {
    font-weight: var(--bold);
    margin-bottom: 0.5rem;
}

.botfooter a {
    font-weight: 500;
}

.footer-divider {
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid #0000000f;
}

.footer-paragraph {
    line-height: 1.61;
    color: var(--paragraph-clr);
}

/* =========================================
   Responsive Adjustments
   ========================================= */
@media (max-width: 768px) {
    .kb-hero {
        padding: 2rem 1rem;
    }

    .kb-hero-title {
        font-size: var(--text-h2);
    }

    .kb-usp-bar {
        gap: 1rem;
    }

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

    .article-layout {
        padding: 1rem;
        gap: 1.5rem;
    }

    .article-page,
    .article-content {
        padding: 1.25rem;
    }

    .article-header h1 {
        font-size: var(--text-h3);
    }

    .article-meta {
        flex-wrap: wrap;
    }

    .article-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-vote {
        flex-wrap: wrap;
    }

    /* Hide knowledge tree on mobile */
    .knowledge-tree {
        display: none;
    }

    /* TOC at top on mobile */
    .toc {
        order: -1;
    }

    .sidebar-container {
        padding: 1rem;
    }

    .topfooter {
        flex-direction: column;
        text-align: center;
    }

    .topfooter .left, .topfooter .right {
        justify-content: center;
    }

    .footer-illustration {
        display: none;
    }
}

/* =========================================
   Pagination (Laravel default styling)
   ========================================= */
.pagination {
    margin-top: 2rem;
}

.pagination nav[role="navigation"] {
    display: flex;
    justify-content: center;
}

/* Hide the mobile pagination */
.pagination nav > div:first-child {
    display: none !important;
}

/* Desktop pagination container */
.pagination nav > div:last-child {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Hide "Showing X to Y of Z results" text */
.pagination nav > div:last-child > div:first-child {
    display: none;
}

/* Pagination buttons container */
.pagination nav span.inline-flex,
.pagination nav > div > div:last-child span {
    display: inline-flex;
    gap: 0;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* All pagination items (links and spans) */
.pagination nav span.inline-flex a,
.pagination nav span.inline-flex span[aria-disabled],
.pagination nav span.inline-flex span[aria-current] span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    font-size: var(--small-text);
    font-weight: 500;
    background: white;
    border: 1px solid var(--gray-medium);
    color: var(--paragraph-clr);
    margin-left: -1px;
    transition: all 0.2s ease;
    text-decoration: none;
    min-width: 2.5rem;
}

.pagination nav span.inline-flex > *:first-child,
.pagination nav span.inline-flex > *:first-child span {
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
    margin-left: 0;
}

.pagination nav span.inline-flex > *:last-child,
.pagination nav span.inline-flex > *:last-child span {
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

/* Active page */
.pagination nav span[aria-current="page"] span {
    background: var(--t7red);
    color: white;
    border-color: var(--t7red);
}

/* Disabled state */
.pagination nav span[aria-disabled="true"] span {
    color: var(--gray-dark);
    cursor: not-allowed;
    background: var(--gray-light);
}

/* Hover state */
.pagination nav span.inline-flex a:hover {
    background: var(--t7red-lightest);
    color: var(--t7red-dark);
    border-color: var(--t7red-light);
}

/* SVG icons in pagination */
.pagination nav svg {
    width: 1rem;
    height: 1rem;
}

/* Reset all Tailwind classes that might interfere */
.pagination [class*="flex"],
.pagination [class*="gap-"],
.pagination [class*="items-"],
.pagination [class*="justify-"],
.pagination [class*="text-"],
.pagination [class*="bg-"],
.pagination [class*="border-"],
.pagination [class*="rounded-"],
.pagination [class*="px-"],
.pagination [class*="py-"],
.pagination [class*="leading-"],
.pagination [class*="shadow-"],
.pagination [class*="cursor-"],
.pagination [class*="font-"],
.pagination [class*="dark:"] {
    all: unset;
}

/* =========================================
   Page Header
   ========================================= */
.page-header {
    background: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--gray-light);
}

.page-header h1 {
    font-size: var(--text-h2);
    margin-bottom: 0.5rem;
}

.page-description {
    color: var(--gray-dark);
    font-size: var(--text-p);
    max-width: 60ch;
}

.page-count {
    font-size: var(--tiny-text);
    color: var(--gray-dark);
    margin-top: 0.5rem;
}

/* =========================================
   Sections Grid (subcategories)
   ========================================= */
.section-tree {
    margin-bottom: 2rem;
}

.sections-grid {
    display: grid;
    gap: 1rem;
}

.section-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--paragraph-clr);
}

.section-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.section-icon {
    color: var(--t7blue);
    font-size: 1.5rem;
}

.section-content {
    flex: 1;
}

.section-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.section-content p {
    font-size: var(--tiny-text);
    color: var(--gray-dark);
    margin: 0;
}

.section-count {
    font-size: var(--tiny-text);
    color: var(--gray-dark);
}

.section-arrow {
    color: var(--gray-dark);
    font-size: 0.875rem;
}

.section-card:hover .section-arrow {
    color: var(--t7red);
}

/* =========================================
   Articles Section
   ========================================= */
.articles-section {
    margin-bottom: 2rem;
}

.articles-section h2 {
    font-size: var(--text-h4);
    margin-bottom: 1rem;
}

/* =========================================
   Popular Articles Section (Homepage)
   ========================================= */
.popular-section {
    margin-top: 3rem;
    padding: 2rem 2rem 3rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
}

.popular-section h2 {
    font-size: var(--text-h4);
    margin-bottom: 1.5rem;
    text-align: center;
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.popular-article {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--gray-lightest);
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.popular-article:hover {
    background: var(--t7red-lightest);
    border-color: var(--t7red-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.popular-article-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 0.5rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.popular-article-icon i {
    font-size: 1.125rem;
    color: var(--t7red);
}

.popular-article-content {
    flex: 1;
    min-width: 0;
}

.popular-article-content h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--paragraph-clr);
    margin: 0 0 0.375rem 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.popular-article:hover .popular-article-content h3 {
    color: var(--t7red-dark);
}

.popular-article-content span {
    font-size: var(--tiny-text);
    color: var(--gray-dark);
    font-weight: 500;
}

@media (max-width: 768px) {
    .popular-section {
        margin-top: 2rem;
        padding: 1.5rem;
    }

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

    .popular-article {
        padding: 1rem;
    }
}

/* =========================================
   Categories Section (Homepage)
   ========================================= */
.categories-section {
    margin-top: 3rem;
}

.categories-section h2 {
    font-size: var(--text-h4);
    margin-bottom: 1.5rem;
    text-align: center;
}

.advicebox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.advicebox {
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    text-decoration: none;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.advicebox:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--t7red-light);
}

.advicebox-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--t7red-lightest);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
}

.advicebox-icon i {
    font-size: 1.5rem;
    color: var(--t7red);
}

.advicebox h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--paragraph-clr);
    margin: 0 0 0.5rem 0;
}

.advicebox:hover h3 {
    color: var(--t7red);
}

.advicebox p {
    font-size: var(--small-text);
    color: var(--gray-dark);
    margin: 0 0 0.75rem 0;
    line-height: 1.5;
    flex-grow: 1;
}

.advicebox-count {
    font-size: var(--tiny-text);
    color: var(--gray-dark);
    font-weight: 500;
}

.advicebox-subcats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-light);
}

.advicebox-subcat {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--gray-light);
    color: var(--gray-dark);
    border-radius: 0.25rem;
}

@media (max-width: 768px) {
    .categories-section {
        margin-top: 2rem;
    }

    .advicebox-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .advicebox {
        padding: 1.25rem;
    }
}

/* =========================================
   Support Section (Homepage)
   ========================================= */
.support-section {
    margin-top: 3rem;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--t7red-lightest-transparant) 0%, var(--gray-lightest) 100%);
    border-radius: 1rem;
    text-align: center;
}

.support-section h2 {
    font-size: var(--text-h3);
    margin-bottom: 0.5rem;
}

.support-intro {
    font-size: var(--text-p);
    color: var(--gray-dark);
    margin-bottom: 2rem;
}

.support-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.support-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    text-decoration: none;
    transition: all 0.2s ease;
}

.support-type:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.support-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    background: var(--t7red-lightest);
    transition: all 0.2s ease;
}

.support-icon i {
    font-size: 1.5rem;
    color: var(--t7red);
    transition: all 0.2s ease;
}

.support-type:hover .support-icon {
    background: var(--t7red);
}

.support-type:hover .support-icon i {
    color: white;
}

.support-type h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--paragraph-clr);
    margin: 0 0 0.375rem 0;
}

.support-type p {
    font-size: var(--small-text);
    color: var(--gray-dark);
    margin: 0 0 0.75rem 0;
}

.support-availability {
    font-size: var(--tiny-text);
    font-weight: 600;
    color: var(--t7red-dark);
    background: var(--t7red-lightest);
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
}

@media (max-width: 768px) {
    .support-section {
        margin-top: 2rem;
        padding: 2rem 1.5rem;
    }

    .support-types {
        grid-template-columns: 1fr;
    }

    .support-type {
        padding: 1.5rem;
    }
}

/* =========================================
   Print Styles
   ========================================= */
@media print {
    nav, .kb-hero, .breadcrumbs, .article-sidebar, .article-vote, .related-articles, footer {
        display: none;
    }

    .article-content {
        box-shadow: none;
    }
}

/* =========================================
   Preview Banner
   ========================================= */
.preview-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
}

.preview-banner-warning {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #ef4444;
}

.preview-banner-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    color: #78350f;
}

.preview-banner-warning .preview-banner-content {
    color: #7f1d1d;
}

.preview-banner-content i {
    font-size: 1.25rem;
}

.preview-status {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.preview-status-published {
    background: #d1fae5;
    color: #065f46;
}

.preview-status-draft {
    background: #fef3c7;
    color: #92400e;
}

.preview-status-internal {
    background: #dbeafe;
    color: #1e40af;
}

.preview-edit-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.preview-edit-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #1f2937;
}

@media (max-width: 640px) {
    .preview-banner {
        flex-direction: column;
        align-items: flex-start;
    }

    .preview-edit-btn {
        width: 100%;
        justify-content: center;
    }
}
