/**
 * Jiblotech 2.0
 * Insights & Blog Styling
 *
 * Dark / Editorial / Technical / Restrained
 */

/* ==========================================
   MAIN CONTAINER & SECTIONS
   ========================================== */

.insights-main {
    padding: clamp(3.5rem, 6vw, 6rem) 0;
    border-bottom: 1px solid var(--jb-border-light);
    background: var(--jb-black);
}

.insights-section-title {
    font-family: var(--jb-font-mono);
    font-size: var(--jb-text-xs);
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--jb-text-subtle);
    margin: 0 0 1.5rem;
}

/* ==========================================
   FEATURED / LATEST ARTICLE CARD
   ========================================== */

.insights-featured {
    margin-bottom: clamp(3rem, 5vw, 4.5rem);
}

.insights-featured__card {
    background: var(--jb-surface);
    border: 1px solid var(--jb-border);
    padding: clamp(2rem, 4vw, 3rem);
    position: relative;
    transition: border-color var(--jb-duration-normal) var(--jb-ease),
                background-color var(--jb-duration-normal) var(--jb-ease);
}

.insights-featured__card:hover {
    background: var(--jb-surface-raised);
    border-top-color: var(--jb-accent-blue);
}

.insights-featured__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.insights-badge {
    display: inline-block;
    font-family: var(--jb-font-mono);
    font-size: 0.7rem;
    color: var(--jb-accent-blue);
    background: var(--jb-accent-blue-soft);
    padding: 0.2rem 0.6rem;
    border-radius: var(--jb-radius-sm);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.insights-meta {
    font-family: var(--jb-font-mono);
    font-size: var(--jb-text-xs);
    color: var(--jb-text-subtle);
}

.insights-featured__title {
    font-family: var(--jb-font-display);
    font-size: clamp(1.8rem, 3.5vw, 2.75rem);
    font-weight: 500;
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin: 0 0 1rem;
}

.insights-featured__title a {
    color: var(--jb-white);
    text-decoration: none;
    transition: color var(--jb-duration-fast) var(--jb-ease);
}

.insights-featured__title a:hover {
    color: var(--jb-green);
}

.insights-featured__excerpt {
    font-family: var(--jb-font-body);
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--jb-text-muted);
    margin: 0 0 1.5rem;
    max-width: 850px;
}

.insights-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--jb-font-mono);
    font-size: var(--jb-text-sm);
    font-weight: 500;
    color: var(--jb-white);
    text-decoration: none;
    transition: color var(--jb-duration-fast) var(--jb-ease),
                gap var(--jb-duration-fast) var(--jb-ease);
}

.insights-read-more:hover {
    color: var(--jb-green);
    gap: 0.75rem;
}

/* ==========================================
   EDITORIAL NUMBERED ARTICLE LIST
   ========================================== */

.insights-list {
    display: flex;
    flex-direction: column;
}

.insights-list__item {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) auto;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1.75rem 0;
    border-bottom: 1px solid var(--jb-border-light);
    transition: border-color var(--jb-duration-fast) var(--jb-ease);
}

.insights-list__item:hover {
    border-bottom-color: var(--jb-border);
}

.insights-list__num {
    font-family: var(--jb-font-mono);
    font-size: var(--jb-text-xs);
    color: var(--jb-text-subtle);
    padding-top: 0.25rem;
}

.insights-list__content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.insights-list__header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.insights-list__title {
    font-family: var(--jb-font-display);
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 500;
    line-height: 1.25;
    margin: 0;
}

.insights-list__title a {
    color: var(--jb-white);
    text-decoration: none;
    transition: color var(--jb-duration-fast) var(--jb-ease);
}

.insights-list__title a:hover {
    color: var(--jb-green);
}

.insights-list__desc {
    font-family: var(--jb-font-body);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--jb-text-muted);
    margin: 0;
    max-width: 800px;
}

.insights-list__action {
    display: flex;
    align-items: center;
    padding-top: 0.25rem;
}

.insights-list__arrow {
    font-size: 1.25rem;
    color: var(--jb-text-subtle);
    transition: color var(--jb-duration-fast) var(--jb-ease),
                transform var(--jb-duration-fast) var(--jb-ease);
}

.insights-list__item:hover .insights-list__arrow {
    color: var(--jb-green);
    transform: translate(3px, -3px);
}

/* ==========================================
   PAGINATION
   ========================================== */

.insights-pagination {
    margin-top: clamp(3rem, 5vw, 4.5rem);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.insights-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    background: var(--jb-surface);
    border: 1px solid var(--jb-border);
    border-radius: var(--jb-radius-sm);
    color: var(--jb-text-muted);
    font-family: var(--jb-font-mono);
    font-size: var(--jb-text-xs);
    text-decoration: none;
    transition: border-color var(--jb-duration-fast) var(--jb-ease),
                color var(--jb-duration-fast) var(--jb-ease),
                background-color var(--jb-duration-fast) var(--jb-ease);
}

.insights-pagination .page-numbers:hover {
    border-color: var(--jb-text-subtle);
    color: var(--jb-white);
    background: var(--jb-surface-raised);
}

.insights-pagination .page-numbers.current {
    background: rgba(24, 169, 87, 0.15);
    border-color: var(--jb-green);
    color: var(--jb-white);
    font-weight: 600;
}

/* ==========================================
   DELIBERATE EMPTY STATE
   ========================================== */

.insights-empty {
    background: var(--jb-surface);
    border: 1px solid var(--jb-border);
    padding: clamp(3rem, 6vw, 5rem) 2rem;
    text-align: center;
    max-width: 680px;
    margin: 0 auto;
}

