/* Blog General Styles */
:root {
    --primary-color: #4f46e5;
    --primary-dark: #4338ca;
    --secondary-color: #64748b;
    --heading-color: #1e293b;
    --text-color: #475569;
    --bg-light: #f8fafc;
    --card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --card-shadow-hover: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
}

body {
    background-color: var(--bg-light);
}

.blog-hero {
    background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
    color: white;
    padding: 80px 0;
    margin-bottom: 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><g fill="%23ffffff" fill-opacity="0.05" fill-rule="evenodd"><circle cx="3" cy="3" r="3"/></g></svg>');
}

.blog-hero h1 {
    font-weight: 800;
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

/* Blog Card Styles */
.blog-card {
    background: white;
    border-radius: 16px;
    border: none;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-shadow-hover);
}

.blog-card-img-wrapper {
    position: relative;
    padding-top: 60%;
    /* Aspect ratio 16:9 approx */
    overflow: hidden;
}

.blog-card-img-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.blog-card-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    z-index: 10;
}

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

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.blog-card-meta i {
    color: var(--primary-color);
    margin-right: 5px;
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 12px;
    line-height: 1.4;
}

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

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

.blog-card-excerpt {
    color: var(--text-color);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.blog-card-footer {
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more-btn {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.read-more-btn:hover {
    color: var(--primary-dark);
}

/* Single Blog Post Styles */
.single-post-header {
    margin-bottom: 40px;
    text-align: center;
}

.single-post-category {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.single-post-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--heading-color);
    margin-bottom: 20px;
    line-height: 1.2;
}

.single-post-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.post-thumbnail-wrapper {
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #334155;
    margin-bottom: 60px;
}

.post-content h2,
.post-content h3 {
    color: var(--heading-color);
    font-weight: 700;
    margin-top: 40px;
    margin-bottom: 20px;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content img {
    max-width: 100%;
    border-radius: 12px;
    height: auto;
    margin: 30px 0;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    font-style: italic;
    color: #475569;
    margin: 30px 0;
    background: #f8fafc;
    padding: 20px;
    border-radius: 0 12px 12px 0;
}

/* Sidebar Styles Enhanced */
.blog-sidebar .widget {
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    margin-bottom: 30px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease;
}

.blog-sidebar .widget:hover {
    transform: translateY(-5px);
}

.widget-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--heading-color);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.widget-title i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Modern Search Widget */
.search-widget-form {
    position: relative;
    background: #f1f5f9;
    border-radius: 12px;
    padding: 5px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.search-widget-form:focus-within {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.search-widget-form input {
    background: transparent;
    border: none;
    padding: 10px 15px;
    /* Corrected padding */
    width: 100%;
    color: var(--heading-color);
    font-weight: 500;
}

.search-widget-form input:focus {
    outline: none;
}

.search-widget-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.search-widget-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Category List Creative */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: #f8fafc;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.category-item:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

.category-count {
    background: white;
    color: var(--primary-color);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.category-item:hover .category-count {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Recent Posts with Thumbnails */
.recent-post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    text-decoration: none;
}

.recent-post-item:last-child {
    margin-bottom: 0;
}

.recent-post-thumb {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #e2e8f0;
}

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

.recent-post-item:hover .recent-post-thumb img {
    transform: scale(1.1);
}

.recent-post-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.recent-post-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 5px;
    line-height: 1.4;
    transition: color 0.2s;
}

.recent-post-item:hover .recent-post-title {
    color: var(--primary-color);
}

.recent-post-date {
    font-size: 0.75rem;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Newsletter Widget */
.newsletter-widget {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%) !important;
    color: white !important;
}

.newsletter-widget .widget-title {
    color: white;
}

.newsletter-widget .widget-title i {
    color: rgba(255, 255, 255, 0.8);
}

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

/* Pagination Fixed */
.pagination {
    margin-top: 60px;
    display: flex;
    justify-content: center;
}

.pagination ul.page-numbers {
    display: flex;
    padding: 0;
    margin: 0;
    list-style: none;
    gap: 10px;
    align-items: center;
}

.pagination ul.page-numbers li {
    padding: 0;
    margin: 0;
}

.page-numbers {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #eef2f6;
}

.page-numbers.current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

.page-numbers:hover:not(.current) {
    background: white;
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.page-numbers.prev,
.page-numbers.next {
    background: #f8fafc;
    font-size: 1.1rem;
}

.page-numbers.prev:hover,
.page-numbers.next:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Sticky Sidebar Container */
@media (min-width: 992px) {
    .sticky-sidebar {
        position: sticky;
        top: 100px;
        height: fit-content;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
        padding-bottom: 20px;
        scrollbar-width: thin;
    }

    .sticky-sidebar::-webkit-scrollbar {
        width: 4px;
    }

    .sticky-sidebar::-webkit-scrollbar-thumb {
        background: #e2e8f0;
        border-radius: 10px;
    }
}

/* Creative Post Table of Contents */
.post-toc {
    background: #ffffff;
    border: 2px solid #f1f5f9;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
}

.post-toc::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #7c3aed);
}

.toc-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--heading-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toc-title i {
    background: linear-gradient(135deg, var(--primary-color) 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.3rem;
    animation: toc-pulse 2s infinite;
}

@keyframes toc-pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }

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

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
}

.toc-list li {
    position: relative;
    padding-left: 15px;
}

.toc-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toc-list li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.4;
    display: block;
    transition: all 0.3s ease;
}

.toc-list li:hover::before,
.toc-list li.active::before {
    background: var(--primary-color);
    height: 15px;
    border-radius: 2px;
}

.toc-list li a:hover,
.toc-list li a.active {
    color: var(--primary-color);
    transform: translateX(5px);
}

.toc-list li a i {
    display: none;
    /* Removed hash icon for cleaner sidebar look */
}

/* Creative CTA */
.creative-cta {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    border-radius: 24px;
    padding: 40px;
    color: white;
    position: relative;
    overflow: hidden;
}

.creative-cta::before {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -50px;
    right: -50px;
}

.cta-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.cta-content {
    max-width: 500px;
}

.cta-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 15px;
    color: white !important;
}

.cta-text {
    font-size: 1.05rem;
    opacity: 0.9;
    margin-bottom: 25px;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: white;
    color: var(--primary-color) !important;
    padding: 12px 28px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cta-btn:hover {
    background: #f8fafc;
    color: var(--primary-dark) !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

.cta-visual {
    font-size: 4rem;
    opacity: 0.2;
    transform: rotate(-15deg);
}

@media (max-width: 768px) {
    .cta-inner {
        flex-direction: column;
        text-align: center;
    }

    .cta-visual {
        display: none;
    }
}

/* Comments Section Premium Styles */
.comments-area {
    background: #ffffff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
}

.comments-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--heading-color);
    position: relative;
    display: inline-block;
}

.comments-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 2px;
}

