* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", sans-serif;
    background: #f5f7fa;
    color: #333;
}

.kb-container {
    max-width: 1400px;
    margin: auto;
    padding: 40px;
}

/* Header */

.kb-header {
    text-align: center;
    margin-bottom: 50px;
}

.logo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.logo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
}

.header-logo {
    height: 60px;
    width: auto;
    display: block;
}

.kb-header h1 {
    font-size: 48px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.kb-header h1 {
    font-size: 46px;
    font-weight: 700;
}

.kb-header p {
    color: #7a7a7a;
    margin-top: 15px;
    max-width: 550px;
    margin-inline: auto;
    line-height: 1.7;
}

/* Layout */

.content-wrapper {
    display: flex;
    gap: 30px;
}

/* Sidebar */

.sidebar {
    width: 280px;
}
.sidebar-header {
    margin-bottom: 10px;
}

.sidebar-header h3 {
    font-size: 24px;
    font-weight: 500;
    color: #222;
}
.filter-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.clear-filter {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: #222;
    font-size: 13px;
    font-weight: 500;
}

.clear-filter img {
    width: 12px;
    height: 12px;
    display: block;
    object-fit: contain;
}
.result-count {
    font-size: 13px;
    color: #8a8f98;
}

/*.clear-filter:hover {*/
/*    color: #0d9488;*/
/*}*/

.sidebar-header a {
    text-decoration: none;
    color: #555;
    font-size: 14px;
}

.search-box {
    position: relative;
    margin-bottom: 15px;
}

.search-box input {
    width: 100%;
    height: 42px;
    padding: 0 14px 0 40px;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    background: #fff;
    font-size: 13px;
    outline: none;
}

.search-box input:focus {
    border-color: #0d9488;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    width: 16px;
    height: 16px;
    pointer-events: none;
}
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li label {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 8px 12px;
    cursor: pointer;
}

.category-list li label:hover {
    background: #f5f5f5;
}
.category-list {
    list-style: none;
    background: #fff;
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
    border: 1px solid #e8e8e8;
}

.category-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    font-size: 14px;
}

/* Main Content */

.article-section {
    flex: 1;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.article-card {
    background: #FFFFFF;
    border: 1px solid #e8e8e8;
    /*border-radius: 5px;*/
    padding: 20px;
    min-height: 170px;
    display: flex;
    flex-direction: column;
}
.article-card h4 {
    font-size: 16px;
    font-weight: 300;
    color: #444;
    line-height: 1.6;
    margin-bottom: 30px;
}

.article-card:hover {
    background: #f0f0f0;
}
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.tags span {
    background: #fff9ca;
    color: #222;
    font-size: 11px;
    padding: 5px 8px;
    border-radius: 3px;
    font-weight: 600;
}

.explore-btn {
    margin-top: 25px;
    align-self: flex-end;
    text-decoration: none;
    color: #111;
    font-size: 14px;
    font-weight: 600;
}
/*.explore-btn {*/
/*    position: absolute;*/
/*    top: 20px;*/
/*    right: 20px;*/
/*    width: 32px;*/
/*    height: 32px;*/
/*    text-decoration: none;*/
/*    opacity: 0;*/
/*    transform: translateY(-5px);*/
/*    transition: opacity 0.25s ease, transform 0.25s ease;*/
/*}*/

/*.explore-btn::before {*/
/*    content: "↗";*/
/*    font-size: 22px;*/
/*    color: #2563eb; */
/*    display: block;*/
/*    line-height: 32px;*/
/*    text-align: center;*/
/*}*/

/*.article-card {*/
/*    position: relative;*/
/*}*/

/*.article-card:hover .explore-btn {*/
/*    opacity: 1;*/
/*    transform: translateY(0);*/
/*}*/
.tutorial-content{
    display:none;
    /*background:#fff;*/
    padding:40px;
    border-radius:12px;
    /*box-shadow:0 2px 12px rgba(0,0,0,.06);*/
}

.tutorial-content.active{
    display:block;
}

.tutorial-content h1{
    font-size:32px;
    font-weight:600;
    color:#1f2937;
    margin-bottom:10px;
    line-height:1.3;
}

.tutorial-content p{
    font-size:16px;
    line-height:1.8;
    color:#4b5563;
    margin-bottom:20px;
}

.tutorial-content img{
    max-width:100%;
    height:auto;
    border-radius:8px;
    margin:20px 0;
}
.blog_img{
    margin: 20px 0 35px;
    text-align: center;
}

.blog_img img{
    max-height: 450px;
    max-width: 700px;
    display: block;
    padding-top: 12px;
    /*margin: 0 auto;*/
}

.tutorial-body h4{
    margin-top: 30px;
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}
.post-footer {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0 30px;
    color: #999;
    font-size: 14px;
}
.post-footer .title{
    display:flex;
    align-items:center;
}
.post-footer .date span {
    line-height: 1;
}

.post-footer .date {
    display: flex;
    align-items: center;
    line-height: 1;
}
.post-footer .date i {
    margin-right: 6px;
    font-size: 13px;
    line-height: 4;
    vertical-align: middle;
}
.post-footer .date i{
    position:relative;
    top:-1px;
}
.post-footer .icon-clock {
    font-size: 12px;
}

.back-btn{
    display:inline-flex;
    align-items:center;
    gap:8px;
    margin-top:30px;
    color: #0d0c0c;
    font-weight:500;
    text-decoration:none;
}

.back-btn:hover{
    text-decoration:underline;
}
.load-more {
    text-align: center;
    margin-top: 50px;
}

.load-more button {
    padding: 14px 35px;
    border: none;
    background: #FFFFFF;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    border: 1px solid #ddd;
    transition: 0.3s;
}

.load-more button:hover {
    background: #f0f0f0;
}
.article-card {
    display: flex;
}

.article-card.hidden {
    display: none;
}

.load-more button.loaded {
    display: none;
}

/*Related Post start*/
.tutorial-layout {
    display: flex;
    gap: 40px;
}

.tutorial-main {
    flex: 1;
    min-width: 0; /* Prevents overflow */
}

.related-sidebar {
    width: 300px;
    position: sticky;
    top: 90px;
    align-self: flex-start;
    /*background: #fff;*/
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
}

.related-sidebar h3 {
    font-size: 18px;
    font-weight: 600;
    color: #222;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

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

.related-sidebar li {
    margin-bottom: 8px;
}

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

.related-sidebar a {
    display: block;
    padding: 12px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: #444;
    line-height: 1.5;
    font-size: 14px;
    transition: all .2s ease;
}

.related-sidebar a:hover {
    background: #f7f8fa;
    color: #0d9488;
    transform: translateX(4px);
}
.related-sidebar a::before {
    margin-right: 8px;
    color: #b8b8b8;
}

.related-sidebar a:hover::before {
    color: #0d9488;
}
/*Related Post End */

/* Responsive */

@media (max-width: 1200px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

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

    .kb-header h1 {
        font-size: 34px;
    }
}