/**
 * 999DEX BLOG - CSS STYLES
 * Professional blog styling matching the 999 ecosystem design system
 * Version: 1.0.0
 * Last Updated: November 9, 2025
 */

/* ========================================
   BLOG LAYOUT
   ======================================== */

.blog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

.blog-hero {
    text-align: center;
    padding: var(--spacing-3xl) var(--spacing-lg);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    border-radius: var(--radius-xl);
    margin-bottom: var(--spacing-2xl);
}

.blog-hero h1 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-extrabold);
    background: linear-gradient(135deg, #a855f7 0%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-md);
}

.blog-hero p {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   BLOG GRID
   ======================================== */

.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-3xl);
}

@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========================================
   BLOG POST CARD
   ======================================== */

.blog-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 300ms var(--ease-in-out);
    cursor: pointer;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow-purple);
    border-color: rgba(168, 85, 247, 0.5);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(6, 182, 212, 0.2) 100%);
}

.blog-card-content {
    padding: var(--spacing-lg);
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-sm);
    color: var(--text-tertiary);
}

.blog-card-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-semibold);
    color: var(--accent-purple);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-card-date {
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-card-title {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    line-height: var(--line-height-tight);
}

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

.blog-card-excerpt {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--spacing-md);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-author {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-card-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #a855f7 0%, #06b6d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-sm);
}

.blog-card-author-name {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
}

/* ========================================
   BLOG POST ARTICLE
   ======================================== */

.blog-article {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-xl);
}

.blog-article-header {
    margin-bottom: var(--spacing-2xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.blog-article-title {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-extrabold);
    color: var(--text-primary);
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-lg);
}

.blog-article-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-lg);
}

.blog-article-author {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.blog-article-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, #a855f7 0%, #06b6d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-lg);
}

.blog-article-author-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.blog-article-author-name {
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
}

.blog-article-date {
    font-size: var(--font-size-sm);
    color: var(--text-tertiary);
}

.blog-article-featured-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-2xl);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(6, 182, 212, 0.2) 100%);
}

/* ========================================
   ARTICLE CONTENT TYPOGRAPHY
   ======================================== */

.blog-article-content {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
    color: var(--text-secondary);
}

.blog-article-content h2 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-top: var(--spacing-2xl);
    margin-bottom: var(--spacing-lg);
    line-height: var(--line-height-tight);
}

.blog-article-content h3 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
    color: var(--text-primary);
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
    line-height: var(--line-height-tight);
}

.blog-article-content p {
    margin-bottom: var(--spacing-lg);
}

.blog-article-content a {
    color: var(--accent-purple);
    text-decoration: underline;
    transition: color 200ms var(--ease-in-out);
}

.blog-article-content a:hover {
    color: var(--accent-cyan);
}

.blog-article-content ul,
.blog-article-content ol {
    margin-bottom: var(--spacing-lg);
    padding-left: var(--spacing-xl);
}

.blog-article-content li {
    margin-bottom: var(--spacing-sm);
}

.blog-article-content blockquote {
    border-left: 4px solid var(--accent-purple);
    padding-left: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
    font-style: italic;
    color: var(--text-secondary);
    background: rgba(168, 85, 247, 0.05);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
}

.blog-article-content code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-family: var(--font-family-mono);
    font-size: 0.9em;
    color: var(--accent-cyan);
}

.blog-article-content pre {
    background: rgba(0, 0, 0, 0.4);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin-bottom: var(--spacing-lg);
}

.blog-article-content pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
}

.blog-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: var(--spacing-xl) 0;
}

/* ========================================
   RELATED POSTS
   ======================================== */

.blog-related-posts {
    margin-top: var(--spacing-3xl);
    padding-top: var(--spacing-2xl);
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.blog-related-posts h2 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-xl);
}

.blog-related-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
}

@media (min-width: 768px) {
    .blog-related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   CALL TO ACTION
   ======================================== */

.blog-cta {
    margin-top: var(--spacing-2xl);
    padding: var(--spacing-xl);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    border: 1px solid rgba(168, 85, 247, 0.3);
    border-radius: var(--radius-lg);
    text-align: center;
}

.blog-cta h3 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.blog-cta p {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
}

.blog-cta-button {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 12px 32px;
    background: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
    color: white;
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 200ms var(--ease-in-out);
}

.blog-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-purple);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: var(--font-size-3xl);
    }

    .blog-article-title {
        font-size: var(--font-size-2xl);
    }

    .blog-article-featured-image {
        height: 250px;
    }

    .blog-article-content {
        font-size: var(--font-size-base);
    }
}
