/* Blog Styles */

/* Blog Header - Professional and beautiful design */
.blog-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
    color: white;
    padding: 40px 0 60px;
    position: relative;
    overflow: hidden;
    margin-top: 0;
    z-index: 1;
}

.blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) scale(1);
    }

    50% {
        transform: translateY(-10px) scale(1.02);
    }
}

/* Ensure navbar stays above header */
.navbar {
    position: relative;
    z-index: 10;
}

.blog-header .container {
    position: relative;
    z-index: 2;
}

.blog-header .section-header {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Breadcrumb styling in header */
.blog-header .breadcrumb {
    margin-bottom: 2rem;
    font-size: 1rem;
    text-align: center;
    opacity: 0.9;
}

.blog-header .breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
}

.blog-header .breadcrumb a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.blog-header .breadcrumb-separator {
    margin: 0 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: bold;
}

.blog-header .section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: white;
    letter-spacing: -0.025em;
}

.blog-header .section-subtitle {
    font-size: 1.3rem;
    opacity: 0.95;
    color: var(--green-100);
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Enhanced Blog List Section */
.blog-list {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
}

.blog-list::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        url("data:image/svg+xml,<svg width=\"60\" height=\"60\" viewBox=\"0 0 60 60\" xmlns=\"http://www.w3.org/2000/svg\"><g fill=\"none\" fill-rule=\"evenodd\"><g fill=\"%2310b981\" fill-opacity=\"0.03\"><circle cx=\"30\" cy=\"30\" r=\"1.5\"/></g></g></svg>"),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 20% 80%, rgba(52, 211, 153, 0.03) 0%, transparent 50%);
    opacity: 0.8;
}

.blog-list::after {
    content: '';
    position: absolute;
    top: 20%;
    right: 5%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

/* Improved Blog Grid */
.blog-grid {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    /* margin-top: 3rem; */
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
}

/* Enhanced Blog Card */
.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.02),
        0 10px 20px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    border: 1px solid rgba(16, 185, 129, 0.1);
    display: flex;
    align-items: stretch;
    position: relative;
    backdrop-filter: blur(10px);
}

.blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card:hover::before {
    opacity: 1;
}

.blog-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow:
        0 8px 12px rgba(0, 0, 0, 0.05),
        0 20px 40px rgba(16, 185, 129, 0.15);
}

.blog-image {
    flex-shrink: 0;
    width: 320px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, var(--green-50), var(--green-100));
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 60%, rgba(16, 185, 129, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card:hover .blog-image::after {
    opacity: 1;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    filter: brightness(0.95);
}

.blog-image img[src*="blog-default.jpg"] {
    width: 60%;
    height: 60%;
    object-fit: contain;
    opacity: 0.7;
}

.blog-card:hover .blog-image img {
    transform: scale(1.08);
    filter: brightness(1);
}

/* Loading placeholder for images */
.blog-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    opacity: 0.1;
    z-index: 0;
}

/* Placeholder icon when image fails to load */
.blog-image[data-placeholder="true"]::after {
    content: '\f1c5';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: var(--primary-color);
    opacity: 0.3;
    z-index: 1;
}

.blog-image img[src*="blog-default.jpg"],
.blog-image img[onerror] {
    display: none;
}

.blog-image img[src*="blog-default.jpg"]+.placeholder-content,
.blog-image[data-no-image] .placeholder-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--primary-color);
    opacity: 0.4;
}

.placeholder-content i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    display: block;
}

.placeholder-content span {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Enhanced blog meta with more visual elements */
.blog-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #64748b;
}

.blog-category {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
    position: relative;
    overflow: hidden;
}

.blog-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.blog-card:hover .blog-category::before {
    left: 100%;
}

.blog-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.05);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-weight: 500;
    border: 1px solid rgba(16, 185, 129, 0.1);
}

.blog-date i {
    color: var(--primary-color);
    font-size: 0.8rem;
}

/* Add reading time indicator */
.blog-reading-time {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 500;
}

.blog-reading-time i {
    color: var(--secondary-color);
}

.blog-content {
    flex: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    position: relative;
}

