/**
 * Academic Knowledge Base Styles
 *
 * Main stylesheet for the Academic Knowledge Base plugin
 * Optimized for SWELL theme compatibility
 *
 * @package AcademicKnowledgeBase
 * @since 1.0.0
 */

/* ==========================================================================
   Reset and Base Styles
   ========================================================================== */

.akb-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ==========================================================================
   Layout Components
   ========================================================================== */

.akb-single-wrapper,
.akb-archive-wrapper,
.akb-search-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.akb-breadcrumbs {
    margin-bottom: 20px;
}

.akb-breadcrumbs-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: #666;
}

.akb-breadcrumb-item {
    display: flex;
    align-items: center;
}

.akb-breadcrumb-link {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.2s ease;
}

.akb-breadcrumb-link:hover {
    color: #005a87;
    text-decoration: underline;
}

.akb-breadcrumb-current .akb-breadcrumb-text {
    color: #333;
    font-weight: 500;
}

.akb-breadcrumb-separator {
    margin: 0 8px;
    color: #999;
    font-size: 12px;
}

/* ==========================================================================
   Single Article Styles
   ========================================================================== */

.akb-single-article {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.akb-article-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.akb-article-title {
    font-size: 2.5em;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

/* Article Meta Grid */
.akb-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.akb-meta-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #0073aa;
}

.akb-meta-label {
    font-weight: 600;
    color: #555;
    margin-right: 8px;
    min-width: 80px;
}

.akb-meta-value {
    color: #333;
}

/* Document Type Badges */
.akb-document-type {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.akb-document-type-research-paper {
    background: #e3f2fd;
    color: #1976d2;
}

.akb-document-type-literature-review {
    background: #f3e5f5;
    color: #7b1fa2;
}

.akb-document-type-reading-guide {
    background: #e8f5e8;
    color: #388e3c;
}

.akb-document-type-course-material {
    background: #fff3e0;
    color: #f57c00;
}

.akb-document-type-reference {
    background: #fce4ec;
    color: #c2185b;
}

/* Difficulty Badges */
.akb-difficulty {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.akb-difficulty-beginner {
    background: #d4edda;
    color: #155724;
}

.akb-difficulty-intermediate {
    background: #fff3cd;
    color: #856404;
}

.akb-difficulty-advanced {
    background: #f8d7da;
    color: #721c24;
}

/* Article Terms */
.akb-article-terms {
    margin-top: 20px;
}

.akb-categories,
.akb-tags {
    margin-bottom: 15px;
}

.akb-terms-label {
    font-weight: 600;
    color: #555;
    margin-right: 10px;
}

.akb-terms-list {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
}

.akb-category-tag,
.akb-tag-item {
    display: inline-block;
    padding: 6px 12px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.akb-category-tag:hover,
.akb-tag-item:hover {
    background: #005a87;
    color: #fff;
}

.akb-tag-item {
    background: #666;
}

.akb-tag-item:hover {
    background: #444;
}

/* Article Content */
.akb-article-content {
    line-height: 1.7;
    font-size: 16px;
    color: #333;
    margin-bottom: 40px;
}

.akb-article-content h1,
.akb-article-content h2,
.akb-article-content h3,
.akb-article-content h4,
.akb-article-content h5,
.akb-article-content h6 {
    margin-top: 30px;
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: 600;
}

.akb-article-content p {
    margin-bottom: 20px;
}

.akb-article-content ul,
.akb-article-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.akb-article-content li {
    margin-bottom: 8px;
}

/* Attached Files */
.akb-attached-files {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
}

.akb-attached-files h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #495057;
}

.akb-files-list {
    display: grid;
    gap: 10px;
}

.akb-file-item {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 12px 15px;
}

.akb-file-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #495057;
    transition: color 0.2s ease;
}

.akb-file-link:hover {
    color: #0073aa;
}

.akb-file-icon {
    margin-right: 10px;
    font-size: 18px;
}

.akb-file-name {
    flex: 1;
    font-weight: 500;
}

.akb-file-size {
    font-size: 12px;
    color: #6c757d;
    margin-left: 10px;
}

/* Article Footer */
.akb-article-footer {
    border-top: 1px solid #dee2e6;
    padding-top: 30px;
    margin-top: 40px;
}

.akb-article-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.akb-print-article,
.akb-share-article {
    padding: 10px 20px;
    border: 1px solid #0073aa;
    background: transparent;
    color: #0073aa;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.akb-print-article:hover,
.akb-share-article:hover {
    background: #0073aa;
    color: #fff;
}

/* Article Navigation */
.akb-article-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.akb-nav-previous {
    text-align: left;
}

.akb-nav-next {
    text-align: right;
}

.akb-nav-link {
    display: block;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    text-decoration: none;
    color: #495057;
    transition: all 0.2s ease;
}

.akb-nav-link:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    color: #495057;
}

.akb-nav-direction {
    display: block;
    font-size: 12px;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 5px;
}

.akb-nav-title {
    display: block;
    font-weight: 500;
}

/* Related Articles */
.akb-related-articles {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 30px;
    margin-top: 30px;
}

.akb-related-articles h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
}

.akb-related-list {
    display: grid;
    gap: 15px;
}

.akb-related-item {
    background: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.akb-related-link {
    display: block;
    padding: 15px;
    text-decoration: none;
    color: #495057;
    transition: background-color 0.2s ease;
}

.akb-related-link:hover {
    background: #f8f9fa;
    color: #495057;
}

.akb-related-link h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #2c3e50;
}

.akb-related-link p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #6c757d;
}

