/**
 * Knowledge Importer Frontend Styles
 * Brand Color: #283887 (dark blue)
 */

/* ==========================================================================
   Archive Page - Knowledge Articles
   ========================================================================== */

.knowledge-archive-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.knowledge-page-header {
    margin-bottom: 30px;
}

.knowledge-page-header .page-title {
    color: #283887 !important;
    margin: 0 0 10px 0;
    font-size: 2em;
}

/* ==========================================================================
   Search Form
   ========================================================================== */

.knowledge-search-wrapper {
    margin-bottom: 30px;
}

.knowledge-search-form {
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px;
    padding: 20px;
}

.knowledge-search-input-wrapper {
    display: flex;
}

.knowledge-search-input-wrapper input[type="search"],
.knowledge-search-input-wrapper input[type="text"] {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #ddd !important;
    border-radius: 6px 0 0 6px;
    font-size: 16px;
    outline: none;
    background: #ffffff !important;
    color: #333 !important;
}

.knowledge-search-input-wrapper input:focus {
    border-color: #283887 !important;
}

.knowledge-search-input-wrapper button {
    padding: 12px 24px;
    background: #283887 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s ease;
}

.knowledge-search-input-wrapper button:hover {
    background: #1a2560 !important;
}

/* ==========================================================================
   Category Sections on Archive
   ========================================================================== */

.knowledge-categories-overview {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.knowledge-category-section {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 30px;
}

.knowledge-category-section:last-child {
    border-bottom: none;
}

.knowledge-category-title {
    color: #283887 !important;
    font-size: 1.4em;
    margin: 0 0 20px 0 !important;
    padding-bottom: 10px;
    border-bottom: 2px solid #283887;
    display: inline-block;
}

.knowledge-category-title a {
    color: #283887 !important;
    text-decoration: none;
}

.knowledge-category-title a:hover {
    text-decoration: underline;
}

.knowledge-category-title .article-count {
    font-size: 0.7em;
    color: #666 !important;
    font-weight: normal;
}

/* Compact article list within categories */
.knowledge-articles-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    grid-gap: 12px;
}

.knowledge-article-item-compact {
    padding: 12px 16px;
    background: #f8f9fa !important;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.knowledge-article-item-compact:hover {
    background: #e8ecf4 !important;
}

.knowledge-article-item-compact a {
    color: #283887 !important;
    text-decoration: none;
    font-size: 0.95em;
    display: block;
}

.knowledge-article-item-compact a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Grid Layout (for category pages and fallback)
   ========================================================================== */

.knowledge-articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    grid-gap: 24px;
}

