/* ====================== */
/* BLOG STYLES */
/* ====================== */
.blog-container {
    padding-top: 80px;
}

/* Featured Post */
.featured-post {
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    padding: var(--space-xl) 0;
}

.featured-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.post-category {
    display: inline-block;
    background-color: var(--accent);
    color: var(--bg-darker);
    padding: var(--space-xs) var(--space-sm);
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Article Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-unit);
}

.article-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: var(--border-width) solid var(--border);
    transition: transform 0.3s ease;
}

/* Responsive Adjustments */
@media (min-width: 992px) {
    .featured-content {
        flex-direction: row;
    }

    .blog-container {
        display: grid;
        grid-template-columns: 1fr 300px;
    }
}

/* ====================== */
/* SINGLE POST STYLES */
/* ====================== */
.blog-post {
    padding-top: 2rem;
}

.post-header {
    margin-bottom: 3rem;
}

.post-meta {
    margin-bottom: 2rem;
}

.post-category {
    display: inline-block;
    background-color: var(--accent);
    color: var(--bg-darker);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.post-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

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

.post-stats {
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: flex;
    gap: 0.5rem;
}

.post-featured-image {
    width: 100%;
    margin-top: 1.5rem;
}

.post-featured-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 0.5rem;
}

.post-content-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.social-sharing {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.article-content {
    line-height: 1.7;
    font-size: 1.1rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.newsletter-cta {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 2rem;
    margin: 3rem 0;
}

.subscribe-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.subscribe-form input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background-color: var(--bg-dark);
    color: var(--text-primary);
}

.comments-section {
    margin-top: 4rem;
}

.comment-form {
    margin-bottom: 2rem;
}

.comment-form textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment {
    background-color: var(--bg-card);
    border-radius: 0.5rem;
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.comment.odd {
    background-color: var(--bg-dark);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.comment-date {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.comment-body {
    line-height: 1.6;
}

.related-posts {
    padding: 4rem 0;
    background-color: var(--bg-darker);
    border-top: 1px solid var(--border);
}

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

.related-card {
    background-color: var(--bg-card);
    border-radius: 0.5rem;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

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

.related-image {
    height: 200px;
    overflow: hidden;
}

.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-card:hover .related-image img {
    transform: scale(1.05);
}

.related-content {
    padding: 1.5rem;
}

.related-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.related-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.related-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.related-meta .author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.related-meta img {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    object-fit: cover;
}

/* Responsive Adjustments */
@media (min-width: 992px) {
    .post-content-wrapper {
        grid-template-columns: 1fr 300px;
    }

    .post-sidebar {
        position: sticky;
        top: 100px;
        align-self: start;
    }
}

@media (max-width: 768px) {
    .post-title {
        font-size: 2rem;
    }

    .subscribe-form {
        flex-direction: column;
    }
}

/* Category Page Styles */
.category-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

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

.category-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #2d3748; /* Dark gray-blue */
}

.category-description {
    font-size: 1.1rem;
    color: #718096; /* Medium gray */
    max-width: 700px;
    margin: 0 auto;
}

.category-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 992px) {
    .category-content {
        grid-template-columns: 2fr 1fr;
    }
}

/* Featured Posts */
.featured-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e2e8f0; /* Light gray */
    position: relative;
}

.section-title span {
    position: relative;
    padding-right: 1rem;
    background: #ffffff; /* White */
}

.featured-grid {
    display: grid;
    gap: 2rem;
}

.featured-card {
    background: #ffffff; /* White */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.featured-image {
    height: 400px;
    max-height: 500px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-card:hover .featured-image img {
    transform: scale(1.03);
}

.featured-body {
    padding: 1.5rem;
}

.featured-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.featured-title a {
    color: #2d3748; /* Dark gray-blue */
    text-decoration: none;
}

.featured-title a:hover {
    color: #4a5568; /* Slightly lighter gray-blue */
}

.featured-excerpt {
    color: #4a5568; /* Dark gray */
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.featured-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.author-name {
    font-weight: 500;
}

.post-stats {
    color: #718096; /* Medium gray */
    display: flex;
    gap: 0.5rem;
}

.read-more {
    display: inline-block;
    color: #4299e1; /* Blue */
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.read-more:hover {
    color: #2b6cb0; /* Darker blue */
    text-decoration: underline;
}

/* Latest Posts */
.latest-list {
    display: grid;
    gap: 1.5rem;
}

.latest-item {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0; /* Light gray */
}

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

    .latest-item:nth-child(even) {
        grid-template-columns: 1fr 2fr;
    }

    .latest-item:nth-child(even) .latest-content {
        order: 2;
    }
}

.latest-content {
    display: flex;
    flex-direction: column;
}

.latest-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.latest-title a {
    color: #2d3748; /* Dark gray-blue */
    text-decoration: none;
}

.latest-title a:hover {
    color: #4a5568; /* Slightly lighter gray-blue */
}

.latest-excerpt {
    color: #4a5568; /* Dark gray */
    margin-bottom: 1rem;
    line-height: 1.5;
    flex-grow: 1;
}

.latest-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.post-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.post-category {
    color: #4299e1; /* Blue */
    font-weight: 500;
    text-decoration: none;
}

.post-category:hover {
    text-decoration: underline;
}

.post-stats {
    color: #718096; /* Medium gray */
}

.latest-thumbnail {
    height: 180px;
    border-radius: 4px;
    overflow: hidden;
}

.latest-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.latest-item:hover .latest-thumbnail img {
    transform: scale(1.03);
}

/* Sidebar */
.category-sidebar {
    position: relative;
}

.sidebar-sticky {
    position: sticky;
    top: 1rem;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e2e8f0; /* Light gray */
    position: relative;
}

.sidebar-title span {
    position: relative;
    padding-right: 1rem;
    background: #ffffff; /* White */
}

.popular-list {
    display: grid;
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.popular-item {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #edf2f7; /* Very light gray */
}

.popular-item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.popular-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.popular-title a {
    color: #2d3748; /* Dark gray-blue */
    text-decoration: none;
}

.popular-title a:hover {
    color: #4a5568; /* Slightly lighter gray-blue */
}

.popular-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: #718096; /* Medium gray */
}

.popular-author {
    font-weight: 500;
}

.popular-category {
    color: #4299e1; /* Blue */
    text-decoration: none;
}

.popular-category:hover {
    text-decoration: underline;
}

/* Pagination */
.pagination-nav {
    margin: 3rem 0;
}

.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.5rem;
}

.page-item.active .page-link {
    background-color: #4299e1; /* Blue */
    border-color: #4299e1; /* Blue */
    color: white;
}

.page-link {
    padding: 0.5rem 1rem;
    border: 1px solid #e2e8f0; /* Light gray */
    border-radius: 4px;
    color: #4a5568; /* Dark gray */
    text-decoration: none;
    transition: all 0.2s ease;
}

.page-link:hover {
    background-color: #f7fafc; /* Very light gray */
    border-color: #cbd5e0; /* Medium-light gray */
}

/* Newsletter */
.newsletter-section {
    background-color: #f7fafc; /* Very light gray */
    padding: 3rem 0;
    margin-top: 3rem;
}

.newsletter-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1rem;
}

.newsletter-content {
    text-align: center;
    margin-bottom: 2rem;
}

.newsletter-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2d3748; /* Dark gray-blue */
}

.newsletter-description {
    color: #4a5568; /* Dark gray */
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 576px) {
    .form-group {
        flex-direction: row;
    }
}

.form-input {
    flex-grow: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #e2e8f0; /* Light gray */
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: #4299e1; /* Blue */
    box-shadow: 0 0 0 2px rgba(66, 153, 225, 0.1);
}

.form-button {
    padding: 0.75rem 2rem;
    background-color: #4299e1; /* Blue */
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.form-button:hover {
    background-color: #3182ce; /* Darker blue */
}

/* Empty State */
.empty-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    text-align: center;
}

.empty-container {
    max-width: 500px;
    padding: 2rem;
}

.empty-state h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: #2d3748; /* Dark gray-blue */
}

.empty-state p {
    color: #4a5568; /* Dark gray */
    margin-bottom: 2rem;
    line-height: 1.6;
}

.home-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #4299e1; /* Blue */
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.home-link:hover {
    background-color: #3182ce; /* Darker blue */
}