/* ==========================================================================
   The five Insights tabs on the listing pages (user, 2026-11-19), as in the /insights-v2 hero: the labels spread
   across the page's container, white Poppins 16/500, a short rule under each, the current one blue.
   Inside the featured band (.ins-feat--tabs) they sit on its bottom edge; without one, on .ins-tabs-band.
   Partial: frontend/insights/partials/insights-tabs.blade.php
   ========================================================================== */

.ins-tabs {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 14px 0 18px;
    font-family: 'Poppins', sans-serif;
}

.ins-tabs .ins-tabs__tab {
    display: block;
    padding: 6px 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.2;
    color: #fff;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    opacity: .9;
    transition: opacity .2s ease;
}

.ins-tabs .ins-tabs__tab:hover,
.ins-tabs .ins-tabs__tab:focus-visible {
    color: #fff;
    text-decoration: none;
    opacity: 1;
}

.ins-tabs .ins-tabs__tab:focus-visible {
    outline: 2px solid #06b0f0;
    outline-offset: 4px;
}

/* The rule under each tab; the current one is blue and a pixel thicker. */
.ins-tabs__tab::after {
    content: '';
    display: block;
    width: 96px;
    max-width: 60%;
    height: 2px;
    margin: 10px auto 0;
    border-radius: 2px;
    background: rgba(255, 255, 255, .35);
}

.ins-tabs__tab.is-active::after {
    height: 3px;
    background: #06b0f0;
}

/* Inside the featured band: on its bottom edge, across the same container as its copy. One height for the four
   listings, the tallest band's (Case Studies, user 2026-11-19), the copy centred in it. */
.ins-feat.ins-feat--tabs {
    min-height: 500px;
    padding-bottom: 116px;
}

.ins-feat--tabs > .ins-tabs {
    position: absolute;
    right: var(--ins-feat-gutter);
    bottom: 0;
    left: var(--ins-feat-gutter);
}

/* No featured article: the tabs on a dark band of their own, the featured band's colour and container. */
.ins-tabs-band {
    --ins-feat-gutter: max(24px, calc((100% - 1278px) / 2));

    padding: 8px var(--ins-feat-gutter) 0;
    background: #151c1f;
}

@media (min-width: 992px) {
    .ins-tabs-band {
        --ins-feat-gutter: max(44px, calc((100% - 1278px) / 2));
    }
}

/* Phones (user, 2026-11-19, UI/UX skill): five underlined labels do not fit one row, and 3 + 2 centred labels look
   ragged. So segmented buttons on a 6-column grid: three spanning two columns over two spanning three, both rows edge
   to edge; 44px touch targets, 8px apart; the current one filled white (dark text, over 15:1). */
@media (max-width: 575px) {
    .ins-tabs {
        display: grid;
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 8px;
        padding: 16px 0 24px;
    }

    .ins-tabs .ins-tabs__tab {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, .45);
        line-height: 1.15;
        text-align: center;
        font-size: 14px;
        white-space: normal;
        opacity: 1;
        transition: background-color .2s ease, color .2s ease, border-color .2s ease;
    }

    .ins-tabs .ins-tabs__tab:nth-child(-n + 3) {
        grid-column: span 2;
    }

    .ins-tabs .ins-tabs__tab:nth-child(n + 4) {
        grid-column: span 3;
    }

    .ins-tabs__tab::after {
        content: none;
    }

    .ins-tabs .ins-tabs__tab.is-active {
        border-color: #fff;
        background: #fff;
        color: #151c1f;
    }

    .ins-tabs .ins-tabs__tab.is-active:hover,
    .ins-tabs .ins-tabs__tab.is-active:focus-visible {
        color: #151c1f;
    }

    /* Room for the two rows (96px) and their padding under the band's copy; the phones' common height. */
    .ins-feat.ins-feat--tabs {
        min-height: 640px;
        padding-bottom: 160px;
    }
}

@media (max-width: 360px) {
    .ins-feat.ins-feat--tabs {
        min-height: 720px;
    }

    .ins-tabs .ins-tabs__tab {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ins-tabs .ins-tabs__tab {
        transition: none;
    }
}
