/* Insights Styles */
.insights-hero {
    background-color: var(--primary-color);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.insights-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.insights-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.insights-categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.insights-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.insights-post-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.insights-post-card:hover {
    transform: translateY(-5px);
}

.insights-post-image {
    height: 200px;
    background-size: cover;
    background-position: center;
}

.insights-post-content {
    padding: 1.5rem;
}

.insights-post-title {
    margin: 0 0 1rem;
    font-size: 1.25rem;
    color: var(--text-color);
}

.insights-post-meta {
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.insights-post-excerpt {
    color: var(--text-color);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.insights-post-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.insights-post-link:hover {
    text-decoration: underline;
}

.insights-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.insights-pagination a {
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    cursor: pointer;
    border-radius: 4px;
    text-decoration: none;
}

.insights-pagination a.active {
    background: var(--primary-color);
    color: white;
}

.insights-pagination a.disabled {
    opacity: 0.5;
    cursor: default;
    pointer-events: none;
}

.insights-pagination a:hover:not(.active):not(.disabled) {
    background: #e8f4fc;
}

/* Loading and No Results States */
.loading-indicator {
    text-align: center;
    padding: 2rem;
    color: var(--text-color);
    font-style: italic;
}

.loading-message,
.no-posts-message {
    text-align: center;
    padding: 2rem;
    color: var(--text-color);
}

/* Category Filters */
.category-filter {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--light-gray);
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.category-filter:hover,
.category-filter.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Featured Post Card */
.insights-post-card.featured {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.insights-post-card.featured .insights-post-image {
    height: 250px;
    width: 40%;
    flex-shrink: 0;
}

.insights-post-card.featured .insights-post-content {
    flex-grow: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .insights-posts {
        grid-template-columns: 1fr;
    }
    
    .insights-categories {
        flex-direction: column;
        align-items: center;
    }
}

/* --- Individual Insights Post Page Styles --- */

.insights-post-header {
    background-color: var(--light-gray);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.insights-post-header-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.insights-back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.insights-back-link:hover {
    text-decoration: underline;
}

.insights-post-header-content h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.insights-post-details {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Assuming .insights-post-content is the main article wrapper on the post page */
article.insights-post-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem 2rem 1rem;
    line-height: 1.7;
}

article.insights-post-content h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

article.insights-post-content h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

article.insights-post-content p {
    margin-bottom: 1rem;
}

article.insights-post-content ul,
article.insights-post-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

article.insights-post-content li {
    margin-bottom: 0.5rem;
}

article.insights-post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #555;
}

.insights-post-featured-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.insights-post-tags {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.insights-post-tags strong {
    color: var(--primary-color);
}

/* Related Posts Section (mostly for individual post page) */
.related-posts-section {
    max-width: 800px;
    margin: 2rem auto;
    padding: 2rem 1rem;
    border-top: 1px solid var(--light-gray);
}

.related-posts-header h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.related-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* .related-post-card can reuse .insights-post-card styles if structure is similar, 
   or define its own. For now, assuming it might need some tweaks or could be distinct. 
   If it's identical to .insights-post-card, these specific rules can be merged/removed. */
.related-post-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.related-post-card .related-post-image { /* Assuming a div for background image */
    height: 150px;
    background-size: cover;
    background-position: center;
}

.related-post-card .related-post-content {
    padding: 1rem;
}

.related-post-card .related-post-title {
    font-size: 1rem;
    color: var(--text-color);
    margin: 0 0 0.5rem;
}

.related-post-card .related-post-meta {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

/* Ensure insights-post-link works here too if used */