/* ====================================
   Insights Custom Post Type Styles
   ==================================== */

:root {
    --insights-primary: #6c2a7e;
    --insights-secondary: #a855f7;
    --insights-accent: #ec4899;
    --insights-text: #1f2937;
    --insights-light: #f9fafb;
    --insights-border: #e5e7eb;
    --insights-transition: all 0.3s ease;
}

/* Archive/Listing Page Styles */

.insights-hero {
    background: linear-gradient(135deg, var(--insights-primary) 0%, var(--insights-secondary) 100%);
    color: white;
    padding: 60px 40px;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.insights-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.insights-hero > * {
    position: relative;
    z-index: 2;
}

.insights-hero .nxt-container-narrow {
    max-width: 900px;
    margin: 0 auto;
}

.insights-hero .nxt-px-4 {
    padding-left: 16px;
    padding-right: 16px;
}

.insights-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.insights-hero .nxt-font-display {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.2;
}

.insights-hero p {
    font-size: 1.1rem;
    opacity: 0.95;
    margin: 0;
}

.insights-category-hero-fallback {
    height: 300px !important;
    min-height: 300px !important;
    max-height: 300px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    display: flex !important;
    align-items: center;
    overflow: hidden;
}

.insights-category-hero-fallback .nxt-container-narrow {
    width: 100%;
}

.insights-category-hero-fallback .nxt-font-display {
    color: #111;
}

.insights-archive .nxt-hero {
    margin-bottom: 60px !important;
}

/* Tabs Navigation */

.insights-tabs-wrapper {
    display: flex;
    justify-content: center;
    margin: 0px 0 60px;
    overflow-x: auto;
    padding: 20px 0;
}

.insights-tabs {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.insights-tab {
    padding: 12px 24px;
    background: white;
    color: var(--insights-text);
    border-radius: 5px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    line-height: 22px;
    transition: var(--insights-transition);
    white-space: nowrap;
    box-shadow: 0px 4px 4.8px rgba(0, 0, 0, 0.1);
    border: none;
    min-width: 140px;
}

.insights-tab.active {
    background: #551C8E;
    color: white;
}

/* Grid Container */

.insights-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .insights-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .insights-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Card Styles */

.insight-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0px 4px 4.8px rgba(0, 0, 0, 0.11);
    transition: var(--insights-transition);
    height: 100%;
}

.insight-card:hover {
    box-shadow: 0px 19px 60.1px -14px rgba(179, 118, 246, 0.44);
    transform: translateY(-4px);
}

.insight-card-image {
    position: relative;
    overflow: hidden;
    height: 180px;
    background: var(--insights-light);
}

.insight-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--insights-transition);
}

.insight-card-video video,
.insight-card-video .wp-video,
.insight-card-video .wp-video-shortcode {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

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

.insight-card-content {
    padding: 36px 24px;
}

.insight-category {
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid #F0F0F0;
    border-radius: 5px;
    margin-bottom: 26px;
    font-size: 14px;
    line-height: 21px;
    color: #802CD7;
}

.insight-category a {
    text-decoration: none;
    transition: var(--insights-transition);
    font-weight: 400;
    font-size: 14px;
    line-height: 21px;
    color: #802CD7;
}

.insight-category a:hover {
    color: var(--insights-primary);
}

.insight-title {
    font-weight: 700;
    font-size: 26px;
    line-height: 32px;
    color: #551C8E;
    margin: 0 0 12px;
}

.insight-title a {
    text-decoration: none;
    font-size: 26px;
    line-height: 32px;
    color: #551C8E;
}

.insight-title a:hover {
    color: var(--insights-secondary);
}

.insight-excerpt {
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #211030;
    margin: 0;
    }

.insight-excerpt p {
        margin: 0;
}

.insight-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.insight-date::before {
    content: "📅 ";
    margin-right: 4px;
}

.insight-read-time::before {
    content: "⏱️ ";
    margin-right: 4px;
}

.insight-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--insights-secondary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--insights-transition);
}

.insight-link:hover {
    color: var(--insights-primary);
}