.blog-content::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.05) 0%, transparent 70%);
    border-radius: 0 0 0 100%;
    z-index: 0;
}

.blog-title {
    margin: 0 0 1.5rem 0;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.4;
}

.blog-title a {
    color: #1e293b;
    text-decoration: none;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #1e293b, #334155);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-title a:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-excerpt {
    color: #64748b;
    line-height: 1.7;
    /* margin-bottom: 2rem; */
    flex: 1;
    font-size: 1.05rem;
}

.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 2px solid #f1f5f9;
}

.blog-author {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
}

.blog-read-more {
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.blog-read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
}

/* Blog Empty State */
.blog-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.blog-empty i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
    color: #94a3b8;
}

.blog-empty h3 {
    margin-bottom: 0.5rem;
    color: #475569;
}

/* Blog Detail Page */
.blog-detail-page {
    padding: 2rem 0;
    background-color: #f8fafc;
    min-height: calc(100vh - 200px);
}

/* Blog Breadcrumb Section */
.blog-breadcrumb-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(16, 185, 129, 0.1);
    position: relative;
}

.blog-breadcrumb-section .breadcrumb {
    margin: 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.blog-breadcrumb-section .breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(16, 185, 129, 0.05);
}

.blog-breadcrumb-section .breadcrumb a:hover {
    background: rgba(16, 185, 129, 0.1);
    transform: translateY(-1px);
    color: var(--accent-color);
}

.blog-breadcrumb-section .breadcrumb a i {
    font-size: 0.8rem;
}

.blog-breadcrumb-section .breadcrumb-separator {
    color: #94a3b8;
    font-weight: 600;
    margin: 0 0.25rem;
}

.blog-breadcrumb-section .breadcrumb span:last-child {
    color: #64748b;
    font-weight: 600;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.blog-detail-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin-top: 1rem;
}

/* Main Content */
.blog-main-content {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #334155;
}

.breadcrumb-separator {
    margin: 0 0.5rem;
    color: #94a3b8;
}

/* Blog Detail Header */
.blog-detail-header {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.blog-detail-header .blog-meta {
    margin-bottom: 1rem;
}

.blog-detail-header .blog-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #1e293b;
}

.blog-detail-header .blog-excerpt {
    font-size: 1.1rem;
    color: #64748b;
    font-style: italic;
}

/* Featured Image */
.blog-featured-image {
    /* margin-bottom: 2rem; */
    border-radius: 12px;
    overflow: hidden;
}

.blog-featured-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
}

/* Blog Content */
.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1e293b;
    font-weight: 600;
}

.blog-content h1 {
    font-size: 2rem;
}

.blog-content h2 {
    font-size: 1.75rem;
}

.blog-content h3 {
    font-size: 1.5rem;
}

