
/* =========================================================
   TechESteel Blog Page
   Shortcode: [techesteel_blogs]
========================================================= */

.techesteel-blog-page{
    padding:95px 0 110px;
    background:#f7fbff;
}

.techesteel-blog-page-header{
    max-width:760px;
    margin-bottom:38px;
}

.techesteel-blog-page-header h1{
    margin:14px 0 0;
    font-size:clamp(48px,5vw,72px);
    line-height:1.05;
    letter-spacing:-.045em;
}

.techesteel-blog-page-header p{
    max-width:700px;
    margin:20px 0 0;
    color:var(--muted);
    font-size:18px;
    line-height:1.7;
}

.techesteel-blog-filters{
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin-bottom:42px;
}

.techesteel-blog-filters a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:44px;
    padding:0 18px;
    border:1px solid var(--border);
    border-radius:999px;
    background:#fff;
    color:var(--muted);
    font-weight:700;
    transition:.25s;
}

.techesteel-blog-filters a:hover,
.techesteel-blog-filters a.is-active{
    border-color:var(--blue);
    background:var(--blue);
    color:#fff;
    box-shadow:0 10px 24px rgba(47,139,230,.2);
}

.techesteel-blog-layout{
    display:grid;
    grid-template-columns:minmax(0,1fr) 330px;
    gap:42px;
    align-items:start;
}

.techesteel-blog-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:26px;
}

.techesteel-blog-card{
    overflow:hidden;
    min-width:0;
    background:#fff;
    border:1px solid var(--border);
    border-radius:18px;
    box-shadow:0 14px 38px rgba(25,88,145,.08);
    transition:transform .3s ease,box-shadow .3s ease,border-color .3s ease;
}

.techesteel-blog-card:hover{
    transform:translateY(-6px);
    border-color:#b7d9f5;
    box-shadow:0 24px 52px rgba(25,88,145,.14);
}

.techesteel-blog-image{
    display:block;
    overflow:hidden;
    aspect-ratio:16/10;
    background:#eaf5ff;
}

.techesteel-blog-image img{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
    transition:transform .45s ease;
}

.techesteel-blog-card:hover .techesteel-blog-image img{
    transform:scale(1.045);
}

