/**
 * Blog Page Styles
 */

/* Blog Header */
.blog-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0 3rem;
    text-align: center;
}

.blog-header-content {
    max-width: 900px;
    margin: 0 auto;
}

.blog-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: white;
}

.blog-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Blog Search Form */
.blog-search-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

.blog-search-form .search-wrapper {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.blog-search-form .search-wrapper svg {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    pointer-events: none;
}

.blog-search-form .search-input {
    flex: 1;
    border: none;
    padding: 0.875rem 1rem 0.875rem 3rem;
    font-size: 1rem;
    border-radius: 25px;
    outline: none;
    transition: box-shadow 0.2s ease;
}

.blog-search-form .search-input.typing {
    box-shadow: 0 0 0 2px var(--primary-color) inset;
}

.blog-search-form .search-input:focus {
    box-shadow: 0 0 0 2px var(--primary-color) inset;
}

.blog-search-form .btn {
    padding: 0.875rem 2rem;
    border-radius: 25px;
    white-space: nowrap;
}

/* Blog Filters */
.blog-filters {
    background: white;
    padding: 1.5rem 0;
    border-bottom: 2px solid var(--gray-light);
    position: sticky;
    top: 80px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.blog-filters .filters-wrapper {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.blog-filters .filter-group {
    flex: 1;
    min-width: 200px;
}

.blog-filters .filter-results-count {
    margin-left: auto;
    font-size: 0.95rem;
    color: var(--text-light);
}

.blog-filters .results-count strong {
    color: var(--primary-color);
    font-weight: 600;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Blog Posts Grid */
.blog-posts-section {
    padding: 3rem 0;
}

.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

/* Post Card */
.post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.post-image {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary-color);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.post-category-badge:hover {
    background: var(--secondary-color);
}

.post-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Post Meta */
.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.875rem;
    flex-wrap: wrap;
}

.post-meta > * {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.post-meta svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
}

/* Post Title */
.post-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.875rem 0;
    line-height: 1.3;
}

.post-title a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-title a:hover {
    color: var(--primary-color);
}

/* Post Excerpt */
.post-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-light);
    margin-bottom: 1.25rem;
    flex: 1;
}

/* Post Footer */
.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-light);
    margin-top: auto;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-author img {
    border-radius: 50%;
    width: 32px;
    height: 32px;
}

.author-name {
    font-size: 0.85rem;
    color: var(--text-light);
}

.author-name a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.author-name a:hover {
    color: var(--primary-color);
}

.read-more-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: gap 0.2s ease;
}

.read-more-link:hover {
    gap: 0.625rem;
}

.read-more-link svg {
    width: 16px;
    height: 16px;
}

/* No Results */
.blog-posts-grid .no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
}

.no-results svg {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.no-results h2 {
    font-size: 1.875rem;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.no-results p {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Blog Pagination */
.blog-pagination {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

.blog-pagination .page-numbers {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
}

.blog-pagination .page-numbers li {
    margin: 0;
}

.blog-pagination .page-numbers a,
.blog-pagination .page-numbers .current {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.blog-pagination .page-numbers a {
    background: white;
    color: var(--text-color);
    border: 1px solid var(--gray-light);
}

.blog-pagination .page-numbers a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.blog-pagination .page-numbers .current {
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
}

/* Blog Categories Section */
.blog-categories-section {
    padding: 3rem 0;
}

.blog-categories-section.bg-light {
    background: var(--background-color);
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-light);
}

.categories-grid {
    display: grid;
    gap: 1.5rem;
}

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.category-icon svg {
    color: white;
}

section .category-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
}

.category-count {
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 768px) {
    .blog-title {
        font-size: 2rem;
    }
    
    .blog-subtitle {
        font-size: 1rem;
    }
    
    .blog-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-filters .filters-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .blog-filters .filter-group {
        width: 100%;
    }
    
    .blog-filters .filter-results-count {
        text-align: center;
        margin-left: 0;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .blog-search-form .search-wrapper {
        flex-direction: column;
        border-radius: 12px;
        gap: 0.75rem;
    }
    
    .blog-search-form .search-input {
        border-radius: 8px;
    }
    
    .blog-search-form .btn {
        border-radius: 8px;
        width: 100%;
    }
    
    .post-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
}
