/* ============================================================
   Blog — builds on top of base.css + public-layout.css
   ============================================================ */

/* ─── Blog Hero ─────────────────────────────────────────────── */
.blog-hero {
    background: linear-gradient(135deg, #0f172a 0%, #134e4a 60%, #0d9488 100%);
    padding: 120px 20px 72px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.blog-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 40%, rgba(6,182,212,.18) 0%, transparent 60%);
    pointer-events: none;
}
.blog-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 700px;
    margin: 0 auto;
}
.blog-hero-eyebrow {
    display: inline-block;
    background: rgba(13,148,136,.35);
    color: #5eead4;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .6px;
    text-transform: uppercase;
    padding: 5px 16px;
    border-radius: 999px;
    margin-bottom: 18px;
}
.blog-hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    margin-bottom: 14px;
    line-height: 1.15;
}
.blog-hero p {
    font-size: 1.1rem;
    color: rgba(255,255,255,.72);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.65;
}
@media (max-width: 640px) {
    .blog-hero { padding: 100px 20px 56px; }
    .blog-hero h1 { font-size: 1.9rem; }
}

/* ─── Index layout ───────────────────────────────────────────── */
.blog-index-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 20px 80px;
}

/* ─── Featured Post ──────────────────────────────────────────── */
.blog-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 48px;
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s;
    text-decoration: none;
    color: inherit;
}
.blog-featured:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.blog-featured-img {
    min-height: 300px;
    background: linear-gradient(135deg, #0d9488 0%, #06b6d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: rgba(255,255,255,.3);
    overflow: hidden;
}
.blog-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.blog-featured-body {
    padding: 40px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.blog-featured-body h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 12px;
    line-height: 1.25;
}
.blog-featured-body h2 a {
    color: inherit;
    text-decoration: none;
}
.blog-featured-body h2 a:hover { color: var(--primary); }
.blog-featured-body p {
    font-size: .975rem;
    color: var(--muted);
    line-height: 1.65;
    margin-bottom: 22px;
    flex: 1;
}
@media (max-width: 768px) {
    .blog-featured { grid-template-columns: 1fr; }
    .blog-featured-img { min-height: 200px; font-size: 3rem; }
    .blog-featured-body { padding: 28px 22px; }
    .blog-featured-body h2 { font-size: 1.3rem; }
}

/* ─── Section heading ────────────────────────────────────────── */
.blog-section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}
.blog-section-heading h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
}
.blog-section-heading-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ─── Post grid ──────────────────────────────────────────────── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
@media (max-width: 1024px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .blog-grid { grid-template-columns: 1fr; } }

