/**
 * Custom Post Type: Insight Stylesheet
 * File: assets/css/insight.css
 * Location: wp-content/themes/pharma/assets/css/insight.css
 */

:root {
    --insight-primary: #022756;
    --insight-primary-hover: #011938;
    --insight-accent: #0073e6;
    --insight-accent-hover: #005bb5;
    --insight-cyan: #00a8cc;
    --insight-text: #2d3748;
    --insight-text-muted: #718096;
    --insight-border: #e2e8f0;
    --insight-bg-light: #f8fafc;
    --insight-bg-white: #ffffff;
    --insight-radius: 8px;
    --insight-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   Global & Container Adjustments
   ========================================================================== */
.insight-archive-wrapper,
.insight-single-wrapper {
    font-family: inherit;
    color: var(--insight-text);
    background-color: #ffffff;
}

/* ==========================================================================
   Breadcrumb Header
   ========================================================================== */
.breadcrumb-wrapper {
    background-color: #f1f5f9;
    border-bottom: 1px solid var(--insight-border);
    padding: 20px 0;
    margin-bottom: 0px!important;
}

.insight-page-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--insight-primary);
    margin: 0 0 10px 0;
}

.insight-breadcrumbs ul.breadcrumbs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--insight-text-muted);
}

.insight-breadcrumbs ul.breadcrumbs a {
    color: var(--insight-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

.insight-breadcrumbs ul.breadcrumbs a:hover {
    color: var(--insight-primary);
    text-decoration: underline;
}

.insight-breadcrumbs .current-post {
    color: var(--insight-text);
    font-weight: 600;
}

/* ==========================================================================
   Top Section (Archive: Featured Post + Sidebar)
   ========================================================================== */
.insight-top-section {
    margin-bottom: 40px;
	 margin-top: 40px;
}

.insight-top-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.insight-featured-col {
    flex: 1 1 65%;
    min-width: 0;
}

.insight-sidebar-col {
    flex: 1 1 30%;
    min-width: 0;
}

/* Featured Card Layout */
.insight-featured-card {
    background: var(--insight-bg-white);
    border-radius: var(--insight-radius);
    overflow: hidden;
    box-shadow: var(--insight-shadow);
    border: 1px solid var(--insight-border);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.insight-featured-thumb {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
}

.insight-featured-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.insight-featured-card:hover .insight-featured-thumb img {
    transform: scale(1.03);
}

.insight-category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--insight-primary);
    color: #ffffff;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
    z-index: 2;
}

.insight-category-badge a {
    color: #ffffff;
    text-decoration: none;
}

.insight-featured-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.insight-meta {
    font-size: 13px;
    color: var(--insight-text-muted);
    margin-bottom: 10px;
}

.insight-featured-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 12px 0;
}

.insight-featured-title a {
    color: var(--insight-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.insight-featured-title a:hover {
    color: var(--insight-accent);
}

.insight-featured-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: var(--insight-text);
    margin-bottom: 20px;
}

.insight-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--insight-accent);
    text-decoration: none;
    margin-top: auto;
    transition: gap 0.2s ease;
}

.insight-read-more:hover {
    gap: 12px;
    color: var(--insight-primary);
}

/* ==========================================================================
   Sidebar Widgets & Fallbacks
   ========================================================================== */
.insight-archive-sidebar,
.insight-sticky-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.insight-widget {
    background: var(--insight-bg-white);
    padding: 20px;
    border-radius: var(--insight-radius);
    border: 1px solid var(--insight-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--insight-primary);
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--insight-accent);
}

.insight-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.insight-recent-list li {
    padding: 10px 0;
    border-bottom: 1px dashed var(--insight-border);

}

.insight-recent-list li:last-child {
    border-bottom: none;
}