/* Comment List */
.comment-list {
    margin-bottom: 50px;
}

.comment-body {
    display: flex;
    gap: 20px;
    padding: 25px;
    background: #f8fafc;
    border-radius: 16px;
    margin-bottom: 20px;
    transition: transform 0.2s ease;
}

.comment-body:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.comment-author .avatar {
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.comment-meta {
    margin-bottom: 10px;
}

.comment-meta .fn {
    font-weight: 700;
    color: var(--heading-color);
    font-size: 1.1rem;
}

.comment-metadata a {
    color: #64748b;
    font-size: 0.85rem;
    text-decoration: none;
}

.comment-content {
    color: var(--text-color);
    line-height: 1.6;
}

.reply a {
    display: inline-block;
    margin-top: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-color);
    text-decoration: none;
}

/* Comment Form */
#reply-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 25px;
    color: var(--heading-color);
}

.comment-form-wrapper .form-label {
    font-weight: 700;
    color: #475569;
    font-size: 0.95rem;
}

.comment-form-wrapper .form-control {
    border: 2px solid #eef2f6;
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 1rem;
    background: #fcfdfe;
    transition: all 0.3s ease;
}

.comment-form-wrapper .form-control:focus {
    border-color: var(--primary-color);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    outline: none;
}

.btn-comment-submit {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-comment-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

.comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.comment-form-cookies-consent input {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    cursor: pointer;
}

.comment-form-cookies-consent label {
    font-size: 0.9rem;
    color: #64748b;
    cursor: pointer;
}