/* Blog Styles */

.blog-hero {
    background: linear-gradient(135deg, #1F3A8A 0%, #162D6B 100%);
    color: #FFFFFF;
    padding: 120px 0 80px;
    text-align: center;
}

.blog-hero .badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    color: #38BDF8;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.blog-hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.blog-hero .lead {
    font-size: 20px;
    color: #E5E7EB;
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

/* Blog Main Section */
.blog-main-section {
    padding: 40px 0 80px;
    background: #F9FAFB;
}

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

/* Blog Sidebar */
.blog-sidebar {
    background: #FFFFFF;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 100px;
}

.sidebar-search {
    position: relative;
    margin-bottom: 24px;
    display: flex;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.sidebar-search input {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    font-size: 14px;
    background: #F9FAFB;
    color: #374151;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.sidebar-search input::placeholder {
    color: #9CA3AF;
}

.sidebar-search input:focus {
    outline: none;
    border-color: #1F3A8A;
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(31, 58, 138, 0.1);
}

.sidebar-search .search-btn {
    padding: 12px 14px;
    background: #1F3A8A;
    color: #FFFFFF;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-search .search-btn:hover {
    background: #162D6B;
}

.sidebar-search .search-btn i {
    font-size: 14px;
}

/* Search active state */
.sidebar-search.search-active input {
    border-color: #10B981;
    background: #ECFDF5;
}

.sidebar-search.search-active .search-btn {
    background: #10B981;
}

.sidebar-search.search-active .search-btn:hover {
    background: #059669;
}

/* Filter Groups */
.filter-group {
    margin-bottom: 24px;
}

.filter-group:last-of-type {
    margin-bottom: 16px;
}

.filter-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group-title i {
    color: #6B7280;
    font-size: 14px;
}

/* Filter List */
.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    margin-bottom: 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #4B5563;
}

.filter-item:hover {
    background: #F3F4F6;
    color: #1F3A8A;
}

.filter-item.active {
    background: #1F3A8A;
    color: #FFFFFF;
}

.filter-item.active .filter-count {
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
}

.filter-name {
    font-size: 14px;
    font-weight: 500;
}

.filter-count {
    font-size: 12px;
    font-weight: 600;
    background: #E5E7EB;
    color: #6B7280;
    padding: 2px 8px;
    border-radius: 10px;
}

/* Tag List - Different Style */
.tag-list .tag-item.active {
    background: #10B981;
    color: #FFFFFF;
}

.tag-list .tag-item.active .filter-count {
    background: rgba(255, 255, 255, 0.25);
    color: #FFFFFF;
}

.tag-list .tag-item:hover:not(.active) {
    background: #D1FAE5;
    color: #065F46;
}

.tag-list .tag-item:hover:not(.active) .filter-count {
    background: #A7F3D0;
    color: #065F46;
}

/* Results Info in Sidebar */
.blog-sidebar .results-info {
    padding-top: 16px;
    border-top: 1px solid #E5E7EB;
    text-align: center;
}

#results-count {
    font-size: 13px;
    color: #6B7280;
    font-weight: 500;
}

/* Blog Content Area */
.blog-content {
    min-height: 400px;
}

/* Search Results Header */
.search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.search-results-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1E40AF;
    font-size: 15px;
}

.search-results-info i {
    color: #3B82F6;
}

.search-results-info strong {
    color: #1E3A8A;
}

.search-results-count {
    color: #6B7280;
    font-size: 14px;
}

.clear-search-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #FFFFFF;
    border: 1px solid #D1D5DB;
    color: #374151;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-search-btn:hover {
    background: #F3F4F6;
    border-color: #9CA3AF;
}

.clear-search-btn i {
    font-size: 12px;
}

/* Legacy - keep for compatibility */
.blog-controls {
    max-width: 900px;
    margin: 0 auto;
}

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

.search-box i {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #9CA3AF;
    font-size: 18px;
}

