﻿/* ==========================================================================
   10K Surf - Modern Blog & Article Stylesheet
   ========================================================================== */

/* Blog Layout Container */
.blog-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

/* Hero Section */
.blog-hero {
    background: linear-gradient(135deg, #1a365d 0%, #2b6cb0 100%);
    color: #ffffff;
    padding: 42px 32px;
    border-radius: 16px;
    margin: 25px 0 35px;
    box-shadow: 0 10px 25px -5px rgba(43, 108, 176, 0.25);
    position: relative;
    overflow: hidden;
}

.blog-hero::after {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
}

.blog-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-bottom: 16px;
}

.blog-hero-title {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.blog-hero-desc {
    font-size: 16.5px;
    color: #e2e8f0;
    max-width: 700px;
    line-height: 1.6;
}

/* Two-column Blog Layout */
.blog-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 36px;
    align-items: start;
}

/* Filter Bar */
.blog-filter-bar {
    background: #ffffff;
    padding: 14px 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.filter-info {
    font-size: 14.5px;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-badge {
    background: #edf2f7;
    color: #2b6cb0;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
}

.filter-reset {
    font-size: 13px;
    color: #e53e3e;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.filter-reset:hover {
    text-decoration: underline;
}

/* Posts Grid */
.blog-posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

/* Blog Card */
.blog-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    padding: 24px 28px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    position: relative;
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px -6px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e0;
}

.blog-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.category-tag {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 6px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.category-tag:hover {
    opacity: 0.85;
}

/* Dynamic Category Colors */
.cat-seo { background: #ebf8ff; color: #2b6cb0; }
.cat-ppc { background: #feebc8; color: #c05621; }
.cat-video { background: #fed7d7; color: #9b2c2c; }
.cat-tips { background: #e6fffa; color: #234e52; }
.cat-growth { background: #faf5ff; color: #6b46c1; }
.cat-default { background: #edf2f7; color: #4a5568; }

.read-time {
    font-size: 12.5px;
    color: #a0aec0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.blog-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    line-height: 1.35;
    margin-bottom: 10px;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-card-title:hover {
    color: #2b6cb0;
}

.blog-card-excerpt {
    font-size: 14.5px;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 18px;
    flex-grow: 1;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid #edf2f7;
}

.blog-author-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3182ce, #63b3ed);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.author-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #2d3748;
}

.post-date {
    font-size: 12px;
    color: #718096;
}

.blog-card-stats {
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-item {
    font-size: 12.5px;
    color: #718096;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #2b6cb0;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: gap 0.2s ease;
}

.btn-read-more:hover {
    gap: 9px;
    color: #1a365d;
}

/* Empty State */
.blog-empty-state {
    background: #ffffff;
    border-radius: 14px;
    border: 1px dashed #cbd5e0;
    padding: 60px 20px;
    text-align: center;
}

.blog-empty-icon {
    font-size: 42px;
    margin-bottom: 12px;
}

.blog-empty-title {
    font-size: 19px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 6px;
}

.blog-empty-desc {
    font-size: 14px;
    color: #718096;
    max-width: 400px;
    margin: 0 auto 18px;
}

/* Sidebar Widgets */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.sidebar-widget {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    padding: 22px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.widget-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 2px solid #edf2f7;
}

/* Search Box */
.search-form {
    display: flex;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 11px 44px 11px 16px;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #f8fafc;
}

.search-input:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
    background: #ffffff;
}

.search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #718096;
    padding: 6px;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.search-btn:hover {
    color: #2b6cb0;
}

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

.category-list-item {
    border-bottom: 1px solid #f1f5f9;
}

.category-list-item:last-child {
    border-bottom: none;
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 4px;
    color: #4a5568;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.category-link:hover,
.category-link.active {
    color: #2b6cb0;
    padding-left: 6px;
    font-weight: 600;
}

.category-count {
    background: #f1f5f9;
    color: #718096;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

.category-link.active .category-count {
    background: #ebf8ff;
    color: #2b6cb0;
}

/* Popular Posts Widget */
.popular-posts-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.popular-post-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    text-decoration: none;
}

.popular-rank {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: #edf2f7;
    color: #718096;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.popular-post-item:nth-child(1) .popular-rank {
    background: #feebc8;
    color: #c05621;
}

.popular-post-item:nth-child(2) .popular-rank {
    background: #e2e8f0;
    color: #4a5568;
}

.popular-post-item:nth-child(3) .popular-rank {
    background: #fed7d7;
    color: #9b2c2c;
}

.popular-post-info {
    flex-grow: 1;
}

.popular-post-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #2d3748;
    line-height: 1.4;
    margin-bottom: 4px;
    transition: color 0.2s;
}

.popular-post-item:hover .popular-post-title {
    color: #2b6cb0;
}

.popular-post-meta {
    font-size: 11.5px;
    color: #a0aec0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Sidebar CTA Card */
.sidebar-cta {
    background: linear-gradient(135deg, #2b6cb0 0%, #1a365d 100%);
    color: #ffffff;
    border-radius: 14px;
    padding: 24px 20px;
    text-align: center;
}

.sidebar-cta-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.sidebar-cta-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
}

.sidebar-cta-desc {
    font-size: 13px;
    color: #e2e8f0;
    line-height: 1.5;
    margin-bottom: 16px;
}

.sidebar-cta-btn {
    display: inline-block;
    background: #48bb78;
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    transition: background 0.2s, transform 0.15s;
}

.sidebar-cta-btn:hover {
    background: #38a169;
    transform: translateY(-1px);
}

/* ==========================================================================
   Single Article Page Styles
   ========================================================================== */
.article-header {
    margin-bottom: 30px;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #718096;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: #4a5568;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #2b6cb0;
}

.breadcrumb-sep {
    color: #cbd5e0;
}

.article-title {
    font-size: 32px;
    font-weight: 800;
    color: #1a202c;
    line-height: 1.3;
    margin-bottom: 18px;
    letter-spacing: -0.5px;
}

.article-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 14px;
}

.article-author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.article-author-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3182ce, #2b6cb0);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-author-name {
    font-size: 15px;
    font-weight: 700;
    color: #2d3748;
}

.article-author-title {
    font-size: 12.5px;
    color: #718096;
}

.article-stats-group {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: #718096;
}

/* Article Content Body */
.article-body {
    background: #ffffff;
    padding: 36px 40px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    font-size: 16.5px;
    line-height: 1.8;
    color: #2d3748;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    margin-bottom: 35px;
}

.article-body h2, .article-body h3 {
    color: #1a202c;
    font-weight: 700;
    margin-top: 30px;
    margin-bottom: 14px;
    line-height: 1.4;
}

.article-body h2 { font-size: 24px; border-bottom: 1px solid #edf2f7; padding-bottom: 8px; }
.article-body h3 { font-size: 20px; }

.article-body p {
    margin-bottom: 18px;
}

.article-body ul, .article-body ol {
    margin: 16px 0 20px 24px;
    color: #4a5568;
}

.article-body li {
    margin-bottom: 8px;
}

.article-body strong {
    color: #1a202c;
}

.article-callout {
    background: #ebf8ff;
    border-left: 4px solid #3182ce;
    padding: 18px 22px;
    border-radius: 0 8px 8px 0;
    margin: 24px 0;
    font-size: 15px;
    color: #2b6cb0;
}

/* Comments Section */
.comments-section {
    background: #ffffff;
    padding: 36px 40px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 14px;
    border-bottom: 2px solid #edf2f7;
}

.comments-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a202c;
    display: flex;
    align-items: center;
    gap: 8px;
}

.comments-count-pill {
    background: #edf2f7;
    color: #2b6cb0;
    font-size: 13px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 12px;
}

/* Comments List */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 36px;
}

.comment-card {
    display: flex;
    gap: 16px;
    padding: 18px 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.comment-content {
    flex-grow: 1;
}

.comment-author-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.comment-author-name {
    font-size: 14.5px;
    font-weight: 700;
    color: #2d3748;
}

.comment-date {
    font-size: 12px;
    color: #a0aec0;
}

.comment-text {
    font-size: 14px;
    color: #4a5568;
    line-height: 1.6;
}

/* Comment Form */
.comment-form-container {
    background: #f8fafc;
    padding: 26px 28px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.comment-form-title {
    font-size: 17px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 6px;
}

.comment-form-subtitle {
    font-size: 13px;
    color: #718096;
    margin-bottom: 20px;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.form-label {
    font-size: 13.5px;
    font-weight: 600;
    color: #4a5568;
}

.form-input, .form-textarea {
    width: 100%;
    padding: 11px 14px;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    font-size: 14px;
    font-family: inherit;
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus, .form-textarea:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
}

.form-textarea {
    resize: vertical;
    min-height: 110px;
}

.btn-submit-comment {
    background: linear-gradient(180deg, #3182ce 0%, #2b6cb0 100%);
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(43, 108, 176, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s, transform 0.1s;
}

.btn-submit-comment:hover {
    background: linear-gradient(180deg, #2b6cb0 0%, #1a365d 100%);
    transform: translateY(-1px);
}

.comment-alert-success {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    color: #22543d;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-alert-error {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    color: #9b2c2c;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 960px) {
    .blog-layout {
        grid-template-columns: 1fr;
    }
    .blog-hero-title {
        font-size: 28px;
    }
    .article-title {
        font-size: 26px;
    }
    .article-body, .comments-section {
        padding: 24px 20px;
    }
    .form-grid-2 {
        grid-template-columns: 1fr;
    }
}
/* Pagination */
.pagination-container { display: flex; justify-content: center; gap: 8px; margin-top: 40px; margin-bottom: 20px; }
.page-link { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 8px; font-weight: 600; font-size: 15px; color: #4a5568; background-color: #edf2f7; text-decoration: none; transition: all 0.2s ease; }
.page-link:hover:not(.disabled) { background-color: #e2e8f0; color: #2b6cb0; transform: translateY(-1px); }
.page-link.active { background-color: #3182ce; color: #fff; box-shadow: 0 4px 10px rgba(49, 130, 206, 0.3); pointer-events: none; }
.page-link.disabled { opacity: 0.5; pointer-events: none; background-color: transparent; border: 1px solid #e2e8f0; }
.page-link.prev-next { min-width: auto; padding: 0 16px; }
