/* ======================================================
   GPSPL Blog & Resource Hub CSS - Executive Modern Design
   ====================================================== */

/* --- 1. BLOG HUB / RESOURCES LISTING --- */
.blog-hero {
    position: relative;
    padding: clamp(72px, 10vw, 130px) 0 clamp(48px, 6vw, 80px);
    background:
        radial-gradient(circle at 12% 20%, rgba(225, 39, 45, 0.18), transparent 26rem),
        radial-gradient(circle at 88% 14%, rgba(33, 108, 181, 0.22), transparent 28rem),
        linear-gradient(135deg, #071426 0%, #0b2748 55%, #1a2442 100%);
    overflow: hidden;
}
.blog-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(rgba(255,255,255,0.028) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.028) 1px, transparent 1px);
    background-size: 72px 72px;
    pointer-events: none;
}
.blog-hero-inner { position: relative; z-index: 2; max-width: 820px; }
.blog-hero-eyebrow {
    display: inline-flex; align-items: center; gap: 12px;
    margin-bottom: 22px; color: #ff7b80;
    font-size: 0.78rem; font-weight: 900; letter-spacing: 0.22em; text-transform: uppercase;
}
.blog-hero-eyebrow::before {
    content: ''; display: block; width: 36px; height: 3px;
    background: #ef3438; border-radius: 99px; flex-shrink: 0;
}
.blog-hero h1 { margin: 0 0 20px; color: #fff; font-family: 'Plus Jakarta Sans', sans-serif; font-size: clamp(2.2rem, 5.5vw, 4.4rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.02em; }
.blog-hero h1 span { background: linear-gradient(115deg, #fff 30%, #ffd2d4 70%, #ff8b8f 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.blog-hero p { margin: 0; color: rgba(210,228,252,0.86); font-size: clamp(0.96rem,1.2vw,1.18rem); line-height: 1.72; max-width: 680px; }

.blog-filter-bar { background: #fff; border-bottom: 1px solid #e9eef5; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 12px rgba(15,35,60,0.07); }
.blog-filter-inner { display: flex; align-items: center; gap: 8px; padding: 14px 0; overflow-x: auto; scrollbar-width: none; }
.blog-filter-inner::-webkit-scrollbar { display: none; }
.filter-btn { flex-shrink: 0; padding: 8px 18px; border-radius: 999px; border: 1.5px solid #dde3ec; background: transparent; color: #4a5568; font-size: 0.84rem; font-weight: 700; cursor: pointer; transition: all 0.2s ease; white-space: nowrap; font-family: inherit; }
.filter-btn:hover, .filter-btn.active { background: #071426; color: #fff; border-color: #071426; }
.filter-btn[data-cat="Buyers Guide"].active { background: #0d6efd; border-color: #0d6efd; }
.filter-btn[data-cat="Comparison"].active { background: #d32f2f; border-color: #d32f2f; }
.filter-btn[data-cat="Maintenance"].active { background: #2e7d32; border-color: #2e7d32; }

.blog-section { padding: clamp(48px,7vw,90px) 0; background: #f6f9fd; min-height: 60vh; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px; }
.blog-card { background: #fff; border-radius: 20px; border: 1px solid #e4ecf4; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.28s cubic-bezier(0.4,0,0.2,1), box-shadow 0.28s cubic-bezier(0.4,0,0.2,1); text-decoration: none; color: inherit; }
.blog-card:hover { transform: translateY(-6px); box-shadow: 0 28px 72px rgba(15,35,60,0.12); }
.blog-card-thumb { position: relative; height: 190px; background: linear-gradient(135deg,#071426 0%,#0d2d52 55%,#1a3360 100%); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.blog-card-thumb::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 20% 30%,rgba(239,52,56,0.25),transparent 50%), radial-gradient(circle at 80% 70%,rgba(33,108,181,0.25),transparent 50%); }
.blog-card-thumb-icon { position: relative; z-index: 2; width: 68px; height: 68px; border-radius: 18px; background: rgba(255,255,255,0.14); border: 1.5px solid rgba(255,255,255,0.35); display: grid; place-items: center; color: #ffffff !important; font-size: 1.75rem; backdrop-filter: blur(8px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.blog-card-thumb-icon i { color: #ffffff !important; -webkit-text-fill-color: #ffffff !important; }
.blog-card-body { padding: 24px 26px 28px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.blog-card-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.blog-card-cat { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.7rem; font-weight: 900; letter-spacing: 0.1em; text-transform: uppercase; color: #fff; }
.blog-card-date, .blog-card-read { color: #8898aa; font-size: 0.8rem; }
.blog-card h2 { margin: 0; color: #071526; font-family: 'Plus Jakarta Sans', sans-serif; font-size: clamp(1.05rem,1.3vw,1.22rem); font-weight: 800; line-height: 1.32; }
.blog-card p { margin: 0; color: #536780; font-size: 0.92rem; line-height: 1.62; flex: 1; }
.blog-card-cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; color: #d32f2f; font-size: 0.84rem; font-weight: 800; transition: gap 0.2s ease; }
.blog-card:hover .blog-card-cta { gap: 14px; }
.blog-card.hidden { display: none; }

/* --- 2. SINGLE BLOG POST ARTICLE STYLES --- */
.blog-post-page,
.post-page {
    background: #ffffff !important;
    min-height: 100vh;
}

/* Article Hero Header */
.blog-post-header,
.post-hero {
    position: relative !important;
    padding: clamp(60px, 8vw, 100px) 0 clamp(40px, 5vw, 60px) !important;
    background: radial-gradient(circle at 10% 20%, rgba(239, 52, 56, 0.18), transparent 30rem),
                radial-gradient(circle at 90% 15%, rgba(2, 132, 199, 0.2), transparent 28rem),
                linear-gradient(135deg, #071526 0%, #0d274a 60%, #111e36 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.blog-breadcrumb,
.post-breadcrumb {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 16px !important;
    color: rgba(226, 232, 240, 0.75) !important;
    font-size: 0.82rem !important;
    flex-wrap: wrap !important;
}

.blog-breadcrumb a,
.post-breadcrumb a {
    color: rgba(226, 232, 240, 0.85) !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.blog-breadcrumb a:hover,
.post-breadcrumb a:hover {
    color: #ffffff !important;
}

.blog-post-meta,
.post-hero-meta {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    flex-wrap: wrap !important;
    margin-bottom: 18px !important;
}

.blog-post-meta .blog-card-cat,
.post-cat-badge {
    padding: 5px 14px !important;
    border-radius: 999px !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    background: linear-gradient(135deg, #ef3438 0%, #c1334a 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(239, 52, 56, 0.3) !important;
}

.blog-post-date,
.blog-post-read,
.post-date,
.post-read-time {
    color: rgba(226, 232, 240, 0.82) !important;
    font-size: 0.84rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.blog-post-header h1,
.post-hero h1 {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: clamp(1.85rem, 3.8vw, 3.2rem) !important;
    font-weight: 800 !important;
    line-height: 1.16 !important;
    letter-spacing: -0.02em !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    margin: 0 0 16px 0 !important;
    max-width: 960px !important;
}

.blog-post-subtitle,
.post-hero-excerpt {
    font-size: clamp(0.96rem, 1.2vw, 1.15rem) !important;
    line-height: 1.68 !important;
    color: rgba(226, 232, 240, 0.9) !important;
    -webkit-text-fill-color: rgba(226, 232, 240, 0.9) !important;
    max-width: 840px !important;
    margin: 0 !important;
}

/* Article Layout Grid */
.blog-layout,
.post-layout {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 340px !important;
    gap: clamp(32px, 4.5vw, 64px) !important;
    padding: clamp(48px, 6vw, 80px) 0 !important;
    align-items: start !important;
}

.blog-content,
.post-content {
    min-width: 0 !important;
    color: #1e293b !important;
    font-size: 1.02rem !important;
    line-height: 1.78 !important;
}

.blog-content h2,
.post-content h2 {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: clamp(1.4rem, 2.2vw, 1.85rem) !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    color: #071526 !important;
    -webkit-text-fill-color: #071526 !important;
    margin: 2.2em 0 0.8em 0 !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid #f1f5f9 !important;
    position: relative !important;
}

.blog-content h2::after,
.post-content h2::after {
    content: '' !important;
    position: absolute !important;
    left: 0 !important;
    bottom: -2px !important;
    width: 48px !important;
    height: 2px !important;
    background: #ef3438 !important;
}

.blog-content h2:first-of-type,
.post-content h2:first-of-type {
    margin-top: 0 !important;
}

.blog-content h3,
.post-content h3 {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: clamp(1.15rem, 1.6vw, 1.35rem) !important;
    font-weight: 800 !important;
    color: #0d274a !important;
    -webkit-text-fill-color: #0d274a !important;
    margin: 1.8em 0 0.6em 0 !important;
}

.blog-content p,
.post-content p {
    margin: 0 0 1.4em 0 !important;
    color: #334155 !important;
    -webkit-text-fill-color: #334155 !important;
}

.blog-content strong,
.post-content strong {
    color: #071526 !important;
    -webkit-text-fill-color: #071526 !important;
    font-weight: 700 !important;
}

.blog-content a,
.post-content a {
    color: #0284c7 !important;
    font-weight: 700 !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
    transition: color 0.2s ease !important;
}

.blog-content a:hover,
.post-content a:hover {
    color: #ef3438 !important;
}

/* Callout / Highlight Boxes */
.blog-highlight-box,
.post-callout {
    margin: 2em 0 !important;
    padding: 24px 28px !important;
    border-radius: 16px !important;
    background: #f8fafc !important;
    border: 1px solid rgba(13, 31, 56, 0.08) !important;
    border-left: 5px solid #ef3438 !important;
    box-shadow: 0 4px 20px rgba(13, 31, 56, 0.04) !important;
    display: flex !important;
    gap: 16px !important;
    align-items: flex-start !important;
}

.blog-highlight-box p,
.post-callout p {
    margin: 0 !important;
    font-size: 0.96rem !important;
    line-height: 1.7 !important;
    color: #1e293b !important;
    -webkit-text-fill-color: #1e293b !important;
}

.post-callout-icon {
    font-size: 1.5rem !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
    margin-top: 2px !important;
}

/* Visual Figures and Images */
.post-figure {
    margin: 2.4em 0 !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 10px 30px rgba(13, 31, 56, 0.08) !important;
    border: 1px solid rgba(13, 31, 56, 0.08) !important;
    background: #ffffff !important;
}

.post-figure img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
    max-height: 480px !important;
    object-fit: cover !important;
}

.post-figure figcaption {
    padding: 12px 18px !important;
    background: #f8fafc !important;
    font-size: 0.84rem !important;
    color: #64748b !important;
    border-top: 1px solid #e2e8f0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-weight: 600 !important;
}

/* In-Article Table of Contents Box */
.post-toc {
    background: #f8fafc !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 16px !important;
    padding: 22px 26px !important;
    margin: 2em 0 !important;
}

.post-toc-title {
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    color: #071526 !important;
    margin-bottom: 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.post-toc ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
    gap: 8px !important;
}

.post-toc a {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: #0284c7 !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    padding: 6px 10px !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
}

.post-toc a:hover {
    background: #ffffff !important;
    color: #ef3438 !important;
    transform: translateX(3px) !important;
}

/* Tables in Blog */
.blog-content table,
.post-content table,
.post-table,
.comparison-table {
    width: 100% !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    margin: 2.2em 0 !important;
    background: #ffffff !important;
    border: 1px solid rgba(13, 31, 56, 0.12) !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 6px 24px rgba(13, 31, 56, 0.05) !important;
    font-size: 0.92rem !important;
}

.blog-content thead tr,
.post-content thead tr,
.post-table th,
.comparison-table thead tr {
    background: #071526 !important;
    color: #ffffff !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-weight: 800 !important;
    letter-spacing: 0.02em !important;
}

.blog-content th,
.post-content th,
.post-table th,
.comparison-table th {
    padding: 16px 18px !important;
    text-align: left !important;
    border: none !important;
}

.blog-content td,
.post-content td,
.post-table td,
.comparison-table td {
    padding: 14px 18px !important;
    border-bottom: 1px solid #f1f5f9 !important;
    color: #334155 !important;
    -webkit-text-fill-color: #334155 !important;
    line-height: 1.55 !important;
    vertical-align: top !important;
}

.blog-content tbody tr:last-child td,
.post-content tbody tr:last-child td,
.post-table tr:last-child td,
.comparison-table tbody tr:last-child td {
    border-bottom: none !important;
}

.blog-content tbody tr:nth-child(even),
.post-content tbody tr:nth-child(even),
.comparison-table tbody tr:nth-child(even) {
    background: #f8fafc !important;
}

/* Unordered and Ordered Lists in Blog */
.blog-content ul,
.blog-content ol,
.post-content ul,
.post-content ol {
    margin: 0 0 1.8em 0 !important;
    padding-left: 24px !important;
}

.blog-content li,
.post-content li {
    margin-bottom: 10px !important;
    line-height: 1.7 !important;
    color: #334155 !important;
    -webkit-text-fill-color: #334155 !important;
}

/* Sidebar Widgets & Related Post Links */
.blog-sidebar,
.post-sidebar {
    position: sticky !important;
    top: 90px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
}

.blog-sidebar-widget,
.sidebar-card,
.sidebar-widget {
    background: #ffffff !important;
    border: 1px solid rgba(13, 31, 56, 0.1) !important;
    border-radius: 20px !important;
    padding: 26px 22px !important;
    box-shadow: 0 6px 24px rgba(13, 31, 56, 0.05) !important;
}

.blog-sidebar-widget h3,
.sidebar-card h3,
.sidebar-widget h3,
.sidebar-widget h4 {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    color: #071526 !important;
    -webkit-text-fill-color: #071526 !important;
    margin: 0 0 16px 0 !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid #f1f5f9 !important;
}

/* Sleek Card Links in Sidebar */
.related-post-link,
.sidebar-card a:not(.sidebar-cta-btn),
.blog-sidebar-widget a,
.sidebar-widget a:not(.btn-primary) {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px 14px !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
    border: 1px solid rgba(13, 31, 56, 0.08) !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 0.88rem !important;
    color: #071526 !important;
    -webkit-text-fill-color: #071526 !important;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1) !important;
    margin-bottom: 8px !important;
}

.related-post-link:hover,
.sidebar-card a:not(.sidebar-cta-btn):hover,
.blog-sidebar-widget a:hover,
.sidebar-widget a:not(.btn-primary):hover {
    background: #ffffff !important;
    border-color: #ef3438 !important;
    transform: translateX(4px) !important;
    box-shadow: 0 6px 18px rgba(239, 52, 56, 0.1) !important;
    color: #ef3438 !important;
    -webkit-text-fill-color: #ef3438 !important;
}

.related-post-link i,
.sidebar-card a i,
.blog-sidebar-widget a i,
.sidebar-widget a i {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px !important;
    background: rgba(13, 110, 253, 0.08) !important;
    color: #0d6efd !important;
    -webkit-text-fill-color: #0d6efd !important;
    display: grid !important;
    place-items: center !important;
    flex-shrink: 0 !important;
    font-size: 0.85rem !important;
    transition: all 0.2s ease !important;
}

.related-post-link:hover i,
.sidebar-card a:hover i,
.blog-sidebar-widget a:hover i,
.sidebar-widget a:hover i {
    background: #ef3438 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Sidebar Call to Action Box */
.sidebar-cta,
.sidebar-card.sidebar-cta {
    background: linear-gradient(135deg, #071526 0%, #0d274a 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 20px !important;
    padding: 28px 24px !important;
    box-shadow: 0 10px 30px rgba(7, 21, 38, 0.2) !important;
}

.sidebar-cta h3 {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.15) !important;
}

.sidebar-cta p {
    color: rgba(226, 232, 240, 0.88) !important;
    -webkit-text-fill-color: rgba(226, 232, 240, 0.88) !important;
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
    margin: 12px 0 20px 0 !important;
}

.sidebar-cta-btn {
    display: block !important;
    text-align: center !important;
    background: #ef3438 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    padding: 12px 20px !important;
    border-radius: 10px !important;
    font-weight: 800 !important;
    font-size: 0.9rem !important;
    text-decoration: none !important;
    box-shadow: 0 4px 16px rgba(239, 52, 56, 0.35) !important;
    transition: all 0.2s ease !important;
}

.sidebar-cta-btn:hover {
    background: #dc2626 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(239, 52, 56, 0.45) !important;
}

/* --- 3. RESPONSIVE BREAKPOINTS FOR BLOG --- */
@media (max-width: 1024px) {
    .blog-layout,
    .post-layout {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
    
    .blog-sidebar,
    .post-sidebar {
        position: static !important;
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
        gap: 20px !important;
    }
}

@media (max-width: 640px) {
    .blog-content table,
    .post-content table,
    .comparison-table {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        white-space: nowrap !important;
    }
    .blog-sidebar,
    .post-sidebar {
        grid-template-columns: 1fr !important;
    }
}