/* ─── Post card ──────────────────────────────────────────────── */
.blog-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.blog-card-img {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    color: rgba(255,255,255,.35);
    flex-shrink: 0;
    overflow: hidden;
}
.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.blog-card-body {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.blog-card-body h3 {
    font-size: 1.0rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.4;
}
.blog-card-body h3 a {
    color: inherit;
    text-decoration: none;
}
.blog-card-body h3 a:hover { color: var(--primary); }
.blog-card-body p {
    font-size: .875rem;
    color: var(--muted);
    line-height: 1.6;
    flex: 1;
    margin-bottom: 16px;
}

/* ─── Blog tag pill ──────────────────────────────────────────── */
.blog-tag {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    padding: 3px 11px;
    border-radius: 999px;
    margin-bottom: 10px;
}
.blog-tag-amber { background: #fef3c7; color: #92400e; }
.blog-tag-blue  { background: #dbeafe; color: #1d4ed8; }
.blog-tag-rose  { background: #ffe4e6; color: #be123c; }

/* ─── Meta line (date + read time) ──────────────────────────── */
.blog-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .8rem;
    color: var(--muted);
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.blog-meta i { font-size: .75rem; }

/* ─── Nudge strip (green — free feature) ────────────────────── */
.blog-nudge-strip {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #bbf7d0;
    border-radius: 16px;
    padding: 28px 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 44px 0;
}
.blog-nudge-strip .nudge-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.blog-nudge-strip .nudge-body { flex: 1; }
.blog-nudge-strip .nudge-body strong {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 3px;
}
.blog-nudge-strip .nudge-body span {
    font-size: .875rem;
    color: var(--muted);
}
.blog-nudge-strip .nudge-cta {
    flex-shrink: 0;
    background: var(--primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 700;
    text-decoration: none;
    transition: all .2s;
    white-space: nowrap;
}
.blog-nudge-strip .nudge-cta:hover { background: var(--primary-dark); transform: translateY(-1px); }
@media (max-width: 640px) {
    .blog-nudge-strip { flex-direction: column; text-align: center; padding: 22px 18px; }
    .blog-nudge-strip .nudge-cta { width: 100%; text-align: center; }
}

/* ─── Nudge strip (amber — paid plan) ───────────────────────── */
.blog-nudge-amber {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #fde68a;
}
.blog-nudge-amber .nudge-icon { background: #f59e0b; }
.blog-nudge-amber .nudge-cta { background: #f59e0b; }
.blog-nudge-amber .nudge-cta:hover { background: #d97706; }

/* ─── Feature cards (shared with welcome page) ───────────────── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.feature-card {
    background: var(--white, #fff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: var(--radius, 12px);
    padding: 28px;
    transition: transform .2s, box-shadow .2s;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 1.4rem;
}
.fi-teal   { background: #ccfbf1; color: #0d9488; }
.fi-blue   { background: #dbeafe; color: #2563eb; }
.fi-amber  { background: #fef3c7; color: #d97706; }
.fi-rose   { background: #ffe4e6; color: #e11d48; }
.fi-purple { background: #ede9fe; color: #7c3aed; }
.fi-green  { background: #d1fae5; color: #059669; }
.feature-card h3 { font-size: 1.05rem; font-weight: 700; color: var(--dark, #111); margin-bottom: 8px; }
.feature-card p  { font-size: .925rem; color: var(--muted, #6b7280); }
@media (max-width: 900px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .features-grid { grid-template-columns: 1fr; } }

/* ─── Mini features grid (between posts) ────────────────────── */
.blog-features-mini {
    background: #f8fafc;
    border-radius: 20px;
    padding: 44px 36px;
    margin: 48px 0;
}
.blog-features-mini .section-header { margin-bottom: 32px; }
.blog-features-mini .section-header h2 { font-size: 1.6rem; }
.blog-features-mini .features-grid { margin-top: 0; }
@media (max-width: 640px) { .blog-features-mini { padding: 28px 18px; } }

/* ─── Article page ───────────────────────────────────────────── */
.blog-article-shell {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 52px;
    align-items: start;
}
@media (max-width: 900px) {
    .blog-article-shell { grid-template-columns: 1fr; gap: 32px; }
}

/* ─── Breadcrumb ─────────────────────────────────────────────── */
.blog-breadcrumb {
    font-size: .84rem;
    color: var(--muted);
    margin-bottom: 20px;
}
.blog-breadcrumb a { color: var(--primary); text-decoration: none; }
.blog-breadcrumb a:hover { text-decoration: underline; }
.blog-breadcrumb .sep { margin: 0 7px; opacity: .5; }

/* ─── Article header ─────────────────────────────────────────── */
.blog-article-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.25;
    margin-bottom: 14px;
}
@media (max-width: 640px) { .blog-article-header h1 { font-size: 1.55rem; } }

/* ─── Article featured image / placeholder ───────────────────── */
.blog-article-cover {
    width: 100%;
    border-radius: 14px;
    margin: 24px 0 32px;
    max-height: 400px;
    object-fit: cover;
}
.blog-article-cover-placeholder {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #0d9488 0%, #06b6d4 100%);
    border-radius: 14px;
    margin: 24px 0 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    color: rgba(255,255,255,.25);
}

/* ─── Article body ───────────────────────────────────────────── */
.blog-article-body {
    font-size: 1.02rem;
    line-height: 1.85;
    color: var(--text);
}
.blog-article-body h2 {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--dark);
    margin: 38px 0 14px;
    line-height: 1.3;
}
.blog-article-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--dark);
    margin: 28px 0 10px;
}
.blog-article-body p { margin-bottom: 20px; }
.blog-article-body ul, .blog-article-body ol {
    margin: 0 0 20px 26px;
}
.blog-article-body li { margin-bottom: 7px; }
.blog-article-body strong { color: var(--dark); font-weight: 700; }
.blog-article-body blockquote {
    border-left: 4px solid var(--primary);
    padding: 14px 20px;
    background: var(--primary-light);
    border-radius: 0 10px 10px 0;
    margin: 28px 0;
    font-style: italic;
    color: var(--primary-dark);
    font-size: .975rem;
}

/* ─── Inline article nudge (inside article content area) ─────── */
.blog-article-nudge {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    padding: 20px 22px;
    margin: 32px 0;
    display: flex;
    gap: 16px;
    align-items: center;
}
.blog-article-nudge .ani-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.blog-article-nudge .ani-body { flex: 1; }
.blog-article-nudge .ani-body strong {
    display: block;
    font-size: .9rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 2px;
}
.blog-article-nudge .ani-body span {
    font-size: .82rem;
    color: var(--muted);
}
.blog-article-nudge a.ani-link {
    font-size: .82rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.blog-article-nudge a.ani-link:hover { text-decoration: underline; }
.blog-article-nudge-amber {
    background: linear-gradient(135deg, #fffbeb 0%, #fef9c3 100%);
    border-color: #fde68a;
}
.blog-article-nudge-amber .ani-icon { background: #f59e0b; }
.blog-article-nudge-amber .ani-body strong { color: #92400e; }
.blog-article-nudge-amber a.ani-link { color: #d97706; }

/* ─── Article end CTA ────────────────────────────────────────── */
.blog-end-cta {
    background: linear-gradient(135deg, #0f172a 0%, #134e4a 60%, #0d9488 100%);
    border-radius: 16px;
    padding: 48px 40px;
    text-align: center;
    color: #fff;
    margin: 48px 0 0;
}
.blog-end-cta h3 {
    font-size: 1.65rem;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.25;
}
.blog-end-cta p {
    font-size: 1rem;
    color: rgba(255,255,255,.76);
    max-width: 440px;
    margin: 0 auto 24px;
    line-height: 1.65;
}
.blog-end-cta-badges {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 18px;
}
.blog-end-cta-badges span {
    font-size: .8rem;
    color: rgba(255,255,255,.55);
    display: flex;
    align-items: center;
    gap: 5px;
}
@media (max-width: 640px) {
    .blog-end-cta { padding: 32px 20px; }
    .blog-end-cta h3 { font-size: 1.3rem; }
}

/* ─── Sidebar ────────────────────────────────────────────────── */
.blog-sidebar {
    position: sticky;
    top: 84px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.blog-sidebar-cta {
    background: linear-gradient(145deg, #0d9488 0%, #0891b2 100%);
    border-radius: 14px;
    padding: 28px 22px;
    color: #fff;
    text-align: center;
}
.blog-sidebar-cta h4 {
    font-size: 1.05rem;
    font-weight: 800;
    margin-bottom: 8px;
    line-height: 1.3;
}
.blog-sidebar-cta p {
    font-size: .85rem;
    color: rgba(255,255,255,.8);
    margin-bottom: 18px;
    line-height: 1.55;
}
.blog-sidebar-cta .sc-btn {
    display: block;
    text-align: center;
    background: #fff;
    color: var(--primary-dark);
    padding: 11px 18px;
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 700;
    text-decoration: none;
    transition: all .2s;
}
.blog-sidebar-cta .sc-btn:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
}
.blog-sidebar-cta .sc-sub {
    font-size: .75rem;
    color: rgba(255,255,255,.55);
    margin-top: 10px;
    display: block;
}

.blog-sidebar-features {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px 20px 12px;
}
.blog-sidebar-features h5 {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--muted);
    margin-bottom: 14px;
}
.bsf-item {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    padding: 9px 0;
    border-bottom: 1px solid var(--border);
}
.bsf-item:last-child { border-bottom: none; }
.bsf-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    flex-shrink: 0;
}
.bsf-item strong {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1px;
}
.bsf-item span { font-size: .78rem; color: var(--muted); }

.blog-sidebar-plan {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-radius: 14px;
    padding: 20px 20px;
}
.blog-sidebar-plan h5 {
    font-size: .925rem;
    font-weight: 800;
    color: #92400e;
    margin-bottom: 6px;
}
.blog-sidebar-plan p {
    font-size: .83rem;
    color: #78350f;
    margin-bottom: 14px;
    line-height: 1.55;
}
.blog-sidebar-plan a {
    display: block;
    text-align: center;
    background: #f59e0b;
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 700;
    text-decoration: none;
    transition: all .2s;
}
.blog-sidebar-plan a:hover { background: #d97706; transform: translateY(-1px); }

/* ─── Pagination override ────────────────────────────────────── */
.blog-pagination { text-align: center; margin-top: 48px; }
.blog-pagination nav { display: inline-block; }

/* ─── Search bar ─────────────────────────────────────────────── */
.blog-search-form { margin-top: 24px; }
.blog-search-wrap {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.4);
    border-radius: 40px;
    padding: 6px 6px 6px 18px;
    max-width: 520px;
    margin: 0 auto;
    backdrop-filter: blur(4px);
}
.blog-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-size: .95rem;
    min-width: 0;
}
.blog-search-input::placeholder { color: rgba(255,255,255,.7); }
.blog-search-btn {
    background: rgba(255,255,255,.25);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    flex-shrink: 0;
}
.blog-search-btn:hover { background: rgba(255,255,255,.45); }
.blog-search-clear {
    color: rgba(255,255,255,.7);
    font-size: .85rem;
    margin: 0 6px;
    text-decoration: none;
    flex-shrink: 0;
    transition: color .15s;
}
.blog-search-clear:hover { color: #fff; }

/* ─── Tag / Topic pills ─────────────────────────────────────── */
.blog-tag-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px;
    margin-top: 18px;
}
.blog-tag-pill {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    background: rgba(255,255,255,.15);
    color: rgba(255,255,255,.85);
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,.3);
    transition: all .18s;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.blog-tag-pill:hover,
.blog-tag-pill.active {
    background: #fff;
    color: var(--primary, #0d9488);
    border-color: #fff;
}
.blog-topic-pill { background: rgba(255,255,255,.1); }
.blog-tag-secondary {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    background: rgba(13,148,136,.1);
    color: var(--primary, #0d9488);
    font-size: .72rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: .2px;
    transition: background .15s;
}
.blog-tag-secondary:hover { background: rgba(13,148,136,.2); color: var(--primary, #0d9488); }
