/* =============================================
   Blog Styles — Luxpred
   ============================================= */

/* --- Hero --- */
.blog-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem 2rem;
    position: relative;
    overflow: hidden;
}
.blog-hero::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    opacity: 0.1;
    background-image: radial-gradient(circle at 20% 50%, white 1px, transparent 1px),
                      radial-gradient(circle at 80% 80%, white 1px, transparent 1px);
    background-size: 50px 50px;
}
.blog-hero-inner {
    max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; text-align: center;
}
.blog-hero h1 {
    color: white; font-size: 2.5rem; font-weight: 800; margin: 0 0 0.5rem 0; letter-spacing: -0.5px;
}
.blog-hero p {
    color: rgba(255,255,255,0.95); font-size: 1.125rem; margin: 0;
}

/* --- Container --- */
.blog-container {
    max-width: 1200px; margin: 0 auto; padding: 2rem 1rem;
}
.blog-layout {
    display: grid; grid-template-columns: 1fr 320px; gap: 2.5rem; align-items: start;
}

/* --- Breadcrumbs --- */
.blog-breadcrumbs {
    display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
    font-size: 0.875rem; color: #6b7280; margin-bottom: 1.5rem;
}
.blog-breadcrumbs a {
    color: #667eea; text-decoration: none;
}
.blog-breadcrumbs a:hover {
    text-decoration: underline;
}
.blog-breadcrumbs .sep {
    color: #d1d5db;
}

/* --- Filter bar --- */
.blog-filter-bar {
    background: #f0f0ff; border-radius: 12px; padding: 1rem 1.5rem;
    display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; flex-wrap: wrap;
}
.blog-filter-bar .badge {
    background: #667eea; color: white; padding: 0.25rem 0.75rem; border-radius: 20px;
    font-size: 0.875rem; font-weight: 600;
}

/* --- Search bar --- */
.blog-search {
    display: flex; gap: 0.5rem; margin-bottom: 1.5rem;
}
.blog-search input {
    flex: 1; padding: 0.75rem 1rem; border: 2px solid #e5e7eb; border-radius: 12px;
    font-size: 0.9375rem; font-family: inherit; transition: border-color 0.2s;
}
.blog-search input:focus {
    outline: none; border-color: #667eea; box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}
.blog-search button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white; border: none; padding: 0.75rem 1.25rem; border-radius: 12px;
    cursor: pointer; font-weight: 600; transition: transform 0.2s;
}
.blog-search button:hover {
    transform: translateY(-1px);
}