.search-box input {
    width: 100%;
    padding: 16px 20px 16px 52px;
    border: 1px solid #D1D5DB;
    border-radius: 12px;
    font-size: 16px;
    background: #FFFFFF;
    color: #374151;
    transition: all 0.3s ease;
}

.search-box input::placeholder {
    color: #9CA3AF;
}

.search-box input:focus {
    outline: none;
    border-color: #1F3A8A;
    box-shadow: 0 0 0 3px rgba(31, 58, 138, 0.1);
}

.filter-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-btn {
    padding: 10px 24px;
    border: 1px solid #D1D5DB;
    background: #FFFFFF;
    color: #374151;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: #1F3A8A;
    background: #F3F4F6;
}

.filter-btn.active {
    background: #1F3A8A;
    border-color: #1F3A8A;
    color: #FFFFFF;
}



/* Results Info */
.results-info {
    margin-top: 16px;
    text-align: center;
}

#results-count {
    font-size: 14px;
    color: #6B7280;
    font-weight: 500;
}

/* Clickable Tags and Categories */
.clickable-tag,
.clickable-category {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.clickable-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.clickable-category:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Blog Posts Section */
.blog-posts-section {
    padding: 80px 0;
    background: #F9FAFB;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 80px 20px;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #E5E7EB;
    border-top-color: #2563EB;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-state p {
    color: #6B7280;
    font-size: 16px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state i {
    font-size: 64px;
    color: #D1D5DB;
    margin-bottom: 24px;
}

.empty-state h3 {
    font-size: 24px;
    color: #1F2937;
    margin-bottom: 12px;
}

.empty-state p {
    color: #6B7280;
    font-size: 16px;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Post Card */
.post-card {
    background: #FFFFFF;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.post-image-link {
    display: block;
    cursor: pointer;
}

.post-image-link:hover .post-image {
    transform: scale(1.05);
}

.post-image {
    width: 100%;
    height: 220px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #F9FAFB;
    transition: transform 0.3s ease;
}

.post-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563EB, #60A5FA);
}

.post-image-placeholder i {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.8);
}

.post-content {
    padding: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.post-category {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #FFFFFF;
}

.post-date {
    display: none;
}

.post-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
    color: #1F2937;
}

.post-card h3 a {
    color: #1F2937;
    text-decoration: none;
    transition: color 0.3s ease;
}

.post-card h3 a:hover {
    color: #2563EB;
}

.post-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #6B7280;
    margin-bottom: 20px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-footer {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding-top: 16px;
    border-top: 1px solid #E5E7EB;
}

.post-author {
    display: none;
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    overflow: visible;
}

.post-tags .tag {
    padding: 4px 10px;
    background: #F3F4F6;
    color: #6B7280;
    font-size: 12px;
    border-radius: 8px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2563EB;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.read-more:hover {
    gap: 12px;
    color: #1D4ED8;
}

.read-more i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: translateX(4px);
}

/* Load More */
.load-more-container {
    text-align: center;
    margin-top: 48px;
}

.load-more-container .btn-secondary {
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid #2563EB;
    background: transparent;
    color: #2563EB;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-container .btn-secondary:hover {
    background: #2563EB;
    color: #FFFFFF;
}

.load-more-container .btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 120px 0 60px;
    }

    .blog-hero h1 {
        font-size: 36px;
    }

    .blog-hero .lead {
        font-size: 18px;
    }

    .filter-buttons {
        gap: 8px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .post-image {
        height: 200px;
    }

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

    /* Search Results Header - Mobile */
    .search-results-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px 16px;
        gap: 10px;
    }

    .search-results-info {
        font-size: 14px;
        flex-wrap: wrap;
    }

    .clear-search-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
    }

    /* Search box mobile */
    .sidebar-search {
        flex-direction: row;
    }

    .sidebar-search .search-btn {
        padding: 12px 14px;
    }
}