.techesteel-blog-placeholder{
    display:grid;
    place-items:center;
    width:100%;
    height:100%;
    background:linear-gradient(135deg,#4da7f4,#1267c8);
    color:#fff;
    font:700 28px var(--display);
}

.techesteel-blog-content{
    padding:26px;
}

.techesteel-blog-category{
    display:inline-block;
    margin-bottom:14px;
    color:var(--blue2);
    font:700 12px var(--mono);
    text-transform:uppercase;
    letter-spacing:.1em;
}

.techesteel-blog-card h2{
    margin:0;
    font-size:24px;
    line-height:1.35;
    letter-spacing:-.025em;
}

.techesteel-blog-card h2 a{
    color:var(--text);
    transition:color .2s ease;
}

.techesteel-blog-card h2 a:hover{
    color:var(--blue2);
}

.techesteel-blog-content p{
    margin:16px 0 22px;
    color:var(--muted);
    line-height:1.7;
}

.techesteel-blog-read-more{
    display:inline-flex;
    align-items:center;
    gap:8px;
    color:var(--blue2);
    font-weight:700;
}

.techesteel-blog-read-more span{
    transition:transform .2s ease;
}

.techesteel-blog-read-more:hover span{
    transform:translateX(4px);
}

.techesteel-blog-sidebar{
    display:grid;
    gap:24px;
    position:sticky;
    top:118px;
}

.techesteel-sidebar-card,
.techesteel-sidebar-cta{
    padding:26px;
    border:1px solid var(--border);
    border-radius:16px;
    background:#fff;
    box-shadow:0 12px 30px rgba(25,88,145,.07);
}

.techesteel-sidebar-card h3,
.techesteel-sidebar-cta h3{
    margin:0 0 18px;
    font-size:21px;
}

.techesteel-blog-search{
    display:flex;
}

.techesteel-blog-search input[type="search"]{
    width:100%;
    min-width:0;
    height:48px;
    padding:0 14px;
    border:1px solid var(--border);
    border-right:0;
    border-radius:9px 0 0 9px;
    background:#fff;
    color:var(--text);
    outline:none;
}

.techesteel-blog-search input[type="search"]:focus{
    border-color:var(--blue);
}

.techesteel-blog-search button{
    width:50px;
    border:0;
    border-radius:0 9px 9px 0;
    background:linear-gradient(135deg,#3996ef,#1267c8);
    color:#fff;
    font-size:20px;
    cursor:pointer;
}

.techesteel-category-list{
    padding:0;
    margin:0;
    list-style:none;
}

.techesteel-category-list li{
    border-top:1px solid var(--border);
}

.techesteel-category-list li:first-child{
    border-top:0;
}

.techesteel-category-list a{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    padding:13px 0;
    color:var(--muted);
}

.techesteel-category-list a:hover{
    color:var(--blue2);
}

.techesteel-category-list strong{
    min-width:28px;
    height:28px;
    display:grid;
    place-items:center;
    border-radius:50%;
    background:#edf7ff;
    color:var(--blue2);
    font-size:12px;
}

.techesteel-recent-posts{
    display:grid;
    gap:17px;
}

.techesteel-recent-post{
    display:grid;
    grid-template-columns:72px 1fr;
    gap:13px;
    align-items:center;
}

.techesteel-recent-image{
    width:72px;
    height:64px;
    overflow:hidden;
    display:grid;
    place-items:center;
    border-radius:9px;
    background:#eaf5ff;
    color:var(--blue2);
    font-weight:800;
}

.techesteel-recent-image img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.techesteel-recent-post h4{
    margin:0;
    font-size:15px;
    line-height:1.4;
}

.techesteel-recent-post h4 a{
    color:var(--text);
}

.techesteel-recent-post h4 a:hover{
    color:var(--blue2);
}

.techesteel-recent-post time{
    display:block;
    margin-top:5px;
    color:var(--muted);
    font-size:12px;
}

.techesteel-sidebar-cta{
    overflow:hidden;
    position:relative;
    border-color:#7bbcf4;
    background:linear-gradient(145deg,#eff8ff,#dcedff);
}

.techesteel-sidebar-cta:after{
    content:"";
    position:absolute;
    width:180px;
    height:180px;
    right:-70px;
    bottom:-80px;
    border-radius:50%;
    background:radial-gradient(circle,rgba(47,139,230,.28),transparent 68%);
}

.techesteel-sidebar-cta > *{
    position:relative;
    z-index:2;
}

.techesteel-sidebar-cta > span{
    display:block;
    margin-bottom:12px;
    color:var(--blue2);
    font:700 12px var(--mono);
    text-transform:uppercase;
    letter-spacing:.12em;
}

.techesteel-sidebar-cta p{
    margin:0 0 22px;
    color:var(--muted);
    line-height:1.65;
}

.techesteel-sidebar-cta .primary-btn{
    width:100%;
}

.techesteel-blog-pagination{
    margin-top:48px;
}

.techesteel-blog-pagination ul{
    display:flex;
    justify-content:center;
    flex-wrap:wrap;
    gap:9px;
    padding:0;
    margin:0;
    list-style:none;
}

.techesteel-blog-pagination a,
.techesteel-blog-pagination span{
    min-width:44px;
    height:44px;
    padding:0 14px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:1px solid var(--border);
    border-radius:9px;
    background:#fff;
    color:var(--text);
    font-weight:700;
}

.techesteel-blog-pagination a:hover,
.techesteel-blog-pagination .current{
    border-color:var(--blue);
    background:var(--blue);
    color:#fff;
}

.techesteel-no-posts{
    padding:55px 28px;
    text-align:center;
    border:1px solid var(--border);
    border-radius:18px;
    background:#fff;
}

.techesteel-no-posts h2{
    margin:0;
    font-size:30px;
}

.techesteel-no-posts p{
    color:var(--muted);
}

/* Fix Gutenberg constrained-width interference */
.entry-content.is-layout-constrained > .techesteel-blog-page,
.wp-block-post-content.is-layout-constrained > .techesteel-blog-page{
    width:100% !important;
    max-width:none !important;
    margin-left:0 !important;
    margin-right:0 !important;
}

.techesteel-blog-page.alignfull{
    width:100% !important;
    max-width:none !important;
    margin-left:0 !important;
    margin-right:0 !important;
}

.techesteel-blog-page > .container{
    width:min(1180px, calc(100% - 40px)) !important;
    max-width:1180px !important;
    margin-left:auto !important;
    margin-right:auto !important;
}

/* Main content and sidebar */
.techesteel-blog-layout{
    width:100%;
    display:grid;
    grid-template-columns:minmax(0, 1fr) 330px;
    gap:42px;
    align-items:start;
}

.techesteel-blog-main{
    width:100%;
    min-width:0;
}

/* Auto-fit prevents one post from becoming half-width */
.techesteel-blog-grid{
    width:100%;
    display:grid;
    grid-template-columns:repeat(
        auto-fit,
        minmax(min(100%, 320px), 1fr)
    );
    gap:26px;
}

.techesteel-blog-card{
    width:100%;
    min-width:0;
}

.techesteel-blog-image{
    width:100%;
}

@media(max-width:1050px){
    .techesteel-blog-layout{
        grid-template-columns:1fr;
    }

    .techesteel-blog-sidebar{
        position:static;
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:760px){
    .techesteel-blog-page{
        padding:72px 0 85px;
    }

    .techesteel-blog-grid,
    .techesteel-blog-sidebar{
        grid-template-columns:1fr;
    }

    .techesteel-blog-layout{
        gap:34px;
    }

    .techesteel-blog-page-header{
        margin-bottom:30px;
    }

    .techesteel-blog-page-header h1{
        font-size:52px;
    }

    .techesteel-blog-filters{
        margin-bottom:34px;
    }
}