.akb-related-meta {
    font-size: 12px;
    color: #adb5bd;
}

/* Table of Contents */
.akb-toc-container {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 250px;
    max-height: 60vh;
    overflow: hidden;
    z-index: 1000;
}

.akb-toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.akb-toc-header h4 {
    margin: 0;
    font-size: 14px;
    color: #495057;
}

.akb-toc-toggle {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: #6c757d;
}

.akb-toc-nav {
    overflow-y: auto;
    max-height: calc(60vh - 50px);
}

.akb-toc-list {
    list-style: none;
    margin: 0;
    padding: 10px 0;
}

.akb-toc-list li {
    margin: 0;
}

.akb-toc-link {
    display: block;
    padding: 5px 15px;
    color: #495057;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.4;
    transition: background-color 0.2s ease;
}

.akb-toc-link:hover {
    background: #f8f9fa;
    color: #0073aa;
}

/* ==========================================================================
   Archive Styles
   ========================================================================== */

.akb-archive-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 40px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 8px;
}

.akb-archive-title {
    font-size: 3em;
    font-weight: 700;
    margin: 0 0 15px 0;
}

.akb-archive-description p {
    font-size: 1.2em;
    margin: 0;
    opacity: 0.9;
}

/* Search Section */
.akb-search-section {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.akb-search-container {
    position: relative;
    margin-bottom: 20px;
}

.akb-search-form {
    position: relative;
}

.akb-search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.akb-search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    font-size: 16px;
    border: 2px solid #dee2e6;
    border-radius: 50px;
    outline: none;
    transition: border-color 0.2s ease;
}

.akb-search-input:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.akb-search-submit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #0073aa;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.akb-search-submit:hover {
    background: #005a87;
}

.akb-search-icon {
    color: #fff;
    font-size: 16px;
}

/* Live Search Results */
.akb-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-top: 5px;
}

.akb-search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 8px 8px 0 0;
}

.akb-search-results-title {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.akb-search-results-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #6c757d;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.akb-search-results-content {
    max-height: 400px;
    overflow-y: auto;
}

.akb-live-results-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.akb-live-result-item {
    border-bottom: 1px solid #f8f9fa;
}

.akb-live-result-item:last-child {
    border-bottom: none;
}

.akb-live-result-link {
    display: block;
    padding: 15px;
    text-decoration: none;
    color: #495057;
    transition: background-color 0.2s ease;
}

.akb-live-result-link:hover {
    background: #f8f9fa;
    color: #495057;
}

