/* BASPASOZ / NewsViral UI-UX refinement layer.
   The original NewsViral CSS remains the visual base; this file only harmonizes
   spacing, hierarchy, responsive behavior and Baspasoz-specific components. */

:root{
    --bp-accent:#f2546a;
    --bp-accent-soft:#fff0f3;
    --bp-ink:#212d45;
    --bp-text:#344054;
    --bp-muted:#8b98a5;
    --bp-bg:#f5f7f9;
    --bp-surface:#ffffff;
    --bp-line:#e7ecf0;
    --bp-radius:12px;
}

html{scroll-behavior:smooth}
body{background:var(--bp-bg);color:var(--bp-text);overflow-x:hidden}
a:focus-visible,button:focus-visible,input:focus-visible{outline:2px solid var(--bp-accent);outline-offset:2px}
.main-wrap{overflow:clip}
.dynamic-cover img,.img-hover-scale img,.img-hover-slide img{width:100%;height:100%;object-fit:cover}

@media(min-width:1200px){
    .container{max-width:1180px}
}

/* Header: exactly one responsive brand mark. */
.main-header{position:relative;z-index:100}
.header-style-2 .header-bottom{
    border-bottom:1px solid var(--bp-line);
    box-shadow:0 2px 12px rgba(33,45,69,.035);
}
.header-style-2 .header-bottom>.container>.row{align-items:center;min-height:64px}
.baspasoz-header-brand{display:flex;align-items:center;height:64px;max-width:100%}
.baspasoz-header-brand a{display:inline-flex;align-items:center;max-width:100%}
.baspasoz-header-brand img{
    display:block;
    width:156px;
    max-width:100%;
    height:auto;
    max-height:38px;
    object-fit:contain;
    object-position:left center;
}
.main-header-navigation .main-menu>li>a{
    padding-top:22px;
    padding-bottom:22px;
    font-size:13px;
    font-weight:700;
}
.main-header-navigation .search-form .search_field{
    height:36px;
    min-width:155px;
    border:1px solid var(--bp-line);
    background:#f8fafb;
}
.off-canvas-toggle-cover{display:none}
.bp-mobile-menu-toggle{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:40px;
    height:40px;
    padding:0;
    border:1px solid var(--bp-line);
    border-radius:10px;
    background:#fff;
    color:var(--bp-ink);
    cursor:pointer;
    font-size:22px;
    line-height:1;
}
.bp-mobile-menu-toggle:hover,
.bp-mobile-menu-toggle:focus{color:var(--bp-accent);border-color:#f5c7d0}
.bp-mobile-menu-toggle ion-icon{pointer-events:none}

/* One global urgent stream. */
.bp-breaking{
    background:var(--bp-surface);
    border-bottom:1px solid var(--bp-line);
    margin-bottom:30px;
}
.bp-breaking-inner{
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    align-items:center;
    gap:18px;
    min-height:48px;
}
.bp-breaking-label{
    display:inline-flex;
    align-items:center;
    gap:8px;
    color:var(--bp-accent);
    font-size:12px;
    font-weight:900;
    letter-spacing:.04em;
    text-transform:uppercase;
    white-space:nowrap;
}
.bp-breaking-label span{
    width:7px;height:7px;border-radius:50%;
    background:var(--bp-accent);
    box-shadow:0 0 0 4px var(--bp-accent-soft);
}
.bp-breaking-track{
    display:flex;
    align-items:center;
    gap:0;
    min-width:0;
    overflow-x:auto;
    scrollbar-width:none;
}
.bp-breaking-track::-webkit-scrollbar{display:none}
.bp-breaking-item{
    display:grid;
    grid-template-columns:auto minmax(0,1fr);
    gap:8px;
    align-items:center;
    flex:0 0 auto;
    width:min(31vw,300px);
    min-width:220px;
    padding:9px 16px;
    border-left:1px solid var(--bp-line);
}
.bp-breaking-item time{color:var(--bp-accent);font-size:11px;font-weight:800}
.bp-breaking-item strong{
    display:-webkit-box;
    overflow:hidden;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:1;
    color:var(--bp-ink);
    font-size:12px;
    line-height:1.35;
}

/* Left desktop sidebar: compact live news feed. */
.bp-news-feed{
    margin-top:0!important;
    padding:15px 14px 8px!important;
    border:1px solid var(--bp-line);
    box-shadow:none!important;
}
.bp-news-feed-head{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding-bottom:10px;
    border-bottom:1px solid var(--bp-line);
}
.bp-news-feed-title{
    display:flex;
    align-items:center;
    gap:7px;
    color:var(--bp-ink);
    font-family:'Nunito',sans-serif;
    font-size:13px;
    font-weight:900;
    line-height:1.2;
}
.bp-news-feed-title>span{
    width:7px;
    height:7px;
    border-radius:50%;
    background:var(--bp-accent);
    box-shadow:0 0 0 3px var(--bp-accent-soft);
}
.bp-news-feed-more{
    flex:0 0 auto;
    color:var(--bp-muted);
    font-size:9px;
    font-weight:800;
    text-transform:uppercase;
}
.bp-news-feed-list{display:block}
.bp-news-feed-item{
    padding:11px 0 12px;
    border-bottom:1px solid var(--bp-line);
}
.bp-news-feed-item:last-child{border-bottom:0}
.bp-news-feed-meta{
    display:flex;
    align-items:center;
    gap:7px;
    margin-bottom:5px;
    min-width:0;
}
.bp-news-feed-meta time{
    flex:0 0 auto;
    color:var(--bp-accent);
    font-size:10px;
    font-weight:900;
}
.bp-news-feed-meta span{
    overflow:hidden;
    color:var(--bp-muted);
    font-size:9px;
    font-weight:700;
    text-overflow:ellipsis;
    text-transform:uppercase;
    white-space:nowrap;
}
.bp-news-feed-item h3{
    margin:0;
    color:var(--bp-ink);
    font-family:'Nunito',sans-serif;
    font-size:12px;
    font-weight:800;
    line-height:1.35;
}
.bp-news-feed-item h3 a{
    display:-webkit-box;
    overflow:hidden;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:3;
}
.bp-news-feed-item h3 a:hover{color:var(--bp-accent)}

/* Slightly wider desktop feed column without making the main canvas feel cramped. */
@media(min-width:992px){
    .bp-left-feed-col{
        flex:0 0 20%;
        max-width:20%;
    }
    .bp-main-content-col{
        flex:0 0 80%;
        max-width:80%;
    }
}

/* Editorial hierarchy. */
.widget-title{color:var(--bp-ink);letter-spacing:-.015em}
.featured-post{margin-bottom:38px!important}
.featured-slider-1{
    overflow:hidden;
    border:1px solid var(--bp-line);
    background:var(--bp-surface);
    box-shadow:0 5px 18px rgba(33,45,69,.04);
}
.featured-slider-1 .slider-single{background:var(--bp-surface)}
.featured-slider-1 .img-hover-slide.dynamic-cover{
    aspect-ratio:16/9;
    min-height:0;
    margin-bottom:22px!important;
}
.featured-slider-1 .post-title{
    color:var(--bp-ink);
    font-size:25px;
    line-height:1.28;
}
.featured-slider-1 .hero-category-meta{
    margin:0 0 12px!important;
}
.featured-slider-1 .hero-post-title{
    margin:0 0 12px!important;
}
.featured-slider-1 .hero-date-meta{
    margin:0!important;
    padding-bottom:4px;
    color:var(--bp-muted);
    font-size:10.5px;
}

.sidebar-right .sidebar-widget{margin-bottom:34px!important}
.editor-choice-grid .post-thumb{
    flex:0 0 86px;
    width:86px!important;
    height:62px!important;
    overflow:hidden;
}
.editor-choice-grid .post-title{font-size:13px;line-height:1.35}
.editor-choice-grid .list-post li{margin-bottom:16px!important}
.sidebar-right .widget-header{margin-bottom:20px!important}

/* Video / media. */
#video-news{margin-bottom:38px}
.media-grid{margin-left:-8px;margin-right:-8px}
.media-grid>.slider-single{padding-left:8px;padding-right:8px}
.post-module-4 .img-hover-scale.dynamic-cover{
    aspect-ratio:16/9;
    overflow:hidden;
}
.post-module-4 .post-title{font-size:15px;line-height:1.35}

/* Most viewed: compact, scan-friendly cards. */
.most-viewed-list .most-viewed-card{
    display:grid;
    grid-template-columns:88px minmax(0,1fr);
    grid-template-rows:auto auto;
    column-gap:12px;
    align-items:start;
    border:1px solid var(--bp-line);
    box-shadow:none;
}
.most-viewed-list .most-viewed-card .post-thumb{
    grid-column:1;
    grid-row:1/3;
    width:88px!important;
    height:68px!important;
    margin:0!important;
    border-radius:9px!important;
}
.most-viewed-list .most-viewed-card .post-title{
    grid-column:2;
    margin:0 0 6px!important;
    font-size:13px;
    line-height:1.32;
}
.most-viewed-list .most-viewed-card .entry-meta{grid-column:2;margin:0!important}

/* Category modules. */
.template-category-grid{margin-top:8px}
.template-category-grid>.col-lg-6{display:flex}
.template-category-grid .sidebar-widget{
    width:100%;
    padding:18px;
    border:1px solid var(--bp-line);
    border-radius:var(--bp-radius);
    background:var(--bp-surface);
}
.template-category-grid .widget-header{margin-bottom:20px!important}
.template-category-grid .post-thumb{
    aspect-ratio:16/10;
    overflow:hidden;
    margin-bottom:10px!important;
}
.template-category-grid .post-title{font-size:14px;line-height:1.35}
.template-category-grid .entry-meta{margin-top:6px!important}

/* Compact footer */
.bp-site-footer{
    border-top:1px solid var(--bp-line);
    background:#fff;
}
.bp-footer-grid{
    display:grid;
    grid-template-columns:minmax(0,1.5fr) minmax(120px,.7fr) minmax(120px,.7fr);
    gap:36px;
    align-items:start;
    padding:28px 0 22px;
}
.footer-brand-logo{
    display:inline-flex;
    align-items:center;
    max-width:100%;
}
.footer-brand-logo img{
    display:block;
    width:142px;
    max-width:100%;
    height:auto;
    max-height:34px;
    object-fit:contain;
    object-position:left center;
}
.bp-footer-brand p{
    max-width:360px;
    margin:10px 0 0;
    color:#929cab;
    font-size:10.5px;
    line-height:1.55;
}
.bp-footer-html{
    max-width:300px;
    margin-top:8px;
    font-size:9.5px;
    line-height:1.5;
}
.bp-footer-html p{
    margin:0;
    font-size:inherit;
    line-height:inherit;
}
.bp-footer-column h5{
    margin:2px 0 10px;
    color:var(--bp-ink);
    font-size:12px;
    font-weight:900;
    line-height:1.2;
}
.bp-footer-column ul{
    margin:0;
    padding:0;
    list-style:none;
}
.bp-footer-column li{
    margin:0;
    padding:0;
}
.bp-footer-column li+li{
    margin-top:5px;
}
.bp-footer-column a{
    color:#697483;
    font-size:10.5px;
    font-weight:600;
    line-height:1.35;
}
.bp-footer-column a:hover{color:var(--bp-accent)}
.bp-footer-bottom{
    display:flex;
    align-items:center;
    min-height:36px;
    border-top:1px solid var(--bp-line);
}
.bp-footer-bottom p{
    margin:0;
    color:#a0a8b3;
    font-size:9.5px;
    line-height:1.4;
}

/* Tablet */
@media(max-width:991px){
    .header-style-2 .header-bottom>.container>.row{min-height:58px}
    .baspasoz-header-brand{height:58px}
    .baspasoz-header-brand img{width:148px;max-height:36px}
    .main-header-navigation{right:0}
    .off-canvas-toggle-cover{display:inline-flex!important;align-items:center;justify-content:flex-end;min-height:42px}
    .sidebar-left{display:none!important}
    .bp-breaking{margin-bottom:22px}
    .sidebar-right.sticky-sidebar{margin-top:10px}
}

/* Mobile */
@media(max-width:767px){
    body{font-size:14px}
    .container{padding-left:14px;padding-right:14px}
    .header-style-2 .header-bottom>.container>.row{min-height:54px}
    .baspasoz-header-brand{height:54px}
    .baspasoz-header-brand img{width:132px;max-height:32px}
    .main-header-navigation{display:flex;align-items:center;justify-content:flex-end}
    .off-canvas-toggle-cover{display:inline-flex!important;align-items:center;justify-content:flex-end;min-height:42px}
    .bp-mobile-menu-toggle{width:38px;height:38px;border-radius:9px;font-size:21px}
    .bp-breaking{margin-bottom:18px}
    .bp-breaking-inner{
        grid-template-columns:1fr;
        gap:0;
        padding:7px 0 8px;
    }
    .bp-breaking-label{margin-bottom:4px;font-size:11px}
    .bp-breaking-track{margin-left:-8px;margin-right:-8px}
    .bp-breaking-item{
        width:270px;
        min-width:245px;
        padding:6px 10px;
        border-left:0;
        border-right:1px solid var(--bp-line);
    }
    .bp-breaking-item strong{-webkit-line-clamp:2;font-size:12px}
    .featured-post{margin-bottom:28px!important}
    .featured-post>.widget-title{margin-bottom:16px!important;font-size:18px}
    .featured-slider-1 .slider-single{padding:8px!important}
    .featured-slider-1 .img-hover-slide.dynamic-cover{
        margin-bottom:16px!important;
        border-radius:10px!important;
    }
    .featured-slider-1 .post-title{
        font-size:20px!important;
        line-height:1.28;
    }
    .featured-slider-1 .hero-category-meta{
        margin-bottom:10px!important;
    }
    .featured-slider-1 .hero-post-title{
        margin-bottom:10px!important;
    }
    .featured-slider-1 .hero-date-meta{
        margin:0!important;
        font-size:9.5px;
    }
    #video-news{margin-bottom:26px}
    #video-news .widget-header{margin-bottom:14px!important}
    .media-grid{margin-left:-5px;margin-right:-5px}
    .media-grid>.slider-single{
        flex:0 0 50%;
        max-width:50%;
        padding-left:5px;
        padding-right:5px;
        margin-bottom:18px!important;
    }
    .post-module-4 .post-title{
        margin-top:9px!important;
        font-size:13px;
        line-height:1.3;
    }
    .post-module-4 .entry-meta{font-size:9px!important}
    .editor-choice-grid{margin-bottom:24px!important}
    .editor-choice-grid .list-post{
        display:flex;
        gap:10px;
        overflow-x:auto;
        padding-bottom:5px;
        scrollbar-width:none;
    }
    .editor-choice-grid .list-post::-webkit-scrollbar{display:none}
    .editor-choice-grid .list-post li{
        flex:0 0 255px;
        margin:0!important;
        padding:9px;
        border:1px solid var(--bp-line);
        border-radius:10px;
        background:#fff;
    }
    .editor-choice-grid .post-thumb{
        flex-basis:82px;
        width:82px!important;
        height:62px!important;
    }
    .sidebar-right{margin-top:6px}
    .sidebar-right .widget-title{font-size:18px}
    .most-viewed-list .most-viewed-card{
        grid-template-columns:84px minmax(0,1fr);
        margin-bottom:10px!important;
        padding:8px!important;
    }
    .most-viewed-list .most-viewed-card .post-thumb{
        width:84px!important;
        height:64px!important;
    }
    .most-viewed-list .most-viewed-card .post-title{font-size:12.5px}
    .template-category-grid{margin-left:-4px;margin-right:-4px}
    .template-category-grid>.col-lg-6{padding-left:4px;padding-right:4px;margin-bottom:18px!important}
    .template-category-grid .sidebar-widget{padding:12px}
    .template-category-grid .widget-header{margin-bottom:12px!important}
    .template-category-grid .widget-title{font-size:16px}
    .template-category-grid .widget-header h6{font-size:10px}
    .template-category-grid .sidebar-widget>.row{margin-left:-4px;margin-right:-4px}
    .template-category-grid .sidebar-widget>.row>.col-sm-6{
        flex:0 0 50%;
        max-width:50%;
        padding-left:4px;
        padding-right:4px;
        margin-bottom:14px!important;
    }
    .template-category-grid .post-thumb{margin-bottom:7px!important;border-radius:8px!important}
    .template-category-grid .post-title{font-size:12.5px;line-height:1.32}
    .template-category-grid .entry-meta{font-size:8.5px!important}
    .wow{animation:none!important;visibility:visible!important}
}

@media(max-width:374px){
    .baspasoz-header-brand img{width:120px}
    .media-grid>.slider-single{flex-basis:100%;max-width:100%}
    .template-category-grid .sidebar-widget>.row>.col-sm-6{flex-basis:100%;max-width:100%}
}

@media(prefers-reduced-motion:reduce){
    *,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
}


/* Stage 1E: rebalance homepage after removing duplicate "Соңғы жаңалықтар". */
.bp-main-content-col>.row:first-child{
    align-items:flex-start;
}
.bp-most-viewed-panel{
    margin-top:8px;
}
.sidebar-right .bp-most-viewed-panel .widget-header{
    margin-bottom:16px!important;
}

/* Mobile/tablet header: one logo left, one off-canvas control right, aligned on one baseline. */
@media(max-width:991px){
    .header-style-2 .header-bottom>.container>.row{
        display:flex;
        flex-wrap:nowrap;
        align-items:center;
        min-height:58px;
        margin-left:0;
        margin-right:0;
    }
    .header-style-2 .header-bottom>.container>.row>.col-lg-2{
        flex:1 1 auto;
        width:auto;
        max-width:calc(100% - 54px);
        padding-left:0;
        padding-right:8px;
    }
    .header-style-2 .header-bottom>.container>.row>.main-header-navigation{
        position:static!important;
        top:auto!important;
        right:auto!important;
        bottom:auto!important;
        left:auto!important;
        display:flex!important;
        flex:0 0 46px;
        width:46px;
        max-width:46px;
        min-height:58px;
        align-items:center;
        justify-content:flex-end;
        margin-left:auto;
        padding-left:0;
        padding-right:0;
    }
    .off-canvas-toggle-cover{
        display:flex!important;
        width:40px;
        min-height:40px!important;
        margin-left:auto;
        align-items:center;
        justify-content:center;
    }
    .bp-mobile-menu-toggle{
        position:static!important;
        margin:0!important;
        flex:0 0 38px;
        width:38px;
        height:38px;
    }
}

@media(max-width:767px){
    .header-style-2 .header-bottom>.container>.row{
        min-height:54px;
    }
    .header-style-2 .header-bottom>.container>.row>.main-header-navigation{
        flex-basis:42px;
        width:42px;
        max-width:42px;
        min-height:54px;
    }
    .off-canvas-toggle-cover{
        width:38px;
        min-height:38px!important;
    }
    .bp-mobile-menu-toggle{
        flex-basis:36px;
        width:36px;
        height:36px;
        border-radius:9px;
        font-size:20px;
    }

    /* Natural mobile hierarchy: hero → media → editor choice → most viewed → categories. */
    .sidebar-right{
        margin-top:2px;
    }
    .bp-most-viewed-panel{
        margin-top:4px;
        margin-bottom:24px!important;
    }
    .template-category-grid{
        margin-top:2px;
    }
}


/* Stage 1F: exact mobile menu alignment + compact footer. */
@media(max-width:991px){
    .header-style-2 .header-bottom>.container>.row{
        position:relative;
        display:flex;
        flex-wrap:nowrap;
        align-items:center;
        min-height:58px;
    }
    .header-style-2 .header-bottom>.container>.row>.main-header-navigation{
        position:static!important;
        display:flex!important;
        align-self:stretch;
        align-items:center!important;
        justify-content:flex-end!important;
        flex:0 0 44px;
        width:44px!important;
        max-width:44px!important;
        min-height:58px!important;
        margin:0 0 0 auto!important;
        padding:0!important;
    }
    .header-style-2 .off-canvas-toggle-cover{
        position:static!important;
        inset:auto!important;
        top:auto!important;
        right:auto!important;
        bottom:auto!important;
        left:auto!important;
        transform:none!important;
        display:flex!important;
        align-items:center!important;
        justify-content:center!important;
        width:40px!important;
        height:40px!important;
        min-height:40px!important;
        margin:0!important;
    }
    .bp-mobile-menu-toggle{
        position:static!important;
        display:inline-flex!important;
        align-items:center!important;
        justify-content:center!important;
        width:38px!important;
        height:38px!important;
        min-width:38px!important;
        min-height:38px!important;
        margin:0!important;
        padding:0!important;
        line-height:1!important;
        vertical-align:middle!important;
    }
    .bp-mobile-menu-toggle ion-icon{
        display:block;
        margin:0!important;
        font-size:20px!important;
        line-height:1!important;
    }
}

@media(max-width:767px){
    .header-style-2 .header-bottom>.container>.row{
        min-height:54px;
    }
    .header-style-2 .header-bottom>.container>.row>.main-header-navigation{
        flex-basis:42px;
        width:42px!important;
        max-width:42px!important;
        min-height:54px!important;
    }
    .header-style-2 .off-canvas-toggle-cover{
        width:38px!important;
        height:38px!important;
        min-height:38px!important;
    }
    .bp-mobile-menu-toggle{
        width:36px!important;
        height:36px!important;
        min-width:36px!important;
        min-height:36px!important;
        border-radius:9px;
    }

    .bp-footer-grid{
        grid-template-columns:1fr 1fr;
        gap:18px 24px;
        padding:22px 0 16px;
    }
    .bp-footer-brand{
        grid-column:1 / -1;
    }
    .footer-brand-logo img{
        width:128px;
        max-height:31px;
    }
    .bp-footer-brand p{
        max-width:300px;
        margin-top:8px;
        font-size:9.5px;
        line-height:1.5;
    }
    .bp-footer-column h5{
        margin-bottom:8px;
        font-size:11.5px;
    }
    .bp-footer-column li+li{
        margin-top:4px;
    }
    .bp-footer-column a{
        font-size:10px;
    }
    .bp-footer-bottom{
        min-height:34px;
    }
    .bp-footer-bottom p{
        font-size:9px;
    }
}

@media(max-width:420px){
    .bp-footer-grid{
        gap:16px 18px;
    }
}


/* Stage 1H: full article titles, lighter editorial typography. */
.post-title,
.post-title a,
.bp-news-feed-item h3,
.bp-news-feed-item h3 a,
.most-viewed-card .post-title,
.most-viewed-card .post-title a,
.template-category-grid .post-title,
.template-category-grid .post-title a{
    overflow:visible!important;
    max-height:none!important;
    white-space:normal!important;
    text-overflow:clip!important;
    display:block!important;
    -webkit-box-orient:initial!important;
    -webkit-line-clamp:unset!important;
    line-clamp:unset!important;
}

.bp-news-feed-item h3{
    font-size:11.5px!important;
    font-weight:600!important;
    line-height:1.42!important;
}
.sidebar-right .post-title{
    font-weight:600!important;
}
.editor-choice-list .post-title{
    font-size:12px!important;
    font-weight:600!important;
    line-height:1.4!important;
}
.most-viewed-card .post-title{
    font-size:12px!important;
    font-weight:600!important;
    line-height:1.4!important;
}
.template-category-grid .post-title{
    font-size:12px!important;
    font-weight:600!important;
    line-height:1.42!important;
}
.featured-slider-1 .post-title{
    font-weight:650!important;
}

@media(max-width:767px){
    .bp-news-feed-item h3,
    .editor-choice-list .post-title,
    .most-viewed-card .post-title,
    .template-category-grid .post-title{
        font-weight:550!important;
    }
    .template-category-grid .post-title{
        font-size:11.5px!important;
        line-height:1.42!important;
    }
}


/* Stage 3A: scalable desktop categories menu. */
.main-menu > li.bp-more-categories {
    position: relative;
}

.bp-more-categories-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 60px;
    margin: 0;
    padding: 0 13px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.bp-more-categories-toggle ion-icon {
    font-size: 12px;
    transition: transform .16s ease;
}

.bp-more-categories.is-open > .bp-more-categories-toggle ion-icon {
    transform: rotate(180deg);
}

.bp-more-categories-menu {
    min-width: 190px !important;
    max-width: 260px;
    padding: 8px 0 !important;
    border: 1px solid #e7eaf0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(28, 39, 57, .12);
}

.bp-more-categories-menu li {
    display: block !important;
    width: 100%;
}

.bp-more-categories-menu li a {
    display: block;
    padding: 8px 14px !important;
    color: #5e6978 !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.35;
    white-space: normal;
}

.bp-more-categories-menu li a:hover,
.bp-more-categories-menu li.current-menu-item > a {
    background: #fff5f7;
    color: #e94760 !important;
}

/* No "live" indicator is used on the homepage latest-feed heading. */
.sidebar-left .bp-news-feed-title {
    gap: 0;
}


/* Stage 3B: compact desktop search icon with on-demand search panel. */
.bp-header-search {
    position: relative;
    float: right;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    margin-right: 22px;
}

.bp-header-search-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    border: 1px solid #e7eaf0;
    border-radius: 10px;
    background: #fff;
    color: #5f6b7a;
    font-size: 15px;
    cursor: pointer;
    transition: border-color .16s ease, color .16s ease, background-color .16s ease;
}

