/* Insights — blog/insights archive section (hero + filter bar + featured card
   + recent grid; right sidebar built in the next prompt).
   Real theme variables only: --primary, --secondary, --text-color, --poppins,
   --nutralight, --nutrabold (see includes/class-theme.php get_root_variables).
   Per-instance typography arrives via --ins-* custom properties emitted by the
   render template; the CSS supplies fallback defaults so an untouched block is
   stable. Hardcoded values are limited to white / white-alpha (hero + pills),
   the image gradient fallback, card border/shadow and muted-meta tints, for
   which no theme variable exists. */

.insights {
    padding: 70px 0;
}

/* ===================== HERO ===================== */
.insights .insights-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 44px 48px;
    border-radius: 20px;
    background: var(--primary);
    color: #fff;
}
.insights .ins-hero-content {
    max-width: 680px;
}
.insights .ins-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    font-family: var(--poppins);
    font-size: var(--ins-eyebrow-size, 14px);
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ins-eyebrow-color, rgba(255, 255, 255, .82));
}
.insights .ins-heading {
    margin: 0 0 14px;
    font-family: var(--nutrabold);
    font-weight: 700;
    font-size: var(--ins-heading-size, 38px);
    line-height: 1.18;
    color: var(--ins-heading-color, #fff);
}
.insights .ins-subtext {
    font-family: var(--nutralight);
    font-size: var(--ins-subtext-size, 17px);
    line-height: 1.6;
    color: var(--ins-subtext-color, rgba(255, 255, 255, .9));
}

.insights .ins-hero-stat {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    padding: 26px 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .08);
    text-align: center;
}
.insights .ins-stat-number {
    font-family: var(--nutrabold);
    font-weight: 700;
    font-size: 40px;
    line-height: 1;
    color: #fff;
}
.insights .ins-stat-label {
    margin-top: 8px;
    font-family: var(--nutralight);
    font-size: 14px;
    letter-spacing: .04em;
    color: rgba(255, 255, 255, .85);
}

/* ===================== FILTER BAR ===================== */
.insights .insights-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin: 32px 0;
}
.insights .ins-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.insights .ins-filter-pill {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--secondary);
    font-family: var(--poppins);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
    text-decoration: none;
    transition: .25s;
}
.insights .ins-filter-pill:hover {
    background: color-mix(in srgb, var(--primary) 16%, #fff);
}
.insights .ins-filter-pill.is-active {
    background: var(--primary);
    color: #fff;
}

.insights .insights-search {
    display: flex;
    align-items: center;
    gap: 8px;
}
.insights .ins-search-input {
    width: 220px;
    max-width: 100%;
    padding: 10px 16px;
    border: 1px solid rgba(0, 0, 0, .14);
    border-radius: 999px;
    font-family: var(--nutralight);
    font-size: 14px;
    color: var(--text-color);
    background: #fff;
}
.insights .ins-search-input:focus {
    outline: none;
    border-color: var(--primary);
}
.insights .ins-search-btn {
    padding: 10px 20px;
    border: 0;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-family: var(--poppins);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: .25s;
}
.insights .ins-search-btn:hover {
    background: color-mix(in srgb, var(--primary) 86%, #000);
}

/* ===================== LAYOUT: MAIN + SIDEBAR ===================== */
.insights .insights-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 32px;
    align-items: start;
}
.insights .insights-main {
    min-width: 0;
}
/* keep the (empty) sidebar holding its column width this phase */
.insights .insights-sidebar {
    min-height: 200px;
}

/* ===================== SHARED CARD BITS ===================== */
.insights .ins-card-media {
    display: block;
    position: relative;
    overflow: hidden;
    background: var(--secondary);
}
.insights .ins-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
/* gradient fallback when a post has no featured image */
.insights .ins-media-fallback {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        color-mix(in srgb, var(--primary) 78%, #fff) 0%,
        var(--primary) 60%,
        color-mix(in srgb, var(--primary) 82%, #000) 100%);
}

.insights .ins-pill {
    display: inline-block;
    margin-bottom: 12px;
    padding: 5px 14px;
    border-radius: 999px;
    background: var(--secondary);
    font-family: var(--poppins);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .03em;
    color: var(--primary);
    text-decoration: none;
}

.insights .ins-card-title {
    margin: 0 0 10px;
    font-family: var(--nutrabold);
    font-weight: 700;
    font-size: var(--ins-title-size, 20px);
    line-height: 1.3;
}
.insights .ins-card-title a {
    color: var(--ins-title-color, var(--text-color));
    text-decoration: none;
}
.insights .ins-card-title a:hover {
    color: var(--primary);
}

.insights .ins-card-excerpt {
    margin: 0 0 16px;
    font-family: var(--nutralight);
    font-size: 15px;
    line-height: 1.6;
    color: #5b6b6b;
}

.insights .ins-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    font-family: var(--poppins);
    font-size: var(--ins-meta-size, 13px);
    color: var(--ins-meta-color, #7a8a8a);
}
.insights .ins-card-meta > span {
    position: relative;
}
.insights .ins-card-meta > span + span::before {
    content: "•";
    position: absolute;
    left: -10px;
    color: currentColor;
    opacity: .6;
}

/* ===================== FEATURED CARD ===================== */
.insights .insights-featured {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 0;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .05);
    background: #fff;
    margin-bottom: 40px;
}
.insights .insights-featured .ins-card-media {
    min-height: 280px;
}
.insights .insights-featured .ins-card-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 32px;
}
.insights .insights-featured .ins-card-title {
    font-size: var(--ins-title-size, 26px);
}
.insights .ins-read-link {
    margin-top: 18px;
    font-family: var(--poppins);
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}
.insights .ins-read-link:hover {
    text-decoration: underline;
}

/* ===================== RECENT GRID ===================== */
.insights .insights-recent-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}
.insights .insights-recent-title {
    margin: 0;
    font-family: var(--nutrabold);
    font-weight: 700;
    font-size: 24px;
    color: var(--text-color);
}
.insights .insights-view-all {
    font-family: var(--poppins);
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
}
.insights .insights-view-all:hover {
    text-decoration: underline;
}

.insights .insights-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}
.insights .insights-card {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, .08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .04);
    background: #fff;
}
.insights .insights-card .ins-card-media {
    aspect-ratio: 16 / 9;
}
.insights .insights-card .ins-card-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 22px;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
    .insights { padding: 56px 0; }
    .insights .insights-hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 36px;
    }
    .insights .ins-hero-stat { align-self: stretch; }
    .insights .insights-layout { grid-template-columns: 1fr; }
    .insights .insights-heading { font-size: var(--ins-heading-size, 32px); }
}

@media (max-width: 767px) {
    .insights { padding: 44px 0; }
    .insights .insights-hero { padding: 28px 22px; }
    .insights .ins-heading { font-size: var(--ins-heading-size, 26px); }
    .insights .insights-filter { flex-direction: column; align-items: stretch; }
    .insights .insights-search { width: 100%; }
    .insights .ins-search-input { flex: 1 1 auto; width: auto; }
    .insights .insights-featured { grid-template-columns: 1fr; }
    .insights .insights-featured .ins-card-media { min-height: 200px; aspect-ratio: 16 / 9; }
    .insights .insights-grid { grid-template-columns: 1fr; gap: 18px; }
}
