:root {
    --primary-color: #25b7d3; /* Main action color (blue) */
    --secondary-color: #667084; /* Medium gray for general text */
    --dark-text: #0F1728; /* Very dark gray/black for strong text/headings */
    --light-text: #495057; /* Lighter text for body */
    --background-light: #ffffff; /* White background */
    --card-bg: #ffffff; /* White card background */
    --border-color: #e6e6e6; /* Light gray for borders */
    --code-bg: #e9ecef; /* Keeping for now */
    --accent-light-blue: #E0F7FA; /* Light blue for header background fade */
    --accent-dark-blue: #1A8094; /* Darker shade of primary for accents */
    --text-muted-light: #9ca3af; /* Lighter muted text for categories/dates */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-light);
    color: var(--light-text);
    line-height: 1.6;
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--dark-text);
    line-height: 1.2;
}

/* Header Section */
.blog-header {
    background-color: var(--accent-light-blue); /* Light blue background */
    padding: 96px 0;
    position: relative;
    overflow: hidden;
    text-align: center;
    margin-bottom: 64px;
}

.blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, var(--accent-light-blue) 0%, rgba(255,255,255,0) 50%);
    opacity: 0.6;
    z-index: 0;
}

.blog-header-content {
    position: relative;
    z-index: 1;
}

.blog-header-top-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-dark-blue);
    margin-bottom: 10px;
    display: block;
}

.blog-header h1 {
    font-size: 48px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark-text);
}

.blog-header p {
    font-size: 20px;
    color: var(--secondary-color);
    max-width: 768px;
    margin: 0 auto 32px auto;
}

/* Search Bar */
.search-bar-container {
    max-width: 400px; /* Revert to previous max-width */
    margin: 0 auto; /* Center the container */
    position: relative;
    z-index: 1;
}

.search-bar-container form {
    position: relative;
    width: 100%; /* Ensure the form takes full width of its container */
}

.search-bar-container .form-control {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 12px 16px 12px 40px; /* Space for icon */
    font-size: 16px;
    box-shadow: 0px 1px 2px rgba(0,0,0,0.05);
    background-color: var(--card-bg);
    color: var(--dark-text);
}

.search-bar-container .form-control::placeholder {
    color: var(--secondary-color);
}

.search-bar-container .search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--secondary-color);
    z-index: 2;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

/* Article Cards (Grid) */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 0;
}

.post-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0px 4px 6px rgba(0,0,0,0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: var(--card-bg);
    display: flex;
    flex-direction: column;
}

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

.post-card-image-container {
    width: 100%;
    height: 240px; /* Fixed height for consistency */
    overflow: hidden;
    border-bottom: 1px solid var(--border-color);
}

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

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

.post-card-category {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-dark-blue);
    text-transform: uppercase;
    margin-bottom: 12px;
}

.post-card-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark-text);
    text-decoration: none;
    margin-bottom: 12px;
    display: block;
}

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

.post-card-external-link-icon {
    margin-left: 8px;
    color: var(--dark-text);
    font-size: 16px;
}

.post-card-snippet {
    font-size: 16px;
    color: var(--secondary-color);
    margin-bottom: 20px;
    flex-grow: 1;
}

.post-card-author-info {
    display: flex;
    align-items: center;
    margin-top: auto; /* Pushes author info to the bottom */
}

.post-card-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 12px;
    border: 1px solid var(--border-color);
}

.post-card-author-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--dark-text);
}

.post-card-date {
    font-size: 14px;
    color: var(--secondary-color);
    margin-left: 8px;
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border-color: var(--border-color);
    border-radius: 8px;
    margin: 0 5px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.pagination .page-item.active .page-link,
.pagination .page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    color: var(--secondary-color);
    opacity: 0.6;
}

/* Single Post View Specifics */
.single-post-container {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    margin-bottom: 40px;
}

.single-post-title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 25px;
    line-height: 1.2;
}

.single-post-content {
    font-size: 18px;
    line-height: 1.8;
    color: var(--light-text);
}

.single-post-content h1, .single-post-content h2, .single-post-content h3, .single-post-content h4, .single-post-content h5, .single-post-content h6 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 600;
}

.single-post-content p {
    margin-bottom: 1em;
}

.single-post-content ul, .single-post-content ol {
    margin-bottom: 1em;
    padding-left: 25px;
}

.single-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.single-post-content pre {
    background-color: var(--code-bg);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--dark-text);
    margin: 20px 0;
}