.knowledge-article-item {
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px;
    padding: 24px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.knowledge-article-item:hover {
    border-color: #283887 !important;
    box-shadow: 0 4px 12px rgba(40, 56, 135, 0.1);
}

.knowledge-article-title {
    margin: 0 0 12px 0 !important;
    font-size: 1.1em;
    line-height: 1.4;
}

.knowledge-article-title a {
    color: #283887 !important;
    text-decoration: none;
}

.knowledge-article-title a:hover {
    text-decoration: underline;
}

.knowledge-article-excerpt {
    color: #555 !important;
    font-size: 0.95em;
    line-height: 1.6;
    margin: 0;
}

/* ==========================================================================
   Single Article Page
   ========================================================================== */

.knowledge-article-single {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* THE BLUE HEADER BOX */
.knowledge-article-single .entry-header.knowledge-article-header,
.knowledge-article-single header.entry-header.knowledge-article-header,
.knowledge-article-single .knowledge-article-header,
article.knowledge-article-single .entry-header,
article.knowledge-article-single header.entry-header {
    background-color: #283887 !important;
    background: #283887 !important;
    color: #ffffff !important;
    padding: 40px !important;
    margin: 0 !important;
    border-radius: 8px 8px 0 0 !important;
    border: none !important;
}

/* Title inside the blue box - WHITE */
.knowledge-article-single .entry-header .entry-title,
.knowledge-article-single .knowledge-article-header .entry-title,
.knowledge-article-single header .entry-title,
article.knowledge-article-single .entry-title,
.knowledge-article-header h1.entry-title,
.knowledge-article-header h1 {
    color: #ffffff !important;
    margin: 0 0 16px 0 !important;
    padding: 0 !important;
    font-size: 1.8em;
    background: transparent !important;
}

/* Published date in header - white */
.knowledge-header-date {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.95em;
    margin-top: 8px;
}

/* Category tags in header - white semi-transparent */
.knowledge-header-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.knowledge-category-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    text-decoration: none !important;
    transition: background-color 0.2s ease;
    border: none !important;
}

.knowledge-category-tag:hover {
    background: rgba(255, 255, 255, 0.35) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

/* ==========================================================================
   Article Content Area
   ========================================================================== */

.knowledge-article-single .entry-content.knowledge-article-content,
.knowledge-article-single .knowledge-article-content,
.knowledge-article-single .entry-content,
article.knowledge-article-single .entry-content {
    padding: 40px !important;
    background: #ffffff !important;
    line-height: 1.8;
    font-size: 1.05em;
    margin: 0 !important;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    color: #333 !important;
}

.knowledge-article-content h1,
.knowledge-article-content h2,
.knowledge-article-content h3,
.knowledge-article-content h4,
.knowledge-article-single .entry-content h1,
.knowledge-article-single .entry-content h2,
.knowledge-article-single .entry-content h3,
.knowledge-article-single .entry-content h4 {
    color: #283887 !important;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}

.knowledge-article-content h1:first-child,
.knowledge-article-content h2:first-child,
.knowledge-article-content h3:first-child,
.knowledge-article-single .entry-content h1:first-child,
.knowledge-article-single .entry-content h2:first-child,
.knowledge-article-single .entry-content h3:first-child {
    margin-top: 0;
}

.knowledge-article-content a,
.knowledge-article-single .entry-content a {
    color: #283887 !important;
}

.knowledge-article-content p,
.knowledge-article-single .entry-content p {
    color: #333 !important;
    margin-bottom: 1em;
}

.knowledge-article-content img,
.ki-article-body img,
body.single-knowledge-article .entry-content img,
body.single-knowledge-article .et_pb_post_content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 20px 0;
    cursor: zoom-in;
    transition: opacity 0.2s ease;
}

.knowledge-article-content img:hover,
.ki-article-body img:hover,
body.single-knowledge-article .entry-content img:hover,
body.single-knowledge-article .et_pb_post_content img:hover {
    opacity: 0.85;
}

/* ==========================================================================
   Image Lightbox
   ========================================================================== */

.ki-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: zoom-out;
}

.ki-lightbox-overlay.ki-lightbox-visible {
    opacity: 1;
}

.ki-lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
    cursor: default;
}

.ki-lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 24px;
    line-height: 40px;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s ease;
    z-index: 1000000;
}

.ki-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

body.ki-lightbox-open {
    overflow: hidden;
}

.knowledge-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.knowledge-article-content th,
.knowledge-article-content td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    color: #333 !important;
}

.knowledge-article-content th {
    background: #f8f9fa !important;
    font-weight: 600;
    color: #283887 !important;
}

.knowledge-article-content ul,
.knowledge-article-content ol {
    padding-left: 24px;
    color: #333 !important;
}

.knowledge-article-content li {
    margin-bottom: 8px;
    color: #333 !important;
}

/* ==========================================================================
   Article Footer
   ========================================================================== */

.knowledge-article-single .entry-footer.knowledge-article-footer,
.knowledge-article-single .knowledge-article-footer,
.knowledge-article-single .entry-footer,
article.knowledge-article-single .entry-footer {
    padding: 20px 40px !important;
    background: #f8f9fa !important;
    border-radius: 0 0 8px 8px;
    border: 1px solid #e0e0e0;
    border-top: none;
    margin: 0 !important;
}

.knowledge-article-footer .last-modified,
.knowledge-article-single .entry-footer p {
    color: #666 !important;
    font-size: 0.9em;
    margin: 0;
}

/* ==========================================================================
   Post Navigation
   ========================================================================== */

