/* Knowledge Base Styles */

/* Hero Section */
.kb-hero {
    background-image: url('../images/aboutuscardbg.webp');
    padding: 40px 0 60px;
    color: white;
}

.kb-hero-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.kb-hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
}

.kb-hero-subtitle {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Search Container */
.kb-search-container {
    max-width: 700px;
    margin: 0 auto;
}

.kb-search-input-wrapper {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
}

.kb-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: #6b7280;
}

.kb-search-input {
    width: 100%;
    padding: 20px 20px 20px 60px;
    border: none;
    font-size: 16px;
    color: #1f2937;
    background: transparent;
}

.kb-search-input:focus {
    outline: none;
}

.kb-search-input::placeholder {
    color: #9ca3af;
}

/* Category Chips */
.kb-search-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.kb-category-chip {
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    background: transparent;
    color: white;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kb-category-chip:hover {
    background: rgba(255,255,255,0.1);
}

.kb-category-chip.active {
    background: white;
    color: #0891b2;
    border-color: white;
}

/* Section Styles */
.kb-section {
    padding: 80px 0;
    background: #f8fafc;
}

.kb-section-dark {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
}

.kb-section-header {
    text-align: center;
    margin-bottom: 50px;
}

.kb-section-icon {
    font-size: 40px;
    color: #0ebdf3;
    margin-bottom: 15px;
}

.kb-section-dark .kb-section-icon {
    color: #38bdf8;
}

.kb-section-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1f2937;
}

.kb-section-dark .kb-section-title {
    color: white;
}

.kb-section-desc {
    font-size: 18px;
    color: #6b7280;
    max-width: 500px;
    margin: 0 auto;
}

.kb-section-dark .kb-section-desc {
    color: #94a3b8;
}

/* Tabs */
.kb-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.kb-tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
    background: white;
    color: #4b5563;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kb-tab-btn:hover {
    border-color: #0ebdf3;
    color: #0ebdf3;
}

.kb-tab-btn.active {
    background: #0ebdf3;
    border-color: #0ebdf3;
    color: white;
}

.kb-section-dark .kb-tab-btn {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: #cbd5e1;
}

.kb-section-dark .kb-tab-btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: #38bdf8;
    color: #38bdf8;
}

.kb-section-dark .kb-tab-btn.active {
    background: #38bdf8;
    border-color: #38bdf8;
    color: #0f172a;
}

/* Tab Content */
.kb-tab-content {
    display: none;
}

.kb-tab-content.active {
    display: block;
}

/* Steps */
.kb-steps {
    max-width: 800px;
    margin: 0 auto 30px;
}

.kb-step {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.kb-step-number {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #0ebdf3, #0891b2);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.kb-step-content h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1f2937;
}

.kb-step-content p {
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

.kb-cta-row {
    text-align: center;
}

/* Troubleshooting Card */
.kb-troubleshoot-card {
    display: flex;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.kb-troubleshoot-image {
    flex: 0 0 300px;
}

.kb-troubleshoot-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kb-troubleshoot-content {
    flex: 1;
    padding: 40px;
}

.kb-troubleshoot-content h4 {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
}

.kb-issue-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.kb-issue {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
}

.kb-issue-badge {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.kb-issue-badge-info {
    background: #e0f2fe;
    color: #0369a1;
}

.kb-issue-badge-danger {
    background: #fee2e2;
    color: #dc2626;
}

.kb-issue-badge-primary {
    background: #dbeafe;
    color: #2563eb;
}

.kb-issue-badge-secondary {
    background: #f3f4f6;
    color: #4b5563;
}

.kb-issue-text strong {
    display: block;
    font-size: 15px;
    color: #1f2937;
    margin-bottom: 4px;
}

.kb-issue-text p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

.kb-issue-warning {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 10px;
    background: #fee2e2;
    color: #dc2626;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* Side by Side Columns */
.kb-column-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    height: 100%;
}

.kb-column-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f1f5f9;
}

.kb-column-icon {
    font-size: 24px;
    color: #0ebdf3;
}

.kb-column-header h3 {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
    color: #1f2937;
}

/* Accordion */
.kb-accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kb-accordion-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
}

.kb-accordion-trigger {
    width: 100%;
    padding: 16px 20px;
    background: #f8fafc;
    border: none;
    text-align: left;
    font-size: 15px;
    font-weight: 500;
    color: #1f2937;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s ease;
}

.kb-accordion-trigger:hover {
    background: #f1f5f9;
}

.kb-accordion-icon {
    width: 20px;
    height: 20px;
    position: relative;
}

.kb-accordion-icon::before,
.kb-accordion-icon::after {
    content: '';
    position: absolute;
    background: #6b7280;
    transition: transform 0.2s ease;
}

.kb-accordion-icon::before {
    width: 12px;
    height: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.kb-accordion-icon::after {
    width: 2px;
    height: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.kb-accordion-item.active .kb-accordion-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.kb-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.kb-accordion-item.active .kb-accordion-content {
    max-height: 500px;
}

.kb-accordion-content p {
    padding: 0 20px 16px;
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

/* Load More Button */
.kb-load-more {
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background: transparent;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    color: #64748b;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kb-load-more:hover {
    border-color: #0ebdf3;
    color: #0ebdf3;
}

/* Toolkit CTA */
.kb-toolkit-cta {
    padding: 60px 0;
    background-image:url('../images/helpcenteranswers2.webp');
}

.kb-toolkit-card {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    gap: 40px;
}

.kb-toolkit-content {
    flex: 1;
}

.kb-toolkit-content h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1f2937;
}

.kb-toolkit-content p {
    color: #6b7280;
    margin-bottom: 20px;
}

.kb-toolkit-image {
    flex: 0 0 300px;
    border: 1px solid #fff;
    box-shadow: 0 0 2px #000;
    border-radius: 12px;
}

.kb-toolkit-image img {
    width: 100%;
    border-radius: 12px;
}

/* Search Modal */
.kb-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
}

.kb-search-modal.active {
    display: flex;
}

.kb-search-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.kb-search-modal-content {
    position: relative;
    width: 100%;
    max-width: 700px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    overflow: hidden;
    margin: 0 20px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.kb-search-modal-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.kb-search-modal-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.kb-search-modal-input-wrapper > span:first-child {
    position: absolute;
    left: 15px;
    font-size: 20px;
    color: #9ca3af;
}

#modal-search-input {
    flex: 1;
    padding: 12px 50px 12px 45px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    outline: none;
}

#modal-search-input:focus {
    border-color: #0ebdf3;
}

.kb-search-modal-close {
    position: absolute;
    right: 5px;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #6b7280;
    font-size: 20px;
}

.kb-search-modal-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
}

.kb-search-modal-categories .kb-category-chip {
    border-color: #e5e7eb;
    color: #4b5563;
}

.kb-search-modal-categories .kb-category-chip:hover {
    border-color: #0ebdf3;
    color: #0ebdf3;
}

.kb-search-modal-categories .kb-category-chip.active {
    background: #0ebdf3;
    border-color: #0ebdf3;
    color: white;
}

.kb-search-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.kb-search-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kb-search-result-item {
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kb-search-result-item:hover {
    background: #e0f2fe;
}

.kb-search-result-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 3px 8px;
    background: #0ebdf3;
    color: white;
    border-radius: 4px;
    margin-bottom: 6px;
}

.kb-search-result-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.kb-search-result-preview {
    font-size: 14px;
    color: #6b7280;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kb-search-empty {
    text-align: center;
    padding: 60px 20px;
    color: #9ca3af;
}

.kb-search-empty span {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

/* Detail Modal */
.kb-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.kb-detail-modal.active {
    display: flex;
}

.kb-detail-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
}

.kb-detail-modal-content {
    position: relative;
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    max-height: 80vh;
    overflow-y: auto;
}

.kb-detail-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f3f4f6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    z-index: 10;
}

