/* ===================================================================
   Flowboost Blog Styles
   Inherits brand system from main site (flowboost.ca)
   =================================================================== */

:root {
    --flow-blue: #08A7DF;
    --flow-teal: #19BDC6;
    --flow-mint: #31F4D2;
    --flow-dark: #203141;
    --flow-navy: #0F2847;
    --flow-slate: #1E3A5F;
    --flow-gray: #64748B;
    --flow-gray-light: #94A3B8;
    --flow-light: #F8FAFC;
    --flow-white: #FFFFFF;
    --flow-cream: #FAFBFC;
    --flow-border: #E2E8F0;
    --flow-red: #EF4444;
    --flow-red-light: #FEF2F2;
    --gradient-brand: linear-gradient(135deg, var(--flow-blue) 0%, var(--flow-teal) 50%, var(--flow-mint) 100%);
    --gradient-subtle: linear-gradient(180deg, var(--flow-white) 0%, var(--flow-cream) 100%);
    --gradient-dark: linear-gradient(135deg, var(--flow-dark) 0%, var(--flow-navy) 100%);
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--flow-dark);
    line-height: 1.65;
    background: var(--flow-white);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-narrow {
    max-width: 760px;
    margin: 0 auto;
    padding: 0 24px;
}

a { color: var(--flow-blue); }

/* ---------- Navbar ---------- */
#navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--flow-border);
}

#navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-left { display: flex; align-items: center; gap: 28px; }

.nav-left > a:not(.nav-cta) {
    color: var(--flow-slate);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s var(--ease-smooth);
}
.nav-left > a:not(.nav-cta):hover { color: var(--flow-blue); }

.logo { display: flex; align-items: center; }
.logo-img { height: 30px; width: auto; display: block; }

.nav-menu { display: flex; align-items: center; gap: 28px; }
.nav-menu a {
    color: var(--flow-slate);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s var(--ease-smooth);
}
.nav-menu a:hover { color: var(--flow-blue); }

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    background: var(--gradient-brand);
    color: var(--flow-white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 10px;
    transition: transform 0.2s var(--ease-smooth), box-shadow 0.2s var(--ease-smooth);
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(8, 167, 223, 0.4); }

/* ---------- Blog Index Hero ---------- */
.blog-hero {
    background: var(--gradient-subtle);
    padding: 80px 0 56px;
    border-bottom: 1px solid var(--flow-border);
}
.blog-hero .eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--flow-blue);
    margin-bottom: 16px;
}
.blog-hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--flow-navy);
    margin-bottom: 18px;
    max-width: 720px;
}
.blog-hero p {
    font-size: 1.15rem;
    color: var(--flow-gray);
    max-width: 600px;
}

/* ---------- Post Grid ---------- */
.blog-grid-section { padding: 64px 0 96px; }

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 32px;
}

.post-card {
    display: flex;
    flex-direction: column;
    background: var(--flow-white);
    border: 1px solid var(--flow-border);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s var(--ease-smooth), box-shadow 0.25s var(--ease-smooth), border-color 0.25s var(--ease-smooth);
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: transparent;
}

.post-card-thumb {
    height: 168px;
    background: var(--gradient-dark);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.post-card-thumb::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(49, 244, 210, 0.25), transparent 55%),
                radial-gradient(circle at 80% 90%, rgba(8, 167, 223, 0.35), transparent 50%);
}
.post-card-thumb .thumb-tag {
    position: relative;
    z-index: 1;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 7px 14px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

.post-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.post-card-body { padding: 24px 26px 28px; display: flex; flex-direction: column; flex: 1; }

.post-card-meta {
    display: flex;
    gap: 14px;
    align-items: center;
    font-size: 0.82rem;
    color: var(--flow-gray-light);
    margin-bottom: 12px;
}
.post-card-meta .cat {
    color: var(--flow-blue);
    font-weight: 600;
}

.post-card-body h2 {
    font-size: 1.28rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--flow-navy);
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}
.post-card-body p {
    color: var(--flow-gray);
    font-size: 0.96rem;
    flex: 1;
}
.post-card-readmore {
    margin-top: 18px;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--flow-blue);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.coming-soon {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    border: 1px dashed var(--flow-border);
    border-radius: 16px;
    color: var(--flow-gray-light);
    font-size: 0.95rem;
}