.akb-live-result-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.akb-live-result-excerpt {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 5px;
    line-height: 1.4;
}

.akb-live-result-meta {
    font-size: 12px;
    color: #adb5bd;
}

.akb-live-results-more {
    padding: 10px 15px;
    text-align: center;
    border-top: 1px solid #f8f9fa;
}

.akb-live-results-more a {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
}

/* Filters */
.akb-filters-container {
    border-top: 1px solid #dee2e6;
    padding-top: 20px;
}

.akb-filters-toggle-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s ease;
}

.akb-filters-toggle-btn:hover {
    background: #e9ecef;
}

.akb-filters-toggle-icon {
    font-size: 12px;
}

.akb-filters-panel {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.akb-filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.akb-filter-group {
    display: flex;
    flex-direction: column;
}

.akb-filter-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    display: block;
}

.akb-filter-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.akb-filter-options-scrollable {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 10px;
    background: #fff;
}

.akb-filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
}

.akb-filter-option input {
    margin: 0;
}

.akb-sort-select {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    background: #fff;
    font-size: 14px;
}

.akb-filter-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    margin-top: 10px;
}

.akb-filter-apply {
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.akb-filter-apply:hover {
    background: #005a87;
}

.akb-filter-clear {
    padding: 10px 20px;
    background: transparent;
    color: #6c757d;
    border: 1px solid #6c757d;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.akb-filter-clear:hover {
    background: #6c757d;
    color: #fff;
}

/* Results Summary */
.akb-results-summary {
    background: #fff;
    padding: 20px 30px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.akb-results-count {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #495057;
}

.akb-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.akb-active-filters-label {
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.akb-active-filter {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: #0073aa;
    color: #fff;
    border-radius: 15px;
    font-size: 13px;
}

.akb-remove-filter {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    margin-left: 5px;
}

.akb-remove-filter:hover {
    color: #ccc;
}

/* Articles Grid */
.akb-articles-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.akb-article-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.akb-article-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.akb-card-header {
    padding: 15px 20px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.akb-card-content {
    padding: 15px 20px;
}

.akb-card-title {
    margin: 0 0 15px 0;
    font-size: 1.4em;
    font-weight: 600;
    line-height: 1.3;
}

.akb-card-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s ease;
}

.akb-card-title a:hover {
    color: #0073aa;
}

.akb-card-excerpt {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 15px;
}

.akb-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    font-size: 14px;
}

.akb-card-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.akb-category-link {
    color: #0073aa;
    text-decoration: none;
    font-size: 12px;
    padding: 3px 8px;
    background: rgba(0, 115, 170, 0.1);
    border-radius: 10px;
    transition: background-color 0.2s ease;
}

.akb-category-link:hover {
    background: rgba(0, 115, 170, 0.2);
    color: #005a87;
}

.akb-more-categories {
    font-size: 12px;
    color: #6c757d;
    padding: 3px 8px;
    background: #f8f9fa;
    border-radius: 10px;
}

.akb-card-date {
    color: #adb5bd;
    font-size: 12px;
    white-space: nowrap;
}

.akb-card-footer {
    padding: 0 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.akb-read-more {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s ease;
}

.akb-read-more:hover {
    color: #005a87;
}

.akb-arrow {
    transition: transform 0.2s ease;
}

.akb-read-more:hover .akb-arrow {
    transform: translateX(3px);
}

.akb-card-author {
    font-size: 12px;
    color: #6c757d;
}

/* No Articles */
.akb-no-articles {
    background: #fff;
    border-radius: 8px;
    padding: 60px 30px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.akb-no-articles-content h2 {
    margin-top: 0;
    color: #6c757d;
}

.akb-no-articles-content p {
    color: #adb5bd;
    font-size: 16px;
    margin-bottom: 30px;
}

.akb-button {
    display: inline-block;
    padding: 12px 24px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.akb-button:hover {
    background: #005a87;
    color: #fff;
}

/* Popular Categories */
.akb-popular-categories {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 30px;
    margin-top: 40px;
}

.akb-popular-categories h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
}

.akb-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.akb-category-card {
    display: block;
    padding: 20px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    text-decoration: none;
    color: #495057;
    transition: all 0.2s ease;
}

.akb-category-card:hover {
    border-color: #0073aa;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: #495057;
}

.akb-category-card h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 16px;
}

.akb-category-count {
    font-size: 14px;
    color: #6c757d;
}

/* Pagination */
.akb-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.akb-pagination .page-numbers {
    display: inline-flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px;
}

.akb-pagination .page-numbers li {
    margin: 0;
}

.akb-pagination .page-numbers a,
.akb-pagination .page-numbers span {
    display: block;
    padding: 10px 15px;
    border: 1px solid #dee2e6;
    color: #495057;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.2s ease;
}

.akb-pagination .page-numbers a:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.akb-pagination .page-numbers .current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* ==========================================================================
   Search Page Styles
   ========================================================================== */

.akb-search-header {
    margin-bottom: 30px;
}

.akb-search-title {
    font-size: 2.5em;
    font-weight: 700;
    color: #2c3e50;
    margin: 15px 0 20px 0;
    line-height: 1.2;
}

.akb-search-query {
    color: #0073aa;
}

.akb-search-form-enhanced {
    margin-bottom: 25px;
}

/* Advanced Search */
.akb-advanced-search {
    border-top: 1px solid #dee2e6;
    padding-top: 20px;
}

.akb-advanced-search-toggle-btn {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s ease;
}

.akb-advanced-search-toggle-btn:hover {
    background: #e9ecef;
}

.akb-advanced-search-toggle-icon {
    font-size: 12px;
}

.akb-advanced-search-panel {
    margin-top: 20px;
    padding: 25px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.akb-advanced-search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 20px;
}

.akb-date-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.akb-date-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 5px;
    background: #fff;
    font-size: 14px;
}

.akb-date-separator {
    color: #6c757d;
    font-size: 14px;
    white-space: nowrap;
}

.akb-advanced-search-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
}

.akb-search-apply {
    padding: 12px 24px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.akb-search-apply:hover {
    background: #005a87;
}

.akb-search-clear {
    padding: 12px 24px;
    background: transparent;
    color: #6c757d;
    border: 1px solid #6c757d;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.akb-search-clear:hover {
    background: #6c757d;
    color: #fff;
}

/* Search Results Summary */
.akb-search-results-summary {
    background: #fff;
    padding: 25px 30px;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.akb-results-stats {
    margin-bottom: 15px;
}

.akb-results-count,
.akb-results-showing {
    margin: 0 0 5px 0;
    color: #495057;
}

.akb-no-results-count {
    margin: 0;
    color: #dc3545;
    font-size: 18px;
}

/* Search Results List */
.akb-search-results-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 40px;
}

.akb-search-result-item {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 25px;
    transition: all 0.2s ease;
}

.akb-search-result-item:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 10px rgba(0, 115, 170, 0.1);
}

.akb-result-header {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.akb-result-content {
    margin-bottom: 15px;
}

.akb-result-title {
    margin: 0 0 15px 0;
    font-size: 1.5em;
    font-weight: 600;
    line-height: 1.3;
}

.akb-result-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s ease;
}

.akb-result-title a:hover {
    color: #0073aa;
}

.akb-result-excerpt {
    color: #6c757d;
    line-height: 1.6;
    margin-bottom: 15px;
    font-size: 15px;
}

.akb-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    font-size: 14px;
}

