/* ══════════════════════════════════════
   ProSuite AI Blog - Dark Trading Theme
   ══════════════════════════════════════ */

:root {
    --bg: #000000;
    --bg-1: #0a0a0a;
    --bg-2: #111111;
    --bg-3: #1a1a1a;
    --border: #222222;
    --border-2: #333333;
    --gold: #f8cf29;
    --orange: #ff6b00;
    --cyan: #00d4ff;
    --green: #22c55e;
    --red: #ef4444;
    --text: #ffffff;
    --text-2: #b0b0b0;
    --text-3: #666666;
    --font: 'Inter', sans-serif;
    --font-h: 'Space Grotesk', sans-serif;
    --font-m: 'JetBrains Mono', monospace;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --shadow: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 30px rgba(248, 207, 41, 0.1);
    --max-w: 1200px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--cyan); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--gold); }

img { max-width: 100%; height: auto; }

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

.text-gradient {
    background: linear-gradient(135deg, var(--gold), var(--orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ══ Reading Progress Bar ══ */

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--orange));
    z-index: 1000;
    width: 0;
    transition: width 0.1s linear;
}

/* ══ Header ══ */

.blog-header {
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(12px);
    z-index: 100;
}

.blog-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.blog-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-family: var(--font-h);
    font-weight: 700;
    font-size: 18px;
}

.blog-logo:hover { color: var(--text); }
.blog-logo img { height: 32px; width: auto; }

.blog-logo span {
    background: linear-gradient(135deg, var(--gold), var(--orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.blog-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.blog-nav a {
    color: var(--text-2);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.15s;
}

.blog-nav a:hover { color: var(--text); }
.blog-nav a.active { color: var(--gold); }

/* ══ Hero ══ */

.blog-hero {
    padding: 60px 0 40px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    background: radial-gradient(ellipse at center top, rgba(248,207,41,0.03) 0%, transparent 60%);
}

.hero-title {
    font-family: var(--font-h);
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
}

.hero-desc {
    font-size: 18px;
    color: var(--text-2);
    max-width: 600px;
    margin: 0 auto;
}

/* ══ Lives YouTube Heading ══ */

.lives-heading {
    font-family: var(--font-h);
    font-size: 24px;
    font-weight: 700;
    margin-top: 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ══ Categories Bar ══ */

.categories-bar {
    display: flex;
    gap: 8px;
    padding: 24px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.categories-bar::-webkit-scrollbar { display: none; }

.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.15s;
}

.cat-pill:hover { border-color: var(--border-2); color: var(--text); }

.cat-pill.active {
    background: var(--gold);
    color: #000;
    border-color: var(--gold);
    font-weight: 600;
}

.cat-pill .cat-count {
    font-size: 11px;
    opacity: 0.7;
    font-family: var(--font-m);
}

.category-header {
    padding: 24px 0 0;
}

.category-header .back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-3);
    font-size: 13px;
    margin-bottom: 12px;
}

.category-header h1 {
    font-family: var(--font-h);
    font-size: 28px;
}

.category-header p {
    color: var(--text-2);
    margin-top: 8px;
}

/* ══ Posts Grid ══ */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding-bottom: 40px;
}

.post-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all 0.25s ease;
}

.post-card:hover {
    border-color: var(--border-2);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.post-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.post-card-link:hover { color: inherit; }

/* Featured card - full width */
.post-card.featured {
    grid-column: 1 / -1;
}

.post-card.featured .post-card-link {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.post-card.featured .post-thumb { min-height: 300px; }
.post-card.featured .post-title { font-size: 26px; }
.post-card.featured .post-excerpt { font-size: 15px; -webkit-line-clamp: 4; }

.post-thumb {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-1);
}

.post-thumb-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
    font-size: 32px;
    background: linear-gradient(135deg, var(--bg-1), var(--bg-2));
}

.post-body {
    padding: 20px;
}

.post-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gold);
    margin-bottom: 8px;
}

.post-title {
    font-family: var(--font-h);
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
    color: var(--text);
}

.post-card:hover .post-title { color: var(--gold); }

.post-excerpt {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-3);
}

.meta-sep { opacity: 0.4; }

/* ══ Empty state ══ */

.empty-blog {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-3);
}

.empty-blog i { font-size: 48px; opacity: 0.3; margin-bottom: 16px; display: block; }
.empty-blog h2 { font-family: var(--font-h); font-size: 24px; color: var(--text); margin-bottom: 8px; }

/* ══ Pagination ══ */

.blog-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 0 60px;
}

.page-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-2);
    font-size: 14px;
    transition: all 0.15s;
}

.page-link:hover { border-color: var(--gold); color: var(--gold); }

.page-numbers { display: flex; gap: 6px; }

.page-num {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-2);
    font-size: 14px;
    font-family: var(--font-m);
    transition: all 0.15s;
}

