/* ==========================================================================
   Blog Styles — Stake Pro Panel Premium Dark Theme
   Extends styles.css design tokens
   ========================================================================== */

/* ── Blog Hero ─────────────────────────────────────────────────────────── */
.blog-hero {
    padding: 6rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 500px;
    background: radial-gradient(ellipse, rgba(0, 255, 204, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.blog-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 255, 204, 0.08);
    border: 1px solid rgba(0, 255, 204, 0.25);
    border-radius: 50px;
    padding: 6px 18px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.blog-hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.15;
    background: linear-gradient(135deg, #ffffff 30%, #00ffcc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.blog-hero-subtitle {
    color: var(--muted-foreground);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
}

/* ── Blog Grid ─────────────────────────────────────────────────────────── */
.blog-section {
    padding: 0 0 6rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.75rem;
    margin-top: 2rem;
}

.blog-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card:hover {
    border-color: var(--border-accent);
    box-shadow: 0 8px 32px rgba(0, 255, 204, 0.08);
    transform: translateY(-3px);
}

.blog-card:hover::before {
    opacity: 1;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.blog-tag {
    display: inline-block;
    background: rgba(0, 255, 204, 0.1);
    color: var(--primary);
    border: 1px solid rgba(0, 255, 204, 0.2);
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 10px;
}

.blog-tag.tag-automation { background: rgba(99, 102, 241, 0.12); color: #a5b4fc; border-color: rgba(99, 102, 241, 0.25); }
.blog-tag.tag-strategy   { background: rgba(245, 158, 11, 0.1);   color: #fcd34d; border-color: rgba(245, 158, 11, 0.25); }
.blog-tag.tag-review     { background: rgba(239, 68, 68, 0.1);   color: #fca5a5; border-color: rgba(239, 68, 68, 0.25); }
.blog-tag.tag-guide      { background: rgba(16, 185, 129, 0.1);  color: #6ee7b7; border-color: rgba(16, 185, 129, 0.25); }
.blog-tag.tag-telegram   { background: rgba(56, 182, 255, 0.1);  color: #7dd3fc; border-color: rgba(56, 182, 255, 0.25); }

.blog-card-date {
    font-size: 0.78rem;
    color: var(--muted-foreground);
    margin-left: auto;
}

.blog-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--foreground);
    transition: color 0.2s;
}

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

.blog-card-excerpt {
    font-size: 0.9rem;
    color: var(--muted-foreground);
    line-height: 1.7;
    flex: 1;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.blog-card-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--muted-foreground);
}

.author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00ffcc, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #000;
    flex-shrink: 0;
}

.blog-read-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    transition: gap 0.2s;
}

.blog-read-more:hover { gap: 8px; }

.blog-read-more svg { transition: transform 0.2s; }
.blog-read-more:hover svg { transform: translateX(3px); }

/* ── Individual Post Layout ────────────────────────────────────────────── */
.post-hero {
    padding: 5.5rem 0 3rem;
    text-align: center;
    position: relative;
}

.post-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(0, 255, 204, 0.07) 0%, transparent 70%);
    pointer-events: none;
}

.post-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
}

.post-breadcrumb a { color: var(--primary); transition: opacity 0.2s; }
.post-breadcrumb a:hover { opacity: 0.8; }
.post-breadcrumb span { color: var(--muted-foreground); }

.post-hero-tags {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.post-hero-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff 30%, #00ffcc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    max-width: 860px;
    margin: 0 auto 1.25rem;
}

.post-hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--muted-foreground);
}

.post-hero-meta .sep { color: var(--border-accent); }

/* ── Post Content Layout ───────────────────────────────────────────────── */
.post-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 3rem;
    padding-bottom: 5rem;
    align-items: start;
}

.post-content {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    backdrop-filter: blur(8px);
}

.post-content h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--foreground);
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.post-content h2:first-child { margin-top: 0; }

.post-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--foreground);
    margin: 1.75rem 0 0.75rem;
}

.post-content p {
    color: #c8d6e8;
    line-height: 1.85;
    font-size: 0.97rem;
    margin-bottom: 1.2rem;
}

.post-content ul, .post-content ol {
    color: #c8d6e8;
    font-size: 0.97rem;
    line-height: 1.85;
    margin: 0.75rem 0 1.2rem;
    padding-left: 1.5rem;
}

.post-content li { margin-bottom: 0.45rem; list-style: disc; }
.post-content ol li { list-style: decimal; }

.post-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s;
}
.post-content a:hover { opacity: 0.8; }

.post-content strong { color: var(--foreground); }

.post-content blockquote {
    border-left: 3px solid var(--primary);
    background: rgba(0, 255, 204, 0.05);
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #94a3b8;
}

.post-content .highlight-box {
    background: rgba(0, 255, 204, 0.06);
    border: 1px solid rgba(0, 255, 204, 0.2);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}

.post-content .highlight-box p { margin-bottom: 0; }

/* ── Sidebar ───────────────────────────────────────────────────────────── */
.post-sidebar {
    position: sticky;
    top: 90px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-widget {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    backdrop-filter: blur(8px);
}

.sidebar-widget h4 {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.toc-list { list-style: none; padding: 0; }

.toc-list li {
    margin-bottom: 0.4rem;
}

.toc-list a {
    font-size: 0.85rem;
    color: var(--muted-foreground);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    transition: color 0.2s;
    line-height: 1.5;
}

.toc-list a::before {
    content: '›';
    color: var(--primary);
    font-weight: 700;
    flex-shrink: 0;
}

.toc-list a:hover { color: var(--primary); }

.cta-widget {
    background: linear-gradient(135deg, rgba(0, 255, 204, 0.08), rgba(99, 102, 241, 0.08));
    border-color: rgba(0, 255, 204, 0.2);
    text-align: center;
}

.cta-widget p {
    font-size: 0.88rem;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.cta-widget .btn-primary {
    width: 100%;
    justify-content: center;
    font-size: 0.88rem;
    padding: 10px 16px;
}

/* ── Related Posts ─────────────────────────────────────────────────────── */
.related-posts {
    padding: 0 0 5rem;
}

.related-posts .section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

.related-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: border-color 0.3s, transform 0.3s;
}

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

.related-card-tag { font-size: 0.72rem; }

.related-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--foreground);
    line-height: 1.4;
    transition: color 0.2s;
}

.related-card:hover .related-card-title { color: var(--primary); }

.related-card-date { font-size: 0.78rem; color: var(--muted-foreground); }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .post-layout {
        grid-template-columns: 1fr;
    }
    .post-sidebar {
        position: static;
    }
}

@media (max-width: 640px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
    .post-content {
        padding: 1.5rem;
    }
    .blog-card {
        padding: 1.25rem;
    }
    .post-hero-meta {
        gap: 0.75rem;
    }
}
