/* =====================================================
   BLOG & ENCYCLOPEDIA SHARED CSS
   ===================================================== */

/* Encyclopedia Hero Section */
.encyclopedia-hero {
    background: linear-gradient(135deg, #153152 0%, #0c1d30 100%);
    padding: 100px 0 60px;
    text-align: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.encyclopedia-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/pattern.png') center/cover;
    opacity: 0.05;
}

.blog-archive-section .container {
    display: grid !important;
}

.encyclopedia-hero-content {
    position: relative;
    z-index: 1;
}

.encyclopedia-hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #FBB900;
}

.encyclopedia-hero-desc {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
}

/* Category Filter */
.blog-filter-container {
    background: #fff;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 80px;
    /* Header height */
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.blog-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-filter-btn {
    background: #f5f7fa;
    color: #555;
    border: none;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.blog-filter-btn:hover,
.blog-filter-btn.active {
    background: #153152;
    color: #fff;
}

/* Blog Grid */
.blog-archive-section {
    padding: 60px 0;
    background: #f9f9fb;
    min-height: 50vh;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

/* Pagination */
.blog-pagination {
    margin-top: 50px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.blog-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    background: #fff;
    color: #153152;
    text-decoration: none;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.blog-pagination .page-numbers:hover,
.blog-pagination .page-numbers.current {
    background: #FBB900;
    color: #153152;
}

/* =====================================================
   SINGLE POST
   ===================================================== */
.sp-hero {
    background: #153152;
    padding: 60px 0;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.sp-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.sp-hero-image-col {
    position: relative;
}

.sp-hero-img {
    width: 100%;
    height: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.sp-hero-info-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.sp-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.4;
    max-width: 900px;
    margin-bottom: 25px;
    color: #fff;
}

.sp-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 30px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 25px;
}

.sp-breadcrumb {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sp-breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.sp-breadcrumb a:hover {
    color: #FBB900;
}

.sp-breadcrumb .sep {
    font-size: 0.8rem;
    opacity: 0.5;
}

.sp-meta-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sp-author-avatar img {
    border-radius: 50%;
    display: block;
}

.sp-icon {
    font-size: 1.5rem;
    color: #FBB900;
}

.sp-author-info {
    display: flex;
    flex-direction: column;
}

.sp-meta-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 4px;
}

.sp-meta-val {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Removed since we deleted sp-thumbnail */

.sp-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}

.sp-sidebar {
    flex: 0 0 300px;
    position: sticky;
    top: 100px;
}

.sp-content {
    flex: 1;
    min-width: 0;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.02);
}

.sp-sidebar-inner {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.02);
}

.sp-toc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    color: #153152;
}

.sp-toc-header i {
    font-size: 1.2rem;
    color: #FBB900;
}

.sp-toc-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.sp-toc-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sp-toc-nav li {
    margin-bottom: 12px;
    position: relative;
}

.sp-toc-nav li::before {
    content: '';
    position: absolute;
    right: 0;
    top: 10px;
    width: 5px;
    height: 5px;
    background: #d1d5db;
    border-radius: 50%;
    transition: background 0.3s;
}

.sp-toc-nav a {
    color: #555;
    text-decoration: none;
    font-size: 0.95rem;
    display: block;
    padding-right: 15px;
    line-height: 1.6;
    transition: color 0.3s;
}

.sp-toc-nav a:hover,
.sp-toc-nav a.active {
    color: #153152;
    font-weight: 600;
}

.sp-toc-nav a.active {
    color: #FBB900;
}

.sp-toc-nav li:has(a.active)::before {
    background: #FBB900;
}

.sp-share-widget {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.sp-share-title {
    font-size: 1.1rem;
    color: #153152;
    margin-bottom: 15px;
    font-weight: 600;
}

.sp-share-links {
    display: flex;
    gap: 10px;
}

.sp-share-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    color: #153152;
    background: #f5f7fa;
    border: 1px solid #eee;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 1.2rem;
}

.sp-share-links a:hover {
    transform: translateY(-3px);
    background: #FBB900;
    color: #fff;
    border-color: #FBB900;
}

.sp-body {
    font-size: 1.15rem;
    line-height: 1.9;
    color: #444;
}

.sp-body h2 {
    font-size: 1.8rem;
    color: #153152;
    margin: 40px 0 20px;
    font-weight: 800;
    padding-right: 15px;
    border-right: 4px solid #FBB900;
}

.sp-body h3 {
    font-size: 1.4rem;
    color: #153152;
    margin: 30px 0 15px;
    font-weight: 700;
}

.sp-body p {
    margin-bottom: 20px;
}

.sp-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.sp-body ul, .sp-body ol {
    margin-bottom: 20px;
    padding-right: 20px;
}

.sp-body li {
    margin-bottom: 10px;
}

.sp-body blockquote {
    background: #f9f9fb;
    border-right: 4px solid #153152;
    padding: 20px;
    margin: 30px 0;
    font-style: italic;
    color: #666;
    border-radius: 8px 0 0 8px;
}

.sp-tags {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 15px;
}

.sp-tags-title {
    font-weight: 600;
    color: #153152;
}

.sp-tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sp-tags-list a {
    background: #f5f7fa;
    color: #555;
    padding: 6px 15px;
    border-radius: 4px;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s;
}

.sp-tags-list a:hover {
    background: #FBB900;
    color: #fff;
}

.related-posts-section {
    padding: 60px 0;
}

.related-header {
    text-align: center;
    margin-bottom: 40px;
}

.related-title {
    font-size: 2rem;
    color: #153152;
    margin-bottom: 10px;
    font-weight: 800;
}

.related-subtitle {
    color: #777;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 992px) {
    .sp-hero-grid {
        grid-template-columns: 1fr;
    }
    
    .sp-hero-image-col {
        order: -1;
        margin-bottom: 20px;
    }

    .sp-layout {
        flex-direction: column-reverse;
    }
    
    .sp-sidebar {
        flex: none;
        width: 100%;
        position: relative;
        top: 0;
    }
}

@media (max-width: 768px) {
    .encyclopedia-hero-title {
        font-size: 2rem;
    }

    .sp-title {
        font-size: 1.8rem;
    }

    .sp-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .sp-content {
        padding: 20px;
    }

    .blog-filter-container {
        position: relative;
        top: 0;
    }
}