.insights-empty .eyebrow {
    color: var(--jb-text-subtle);
    display: block;
    margin-bottom: 1rem;
}

.insights-empty__title {
    font-family: var(--jb-font-display);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 500;
    color: var(--jb-white);
    margin: 0 0 1rem;
}

.insights-empty__desc {
    font-family: var(--jb-font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--jb-text-muted);
    margin: 0;
}

/* ==========================================
   SINGLE ARTICLE READING CONTAINER
   ========================================== */

.insights-single {
    padding: clamp(3.5rem, 6vw, 6rem) 0;
    background: var(--jb-black);
    border-bottom: 1px solid var(--jb-border-light);
}

.insights-single__container {
    max-width: 820px;
    margin: 0 auto;
}

.insights-single__meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.5rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--jb-border-light);
    font-family: var(--jb-font-mono);
    font-size: var(--jb-text-xs);
    color: var(--jb-text-subtle);
}

.insights-single__featured-media {
    margin-bottom: 3rem;
    border: 1px solid var(--jb-border);
    background: var(--jb-surface);
    overflow: hidden;
}

.insights-single__featured-media img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.insights-single__featured-media figcaption {
    padding: 0.75rem 1rem;
    font-family: var(--jb-font-mono);
    font-size: var(--jb-text-xs);
    color: var(--jb-text-subtle);
    border-top: 1px solid var(--jb-border-light);
    background: var(--jb-bg);
}

/* ==========================================
   SINGLE ARTICLE TYPOGRAPHY RHYTHM
   ========================================== */

.insights-single__content {
    font-family: var(--jb-font-body);
    font-size: clamp(1.05rem, 1.2vw, 1.125rem);
    line-height: 1.75;
    color: var(--jb-text);
}

.insights-single__content h2 {
    font-family: var(--jb-font-display);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--jb-white);
    margin: 2.75rem 0 1.25rem;
}

.insights-single__content h3 {
    font-family: var(--jb-font-display);
    font-size: clamp(1.3rem, 2.2vw, 1.6rem);
    font-weight: 500;
    line-height: 1.25;
    color: var(--jb-white);
    margin: 2.25rem 0 1rem;
}

.insights-single__content p {
    margin-bottom: 1.75rem;
}

.insights-single__content a {
    color: var(--jb-green);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--jb-duration-fast) var(--jb-ease);
}

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

.insights-single__content ul,
.insights-single__content ol {
    margin: 0 0 1.75rem 1.5rem;
    padding: 0;
}

.insights-single__content li {
    margin-bottom: 0.6rem;
}

.insights-single__content blockquote {
    margin: 2.25rem 0;
    padding: 1.5rem 1.75rem;
    background: var(--jb-surface);
    border-left: 3px solid var(--jb-green);
    color: var(--jb-white);
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.65;
}

.insights-single__content blockquote p:last-child {
    margin-bottom: 0;
}

.insights-single__content pre {
    background: var(--jb-surface);
    border: 1px solid var(--jb-border);
    border-radius: var(--jb-radius-sm);
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    margin: 2rem 0;
}

.insights-single__content strong,
.insights-single__content b {
    color: var(--jb-white);
    font-weight: 600;
}

.insights-single__content em,
.insights-single__content i {
    font-style: italic;
}

.insights-single__content code {
    font-family: var(--jb-font-mono);
    font-size: 0.88em;
    color: var(--jb-green-soft);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.15em 0.4em;
    border-radius: var(--jb-radius-sm);
}

.insights-single__content pre {
    background: var(--jb-surface);
    border: 1px solid var(--jb-border);
    border-radius: var(--jb-radius-sm);
    padding: 1.25rem 1.5rem;
    overflow-x: auto;
    margin: 2rem 0;
}

.insights-single__content pre code {
    background: transparent;
    padding: 0;
    font-size: 0.9rem;
    color: var(--jb-green-soft);
    display: block;
}

.insights-single__content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem 0;
    border-radius: var(--jb-radius-sm);
    border: 1px solid var(--jb-border);
}

.insights-single__content figure {
    margin: 2rem 0;
}

.insights-single__content figcaption {
    font-family: var(--jb-font-mono);
    font-size: var(--jb-text-xs);
    color: var(--jb-text-subtle);
    margin-top: 0.5rem;
    text-align: center;
}

.insights-single__content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-family: var(--jb-font-mono);
    font-size: var(--jb-text-sm);
    display: block;
    overflow-x: auto;
}

.insights-single__content th,
.insights-single__content td {
    padding: 0.75rem 1rem;
    border: 1px solid var(--jb-border-light);
    text-align: left;
}

.insights-single__content th {
    background: var(--jb-surface);
    color: var(--jb-white);
    font-weight: 600;
}

.insights-single__content tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.02);
}

/* Article Footer Navigation */
.insights-single__footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--jb-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.insights-nav-link {
    display: inline-flex;
    flex-direction: column;
    gap: 0.35rem;
    text-decoration: none;
    color: var(--jb-text-muted);
    font-family: var(--jb-font-body);
    font-size: 0.92rem;
    transition: color var(--jb-duration-fast) var(--jb-ease);
}

.insights-nav-link:hover {
    color: var(--jb-white);
}

.insights-nav-link__label {
    font-family: var(--jb-font-mono);
    font-size: var(--jb-text-xs);
    color: var(--jb-text-subtle);
    text-transform: uppercase;
}

/* ==========================================
   RESPONSIVE (TABLET & MOBILE)
   ========================================== */

@media (max-width: 768px) {
    .insights-list__item {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .insights-list__num {
        display: none;
    }

    .insights-featured__card {
        padding: 1.5rem 1.25rem;
    }

    .insights-featured__top {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .insights-single__meta-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

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