/* Blog page — Techmagnate reference layout */

.blog-page .tm-breadcrumb li + li::before {
    content: '>';
}

/* Hero */
.blog-hero {
    background: linear-gradient(135deg, #0570AE 0%, #0570AE 100%);
    padding: 3.5rem 0;
    overflow: hidden;
}

.blog-hero-inner {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 2rem;
    align-items: center;
}

.blog-hero-text h1 {
    font-size: clamp(1.85rem, 3.5vw, 2.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.blog-hero-text p {
    color: rgba(255, 255, 255, .92);
    font-size: 1rem;
    line-height: 1.65;
    max-width: 520px;
    margin-bottom: 1.5rem;
}

.btn-blog-hero {
    background: #fff;
    color: #0570AE;
    padding: .75rem 1.75rem;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    transition: all .2s;
}

.btn-blog-hero:hover {
    background: #C3C3C3;
    color: #023B5E;
    transform: translateY(-2px);
}

.blog-hero-visual {
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.blog-hero-visual img,
.blog-hero-img,
.blog-hero-visual .page-hero-img {
    display: block;
    width: auto;
    max-width: min(300px, 100%);
    max-height: 220px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
    object-fit: cover;
    margin: 0 auto;
}

/* Main layout */
.blog-page-wrap {
    background: #ffffff;
    padding: 2.5rem 0 4rem;
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    align-items: start;
}

.blog-main { min-width: 0; }

/* Featured card */
.blog-featured-card {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #C3C3C3;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .06);
    margin-bottom: 2.5rem;
}

.blog-featured-img {
    display: block;
    min-height: 260px;
    overflow: hidden;
}

.blog-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.blog-featured-card:hover .blog-featured-img img {
    transform: scale(1.03);
}

.blog-featured-body {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-featured-body h2 {
    font-size: 1.35rem;
    font-weight: 800;
    margin: .65rem 0;
    line-height: 1.35;
}

.blog-featured-body h2 a {
    color: #023B5E;
    text-decoration: none;
}

.blog-featured-body h2 a:hover { color: #0570AE; }

.blog-featured-body p {
    color: #767B79;
    font-size: .92rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Category pill */
.blog-cat-pill {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #0570AE;
    background: rgba(5, 112, 174, .1);
    padding: .3rem .7rem;
    border-radius: 50px;
}

.blog-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: .78rem;
    color: #767B79;
    margin-top: auto;
}

.blog-card-meta i { margin-right: .25rem; }

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: 1rem;
    font-size: .88rem;
    font-weight: 700;
    color: #0570AE;
    text-decoration: none;
}

.blog-read-more:hover { text-decoration: underline; }

/* Category sections */
.blog-cat-section {
    margin-bottom: 2.5rem;
}

.blog-cat-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding-bottom: .65rem;
    border-bottom: 2px solid #C3C3C3;
}

.blog-cat-section-head h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #023B5E;
    margin: 0;
}

.blog-view-all {
    font-size: .85rem;
    font-weight: 700;
    color: #0570AE;
    text-decoration: none;
}

.blog-view-all:hover { text-decoration: underline; }

.blog-compact-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.blog-compact-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #C3C3C3;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
    transition: transform .2s, box-shadow .2s;
}

.blog-compact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .1);
}

.blog-compact-img {
    display: block;
    height: 160px;
    overflow: hidden;
}

.blog-compact-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.blog-compact-card:hover .blog-compact-img img {
    transform: scale(1.05);
}

.blog-compact-body {
    padding: 1rem 1.1rem 1.15rem;
}

.blog-compact-body h3 {
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.4;
    margin: .5rem 0 .65rem;
}

.blog-compact-body h3 a {
    color: #023B5E;
    text-decoration: none;
}

.blog-compact-body h3 a:hover { color: #0570AE; }

/* All blogs */
.blog-all-section {
    margin-top: 1rem;
}

.blog-all-section h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #023B5E;
    margin-bottom: 1.25rem;
}

.blog-filter-label {
    font-size: .9rem;
    color: #767B79;
    margin-bottom: 1.25rem;
}

.blog-filter-label strong { color: #0570AE; }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.blog-grid-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #C3C3C3;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .05);
    transition: transform .2s, box-shadow .2s;
}

.blog-grid-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .1);
}

.blog-grid-img {
    display: block;
    height: 180px;
    overflow: hidden;
}

.blog-grid-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.blog-grid-card:hover .blog-grid-img img {
    transform: scale(1.05);
}

.blog-grid-body {
    padding: 1rem 1.1rem 1.15rem;
}