.page-num:hover { border-color: var(--border-2); color: var(--text); }
.page-num.active { background: var(--gold); color: #000; border-color: var(--gold); font-weight: 600; }

/* ══════════════════════════════════════
   Article Page
   ══════════════════════════════════════ */

.article-hero {
    padding: 40px 0;
    position: relative;
    overflow: hidden;
}

.article-hero.has-image {
    padding: 80px 0;
    min-height: 360px;
    display: flex;
    align-items: flex-end;
}

.article-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.3);
}

.article-hero .container { position: relative; z-index: 2; }

/* Breadcrumbs */
.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.breadcrumbs a { color: var(--text-2); }
.breadcrumbs a:hover { color: var(--gold); }
.bc-sep { color: var(--text-3); font-size: 9px; }
.bc-current { color: var(--text-3); }

.article-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(248,207,41,0.1);
    border: 1px solid rgba(248,207,41,0.2);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gold);
    margin-bottom: 16px;
}

.article-title {
    font-family: var(--font-h);
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    max-width: 800px;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-2);
    flex-wrap: wrap;
}

.article-meta i { opacity: 0.6; }

/* ── Article Content ── */

.article-container {
    max-width: 800px;
    padding-top: 40px;
    padding-bottom: 60px;
}

/* TOC */
.article-toc {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 32px;
}

.article-toc h3 {
    font-family: var(--font-h);
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-2);
}

.article-toc ul {
    list-style: none;
}

.article-toc li {
    margin: 6px 0;
}

.article-toc a {
    color: var(--text-2);
    font-size: 14px;
}

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

.toc-level-3 { padding-left: 16px; }
.toc-level-4 { padding-left: 32px; }

/* Content blocks */
.article-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-2);
}

.article-content > * { margin-bottom: 24px; }
.article-content > *:last-child { margin-bottom: 0; }

.article-content p {
    font-size: 17px;
    line-height: 1.8;
}

.article-content h2 {
    font-family: var(--font-h);
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-top: 48px;
    margin-bottom: 16px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.article-content h3 {
    font-family: var(--font-h);
    font-size: 22px;
    font-weight: 600;
    color: var(--text);
    margin-top: 36px;
    margin-bottom: 12px;
}

.article-content h4 {
    font-family: var(--font-h);
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-top: 28px;
    margin-bottom: 8px;
}

.article-content a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
.article-content a:hover { color: var(--orange); }

.article-content strong { color: var(--text); font-weight: 600; }

.article-content mark {
    background: rgba(248,207,41,0.2);
    color: var(--text);
    padding: 1px 4px;
    border-radius: 3px;
}

.article-content code {
    background: var(--bg-3);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-m);
    font-size: 0.9em;
    color: var(--green);
}

/* Image */
.article-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 32px 0;
}

.article-image img {
    width: 100%;
    display: block;
}

.article-image.stretched { margin-left: -60px; margin-right: -60px; width: calc(100% + 120px); max-width: none; }
.article-image.with-border { border: 1px solid var(--border); }
.article-image.with-bg { padding: 16px; background: var(--bg-1); }

.article-image figcaption {
    padding: 10px 0;
    font-size: 13px;
    color: var(--text-3);
    text-align: center;
    font-style: italic;
}

/* List */
.article-list {
    padding-left: 24px;
}

.article-list li {
    margin: 8px 0;
    padding-left: 4px;
}

.article-list li::marker { color: var(--gold); }

/* Quote */
.article-quote {
    border-left: 3px solid var(--gold);
    padding: 16px 20px;
    margin: 28px 0;
    background: rgba(248,207,41,0.03);
    border-radius: 0 var(--radius) var(--radius) 0;
}

.article-quote p {
    font-size: 18px;
    font-style: italic;
    color: var(--text);
}

.article-quote cite {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-3);
    font-style: normal;
}

/* Delimiter */
.article-delimiter {
    border: none;
    text-align: center;
    margin: 40px 0;
}

.article-delimiter::before {
    content: '⬥ ⬥ ⬥';
    color: var(--gold);
    letter-spacing: 12px;
    font-size: 12px;
}

/* Code block */
.article-code {
    background: var(--bg-1);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    overflow-x: auto;
    margin: 24px 0;
}

.article-code code {
    background: none;
    padding: 0;
    color: var(--green);
    font-size: 14px;
    line-height: 1.6;
}

/* Table */
.table-wrapper { overflow-x: auto; margin: 24px 0; }

.article-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.article-table th, .article-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.article-table th {
    background: var(--bg-1);
    font-weight: 600;
    color: var(--gold);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Embed */
.article-embed {
    margin: 32px 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-1);
}

.article-embed iframe {
    width: 100%;
    aspect-ratio: 16/9;
    display: block;
}

