/* =============================================================
   REKMATCH BLOG - blog.css
   Applies to /insikter (index) and /insikter/<slug> (post)
   ============================================================= */

/* ── Blog hero ─────────────────────────────────────────────────── */
.blog-hero {
    background-color: var(--var-light-blue-bg);
    padding: 100px 0 80px;
    text-align: center;
}

.blog-hero-inner {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 32px;
    gap: 10px;
}


.blog-hero-subtitle {
    font-size: 17px;
    color: #242424;
    line-height: 1.65;
    padding-top: 30px;
    margin: 0;
}

/* ── Main blog section ─────────────────────────────────────────── */
.blog-main {
    background: #f0f6ff;
    padding: 72px 0 96px;
    min-height: 60vh;
}

.blog-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ── Category filters ──────────────────────────────────────────── */
.blog-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 52px;
}

.filter-pill {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    background: #fff;
    border: 1px solid #dde6f0;
    text-decoration: none;
    transition: all 0.18s ease;
    cursor: pointer;
    white-space: nowrap;
}

.filter-pill:hover {
    border-color: #004AAD;
    color: #004AAD;
    background: #eff6ff;
}

.filter-pill.active {
    background: #004AAD;
    color: #fff;
    border-color: #004AAD;
}

/* ── Section heading ───────────────────────────────────────────── */
.blog-section-heading {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 20px;
}

/* ── Featured post ─────────────────────────────────────────────── */
.blog-featured-section {
    margin-bottom: 64px;
}

.blog-featured-card {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #dde6f0;
    box-shadow: 0 4px 24px rgba(0, 74, 173, 0.07);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.blog-featured-card:hover {
    box-shadow: 0 12px 48px rgba(0, 74, 173, 0.14);
    transform: translateY(-2px);
}

.blog-featured-img {
    min-height: 340px;
    overflow: hidden;
    background: linear-gradient(140deg, #002f7a, #004AAD);
}

.blog-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.blog-featured-card:hover .blog-featured-img img {
    transform: scale(1.04);
}

.blog-featured-body {
    padding: 48px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-featured-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #004AAD;
    margin-bottom: 18px;
}

.blog-featured-title {
    font-size: 27px;
    font-weight: 800;
    color: #0d1b2e;
    line-height: 1.3;
    margin-bottom: 16px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: color 0.15s;
}

.blog-featured-card:hover .blog-featured-title {
    color: #004AAD;
}

.blog-featured-excerpt {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.65;
    margin-bottom: 24px;
}

.blog-featured-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.blog-meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #d1d5db;
    flex-shrink: 0;
}

.blog-featured-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #004AAD;
    text-decoration: none;
    transition: gap 0.18s;
}

.blog-featured-cta:hover {
    gap: 10px;
}

.blog-featured-cta svg {
    width: 16px;
    height: 16px;
}

/* ── Post grid ─────────────────────────────────────────────────── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* ── Post card ─────────────────────────────────────────────────── */
.blog-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #dde6f0;
    box-shadow: 0 2px 10px rgba(0, 74, 173, 0.04);
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.blog-card:hover {
    box-shadow: 0 8px 32px rgba(0, 74, 173, 0.13);
    transform: translateY(-3px);
}

.blog-card-img {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(140deg, #002f7a, #004AAD);
    position: relative;
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-img img {
    transform: scale(1.04);
}

.blog-card-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 47, 122, 0.82);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    backdrop-filter: blur(4px);
}

.blog-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #0d1b2e;
    line-height: 1.4;
    margin-bottom: 10px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: color 0.15s;
}

.blog-card:hover .blog-card-title {
    color: #004AAD;
}

.blog-card-excerpt {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #9ca3af;
    padding-top: 16px;
    border-top: 1px solid #f0f4f8;
    margin-top: auto;
}

.blog-card-meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #d1d5db;
}

.blog-card-read-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
    color: #004AAD;
    margin-top: 12px;
    transition: gap 0.15s;
}

.blog-card-read-link svg {
    width: 14px;
    height: 14px;
}

.blog-card:hover .blog-card-read-link {
    gap: 8px;
}

/* ── Empty state ───────────────────────────────────────────────── */
.blog-empty {
    text-align: center;
    padding: 80px 20px;
}

.blog-empty-icon {
    width: 72px;
    height: 72px;
    background: #e8f0fe;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #004AAD;
}