/* ---------- Article Page ---------- */
.article-header {
    background: var(--gradient-subtle);
    padding: 56px 0 48px;
    border-bottom: 1px solid var(--flow-border);
}
.breadcrumb {
    font-size: 0.85rem;
    color: var(--flow-gray-light);
    margin-bottom: 24px;
}
.breadcrumb a { color: var(--flow-gray); text-decoration: none; }
.breadcrumb a:hover { color: var(--flow-blue); }

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    font-size: 0.85rem;
    color: var(--flow-gray);
    margin-bottom: 20px;
}
.article-meta .cat {
    background: rgba(8, 167, 223, 0.1);
    color: var(--flow-blue);
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
}

.article-header h1 {
    font-size: clamp(1.9rem, 4.5vw, 2.85rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: var(--flow-navy);
    max-width: 800px;
}

.article-hero-wrap { padding-top: 36px; }
.article-hero-img {
    width: 100%;
    height: auto;
    aspect-ratio: 570 / 269;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    display: block;
}

.article-body { padding: 44px 0 40px; }
.article-body p,
.article-body ul,
.article-body ol { margin-bottom: 22px; font-size: 1.07rem; color: #2c3e50; }

.article-body h2 {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--flow-navy);
    letter-spacing: -0.01em;
    margin: 48px 0 18px;
    line-height: 1.25;
}
.article-body h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--flow-slate);
    margin: 34px 0 14px;
}

.article-body ul, .article-body ol { padding-left: 26px; }
.article-body li { margin-bottom: 10px; }

.article-body strong { color: var(--flow-navy); font-weight: 700; }

.article-body a { color: var(--flow-blue); font-weight: 500; }

.article-body blockquote {
    border-left: 4px solid var(--flow-teal);
    background: var(--flow-light);
    padding: 20px 26px;
    border-radius: 0 12px 12px 0;
    margin: 30px 0;
    font-size: 1.12rem;
    color: var(--flow-slate);
    font-style: italic;
}

.key-callout {
    background: linear-gradient(135deg, rgba(8, 167, 223, 0.06), rgba(49, 244, 210, 0.08));
    border: 1px solid rgba(8, 167, 223, 0.18);
    border-radius: 16px;
    padding: 28px 30px;
    margin: 36px 0;
}
.key-callout h3 { margin-top: 0; color: var(--flow-navy); }
.key-callout p:last-child { margin-bottom: 0; }

/* ---------- In-article CTA ---------- */
.article-cta {
    background: var(--gradient-dark);
    border-radius: 20px;
    padding: 44px 40px;
    margin: 56px 0 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.article-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 10%, rgba(49, 244, 210, 0.18), transparent 50%),
                radial-gradient(circle at 90% 100%, rgba(8, 167, 223, 0.28), transparent 50%);
}
.article-cta > * { position: relative; z-index: 1; }
.article-cta h3 {
    color: var(--flow-white);
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}
.article-cta p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.05rem;
    max-width: 480px;
    margin: 0 auto 26px;
}
.article-cta .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--gradient-brand);
    color: var(--flow-white);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.02rem;
    border-radius: 12px;
    transition: transform 0.2s var(--ease-smooth), box-shadow 0.2s var(--ease-smooth);
}
.article-cta .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(8, 167, 223, 0.45); }

/* ---------- Author / share ---------- */
.article-footer {
    border-top: 1px solid var(--flow-border);
    margin-top: 48px;
    padding-top: 30px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.author-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--gradient-brand);
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 1.1rem;
    flex-shrink: 0;
}
.author-info strong { display: block; color: var(--flow-navy); font-size: 0.98rem; }
.author-info span { color: var(--flow-gray); font-size: 0.88rem; }

/* ---------- Related ---------- */
.related-section { background: var(--flow-light); padding: 56px 0 72px; border-top: 1px solid var(--flow-border); }
.related-section h2 {
    font-size: 1.5rem; font-weight: 700; color: var(--flow-navy); margin-bottom: 28px;
}

/* ---------- Footer ---------- */
.footer-light {
    background: var(--flow-white);
    border-top: 1px solid var(--flow-border);
    padding: 40px 0;
}
.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-logo-img { height: 26px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a {
    color: var(--flow-gray);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--flow-blue); }
.footer-copyright { color: var(--flow-gray-light); font-size: 0.88rem; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .nav-menu { display: none; }
    .post-grid { grid-template-columns: 1fr; }
    .article-cta { padding: 36px 24px; }
    .footer-content { flex-direction: column; text-align: center; }
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s var(--ease-smooth), transform 0.6s var(--ease-smooth); }
.reveal.visible { opacity: 1; transform: translateY(0); }
