.search-page{
    --sp-border: rgba(0,0,0,.08);
    --sp-soft: rgba(0,0,0,.035);
    --sp-shadow: 0 10px 30px rgba(0,0,0,.05);
    --sp-muted: var(--bs-secondary-color);
    --sp-card-bg: var(--bs-body-bg);
    --sp-btn-bg: #fff;
    --sp-btn-color: #212529;
    --sp-btn-border: rgba(0,0,0,.12);
    --sp-dark-badge-bg: #212529;
    --sp-dark-badge-color: #fff;
}

[data-bs-theme="dark"] .search-page{
    --sp-border: rgba(255,255,255,.08);
    --sp-soft: rgba(255,255,255,.04);
    --sp-shadow: 0 16px 34px rgba(0,0,0,.28);
    --sp-card-bg: #1e222a;
    --sp-btn-bg: #2a2f38;
    --sp-btn-color: #f8f9fa;
    --sp-btn-border: rgba(255,255,255,.12);
    --sp-dark-badge-bg: #f8f9fa;
    --sp-dark-badge-color: #111827;
}

.search-hero{
    background:
            linear-gradient(135deg, rgba(18,24,38,.88), rgba(28,36,52,.84)),
            url('https://dejaran.com/templates/dejaran-new/assets/images/pattern/04.png') no-repeat center center;
    background-size: cover;
}

.search-summary-card,
.search-section-card{
    background: var(--sp-card-bg);
    border: 1px solid var(--sp-border);
    border-radius: 18px;
    box-shadow: var(--sp-shadow);
}

.search-summary-card{
    padding: 1rem 1.1rem;
}

.search-chip{
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem .9rem;
    border-radius: 999px;
    background: var(--sp-soft);
    border: 1px solid var(--sp-border);
    text-decoration: none;
    color: inherit;
    font-weight: 700;
    transition: .2s ease;
}

.search-chip:hover{
    transform: translateY(-1px);
    color: inherit;
}

.search-section-head{
    padding: 1rem 1.1rem;
    border-bottom: 1px solid var(--sp-border);
    background: var(--sp-soft);
    border-radius: 18px 18px 0 0;
}

.search-section-title{
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: .7rem;
}

.search-section-title .icon{
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    flex-shrink: 0;
}

.search-section-body{
    padding: 1rem 1.1rem;
}

.search-list-item{
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    padding: .9rem 0;
    border-bottom: 1px solid var(--sp-border);
}

.search-list-item:last-child{
    border-bottom: 0;
    padding-bottom: 0;
}

.search-thumb{
    width: 92px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
    border: 1px solid var(--sp-border);
    background: var(--sp-soft);
    display: block;
}

.search-item-content{
    min-width: 0;
    flex: 1;
}

.search-item-top{
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .35rem;
}

.search-item-title{
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.9;
    margin: 0;
}

.search-item-title a{
    text-decoration: none;
}

.search-item-desc{
    font-size: .9rem;
    color: var(--sp-muted);
    line-height: 1.9;
    margin-bottom: .5rem;
}

.search-item-meta{
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    color: var(--sp-muted);
    font-size: .85rem;
}

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

.search-item-actions{
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.search-empty{
    background: var(--sp-card-bg);
    border: 1px dashed var(--sp-border);
    border-radius: 18px;
    text-align: center;
    padding: 3rem 1.25rem;
}

.search-empty .icon{
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--sp-soft);
    border: 1px solid var(--sp-border);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.search-more-wrap{
    text-align: center;
    padding-top: 1rem;
}

.search-more-btn{
    min-width: 190px;
}

.search-grid{
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* fixes */
.search-page .badge.text-bg-dark{
    background: var(--sp-dark-badge-bg) !important;
    color: var(--sp-dark-badge-color) !important;
}

[data-bs-theme="dark"] .search-page .badge.text-bg-warning{
    color: #1f2328 !important;
}

.search-page .btn-outline-dark{
    color: #212529;
    border-color: rgba(0,0,0,.18);
    background: transparent;
}

.search-page .btn-outline-dark:hover{
    background: rgba(0,0,0,.06);
    color: #212529;
    border-color: rgba(0,0,0,.22);
}

[data-bs-theme="dark"] .search-page .btn-outline-dark{
    color: #f8f9fa;
    border-color: rgba(255,255,255,.18);
    background: transparent;
}

[data-bs-theme="dark"] .search-page .btn-outline-dark:hover{
    background: rgba(255,255,255,.08);
    color: #fff;
    border-color: rgba(255,255,255,.28);
}

/*[data-bs-theme="dark"] .search-page .btn-dark{*/
/*    background: #f8f9fa;*/
/*    color: #111827;*/
/*    border-color: #f8f9fa;*/
/*}*/

/*[data-bs-theme="dark"] .search-page .btn-dark:hover{*/
/*    background: #ffffff;*/
/*    color: #111827;*/
/*    border-color: #ffffff;*/
/*}*/

@media (max-width: 991.98px){
    .search-grid{
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px){
    .search-thumb{
        width: 78px;
        height: 62px;
    }

    .search-list-item{
        gap: .75rem;
    }

    .search-item-top{
        flex-direction: column;
        align-items: stretch;
        gap: .45rem;
    }

    .search-item-actions{
        width: 100%;
        margin-top: .35rem;
    }

    .search-item-actions .btn{
        width: 100%;
    }

    .course-item,
    .news-item{
        flex-wrap: wrap;
    }

    .course-item > a,
    .news-item > a{
        flex: 0 0 78px;
    }

    .course-item .search-item-content,
    .news-item .search-item-content{
        flex: 1 1 calc(100% - 90px);
    }

    .course-item .search-item-actions,
    .news-item .search-item-actions{
        flex: 0 0 100%;
    }
}

.search-item-meta span{
    color:#212529;
    font-weight:500;
}

[data-bs-theme="dark"] .search-item-meta span{
    color:#f8f9fa;
}

#courses-box,
#articles-box,
#downloads-box,
#news-box{
    scroll-margin-top: 110px;
}

html{
    scroll-behavior: smooth;
}