.embed-caption {
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-3);
    text-align: center;
}

/* Warning */
.article-warning {
    background: rgba(248,207,41,0.05);
    border: 1px solid rgba(248,207,41,0.15);
    border-left: 3px solid var(--gold);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 16px 20px;
    margin: 24px 0;
}

.article-warning strong {
    font-family: var(--font-h);
    color: var(--gold);
    display: block;
    margin-bottom: 4px;
}

.article-warning p { font-size: 15px; margin: 0; }

/* Attachment */
.article-attach {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 18px;
    margin: 16px 0;
    transition: border-color 0.15s;
    color: var(--text);
    text-decoration: none;
}

.article-attach:hover { border-color: var(--gold); color: var(--text); }

.attach-icon {
    background: var(--bg-3);
    border-radius: 6px;
    padding: 8px 12px;
    font-family: var(--font-m);
    font-size: 11px;
    font-weight: 700;
    color: var(--gold);
}

.attach-info { flex: 1; }
.attach-name { display: block; font-weight: 500; font-size: 14px; }
.attach-size { font-size: 12px; color: var(--text-3); font-family: var(--font-m); }
.attach-dl { color: var(--text-3); font-size: 16px; }
.article-attach:hover .attach-dl { color: var(--gold); }

/* Audio */
.article-audio {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin: 16px 0;
}

.article-audio audio { width: 100%; }
.audio-caption { font-size: 13px; color: var(--text-3); margin-top: 8px; }

/* CTA block (inline) */
.article-cta { text-align: center; margin: 32px 0; }

.article-cta a {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    color: #000;
    font-family: var(--font-h);
    font-weight: 700;
    font-size: 16px;
    border-radius: var(--radius);
    text-decoration: none;
    transition: opacity 0.15s;
}

.article-cta a:hover { opacity: 0.9; color: #000; }

/* ── Post CTA box ── */

.article-cta-box {
    text-align: center;
    padding: 40px 24px;
    margin: 40px 0;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(248,207,41,0.03), rgba(255,107,0,0.03));
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 36px;
    background: linear-gradient(135deg, var(--gold), var(--orange));
    color: #000;
    font-family: var(--font-h);
    font-weight: 700;
    font-size: 18px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 20px rgba(248,207,41,0.2);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(248,207,41,0.3);
    color: #000;
}

/* ── Share ── */

.article-share {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

.article-share span { color: var(--text-3); font-size: 14px; }

.article-share a, .share-copy {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: 50%;
    color: var(--text-2);
    font-size: 16px;
    transition: all 0.15s;
    cursor: pointer;
}

.article-share a:hover, .share-copy:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(248,207,41,0.05);
}

/* ══ Related Posts ══ */

.related-section {
    padding: 60px 0;
    border-top: 1px solid var(--border);
    background: var(--bg-1);
}

.related-section h2 {
    font-family: var(--font-h);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 24px;
}

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

.related-card {
    background: var(--bg-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.2s;
    color: inherit;
}

.related-card:hover {
    border-color: var(--border-2);
    transform: translateY(-3px);
    color: inherit;
}

.related-thumb {
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: var(--bg-1);
}

.related-card h3 {
    font-family: var(--font-h);
    font-size: 16px;
    font-weight: 600;
    padding: 14px 16px 4px;
    color: var(--text);
}

.related-card:hover h3 { color: var(--gold); }

.related-card time {
    display: block;
    padding: 0 16px 14px;
    font-size: 12px;
    color: var(--text-3);
}

/* ══ Footer ══ */

.blog-footer {
    border-top: 1px solid var(--border);
    padding: 40px 0 24px;
    background: var(--bg);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-h);
    font-weight: 600;
}

.footer-brand img { height: 28px; }

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-3);
    font-size: 14px;
}

.footer-links a:hover { color: var(--text-2); }

.footer-copy {
    text-align: center;
    font-size: 12px;
    color: var(--text-3);
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* ══ Responsive ══ */

@media (max-width: 1024px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
    .post-card.featured .post-card-link { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .article-title { font-size: 32px; }
}

@media (max-width: 768px) {
    .posts-grid { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr; }
    .hero-title { font-size: 30px; }
    .article-title { font-size: 26px; }
    .article-content { font-size: 16px; }
    .article-image.stretched { margin-left: -24px; margin-right: -24px; width: calc(100% + 48px); }
    .blog-nav { gap: 16px; }
    .blog-nav a { font-size: 13px; }
    .footer-content { flex-direction: column; gap: 16px; }
    .article-hero.has-image { padding: 50px 0; min-height: 260px; }
    .breadcrumbs { font-size: 12px; }
}

@media (max-width: 480px) {
    .container { padding: 0 16px; }
    .hero-title { font-size: 26px; }
    .article-title { font-size: 24px; }
    .blog-header .container { height: 56px; }
}
