/* Latest insights: card excerpt + hover lift (keeps existing 3D angles) */
.insight-card__excerpt {
    margin: 0 0 0.35rem;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: rgba(15, 56, 62, 0.68);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
    z-index: 3;
}

button.insight-card__link,
a.insight-card__link {
    appearance: none;
    background: none;
    border: 0;
    padding: 0;
    margin-top: auto;
    padding-top: 1rem;
    font: inherit;
    cursor: pointer;
    text-align: left;
}

a.insight-card__link {
    text-decoration: none;
    color: var(--btn-primary-bg);
}

.insight-empty {
    grid-column: 1 / -1;
    text-align: center;
    max-width: 36rem;
    margin: 0 auto;
    padding: 2rem 1rem;
    color: rgba(15, 56, 62, 0.72);
    line-height: 1.65;
}

@media (hover: hover) and (pointer: fine) {
    html.sx-scroll-ready .insight-card-wrap.is-dynamic:hover .insight-card--3d-l {
        transform: translateY(-6px) rotateY(9deg) rotateX(3deg) translateZ(0);
    }

    html.sx-scroll-ready .insight-card-wrap.is-dynamic:hover .insight-card--3d-c {
        transform: translateY(-6px) rotateY(0deg) rotateX(4deg) translateZ(0);
    }

    html.sx-scroll-ready .insight-card-wrap.is-dynamic:hover .insight-card--3d-r {
        transform: translateY(-6px) rotateY(-9deg) rotateX(3deg) translateZ(0);
    }

    .insight-card-wrap.is-dynamic .insight-card--3d {
        transition:
            box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1),
            transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    }
}

/* Insights slider (homepage — 3 per row on desktop) */
.insights-slider-shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
        "view view"
        "prev next";
    gap: 1rem 0.75rem;
    align-items: center;
    max-width: min(72rem, 100%);
    margin-inline: auto;
    margin-top: clamp(1.25rem, 3vw, 2rem);
}

.insights-slider__viewport {
    grid-area: view;
    min-width: 0;
}

.insights-slider__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.65rem;
    height: 2.65rem;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(var(--rgb-text-dark), 0.12);
    background: rgba(255, 255, 255, 0.95);
    color: var(--footer-navy);
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(var(--rgb-teal-deep), 0.08);
    transition:
        background 0.25s ease,
        color 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.2s ease;
}

.insights-slider__btn:hover {
    background: var(--btn-primary-bg);
    color: #fff;
    border-color: var(--btn-primary-bg);
    box-shadow: 0 6px 18px rgba(var(--rgb-teal-deep), 0.22);
}

.insights-slider__btn:focus-visible {
    outline: 2px solid var(--footer-blue);
    outline-offset: 3px;
}

.insights-slider__btn--prev {
    grid-area: prev;
    justify-self: end;
}

.insights-slider__btn--next {
    grid-area: next;
    justify-self: start;
}

@media (min-width: 768px) {
    .insights-slider-shell {
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-rows: auto;
        grid-template-areas: "prev view next";
        gap: 0 0.65rem;
    }

    .insights-slider__btn--prev,
    .insights-slider__btn--next {
        justify-self: center;
    }
}

.insights-swiper {
    overflow: visible;
    padding-bottom: 0.25rem;
}

.insights-swiper .swiper-wrapper {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.insights-swiper .swiper-slide {
    height: auto;
    display: flex;
    box-sizing: border-box;
}

.insights-swiper .swiper-slide .insight-card-wrap {
    width: 100%;
    height: 100%;
    display: flex;
}

.insights-swiper .swiper-slide .insight-card {
    flex: 1;
    width: 100%;
}

.insights-slider__pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
    min-height: 1.35rem;
    margin-top: clamp(1rem, 2.5vw, 1.35rem);
}

.insights-slider__pagination .swiper-pagination-bullet {
    width: 7px;
    height: 7px;
    margin: 0 4px !important;
    background: var(--brand-teal-deep);
    opacity: 0.3;
    transition:
        opacity 0.25s ease,
        transform 0.25s ease,
        background 0.25s ease;
}

.insights-slider__pagination .swiper-pagination-bullet-active {
    opacity: 1;
    transform: scale(1.2);
    background: var(--brand-teal-bright);
}

/* Modal */
.insight-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.75rem, 3vw, 2rem);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.32s ease,
        visibility 0.32s ease;
}