.blog-grid-body h3 {
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.4;
    margin: .5rem 0 .65rem;
}

.blog-grid-body h3 a {
    color: #023B5E;
    text-decoration: none;
}

.blog-grid-body h3 a:hover { color: #0570AE; }

.blog-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: center;
    margin-top: 2rem;
}

.blog-pagination a,
.blog-pagination span {
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: .88rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #C3C3C3;
    color: #767B79;
    background: #fff;
}

.blog-pagination a:hover {
    border-color: #0570AE;
    color: #0570AE;
}

.blog-pagination .active {
    background: #023B5E;
    color: #ffffff;
    border-color: #023B5E;
}

.blog-empty {
    background: #fff;
    border: 1px solid #C3C3C3;
    border-radius: 12px;
    padding: 3rem;
    text-align: center;
    color: #767B79;
}

.blog-empty a { color: #0570AE; font-weight: 600; }

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: calc(var(--header-h, 78px) + var(--alert-h, 32px) + 16px);
}

.blog-widget {
    background: #fff;
    border: 1px solid #C3C3C3;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .04);
}

.blog-widget-title {
    font-size: 1rem;
    font-weight: 800;
    color: #023B5E;
    margin-bottom: 1rem;
    padding-bottom: .65rem;
    border-bottom: 2px solid #e6e9ec;
}

.blog-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-cat-list li + li { margin-top: .35rem; }

.blog-cat-list a {
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem .65rem;
    border-radius: 6px;
    font-size: .88rem;
    font-weight: 600;
    color: #767B79;
    text-decoration: none;
    transition: background .2s, color .2s;
}

.blog-cat-list a:hover,
.blog-cat-list a.active {
    background: rgba(5, 112, 174, .08);
    color: #0570AE;
}

.blog-cat-list .count {
    font-weight: 500;
    color: #767B79;
    font-size: .8rem;
}

.blog-cat-list i {
    margin-left: auto;
    font-size: .7rem;
    color: #767B79;
}

.blog-popular-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-popular-list li + li {
    margin-top: .85rem;
    padding-top: .85rem;
    border-top: 1px solid #e6e9ec;
}

.blog-popular-list a {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
    text-decoration: none;
    color: #767B79;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.4;
}

.blog-popular-list a:hover { color: #0570AE; }

.blog-popular-list img {
    width: 64px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.blog-widget-form input,
.blog-widget-newsletter input {
    width: 100%;
    padding: .6rem .75rem;
    border: 1px solid #C3C3C3;
    border-radius: 6px;
    font-size: .88rem;
    margin-bottom: .65rem;
}

.blog-widget-form button,
.blog-widget-newsletter button {
    width: 100%;
    background: #0570AE;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: .65rem;
    font-weight: 700;
    font-size: .88rem;
    cursor: pointer;
    transition: background .2s;
}

.blog-widget-form button:hover,
.blog-widget-newsletter button:hover {
    background: #023B5E;
}

.blog-widget-newsletter p {
    font-size: .82rem;
    color: #767B79;
    margin-bottom: .85rem;
    line-height: 1.5;
}

.blog-widget-cta {
    background: linear-gradient(135deg, #0570AE, #0570AE);
    color: #fff;
    border: none;
}

.blog-widget-cta h4 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: .5rem;
    color: #fff;
}

.blog-widget-cta p {
    font-size: .82rem;
    opacity: .95;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.btn-blog-cta {
    display: inline-block;
    background: #fff;
    color: #0570AE;
    padding: .55rem 1.1rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: .85rem;
    text-decoration: none;
}

.btn-blog-cta:hover {
    background: #ffffff;
    color: #023B5E;
}

.blog-clients {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .65rem;
    align-items: center;
}

.blog-clients img {
    width: 100%;
    height: 36px;
    object-fit: contain;
    filter: grayscale(1);
    opacity: .75;
    transition: filter .2s, opacity .2s;
}

.blog-clients img:hover {
    filter: none;
    opacity: 1;
}

@media (max-width: 1199px) {
    .blog-layout { grid-template-columns: 1fr; }
    .blog-sidebar { position: static; }
    .blog-compact-row,
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .blog-hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .blog-hero-text p { margin-left: auto; margin-right: auto; }

    .blog-hero-visual img,
    .blog-hero-img,
    .blog-hero-visual .page-hero-img { max-width: min(260px, 90vw); max-height: 200px; }

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

    .blog-featured-img { min-height: 200px; }

    .blog-compact-row,
    .blog-grid { grid-template-columns: 1fr; }
}