.akb-result-categories {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.akb-result-date,
.akb-result-author {
    color: #6c757d;
}

.akb-result-actions {
    border-top: 1px solid #f8f9fa;
    padding-top: 15px;
}

.akb-result-read-more {
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s ease;
}

.akb-result-read-more:hover {
    color: #005a87;
}

.akb-result-read-more .akb-arrow {
    transition: transform 0.2s ease;
}

.akb-result-read-more:hover .akb-arrow {
    transform: translateX(3px);
}

/* No Search Results */
.akb-no-search-results {
    background: #fff;
    border-radius: 8px;
    padding: 60px 30px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.akb-no-results-icon {
    font-size: 4em;
    margin-bottom: 20px;
    opacity: 0.3;
}

.akb-no-results-content h2 {
    margin: 0 0 30px 0;
    color: #6c757d;
    font-size: 2em;
}

.akb-search-suggestions {
    margin: 30px 0;
    text-align: left;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.akb-search-suggestions h3 {
    color: #495057;
    margin-bottom: 15px;
}

.akb-search-suggestions ul {
    color: #6c757d;
    line-height: 1.6;
}

.akb-alternative-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.akb-button-primary {
    background: #0073aa;
}

.akb-button-primary:hover {
    background: #005a87;
}

.akb-button-secondary {
    background: #6c757d;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.akb-button-secondary:hover {
    background: #5a6268;
}

/* Popular Searches */
.akb-popular-searches {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 30px;
    margin-top: 30px;
}

.akb-popular-searches h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
}

.akb-popular-search-terms {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.akb-popular-search-term {
    display: inline-block;
    padding: 8px 16px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.akb-popular-search-term:hover {
    background: #005a87;
    color: #fff;
}

/* Search Highlighting */
.akb-highlight {
    background: #fff3cd;
    color: #856404;
    padding: 0 2px;
    border-radius: 2px;
    font-weight: 600;
}

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

@media (max-width: 1200px) {
    .akb-toc-container {
        display: none;
    }
}

@media (max-width: 768px) {
    .akb-single-wrapper,
    .akb-archive-wrapper,
    .akb-search-wrapper {
        padding: 0 15px;
    }

    .akb-single-article {
        padding: 20px;
    }

    .akb-article-title {
        font-size: 2em;
    }

    .akb-meta-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .akb-article-navigation {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .akb-nav-next {
        text-align: left;
    }

    .akb-archive-header {
        padding: 30px 20px;
    }

    .akb-archive-title {
        font-size: 2.5em;
    }

    .akb-search-section {
        padding: 20px;
    }

    .akb-filters-form {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .akb-filter-actions {
        flex-direction: column;
        gap: 10px;
    }

    .akb-articles-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .akb-categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }

    .akb-search-title {
        font-size: 2em;
    }

    .akb-advanced-search-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .akb-date-range {
        flex-direction: column;
        gap: 8px;
    }

    .akb-date-separator {
        display: none;
    }

    .akb-advanced-search-actions {
        flex-direction: column;
        gap: 10px;
    }

    .akb-result-meta {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .akb-alternative-actions {
        flex-direction: column;
        gap: 10px;
    }

    .akb-popular-search-terms {
        gap: 8px;
    }

    .akb-popular-search-term {
        font-size: 13px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .akb-single-wrapper,
    .akb-archive-wrapper,
    .akb-search-wrapper {
        padding: 0 10px;
    }

    .akb-single-article {
        padding: 15px;
    }

    .akb-article-title {
        font-size: 1.8em;
    }

    .akb-archive-title {
        font-size: 2em;
    }

    .akb-search-title {
        font-size: 1.8em;
    }

    .akb-search-section {
        padding: 15px;
    }

    .akb-search-input {
        padding: 12px 45px 12px 15px;
        font-size: 15px;
    }

    .akb-search-submit {
        width: 35px;
        height: 35px;
        right: 3px;
    }

    .akb-card-content {
        padding: 12px 15px;
    }

    .akb-card-header {
        padding: 12px 15px 0;
    }

    .akb-card-footer {
        padding: 0 15px 15px;
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .akb-search-result-item {
        padding: 20px 15px;
    }

    .akb-no-search-results,
    .akb-no-articles {
        padding: 40px 20px;
    }

    .akb-no-results-icon {
        font-size: 3em;
    }

    .akb-search-suggestions {
        text-align: center;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .akb-search-section,
    .akb-filters-container,
    .akb-article-actions,
    .akb-toc-container,
    .akb-pagination,
    .akb-popular-categories,
    .akb-popular-searches {
        display: none !important;
    }

    .akb-single-article,
    .akb-search-result-item {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .akb-article-title,
    .akb-result-title {
        color: #000;
    }

    .akb-breadcrumb-link {
        color: #000;
        text-decoration: underline;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }
}

/* ==========================================================================
   Custom Fields Styles (ACF Fields)
   ========================================================================== */

/* Document Types Display */
.akb-document-types {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
}

.akb-document-types h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.2em;
    font-weight: 600;
}

.akb-document-type-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.akb-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.akb-badge-research-paper {
    background: #e3f2fd;
    color: #1976d2;
}

.akb-badge-literature-review {
    background: #f3e5f5;
    color: #7b1fa2;
}

.akb-badge-reading-guide {
    background: #e8f5e8;
    color: #388e3c;
}

.akb-badge-course-material {
    background: #fff3e0;
    color: #f57c00;
}

.akb-badge-reference {
    background: #fce4ec;
    color: #c2185b;
}

/* Knowledge Tags Display */
.akb-knowledge-tags {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
}

.akb-knowledge-tags h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.2em;
    font-weight: 600;
}

.akb-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.akb-tag-link {
    display: inline-block;
    padding: 8px 16px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.akb-tag-link:hover {
    background: #005a87;
    color: #fff;
    transform: translateY(-1px);
}

/* Version History Display */
.akb-version-history {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
}

.akb-version-history h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    font-size: 1.2em;
    font-weight: 600;
}

.akb-version-timeline {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.akb-version-item {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    border-left: 4px solid #0073aa;
}

.akb-version-number {
    font-weight: 700;
    color: #0073aa;
    font-size: 16px;
    margin-bottom: 5px;
}

.akb-version-date {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 8px;
}

.akb-version-changes {
    font-size: 14px;
    color: #495057;
    line-height: 1.5;
}

/* External Link Display */
.akb-external-link {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
    text-align: center;
}

.akb-external-button {
    display: inline-block;
    padding: 12px 24px;
    background: #28a745;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.akb-external-button:hover {
    background: #218838;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.akb-external-button:before {
    content: "🔗 ";
    margin-right: 5px;
}

/* Mobile Responsive for Custom Fields */
@media (max-width: 768px) {
    .akb-document-types,
    .akb-knowledge-tags,
    .akb-version-history,
    .akb-external-link {
        margin: 20px 0;
        padding: 15px;
    }
    
    .akb-document-type-badges,
    .akb-tag-list {
        gap: 6px;
    }
    
    .akb-badge,
    .akb-tag-link {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .akb-external-button {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* ==========================================================================
   Dark Mode Support (Optional)
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .akb-single-article,
    .akb-search-section,
    .akb-article-card,
    .akb-search-result-item,
    .akb-no-articles,
    .akb-no-search-results,
    .akb-results-summary,
    .akb-search-results-summary {
        background: #1a1a1a;
        border-color: #333;
        color: #e0e0e0;
    }

    .akb-article-title,
    .akb-archive-title,
    .akb-search-title,
    .akb-card-title a,
    .akb-result-title a {
        color: #ffffff;
    }

    .akb-meta-item {
        background: #2a2a2a;
        border-left-color: #0073aa;
    }

    .akb-meta-label {
        color: #b0b0b0;
    }

    .akb-meta-value {
        color: #e0e0e0;
    }

    .akb-search-input {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }

    .akb-search-input:focus {
        border-color: #0073aa;
        box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.2);
    }

    .akb-filters-panel,
    .akb-advanced-search-panel {
        background: #2a2a2a;
        border-color: #444;
    }

    .akb-popular-categories,
    .akb-popular-searches,
    .akb-related-articles {
        background: #2a2a2a;
    }

    .akb-category-card,
    .akb-related-item {
        background: #1a1a1a;
        border-color: #444;
        color: #e0e0e0;
    }

    .akb-category-card:hover,
    .akb-related-link:hover {
        background: #333;
        border-color: #0073aa;
    }
}