.insight-recent-list a {
    color: var(--insight-primary);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: block;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.insight-recent-list a:hover {
    color: var(--insight-accent);
}

.recent-date {
    font-size: 12px;
    color: var(--insight-text-muted);
    display: block;
    margin-top: 4px;
}

/* Sidebar Sticky Behavior */
@media (min-width: 992px) {
    .insight-sticky-sidebar {
        position: sticky;
        top: 143px;
        align-self: flex-start;
    }
}

/* Sidebar CTA Box */
.insight-sidebar-cta-box {
    background: linear-gradient(135deg, var(--insight-primary) 0%, #004080 100%);
    color: #ffffff;
    padding: 25px;
    border-radius: var(--insight-radius);
    text-align: center;
    box-shadow: var(--insight-shadow);
}

.insight-sidebar-cta-box .cta-heading {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #ffffff;
}

.insight-sidebar-cta-box .cta-subtext {
    font-size: 14px;
    margin: 0 0 20px 0;
    opacity: 0.9;
}

.insight-cta-btn {
    display: inline-block;
    background-color: var(--insight-cyan);
    color: #ffffff !important;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none !important;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.insight-cta-btn:hover {
    background-color: #008ba8;
    transform: translateY(-2px);
}

/* ==========================================================================
   Sticky Filter Tab Bar
   ========================================================================== */
.insight-sticky-filter-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--insight-primary);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    margin-bottom: 0;
}

.insight-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    white-space: nowrap;
    padding: 12px 0;
    -webkit-overflow-scrolling: touch;
}

.insight-filter-bar::-webkit-scrollbar {
    height: 4px;
}

.insight-filter-bar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

.insight-filter-tab {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.insight-filter-tab:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #ffffff;
}

.insight-filter-tab.active {
    background: var(--insight-cyan);
    border-color: var(--insight-cyan);
    color: #ffffff;
}

/* ==========================================================================
   Per-Term Content Sections & Cards
   ========================================================================== */
.insight-term-section {
    padding: 50px 0;
}

.insight-bg-default {
    background-color: var(--insight-bg-white);
}

.insight-bg-alt {
    background-color: var(--insight-bg-light);
    border-top: 1px solid var(--insight-border);
    border-bottom: 1px solid var(--insight-border);
}

.insight-term-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--insight-border);
}

.insight-term-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--insight-primary);
    margin: 0;
}

.insight-view-all {
    font-weight: 600;
    color: var(--insight-accent);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.2s ease;
}

.insight-view-all:hover {
    gap: 10px;
    color: var(--insight-primary);
}

/* Card Grid Layout */
.insight-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.insight-card {
    background: var(--insight-bg-white);
    border-radius: var(--insight-radius);
    border: 1px solid var(--insight-border);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.insight-card-thumb {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.insight-card:hover .insight-card-thumb img {
    transform: scale(1.05);
}

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

.insight-card-date {
    font-size: 12px;
    color: var(--insight-text-muted);
    margin-bottom: 8px;
}

.insight-card-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 10px 0;
}

.insight-card-title a {
    color: var(--insight-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.insight-card-title a:hover {
    color: var(--insight-accent);
}

.insight-card-excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: var(--insight-text);
}

/* ==========================================================================
   Full Width CTA Strip (Bottom of Archive)
   ========================================================================== */
.insight-cta-strip {
    background: linear-gradient(135deg, var(--insight-primary) 0%, #003366 100%);
    color: #ffffff;
    padding: 50px 0;
    margin-top: 40px;
}

.insight-cta-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.insight-cta-text h2 {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.insight-cta-text p {
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
}

/* ==========================================================================
   Single Post Hero Banner
   ========================================================================== */
.insight-hero-banner {
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    margin-bottom: 40px;
}

.insight-hero-overlay {
    background: linear-gradient(to top, rgba(2, 39, 86, 0.95) 0%, rgba(2, 39, 86, 0.4) 100%);
    width: 100%;
    padding: 50px 0;
}

.insight-hero-content {
    color: #ffffff;
/*     max-width: 800px; */
}

.insight-hero-title {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.25;
    color: #ffffff;
    margin: 12px 0;
}

.insight-hero-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    opacity: 0.9;
}

/* Inline Header fallback if no hero */
.insight-header-inline {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--insight-border);
}

.insight-post-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--insight-primary);
    margin: 10px 0;
}

.insight-inline-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: var(--insight-text-muted);
}

/* ==========================================================================
   Single Post Body & Content
   ========================================================================== */