.blog-content p {
    margin-bottom: 1.5rem;
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.blog-content li {
    margin-bottom: 0.5rem;
}

.blog-content blockquote {
    border-left: 4px solid #1e293b;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #64748b;
}

.blog-content blockquote p {
    margin-bottom: 1.5rem 1.2rem;
}

.blog-content code {
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #1e293b;
}

.blog-content pre {
    background: #f1f5f9;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* Blog Actions */
.blog-actions {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
}

.blog-share h4 {
    margin-bottom: 1rem;
    color: #374151;
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
}

.share-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.share-btn:hover {
    transform: scale(1.1);
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.twitter {
    background: #1da1f2;
}

.share-btn.linkedin {
    background: #0077b5;
}

/* Post Navigation */
.post-navigation {
    margin-top: 3rem;
    padding: 3rem 0;
    border-top: 2px solid #f1f5f9;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: stretch;
}

.nav-post {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-radius: 16px;
    overflow: hidden;
    padding: 1.8rem 1.5rem;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.02),
        0 10px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(16, 185, 129, 0.08);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem; /* new: spacing between direction and link */
}

/* new: prevent direction shrink and fix width for link */
.nav-post-direction {
    flex-shrink: 0;
}

.nav-post-link {
    flex: 0 0 72%; /* fixed width portion for title block */
    min-width: 0;  /* allow text ellipsis inside */
}

@media (max-width: 768px) {
    .nav-post-link {
        flex-basis: 100%;
    }
}

.nav-post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-post:hover::before {
    opacity: 1;
}

.nav-post:hover {
    transform: translateY(-4px);
    box-shadow:
        0 8px 12px rgba(0, 0, 0, 0.05),
        0 20px 40px rgba(16, 185, 129, 0.1);
}

.nav-post-link {
    display: block;
    text-decoration: none;
    color: inherit;
    /* padding: 1.5rem; */
    height: 100%;
}

.nav-post-direction {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.prev-post .nav-post-direction {
    justify-content: flex-start;
}

.next-post .nav-post-direction {
    justify-content: flex-end;
    flex-direction: row;
    margin-left: auto;
    order: 2;
}

.next-post .nav-post-link {
    order: 1;
}

.next-post {
    justify-content: flex-end;
}

.prev-post {
    justify-content: flex-start;
}

.nav-post-content {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.prev-post .nav-post-content {
    flex-direction: row;
}

.next-post .nav-post-content {
    flex-direction: row-reverse;
}

.nav-post-image {
    flex-shrink: 0;
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--green-50), var(--green-100));
}

.nav-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.nav-post:hover .nav-post-image img {
    transform: scale(1.1);
}

.nav-post-info {
    flex: 1;
    min-width: 0;
}

.next-post .nav-post-info {
    text-align: right;
}

.nav-post-title {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.nav-post-excerpt {
    margin: 0 0 0.75rem 0;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.nav-post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

.next-post .nav-post-meta {
    justify-content: flex-end;
}

.nav-post-category {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.nav-post-date {
    display: flex;
    align-items: center;
    font-weight: 500;
}

.back-to-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.05);
    border: 2px solid rgba(16, 185, 129, 0.2);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 120px;
}

.back-to-list:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    text-decoration: none;
    color: var(--accent-color);
}

.back-to-list i {
    font-size: 1.2rem;
}

/* Blog Error */
.blog-error {
    text-align: center;
    padding: 4rem 2rem;
}

.blog-error i {
    font-size: 4rem;
    color: #dc2626;
    margin-bottom: 1rem;
}

.blog-error h2 {
    margin-bottom: 1rem;
    color: #374151;
}

.blog-error p {
    color: #64748b;
    margin-bottom: 2rem;
}

.error-details {
    background: #fef2f2;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-size: 0.875rem;
    color: #dc2626;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Blog Sidebar - Clean unified design */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-widget {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-radius: 20px;
    padding: 2rem;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.02),
        0 10px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(16, 185, 129, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sidebar-widget::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-widget:hover {
    transform: translateY(-4px);
    box-shadow:
        0 8px 12px rgba(0, 0, 0, 0.05),
        0 20px 40px rgba(16, 185, 129, 0.1);
}

.sidebar-widget:hover::before {
    opacity: 1;
}

.widget-title {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
    position: relative;
    background: linear-gradient(135deg, #1e293b, #334155);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* Recent Posts */
.recent-posts {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.recent-post {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.recent-post-image {
    flex-shrink: 0;
    width: 70px;
    height: 50px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.recent-post-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 60%, rgba(16, 185, 129, 0.2));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.recent-post:hover .recent-post-image::after {
    opacity: 1;
}

.recent-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recent-post-content {
    flex: 1;
}

.recent-post-title {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
}

.recent-post-title a {
    color: #1e293b;
    text-decoration: none;
    transition: all 0.3s ease;
}

.recent-post-meta {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

.recent-post-date {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.no-recent-posts {
    color: #64748b;
    font-style: italic;
    text-align: center;
    margin: 0;
    font-size: 0.9rem;
    padding: 2rem;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 10px;
    border: 2px dashed #e2e8f0;
}

/* Enhanced Blog Empty State */
.blog-empty {
    text-align: center;
    padding: 6rem 2rem;
    color: #64748b;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    border: 2px dashed #e2e8f0;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
}

.blog-empty::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,<svg width=\"60\" height=\"60\" viewBox=\"0 0 60 60\" xmlns=\"http://www.w3.org/2000/svg\"><g fill=\"none\" fill-rule=\"evenodd\"><g fill=\"%2310b981\" fill-opacity=\"0.02\"><circle cx=\"30\" cy=\"30\" r=\"1.5\"/></g></g></svg>");
    opacity: 0.5;
}

.blog-empty i {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    opacity: 0.4;
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-empty h3 {
    margin-bottom: 1rem;
    color: #374151;
    font-size: 1.5rem;
    font-weight: 600;
}

.blog-empty p {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 400px;
    margin: 0 auto;
}

/* Enhanced responsive design */
@media (max-width: 1024px) {
    .blog-detail-layout {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .blog-sidebar {
        display: none;
    }

    .blog-header .section-title {
        font-size: 3rem;
    }

    .blog-card {
        margin: 0 1rem;
    }
}

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

    .blog-header .section-title {
        font-size: 2.5rem;
    }

    .blog-header .section-subtitle {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    .blog-breadcrumb-section {
        padding: 1rem 0;
    }

    .blog-breadcrumb-section .breadcrumb {
        font-size: 0.85rem;
    }

    .blog-breadcrumb-section .breadcrumb a {
        padding: 0.4rem 0.6rem;
    }

    .blog-breadcrumb-section .breadcrumb span:last-child {
        max-width: 200px;
    }

    .blog-card {
        flex-direction: column;
        margin: 0;
    }

    .blog-image {
        width: 100%;
        height: 250px;
    }

    .blog-content {
        padding: 2rem;
    }

    .blog-meta {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .blog-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .blog-read-more {
        text-align: center;
        justify-content: center;
    }

    .blog-detail-header .blog-title {
        font-size: 2rem;
    }

    .blog-main-content {
        padding: 1.5rem;
    }

    .sidebar-widget {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .blog-header {
        padding: 40px 0 30px;
    }

    .blog-header .section-title {
        font-size: 2rem;
        padding: 0 1rem;
    }

    .blog-header .section-subtitle {
        font-size: 1rem;
    }

    .blog-list {
        padding: 40px 0;
    }

    .blog-grid {
        margin-top: 2rem;
        gap: 2rem;
        padding: 0 1rem;
    }

    .blog-card {
        border-radius: 15px;
    }

    .blog-content {
        padding: 1.5rem;
    }

    .blog-title {
        font-size: 1.3rem;
    }

    .blog-detail-header .blog-title {
        font-size: 1.5rem;
    }

    .blog-main-content {
        margin: 0 1rem;
        padding: 1rem;
    }

    .recent-post {
        flex-direction: column;
        gap: 1rem;
    }

    .recent-post-image {
        width: 100%;
        height: 120px;
    }

    .sidebar-widget {
        margin: 0 1rem;
        padding: 1.25rem;
    }
}

/* CTA Widget - Using correct primary theme */
.cta-widget {
    background: linear-gradient(135deg, var(--green-50) 0%, var(--green-100) 100%);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.08);
    border: 1px solid var(--green-200);
    margin-bottom: 2rem;
}

.cta-widget .widget-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--green-800);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-widget p {
    color: var(--green-700);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.cta-widget .btn-block {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    width: 100%;
    text-align: center;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    display: inline-block;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.25);
    transition: all 0.3s ease;
}

.cta-widget .btn-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.35);
    text-decoration: none;
    color: white;
}

/* Contact section within CTA widget */
.cta-contact-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--green-300), transparent);
    margin: 1.5rem 0;
}

.cta-contact-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--green-800);
    margin-bottom: 1rem;
    text-align: center;
}

.cta-widget .contact-item {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid var(--green-200);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.cta-widget .contact-item:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--green-300);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
}

.cta-widget .contact-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.cta-widget .contact-item a {
    color: var(--green-700);
    text-decoration: none;
    font-weight: 500;
    flex: 1;
}

.cta-widget .contact-item a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Blog Search & Filter Container */
.blog-search-container {
    max-width: 1000px;
    margin: 0 auto 1rem auto;
    position: relative;
    z-index: 1;
}

/* Search Box */
.blog-search-box {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.blog-search-box .search-icon {
    position: absolute;
    right: 1.4rem;
    color: var(--primary-color);
    font-size: 1.1rem;
    z-index: 2;
}

.blog-search-input {
    width: 100%;
    padding: 1.2rem 3rem 1.2rem 1.2rem;
    border: 2px solid rgba(16, 185, 129, 0.2);
    border-radius: 15px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: white;
    color: #1e293b;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.blog-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1), 0 4px 8px rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.blog-search-input::placeholder {
    color: #64748b;
    font-weight: 400;
}

.blog-search-box .search-clear {
    position: absolute;
    right: 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--primary-color);
}

.blog-search-box .search-clear:hover {
    background: rgba(16, 185, 129, 0.2);
    transform: scale(1.1);
}

/* Filter Tags */
.blog-filter-tags {
    margin-bottom: 1.5rem;
}

.filter-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-tag {
    background: rgba(16, 185, 129, 0.05);
    border: 2px solid rgba(16, 185, 129, 0.2);
    color: var(--primary-color);
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.filter-tag:hover::before {
    left: 100%;
}

.filter-tag:hover {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.filter-tag.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.filter-tag.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* Results Info */
.search-results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(16, 185, 129, 0.1);
    font-size: 0.95rem;
}

#resultsCount {
    color: #64748b;
    font-weight: 500;
}

#resultsCount strong {
    color: var(--primary-color);
    font-weight: 700;
}