.bp-header-search-toggle:hover,
.bp-header-search-toggle:focus-visible,
.bp-header-search.is-open .bp-header-search-toggle {
    border-color: #f2c4cc;
    background: #fff6f8;
    color: #e94760;
    outline: none;
}

.bp-header-search-form {
    position: absolute;
    z-index: 140;
    top: calc(100% - 5px);
    right: 0;
    display: flex;
    align-items: center;
    width: 285px;
    padding: 8px;
    border: 1px solid #e7eaf0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(28, 39, 57, .14);
}

.bp-header-search-form[hidden] {
    display: none !important;
}

.bp-header-search-input {
    width: 100%;
    height: 38px;
    min-width: 0;
    padding: 0 10px;
    border: 0;
    background: transparent;
    color: #263248;
    font-family: var(--font-sans, Arial, sans-serif);
    font-size: 12px;
    outline: none;
}

.bp-header-search-input::placeholder {
    color: #9aa3af;
}

.bp-header-search-submit {
    display: inline-flex;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    background: #f2546a;
    color: #fff;
    cursor: pointer;
}

.bp-header-search-submit:hover,
.bp-header-search-submit:focus-visible {
    background: #e94760;
    outline: none;
}


/* Stage 3C: "Басқа санаттар" must look exactly like sibling menu items. */
.main-menu > li > .bp-more-categories-toggle {
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}

