/* =========================================================
   INSIGHTS PAGE
   ========================================================= */


/* ---------------------------------------------------------
   HERO
   --------------------------------------------------------- */

.insights-page-hero {
    padding: 110px 0 90px;
    background: var(--gray-50);
}

.insights-page-hero .container {
    max-width: 920px;
}

.insights-page-hero .container .section-label{
    
      /* Layout */
    display: inline-flex;
    align-items: center;
    gap: 12px;

    /* Spacing */
    margin: 0 0 24px;

    /* Typography */
    color: #ffb87a;

    font-size: 0.8rem;
    font-family: inherit;
    font-weight: 700;

    letter-spacing: 0.17em;
    line-height: 1.5;

    text-transform: uppercase;
}

.section-label::before {
    content: "";

    /* Customizable orange */
    --kc-orange: var(--orange, #e87524);

    display: inline-block;
    flex-shrink: 0;

    /* Decoration dimensions */
    width: 30px;
    height: 8px;

    /* Two horizontal orange lines */
    background:
        linear-gradient(
            var(--kc-orange),
            var(--kc-orange)
        ) center top / 30px 2px no-repeat,

        linear-gradient(
            var(--kc-orange),
            var(--kc-orange)
        ) center bottom / 30px 2px no-repeat;
}


.insights-page-hero h1 {
    max-width: 850px;
    margin: 12px 0 24px;
    color: var(--navy);
    font-size: clamp(2.5rem, 5vw, 4.2rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.insights-page-hero > .container > p:not(.section-label) {
    max-width: 820px;
    margin: 0;
    color: var(--gray-600);
    font-size: 1.08rem;
    line-height: 1.8;
}


/* ---------------------------------------------------------
   TOPICS
   --------------------------------------------------------- */

.insights-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 36px 0 0;
    padding: 0;
    list-style: none;
}

.insights-topics li {
    padding: 8px 15px;
    color: var(--navy);
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.4;
    transition:
        color 0.25s ease,
        background-color 0.25s ease,
        border-color 0.25s ease,
        transform 0.25s ease;
}

.insights-topics li:hover {
    color: var(--white);
    background: var(--orange);
    border-color: var(--orange);
    transform: translateY(-2px);
}


/* ---------------------------------------------------------
   ARTICLES SECTION
   --------------------------------------------------------- */

.insights-articles-section {
    padding: 100px 0;
}

.insights-page-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}


/* ---------------------------------------------------------
   ARTICLE CARD
   --------------------------------------------------------- */

.insights-page-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.insights-page-card:hover {
    transform: translateY(-8px);
    border-color: var(--orange);
    box-shadow: 0 18px 40px rgba(11, 31, 58, 0.10);
}


/* ---------------------------------------------------------
   ARTICLE IMAGE
   --------------------------------------------------------- */

.insights-page-card__image {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--gray-100);
}

.insights-page-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.insights-page-card:hover .insights-page-card__image img {
    transform: scale(1.04);
}


/* ---------------------------------------------------------
   CARD CONTENT
   --------------------------------------------------------- */

.insights-page-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 28px;
}


/* ---------------------------------------------------------
   META
   --------------------------------------------------------- */

.insights-page-card__meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--gray-600);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.insights-page-card__meta :is(span, p):last-child {
    color: var(--orange);
}


/* ---------------------------------------------------------
   ARTICLE TITLE
   --------------------------------------------------------- */

.insights-page-card h2 {
    margin: 0 0 14px;
    color: var(--navy);
    font-size: 1.35rem;
    line-height: 1.3;
}

.insights-page-card h2 a {
    transition: color 0.25s ease;
}

.insights-page-card:hover h2 a {
    color: var(--orange);
}


/* ---------------------------------------------------------
   EXCERPT
   --------------------------------------------------------- */

.insights-page-card__content > p {
    margin: 0 0 24px;
    color: var(--gray-600);
    line-height: 1.7;
}


/* ---------------------------------------------------------
   READ ARTICLE
   --------------------------------------------------------- */

.insights-page-card__link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: auto;
    color: var(--navy);
    font-weight: 700;
    transition:
        color 0.25s ease,
        transform 0.25s ease;
}

.insights-page-card__link:hover {
    color: var(--orange);
    transform: translateX(4px);
}


/* ---------------------------------------------------------
   EMPTY STATE
   --------------------------------------------------------- */

.insights-empty {
    max-width: 700px;
    margin: 0 auto;
    padding: 60px 30px;
    text-align: center;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 16px;
}

.insights-empty h2 {
    margin: 0 0 12px;
    color: var(--navy);
}

.insights-empty p {
    margin: 0;
    color: var(--gray-600);
    line-height: 1.7;
}


/* ---------------------------------------------------------
   REVEAL ANIMATION
   --------------------------------------------------------- */

.insights-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}

.insights-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* ---------------------------------------------------------
   STAGGERED ARTICLE CARDS
   --------------------------------------------------------- */

