/* ======================================
CASE STUDY HERO
====================================== */

.casestudy-hero{
    background:
    linear-gradient(
        135deg,
        #020d4d 0%,
        #04145f 30%,
        #091d87 100%
    );

    padding:15px 0;
    overflow:hidden;
    position:relative;
}

.casestudy-hero::before{
    content:"";
    position:absolute;
    inset:0;
    background:
    radial-gradient(circle at 70% 30%,
    rgba(61,119,255,.25),
    transparent 40%);
}

.casestudy-hero-grid{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(350px,550px);
    gap:60px;
    align-items:center;
    position:relative;
    z-index:2;
}

.casestudy-tag{
    display:inline-block;
    background:rgba(255,255,255,.12);
    border:1px solid rgba(255,255,255,.15);
    color:#fff;
    padding:8px 18px;
    border-radius:40px;
    font-size:12px;
    /*font-weight:700;*/
    margin-bottom:25px;
}

.casestudy-hero h1{
    font-size:36px;
    line-height:1.05;
    color:#fff;
    /*font-weight:800;*/
    margin-bottom:15px;
}

.casestudy-hero h1 span{
    color:#2196ff;
    display:block;
}

.casestudy-hero p{
    color:#d8e2ff;
    font-size:16px;
    line-height:1.8;
    max-width:620px;
    margin-bottom:20px;
}

.hero-btn{
    display:inline-flex;
    align-items:center;
    gap:12px;
    background:#2563ff;
    color:#fff;
    padding:10px 20px;
    border-radius:12px;
    /*font-weight:700;*/
    transition:.3s;
}

.hero-btn:hover{
    color:#fff;
    transform:translateY(-3px);
}

/* ======================================
CASE STUDY PAGE
====================================== */

.casestudy-page{
    background:#e7edf7;
    padding:10px 0 30px;
}

.section-header {
    text-align: center;
    margin-bottom: 20px;
}

.casestudy-layout{
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(300px,360px);
    gap:35px;
    align-items:start;
}

.casestudy-breadcrumb{
    font-size:14px;
    margin-bottom:20px;
}

.casestudy-breadcrumb a{
    color:#2563ff;
}

/* ======================================
CASE STUDY CARD
====================================== */

.casestudy-card{
    background:#fff;
    border-radius:18px;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    margin-bottom:25px;
    border:1px solid #edf1f7;
    box-shadow:0 8px 25px rgba(0,0,0,.05);
    transition:.35s ease;
    width:100%;
    min-width:0;
}

.casestudy-card:hover{
    transform:translateY(-5px);
    box-shadow:0 20px 50px rgba(0,0,0,.08);
}

.casestudy-content{
    padding:10px 20px;
    display:flex;
    flex-direction:column;
    justify-content:center;
    min-width:0;
    word-wrap:break-word;
}

.casestudy-meta{
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:15px;
    margin-bottom:10px;
    font-size:13px;
    color:#667085;
}

.casestudy-category{
    background:#ff7a00;
    color:#fff;
    padding:6px 14px;
    border-radius:30px;
    font-size:12px;
    /*font-weight:700;*/
}

.casestudy-content h2{
    margin:0 0 10px;
    padding:0;
    line-height:1.2;
}

/* Fix 3: display:block restored so wrapping titles never collide with siblings */
.casestudy-content h2 a{
    display:block;
    color:#071C63;
    font-size:20px;
    /*font-weight:700;*/
    line-height:1.2;
    margin:0;
    padding:0;
    text-decoration:none;
}

.casestudy-content h2 a:hover{
    color:#0B5FFF;
}

.casestudy-content p{
    color:#667085;
    font-size:14px;
    line-height:1.7;
    margin-bottom:4px;
}

.casestudy-author-wrap{
    display:flex;
    align-items:center;
    gap:12px;
    margin:4px 0;
}

.casestudy-author-avatar{
    width:45px;
    height:45px;
    border-radius:50%;
    background:#ff7a00;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    /*font-weight:700;*/
}