.knowledge-article-single .post-navigation,
.knowledge-article-single .nav-links {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
}

.post-navigation .nav-subtitle {
    display: block;
    font-size: 0.85em;
    color: #666 !important;
    margin-bottom: 4px;
}

.post-navigation .nav-title,
.post-navigation a {
    color: #283887 !important;
}

/* ==========================================================================
   No Results / Empty States
   ========================================================================== */

.no-articles {
    text-align: center;
    color: #666 !important;
    padding: 60px 20px;
    font-size: 1.1em;
}

.knowledge-all-articles-fallback h2 {
    color: #283887 !important;
    margin-bottom: 20px;
}

/* ==========================================================================
   Shortcode Styles - Enhanced Design
   ========================================================================== */

/* Category heading in shortcode */
.knowledge-category-heading {
    display: inline-block;
    background: #283887 !important;
    color: #ffffff !important;
    font-size: 1.3em;
    font-weight: 600;
    margin: 0 0 24px 0;
    padding: 14px 28px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(40, 56, 135, 0.25);
}

/* Shortcode list container */
.knowledge-shortcode-list {
    margin: 30px 0;
}

/* Articles shortcode container */
.knowledge-articles-shortcode {
    margin: 30px 0;
}

.knowledge-articles-shortcode.knowledge-template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* Article cards in shortcodes */
.knowledge-articles-shortcode .knowledge-article-item,
.knowledge-shortcode-list .knowledge-article-item {
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
}

.knowledge-articles-shortcode .knowledge-article-item:hover,
.knowledge-shortcode-list .knowledge-article-item:hover {
    box-shadow: 0 8px 24px rgba(40, 56, 135, 0.18);
    transform: translateY(-4px);
    border-color: #283887 !important;
}

