/* Blog Page Specific Styles */

/* Hero Section */
.blog-hero {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 80px 0 60px;
    text-align: center;
}

.blog-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.blog-hero p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* Search Bar */
.blog-search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    display: flex;
}

.blog-search-input {
    width: 100%;
    padding: 15px 20px;
    border-radius: 50px;
    border: 1px solid var(--border-color);
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    outline: none;
    transition: var(--transition);
}

.blog-search-input:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.2);
}

.blog-search-btn {
    position: absolute;
    right: 5px;
    top: 5px;
    background: var(--primary-blue);
    color: white;
    border: none;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    transition: var(--transition);
}

.blog-search-btn:hover {
    background: var(--secondary-blue);
}

/* Category Filters */
.category-filter-bar {
    background: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: var(--header-height);
    z-index: 90;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.category-list {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-pill {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-dark);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.category-pill:hover,
.category-pill.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* Layout */
.blog-layout-container {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 3rem;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* Featured Post */
.featured-post-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 3rem;
    border: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 1.2fr 1fr;
}

.featured-img {
    height: 100%;
    min-height: 350px;
    background-color: #cbd5e1;
    background-size: cover;
    background-position: center;
}

.featured-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.post-cat-label {
    text-transform: uppercase;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.8rem;
    letter-spacing: 0.5px;
}

.featured-content h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--secondary-blue);
    line-height: 1.3;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 1.2rem;
    display: flex;
    gap: 1rem;
}

.post-excerpt {
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.read-more-link {
    font-weight: 600;
    color: var(--primary-blue);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s;
}

.read-more-link:hover {
    gap: 0.8rem;
}

/* Post Grid */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.post-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    transition: transform 0.3s, box-shadow 0.3s, border-top-color 0.3s;
    border-top: 4px solid transparent;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    border-top-color: var(--primary-blue);
}

.post-thumb {
    height: 200px;
    background-color: #e2e8f0;
    background-size: cover;
    background-position: center;
}

.post-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
    line-height: 1.4;
    color: var(--secondary-blue);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: white;
    color: var(--text-dark);
    font-weight: 600;
    transition: var(--transition);
}

.page-link:hover,
.page-link.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
}

/* Sidebar */
.blog-sidebar {
    padding-left: 1rem;
}

.sidebar-widget {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary-blue);
    margin-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 0.5rem;
}

.popular-posts-list {
    list-style: none;
    padding: 0;
}

.popular-post-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.popular-post-thumb {
    width: 60px;
    height: 60px;
    background-color: #cbd5e1;
    border-radius: 4px;
    flex-shrink: 0;
}

.popular-post-info h4 {
    font-size: 0.95rem;
    line-height: 1.3;
    margin-bottom: 0.2rem;
}

.popular-post-info h4 a {
    color: var(--text-dark);
    transition: color 0.2s;
}

.popular-post-info h4 a:hover {
    color: var(--primary-blue);
}

.category-list-widget {
    list-style: none;
    padding: 0;
}

.category-list-widget li {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.95rem;
}

.category-list-widget li a {
    color: var(--text-dark);
}

.category-list-widget li a:hover {
    color: var(--primary-blue);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-size: 0.8rem;
    background: #f1f5f9;
    padding: 4px 10px;
    border-radius: 4px;
    color: var(--text-light);
    transition: background 0.2s;
}

.tag:hover {
    background: #e2e8f0;
    color: var(--text-dark);
}

.subscribe-form {
    display: flex;
    gap: 0.5rem;
}

.subscribe-input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Single Post Template Preview */
.single-post-preview {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px dashed var(--border-color);
}

.single-article-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.single-article-content p {
    margin-bottom: 1.5rem;
}

.single-article-content h2 {
    font-size: 1.8rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--secondary-blue);
}

.author-box {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-top: 3rem;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #cbd5e1;
}

/* Responsive */
@media (max-width: 992px) {
    .blog-layout-container {
        grid-template-columns: 1fr;
    }

    .featured-post-card {
        grid-template-columns: 1fr;
    }

    .featured-img {
        min-height: 250px;
    }

    .blog-sidebar {
        padding-left: 0;
        margin-top: 3rem;
    }
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }

    .category-list {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .category-pill {
        white-space: nowrap;
    }
}

/* Related Posts Grid */
.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

@media (max-width: 992px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}