/* ===================================
   PBID Manager - Blog Post Styles
   =================================== */

/* Blog Header */
.blog-header {
    padding: 3rem 0 2rem;
    background: linear-gradient(135deg, #255B7D 0%, #2C938F 100%);
    color: white;
}

.blog-breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.blog-breadcrumb a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s;
}

.blog-breadcrumb a:hover {
    opacity: 0.8;
}

.blog-breadcrumb span {
    opacity: 0.7;
}

.blog-title {
    font-size: 2.5rem;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    max-width: 900px;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    font-size: 0.95rem;
    opacity: 0.95;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Blog Content Layout */
.blog-content {
    padding: 4rem 0;
    background: var(--bg-white);
}

.blog-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Main Content Area */
.blog-main {
    max-width: 800px;
}

.blog-featured-image {
    margin-bottom: 3rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.blog-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Article Content */
.blog-article {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.blog-intro {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.blog-article h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 3rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.blog-article h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.blog-article p {
    margin-bottom: 1.5rem;
}

.blog-article a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s;
}

.blog-article a:hover {
    color: var(--primary-dark);
}

/* Lists */
.blog-list {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.blog-list li {
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* Callout Box */
.blog-callout {
    background: linear-gradient(135deg, rgba(37, 91, 125, 0.05) 0%, rgba(44, 147, 143, 0.05) 100%);
    border-left: 4px solid var(--accent-color);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.blog-callout h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.blog-callout p {
    margin-bottom: 0;
}

/* Quote */
.blog-quote {
    font-size: 1.3rem;
    font-style: italic;
    color: var(--text-dark);
    border-left: 4px solid var(--secondary-color);
    padding: 1.5rem 2rem;
    margin: 2.5rem 0;
    background: var(--bg-light);
    border-radius: 8px;
}

.blog-quote cite {
    display: block;
    margin-top: 1rem;
    font-size: 1rem;
    font-style: normal;
    color: var(--text-light);
}

/* Inline Images */
.blog-image {
    margin: 2.5rem 0;
}

.blog-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

.blog-image figcaption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-light);
    text-align: center;
    font-style: italic;
}

/* CTA Box */
.blog-cta-box {
    background: linear-gradient(135deg, #255B7D 0%, #2C938F 100%);
    color: white;
    padding: 2.5rem;
    border-radius: 12px;
    text-align: center;
    margin: 3rem 0;
}

.blog-cta-box h3 {
    color: white;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.blog-cta-box p {
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

/* Request a Demo Button */
/* Ensure Primary Buttons Have White Text - IMPORTANT FIX */
.btn-primary {
    background: var(--primary-color);
    color: white !important;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: white !important;
}

.blog-cta-box .btn-primary {
    color: white !important;
}

/* Tags */
.blog-tags {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.blog-tags strong {
    color: var(--text-dark);
    margin-right: 1rem;
}

.tag {
    display: inline-block;
    background: var(--bg-light);
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    text-decoration: none;
    margin: 0.25rem;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.tag:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Author Bio */
.blog-author-bio {
    display: flex;
    gap: 1.5rem;
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 3rem;
}

.author-avatar {
    flex-shrink: 0;
}

.author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-size: 1.25rem;
}

.author-info p {
    margin-bottom: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Related Posts */
.blog-related {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
}

.blog-related h3 {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.related-post-card {
    text-decoration: none;
    color: var(--text-dark);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, box-shadow 0.3s;
    background: white;
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.related-post-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.related-post-card h4 {
    padding: 1rem 1rem 0.5rem;
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.related-post-card p {
    padding: 0 1rem 1rem;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-widget {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.sidebar-widget h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Search Form */
.blog-search-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.blog-search-form input {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.blog-search-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Sidebar Lists */
.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li {
    border-bottom: 1px solid var(--border-color);
}

.sidebar-list li:last-child {
    border-bottom: none;
}

.sidebar-list a {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s;
}

.sidebar-list a:hover {
    color: var(--primary-color);
}

.sidebar-list span {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Recent Posts */
.sidebar-recent-posts {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-recent-posts li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-recent-posts li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-recent-posts a {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-dark);
    transition: opacity 0.3s;
}

.sidebar-recent-posts a:hover {
    opacity: 0.8;
}

.sidebar-recent-posts img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.sidebar-recent-posts h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--primary-color);
}

.sidebar-recent-posts .post-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Newsletter Form */
.sidebar-cta {
    background: linear-gradient(135deg, rgba(37, 91, 125, 0.05) 0%, rgba(44, 147, 143, 0.05) 100%);
    border: 2px solid var(--primary-color);
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.newsletter-form input {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-cloud .tag {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .blog-sidebar {
        position: static;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .blog-title {
        font-size: 2rem;
    }

    .blog-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .blog-article {
        font-size: 1rem;
    }

    .blog-article h2 {
        font-size: 1.5rem;
    }

    .blog-author-bio {
        flex-direction: column;
        text-align: center;
    }

    .author-avatar {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .blog-header {
        padding: 2rem 0 1.5rem;
    }

    .blog-title {
        font-size: 1.5rem;
    }

    .blog-content {
        padding: 2rem 0;
    }
}


/* Blog Index Page Styles */
.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.blog-post-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.blog-post-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.post-card-content {
    padding: 1.5rem;
}

.post-card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.post-date {
    color: var(--text-light);
}

.post-category {
    color: var(--primary-color);
    font-weight: 600;
}

.blog-post-card h2 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.blog-post-card h2 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s;
}

.blog-post-card h2 a:hover {
    color: var(--primary-color);
}

.blog-post-card p {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

.read-more:hover {
    color: var(--primary-dark);
}

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 2rem 0;
}

.pagination-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s;
}

.pagination-btn:hover {
    background: var(--primary-dark);
}

.pagination-btn.disabled {
    background: var(--border-color);
    color: var(--text-light);
    pointer-events: none;
}

.pagination-pages {
    display: flex;
    gap: 0.5rem;
}

.page-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s;
}

.page-number:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.page-number.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

@media (max-width: 768px) {
    .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}