/* --- Post grid --- */
.blog-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* --- Card --- */
.blog-card {
    background: white; border-radius: 16px; overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex; flex-direction: column;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.1);
}
.blog-card-img {
    width: 100%; height: 200px; object-fit: cover;
    background: linear-gradient(135deg, #667eea22 0%, #764ba222 100%);
}
.blog-card-img-placeholder {
    width: 100%; height: 200px;
    background: linear-gradient(135deg, #667eea22 0%, #764ba222 100%);
    display: flex; align-items: center; justify-content: center;
    color: #667eea; font-size: 2.5rem;
}
.blog-card-body {
    padding: 1.5rem; flex: 1; display: flex; flex-direction: column;
}
.blog-card-category {
    display: inline-block; padding: 0.2rem 0.6rem; border-radius: 6px;
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    color: white; margin-bottom: 0.75rem; width: fit-content;
}
.blog-card-title {
    font-size: 1.25rem; font-weight: 700; color: #111827; margin: 0 0 0.75rem 0;
    line-height: 1.4; letter-spacing: -0.3px;
}
.blog-card-title a {
    color: inherit; text-decoration: none;
}
.blog-card-title a:hover {
    color: #667eea;
}
.blog-card-excerpt {
    color: #6b7280; font-size: 0.9375rem; line-height: 1.6; margin: 0 0 1rem 0;
    flex: 1;
}
.blog-card-meta {
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    font-size: 0.8125rem; color: #9ca3af; border-top: 1px solid #f3f4f6;
    padding-top: 1rem;
}
.blog-card-meta i {
    margin-right: 0.25rem;
}

/* --- Sidebar --- */
.blog-sidebar {
    position: sticky; top: 2rem;
}
.blog-sidebar-section {
    background: white; border-radius: 16px; padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06); margin-bottom: 1.5rem;
}
.blog-sidebar-section h3 {
    font-size: 1.125rem; font-weight: 700; color: #111827;
    margin: 0 0 1rem 0; padding-bottom: 0.75rem;
    border-bottom: 2px solid #f3f4f6;
}
.blog-sidebar-categories {
    list-style: none; padding: 0; margin: 0;
}
.blog-sidebar-categories li {
    margin-bottom: 0.5rem;
}
.blog-sidebar-categories a {
    display: flex; align-items: center; justify-content: space-between;
    text-decoration: none; color: #374151; padding: 0.5rem 0.75rem;
    border-radius: 8px; transition: background-color 0.2s;
    font-size: 0.9375rem;
}
.blog-sidebar-categories a:hover {
    background-color: #f3f4f6;
}
.blog-sidebar-categories .cat-dot {
    width: 8px; height: 8px; border-radius: 50%; display: inline-block;
    margin-right: 0.5rem;
}
.blog-sidebar-categories .cat-count {
    background: #f3f4f6; color: #6b7280; padding: 0.125rem 0.5rem;
    border-radius: 10px; font-size: 0.75rem; font-weight: 600;
}
.blog-sidebar-popular {
    list-style: none; padding: 0; margin: 0;
}
.blog-sidebar-popular li {
    margin-bottom: 0.75rem; padding-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}
.blog-sidebar-popular li:last-child {
    border-bottom: none; margin-bottom: 0; padding-bottom: 0;
}
.blog-sidebar-popular a {
    text-decoration: none; color: #374151; font-size: 0.9375rem;
    font-weight: 500; line-height: 1.4; display: block;
    transition: color 0.2s;
}
.blog-sidebar-popular a:hover {
    color: #667eea;
}
.blog-sidebar-popular .pop-meta {
    font-size: 0.75rem; color: #9ca3af; margin-top: 0.25rem;
}

/* --- Newsletter box --- */
.blog-newsletter {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px; padding: 1.5rem; color: white; text-align: center;
    margin-bottom: 1.5rem;
}
.blog-newsletter h3 {
    color: white; border-bottom: none; padding-bottom: 0;
    font-size: 1.125rem; font-weight: 700; margin: 0 0 0.5rem 0;
}
.blog-newsletter p {
    font-size: 0.875rem; opacity: 0.9; margin: 0 0 1rem 0;
}
.blog-newsletter form {
    display: flex; flex-direction: column; gap: 0.5rem;
}
.blog-newsletter input {
    padding: 0.75rem 1rem; border: none; border-radius: 10px;
    font-size: 0.9375rem; font-family: inherit;
}
.blog-newsletter button {
    padding: 0.75rem; border: 2px solid white; background: transparent;
    color: white; border-radius: 10px; font-weight: 700; cursor: pointer;
    transition: background 0.2s;
}
.blog-newsletter button:hover {
    background: rgba(255,255,255,0.2);
}
.blog-newsletter-msg {
    padding: 0.5rem; border-radius: 8px; font-size: 0.8125rem;
    margin-top: 0.5rem; font-weight: 600;
}
.blog-newsletter-msg.success {
    background: rgba(16,185,129,0.2); color: #d1fae5;
}
.blog-newsletter-msg.error {
    background: rgba(239,68,68,0.2); color: #fecaca;
}

/* --- Pagination --- */
.blog-pagination {
    display: flex; justify-content: center; align-items: center;
    gap: 0.5rem; margin-top: 2.5rem; flex-wrap: wrap;
}
.blog-pagination a, .blog-pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px; border-radius: 10px;
    font-weight: 600; font-size: 0.9375rem; text-decoration: none;
    transition: all 0.2s;
}
.blog-pagination a {
    background: white; color: #374151; border: 2px solid #e5e7eb;
}
.blog-pagination a:hover {
    border-color: #667eea; color: #667eea;
}
.blog-pagination .active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white; border: none;
}
.blog-pagination .disabled {
    opacity: 0.4; pointer-events: none;
}

