/* ============================================
   PIING! BLOG STYLES
   Inter + Sora fonts, modern card-based layout,
   3-column article grid. Brand: purple -> blue gradient.
   ============================================ */

:root {
    --bg-body: #F6F9FC;
    --bg-card: #FFFFFF;
    --text-main: #101828;
    --text-muted: #667085;
    --accent: #1F7ACB;
    --accent-hover: #1A5FA3;
    --accent-2: #835ABA;
    --brand-gradient: linear-gradient(11deg, #835ABA, #1F7ACB);
    --accent-light: #EEF3FE;
    --accent-border: #D5E2FB;
    --hero-bg: #241A3A;
    --border: #E4E9F0;
    --warn-bg: #FFF7ED;
    --warn-border: #FED7AA;
    --warn-text: #9A3412;
    --caution-bg: #FEF2F2;
    --caution-border: #FECACA;
    --caution-text: #991B1B;
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --radius-pill: 50px;
    --shadow-sm: 0 4px 6px -1px rgba(16,24,40,0.06), 0 2px 4px -1px rgba(16,24,40,0.03);
    --shadow-lg: 0 20px 25px -5px rgba(16,24,40,0.08), 0 10px 10px -5px rgba(16,24,40,0.03);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; background: var(--bg-body); color: var(--text-main); line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, .logo, .btn, .nav-link { font-family: 'Sora', sans-serif; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* --- Header --- */
.blog-header {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(228,233,240,0.7);
}
.blog-nav { padding: 12px 0; }
.blog-nav .logoImg { height: 40px; width: auto; }
.blog-nav .nav-link {
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text-muted);
    transition: color 0.3s;
    padding: 8px 14px;
}
.blog-nav .nav-link:hover { color: var(--text-main); }
.blog-nav .lg-btn { font-weight: 700; color: var(--accent) !important; }
.blog-nav .btn-blue-top {
    background: var(--accent);
    color: #fff !important;
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 0.9rem;
    transition: filter 0.3s, transform 0.3s;
    margin-left: 10px;
}
.blog-nav .btn-blue-top:hover { filter: brightness(1.08); transform: translateY(-2px); }

/* --- Blog Homepage --- */
.blog-home-hero {
    text-align: center;
    padding: 60px 5% 40px;
    max-width: 800px;
    margin: 0 auto;
}
.blog-home-hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 14px;
    color: var(--accent);
}
.blog-home-hero p { font-size: 1.1rem; color: var(--text-muted); max-width: 600px; margin: 0 auto; }

.blog-section { max-width: 1280px; margin: 0 auto; padding: 0 5% 60px; }
.blog-section h2 { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 30px; }

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

/* --- Post Card --- */
.post-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.post-card-img { height: 200px; background-size: cover; background-position: center; background-color: #E2E8F0; position: relative; }
.post-card-img .category-tag {
    position: absolute; top: 14px; left: 14px;
    background: var(--accent); color: #fff;
    padding: 5px 14px; border-radius: var(--radius-pill);
    font-size: 0.72rem; font-weight: 700; font-family: 'Sora', sans-serif;
}
.post-card-body { padding: 22px; }
.post-card-meta { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.post-card-body h3 { font-size: 1.08rem; line-height: 1.4; margin-bottom: 10px; font-weight: 700; }
.post-card-body p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 14px; }
.post-card-readmore { color: var(--accent); font-weight: 700; font-size: 0.86rem; display: inline-flex; align-items: center; gap: 6px; }

/* --- Article Page: Header --- */
.breadcrumb-row {
    max-width: 1280px; margin: 0 auto; padding: 28px 5% 0;
    font-size: 0.9rem; color: var(--text-muted); display: flex; gap: 8px; align-items: center;
}
.breadcrumb-row a { color: var(--accent); font-weight: 600; }

.article-header { max-width: 1280px; margin: 0 auto; padding: 20px 5% 0; }
.article-header h1 { font-size: 3rem; font-weight: 800; letter-spacing: -1.2px; line-height: 1.12; max-width: 900px; margin-bottom: 24px; }
.meta-row { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; color: var(--text-muted); font-size: 0.92rem; margin-bottom: 20px; }
.meta-row span { display: inline-flex; align-items: center; gap: 6px; }
.tags { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.tag {
    background: var(--accent-light); color: var(--accent-hover); border: 1px solid var(--accent-border);
    padding: 6px 16px; border-radius: var(--radius-pill); font-size: 0.85rem; font-weight: 700; font-family: 'Sora', sans-serif;
}
.hero-img { width: 100%; height: 420px; object-fit: cover; border-radius: var(--radius-lg); margin-bottom: 8px; }

/* --- Article Page: 3-Column Layout --- */
.article-layout {
    max-width: 1280px; margin: 0 auto; padding: 48px 5% 100px;
    display: grid; grid-template-columns: 220px 1fr 300px; gap: 48px; align-items: start;
}

/* TOC Sidebar */
.toc { position: sticky; top: 100px; }
.toc h4 { font-size: 0.78rem; letter-spacing: 1px; text-transform: uppercase; color: var(--text-muted); margin-bottom: 16px; font-weight: 700; }
.toc-list { list-style: none; border-left: 2px solid var(--border); padding-left: 0; }
.toc-list li a {
    display: block; padding: 8px 0 8px 16px; font-size: 0.88rem; color: var(--text-muted);
    border-left: 2px solid transparent; margin-left: -2px; transition: color 0.2s, border-color 0.2s;
}
.toc-list li a:hover, .toc-list li a.active { color: var(--accent); border-left-color: var(--accent); font-weight: 600; }

/* Article Content */
.content p { color: #344054; font-size: 1.05rem; margin-bottom: 22px; line-height: 1.8; }
.content h2 { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.5px; margin: 48px 0 18px; }
.content h3 { font-size: 1.3rem; font-weight: 700; margin: 28px 0 14px; }
.content strong { color: var(--text-main); }
.content ol, .content ul { margin: 0 0 24px 22px; color: #344054; }
.content ol li, .content ul li { margin-bottom: 14px; font-size: 1.02rem; line-height: 1.75; }

/* Callout boxes */
.callout { border-radius: var(--radius-md); padding: 22px 26px; margin: 28px 0; font-size: 0.98rem; }
.callout-title { font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 0.95rem; }
.callout.important { background: var(--warn-bg); border: 1px solid var(--warn-border); color: var(--warn-text); }
.callout.pro { background: var(--accent-light); border: 1px solid var(--accent-border); color: #101828; }
.callout.pro .callout-title { color: var(--accent-hover); }
.callout.caution { background: var(--caution-bg); border: 1px solid var(--caution-border); color: var(--caution-text); }

/* Quote block */
.quote-block {
    border-left: 3px solid var(--accent); background: var(--bg-card); padding: 24px 28px; margin: 32px 0;
    font-style: italic; color: #344054; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Comparison table */
.compare-table {
    width: 100%; border-collapse: collapse; margin: 24px 0 36px; background: var(--bg-card);
    border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}
.compare-table th { background: var(--hero-bg); color: #fff; text-align: left; padding: 14px 20px; font-family: 'Sora', sans-serif; font-size: 0.9rem; }
.compare-table td { padding: 14px 20px; font-size: 0.95rem; color: #344054; border-bottom: 1px solid var(--border); }
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr:nth-child(even) td { background: var(--bg-body); }

/* Inline images */
.inline-img-wrap { margin: 32px 0; }
.inline-img { width: 100%; height: 320px; object-fit: cover; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.inline-img-caption { font-size: 0.85rem; color: var(--text-muted); text-align: center; margin-top: 10px; font-style: italic; }

/* Right Sidebar */
.sidebar-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 26px; margin-bottom: 24px; box-shadow: var(--shadow-sm); }
.sidebar-card h4 { font-size: 1rem; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.sidebar-card p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 16px; line-height: 1.6; }
.sidebar-btn {
    display: block; text-align: center; background: var(--accent); color: #fff; padding: 12px;
    border-radius: var(--radius-pill); font-weight: 700; font-size: 0.9rem; transition: filter 0.3s;
}
.sidebar-btn:hover { filter: brightness(1.08); color: #fff; }
.related-list a {
    display: block; padding: 10px 0; font-size: 0.92rem; font-weight: 600; color: var(--text-main);
    border-bottom: 1px solid var(--border); transition: color 0.2s;
}
.related-list a:last-child { border-bottom: none; }
.related-list a:hover { color: var(--accent); }

/* More articles section */
.more-section { padding: 40px 5% 100px; max-width: 1280px; margin: 0 auto; }
.more-section h2 { text-align: center; font-size: 2rem; font-weight: 800; margin-bottom: 40px; letter-spacing: -0.5px; }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

/* --- Footer --- */
/* Matches the main site footer: charcoal #303030 background with neutral grey text. */
.blog-footer { background: #303030; padding: 60px 0 36px; color: #cfcfcf; }
.blog-footer .footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; font-weight: 700; }
.blog-footer .footer-col ul { list-style: none; padding: 0; }
.blog-footer .footer-col ul li { margin-bottom: 8px; }
.blog-footer .footer-col ul li a { color: #cfcfcf; font-size: 0.9rem; transition: color 0.2s; }
.blog-footer .footer-col ul li a:hover { color: #fff; }
.blog-footer .app-links { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.blog-footer .social-links { display: flex; gap: 12px; }
.blog-footer .footer-bottom { border-top: 1px solid #4a4a4a; padding-top: 20px; margin-top: 40px; font-size: 0.85rem; }
.blog-footer .footer-bottom a { color: #cfcfcf; margin-right: 16px; }
.blog-footer .footer-bottom a:hover { color: #fff; }
.blog-footer .footer-bottom p { color: #9a9a9a; margin: 0; }

/* --- Responsive --- */
@media (max-width: 1024px) {
    .article-layout { grid-template-columns: 1fr; }
    .toc { display: none; }
    .blog-grid, .more-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .blog-home-hero h1 { font-size: 2rem; }
    .article-header h1 { font-size: 2.1rem; }
    .hero-img { height: 240px; }
    .blog-grid, .more-grid { grid-template-columns: 1fr; }
    .blog-footer .row { text-align: center; }
    .blog-footer .footer-bottom .text-end { text-align: center !important; margin-top: 10px; }
    .blog-footer .app-links, .blog-footer .social-links { align-items: center; justify-content: center; }
}