.back-to-posts {
    display: inline-block;
    margin-top: 30px;
    padding: 10px 25px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.back-to-posts:hover {
    background-color: var(--accent-dark-blue);
}

/* AI Citation Optimization Sections */

/* Updated Date Badge */
.post-card-updated {
    font-size: 13px;
    color: var(--primary-color);
    margin-left: 8px;
    padding: 2px 8px;
    background-color: rgba(37, 183, 211, 0.1);
    border-radius: 4px;
    font-weight: 500;
}

/* Key Takeaways Section */
.key-takeaways-section {
    background: linear-gradient(135deg, #E0F7FA 0%, #B2EBF2 100%);
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.key-takeaways-section h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.key-takeaways-section h2 i {
    color: var(--primary-color);
    font-size: 24px;
}

.key-takeaways-content {
    font-size: 16px;
    line-height: 1.7;
    color: var(--light-text);
}

/* FAQ Section */
.faq-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 32px;
    margin-top: 40px;
    margin-bottom: 32px;
}

.faq-section h2 {
    font-size: 26px;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-section h2 i {
    color: var(--primary-color);
    font-size: 28px;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 18px 20px;
    text-align: left;
    font-size: 17px;
    font-weight: 600;
    color: var(--dark-text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease;
}

.faq-question:hover {
    background-color: rgba(37, 183, 211, 0.05);
}

.faq-question i {
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.faq-answer-content {
    padding: 18px 20px;
    font-size: 16px;
    line-height: 1.7;
    color: var(--light-text);
    border-top: 1px solid var(--border-color);
}

/* Cite This Article Section */
.cite-article-section {
    background-color: #fff8e1;
    border: 2px solid #ffd54f;
    border-radius: 8px;
    padding: 28px;
    margin-top: 40px;
    margin-bottom: 32px;
}

.cite-article-section h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cite-article-section h2 i {
    color: #f57c00;
    font-size: 24px;
}

.citation-formats {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.citation-format {
    background-color: var(--card-bg);
    padding: 16px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.citation-format strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.citation-format code {
    display: block;
    background-color: var(--code-bg);
    padding: 12px;
    border-radius: 4px;
    font-family: 'Fira Code', 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    color: var(--dark-text);
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* Author Bio Section */
.author-bio-section {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border-radius: 8px;
    padding: 32px;
    margin-top: 40px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.author-bio-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

.author-bio-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--card-bg);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.author-bio-info h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 8px;
}

.author-credentials,
.author-expertise {
    font-size: 14px;
    color: var(--light-text);
    margin: 4px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.author-credentials i,
.author-expertise i {
    color: #7b1fa2;
    font-size: 16px;
}

.author-bio-text {
    font-size: 16px;
    line-height: 1.7;
    color: var(--light-text);
    padding-top: 16px;
    border-top: 1px solid rgba(123, 31, 162, 0.2);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .blog-header {
        padding: 64px 0; /* Mobile header padding */
    }
    .blog-header h1 {
        font-size: 36px; /* Mobile header title font size */
    }
    .blog-header p {
        font-size: 18px; /* Mobile header subtitle font size */
    }
    .search-bar-container {
        max-width: 343px; /* Mobile search bar width */
    }
    .post-card-image-container {
        height: 200px; /* Mobile card image height */
    }
    .post-card-title {
        font-size: 20px; /* Mobile card title font size */
    }
    .single-post-title {
        font-size: 32px;
    }
    .single-post-content {
        font-size: 16px;
    }
    .single-post-container {
        padding: 25px;
    }
    .post-card-snippet {
        font-size: 14px;
    }
    .post-card-author-name, .post-card-date {
        font-size: 12px;
    }

    /* Mobile adjustments for AI citation sections */
    .key-takeaways-section,
    .faq-section,
    .cite-article-section,
    .author-bio-section {
        padding: 20px;
    }

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

    .citation-format code {
        font-size: 12px;
    }
}

/* Breadcrumbs */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin-bottom: 1rem;
    list-style: none;
    background-color: transparent;
    border-radius: 0;
}

.breadcrumb-item {
    font-size: 14px;
    color: var(--secondary-color);
}

.breadcrumb-item + .breadcrumb-item {
    padding-left: 0.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    float: left;
    padding-right: 0.5rem;
    color: var(--secondary-color);
    content: "/";
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--accent-dark-blue);
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--light-text);
    font-weight: 500;
}