/*--------------------------------------------------------------
# Blog Section - KedereAI Platform
# Styles for blog listing and single post pages
--------------------------------------------------------------*/

/*--------------------------------------------------------------
# Blog Hero Section
--------------------------------------------------------------*/
.blog-hero {
    background: linear-gradient(135deg, var(--KedereAI-blue) 0%, var(--KedereAI-green) 100%);
    padding: 100px 0 60px;
    color: white;
    text-align: center;
}

.blog-hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 16px;
}

.blog-hero p {
    font-size: 18px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/*--------------------------------------------------------------
# Blog Filters & Search
--------------------------------------------------------------*/
.blog-filters {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 20px 0;
    position: sticky;
    top: 80px;
    z-index: 100;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.filter-tab {
    padding: 8px 20px;
    border: 2px solid var(--gray-200);
    border-radius: 50px;
    background: white;
    color: var(--gray-800);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-tab:hover {
    border-color: var(--KedereAI-blue);
    color: var(--KedereAI-blue);
}

.filter-tab.active {
    background: var(--KedereAI-blue);
    border-color: var(--KedereAI-blue);
    color: white;
}

.blog-search {
    position: relative;
    max-width: 400px;
}

.blog-search input {
    width: 100%;
    padding: 12px 20px 12px 48px;
    border: 2px solid var(--gray-200);
    border-radius: 50px;
    font-size: 15px;
    transition: all 0.3s;
}

.blog-search input:focus {
    outline: none;
    border-color: var(--KedereAI-blue);
    box-shadow: 0 0 0 3px rgba(64, 100, 175, 0.1);
}

.blog-search i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-800);
    font-size: 18px;
}

/*--------------------------------------------------------------
# Blog Grid
--------------------------------------------------------------*/
.blog-section {
    padding: 60px 0;
    background: var(--gray-50);
}

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

@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/*--------------------------------------------------------------
# Blog Card
--------------------------------------------------------------*/
.blog-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.blog-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-category {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-faac {
    background: rgba(64, 100, 175, 0.9);
    color: white;
}

.category-budget {
    background: rgba(62, 165, 73, 0.9);
    color: white;
}

.category-projects {
    background: rgba(245, 158, 11, 0.9);
    color: white;
}

.category-transparency {
    background: rgba(6, 182, 212, 0.9);
    color: white;
}

.category-general {
    background: rgba(107, 114, 128, 0.9);
    color: white;
}

.blog-card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-title a {
    color: inherit;
    text-decoration: none;
}

.blog-card-title a:hover {
    color: var(--KedereAI-blue);
}

.blog-card-excerpt {
    color: var(--gray-800);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

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

.blog-card-author img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

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

.blog-card-author-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--heading-color);
}

.blog-card-date {
    font-size: 12px;
    color: var(--gray-800);
}

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

.blog-card-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--gray-800);
}

.blog-card-stat i {
    font-size: 14px;
}

/*--------------------------------------------------------------
# Blog Sidebar
--------------------------------------------------------------*/
.blog-sidebar {
    position: sticky;
    top: 160px;
}

.sidebar-widget {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.sidebar-widget h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--heading-color);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-200);
}

.popular-post {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
}

.popular-post:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-post:first-child {
    padding-top: 0;
}

.popular-post-image {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.popular-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.popular-post-content h5 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
}

.popular-post-content h5 a {
    color: var(--heading-color);
}

.popular-post-content h5 a:hover {
    color: var(--KedereAI-blue);
}

.popular-post-date {
    font-size: 12px;
    color: var(--gray-800);
}

.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
}

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

.category-list li a {
    color: var(--heading-color);
    font-weight: 500;
}

.category-list li a:hover {
    color: var(--KedereAI-blue);
}

.category-list li span {
    background: var(--gray-100);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-800);
}

/*--------------------------------------------------------------
# Single Blog Post
--------------------------------------------------------------*/
.blog-post-header {
    background: linear-gradient(135deg, var(--KedereAI-blue) 0%, var(--KedereAI-green) 100%);
    padding: 120px 0 60px;
    color: white;
}