.blog-empty-title {
    font-size: 17px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.blog-empty-text {
    font-size: 14px;
    color: #9ca3af;
}

/* =============================================================
   BLOG POST PAGE
   ============================================================= */

/* ── Hero image ────────────────────────────────────────────────── */
.post-hero {
    width: 100%;
    max-height: 320px;
    overflow: hidden;
}

.post-hero img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    display: block;
}

/* ── Article section ───────────────────────────────────────────── */
.post-article {
    background: #f0f6ff;
    padding: 60px 0 96px;
}

.post-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 32px;
}

/* ── Breadcrumb ────────────────────────────────────────────────── */
.post-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.post-breadcrumb a {
    color: #004AAD;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.15s;
}

.post-breadcrumb a:hover {
    opacity: 0.75;
}

.post-breadcrumb svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #d1d5db;
}

/* ── Category badge ────────────────────────────────────────────── */
.post-category-badge {
    display: inline-block;
    background: #dbeafe;
    color: #004AAD;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* ── Meta row ──────────────────────────────────────────────────── */
.post-meta-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #9ca3af;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.post-meta-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #d1d5db;
    flex-shrink: 0;
}

/* ── Title ─────────────────────────────────────────────────────── */
.post-title {
    font-size: 40px;
    font-weight: 800;
    color: #0d1b2e;
    line-height: 1.2;
    margin-bottom: 28px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* ── Excerpt box ───────────────────────────────────────────────── */
.post-excerpt-box {
    padding: 16px 22px;
    background: #fff;
    border-radius: 0 10px 10px 0;
    margin-bottom: 32px;
    box-shadow: 0 1px 4px rgba(0, 74, 173, 0.06);
}

.post-excerpt-box p {
    font-size: 17px;
    color: #374151;
    line-height: 1.65;
    font-style: italic;
    margin: 0;
}

/* ── Divider ───────────────────────────────────────────────────── */
.post-divider {
    height: 1px;
    background: #e2e8f0;
    margin-bottom: 36px;
}

/* ── Article prose ─────────────────────────────────────────────── */
.post-prose {
    font-size: 16.5px;
    color: #374151;
    line-height: 1.8;
}

.post-prose h2 {
    font-size: 26px;
    font-weight: 700;
    color: #0d1b2e;
    margin: 44px 0 16px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.3;
}

.post-prose h3 {
    font-size: 20px;
    font-weight: 700;
    color: #1a2332;
    margin: 34px 0 12px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.post-prose p {
    margin-bottom: 22px;
}

.post-prose a {
    color: #004AAD;
    text-decoration: underline;
    text-decoration-color: rgba(0, 74, 173, 0.35);
    text-underline-offset: 3px;
    transition: text-decoration-color 0.15s;
}

.post-prose a:hover {
    text-decoration-color: #004AAD;
}

.post-prose strong {
    color: #1a2332;
    font-weight: 700;
}

.post-prose ul,
.post-prose ol {
    margin: 0 0 22px 28px;
}

.post-prose li {
    margin-bottom: 8px;
    line-height: 1.7;
}

.post-prose blockquote {
    margin: 36px 0;
    padding: 18px 24px;
    background: #eff6ff;
    border-radius: 0 10px 10px 0;
    font-style: italic;
    color: #374151;
}

.post-prose img {
    max-width: 100%;
    border-radius: 12px;
    margin: 28px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.post-prose hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 40px 0;
}

/* ── Share ─────────────────────────────────────────────────────── */
.post-share {
    margin-top: 52px;
    padding-top: 32px;
    border-top: 1px solid #e2e8f0;
}

.post-share-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 16px;
}

.post-share-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.post-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    border: none;
    font-family: inherit;
}

.post-share-li {
    background: #0a66c2;
    color: #fff;
}

.post-share-li:hover {
    background: #004AAD;
}

.post-share-copy {
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.post-share-copy:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

/* ── Footer nav ────────────────────────────────────────────────── */
.post-footer-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 44px;
    flex-wrap: wrap;
    gap: 16px;
}

.post-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #004AAD;
    text-decoration: none;
    transition: gap 0.15s;
}

.post-back-link:hover {
    gap: 10px;
}

.post-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #004AAD;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.18s;
}

.post-contact-btn:hover {
    background: #003080;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 74, 173, 0.28);
}

/* ── Related articles ──────────────────────────────────────────── */
.related-section {
    background: #fff;
    padding: 64px 0;
    border-top: 1px solid #e2e8f0;
}

.related-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 40px;
}

