/* ===== Raqmiat blog list + detail polish ===== */

/* Filter bar */
.blog-filters-section {
    padding: 30px 0 10px;
    background: #fff;
}
.blog-filters-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    justify-content: center;
}
.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #fff;
    color: #001E40;
    border: 1px solid rgba(0, 43, 92, 0.12);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.cat-pill .count {
    font-size: 11px;
    background: rgba(0, 114, 181, 0.10);
    color: #0072B5;
    padding: 1px 7px;
    border-radius: 999px;
}
.cat-pill:hover {
    border-color: rgba(0, 114, 181, 0.35);
    color: #0072B5;
    transform: translateY(-1px);
}
.cat-pill.active {
    background: #0072B5;
    color: #fff;
    border-color: #0072B5;
}
.cat-pill.active .count {
    background: rgba(255, 255, 255, 0.20);
    color: #fff;
}

/* Featured card */
.blog-featured-section {
    background: #fff;
    padding: 30px 0 50px;
}
.featured-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background: #fff;
    border: 1px solid rgba(0, 43, 92, 0.08);
    border-radius: 22px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 12px 30px -18px rgba(0, 43, 92, 0.15);
    transition: transform .3s, box-shadow .3s;
}
.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 50px -20px rgba(0, 43, 92, 0.25);
}
.featured-img {
    background-size: cover;
    background-position: center;
    min-height: 380px;
}
.featured-body {
    padding: 38px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}
.featured-body .badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: linear-gradient(90deg, #0072B5, #0FCFFF);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-radius: 999px;
    width: max-content;
}
.featured-body .cat-tag {
    display: inline-block;
    color: #0072B5;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.featured-body h2 {
    color: #001E40;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: clamp(22px, 2.4vw, 30px);
    line-height: 1.25;
    margin: 0;
}
.featured-body p {
    color: #4b5563;
    font-size: 15.5px;
    line-height: 1.65;
    margin: 0;
}
.featured-body .meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    margin-top: 6px;
}
.featured-body .meta-row i { color: #0072B5; margin-right: 4px; }

/* Blog grid */
.blog-grid-section {
    background: #fff;
    padding: 30px 0 80px;
}
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.blog-card {
    background: #fff;
    border: 1px solid rgba(0, 43, 92, 0.08);
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform .3s, box-shadow .3s, border-color .3s;
}
.blog-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 114, 181, 0.25);
    box-shadow: 0 22px 40px -18px rgba(0, 43, 92, 0.20);
}
.blog-card-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}
.blog-card-img .cat-overlay {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(0, 30, 64, 0.85);
    color: #fff;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.10em;
    backdrop-filter: blur(6px);
}
.blog-card-body {
    padding: 22px 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.blog-card-body h3 {
    color: #001E40;
    font-weight: 700;
    font-size: 17px;
    line-height: 1.35;
    margin: 0;
}
.blog-card-body p {
    color: #5b6473;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}
.blog-card-body .meta-row {
    display: flex;
    gap: 14px;
    color: #6b7280;
    font-size: 12.5px;
    font-weight: 500;
    padding-top: 4px;
    border-top: 1px solid rgba(0, 43, 92, 0.06);
}
.blog-card-body .meta-row i { color: #0072B5; margin-right: 4px; }

/* Author chip with avatar */
.author-chip {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #001E40 !important;
}
.author-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 43, 92, 0.18);
    flex-shrink: 0;
}
.blog-detail-wrap .meta-row .author-chip {
    color: #001E40 !important;
}
.blog-detail-wrap .meta-row .author-avatar {
    width: 32px;
    height: 32px;
}

/* Blog detail */
.blog-detail-section {
    background: #fff;
    padding: 60px 0 80px;
}
.blog-detail-wrap {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 8px;
}
@media (min-width: 1400px) {
    .blog-detail-wrap { max-width: 1280px; }
}
@media (max-width: 991.98px) {
    .blog-detail-wrap { max-width: 920px; }
}
.blog-detail-wrap .cat-tag {
    display: inline-block;
    color: #0072B5;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.blog-detail-wrap h1 {
    color: #001E40;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
    margin-bottom: 18px;
}
.blog-detail-wrap .meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    color: #6b7280;
    font-size: 13.5px;
    margin-bottom: 28px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(0, 43, 92, 0.08);
}
.blog-detail-wrap .meta-row i { color: #0072B5; margin-right: 4px; }
.blog-detail-hero-img {
    width: 100%;
    height: 420px;
    background-size: cover;
    background-position: center;
    border-radius: 18px;
    margin-bottom: 32px;
    box-shadow: 0 18px 40px -22px rgba(0, 43, 92, 0.25);
}
.blog-detail-body {
    color: #1f2937;
    font-size: 16px;
    line-height: 1.75;
    background: #fff;
}

/* ===== Section headers (case-study style: dark blue + thin underline) ===== */
.blog-detail-body h2 {
    color: #1d3a6e;
    font-weight: 800;
    letter-spacing: -0.01em;
    font-size: 26px;
    margin-top: 44px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #4a90c2;
    position: relative;
}
.blog-detail-body h2::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: #1d3a6e;
}
.blog-detail-body h3 {
    color: #1d3a6e;
    font-weight: 700;
    font-size: 19px;
    margin-top: 28px;
    margin-bottom: 12px;
}

