/* =============================================
   Blog Styles - Pixels and Tokens
   ============================================= */

/* Blog Container */
.blog-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Blog Header */
.blog-header {
    text-align: center;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.blog-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 10px;
    letter-spacing: 2px;
    font-family: "Quicksand", Arial, sans-serif;
}

.blog-subtitle {
    font-size: 1.1rem;
    color: #666;
    font-weight: 400;
    margin: 0;
}

/* Blog Posts List */
.blog-posts-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Blog Post Card */
.blog-post-card {
    display: flex;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.blog-post-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

/* Post Date Block */
.post-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #222;
    color: #fff;
    padding: 20px 18px;
    min-width: 80px;
    text-align: center;
}

.post-date .date-day {
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1;
}

.post-date .date-month {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.post-date .date-year {
    font-size: 0.8rem;
    color: #aaa;
    margin-top: 2px;
}

/* Post Content */
.post-content {
    flex: 1;
    padding: 20px 25px;
}

.post-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.post-title a {
    color: #222;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #555;
}

.post-excerpt {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin: 0 0 12px 0;
}

/* Post Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.post-tags .tag {
    background: #f5f5f5;
    color: #555;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* =============================================
   Article Page Styles
   ============================================= */

.article-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Article Header */
.article-header {
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.article-date {
    font-size: 0.9rem;
    color: #666;
}

.article-category {
    background: #222;
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.article-title {
    font-size: 2rem;
    font-weight: 600;
    color: #222;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

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

.article-tags .tag {
    background: #f5f5f5;
    color: #555;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Article Content */
.article-content {
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
}

.article-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #222;
    margin: 35px 0 15px 0;
    padding-top: 15px;
}

.article-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #222;
    margin: 30px 0 12px 0;
}

.article-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 25px 0 10px 0;
}

.article-content p {
    margin-bottom: 1.5em;
}

.article-content strong {
    font-weight: 600;
    color: #222;
}

.article-content em {
    font-style: italic;
}

.article-content a {
    color: #0066cc;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}

.article-content a:hover {
    border-bottom-color: #0066cc;
}

/* Article Images */
.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 25px auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.article-content .figure-caption {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-top: -15px;
    margin-bottom: 25px;
    font-style: italic;
}

/* Article Lists */
.article-content ul,
.article-content ol {
    margin: 0 0 1.5em 1.5em;
    padding: 0;
}

.article-content li {
    margin-bottom: 0.5em;
    line-height: 1.7;
}

/* Code Blocks */
.article-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
}

.article-content pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 25px 0;
}

.article-content pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

/* Blockquotes */
.article-content blockquote {
    border-left: 4px solid #222;
    margin: 25px 0;
    padding: 15px 25px;
    background: #f9f9f9;
    font-style: italic;
    color: #555;
}

/* Horizontal Rule */
.article-content hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 40px 0;
}

/* =============================================
   Social Share Buttons
   ============================================= */

.share-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
}

.share-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 15px;
}

.share-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.share-btn i {
    font-size: 1.1rem;
}

.share-btn.twitter {
    background: #1DA1F2;
    color: #fff;
}

.share-btn.facebook {
    background: #1877F2;
    color: #fff;
}

.share-btn.linkedin {
    background: #0A66C2;
    color: #fff;
}

.share-btn.reddit {
    background: #FF4500;
    color: #fff;
}

.share-btn.email {
    background: #333;
    color: #fff;
}

/* =============================================
   Article Navigation
   ============================================= */

.article-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
    gap: 20px;
}

.article-nav-link {
    display: flex;
    flex-direction: column;
    padding: 15px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s ease;
    max-width: 45%;
}

.article-nav-link:hover {
    background: #f0f0f0;
}

.article-nav-link.prev {
    align-items: flex-start;
}

.article-nav-link.next {
    align-items: flex-end;
    text-align: right;
}

.article-nav-label {
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.article-nav-title {
    font-size: 0.95rem;
    color: #222;
    font-weight: 500;
    line-height: 1.4;
}

/* Back to Blog Link */
.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 30px;
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.back-to-blog:hover {
    color: #222;
}

.back-to-blog i {
    font-size: 0.8rem;
}

/* =============================================
   Mobile Navigation for Blog
   ============================================= */

.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background: #222;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* =============================================
   Responsive Styles
   ============================================= */

@media (max-width: 900px) {
    .blog-container,
    .article-container {
        padding: 20px;
    }

    .blog-title {
        font-size: 2rem;
    }

    .article-title {
        font-size: 1.6rem;
    }

    .article-nav {
        flex-direction: column;
    }

    .article-nav-link {
        max-width: 100%;
    }

    .article-nav-link.next {
        align-items: flex-start;
        text-align: left;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .left-content {
        position: fixed;
        left: -300px;
        top: 0;
        height: 100%;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }

    .left-content.mobile-open {
        left: 0;
    }

    .main-content {
        margin-left: 0;
    }

    .blog-post-card {
        flex-direction: column;
    }

    .post-date {
        flex-direction: row;
        gap: 10px;
        padding: 12px 20px;
    }

    .post-date .date-day {
        font-size: 1.2rem;
    }

    .post-date .date-month,
    .post-date .date-year {
        margin: 0;
    }

    .post-content {
        padding: 15px 20px;
    }

    .share-buttons {
        flex-direction: column;
    }

    .share-btn {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .blog-title {
        font-size: 1.6rem;
    }

    .blog-subtitle {
        font-size: 0.95rem;
    }

    .post-title {
        font-size: 1.1rem;
    }

    .article-title {
        font-size: 1.4rem;
    }

    .article-content {
        font-size: 0.95rem;
    }
}

/* Nav Active State */
.nav ul li a.nav-active {
    color: #000;
    font-weight: 600;
}

.nav ul li a.nav-active:after {
    width: 100%;
    transform: scaleX(1);
}