.insight-single-body {
    padding-bottom: 60px;
}

.insight-single-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.insight-main-col {
    flex: 1 1 65%;
    min-width: 0;
}

.insight-single-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333333;
}

.insight-single-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--insight-primary);
/*     margin: 35px 0 15px 0; */
    scroll-margin-top: 100px;
	margin-bottom:10px;
	margin-top:20px;
	padding:0px !important;
}

.ppa {
    background: #efefef;
    padding: 15px 25px;
    margin: 15px 0;
}
.insight-single-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--insight-primary);
/*     margin: 25px 0 12px 0; */
    scroll-margin-top: 100px;
}

.insight-single-content p {
    margin-bottom: 10px;
}

.insight-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--insight-radius);
    margin: 20px 0;
}

/* Tag Pills */
.insight-tags-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 30px 0;
    padding-top: 20px;
    border-top: 1px solid var(--insight-border);
}

.insight-tags-label {
    font-weight: 600;
    font-size: 14px;
    color: var(--insight-primary);
}

.insight-tag-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.insight-tag-pill {
    background-color: var(--insight-bg-light);
    border: 1px solid var(--insight-border);
    color: var(--insight-text);
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.insight-tag-pill:hover {
    background-color: var(--insight-accent);
    color: #ffffff;
    border-color: var(--insight-accent);
}

/* Author Box */
.insight-author-box {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    background-color: var(--insight-bg-light);
    padding: 25px;
    border-radius: var(--insight-radius);
    border: 1px solid var(--insight-border);
    margin: 40px 0;
}

.insight-author-avatar img {
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.insight-author-info {
    flex: 1;
}

.insight-author-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--insight-primary);
    margin: 0 0 8px 0;
}

.insight-author-bio {
    font-size: 14px;
    line-height: 1.5;
    color: var(--insight-text);
    margin: 0;
}

/* Related Posts */
.insight-related-section {
    margin-top: 50px;
}

.insight-related-heading {
    font-size: 22px;
    font-weight: 700;
    color: var(--insight-primary);
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--insight-accent);
}

.insight-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ==========================================================================
   Table of Contents (TOC) Sidebar Navigation
   ========================================================================== */
#insight-toc-nav {
    max-height: none;
    overflow-y: visible;
}

.insight-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.insight-toc-item {
    margin-bottom: 6px;
}

.insight-toc-h3 {
    padding-left: 15px;
}

.insight-toc-list a {
    display: block;
    color: var(--insight-text);
    font-size: 13px;
    line-height: 1.4;
    text-decoration: none;
    padding: 4px 8px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
}

.insight-toc-list a:hover {
    color: var(--insight-accent);
    background-color: var(--insight-bg-light);
}

.insight-toc-list a.active {
    color: var(--insight-accent);
    font-weight: 700;
    border-left-color: var(--insight-accent);
    background-color: #eef6ff;
}

/* Recent Insights (Full-Width Section, Below Content) */
.insight-recent-section {
/*     margin-top: 50px; */
    padding: 50px 0;
    background-color: var(--insight-bg-light);
}

.insight-recent-heading {
    font-size: 22px;
    font-weight: 700;
    color: var(--insight-primary);
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--insight-accent);
}

.insight-recent-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 991px) {
    .insight-top-grid,
    .insight-single-grid {
        flex-direction: column;
    }

    .insight-featured-col,
    .insight-sidebar-col,
    .insight-main-col {
        flex: 1 1 100%;
        width: 100%;
    }

     .insight-card-grid,
    .insight-related-grid,
    .insight-recent-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .insight-hero-banner {
        min-height: 300px;
    }

    .insight-hero-title {
        font-size: 26px;
    }
}

@media (max-width: 767px) {
    .insight-card-grid,
    .insight-related-grid,
    .insight-recent-grid {
        grid-template-columns: 1fr;
    }

    .insight-featured-thumb {
        height: 220px;
    }

    .insight-featured-title {
        font-size: 20px;
    }

    .insight-term-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .insight-cta-content {
        flex-direction: column;
        text-align: center;
    }

    .insight-author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

