/* Blog — Nexttech Mart frontend */

.blog-page {
    overflow-x: hidden;
}

/* —— Listing hero —— */
.blog-hero {
    position: relative;
    color: #fff;
    padding: clamp(2.75rem, 6vw, 4.25rem) 0 clamp(3.25rem, 7vw, 4.75rem);
    background:
        radial-gradient(ellipse 85% 70% at 8% 15%, rgba(212, 32, 39, 0.5) 0%, transparent 52%),
        radial-gradient(ellipse 60% 55% at 92% 75%, rgba(42, 92, 170, 0.25) 0%, transparent 48%),
        linear-gradient(155deg, #1a1819 0%, #2a2426 38%, #1f1516 100%);
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, transparent 88%);
    pointer-events: none;
}

.blog-hero::after {
    content: '';
    position: absolute;
    width: 380px;
    height: 380px;
    right: -8%;
    bottom: -50%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 32, 39, 0.22) 0%, transparent 68%);
    pointer-events: none;
}

.blog-hero .container {
    position: relative;
    z-index: 1;
}

.blog-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.95);
    background: rgba(212, 32, 39, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.42rem 0.9rem;
    border-radius: 100px;
    margin-bottom: 1rem;
}

.blog-hero h1 {
    font-size: clamp(2rem, 5.5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.12;
    margin: 0 0 0.85rem;
    text-shadow: 0 4px 28px rgba(0, 0, 0, 0.3);
}

.blog-hero h1 span {
    background: linear-gradient(90deg, #fff 0%, #f5d0d2 50%, #fff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.blog-hero-lead {
    margin: 0;
    font-size: clamp(0.95rem, 2.2vw, 1.1rem);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.82);
    max-width: 560px;
}

.blog-hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-top: 1.75rem;
}

.blog-hero-stat {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0.75rem 1.15rem;
    backdrop-filter: blur(8px);
}

.blog-hero-stat strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.2;
}