.insight-link.insight-link-disabled {
    color: #6b7280;
    cursor: default;
    pointer-events: none;
}

.insight-link .arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.insight-link:hover .arrow {
    transform: translateX(4px);
}

/* No Posts Message */

.insights-no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
}

.insights-no-posts p {
    font-size: 1.1rem;
}

/* Pagination */

.insights-pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    padding-top: 20px;
}

.insights-pagination {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.insights-pagination a,
.insights-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    border: 1px solid var(--insights-border);
    border-radius: 6px;
    color: var(--insights-text);
    text-decoration: none;
    transition: var(--insights-transition);
}

.insights-pagination a:hover {
    background: var(--insights-secondary);
    color: white;
    border-color: var(--insights-secondary);
}

.insights-pagination .current {
    background: var(--insights-primary);
    color: white;
    border-color: var(--insights-primary);
}

/* ====================================
   Single Post Page Styles
   ==================================== */

.insights-single {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Breadcrumbs */

.insights-breadcrumbs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 30px;
    font-size: 0.9rem;
    color: #6b7280;
}

.insights-breadcrumbs a {
    color: var(--insights-secondary);
    text-decoration: none;
    transition: var(--insights-transition);
}

.insights-breadcrumbs a:hover {
    color: var(--insights-primary);
}

.insights-breadcrumbs span {
    color: #d1d5db;
    margin: 0 4px;
}

.insights-archive .insights-breadcrumbs {
    max-width: 1200px;
    margin: 20px auto 10px;
    padding: 0 20px;
}

/* Featured Image */

.insights-featured-image {
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.insights-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Post Header */

.insights-post-header {
    margin-bottom: 40px;
}

.insights-post-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    color: var(--insights-text);
}

@media (max-width: 768px) {
    .insights-post-header h1 {
        font-size: 1.8rem;
    }
}

/* Post Meta */

.insights-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 0;
    border-top: 1px solid var(--insights-border);
    border-bottom: 1px solid var(--insights-border);
}

.meta-left,
.meta-right {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.insights-category {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(168, 85, 247, 0.1);
    color: var(--insights-secondary);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.insights-category a {
    color: var(--insights-secondary);
    text-decoration: none;
}

.insights-date,
.insights-read-time {
    color: #6b7280;
    font-size: 0.95rem;
}

/* Metrics */

.insights-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    padding: 30px;
    background: linear-gradient(135deg, rgba(108, 42, 126, 0.05) 0%, rgba(168, 85, 247, 0.05) 100%);
    border-radius: 12px;
}

.metric-item {
    text-align: center;
}

.metric-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--insights-primary);
    margin-bottom: 8px;
}

.metric-label {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.4;
}

/* Post Content */

.insights-post-content {
    margin-bottom: 40px;
}

.insights-excerpt {
    font-size: 1.1rem;
    font-style: italic;
    color: #6b7280;
    padding: 20px;
    background: var(--insights-light);
    border-left: 4px solid var(--insights-secondary);
    border-radius: 4px;
    margin-bottom: 30px;
}

.insights-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--insights-text);
}

.insights-body p {
    margin-bottom: 20px;
}

.insights-body h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 30px 0 15px;
    color: var(--insights-text);
}

.insights-body h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 20px 0 12px;
    color: var(--insights-text);
}

.insights-body a {
    color: var(--insights-secondary);
    text-decoration: none;
    transition: var(--insights-transition);
}

.insights-body a:hover {
    color: var(--insights-primary);
    text-decoration: underline;
}

.insights-body img {
    max-width: 100%;
    height: auto;
    margin: 30px 0;
    border-radius: 8px;
}

.insights-body ul,
.insights-body ol {
    margin: 20px 0;
    padding-left: 40px;
}

.insights-body li {
    margin-bottom: 10px;
}

/* Outcomes Section */

.insights-outcomes {
    margin-bottom: 40px;
    padding: 40px;
    background: var(--insights-light);
    border-radius: 12px;
}

.insights-outcomes h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--insights-text);
}

.outcomes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.outcome-item {
    display: flex;
    gap: 20px;
}