.insights-stagger .insights-page-card {
    opacity: 0;
    transform: translateY(35px);
    transition:
        opacity 0.65s ease,
        transform 0.65s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.insights-stagger.is-visible .insights-page-card {
    opacity: 1;
    transform: translateY(0);
}

.insights-stagger.is-visible .insights-page-card:nth-child(1) {
    transition-delay: 0.05s;
}

.insights-stagger.is-visible .insights-page-card:nth-child(2) {
    transition-delay: 0.12s;
}

.insights-stagger.is-visible .insights-page-card:nth-child(3) {
    transition-delay: 0.19s;
}

.insights-stagger.is-visible .insights-page-card:nth-child(4) {
    transition-delay: 0.26s;
}

.insights-stagger.is-visible .insights-page-card:nth-child(5) {
    transition-delay: 0.33s;
}

.insights-stagger.is-visible .insights-page-card:nth-child(6) {
    transition-delay: 0.40s;
}

.insights-stagger.is-visible .insights-page-card:nth-child(7) {
    transition-delay: 0.47s;
}

.insights-stagger.is-visible .insights-page-card:nth-child(8) {
    transition-delay: 0.54s;
}

.insights-stagger.is-visible .insights-page-card:nth-child(9) {
    transition-delay: 0.61s;
}


/* ---------------------------------------------------------
   REDUCED MOTION
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    .insights-reveal,
    .insights-stagger .insights-page-card,
    .insights-page-card,
    .insights-page-card__image img,
    .insights-page-card__link,
    .insights-topics li {
        transition: none;
    }

    .insights-reveal,
    .insights-stagger .insights-page-card {
        opacity: 1;
        transform: none;
    }
}


/* ---------------------------------------------------------
   TABLET
   --------------------------------------------------------- */

@media (max-width: 900px) {

    .insights-page-hero {
        padding: 90px 0 75px;
    }

    .insights-articles-section {
        padding: 80px 0;
    }

    .insights-page-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media (max-width: 640px) {

    .insights-page-hero {
        padding: 70px 0 60px;
    }

    .insights-page-hero h1 {
        font-size: 2.35rem;
    }

    .insights-page-hero > .container > p:not(.section-label) {
        font-size: 1rem;
    }

    .insights-topics {
        gap: 8px;
        margin-top: 28px;
    }

    .insights-topics li {
        padding: 7px 12px;
        font-size: 0.8rem;
    }

    .insights-articles-section {
        padding: 65px 0;
    }

    .insights-page-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .insights-page-card__content {
        padding: 24px;
    }
}



/* =========================================================
   INSIGHTS — FUNCTIONAL CATEGORY FILTERS
   ========================================================= */

/*
 * Allow links to fill the entire pill.
 */

.insights-topics li {
    padding: 0;
}

.insights-topics li a {
    display: block;

    padding: 8px 15px;

    color: inherit;
    text-decoration: none;

    border-radius: inherit;
}


/*
 * Currently selected category.
 */

.insights-topics li.is-active {
    color: var(--white);

    background: var(--orange);
    border-color: var(--orange);
}


/*
 * Keyboard accessibility.
 */

.insights-topics li:focus-within {
    outline: 2px solid var(--orange);
    outline-offset: 3px;
}


/* =========================================================
   ARTICLE RESULTS
   ========================================================= */

.mlcpa-insights-results {
    width: 100%;

    scroll-margin-top: 110px;
}


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

.insights-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;

    gap: 20px;

    margin-top: 50px;
}

.insights-pagination a {
    padding: 10px 18px;

    color: var(--navy);
    background: var(--white);

    border: 1px solid var(--gray-200);
    border-radius: 10px;

    text-decoration: none;
    font-weight: 600;

    transition:
        color 0.25s ease,
        background-color 0.25s ease,
        border-color 0.25s ease;
}

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

.insights-pagination span {
    color: var(--gray-600);
    font-size: 0.9rem;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 640px) {

    .insights-topics li a {
        padding: 7px 12px;
    }

    .insights-pagination {
        gap: 12px;
    }
}



/* =========================================================
   INSIGHTS — CENTERED CONTENT & SIDE SPACING
   ========================================================= */

.mlcpa-insights-results {

    /* Maximum width of the articles area */
    max-width: 1200px;

    /* Automatically center horizontally */
    margin-left: auto;
    margin-right: auto;

    /* Space between content and screen edges */
    padding-left: 30px;
    padding-right: 30px;

    padding-top: 50px;
    padding-bottom: 50px;

    /* Keep padding inside the defined width */
    box-sizing: border-box;

    width: 100%;
}


/* ---------------------------------------------------------
   MOBILE ADJUSTMENTS
   --------------------------------------------------------- */

@media (max-width: 640px) {

    .mlcpa-insights-results {
        padding-left: 20px;
        padding-right: 20px;
    }

}