/* Title bar with brand color background */
.knowledge-articles-shortcode .knowledge-article-title,
.knowledge-shortcode-list .knowledge-article-title {
    background: #283887 !important;
    color: #ffffff !important;
    margin: 0 !important;
    padding: 22px 24px !important;
    font-size: 1.3em;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.knowledge-articles-shortcode .knowledge-article-title a,
.knowledge-shortcode-list .knowledge-article-title a {
    color: #ffffff !important;
    text-decoration: none;
    display: block;
}

.knowledge-articles-shortcode .knowledge-article-title a:hover,
.knowledge-shortcode-list .knowledge-article-title a:hover {
    text-decoration: underline;
}

/* Meta info section */
.knowledge-articles-shortcode .knowledge-article-meta,
.knowledge-shortcode-list .knowledge-article-meta {
    background: #f8f9fa !important;
    padding: 16px 24px;
    border-bottom: none;
    font-size: 0.95em;
    color: #666 !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.knowledge-articles-shortcode .knowledge-article-date,
.knowledge-shortcode-list .knowledge-article-date {
    color: #555 !important;
    font-weight: 500;
}

.knowledge-articles-shortcode .knowledge-article-date::after,
.knowledge-shortcode-list .knowledge-article-date::after {
    content: "  -  ";
    white-space: pre;
    color: #999;
}

.knowledge-articles-shortcode .knowledge-article-categories,
.knowledge-shortcode-list .knowledge-article-categories {
    color: #283887 !important;
}

.knowledge-articles-shortcode .knowledge-article-categories a,
.knowledge-shortcode-list .knowledge-article-categories a {
    color: #283887 !important;
    text-decoration: none;
    font-weight: 600;
}

.knowledge-articles-shortcode .knowledge-article-categories a:hover,
.knowledge-shortcode-list .knowledge-article-categories a:hover {
    text-decoration: underline;
}

/* Excerpt section (optional - enable with show_excerpt="true") */
.knowledge-articles-shortcode .knowledge-article-excerpt,
.knowledge-shortcode-list .knowledge-article-excerpt {
    padding: 20px 24px;
    color: #555 !important;
    font-size: 0.95em;
    line-height: 1.7;
    flex-grow: 1;
    background: #ffffff;
    border-radius: 0 0 12px 12px;
}

/* Single article embed shortcode */
.knowledge-single-shortcode {
    margin: 30px 0;
}

.knowledge-article-embed {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.knowledge-article-embed .knowledge-article-title {
    background: #283887 !important;
    color: #ffffff !important;
    margin: 0;
    padding: 24px;
    font-size: 1.3em;
}

.knowledge-article-embed .knowledge-article-title a {
    color: #ffffff !important;
    text-decoration: none;
}

.knowledge-article-embed .knowledge-article-title a:hover {
    text-decoration: underline;
}

.knowledge-article-embed .knowledge-article-meta {
    background: #f8f9fa;
    padding: 14px 24px;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.9em;
    color: #666;
}

.knowledge-article-embed .knowledge-article-meta a {
    color: #283887 !important;
}

.knowledge-article-embed .knowledge-article-content {
    padding: 28px;
    line-height: 1.8;
}

.knowledge-article-embed .knowledge-article-content h1,
.knowledge-article-embed .knowledge-article-content h2,
.knowledge-article-embed .knowledge-article-content h3,
.knowledge-article-embed .knowledge-article-content h4 {
    color: #283887 !important;
}

/* ==========================================================================
   Categories Shortcode Styles
   ========================================================================== */

.knowledge-categories-shortcode {
    margin: 30px 0;
}

/* List template */
.knowledge-categories-shortcode.knowledge-template-list .knowledge-categories-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.knowledge-categories-shortcode.knowledge-template-list .knowledge-category-item {
    background: #ffffff !important;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.knowledge-categories-shortcode.knowledge-template-list .knowledge-category-item:hover {
    box-shadow: 0 4px 16px rgba(40, 56, 135, 0.15);
    border-color: #283887;
    transform: translateX(4px);
}

.knowledge-categories-shortcode.knowledge-template-list .knowledge-category-item a {
    color: #283887 !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05em;
}

.knowledge-categories-shortcode.knowledge-template-list .knowledge-category-item a:hover {
    text-decoration: underline;
}

.knowledge-categories-shortcode.knowledge-template-list .knowledge-category-count {
    background: #283887;
    color: #ffffff !important;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

/* Grid template */
.knowledge-categories-shortcode.knowledge-template-grid .knowledge-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.knowledge-categories-shortcode.knowledge-template-grid .knowledge-category-item {
    background: #ffffff !important;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.knowledge-categories-shortcode.knowledge-template-grid .knowledge-category-item:hover {
    box-shadow: 0 8px 24px rgba(40, 56, 135, 0.18);
    transform: translateY(-4px);
    border-color: #283887;
}

.knowledge-categories-shortcode.knowledge-template-grid .knowledge-category-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.knowledge-categories-shortcode.knowledge-template-grid .knowledge-category-item h4 {
    background: #283887 !important;
    color: #ffffff !important;
    margin: 0;
    padding: 18px 20px;
    font-size: 1.1em;
    font-weight: 600;
}

.knowledge-categories-shortcode.knowledge-template-grid .knowledge-category-count {
    display: block;
    padding: 12px 20px;
    background: #f8f9fa;
    color: #283887 !important;
    font-weight: 600;
    font-size: 0.9em;
    border-bottom: 1px solid #e8e8e8;
}

.knowledge-categories-shortcode.knowledge-template-grid .knowledge-category-description {
    padding: 16px 20px;
    margin: 0;
    color: #666 !important;
    font-size: 0.9em;
    line-height: 1.6;
}

/* ==========================================================================
   Search Shortcode Styles
   ========================================================================== */

.knowledge-search-form {
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.knowledge-search-categories {
    margin-top: 16px;
}

.knowledge-search-categories select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    background: #ffffff;
    color: #333;
    cursor: pointer;
}

.knowledge-search-categories select:focus {
    border-color: #283887;
    outline: none;
    box-shadow: 0 0 0 3px rgba(40, 56, 135, 0.1);
}

/* Search results styling */
.knowledge-search-results {
    margin-top: 24px;
}

.knowledge-search-results-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.knowledge-search-results-list .knowledge-article-item {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.knowledge-search-results-list .knowledge-article-item:hover {
    box-shadow: 0 6px 20px rgba(40, 56, 135, 0.12);
    border-color: #283887;
}

.knowledge-search-loading,
.knowledge-search-message {
    padding: 24px;
    text-align: center;
    color: #666;
    background: #f8f9fa;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   No Results & Error States
   ========================================================================== */

.knowledge-no-results,
.knowledge-no-categories {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    color: #666 !important;
    font-size: 1.05em;
    border: 1px dashed #d0d0d0;
}

/* Error messages */
.knowledge-error {
    color: #d63638;
    padding: 16px 20px;
    background: #fcf0f0;
    border: 1px solid #f0c0c0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(214, 54, 56, 0.1);
}

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

@media (max-width: 768px) {
    .knowledge-articles-grid {
        grid-template-columns: 1fr;
    }

    .knowledge-articles-list {
        grid-template-columns: 1fr;
    }

    .knowledge-article-single .entry-header,
    .knowledge-article-single .knowledge-article-header,
    .knowledge-article-header {
        padding: 24px !important;
    }

    .knowledge-article-header .entry-title,
    .knowledge-article-single .entry-title {
        font-size: 1.4em;
    }

    .knowledge-article-single .entry-content,
    .knowledge-article-content {
        padding: 24px !important;
    }

    .knowledge-article-single .entry-footer,
    .knowledge-article-footer {
        padding: 16px 24px !important;
    }

    .knowledge-search-input-wrapper {
        flex-direction: column;
    }

    .knowledge-search-input-wrapper input[type="search"],
    .knowledge-search-input-wrapper input[type="text"] {
        border-radius: 6px !important;
        margin-bottom: 10px;
    }

    .knowledge-search-input-wrapper button {
        border-radius: 6px !important;
    }

    /* Shortcode responsive */
    .knowledge-articles-shortcode.knowledge-template-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .knowledge-categories-shortcode.knowledge-template-grid .knowledge-categories-grid {
        grid-template-columns: 1fr;
    }

    .knowledge-category-heading {
        font-size: 1.1em;
        padding: 12px 20px;
    }

    .knowledge-articles-shortcode .knowledge-article-title,
    .knowledge-shortcode-list .knowledge-article-title {
        padding: 14px 16px !important;
        font-size: 1em;
    }

    .knowledge-articles-shortcode .knowledge-article-meta,
    .knowledge-shortcode-list .knowledge-article-meta {
        padding: 10px 16px;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .knowledge-articles-shortcode .knowledge-article-excerpt,
    .knowledge-shortcode-list .knowledge-article-excerpt {
        padding: 16px;
    }

    .knowledge-article-embed .knowledge-article-title {
        padding: 18px;
        font-size: 1.1em;
    }

    .knowledge-article-embed .knowledge-article-content {
        padding: 20px;
    }

    .knowledge-search-form {
        padding: 18px;
    }

    .knowledge-categories-shortcode.knowledge-template-list .knowledge-category-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    /* Lightbox responsive */
    .ki-lightbox-overlay img {
        max-width: 96vw;
        max-height: 85vh;
    }

    .ki-lightbox-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 20px;
        line-height: 36px;
    }
}

@media (max-width: 480px) {
    .knowledge-archive-page {
        padding: 12px;
    }

    .knowledge-article-single {
        padding: 12px;
    }

    .knowledge-article-item {
        padding: 16px;
    }

    .knowledge-header-categories {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Extra small shortcode tweaks */
    .knowledge-articles-shortcode .knowledge-article-item:hover,
    .knowledge-shortcode-list .knowledge-article-item:hover,
    .knowledge-categories-shortcode .knowledge-category-item:hover {
        transform: none;
    }

    .knowledge-shortcode-list,
    .knowledge-articles-shortcode,
    .knowledge-categories-shortcode {
        margin: 20px 0;
    }

    /* Lightbox extra small */
    .ki-lightbox-overlay img {
        max-width: 98vw;
        max-height: 80vh;
    }
}