/* ===== Body text + lists ===== */
.blog-detail-body p { margin-bottom: 18px; color: #374151; }
.blog-detail-body ul, .blog-detail-body ol {
    padding-left: 22px;
    margin-bottom: 18px;
}
.blog-detail-body li {
    margin-bottom: 10px;
    color: #374151;
}
.blog-detail-body ul li::marker { color: #4a90c2; font-size: 1.15em; }
.blog-detail-body strong { color: #1d3a6e; font-weight: 700; }
.blog-detail-body a { color: #0072B5; font-weight: 600; text-decoration: none; }
.blog-detail-body a:hover { text-decoration: underline; }

/* ===== Pull-quote callout (case-study "In Their Words" style) ===== */
.blog-detail-body blockquote {
    background: #fefce8;
    border-left: 4px solid #f59e0b;
    padding: 20px 26px;
    margin: 28px 0;
    border-radius: 0 8px 8px 0;
    font-style: normal;
    color: #1d3a6e;
    font-size: 16.5px;
    line-height: 1.6;
    position: relative;
}
.blog-detail-body blockquote::before {
    content: "\201C";
    display: inline-block;
    font-size: 36px;
    line-height: 0;
    color: #f59e0b;
    margin-right: 8px;
    vertical-align: -8px;
    font-family: Georgia, serif;
}

/* ===== Tables (case-study format: navy header row, alternating rows) ===== */
.blog-detail-body table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 28px 0 !important;
    font-size: 14.5px;
    box-shadow: 0 4px 14px -8px rgba(0, 43, 92, 0.18);
    border-radius: 8px;
    overflow: hidden;
}
.blog-detail-body table tr:first-child,
.blog-detail-body table th {
    background: #1d3a6e !important;
    color: #ffffff !important;
}
.blog-detail-body table th,
.blog-detail-body table tr:first-child td {
    padding: 12px 14px !important;
    text-align: left;
    font-weight: 700;
    border: none !important;
}
.blog-detail-body table td {
    padding: 11px 14px !important;
    border: 1px solid #e5edf5 !important;
    color: #374151;
}
.blog-detail-body table tr:nth-child(even) td {
    background: #f7fafc !important;
}
.blog-detail-body table tr:first-child td {
    background: #1d3a6e !important;
    color: #fff !important;
}

/* ===== Reading progress bar (top of blog page) ===== */
#rq-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    z-index: 9999;
    pointer-events: none;
}
#rq-progress .rq-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #0072B5, #0FCFFF);
    transition: width .15s ease-out;
}

/* ===== Back-to-top button ===== */
#rq-totop {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #0072B5;
    color: #fff;
    border: none;
    box-shadow: 0 8px 22px -8px rgba(0, 114, 181, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9998;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .25s, transform .25s, background .2s;
}
#rq-totop.show { opacity: 1; transform: translateY(0); }
#rq-totop:hover { background: #005a91; }
@media (max-width: 575.98px) {
    #rq-totop { bottom: 80px; right: 16px; }
}

/* ===== Table of Contents (auto-generated on blog pages) ===== */
.rq-toc {
    background: linear-gradient(135deg, #f7fafc 0%, #ffffff 100%);
    border: 1px solid #e5edf5;
    border-radius: 12px;
    padding: 22px 26px;
    margin: 0 0 34px;
    border-left: 4px solid #0072B5;
}
.rq-toc h4 {
    color: #1d3a6e;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    margin: 0 0 12px;
    padding: 0;
    border: none !important;
}
.rq-toc h4::after { display: none !important; }
.rq-toc ol {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc;
}
.rq-toc ol li {
    counter-increment: toc;
    margin-bottom: 6px;
    padding-left: 32px;
    position: relative;
    font-size: 14.5px;
}
.rq-toc ol li::before {
    content: counter(toc, decimal-leading-zero);
    position: absolute;
    left: 0;
    top: 0;
    color: #4a90c2;
    font-weight: 700;
    font-size: 13px;
}
.rq-toc a {
    color: #1d3a6e;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color .2s, border-color .2s;
}
.rq-toc a:hover {
    color: #0072B5;
    border-bottom-color: #0072B5;
}

/* ===== Client logo showcase (Saudi government clients PIF, CHI) ===== */
.blog-client-logos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin: 28px 0;
}
.blog-client-card {
    background: #fff;
    border: 1px solid #e5edf5;
    border-radius: 12px;
    padding: 24px 22px;
    text-align: center;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.blog-client-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px -18px rgba(0, 43, 92, 0.18);
    border-color: rgba(0, 114, 181, 0.20);
}
.blog-client-card img {
    max-height: 64px;
    max-width: 160px;
    width: auto;
    object-fit: contain;
    margin: 0 auto 14px;
    display: block;
    mix-blend-mode: multiply;
}
.blog-client-card h4 {
    color: #1d3a6e;
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 8px;
}
.blog-client-card p {
    color: #5b6473;
    font-size: 13.5px;
    line-height: 1.5;
    margin: 0;
}
.blog-client-card-secret .blog-client-placeholder {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, #1d3a6e, #4a90c2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}
@media (max-width: 767.98px) {
    .blog-client-logos { grid-template-columns: 1fr; gap: 14px; }
    .blog-client-card { padding: 20px 18px; }
}

/* ===== Stat boxes (for blogs that quote percentages) ===== */
.blog-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin: 28px 0;
}
.blog-stat-box {
    background: #f7fafc;
    border: 1px solid #e5edf5;
    border-radius: 10px;
    padding: 24px 18px;
    text-align: center;
}
.blog-stat-box .num {
    font-size: 32px;
    font-weight: 800;
    color: #1d3a6e;
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}
.blog-stat-box .label {
    font-size: 13px;
    color: #5b6473;
    font-weight: 500;
}
@media (max-width: 575.98px) {
    .blog-stat-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== Metadata strip near hero (case-study horizontal strip) ===== */
.blog-detail-wrap .meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    padding: 18px 24px;
    margin-bottom: 32px;
    background: #f7fafc;
    border: 1px solid #e5edf5;
    border-radius: 10px;
    font-size: 14px;
    color: #1f2937;
}
.blog-detail-wrap .meta-row > span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.blog-detail-wrap .meta-row > span i {
    color: #4a90c2;
}
.blog-detail-wrap .meta-row .author-chip {
    color: #1d3a6e;
}
@media (max-width: 767.98px) {
    .blog-detail-wrap .meta-row {
        gap: 14px;
        padding: 14px 18px;
        font-size: 13px;
    }
}

/* ===== Section number prefix (for h2s like "1. Client Snapshot" style) ===== */
.blog-detail-body h2:nth-of-type(1)::before { content: ""; }

/* ===== CTA refinement (already styled, keep) ===== */

.blog-detail-cta {
    margin-top: 40px;
    padding: 32px;
    background: linear-gradient(135deg, #001E40 0%, #0072B5 100%);
    color: #fff;
    border-radius: 18px;
    text-align: center;
}
.blog-detail-cta h3 { color: #fff; font-weight: 800; margin-bottom: 8px; }
.blog-detail-cta p { color: rgba(255,255,255,0.85); margin-bottom: 18px; }
.blog-detail-cta a {
    display: inline-block;
    padding: 12px 28px;
    background: #fff;
    color: #0072B5 !important;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: transform .2s;
}
.blog-detail-cta a:hover { transform: translateY(-2px); }

/* Related posts */
.related-section {
    background: #fff;
    padding: 50px 0;
    border-top: 1px solid rgba(0, 43, 92, 0.06);
}
.related-section h2 {
    color: #001E40;
    font-weight: 800;
    font-size: 24px;
    margin-bottom: 24px;
    text-align: center;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

/* Responsive */
@media (max-width: 991.98px) {
    .featured-card { grid-template-columns: 1fr; }
    .featured-img { min-height: 280px; }
    .featured-body { padding: 28px 24px; }
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-detail-hero-img { height: 300px; }
}
@media (max-width: 575.98px) {
    .blog-grid { grid-template-columns: 1fr; gap: 16px; }
    .related-grid { grid-template-columns: 1fr; }
    .blog-detail-hero-img { height: 220px; border-radius: 12px; }
    .blog-detail-body { font-size: 16px; }
    .blog-filters-wrap { gap: 6px 8px; }
    .cat-pill { padding: 6px 12px; font-size: 12px; }
}