.blog-hero-stat span {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* —— Listing body —— */
.blog-listing {
    background: linear-gradient(180deg, #eef0f5 0%, #f7f8fb 22%, #ffffff 65%);
    padding: clamp(2rem, 5vw, 3rem) 0 clamp(3.5rem, 6vw, 5rem);
}

.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding: 0.35rem;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(35, 31, 32, 0.06);
    border: 1px solid var(--gray-border, #e5e7eb);
}

.blog-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--gray-text, #6c757d);
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.blog-filter-chip:hover {
    color: var(--primary-red, #d42027);
    background: rgba(212, 32, 39, 0.06);
}

.blog-filter-chip.is-active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary-red, #d42027) 0%, #b52c32 100%);
    box-shadow: 0 4px 14px rgba(212, 32, 39, 0.35);
}

.blog-filter-chip .count {
    font-size: 0.7rem;
    opacity: 0.85;
    background: rgba(0, 0, 0, 0.08);
    padding: 0.1rem 0.45rem;
    border-radius: 100px;
}

.blog-filter-chip.is-active .count {
    background: rgba(255, 255, 255, 0.25);
}

/* Featured card */
.blog-featured {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(35, 31, 32, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 2.5rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.blog-featured:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(35, 31, 32, 0.14);
}

@media (min-width: 992px) {
    .blog-featured {
        grid-template-columns: 1.05fr 1fr;
    }
}

.blog-featured-media {
    position: relative;
    min-height: 260px;
    overflow: hidden;
}

.blog-featured-media img,
.blog-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-featured:hover .blog-featured-media img,
.blog-card:hover .blog-card-media img {
    transform: scale(1.04);
}

.blog-media-placeholder {
    width: 100%;
    height: 100%;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 2.5rem;
}

.blog-media-placeholder span {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.85;
}

.blog-ph--insights {
    background: linear-gradient(145deg, #2a5caa 0%, #1a3d6e 50%, #231f20 100%);
}

.blog-ph--guides {
    background: linear-gradient(145deg, #d42027 0%, #8b1a1f 45%, #231f20 100%);
}

.blog-ph--compliance {
    background: linear-gradient(145deg, #3fa43d 0%, #2d7a2c 45%, #1a3d32 100%);
}

.blog-ph--default {
    background: linear-gradient(145deg, #d42027 0%, #231f20 100%);
}

.blog-featured-body {
    padding: clamp(1.5rem, 4vw, 2.25rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-label-featured {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--primary-red, #d42027);
    margin-bottom: 0.75rem;
}

/* Standard card */
.blog-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 6px 24px rgba(35, 31, 32, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 36px rgba(35, 31, 32, 0.12);
}

.blog-card-media {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.blog-card-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, 0.15) 100%);
    pointer-events: none;
}

.blog-card-body {
    padding: 1.35rem 1.35rem 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-pill {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary-red, #d42027);
    background: rgba(212, 32, 39, 0.08);
    padding: 0.28rem 0.65rem;
    border-radius: 6px;
    margin-bottom: 0.65rem;
    width: fit-content;
}

.blog-card-title {
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 0.65rem;
}

.blog-card-title a,
.blog-featured-title a {
    color: var(--dark-bg, #231f20);
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card-title a:hover,
.blog-featured-title a:hover {
    color: var(--primary-red, #d42027);
}

.blog-featured-title {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 0.85rem;
}

.blog-excerpt {
    font-size: 0.9rem;
    color: var(--gray-text, #6c757d);
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.78rem;
    color: #888;
    margin-bottom: 1rem;
}

.blog-meta i {
    color: var(--primary-red, #d42027);
    opacity: 0.85;
}

.blog-btn-read {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-red, #d42027) 0%, #b52c32 100%);
    padding: 0.55rem 1.15rem;
    border-radius: 100px;
    text-decoration: none;
    width: fit-content;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(212, 32, 39, 0.3);
}

.blog-btn-read:hover {
    color: #fff;
    transform: translateX(2px);
    box-shadow: 0 6px 20px rgba(212, 32, 39, 0.4);
}

.blog-cta-strip {
    margin-top: 3rem;
    padding: clamp(1.75rem, 4vw, 2.5rem);
    border-radius: 20px;
    background: linear-gradient(135deg, var(--dark-bg, #231f20) 0%, #3a3234 100%);
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-cta-strip::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    top: -50%;
    right: 10%;
    background: radial-gradient(circle, rgba(212, 32, 39, 0.35) 0%, transparent 70%);
}

.blog-cta-strip h3 {
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    position: relative;
}

.blog-cta-strip p {
    color: rgba(255, 255, 255, 0.78);
    margin-bottom: 1.25rem;
    position: relative;
}

.blog-cta-strip .btn-light {
    font-weight: 700;
    border-radius: 100px;
    padding: 0.6rem 1.5rem;
    position: relative;
}

.blog-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

.blog-empty i {
    font-size: 3.5rem;
    color: var(--primary-red, #d42027);
    opacity: 0.5;
    margin-bottom: 1rem;
}

.blog-pagination .pagination {
    gap: 0.35rem;
}

.blog-pagination .page-link {
    border-radius: 10px !important;
    font-weight: 600;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.blog-pagination .page-item.active .page-link {
    background: var(--primary-red, #d42027);
}

/* —— Article detail —— */
.blog-article-hero {
    position: relative;
    padding: clamp(2rem, 5vw, 3rem) 0 clamp(2.5rem, 5vw, 3.5rem);
    background:
        radial-gradient(ellipse 80% 60% at 20% 0%, rgba(212, 32, 39, 0.35) 0%, transparent 55%),
        linear-gradient(165deg, #1a1819 0%, #2a2426 100%);
    color: #fff;
    overflow: hidden;
}

.blog-article-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.6;
}

.blog-article-hero .container {
    position: relative;
    z-index: 1;
}

.blog-breadcrumb {
    margin-bottom: 1.25rem;
}

.blog-breadcrumb .breadcrumb {
    margin: 0;
    padding: 0.5rem 0.85rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    display: inline-flex;
    flex-wrap: wrap;
}

.blog-breadcrumb .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
}

.blog-breadcrumb .breadcrumb-item a:hover {
    color: #fff;
}

.blog-breadcrumb .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.8125rem;
}

.blog-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.4);
}

.blog-article-hero .blog-pill {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    margin-bottom: 1rem;
}

.blog-article-hero h1 {
    font-size: clamp(1.65rem, 4.5vw, 2.5rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 1.25rem;
    max-width: 820px;
}

.blog-article-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

.blog-article-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.blog-article-hero-meta i {
    color: #f5d0d2;
}

.blog-article-layout {
    background: linear-gradient(180deg, #f0f2f6 0%, #fff 35%);
    padding: 0 0 clamp(3rem, 6vw, 4.5rem);
    margin-top: -1.5rem;
}

.blog-article-shell {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(35, 31, 32, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.04);
    overflow: hidden;
    margin-top: -2rem;
    position: relative;
    z-index: 2;
}

.blog-article-cover {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.blog-article-cover-placeholder {
    min-height: 220px;
}

.blog-article-inner {
    padding: clamp(1.75rem, 4vw, 2.75rem) clamp(1.5rem, 4vw, 3rem);
}

.blog-article-body {
    font-size: 1.0625rem;
    line-height: 1.8;
    color: #3a3a3a;
}

.blog-article-body h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--dark-bg, #231f20);
    margin: 2rem 0 0.85rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(212, 32, 39, 0.15);
}

.blog-article-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark-bg, #231f20);
    margin: 1.5rem 0 0.65rem;
}

.blog-article-body p {
    margin-bottom: 1.15rem;
}

.blog-article-body ul,
.blog-article-body ol {
    margin-bottom: 1.15rem;
    padding-left: 1.35rem;
}

.blog-article-body li {
    margin-bottom: 0.4rem;
}

.blog-article-body a {
    color: var(--primary-red, #d42027);
    font-weight: 600;
}

.blog-article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1rem 0;
}

.blog-article-body strong {
    color: var(--dark-bg, #231f20);
}

.blog-article-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem clamp(1.5rem, 4vw, 3rem);
    background: var(--gray-light, #f8f9fa);
    border-top: 1px solid var(--gray-border, #e5e7eb);
}

.blog-share {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.blog-share-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-text, #6c757d);
    margin-right: 0.25rem;
}

.blog-share-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-border, #e5e7eb);
    background: #fff;
    color: var(--dark-bg, #231f20);
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    font-size: 0.9rem;
}

.blog-share-btn:hover {
    background: var(--primary-red, #d42027);
    color: #fff;
    border-color: var(--primary-red, #d42027);
}

.blog-sidebar-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.35rem;
    box-shadow: 0 8px 28px rgba(35, 31, 32, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 1.25rem;
}

.blog-sidebar-card h4 {
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--dark-bg, #231f20);
}

.blog-sidebar-cat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--gray-border, #e5e7eb);
    text-decoration: none;
    color: var(--dark-text, #231f20);
    font-size: 0.875rem;
    font-weight: 500;
    transition: color 0.2s;
}

.blog-sidebar-cat:last-child {
    border-bottom: none;
}

.blog-sidebar-cat:hover {
    color: var(--primary-red, #d42027);
}

.blog-sidebar-cat .badge {
    font-size: 0.7rem;
    background: rgba(212, 32, 39, 0.1);
    color: var(--primary-red, #d42027);
}

.blog-sidebar-cta {
    background: linear-gradient(145deg, var(--primary-red, #d42027) 0%, #b52c32 100%);
    color: #fff;
    text-align: center;
}

.blog-sidebar-cta h4 {
    color: #fff;
}

.blog-sidebar-cta p {
    font-size: 0.85rem;
    opacity: 0.92;
    margin-bottom: 1rem;
}

.blog-sidebar-cta .btn {
    background: #fff;
    color: var(--primary-red, #d42027);
    font-weight: 700;
    border: none;
    border-radius: 100px;
    width: 100%;
}

.blog-related-section {
    padding-top: 3rem;
}

.blog-related-section h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark-bg, #231f20);
    margin-bottom: 1.5rem;
}

.blog-related-card {
    background: #fff;
    border-radius: 14px;
    padding: 1.25rem;
    height: 100%;
    border: 1px solid var(--gray-border, #e5e7eb);
    transition: all 0.22s ease;
    display: flex;
    flex-direction: column;
}

.blog-related-card:hover {
    border-color: var(--primary-red, #d42027);
    box-shadow: 0 10px 28px rgba(212, 32, 39, 0.12);
    transform: translateY(-3px);
}

.blog-related-card a.title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--dark-bg, #231f20);
    text-decoration: none;
    line-height: 1.4;
    flex: 1;
}

.blog-related-card a.title:hover {
    color: var(--primary-red, #d42027);
}

.blog-related-card .date {
    font-size: 0.78rem;
    color: var(--gray-text, #6c757d);
    margin-top: 0.75rem;
}

@media (max-width: 991.98px) {
    .blog-sidebar-sticky {
        position: static !important;
    }
}

@media (min-width: 992px) {
    .blog-sidebar-sticky {
        position: sticky;
        top: 96px;
    }
}
