/* ============================================= */
/* Blog Section Styles */
/* ============================================= */

.blog-hero {
    padding: 60px 0 40px;
    background: linear-gradient(135deg, var(--correct-color) 0%, #4a7c46 100%);
    color: white;
    text-align: center;
}

.blog-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.blog-hero p {
    font-size: 1.2rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
    padding: 4rem 2rem;
    max-width: var(--content-max-width);
    margin: 0 auto;
}

.blog-card {
    background: var(--modal-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

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

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

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--correct-color);
}

.blog-card-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, rgba(83, 141, 78, 0.1), rgba(181, 159, 59, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.blog-card-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-color);
    opacity: 0.7;
}

.blog-category {
    background: var(--correct-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.75rem;
}

.blog-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    line-height: 1.3;
}

.blog-card p {
    color: var(--text-color);
    opacity: 0.85;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex: 1;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--correct-color);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.read-more-btn:hover {
    gap: 1rem;
    color: var(--present-color);
}

/* Blog Post Page */
.blog-post {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.blog-post-header {
    margin-bottom: 3rem;
    text-align: center;
}

.blog-post-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    line-height: 1.2;
}

.blog-post-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    color: var(--text-color);
    opacity: 0.7;
}

.blog-post-content {
    color: var(--text-color);
    line-height: 1.9;
    font-size: 1.1rem;
}

.blog-post-content h2 {
    font-size: 2rem;
    margin: 3rem 0 1.5rem;
    color: var(--text-color);
    font-weight: 700;
}

.blog-post-content h3 {
    font-size: 1.5rem;
    margin: 2.5rem 0 1rem;
    color: var(--text-color);
    font-weight: 600;
}

.blog-post-content p {
    margin-bottom: 1.5rem;
}

.blog-post-content ul,
.blog-post-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.blog-post-content li {
    margin-bottom: 0.75rem;
}

/* Custom Numbered List Styles */
.blog-post-content ol {
    counter-reset: custom-counter;
    list-style: none;
    padding-left: 0;
}

.blog-post-content ol li {
    counter-increment: custom-counter;
    margin-bottom: 1.5rem;
    padding-left: 3rem;
    position: relative;
}

.blog-post-content ol li::before {
    content: counter(custom-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background: var(--correct-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 8px rgba(83, 141, 78, 0.3);
}

/* Custom Ordered Steps */
.ordered-steps {
    margin: 2rem 0;
}

.ordered-steps ol {
    counter-reset: step-counter;
    list-style: none;
    padding-left: 0;
}

.ordered-steps li {
    counter-increment: step-counter;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(83, 141, 78, 0.05), rgba(181, 159, 59, 0.05));
    border-left: 4px solid var(--correct-color);
    border-radius: 8px;
    position: relative;
    padding-left: 3rem;
}

.ordered-steps li::before {
    content: counter(step-counter);
    position: absolute;
    left: -1rem;
    top: 1.5rem;
    width: 2rem;
    height: 2rem;
    background: var(--correct-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 8px rgba(83, 141, 78, 0.3);
}

.ordered-steps h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-size: 1.25rem;
}

.ordered-steps p {
    margin-bottom: 0;
    opacity: 0.9;
}

.blog-post-content strong {
    color: var(--correct-color);
    font-weight: 600;
}

/* Wordle Board in Blog */
.blog-wordle-board {
    background: var(--modal-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin: 2.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.blog-wordle-row {
    display: flex;
    gap: 8px;
}

.blog-wordle-tile {
    width: 50px;
    height: 50px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
    color: white;
}

.blog-wordle-tile.correct {
    background: var(--correct-color);
    border-color: var(--correct-color);
}

.blog-wordle-tile.present {
    background: var(--present-color);
    border-color: var(--present-color);
}

.blog-wordle-tile.absent {
    background: var(--absent-color);
    border-color: var(--absent-color);
}

.blog-wordle-tile.empty {
    background: transparent;
}

.board-caption {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: var(--text-color);
    opacity: 0.8;
    font-style: italic;
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, rgba(83, 141, 78, 0.1), rgba(181, 159, 59, 0.1));
    border-left: 4px solid var(--correct-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.highlight-box h4 {
    color: var(--correct-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Back to Blog Button */
.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--correct-color);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.back-to-blog:hover {
    gap: 1rem;
    color: var(--present-color);
}

/* Related Posts */
.related-posts {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.related-posts h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    color: var(--text-color);
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 2rem;
        padding: 3rem 1.5rem;
    }
}

@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2.2rem;
    }

    .blog-hero p {
        font-size: 1rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        padding: 2rem 1rem;
    }

    .blog-post {
        padding: 2rem 1rem;
    }

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

    .blog-post-content {
        font-size: 1rem;
    }

    .blog-wordle-tile {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

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

    .blog-post-title {
        font-size: 1.6rem;
    }

    .blog-wordle-tile {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* Dark Mode */
body.light-mode .blog-card {
    background: #ffffff;
    border-color: #e1e5e9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

body.light-mode .blog-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

body.light-mode .blog-wordle-board {
    background: #ffffff;
    border-color: #e1e5e9;
}

body.light-mode .highlight-box {
    background: linear-gradient(135deg, rgba(83, 141, 78, 0.05), rgba(181, 159, 59, 0.05));
}

/* Pagination Styles */
.pagination {
    padding: 3rem 0;
    background: var(--bg-color);
    border-top: 2px solid var(--border-color);
}

.pagination .container {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.pagination-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.pagination-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: var(--modal-bg);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination-links a:hover {
    background: var(--correct-color);
    color: white;
    border-color: var(--correct-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(83, 141, 78, 0.3);
}

.pagination-links .current-page {
    padding: 0.75rem 1.5rem;
    background: var(--correct-color);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    border: 2px solid var(--correct-color);
}

.pagination-links .prev-page:hover, .pagination-links .next-page:hover {
    gap: 0.75rem;
}

/* Pagination Responsive */
@media (max-width: 768px) {
    .pagination {
        padding: 2rem 0;
    }
    
    .pagination .container {
        padding: 0 1rem;
    }
    
    .pagination-links {
        gap: 1rem;
    }
    
    .pagination-links a,
    .pagination-links .current-page {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }
}