.outcome-number {
    flex-shrink: 0;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--insights-secondary);
    opacity: 0.3;
}

.outcome-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--insights-text);
}

.outcome-content p {
    font-size: 0.95rem;
    color: #6b7280;
    line-height: 1.6;
}

/* Post Footer */

.insights-post-footer {
    margin-bottom: 40px;
    padding: 30px;
    background: white;
    border: 1px solid var(--insights-border);
    border-radius: 12px;
}

.insights-authors h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--insights-text);
}

.insights-authors p {
    color: #6b7280;
    line-height: 1.6;
}

/* Related Posts */

.insights-related {
    margin-bottom: 40px;
}

.insights-related h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--insights-text);
}

/* Final CTA */

.insights-cta-wrap {
    margin: 20px 0 40px;
    text-align: center;
}

.insights-cta-button {
    display: inline-block;
    background: var(--insights-primary);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    padding: 12px 22px;
    border-radius: 4px;
    transition: var(--insights-transition);
}

.insights-cta-button:hover {
    background: var(--insights-secondary);
    color: #fff;
}

/* Case Study Single Layout */

.insights-case-study-page {
    max-width: none;
    padding: 0;
}

.insights-case-study-page .insights-breadcrumbs {
    max-width: 1200px;
    margin: 0 auto 20px;
    padding: 20px 20px 0;
}

.insights-case-hero {
    position: relative;
    overflow: hidden;
}

.insights-case-hero-media {
    min-height: 380px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.insights-case-hero-media video,
.insights-case-hero-media .wp-video,
.insights-case-hero-media .wp-video-shortcode {
    width: 100% !important;
    height: 100% !important;
    min-height: 380px;
}

.insights-case-hero-media--fallback {
    background: linear-gradient(135deg, #2b0f4d 0%, #5f2f8e 100%);
}

.insights-case-hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    color: #fff;
    background: linear-gradient(180deg, rgba(20, 9, 41, 0.18) 0%, rgba(20, 9, 41, 0.42) 100%);
}

.insights-case-category {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    margin-bottom: 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.insights-case-hero-overlay h1 {
    max-width: 880px;
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.05;
    font-weight: 800;
    color: #fff;
}

.insights-case-stats {
    background: #F0F0F0;
    padding: 96px 20px 72px;
}

.insights-case-stats-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
}

.insights-case-stat {
    text-align: center;
}

.insights-case-stat-number {
    font-family: 'Roboto';
    font-weight: 700;
    font-size: 50px;
    line-height: 60px;
    text-align: center;
    color: #802CD7;
    margin-bottom: 2px;
}

.insights-case-stat-title {
    font-weight: 700;
    font-size: 24px;
    line-height: 30px;
    text-align: center;
    color: #802CD7;
}

.insights-case-summary {
    padding: 84px 20px;
}

.insights-case-summary-inner {
    max-width: 980px;
    margin: 0 auto;
    text-align: center;
}

.insights-case-summary-inner h2 {
    margin: 0;
    font-family: 'Montserrat';
    font-weight: 700;
    font-size: 48px;
    line-height: 58px;
    text-align: center;
    color: #211030;
}

.insights-case-details {
    padding: 0 20px 84px;
}

.insights-case-details-grid {
    max-width: 1060px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.insights-case-panel {
    padding: 36px;
    background: #FFFFFF;
    box-shadow: 0px 4px 4.8px rgba(0, 0, 0, 0.1);
    border-radius: 9px;
    transition: 0.5s;
}

.insights-case-panel:hover {
    box-shadow: 0px 19px 60.1px -14px rgba(179, 118, 246, 0.44);
}

.insights-case-panel-icon {
    margin-bottom: 16px;
    display: none !important;
}

.insights-case-panel-icon span {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(168, 85, 247, 0.16);
}

.insights-case-panel-image {
    margin-bottom: 22px;
    width: 50px;
    height: 50px;
    overflow: hidden;
}

.insights-case-panel-image img {
    display: block;
    width: 100%;
    height: auto;
}

.insights-case-panel h3 {
    margin: 0 0 13px;
    font-family: 'Roboto';
    font-weight: 700;
    font-size: 26px;
    line-height: 32px;
    color: #551C8E;
}

.insights-case-panel-copy,
.insights-case-outcome-copy {
    font-family: 'Roboto';
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #211030;
}

.insights-case-panel-copy p,
.insights-case-outcome-copy p {
    margin: 0 0 12px;
}

.insights-case-panel-copy ul li,
.insights-case-panel-copy ol li {
    list-style: disc !important;
}

.insights-case-outcomes {
    background: #F0F0F0;
    padding: 84px 20px;
}

.insights-case-outcomes-inner {
    max-width: 1280px;
    margin: 0 auto;
    text-align: center;
}

.insights-case-outcomes-inner h2 {
    margin: 0 0 48px;
    font-family: 'Montserrat';
    font-weight: 700;
    font-size: 48px;
    line-height: 58px;
    text-align: center;
    color: #211030;
}

.insights-case-outcomes-subtitle {
    font-family: 'Roboto';
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    text-align: center;
    color: #211030;
    margin: 0 0 60px;
}

.insights-case-outcomes-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
}

.insights-case-outcome {
    padding: 38px 24px;
    text-align: left;
    border: none;
    background: #FFFFFF;
    box-shadow: 0px 4px 4.8px rgba(0, 0, 0, 0.1);
    border-radius: 9px;
    transition: 0.5s;
}

.insights-case-outcome:hover {
    box-shadow: 0px 19px 60.1px -14px rgba(179, 118, 246, 0.44);
}

.insights-case-outcome-number {
    font-family: 'Montserrat';
    font-weight: 700;
    font-size: 48px;
    line-height: 58px;
    color: #211030;
    margin-bottom: 12px;
}

.insights-case-outcome h3 {
    margin: 0 0 12px;
    font-family: 'Roboto';
    font-weight: 700;
    font-size: 26px;
    line-height: 32px;
    color: #551C8E;
}

.insights-case-cta {
    padding: 0 20px 80px;
    text-align: center;
    background-color: #F0F0F0;
}

.insights-case-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    gap: 10px;
    background: #6321A5;
    border-radius: 5px;
    font-family: 'Roboto';
    font-weight: 600;
    font-size: 15px;
    line-height: 18px;
    color: #FFFFFF;
    text-decoration: none;
}