.kb-detail-modal-close:hover {
    background: #e5e7eb;
}

.kb-detail-modal-header {
    padding: 30px 30px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.kb-detail-category {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 4px 10px;
    background: #0ebdf3;
    color: white;
    border-radius: 4px;
    margin-bottom: 10px;
}

.kb-detail-modal-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.kb-detail-modal-body {
    padding: 30px;
    color: #4b5563;
    line-height: 1.7;
}

.kb-detail-modal-body p {
    margin: 0 0 15px;
}

.kb-detail-modal-body ul {
    margin: 0 0 15px;
    padding-left: 20px;
}

.kb-detail-modal-body li {
    margin-bottom: 8px;
}

/* Homepage Search Card */
.kb-home-search-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: center;
}

.kb-home-search-input-wrapper {
    position: relative;
    margin-bottom: 25px;
}

.kb-home-search-input-wrapper > span {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: #6b7280;
}

.kb-home-search-input {
    width: 100%;
    padding: 18px 20px 18px 60px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 16px;
    color: #1f2937;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kb-home-search-input:hover {
    border-color: #0ebdf3;
}

.kb-home-search-input:focus {
    outline: none;
    border-color: #0ebdf3;
    background: white;
}

.kb-home-search-categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
}

.kb-home-category-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    color: #4b5563;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.kb-home-category-chip:hover {
    border-color: #0ebdf3;
    color: #0ebdf3;
    background: white;
}

.kb-home-category-chip span {
    font-size: 18px;
}

.kb-home-search-footer {
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
    .kb-home-search-card {
        padding: 25px;
    }
    
    .kb-home-search-categories {
        flex-direction: column;
    }
    
    .kb-home-category-chip {
        width: 100%;
        justify-content: center;
    }
}

/* Responsive */
@media (max-width: 991px) {
    .kb-hero-title {
        font-size: 36px;
    }
    
    .kb-troubleshoot-card {
        flex-direction: column;
    }
    
    .kb-troubleshoot-image {
        flex: none;
        height: 200px;
    }
    
    .kb-toolkit-card {
        flex-direction: column;
        text-align: center;
    }
    
    .kb-toolkit-image {
        flex: none;
        order: -1;
    }
}

@media (max-width: 768px) {
    .kb-hero {
        padding: 30px 0 40px;
    }
    
    .kb-hero-title {
        font-size: 28px;
    }
    
    .kb-section {
        padding: 50px 0;
    }
    
    .kb-section-title {
        font-size: 28px;
    }
    
    .kb-step {
        flex-direction: column;
        gap: 15px;
    }
    
    .kb-tabs {
        flex-direction: column;
    }
    
    .kb-tab-btn {
        width: 100%;
        justify-content: center;
    }
    
    .kb-search-modal {
        padding-top: 60px;
    }
    
    .kb-search-modal-content {
        max-height: calc(100vh - 80px);
        margin: 0 10px;
    }
}