.blog-post-breadcrumb {
    margin-bottom: 24px;
}

.blog-post-breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

.blog-post-breadcrumb a:hover {
    color: white;
}

.blog-post-breadcrumb span {
    color: rgba(255, 255, 255, 0.6);
    margin: 0 8px;
}

.blog-post-category {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.blog-post-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 24px;
    max-width: 800px;
}

.blog-post-meta {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.blog-post-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.blog-post-author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.blog-post-author-name {
    font-weight: 600;
    font-size: 16px;
}

.blog-post-author-title {
    font-size: 14px;
    opacity: 0.8;
}

.blog-post-info {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    opacity: 0.9;
}

.blog-post-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/*--------------------------------------------------------------
# Blog Post Content
--------------------------------------------------------------*/
.blog-post-content {
    padding: 60px 0;
}

.blog-featured-image {
    margin-top: -120px;
    margin-bottom: 40px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.blog-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.blog-article {
    max-width: 800px;
    margin: 0 auto;
}

.blog-article h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 40px 0 20px;
    color: var(--heading-color);
}

.blog-article h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 32px 0 16px;
    color: var(--heading-color);
}

.blog-article p {
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--default-color);
}

.blog-article ul,
.blog-article ol {
    margin: 20px 0;
    padding-left: 24px;
}

.blog-article li {
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 10px;
}

.blog-article blockquote {
    margin: 30px 0;
    padding: 24px 30px;
    background: linear-gradient(135deg, rgba(64, 100, 175, 0.08) 0%, rgba(62, 165, 73, 0.08) 100%);
    border-left: 4px solid var(--KedereAI-blue);
    border-radius: 0 12px 12px 0;
    font-size: 18px;
    font-style: italic;
    color: var(--heading-color);
}

.blog-article img {
    max-width: 100%;
    border-radius: 12px;
    margin: 24px 0;
}

/*--------------------------------------------------------------
# Blog Actions (Like, Share)
--------------------------------------------------------------*/
.blog-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    margin: 40px 0;
}

.blog-like-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid var(--gray-200);
    border-radius: 50px;
    background: white;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
}

.blog-like-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.blog-like-btn.liked {
    background: #fef2f2;
    border-color: #ef4444;
    color: #ef4444;
}

.blog-like-btn.liked i {
    animation: heartBeat 0.5s ease-in-out;
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    25% {
        transform: scale(1.3);
    }

    50% {
        transform: scale(1);
    }

    75% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.blog-share {
    display: flex;
    align-items: center;
    gap: 12px;
}

.blog-share-label {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 14px;
}

.share-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 18px;
}

.share-btn.twitter {
    background: #1DA1F2;
    color: white;
}

.share-btn.facebook {
    background: #1877F2;
    color: white;
}

.share-btn.linkedin {
    background: #0A66C2;
    color: white;
}

.share-btn.whatsapp {
    background: #25D366;
    color: white;
}

.share-btn.copy {
    background: var(--gray-200);
    color: var(--gray-800);
}

.share-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/*--------------------------------------------------------------
# Author Bio
--------------------------------------------------------------*/
.author-bio {
    background: var(--gray-50);
    border-radius: 16px;
    padding: 32px;
    display: flex;
    gap: 24px;
    margin: 40px 0;
}

.author-bio-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.author-bio-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-bio-content h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.author-bio-content .author-title {
    color: var(--KedereAI-blue);
    font-weight: 600;
    margin-bottom: 12px;
}

.author-bio-content p {
    color: var(--gray-800);
    line-height: 1.7;
    margin-bottom: 16px;
}

.author-social {
    display: flex;
    gap: 12px;
}

.author-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-800);
    transition: all 0.3s;
}

.author-social a:hover {
    background: var(--KedereAI-blue);
    color: white;
}