.clear-all-filters {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(248, 113, 113, 0.1));
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.clear-all-filters:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(248, 113, 113, 0.15));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

/* Infinity Load Container */
.infinity-load-container {
    max-width: 1000px;
    margin: 3rem auto 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.load-more-wrapper {
    margin-bottom: 1.5rem;
}

.load-more-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.load-more-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.loading-spinner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
}

.loading-spinner i {
    font-size: 1.2rem;
}

.pagination-info {
    color: #64748b;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 1rem;
    background: rgba(248, 250, 252, 0.8);
    border-radius: 10px;
    border: 1px solid rgba(16, 185, 129, 0.1);
}

.pagination-info span {
    color: var(--primary-color);
    font-weight: 700;
}

/* No Results State */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    border: 2px dashed #e2e8f0;
    margin: 2rem 0;
    grid-column: 1 / -1;
    /* Take full width in grid */
}

.no-results i {
    font-size: 3rem;
    color: var(--primary-color);
    opacity: 0.3;
    margin-bottom: 1rem;
}

.no-results h3 {
    color: #374151;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.no-results p {
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Filter Animation */
.blog-card.filtered-out {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    transition: all 0.3s ease;
}

.blog-card.filtered-in {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s ease;
}

/* Responsive Search & Filter */
@media (max-width: 768px) {
    .blog-search-container {
        margin: 0 1rem 2rem 1rem;
    }

    .blog-search-input {
        padding: 1rem 2.5rem 1rem 2.8rem;
        font-size: 1rem;
    }

    .filter-tag-list {
        gap: 0.5rem;
    }

    .filter-tag {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .search-results-info {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
        text-align: center;
    }

    .infinity-load-container {
        margin: 3rem 1rem 0 1rem;
    }
}

@media (max-width: 480px) {
    .blog-search-container {
        margin: 0 1rem 1rem 1rem;
    }

    .blog-search-input {
        padding: 0.9rem 2.2rem 0.9rem 2.5rem;
        font-size: 0.95rem;
    }

    .filter-tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .load-more-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .post-navigation {
        margin-top: 2rem;
        padding: 2rem 0;
        gap: 1rem;
    }

    .nav-post-content {
        flex-direction: column;
        gap: 0.75rem;
    }

    .next-post .nav-post-content {
        flex-direction: column;
    }

    .nav-post-image {
        width: 100%;
        height: 120px;
    }

    .next-post .nav-post-info {
        text-align: left;
    }

    .next-post .nav-post-meta {
        justify-content: flex-start;
    }

    .back-to-list {
        min-width: auto;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 480px) {
    .nav-post-link {
        padding: 1rem;
    }

    .nav-post-title {
        font-size: 0.9rem;
    }

    .nav-post-excerpt {
        font-size: 0.8rem;
    }

    .back-to-list {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .back-to-list i {
        font-size: 1rem;
    }
}
