/* ============================================
   BLOG & ARTICLE STYLES
   ============================================ */

/* ---- Blog Hero ---- */
.blog-hero {
    padding: 140px 0 56px;
    text-align: center;
    background: var(--bg-body);
}

.blog-hero h1 {
    font-size: clamp(30px, 4.5vw, 48px);
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 14px;
}

.blog-hero-sub {
    font-size: 17px;
    color: var(--gray-300);
    max-width: 520px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

/* ---- Filter Buttons ---- */
.blog-filters {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-btn {
    font-family: var(--font);
    font-size: 13px;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--gray-300);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    border-color: var(--gray-400);
    color: var(--white);
}

.filter-btn.active {
    background: var(--teal);
    color: var(--navy-deep);
    border-color: var(--teal);
}

/* ---- Blog Grid ---- */
.blog-grid-section {
    padding: 48px 0 120px;
    background: var(--bg-body);
}

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

/* ---- Blog Card ---- */
.blog-card {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--navy);
    overflow: hidden;
    transition: border-color 0.25s ease, opacity 0.25s ease;
}

.blog-card:hover {
    border-color: var(--border-hover);
}

.blog-card-img {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--navy-light);
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-img img {
    transform: scale(1.03);
}

.blog-img-icon {
    width: 80px !important;
    height: 80px !important;
    object-fit: contain !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) !important;
}

.blog-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-tutorial {
    background: rgba(0, 184, 212, 0.15);
    color: var(--teal);
}

.tag-knowledge {
    background: rgba(66, 133, 244, 0.15);
    color: var(--blue-light);
}

.tag-community {
    background: rgba(52, 211, 153, 0.15);
    color: var(--green);
}

.blog-card-body {
    padding: 20px 22px 24px;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 12px;
    color: var(--gray-400);
}

.blog-meta .blog-author {
    font-weight: 600;
    color: var(--gray-300);
}

.blog-meta .blog-date::before,
.blog-meta .blog-read::before {
    content: '·';
    margin-right: 12px;
    color: var(--gray-500);
}

.blog-card-body h2 {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
}

.blog-card-body h2 a {
    transition: color 0.2s;
}

.blog-card-body h2 a:hover {
    color: var(--teal);
}

.blog-card-body p {
    font-size: 14px;
    color: var(--gray-400);
    line-height: 1.65;
}

/* Active link in nav */
.active-link {
    color: var(--teal) !important;
}

/* ============================================
   ARTICLE PAGE - Full Blog Post
   ============================================ */

/* ---- Article Header ---- */
.article-hero {
    padding: 140px 0 40px;
    background: var(--bg-body);
}

.article-hero .container {
    max-width: 720px;
}

.article-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-400);
    margin-bottom: 28px;
    transition: color 0.2s;
}

.article-back:hover {
    color: var(--teal);
}

.article-hero h1 {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.article-meta-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.article-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-author-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--navy-light);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--teal);
}

.article-author-name {
    font-size: 14px;
    font-weight: 600;
}

.article-author-role {
    font-size: 12px;
    color: var(--gray-400);
}

.article-meta-sep {
    width: 1px;
    height: 20px;
    background: var(--border);
}