/* --- Article page --- */
.blog-article {
    background: white; border-radius: 20px; padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.blog-article-cover {
    width: 100%; max-height: 450px; object-fit: cover;
    border-radius: 16px; margin-bottom: 2rem;
}
.blog-article-header {
    margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 2px solid #f3f4f6;
}
.blog-article-header h1 {
    font-size: 2.25rem; font-weight: 800; color: #111827;
    line-height: 1.3; margin: 0 0 1rem 0; letter-spacing: -0.5px;
}
.blog-article-meta {
    display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap;
    color: #6b7280; font-size: 0.9375rem;
}
.blog-article-meta i {
    margin-right: 0.25rem; color: #667eea;
}

/* Article content typography */
.blog-article-content {
    font-size: 1.0625rem; line-height: 1.8; color: #374151;
}
.blog-article-content h2 {
    font-size: 1.625rem; font-weight: 700; color: #111827;
    margin: 2.5rem 0 1rem 0; padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}
.blog-article-content h3 {
    font-size: 1.25rem; font-weight: 700; color: #1f2937;
    margin: 2rem 0 0.75rem 0;
}
.blog-article-content p {
    margin: 0 0 1.25rem 0;
}
.blog-article-content img {
    max-width: 100%; height: auto; border-radius: 12px;
    margin: 1.5rem 0;
}
.blog-article-content ul, .blog-article-content ol {
    margin: 0 0 1.25rem 1.5rem; padding: 0;
}
.blog-article-content li {
    margin-bottom: 0.5rem;
}
.blog-article-content blockquote {
    border-left: 4px solid #667eea; padding: 1rem 1.5rem;
    background: #f8fafc; border-radius: 0 12px 12px 0;
    margin: 1.5rem 0; font-style: italic; color: #4b5563;
}
.blog-article-content a {
    color: #667eea; text-decoration: underline;
}
.blog-article-content strong {
    color: #111827;
}

/* TOC */
.blog-toc {
    background: #f8fafc; border-radius: 12px; padding: 1.25rem 1.5rem;
    margin-bottom: 2rem; border: 1px solid #e5e7eb;
}
.blog-toc h4 {
    margin: 0 0 0.75rem 0; font-size: 0.9375rem; font-weight: 700; color: #374151;
}
.blog-toc ul {
    list-style: none; margin: 0; padding: 0;
}
.blog-toc li {
    margin-bottom: 0.375rem;
}
.blog-toc a {
    color: #667eea; text-decoration: none; font-size: 0.9375rem;
}
.blog-toc a:hover {
    text-decoration: underline;
}
.blog-toc .toc-h3 {
    padding-left: 1rem;
}

/* Tags */
.blog-tags {
    display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 2rem;
    padding-top: 1.5rem; border-top: 2px solid #f3f4f6;
}
.blog-tag {
    background: #f3f4f6; color: #6b7280; padding: 0.3rem 0.75rem;
    border-radius: 8px; font-size: 0.8125rem; text-decoration: none;
    font-weight: 500; transition: all 0.2s;
}
.blog-tag:hover {
    background: #667eea; color: white;
}

/* Share buttons */
.blog-share {
    display: flex; align-items: center; gap: 0.75rem;
    margin-top: 1.5rem; padding-top: 1.5rem; border-top: 2px solid #f3f4f6;
}
.blog-share span {
    font-weight: 600; color: #374151; font-size: 0.9375rem;
}
.blog-share a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 10px;
    text-decoration: none; color: white; font-size: 1rem;
    transition: transform 0.2s;
}
.blog-share a:hover {
    transform: translateY(-2px);
}
.blog-share .share-linkedin { background: #0077b5; }
.blog-share .share-facebook { background: #1877f2; }
.blog-share .share-twitter  { background: #1da1f2; }

/* CTA block */
.blog-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px; padding: 2.5rem; text-align: center;
    margin-top: 2.5rem; color: white;
}
.blog-cta h3 {
    font-size: 1.5rem; font-weight: 800; margin: 0 0 0.75rem 0;
}
.blog-cta p {
    font-size: 1.0625rem; opacity: 0.95; margin: 0 0 1.5rem 0;
}
.blog-cta a {
    display: inline-block; background: white; color: #667eea;
    padding: 0.875rem 2rem; border-radius: 12px; text-decoration: none;
    font-weight: 700; font-size: 1rem; transition: transform 0.2s;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.blog-cta a:hover {
    transform: translateY(-2px);
}

/* Related posts */
.blog-related {
    margin-top: 3rem;
}
.blog-related h3 {
    font-size: 1.5rem; font-weight: 800; color: #111827; margin: 0 0 1.5rem 0;
}
.blog-related-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Empty state */
.blog-empty {
    text-align: center; padding: 4rem 2rem;
}
.blog-empty i {
    font-size: 3rem; color: #d1d5db; margin-bottom: 1rem;
}
.blog-empty h3 {
    color: #374151; font-size: 1.25rem; margin: 0 0 0.5rem 0;
}
.blog-empty p {
    color: #6b7280;
}

/* --- 404 --- */
.blog-404 {
    text-align: center; padding: 4rem 2rem;
    background: white; border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.blog-404 h2 {
    font-size: 2rem; font-weight: 800; color: #111827; margin: 1rem 0;
}
.blog-404 p {
    color: #6b7280; font-size: 1.0625rem; margin-bottom: 2rem;
}

/* --- Responsive --- */
@media (max-width: 960px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }
    .blog-sidebar {
        position: static;
    }
}
@media (max-width: 768px) {
    .blog-hero h1 { font-size: 2rem; }
    .blog-grid { grid-template-columns: 1fr; }
    .blog-article { padding: 1.5rem; }
    .blog-article-header h1 { font-size: 1.75rem; }
    .blog-article-content { font-size: 1rem; }
    .blog-related-grid { grid-template-columns: 1fr; }
}
