/* Blog Index Page Styling */

.blog-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.blog-header {
    margin-bottom: 20px;
}

.blog-header h1 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #32317c;
}

.blog-header p {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
}

.blog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

.blog-main {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 28px;
    box-shadow: none;
}

.blog-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.sidebar-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(236, 246, 255, 0.92) 100%);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(226, 232, 240, 0.7);
    box-shadow: 0 10px 24px rgba(31, 75, 115, 0.08);
}

.sidebar-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #71b2e2;
}

.search-box {
    position: relative;
    margin-bottom: 10px;
}

.search-box input {
    width: 100%;
    padding: 12px 40px 12px 15px;
    border: 2px solid #e8ecf4;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #71b2e2;
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #71b2e2;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-box button:hover {
    background: #5a9fd4;
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: #32317c;
}

.category-item:hover {
    background: #f8f9fc;
    color: #71b2e2;
    transform: translateX(5px);
}

.category-item.active {
    background: #71b2e2;
    color: white;
}

.category-item .count {
    background: rgba(0, 0, 0, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.blog-posts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.blog-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(235, 245, 255, 0.9) 100%);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.7);
    box-shadow: 0 10px 24px rgba(31, 75, 115, 0.08);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 32px rgba(31, 75, 115, 0.15);
}

.blog-card-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.blog-card-content {
    padding: 25px;
}

.blog-card-category {
    display: inline-block;
    background: #e8f0fe;
    color: #71b2e2;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.blog-card-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: #999;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.blog-card-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-card-stats {
    display: flex;
    gap: 15px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 50px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #32317c;
    font-weight: 500;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #f8f9fc;
    color: #71b2e2;
}

.pagination .active {
    background: #71b2e2;
    color: white;
}

.pagination .disabled {
    opacity: 0.5;
    pointer-events: none;
}

.no-posts {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-posts i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

/* Dark Mode Support */
[data-bs-theme="dark"] .sidebar-section {
    background: var(--bg-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .sidebar-section h3 {
    color: #71b2e2;
}

[data-bs-theme="dark"] .search-box input {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-bs-theme="dark"] .search-box input:focus {
    border-color: #71b2e2;
}

[data-bs-theme="dark"] .category-item {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .category-item:hover {
    background: var(--bg-secondary);
    color: #71b2e2;
}

[data-bs-theme="dark"] .category-item.active {
    background: #71b2e2;
    color: white;
}

[data-bs-theme="dark"] .blog-card {
    background: var(--bg-primary);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .blog-card-content {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .blog-card-meta {
    color: var(--text-secondary);
    border-top-color: var(--border-color);
}

[data-bs-theme="dark"] .blog-header h1 {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .pagination a,
[data-bs-theme="dark"] .pagination span {
    color: var(--text-primary);
}

[data-bs-theme="dark"] .pagination a:hover {
    background: var(--bg-secondary);
}

[data-bs-theme="dark"] .no-posts {
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 992px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }

    .blog-sidebar {
        position: relative;
        top: 0;
    }

    .blog-posts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .blog-header h1 {
        font-size: 20px;
    }

    .blog-header p {
        font-size: 13px;
    }

    .blog-card-image {
        height: 200px;
    }

    .blog-card-content {
        padding: 15px;
    }

    .blog-card-title {
        font-size: 16px;
    }

    .pagination {
        gap: 5px;
    }

    .pagination a,
    .pagination span {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
    }
}