.article-meta-item {
    font-size: 13px;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ---- Article Cover Image ---- */
.article-cover {
    background: var(--bg-body);
}

.article-cover .container {
    max-width: 860px;
}

.article-cover img {
    border-radius: var(--radius-lg);
    width: 100%;
    margin: 32px 0;
}

/* ---- Article Body ---- */
.article-body {
    padding: 8px 0 80px;
    background: var(--bg-body);
}

.article-body .container {
    max-width: 720px;
}

/* Prose styling */
.article-body h2 {
    font-size: 24px;
    font-weight: 800;
    margin: 48px 0 16px;
    letter-spacing: -0.02em;
}

.article-body h3 {
    font-size: 19px;
    font-weight: 700;
    margin: 36px 0 12px;
}

.article-body p {
    font-size: 16px;
    color: var(--gray-200);
    line-height: 1.8;
    margin-bottom: 20px;
}

.article-body ul,
.article-body ol {
    padding-left: 24px;
    margin-bottom: 20px;
}

.article-body li {
    font-size: 15px;
    color: var(--gray-200);
    line-height: 1.8;
    margin-bottom: 6px;
}

.article-body a {
    color: var(--teal);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.article-body a:hover {
    color: var(--teal-light);
}

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

.article-body blockquote {
    border-left: 3px solid var(--teal);
    padding: 14px 20px;
    margin: 24px 0;
    background: rgba(0, 184, 212, 0.04);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 15px;
    color: var(--gray-200);
    line-height: 1.75;
}

/* ---- Code Blocks ---- */
.article-body pre {
    background: var(--navy);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    overflow-x: auto;
    margin: 24px 0;
    position: relative;
}

.article-body pre code {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 13px;
    line-height: 1.7;
    color: var(--gray-100);
}

.code-label {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 12px;
    background: var(--navy-light);
    color: var(--gray-400);
    border-radius: 0 var(--radius-md) 0 var(--radius-sm);
}

.article-body code {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 13px;
    background: var(--navy);
    border: 1px solid var(--border);
    padding: 2px 7px;
    border-radius: 5px;
    color: var(--teal-light);
}

.article-body pre code {
    background: none;
    border: none;
    padding: 0;
}

/* ---- Images with Captions ---- */
.article-figure {
    margin: 32px 0;
    text-align: center;
}

.article-figure img {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    max-width: 100%;
}

.article-figure figcaption {
    font-size: 13px;
    color: var(--gray-400);
    margin-top: 10px;
    font-style: italic;
}

/* ---- Sources / References ---- */
.article-sources {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.article-sources h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--gray-300);
}

.article-sources ol {
    padding-left: 20px;
}

.article-sources li {
    font-size: 13px;
    color: var(--gray-400);
    line-height: 1.7;
    margin-bottom: 4px;
}

/* ---- Article Tags / Share ---- */
.article-footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.article-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.article-tag-pill {
    font-size: 12px;
    padding: 5px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    color: var(--gray-300);
    transition: all 0.2s;
}

.article-tag-pill:hover {
    border-color: var(--teal);
    color: var(--teal);
}

.article-share {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--gray-400);
}

.share-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: none;
    color: var(--gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.share-btn:hover {
    border-color: var(--teal);
    color: var(--teal);
}

/* ---- Table of Contents (sidebar callout) ---- */
.article-toc {
    background: var(--navy);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin: 32px 0;
}

.article-toc h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gray-400);
    margin-bottom: 12px;
}

.article-toc ol {
    list-style: none;
    padding: 0;
    counter-reset: toc;
}

.article-toc li {
    counter-increment: toc;
    margin-bottom: 6px;
}

.article-toc li a {
    font-size: 14px;
    color: var(--gray-300);
    text-decoration: none;
    display: flex;
    align-items: baseline;
    gap: 8px;
    transition: color 0.2s;
}

.article-toc li a::before {
    content: counter(toc) ".";
    font-weight: 700;
    color: var(--gray-500);
    font-size: 12px;
    min-width: 18px;
}

.article-toc li a:hover {
    color: var(--teal);
}

/* ---- Info/Tip/Warning Callouts ---- */
.callout {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    margin: 24px 0;
    font-size: 14px;
    line-height: 1.7;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.callout-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.callout-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

.callout-info {
    background: rgba(66, 133, 244, 0.08);
    border: 1px solid rgba(66, 133, 244, 0.15);
    color: var(--blue-light);
}

.callout-tip {
    background: rgba(0, 184, 212, 0.06);
    border: 1px solid rgba(0, 184, 212, 0.15);
    color: var(--teal-light);
}

.callout-warning {
    background: rgba(251, 191, 36, 0.06);
    border: 1px solid rgba(251, 191, 36, 0.15);
    color: var(--yellow);
}

/* ============================================
   ADVANCED MODE PAGE EXTRAS
   ============================================ */

.adv-hero {
    padding: 140px 0 64px;
    text-align: center;
    background: var(--bg-body);
}

.adv-hero h1 {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.adv-hero-subtitle {
    font-size: 17px;
    color: var(--gray-300);
    max-width: 560px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.adv-section {
    padding: var(--section-padding) 0;
    background: var(--bg-body);
}

.adv-section-alt {
    background: var(--bg-section-alt);
}

.adv-image-showcase {
    text-align: center;
}

.adv-image-showcase img {
    max-width: 800px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

/* ============================================
   RESPONSIVE - Blog & Article
   ============================================ */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .article-meta-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .article-meta-sep {
        display: none;
    }

    .article-footer-bar {
        flex-direction: column;
        align-items: flex-start;
    }
}