/*--------------------------------------------------------------
# Related Posts
--------------------------------------------------------------*/
.related-posts {
    padding: 60px 0;
    background: var(--gray-50);
}

.related-posts h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 32px;
    text-align: center;
}

/*--------------------------------------------------------------
# Comments Section
--------------------------------------------------------------*/
.comments-section {
    margin-top: 60px;
}

.comments-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.comments-header h3 {
    font-size: 24px;
    font-weight: 700;
}

.comments-count {
    background: var(--KedereAI-blue);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

.comment-form {
    background: var(--gray-50);
    padding: 32px;
    border-radius: 16px;
    margin-bottom: 40px;
}

.comment-form h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

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

@media (max-width: 576px) {
    .comment-form .form-row {
        grid-template-columns: 1fr;
    }
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--KedereAI-blue);
}

.comment-form textarea {
    min-height: 120px;
    resize: vertical;
    margin-bottom: 16px;
}

.comment-form button {
    padding: 14px 32px;
    background: var(--KedereAI-blue);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.comment-form button:hover {
    background: #35539a;
    transform: translateY(-2px);
}

.comments-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-item {
    padding: 24px 0;
    border-bottom: 1px solid var(--gray-200);
}

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

.comment-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.comment-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--KedereAI-blue), var(--KedereAI-green));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 18px;
    flex-shrink: 0;
}

.comment-meta {
    flex: 1;
}

.comment-author {
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 4px;
}

.comment-date {
    font-size: 13px;
    color: var(--gray-800);
}

.comment-content {
    padding-left: 64px;
    color: var(--default-color);
    line-height: 1.7;
    margin-bottom: 12px;
}

.comment-actions {
    padding-left: 64px;
    display: flex;
    gap: 16px;
}

.comment-action-btn {
    background: none;
    border: none;
    color: var(--gray-800);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.comment-action-btn:hover {
    color: var(--KedereAI-blue);
}

.comment-action-btn.liked {
    color: #ef4444;
}

/* Nested Comments */
.comment-replies {
    margin-left: 64px;
    margin-top: 16px;
    padding-left: 24px;
    border-left: 2px solid var(--gray-200);
}

.comment-replies .comment-item {
    padding: 16px 0;
}

.comment-replies .comment-avatar {
    width: 40px;
    height: 40px;
    font-size: 14px;
}

.comment-replies .comment-content {
    padding-left: 56px;
}

.comment-replies .comment-actions {
    padding-left: 56px;
}

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

.load-more-btn {
    padding: 14px 48px;
    background: white;
    border: 2px solid var(--KedereAI-blue);
    color: var(--KedereAI-blue);
    border-radius: 50px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.load-more-btn:hover {
    background: var(--KedereAI-blue);
    color: white;
}

/*--------------------------------------------------------------
# Newsletter Widget
--------------------------------------------------------------*/
.newsletter-widget {
    background: linear-gradient(135deg, var(--KedereAI-blue) 0%, var(--KedereAI-green) 100%);
    color: white;
}

.newsletter-widget h4 {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.newsletter-widget p {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 16px;
}

.newsletter-widget input {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 14px;
}

.newsletter-widget button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: white;
    color: var(--KedereAI-blue);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.newsletter-widget button:hover {
    background: var(--gray-100);
}

/*--------------------------------------------------------------
# Responsive Adjustments
--------------------------------------------------------------*/
@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 32px;
    }

    .blog-post-title {
        font-size: 28px;
    }

    .blog-post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .blog-actions {
        flex-direction: column;
        gap: 16px;
    }

    .author-bio {
        flex-direction: column;
        text-align: center;
    }

    .author-bio-avatar {
        margin: 0 auto;
    }

    .author-social {
        justify-content: center;
    }
}

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

.blog-empty i {
    font-size: 64px;
    color: var(--gray-200);
    margin-bottom: 24px;
}

.blog-empty h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--heading-color);
}

.blog-empty p {
    color: var(--gray-800);
}