/* Blog-Specific Styles */

/* Blog Page Header */
.blog-header {
    text-align: center;
    padding: 3rem 0 2rem;
    margin-top: 70px;
}

.blog-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.blog-subtitle {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.dark-mode .blog-subtitle {
    color: #aaa;
}

/* Blog Archive Styles */
.blog-archive {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 3rem 0;
}

.archive-item {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.dark-mode .archive-item {
    background-color: var(--white);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
}

.archive-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.dark-mode .archive-item:hover {
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.3);
}

.archive-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.archive-item-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.archive-item-header h3 a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.archive-item-header h3 a:hover {
    color: var(--primary);
}

.archive-item-header .date {
    font-size: 0.9rem;
    color: #999;
    white-space: nowrap;
}

.dark-mode .archive-item-header .date {
    color: #aaa;
}

.archive-item .description {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.dark-mode .archive-item .description {
    color: #ccc;
}

.archive-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.reading-time {
    font-size: 0.85rem;
    color: #999;
}

.dark-mode .reading-time {
    color: #aaa;
}

.read-more {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.read-more:hover {
    color: var(--dark-accent);
    transform: translateX(5px);
}

/* Tags */
.tags {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.tag {
    display: inline-block;
    background-color: var(--secondary);
    color: var(--text);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.dark-mode .tag {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ccc;
}

.tag:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.page-link {
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--primary);
    border-radius: 4px;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
}

.page-link:hover,
.page-link.active {
    background-color: var(--primary);
    color: var(--white);
}

/* Individual Article Page */
.article-page {
    padding: 2rem 0;
    min-height: 60vh;
}

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

.blog-article {
    margin-top: 70px;
}

.article-header {
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.dark-mode .article-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.article-header h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.95rem;
    color: #999;
    margin-bottom: 1rem;
}

.dark-mode .article-meta {
    color: #aaa;
}

.article-meta span {
    display: flex;
    align-items: center;
}

.article-meta .date::before {
    content: '📅 ';
    margin-right: 0.25rem;
}

.article-meta .reading-time::before {
    content: '⏱️ ';
    margin-right: 0.25rem;
}

.article-meta .author::before {
    content: '✍️ ';
    margin-right: 0.25rem;
}

/* Article Content */
.article-content {
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 3rem;
}

.article-content h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    text-align: left;
    border-top: 1px solid var(--secondary);
    padding-top: 1rem;
}

.dark-mode .article-content h2 {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.article-content h3 {
    font-size: 1.3rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    color: #444;
}

.dark-mode .article-content p {
    color: #ddd;
}

.article-content ul,
.article-content ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    color: #444;
}

.dark-mode .article-content li {
    color: #ddd;
}

.article-content blockquote {
    border-left: 4px solid var(--primary);
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #666;
}

.dark-mode .article-content blockquote {
    border-left-color: var(--dark-accent);
    color: #aaa;
}

.article-content code {
    background-color: var(--secondary);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.dark-mode .article-content code {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ff6b6b;
}

.article-content pre {
    background-color: var(--secondary);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.dark-mode .article-content pre {
    background-color: rgba(0, 0, 0, 0.3);
}

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

.dark-mode .article-content pre code {
    color: #e0e0e0;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Article Footer */
.article-footer {
    border-top: 2px solid var(--secondary);
    padding-top: 2rem;
}

.dark-mode .article-footer {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.article-sharing h3 {
    margin-bottom: 1rem;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background-color: var(--secondary);
    border: 2px solid transparent;
    border-radius: 4px;
    color: var(--text);
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.dark-mode .share-btn {
    background-color: rgba(255, 255, 255, 0.1);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

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

.share-btn.copy:hover {
    background-color: var(--primary);
    color: white;
}

/* Article Navigation */
.article-nav {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--secondary);
}

.dark-mode .article-nav {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.back-link {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-link:hover {
    color: var(--dark-accent);
    transform: translateX(-5px);
}

/* Filter Info */
.filter-info {
    background-color: var(--secondary);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
}

.dark-mode .filter-info {
    background-color: rgba(255, 255, 255, 0.05);
}

.filter-info p {
    margin: 0;
}

/* Error Messages */
.error {
    background-color: #fee;
    color: #c33;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #c33;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .blog-header h1 {
        font-size: 2rem;
    }

    .article-header h1 {
        font-size: 1.8rem;
    }

    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .archive-item-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .archive-item-header .date {
        order: -1;
    }

    .share-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .share-btn {
        width: 100%;
        justify-content: center;
    }

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

    .article-content h2 {
        font-size: 1.5rem;
    }

    .article-content h3 {
        font-size: 1.2rem;
    }
}

@media screen and (max-width: 480px) {
    .blog-header h1 {
        font-size: 1.8rem;
    }

    .article-header h1 {
        font-size: 1.5rem;
    }

    .article-meta {
        font-size: 0.85rem;
    }

    .archive-item {
        padding: 1rem;
    }

    .archive-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}