/*
 * Desktop search UX:
 * when opened, the field replaces the menu area between the logo and search icon.
 */
@media (min-width: 992px) {
    .main-header-navigation {
        position: relative;
    }

    .bp-header-search {
        position: static !important;
        z-index: 150;
    }

    .bp-header-search-toggle {
        position: relative;
        z-index: 152;
    }

    .main-header-navigation.bp-search-open .main-nav {
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
    }

    .bp-header-search-form {
        position: absolute !important;
        z-index: 151;
        top: 50% !important;
        right: 70px !important;
        left: 0 !important;
        width: auto !important;
        height: 42px;
        padding: 2px 4px 2px 12px !important;
        transform: translateY(-50%);
        border: 1px solid #e3e7ed;
        border-radius: 10px;
        background: #fff;
        box-shadow: none;
    }

    .bp-header-search-input {
        height: 36px;
        padding-left: 0;
        font-size: 13px;
    }

    .bp-header-search-submit {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }
}


/* Stage 3D: the search toggle becomes a close button while search is open. */
.bp-header-search.is-open .bp-header-search-toggle {
    border-color: #f3c5cd;
    background: #fff7f8;
    color: #e94760;
}

.bp-header-search.is-open .bp-header-search-toggle i {
    font-size: 14px;
    line-height: 1;
}