.casestudy-author{
    color:#071C63;
    /*font-weight:700;*/
}

.casestudy-author-wrap small{
    color:#667085;
}

.read-more{
    display:inline-flex;
    align-items:center;
    gap:8px;
    color:#0B5FFF;
    /*font-weight:700;*/
    text-decoration:none;
}

.read-more:hover{
    color:#ff7a00;
}

/* ======================================
SIDEBAR
====================================== */
.casestudy-sidebar-wrapper {
    margin-top: 50px;
}

.casestudy-sidebar{
    position:sticky;
    top:100px;
    min-width:0;
}

.sidebar-widget{
    background:#fff;
    border-radius:20px;
    padding:25px;
    margin-bottom:25px;
    border:1px solid #edf1f7;
    min-width:0;
    word-wrap:break-word;
}

/*=====================================
SEARCH WIDGET
=====================================*/

.search-widget{
    position:relative;
    background:#fff;
    border:1px solid #e8eef8;
    border-radius:18px;
    padding:22px;
    margin-bottom:25px;
    box-shadow:0 12px 30px rgba(14,30,60,.05);
    min-width:0;
    word-wrap:break-word;
}

.search-box{
    position:relative;
}

.search-box input{
    width:100%;
    height:58px;
    padding:0 72px 0 20px;
    border:1px solid #d7e2f2;
    border-radius:14px;
    background:#fff;
    font-size:15px;
    /*font-weight:500;*/
    transition:.3s;
}

.search-box input:focus{
    outline:none;
    border-color:#0B5FFF;
    box-shadow:0 0 0 5px rgba(11,95,255,.12);
}

.search-box button{
    position:absolute;
    right:7px;
    top:7px;
    width:44px;
    height:44px;
    border:none;
    border-radius:12px;
    background:#0B5FFF;
    color:#fff;
    transition:.3s;
}

.search-box button:hover{
    background:#0047d6;
}

/*=====================================
DROPDOWN
=====================================*/

.search-results{
    position:absolute;
    top:90px;
    left:0;
    right:0;
    background:#fff;
    border:1px solid #e5eaf3;
    border-radius:14px;
    box-shadow:0 15px 35px rgba(0,0,0,.08);
    max-height:320px;
    overflow-y:auto;
    z-index:9999;
    display:none;
}

.search-results.is-open{
    display:block;
}

.search-result-item{
    display:flex;
    align-items:center;
    gap:12px;
    padding:8px 15px;
    text-decoration:none;
    color:#071C63;
    font-size:14px;
    /*font-weight:500;*/
    transition:.25s;
}

.search-result-item:hover{
    background:#071C63;
    color:#ffffff;
}

.search-result-item i{
    width:18px;
    color:#0b5fff;
    font-size:14px;
}

.search-result-item span{
    flex:1;
    line-height:1.4;
}

.search-results::-webkit-scrollbar{
    width:6px;
}

.search-results::-webkit-scrollbar-thumb{
    background:#c8d5ef;
    border-radius:50px;
}

.search-loading,
.search-empty{
    padding:16px;
    text-align:center;
    font-size:14px;
    color:#6b7280;
}

.sidebar-widget h2{
    color:#071C63;
    margin-bottom:20px;
    font-size:24px;
}

.popular-post{
    display:flex;
    gap:15px;
    margin-bottom:6px;
}

.popular-post a{
    color:#071C63;
    /*font-weight:600;*/
}

