/* ================================
   EXTREMIS — Blog Styles
   blog.css — imported on blog pages
   ================================ */

/* ── Shared blog utilities ── */

.blog-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-img-1 { background: linear-gradient(135deg, #1a237e 0%, #283593 100%); }
.blog-img-2 { background: linear-gradient(135deg, #0d47a1 0%, #1565c0 100%); }
.blog-img-3 { background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%); }
.blog-img-4 { background: linear-gradient(135deg, #4a148c 0%, #6a1b9a 100%); }
.blog-img-5 { background: linear-gradient(135deg, #b71c1c 0%, #c62828 100%); }

.blog-post-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.blog-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: background 0.18s;
}

.blog-tag:hover { background: rgba(99, 102, 241, 0.2); }

.blog-date,
.blog-read-time {
    font-size: 13px;
    color: var(--gray-400, #a1a1aa);
}

.blog-date::before { content: ''; }

/* ── nav active state ── */
.nav-link.active {
    color: var(--primary, #6366f1) !important;
}

/* ════════════════════════════════
   BLOG LISTING PAGE
════════════════════════════════ */

/* Header */
.blog-header {
    padding: 100px 0 48px;
    border-bottom: 1px solid var(--border, #e4e4e7);
    text-align: center;
}

.blog-header .section-label {
    margin-bottom: 16px;
    display: inline-block;
}

.blog-header-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    color: var(--gray-900, #18181b);
    margin-bottom: 14px;
    line-height: 1.2;
}

.blog-header-desc {
    font-size: 17px;
    color: var(--gray-500, #71717a);
    max-width: 520px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

/* Category filters */
.blog-filters {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.blog-filter {
    padding: 7px 18px;
    border-radius: 20px;
    border: 1.5px solid var(--border, #e4e4e7);
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600, #52525b);
    cursor: pointer;
    transition: all 0.18s;
    font-family: inherit;
}

.blog-filter:hover {
    border-color: #6366f1;
    color: #6366f1;
}

.blog-filter.active {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

/* Featured post */
.blog-featured {
    padding: 56px 0 0;
}

.blog-featured-card {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 0;
    border-radius: 20px;
    overflow: hidden;
    border: 1.5px solid var(--border, #e4e4e7);
    text-decoration: none;
    background: var(--surface, #fff);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.blog-featured-image {
    position: relative;
    min-height: 320px;
}

.blog-featured-image .blog-img-placeholder {
    position: absolute;
    inset: 0;
}

.blog-featured-label {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #6366f1;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.blog-featured-body {
    padding: 40px 40px 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}

.blog-featured-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900, #18181b);
    line-height: 1.35;
    margin: 0;
}

.blog-featured-excerpt {
    font-size: 15px;
    color: var(--gray-500, #71717a);
    line-height: 1.7;
    margin: 0;
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #6366f1;
    margin-top: 6px;
    transition: gap 0.18s;
}

.blog-featured-card:hover .blog-read-more { gap: 10px; }

/* Blog grid */
.blog-grid-section {
    padding: 48px 0 64px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.blog-card {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    border: 1.5px solid var(--border, #e4e4e7);
    overflow: hidden;
    text-decoration: none;
    background: var(--surface, #fff);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.09);
}

.blog-card-image {
    position: relative;
    height: 160px;
    overflow: hidden;
}

.blog-card-image .blog-img-placeholder {
    position: absolute;
    inset: 0;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-image .blog-img-placeholder {
    transform: scale(1.04);
}

.blog-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.blog-card-body h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900, #18181b);
    line-height: 1.4;
    margin: 0;
}

.blog-card-body p {
    font-size: 14px;
    color: var(--gray-500, #71717a);
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

/* Load more */
.blog-load-more {
    text-align: center;
    margin-top: 48px;
}

/* Newsletter */
.blog-newsletter {
    background: var(--gray-50, #fafafa);
    border-top: 1px solid var(--border, #e4e4e7);
    padding: 56px 0;
}

.blog-newsletter-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.blog-newsletter-text h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900, #18181b);
    margin-bottom: 6px;
}

.blog-newsletter-text p {
    font-size: 15px;
    color: var(--gray-500, #71717a);
}

.blog-newsletter-form {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.blog-nl-input {
    width: 260px;
    padding: 11px 16px;
    border: 1.5px solid var(--border, #e4e4e7);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.18s;
}

.blog-nl-input:focus { border-color: #6366f1; }


/* ════════════════════════════════
   BLOG POST PAGE
════════════════════════════════ */

.post-article {
    padding-bottom: 0;
}

/* Post header */
.post-header {
    padding-top: 120px;
    padding-bottom: 0;
}

.post-header-inner {
    max-width: 760px;
    margin: 0 auto;
    padding-bottom: 36px;
}

/* Breadcrumb */
.post-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 24px;
    font-size: 13px;
    word-break: break-word;
}

.post-breadcrumb a {
    color: var(--gray-500, #71717a);
    text-decoration: none;
    transition: color 0.15s;
}

.post-breadcrumb a:hover { color: #6366f1; }

.post-breadcrumb span { color: var(--gray-400, #a1a1aa); }

.post-breadcrumb svg { color: var(--gray-300, #d4d4d8); }

/* Post meta */
.post-header .blog-post-meta {
    margin-bottom: 20px;
}

/* Post title */
.post-title {
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 700;
    color: var(--gray-900, #18181b);
    line-height: 1.22;
    margin-bottom: 18px;
    letter-spacing: -0.02em;
}

.post-subtitle {
    font-size: 18px;
    color: var(--gray-500, #71717a);
    line-height: 1.65;
    margin-bottom: 28px;
}

/* Author row */
.post-author-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.post-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.post-author-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800, #27272a);
}

.post-author-role {
    font-size: 12px;
    color: var(--gray-400, #a1a1aa);
}

/* Hero image */
.post-hero-image {
    width: 100%;
    height: 420px;
    overflow: hidden;
    margin-top: 36px;
}

.post-hero-bg {
    width: 100%;
    height: 100%;
}

.post-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Post body layout — content + sticky TOC */
.post-body-wrap {
    padding: 56px 0;
}

.post-body {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 56px;
    align-items: start;
    max-width: 1100px;
}

/* Table of contents */
.post-toc {
    position: sticky;
    top: 90px;
    order: 2;
}

.post-toc-inner {
    background: var(--gray-50, #fafafa);
    border: 1.5px solid var(--border, #e4e4e7);
    border-radius: 12px;
    padding: 20px;
}

.post-toc-inner h4 {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-400, #a1a1aa);
    margin-bottom: 14px;
}

.post-toc-inner ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.post-toc-inner ul li a {
    font-size: 13px;
    color: var(--gray-600, #52525b);
    text-decoration: none;
    line-height: 1.4;
    display: block;
    transition: color 0.15s;
    padding-left: 10px;
    border-left: 2px solid transparent;
}

.post-toc-inner ul li a:hover {
    color: #6366f1;
    border-left-color: #6366f1;
}

/* Post content typography */
.post-content {
    order: 1;
    min-width: 0;
}

.post-lead {
    font-size: 18px;
    color: var(--gray-700, #3f3f46);
    line-height: 1.75;
    margin-bottom: 32px;
    font-weight: 400;
}

.post-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900, #18181b);
    margin: 40px 0 16px;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.post-content h3 {
    font-size: 19px;
    font-weight: 600;
    color: var(--gray-800, #27272a);
    margin: 28px 0 12px;
    line-height: 1.35;
}

.post-content p {
    font-size: 16px;
    color: var(--gray-600, #52525b);
    line-height: 1.8;
    margin-bottom: 20px;
}

.post-content strong {
    color: var(--gray-800, #27272a);
    font-weight: 600;
}

.post-content a {
    color: #6366f1;
    text-decoration: underline;
    text-decoration-color: rgba(99,102,241,0.3);
    transition: text-decoration-color 0.15s;
}

.post-content a:hover {
    text-decoration-color: #6366f1;
}

/* Blockquote */
.post-content blockquote {
    border-left: 3px solid #6366f1;
    padding: 16px 20px;
    margin: 28px 0;
    background: rgba(99,102,241,0.05);
    border-radius: 0 8px 8px 0;
}

.post-content blockquote p {
    font-size: 17px;
    font-style: italic;
    color: var(--gray-700, #3f3f46);
    margin-bottom: 8px;
    line-height: 1.65;
}

.post-content blockquote cite {
    font-size: 13px;
    color: var(--gray-400, #a1a1aa);
    font-style: normal;
}

/* Lists */
.post-list {
    padding-left: 24px;
    margin: 20px 0 28px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.post-list li {
    font-size: 16px;
    color: var(--gray-600, #52525b);
    line-height: 1.7;
    padding-left: 6px;
}

/* Callout box */
.post-callout {
    display: flex;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 10px;
    margin: 28px 0;
    font-size: 15px;
    line-height: 1.65;
}

.post-callout-tip {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.post-callout-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.post-callout-icon {
    flex-shrink: 0;
    margin-top: 2px;
}

/* Stat grid */
.post-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 28px 0 32px;
}

.post-stat {
    background: var(--gray-50, #fafafa);
    border: 1.5px solid var(--border, #e4e4e7);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.post-stat-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: #6366f1;
    line-height: 1;
    margin-bottom: 6px;
}

.post-stat-label {
    font-size: 13px;
    color: var(--gray-500, #71717a);
    line-height: 1.4;
}

/* CTA box */
.post-cta-box {
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    border: 1.5px solid #c7d2fe;
    border-radius: 16px;
    padding: 32px;
    margin: 40px 0 12px;
    text-align: center;
}

.post-cta-box h4 {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900, #18181b);
    margin-bottom: 8px;
}

.post-cta-box p {
    font-size: 15px;
    color: var(--gray-500, #71717a);
    margin-bottom: 20px !important;
}

.post-cta-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Post footer */
.post-footer-wrap {
    border-top: 1px solid var(--border, #e4e4e7);
    padding: 24px 0;
}

.post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    max-width: 1100px;
}

.post-tags,
.post-share {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--gray-400, #a1a1aa);
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1.5px solid var(--border, #e4e4e7);
    color: var(--gray-600, #52525b);
    text-decoration: none;
    transition: all 0.18s;
}

.share-btn:hover {
    border-color: #6366f1;
    color: #6366f1;
    background: rgba(99,102,241,0.06);
}

/* Related posts */
.related-posts {
    background: var(--gray-50, #fafafa);
    border-top: 1px solid var(--border, #e4e4e7);
    padding: 56px 0 64px;
}

.related-posts-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900, #18181b);
    margin-bottom: 32px;
}

.related-grid {
    grid-template-columns: repeat(3, 1fr) !important;
}


/* ════════════════════════════════
   RESPONSIVE
════════════════════════════════ */

@media (max-width: 1024px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
    .related-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .post-body { grid-template-columns: 1fr; }
    .post-toc { display: none; }
    .post-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .blog-featured-card { grid-template-columns: 1fr; }
    .blog-featured-image { min-height: 200px; }
    .blog-featured-body { padding: 24px; }
    .blog-newsletter-inner { flex-direction: column; align-items: flex-start; }
    .blog-newsletter-form { width: 100%; }
    .blog-nl-input { flex: 1; width: auto; }
    .post-hero-image { height: 240px; }
    .post-stats { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .blog-grid { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr !important; }
    .blog-featured-title { font-size: 18px; }
    .post-title { font-size: 24px; }
    .post-subtitle { font-size: 16px; }
    .post-cta-btns { flex-direction: column; }
}