/* Stage 3E: refined open-search UI with breathing room and cleaner alignment. */
.bp-header-search {
    margin-right: 18px;
}

.bp-header-search-form {
    gap: 8px;
}

.bp-header-search-input {
    font-size: 13px;
    font-weight: 500;
}

.bp-header-search-submit {
    transition: background-color .16s ease, transform .16s ease;
}

.bp-header-search-submit:hover,
.bp-header-search-submit:focus-visible,
.bp-header-search.is-open .bp-header-search-submit {
    background: #ea5069;
}

.bp-header-search.is-open .bp-header-search-toggle {
    box-shadow: 0 0 0 1px rgba(233, 71, 96, .04);
}

@media (min-width: 992px) {
    .main-header-navigation.bp-search-open {
        min-height: 60px;
    }

    .main-header-navigation.bp-search-open .main-nav {
        transform: translateY(-2px);
    }

    .bp-header-search-form {
        right: 86px !important;
        height: 46px;
        padding: 4px 8px 4px 16px !important;
        border-color: #f0d8dd;
        border-radius: 14px;
        background: #ffffff;
        box-shadow: 0 10px 24px rgba(19, 33, 56, .06);
    }

    .bp-header-search-input {
        height: 38px;
        font-size: 14px;
    }

    .bp-header-search-submit {
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .bp-header-search-toggle {
        width: 40px;
        height: 40px;
        border-radius: 11px;
    }
}

@media (max-width: 991.98px) {
    .bp-header-search {
        margin-right: 10px;
    }

    .bp-header-search-form {
        width: min(320px, calc(100vw - 26px));
        padding: 8px 8px 8px 12px;
        border-radius: 14px;
        box-shadow: 0 14px 28px rgba(18, 32, 56, .10);
    }

    .bp-header-search-input {
        height: 40px;
        font-size: 14px;
    }

    .bp-header-search-submit,
    .bp-header-search-toggle {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }
}


/* Stage 3F: final search micro-polish. */
.bp-header-search-form {
    transition:
        opacity .16s ease,
        transform .16s ease,
        border-color .16s ease,
        box-shadow .16s ease;
    transform-origin: top right;
}

.bp-header-search.is-open .bp-header-search-form {
    border-color: #efd7dc;
}

.bp-header-search-input {
    caret-color: #f2546a;
}

.bp-header-search-input::placeholder {
    color: #a6aeb9;
    opacity: 1;
}

.bp-header-search-input:focus::placeholder {
    color: #c2c8d0;
}

.bp-header-search-toggle {
    transition:
        border-color .16s ease,
        color .16s ease,
        background-color .16s ease,
        transform .16s ease;
}

.bp-header-search.is-open .bp-header-search-toggle {
    transform: none;
}

.bp-header-search.is-open .bp-header-search-toggle:hover {
    background: #fff1f4;
}

@media (min-width: 992px) {
    .bp-header-search-form {
        top: 50% !important;
        height: 44px;
        padding: 3px 7px 3px 15px !important;
        border-radius: 13px;
    }

    .bp-header-search-input {
        height: 36px;
        font-size: 13.5px;
        line-height: 36px;
    }

    .bp-header-search-submit {
        flex: 0 0 36px;
        width: 36px;
        height: 36px;
        border-radius: 9px;
    }

    .bp-header-search-toggle {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .bp-header-search.is-open .bp-header-search-toggle {
        border-color: #f1d2d8;
        background: #fffafa;
        color: #df4d64;
    }
}

@media (max-width: 991.98px) {
    .bp-header-search-form {
        animation: bpSearchReveal .16s ease both;
    }

    .bp-header-search-toggle {
        border-radius: 10px;
    }
}

@keyframes bpSearchReveal {
    from {
        opacity: 0;
        transform: translateY(-4px) scale(.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .bp-header-search-form,
    .bp-header-search-toggle,
    .bp-header-search-submit {
        transition: none !important;
        animation: none !important;
    }
}