.expert-widget{
    background:
    linear-gradient(
    135deg,
    #071C63,
    #0B5FFF);
    color:#fff;
    padding:30px;
    border-radius:20px;
}

.expert-widget h2{
    color:#fff;
    font-size:26px;
}

.expert-widget p {
    font-size: 16px;
}

.expert-widget ul{
    margin:10px 0;
    padding-left:18px;
}

.expert-widget li{
    margin-bottom:6px;
    font-size: 14px;
}

.popular-content{
    display:flex;
    flex-direction:column;
    gap:6px;
    min-width:0;
}

.popular-number{
    color:#2563ff;
    font-size:13px;
    /*font-weight:700;*/
}

.popular-content a{
    color:#071C63;
    font-size:14px;
    /*font-weight:600;*/
    line-height:1.5;
}

.expert-widget li i{
    color:#fff;
}

.expert-buttons{
    display:flex;
    flex-direction:column;
    gap:12px;
    margin-top:20px;
}

.expert-btn{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    width:100%;
    padding:14px 18px;
    border-radius:12px;
    /*font-weight:700;*/
    text-decoration:none;
    transition:.3s ease;
}

.expert-btn:first-child{
    background:#ffffff;
    color:#0B5FFF;
}

.expert-btn:first-child:hover{
    transform:translateY(-3px);
}

.whatsapp-btn{
    background:#fff;
    color:#25D366;
}

.whatsapp-btn:hover{
    background:#1ebe5d;
    color:#ffffff;
    transform:translateY(-3px);
}

.whatsapp-btn i{
    font-size:18px;
}

/* ======================================
CASE STUDY PAGINATION  (single definition — the old duplicate block was removed)
====================================== */

.casestudy-pagination{
    display:flex;
    justify-content:center;
    align-items:center;
    width:100%;
    margin-top:50px;
    padding-bottom:20px;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
}

.casestudy-pagination nav{
    display:flex;
    justify-content:center;
}

.casestudy-pagination .pagination{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    margin:0;
    padding:0;
    list-style:none;
}

.casestudy-pagination .page-item{
    margin:0;
    padding:0;
    list-style:none;
}

.casestudy-pagination .page-link{
    width:42px;
    height:42px;
    min-width:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid #dfe5ec;
    border-radius:8px;
    background:#ffffff;
    color:#1f2937;
    font-size:15px;
    /*font-weight:600;*/
    line-height:1;
    text-decoration:none;
    transition:all .3s ease;
}

.casestudy-pagination .page-link:hover{
    background:#0057ff;
    border-color:#0057ff;
    color:#ffffff;
}

.casestudy-pagination .page-item.active .page-link{
    background:#0057ff;
    border-color:#0057ff;
    color:#ffffff;
}

.casestudy-pagination .page-item.disabled .page-link{
    background:#f5f7fa;
    border-color:#e5e7eb;
    color:#9ca3af;
    cursor:not-allowed;
    pointer-events:none;
}

.casestudy-pagination .page-link i{
    font-size:12px;
}

.casestudy-pagination svg{
    width:16px;
    height:16px;
}

/* ======================================================
OVERFLOW / GLOBAL SAFETY (base layer)
====================================================== */

.casestudy-hero,
.casestudy-page{
    overflow:hidden;
}

.casestudy-layout,
.casestudy-hero-grid{
    width:100%;
}

/* ======================================================
3840px (4K)
====================================================== */
@media (min-width:3000px){

    .casestudy-hero{
        padding:100px 0;
    }

    .casestudy-hero-grid{
        grid-template-columns:1fr 800px;
        gap:120px;
    }

    .casestudy-hero h1{
        font-size:62px;
    }

    .casestudy-hero p{
        font-size:28px;
        max-width:900px;
    }

    .casestudy-tag{
        font-size:18px;
        padding:12px 28px;
    }

    .hero-btn{
        padding:22px 40px;
        font-size:20px;
    }

    .casestudy-page{
        padding:100px 0;
    }

    .casestudy-layout{
        grid-template-columns:minmax(0,1fr) 500px;
        gap:50px;
    }

    .casestudy-content{
        padding:35px;
    }

    .casestudy-content h2 a{
        font-size:36px;
    }

    .casestudy-content p{
        font-size:18px;
    }

    .sidebar-widget,
    .search-widget{
        padding:35px;
    }

    .sidebar-widget h2{
        font-size:32px;
    }
}

/* ======================================================
2560px
====================================================== */
@media (min-width:2200px) and (max-width:2999px){

    .casestudy-hero-grid{
        grid-template-columns:1fr 700px;
        gap:90px;
    }

    .casestudy-hero h1{
        font-size:56px;
    }

    .casestudy-hero p{
        font-size:24px;
    }

    .casestudy-layout{
        grid-template-columns:minmax(0,1fr) 450px;
    }

    .casestudy-content h2 a{
        font-size:30px;
    }
}

/* ======================================================
1920px
====================================================== */
@media (min-width:1600px) and (max-width:2199px){

    .casestudy-hero h1{
        font-size:46px;
    }

    .casestudy-hero p{
        font-size:22px;
    }

    .casestudy-layout{
        grid-template-columns:minmax(0,1fr) 400px;
    }
}

/* ======================================================
1441px - 1600px
====================================================== */
@media (min-width:1441px) and (max-width:1599px){

    .casestudy-hero-grid{
        grid-template-columns:1fr 520px;
        gap:50px;
    }

    .casestudy-hero h1{
        font-size:42px;
    }

    .casestudy-layout{
        grid-template-columns:minmax(0,1fr) 360px;
    }
}

/* ======================================================
1367px - 1440px
====================================================== */
@media (min-width:1367px) and (max-width:1440px){

    .casestudy-hero-grid{
        grid-template-columns:1fr 500px;
        gap:40px;
    }

    .casestudy-hero h1{
        font-size:40px;
    }

    .casestudy-content h2 a{
        font-size:24px;
    }

    .casestudy-layout{
        grid-template-columns:minmax(0,1fr) 340px;
    }
}

/* ======================================================
1281px - 1366px
====================================================== */
@media (min-width:1281px) and (max-width:1366px){

    .casestudy-hero h1{
        font-size:36px;
    }

    .casestudy-hero p{
        font-size:16px;
    }

    .casestudy-content h2 a{
        font-size:22px;
    }
}

/* ======================================================
1280px (single definition, no duplicates)
====================================================== */
@media (max-width:1280px){

    .casestudy-hero-grid{
        grid-template-columns:1fr 450px;
        text-align:center;
        gap:30px;
    }

    .casestudy-hero h1{
        font-size:32px;
        line-height:1.2;
    }

    .casestudy-content h2 a{
        font-size:20px;
        line-height:1.2;
    }

    .casestudy-hero p{
        max-width:100%;
        font-size:16px;
    }

    .casestudy-hero-image img{
        width:100%;
        max-width:300px;
        margin:auto;
    }

    .casestudy-layout{
        grid-template-columns:minmax(0,1fr) 320px;
    }

    .casestudy-sidebar{
        position:relative;
        top:auto;
    }

    .casestudy-sidebar-wrapper{
        margin-top:25px;
    }

    .casestudy-image{
        min-height:210px;
    }
}

/* ======================================================
1025px - 1200px transition band
====================================================== */
@media (min-width:1025px) and (max-width:1200px){

    .casestudy-layout{
        grid-template-columns:minmax(0,1fr) 300px;
        gap:24px;
    }

    /* .casestudy-card{
        grid-template-columns:minmax(180px,0.7fr) minmax(0,1fr);
    } */
}

/* ======================================================
1024px
====================================================== */
@media (max-width:1024px){

    .casestudy-hero-grid{
        grid-template-columns:1fr;
        text-align:center;
        gap:30px;
    }

    .casestudy-hero h1{
        font-size:30px;
    }

    .casestudy-hero p{
        max-width:100%;
        font-size:16px;
    }

    .casestudy-hero-image img{
        width:100%;
        max-width:300px;
        margin:auto;
    }

    .casestudy-layout {
        grid-template-columns:1fr;
    }

    .casestudy-sidebar{
        position:relative;
        top:auto;
    }

    .casestudy-sidebar-wrapper {
        margin-top: 25px;
    }

    .casestudy-image{
        min-height:210px;
    }
}

/* ======================================================
768px
====================================================== */
@media (max-width:768px){

    .casestudy-hero{
        padding:40px 0;
    }

    .casestudy-hero h1{
        font-size:28px;
        line-height:1.2;
    }

    .casestudy-hero p{
        font-size:14px;
    }

    .casestudy-hero-image img{
        width:100%;
        max-width:300px;
    }

    .hero-btn{
        padding:10px 20px;
        font-size:14px;
    }

    .casestudy-sidebar-wrapper {
        margin-top: 20px;
    }

    .casestudy-page{
        padding:40px 0;
    }

    .casestudy-content{
        padding:20px;
    }

    .casestudy-content h2 a{
        font-size:20px;
    }

    /* .casestudy-card{
        grid-template-columns:1fr;
    } */

    .casestudy-image{
        min-height:220px;
        height:220px;
        display:flex;
        align-items:center;
        justify-content:center;
        background:#f5f7fb;
    }

    .casestudy-image a{
        width:100%;
        height:100%;
        display:flex;
        align-items:center;
        justify-content:center;
    }

    .casestudy-image img{
        width:100%;
        height:100%;
        object-fit:contain;
        object-position:center;
    }

    .sidebar-widget,
    .search-widget{
        padding:20px;
    }
}

/* ======================================================
576px
====================================================== */
@media (max-width:576px){

    .casestudy-hero h1{
        font-size:26px;
    }

    .casestudy-hero p{
        font-size:14px;
    }

    .casestudy-hero-image img{
        width:70%;
    }

    .casestudy-sidebar-wrapper {
        margin-top: 20px;
    }

    .casestudy-content{
        padding:18px;
    }

    .casestudy-content h2 a{
        font-size:18px;
    }

    .casestudy-meta{
        gap:8px;
        font-size:12px;
    }

    .sidebar-widget,
    .search-widget{
        padding:18px;
    }

    .sidebar-widget h2{
        font-size:20px;
    }

    .casestudy-pagination{
        margin-top:35px;
    }

    .casestudy-pagination .pagination{
        gap:5px;
    }

    .casestudy-pagination .page-link{
        width:38px;
        height:38px;
        min-width:38px;
        font-size:14px;
    }
}

/* ======================================================
480px
====================================================== */
@media (max-width:480px){

    .casestudy-hero h1{
        font-size:24px;
    }

    .casestudy-tag{
        padding:7px 14px;
        font-size:11px;
    }

    .hero-btn{
        width:100%;
        justify-content:center;
    }

    .casestudy-sidebar-wrapper {
        margin-top: 20px;
    }

    .casestudy-content h2 a{
        font-size:17px;
    }

    .casestudy-author-wrap{
        flex-wrap:wrap;
    }

    .popular-post{
        gap:10px;
    }

    .popular-post img{
        width:80px;
        height:50px;
    }
}

/* ======================================================
375px
====================================================== */
@media (max-width:375px){

    .casestudy-hero h1{
        font-size:22px;
    }

    .casestudy-hero p{
        font-size:14px;
    }

    .casestudy-content{
        padding:15px;
    }

    .casestudy-content h2 a{
        font-size:16px;
    }

    .casestudy-sidebar-wrapper {
        margin-top: 20px;
    }

    .sidebar-widget h2{
        font-size:18px;
    }
}

/* ======================================================
320px
====================================================== */
@media (max-width:320px){

    .casestudy-hero h1{
        font-size:20px;
    }

    .casestudy-hero p{
        font-size:13px;
    }

    .casestudy-content{
        padding:12px;
    }

    .casestudy-content h2 a{
        font-size:15px;
    }

    .casestudy-content p{
        font-size:13px;
    }

    .casestudy-sidebar-wrapper {
        margin-top: 20px;
    }

    .popular-post img{
        width:60px;
        height:35px;
    }

    .sidebar-widget,
    .search-widget{
        padding:15px;
    }
}