.insights-case-cta-button:hover {
    background: var(--insights-secondary);
    color: #fff;
}

.insights-case-cta-button.insights-case-cta-button-disabled {
    opacity: 0.75;
    cursor: default;
}

@media (max-width: 1024px) {
    .insights-case-stats-grid,
    .insights-case-outcomes-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .insights-case-details-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .insights-case-stats-grid,
    .insights-case-outcomes-grid {
        grid-template-columns: 1fr;
    }

    .insights-case-hero-media,
    .insights-case-hero-media video,
    .insights-case-hero-media .wp-video,
    .insights-case-hero-media .wp-video-shortcode {
        min-height: 300px;
    }

    .insights-case-hero-overlay h1 {
        font-size: 2rem;
    }
}

/* Post Navigation */

.insights-post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid var(--insights-border);
}

@media (max-width: 768px) {
    .insights-post-navigation {
        grid-template-columns: 1fr;
    }
}

.prev-post,
.next-post {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: var(--insights-light);
    border: 1px solid var(--insights-border);
    border-radius: 8px;
    text-decoration: none;
    transition: var(--insights-transition);
}

.next-post {
    text-align: right;
}

.prev-post:hover,
.next-post:hover {
    background: white;
    border-color: var(--insights-secondary);
}

.nav-label {
    font-size: 0.85rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.nav-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--insights-text);
}

/* ====================================
   Responsive Design
   ==================================== */

@media (max-width: 768px) {
    .insights-hero {
        padding: 40px 20px;
    }

    .insights-hero h1,
    .insights-hero .nxt-font-display {
        font-size: 1.8rem;
    }

    .insights-hero p {
        font-size: 1rem;
    }

    .insights-tabs {
        justify-content: flex-start;
    }

    .insights-post-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Accessibility */

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}