/**
 * Blog Page - 2025 Minimal Design
 * GlobalPVP - Clean and Modern UI/UX
 */

/* Page Container */
.blog-page {
    background: var(--bg);
    min-height: 100vh;
    padding: 1rem 0;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem 1rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 0.875rem;
    color: var(--muted);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Featured Posts Section */
.featured-posts-section {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
    padding-left: 0.75rem;
    position: relative;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 1rem;
    background: var(--primary);
    border-radius: 2px;
}

/* Featured Posts Grid */
.featured-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.featured-post {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.featured-post:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.featured-post .post-image {
    height: 180px;
    overflow: hidden;
    position: relative;
}

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

.featured-post:hover .post-image img {
    transform: scale(1.02);
}

.post-category-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 2;
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

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

.featured-post .post-content {
    padding: 1rem;
}

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

.featured-post .post-title a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.featured-post .post-title a:hover {
    color: var(--primary);
}

.post-excerpt {
    color: var(--muted);
    line-height: 1.5;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--muted);
}

.post-meta > div {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.post-meta svg {
    width: 12px;
    height: 12px;
    opacity: 0.7;
}

/* Blog Content Grid */
.blog-content-grid {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
    align-items: start;
}

/* Search Results Header */
.search-results-header {
    background: var(--card);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.search-results-header h2 {
    color: var(--text);
    margin-bottom: 0.25rem;
    font-size: 1rem;
    font-weight: 600;
}

.search-results-header p {
    color: var(--muted);
    margin: 0;
    font-size: 0.875rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--card);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.empty-state-icon {
    margin-bottom: 1rem;
    opacity: 0.6;
}

.empty-state-icon svg {
    width: 48px;
    height: 48px;
    stroke: var(--muted);
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.empty-state-description {
    color: var(--muted);
    line-height: 1.5;
    max-width: 400px;
    margin: 0 auto;
    font-size: 0.875rem;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    gap: 1rem;
}

.post-card {
    background: var(--card);
    border-radius: 8px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 0;
    overflow: hidden;
}

.post-card:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.post-card .post-image {
    height: 120px;
    overflow: hidden;
}

.post-card .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-card .post-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.post-category {
    margin-bottom: 0.375rem;
}

.category-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    transition: opacity 0.2s ease;
}

.category-link:hover {
    opacity: 0.8;
}

.post-card .post-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.375rem;
    line-height: 1.4;
}

.post-card .post-title a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.post-card .post-title a:hover {
    color: var(--primary);
}

.post-card .post-excerpt {
    color: var(--muted);
    font-size: 0.75rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card .post-meta {
    font-size: 0.75rem;
    gap: 0.75rem;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--card);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.pagination-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    color: var(--text);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.875rem;
}

.pagination-item:hover {
    background: var(--bg);
    color: var(--primary);
}

.pagination-item svg {
    width: 14px;
    height: 14px;
}

.pagination-info {
    color: var(--muted);
    font-size: 0.875rem;
    padding: 0 0.75rem;
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 1rem;
}

.widget {
    background: var(--card);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

.widget-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

/* Search Widget */
.search-input-wrapper {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    padding-right: 2.5rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-size: 0.875rem;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-btn {
    position: absolute;
    right: 0.375rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    border: none;
    border-radius: 4px;
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.search-btn:hover {
    opacity: 0.9;
}

.search-btn svg {
    width: 14px;
    height: 14px;
}

/* Categories Widget */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-item {
    margin-bottom: 0.375rem;
}

.category-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    color: var(--text);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    background: var(--bg);
    font-size: 0.875rem;
}

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

.post-count {
    background: rgba(255, 255, 255, 0.1);
    color: inherit;
    padding: 0.125rem 0.375rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Popular Posts Widget */
.popular-posts {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.popular-post {
    padding: 0.75rem;
    background: var(--bg);
    border-radius: 4px;
    transition: all 0.2s ease;
}

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

.popular-post-title {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.popular-post-title a {
    color: inherit;
    text-decoration: none;
}

.popular-post-meta {
    font-size: 0.75rem;
    opacity: 0.7;
}

/* Newsletter Widget */
.widget--newsletter {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(168, 85, 247, 0.05));
    border-color: rgba(99, 102, 241, 0.1);
}

.newsletter-description {
    color: var(--muted);
    margin-bottom: 1rem;
    line-height: 1.5;
    font-size: 0.875rem;
}

.newsletter-form .form-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 4px;
    color: var(--text);
    margin-bottom: 0.75rem;
    transition: border-color 0.2s ease;
    font-size: 0.875rem;
}

.newsletter-form .form-input:focus {
    outline: none;
    border-color: var(--primary);
}

.btn--block {
    width: 100%;
    justify-content: center;
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.btn--block:hover {
    opacity: 0.9;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog-content-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .blog-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .widget {
        margin-bottom: 0;
    }
}

@media (max-width: 768px) {
    .blog-page {
        padding: 0.5rem 0;
    }
    
    .page-header {
        margin-bottom: 1.5rem;
        padding: 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .featured-posts-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .featured-post .post-image {
        height: 160px;
    }
    
    .post-card {
        grid-template-columns: 1fr;
    }
    
    .post-card .post-image {
        height: 160px;
    }
    
    .blog-sidebar {
        grid-template-columns: 1fr;
    }
    
    .pagination {
        padding: 0.5rem 1rem;
        gap: 0.5rem;
    }
    
    .pagination-item {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .featured-post .post-content {
        padding: 0.75rem;
    }
    
    .post-card .post-content {
        padding: 0.75rem;
    }
    
    .widget {
        padding: 0.75rem;
    }
    
    .post-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .blog-content-grid {
        gap: 1rem;
    }
}

/* Fix for shifted content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Ensure proper alignment */
.blog-page .container {
    width: 100%;
    box-sizing: border-box;
}

/* Remove any floating elements that might cause shifts */
.blog-page * {
    box-sizing: border-box;
}

/* Prevent horizontal overflow */
.blog-page {
    overflow-x: hidden;
}