.related-title {
    font-size: 20px;
    font-weight: 800;
    color: #0d1b2e;
    margin-bottom: 32px;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.related-card {
    text-decoration: none;
    display: block;
    transition: transform 0.2s ease;
}

.related-card:hover {
    transform: translateY(-3px);
}

.related-card-img {
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(140deg, #002f7a, #004AAD);
    margin-bottom: 14px;
}

.related-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.related-card:hover .related-card-img img {
    transform: scale(1.04);
}

.related-card-title {
    font-size: 15px;
    font-weight: 700;
    color: #0d1b2e;
    line-height: 1.45;
    margin-bottom: 6px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: color 0.15s;
}

.related-card:hover .related-card-title {
    color: #004AAD;
}

.related-card-meta {
    font-size: 12px;
    color: #9ca3af;
}

/* ── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .blog-featured-card {
        grid-template-columns: 1fr;
    }

    .blog-featured-img {
        min-height: 260px;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .blog-hero {
        padding: 80px 0 60px;
    }

    .blog-hero h1 {
        font-size: 30px;
    }

    .blog-hero-subtitle {
        font-size: 15px;
    }

    .blog-main {
        padding: 48px 0 64px;
    }

    .blog-container {
        padding: 0 20px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-featured-body {
        padding: 28px 24px;
    }

    .blog-featured-title {
        font-size: 21px;
    }

    .post-title {
        font-size: 28px;
    }

    .post-inner {
        padding: 0 20px;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .related-inner {
        padding: 0 20px;
    }

    .post-footer-nav {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =============================================================
   TABLE EMBED (inserted via Quill editor)
   ============================================================= */
.post-prose .ql-table-wrapper {
    overflow-x: auto;
    margin: 1.75em 0;
    border-radius: 10px;
    border: 1px solid #e8edf4;
    -webkit-overflow-scrolling: touch;
}

.post-prose .ql-table-wrapper table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    line-height: 1.5;
}

.post-prose .ql-table-wrapper th,
.post-prose .ql-table-wrapper td {
    border: 1px solid #e2e8f0;
    padding: 11px 16px;
    text-align: left;
}

.post-prose .ql-table-wrapper th {
    background: #f8fafc;
    font-weight: 700;
    color: #1a2332;
    font-size: 13px;
    letter-spacing: 0.02em;
}

.post-prose .ql-table-wrapper tr:nth-child(even) td {
    background: #fafbfc;
}

@media (max-width: 640px) {
    .post-prose .ql-table-wrapper th,
    .post-prose .ql-table-wrapper td { padding: 9px 12px; font-size: 13px; }
}

/* =============================================================
   TABLE OF CONTENTS
   ============================================================= */
.post-toc {
    background: #f8fafc;
    border: 1px solid #e8edf4;
    border-radius: 0 10px 10px 0;
    margin-bottom: 36px;
    overflow: hidden;
}

.post-toc-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    padding: 16px 20px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #1a2332;
    text-align: left;
    font-family: 'Plus Jakarta Sans', 'Open Sans', sans-serif;
}

.post-toc-toggle:hover { background: #eff6ff; }

.post-toc-toggle svg:first-child { color: #004AAD; flex-shrink: 0; }

.post-toc-toggle span { flex: 1; }

.post-toc-chevron {
    color: #9ca3af;
    transition: transform 0.2s ease;
}

.post-toc-list {
    list-style: none;
    margin: 0;
    padding: 0 20px 16px;
    counter-reset: toc-counter;
}

.post-toc-item {
    counter-increment: toc-counter;
    position: relative;
}

.post-toc-item + .post-toc-item { margin-top: 2px; }

.post-toc-link {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 7px 10px 7px 0;
    font-size: 14px;
    color: #374151;
    text-decoration: none;
    border-radius: 6px;
    transition: color 0.15s;
    line-height: 1.4;
}

.post-toc-link::before {
    content: counter(toc-counter, decimal-leading-zero);
    font-size: 11px;
    font-weight: 700;
    color: #9ca3af;
    min-width: 22px;
    flex-shrink: 0;
}

.post-toc-link:hover,
.post-toc-link.is-active {
    color: #004AAD;
}

.post-toc-link.is-active::before { color: #004AAD; }

/* Sub-headings (h3) */
.post-toc-sub .post-toc-link {
    padding-left: 14px;
    font-size: 13px;
    color: #6b7280;
}

.post-toc-sub .post-toc-link::before { content: none; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
    .post-toc-toggle { padding: 14px 16px; }
    .post-toc-list   { padding: 0 16px 14px; }
    .post-toc-link   { font-size: 13px; }
}
