/* ============================================
   Blog Page Styles
   ============================================ */

/* Blog Page Layout */
.blog-page-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    padding: 0 20px;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    margin-bottom: 30px;
    padding: 15px 0;
}

.breadcrumb-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 6px 12px;
    border-radius: 6px;
}

.breadcrumb-link:hover {
    color: #AB47BC;
    background: rgba(171, 71, 188, 0.08);
}

.breadcrumb-link i {
    font-size: 13px;
}

.breadcrumb-separator {
    color: #ccc;
    font-size: 11px;
    margin: 0 4px;
}

.breadcrumb-current span {
    color: #AB47BC;
    font-size: 14px;
    font-weight: 600;
}

/* Blog Header */
.blog-page-header {
    background: linear-gradient(135deg, #AB47BC 0%, #BA68C8 100%);
    border-radius: 16px;
    padding: 50px 40px;
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 40px rgba(171, 71, 188, 0.2);
    position: relative;
    overflow: hidden;
}

.blog-page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.blog-page-header::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.blog-header-content {
    position: relative;
    z-index: 1;
}

.blog-page-title {
    color: #fff;
    font-size: 42px;
    font-weight: 800;
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    letter-spacing: -0.5px;
}

.blog-page-title i {
    font-size: 38px;
    opacity: 0.9;
}

.blog-page-description {
    color: rgba(255, 255, 255, 0.95);
    font-size: 16px;
    margin: 0;
    max-width: 500px;
    line-height: 1.6;
}

.blog-header-stats {
    display: flex;
    gap: 30px;
    position: relative;
    z-index: 1;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 20px 30px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item i {
    color: #fff;
    font-size: 28px;
    opacity: 0.9;
}

.stat-number {
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Filter Tabs */
.blog-filter-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
    padding: 8px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow-x: auto;
    scrollbar-width: thin;
}

.blog-filter-tabs::-webkit-scrollbar {
    height: 4px;
}

.blog-filter-tabs::-webkit-scrollbar-thumb {
    background: #AB47BC;
    border-radius: 2px;
}

.filter-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-tab i {
    font-size: 13px;
}

.filter-tab:hover {
    background: rgba(171, 71, 188, 0.08);
    color: #AB47BC;
}

.filter-tab.active {
    background: linear-gradient(135deg, #AB47BC 0%, #BA68C8 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(171, 71, 188, 0.3);
}

/* Blog Posts Grid */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.blog-post-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.blog-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(171, 71, 188, 0.15);
}

/* Post Image */
.post-image-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.post-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.post-image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-post-card:hover .post-image-link img {
    transform: scale(1.08);
}

.post-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(171, 71, 188, 0.9) 0%, rgba(186, 104, 200, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.blog-post-card:hover .post-image-overlay {
    opacity: 1;
}

.read-icon {
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-post-card:hover .read-icon {
    transform: scale(1);
}

.read-icon i {
    color: #AB47BC;
    font-size: 24px;
}

.post-category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
}

.post-category-badge a {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #AB47BC;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.post-category-badge a:hover {
    background: #AB47BC;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(171, 71, 188, 0.3);
}

/* Post Content */
.post-content-wrapper {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-title {
    margin: 0 0 15px 0;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 700;
}

.post-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-title a:hover {
    color: #AB47BC;
}

/* Post Meta */
.post-meta-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author-info img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #f0f0f0;
}

.author-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-name {
    color: #333;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.author-name:hover {
    color: #AB47BC;
}

.post-date {
    color: #888;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-date i {
    font-size: 11px;
}

.post-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reading-time {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #888;
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    background: #f8f9fa;
    border-radius: 12px;
}

.reading-time i {
    color: #AB47BC;
    font-size: 13px;
}

/* Post Excerpt */
.post-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 20px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Read More Link */
.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #AB47BC;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: auto;
}

.read-more-link:hover {
    gap: 12px;
    color: #8E24AA;
}

.read-more-link i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.read-more-link:hover i {
    transform: translateX(4px);
}

/* Load More Button */
.blog-load-more-wrapper {
    display: flex;
    justify-content: center;
    margin: 30px 0 50px;
}

.blog-load-more-btn {
    background: linear-gradient(135deg, #AB47BC 0%, #BA68C8 100%);
    color: #fff;
    border: none;
    padding: 16px 48px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-width: 200px;
    box-shadow: 0 4px 16px rgba(171, 71, 188, 0.3);
}

.blog-load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(171, 71, 188, 0.4);
}

.blog-load-more-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.blog-load-more-btn .btn-text {
    display: inline-block;
    transition: opacity 0.3s;
}

.blog-load-more-btn.loading .btn-text {
    opacity: 0;
}

.btn-spinner {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.blog-load-more-btn.loading .btn-spinner {
    display: block;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* No Posts Message */
.no-posts-message {
    text-align: center;
    padding: 80px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.no-posts-icon {
    margin-bottom: 20px;
}

.no-posts-icon i {
    font-size: 80px;
    color: #ddd;
}

.no-posts-message h2 {
    color: #333;
    font-size: 28px;
    margin: 0 0 15px 0;
}

.no-posts-message p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Blog Page Sidebar */
.blog-page-sidebar {
    position: sticky;
    top: 80px;
    align-self: flex-start;
}

/* Dark Mode */
body.dark-mode .blog-page-header {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

body.dark-mode .blog-filter-tabs {
    background: #2a2a2a;
}

body.dark-mode .filter-tab {
    color: #aaa;
}

body.dark-mode .filter-tab:hover {
    background: rgba(171, 71, 188, 0.15);
    color: #BA68C8;
}

body.dark-mode .blog-post-card {
    background: #2a2a2a;
}

body.dark-mode .post-title a {
    color: #e0e0e0;
}

body.dark-mode .post-meta-info {
    border-bottom-color: #3a3a3a;
}

body.dark-mode .author-name {
    color: #e0e0e0;
}

body.dark-mode .reading-time {
    background: #333;
}

body.dark-mode .post-excerpt {
    color: #aaa;
}

body.dark-mode .no-posts-message {
    background: #2a2a2a;
}

body.dark-mode .no-posts-message h2 {
    color: #e0e0e0;
}

body.dark-mode .no-posts-message p {
    color: #aaa;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .blog-page-layout {
        grid-template-columns: 1fr 300px;
        gap: 30px;
    }
    
    .blog-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .blog-page-layout {
        grid-template-columns: 1fr;
    }
    
    .blog-page-sidebar {
        display: none;
    }
    
    .blog-page-header {
        flex-direction: column;
        gap: 30px;
        text-align: center;
    }
    
    .blog-header-stats {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .blog-page-layout {
        padding: 0 15px;
    }
    
    .blog-page-header {
        padding: 40px 25px;
    }
    
    .blog-page-title {
        font-size: 32px;
    }
    
    .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .blog-filter-tabs {
        gap: 8px;
        padding: 6px;
    }
    
    .filter-tab {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .stat-item {
        padding: 15px 20px;
    }
    
    .stat-number {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .blog-page-title {
        font-size: 26px;
        flex-direction: column;
        gap: 10px;
    }
    
    .blog-header-stats {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .stat-item {
        width: 100%;
    }
}