.insight-modal.is-open {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.insight-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(var(--rgb-brand-ink), 0.42);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.insight-modal__panel {
    position: relative;
    z-index: 1;
    width: min(56rem, 100%);
    max-height: min(92vh, 900px);
    display: flex;
    flex-direction: column;
    background: linear-gradient(168deg, #ffffff 0%, #f8fafb 55%, #f0f4f6 100%);
    border-radius: clamp(14px, 2vw, 20px);
    border: 1px solid rgba(var(--rgb-teal-deep), 0.14);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 28px 80px rgba(var(--rgb-text-dark), 0.18),
        0 12px 28px rgba(var(--rgb-text-dark), 0.08);
    transform: scale(0.94) translateY(12px);
    opacity: 0;
    transition:
        transform 0.38s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.32s ease;
}

.insight-modal.is-open .insight-modal__panel {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.insight-modal__head {
    position: relative;
    flex-shrink: 0;
    padding: clamp(1.25rem, 3vw, 1.75rem) clamp(1.25rem, 3vw, 2rem) 0.75rem;
    border-bottom: 1px solid rgba(var(--rgb-text-dark), 0.06);
}

.insight-modal__category {
    display: inline-block;
    font-family: var(--font-display);
    font-size: var(--type-label);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-teal);
}

.insight-modal__title {
    margin: 0.5rem 3rem 0 0;
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2.4vw, 1.65rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: var(--footer-navy);
}

.insight-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(var(--rgb-text-dark), 0.12);
    background: rgba(255, 255, 255, 0.9);
    color: var(--footer-navy);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}

.insight-modal__close:hover {
    background: var(--btn-primary-bg);
    color: #fff;
    border-color: var(--btn-primary-bg);
}

.insight-modal__body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: clamp(1rem, 2.5vw, 1.5rem) clamp(1.25rem, 3vw, 2rem);
    -webkit-overflow-scrolling: touch;
}

.insight-modal__loading,
.insight-modal__error {
    font-size: 0.9375rem;
    color: rgba(15, 56, 62, 0.65);
}

.insight-modal__error {
    color: #b42318;
}

.insight-modal__content {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: rgba(15, 56, 62, 0.88);
}

.insight-modal__content p {
    margin: 0 0 1rem;
}

.insight-modal__content h2,
.insight-modal__content h3 {
    font-family: var(--font-display);
    margin: 1.5rem 0 0.65rem;
    color: var(--text-heading);
}

.insight-modal__content ul,
.insight-modal__content ol {
    margin: 0 0 1rem 1.25rem;
}

.insight-modal__content a {
    color: var(--btn-primary-bg);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.insight-modal__gallery {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0;
}

.insight-modal__gallery img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    border: 1px solid rgba(var(--rgb-text-dark), 0.08);
    box-shadow: 0 8px 24px rgba(var(--rgb-text-dark), 0.06);
}

.insight-modal__video {
    position: relative;
    margin: 1.5rem 0;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #0a1214;
    border: 1px solid rgba(var(--rgb-text-dark), 0.1);
}

.insight-modal__video iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.insight-modal__video-link {
    display: inline-flex;
    margin: 0.75rem 0;
    font-weight: 600;
    color: var(--btn-primary-bg);
}

.insight-modal__foot {
    flex-shrink: 0;
    padding: 1rem clamp(1.25rem, 3vw, 2rem) clamp(1.25rem, 3vw, 1.75rem);
    border-top: 1px solid rgba(var(--rgb-text-dark), 0.06);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.insight-modal__share-label {
    margin: 0;
    width: 100%;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(15, 56, 62, 0.45);
}

.insight-modal__share {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.insight-modal__share-btn {
    appearance: none;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(var(--rgb-teal-deep), 0.25);
    background: rgba(255, 255, 255, 0.85);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--footer-navy);
    cursor: pointer;
    text-decoration: none;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.insight-modal__share-btn:hover {
    background: var(--btn-primary-bg);
    border-color: var(--btn-primary-bg);
    color: #fff;
}

.insight-modal__cta {
    margin-left: auto;
}

@media (max-width: 640px) {
    .insight-modal {
        padding: 0;
        align-items: stretch;
    }

    .insight-modal__panel {
        width: 100%;
        max-height: 100%;
        border-radius: 0;
        min-height: 100%;
    }

    .insight-modal__foot {
        flex-direction: column;
        align-items: stretch;
    }

    .insight-modal__cta {
        margin-left: 0;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .insight-modal,
    .insight-modal__panel {
        transition: none;
    }

    .insight-modal.is-open .insight-modal__panel {
        transform: none;
    }
}

body.insight-modal-open {
    overflow: hidden;
}
