/* =========================================================
   CANDOUR INSIGHTS TEMPLATE
   Completely independent single-post presentation
   ========================================================= */


/* ---------- Site header: overlay hero at top ---------- */

/*
 * The live site header can come from Finanza, Elementor or a theme wrapper.
 * JS adds .candour-insight-site-header to the actual visible header so this
 * template does not depend on one theme-specific class name.
 */
body.candour-insight-template-page .candour-insight-site-header {
    position: absolute !important;
    top: var(--candour-adminbar-height, 0px) !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 9999 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: 0 !important;
    transition: background-color 0.22s ease, box-shadow 0.22s ease;
}

/* Make common nested header wrappers transparent too. */
body.candour-insight-template-page:not(.candour-insight-template-page--scrolled)
.candour-insight-site-header,
body.candour-insight-template-page:not(.candour-insight-template-page--scrolled)
.candour-insight-site-header .gdlr-header-inner,
body.candour-insight-template-page:not(.candour-insight-template-page--scrolled)
.candour-insight-site-header .gdlr-header-inner-overlay,
body.candour-insight-template-page:not(.candour-insight-template-page--scrolled)
.candour-insight-site-header .elementor,
body.candour-insight-template-page:not(.candour-insight-template-page--scrolled)
.candour-insight-site-header .elementor-element,
body.candour-insight-template-page:not(.candour-insight-template-page--scrolled)
.candour-insight-site-header .elementor-container,
body.candour-insight-template-page:not(.candour-insight-template-page--scrolled)
.candour-insight-site-header .e-con {
    background-color: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
}

/* Menu/utility text over the image. */
body.candour-insight-template-page:not(.candour-insight-template-page--scrolled)
.candour-insight-site-header a,
body.candour-insight-template-page:not(.candour-insight-template-page--scrolled)
.candour-insight-site-header .gdlr-navigation .sf-menu > li > a,
body.candour-insight-template-page:not(.candour-insight-template-page--scrolled)
.candour-insight-site-header .gdlr-navigation-wrapper,
body.candour-insight-template-page:not(.candour-insight-template-page--scrolled)
.candour-insight-site-header .gdlr-navigation-wrapper i {
    color: #ffffff !important;
}

body.candour-insight-template-page:not(.candour-insight-template-page--scrolled)
.candour-insight-site-header .gdlr-logo img,
body.candour-insight-template-page:not(.candour-insight-template-page--scrolled)
.candour-insight-site-header .site-logo img,
body.candour-insight-template-page:not(.candour-insight-template-page--scrolled)
.candour-insight-site-header .custom-logo {
    filter: brightness(0) invert(1);
}


/* ---------- Solid/fixed header after scroll ---------- */

body.candour-insight-template-page.candour-insight-template-page--scrolled
.candour-insight-site-header {
    position: fixed !important;
    background: #ffffff !important;
    box-shadow: 0 4px 18px rgba(18, 34, 50, 0.08) !important;
}

body.candour-insight-template-page.candour-insight-template-page--scrolled
.candour-insight-site-header .gdlr-header-inner,
body.candour-insight-template-page.candour-insight-template-page--scrolled
.candour-insight-site-header .gdlr-header-inner-overlay,
body.candour-insight-template-page.candour-insight-template-page--scrolled
.candour-insight-site-header .elementor,
body.candour-insight-template-page.candour-insight-template-page--scrolled
.candour-insight-site-header .elementor-element,
body.candour-insight-template-page.candour-insight-template-page--scrolled
.candour-insight-site-header .elementor-container,
body.candour-insight-template-page.candour-insight-template-page--scrolled
.candour-insight-site-header .e-con {
    background-color: #ffffff !important;
}

body.candour-insight-template-page.candour-insight-template-page--scrolled
.candour-insight-site-header a,
body.candour-insight-template-page.candour-insight-template-page--scrolled
.candour-insight-site-header .gdlr-navigation .sf-menu > li > a,
body.candour-insight-template-page.candour-insight-template-page--scrolled
.candour-insight-site-header .gdlr-navigation-wrapper,
body.candour-insight-template-page.candour-insight-template-page--scrolled
.candour-insight-site-header .gdlr-navigation-wrapper i {
    color: #17283c !important;
}

body.candour-insight-template-page.candour-insight-template-page--scrolled
.candour-insight-site-header .gdlr-logo img,
body.candour-insight-template-page.candour-insight-template-page--scrolled
.candour-insight-site-header .site-logo img,
body.candour-insight-template-page.candour-insight-template-page--scrolled
.candour-insight-site-header .custom-logo {
    filter: none;
}

/* =========================================================
   HERO
   ========================================================= */

.candour-insight-page {
    position: relative;
    width: 100vw !important;
    max-width: none !important;
    margin-top: var(--candour-hero-pullup, 0px) !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding: 0 !important;
    overflow-x: clip;
    background: #ffffff;
}

.candour-insight-hero {
    position: relative;
    left: 50%;
    width: 100vw !important;
    max-width: none !important;
    height: clamp(280px, 32vw, 380px);
    margin: 0 0 0 -50vw !important;
    padding: 0 !important;

    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #17283c;
}

.candour-insight-hero--fallback {
    background:
        linear-gradient(
            135deg,
            #17283c 0%,
            #263f57 100%
        );
}

.candour-insight-hero__overlay {
    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            to bottom,
            rgba(7, 15, 24, 0.48) 0%,
            rgba(7, 15, 24, 0.18) 25%,
            rgba(7, 15, 24, 0.04) 62%,
            rgba(7, 15, 24, 0.16) 100%
        );
}


/* =========================================================
   MAIN GRID
   ========================================================= */

.candour-insight-layout {
    position: relative;

    z-index: 3;

    display: grid;

    grid-template-columns:
        minmax(0, 730px)
        280px;

    gap: 96px;

    width: min(
        1106px,
        calc(100vw - 64px)
    );

    margin:
        -72px
        auto
        96px;
}


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

.candour-insight-article {
    min-width: 0;

    padding:
        38px
        42px
        52px;

    background: #ffffff;
}

.candour-insight-article__category {
    margin-bottom: 13px;

    color: #927342;

    font-size: 11px;
    line-height: 1.25;
    font-weight: 700;

    letter-spacing: 0.06em;

    text-transform: uppercase;
}

.candour-insight-article__category a {
    color: inherit;

    text-decoration: none;
}

.candour-insight-article__category a:hover {
    text-decoration: underline;

    text-underline-offset: 3px;
}

.candour-insight-article__title {
    margin: 0 0 11px;

    color: #17283c;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: clamp(34px, 3.6vw, 46px);
    line-height: 1.12;
    font-weight: 600;

    letter-spacing: -0.025em;
}

.candour-insight-article__date {
    margin-bottom: 30px;

    color: #7a8590;

    font-size: 12px;
    line-height: 1.45;
}

.candour-insight-article__content {
    color: #313d49;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    font-size: 16px;
    line-height: 1.7;
}

.candour-insight-article__content p {
    margin: 0 0 17px;
}

.candour-insight-article__content h2 {
    margin: 34px 0 12px;

    color: #17283c;

    font-size: 26px;
    line-height: 1.28;
    font-weight: 600;

    letter-spacing: -0.012em;
}

.candour-insight-article__content h3 {
    margin: 27px 0 10px;

    color: #17283c;

    font-size: 21px;
    line-height: 1.34;
    font-weight: 600;
}

.candour-insight-article__content h4 {
    margin: 23px 0 9px;

    color: #17283c;

    font-size: 18px;
    line-height: 1.4;
    font-weight: 600;
}

.candour-insight-article__content strong {
    color: #203246;

    font-weight: 600;
}

.candour-insight-article__content ul,
.candour-insight-article__content ol {
    margin: 0 0 20px;

    padding-left: 22px;
}

.candour-insight-article__content li {
    margin-bottom: 5px;
}

.candour-insight-article__content a {
    color: #1b4f7a;

    text-decoration: underline;

    text-underline-offset: 3px;
}

.candour-insight-article__content img {
    max-width: 100%;
    height: auto;
}

.candour-insight-article__content figure {
    margin: 28px 0;
}

.candour-insight-article__content figcaption {
    margin-top: 9px;

    color: #77818b;

    font-size: 12px;
    line-height: 1.5;
}

.candour-insight-article__content blockquote {
    margin: 28px 0;

    padding:
        4px
        0
        4px
        20px;

    border-left:
        3px solid
        #927342;

    color: #24364b;

    font-size: 18px;
    line-height: 1.58;
}

.candour-insight-article__content table {
    width: 100%;

    margin: 28px 0;

    border-collapse: collapse;

    font-size: 14px;
}

.candour-insight-article__content th,
.candour-insight-article__content td {
    padding: 10px 12px;

    border:
        1px solid
        #dfe5eb;

    text-align: left;
    vertical-align: top;
}

.candour-insight-article__content th {
    background: #f4f7fa;

    color: #17283c;
}


/* =========================================================
   RIGHT RAIL
   ========================================================= */

.candour-insight-rail {
    min-width: 0;

    padding-top: 78px;
}

@media (min-width: 1025px) {
    .candour-insight-rail {
        position: sticky;

        top: 110px;

        align-self: start;
    }
}

.candour-insight-panel {
    margin-bottom: 28px;

    padding: 20px;

    border:
        1px solid
        #e3e8ee;

    background: #ffffff;
}

.candour-insight-panel__title {
    margin: 0 0 14px;

    padding-bottom: 9px;

    border-bottom:
        1px solid
        #1f2f3f;

    color: #17283c;

    font-size: 11px;
    line-height: 1.3;
    font-weight: 700;

    letter-spacing: 0.07em;

    text-transform: uppercase;
}


/* ---------- Related ---------- */

.candour-insight-related__item {
    display: grid;

    grid-template-columns:
        82px
        minmax(0, 1fr);

    gap: 11px;

    padding: 13px 0;

    border-bottom:
        1px solid
        #e3e8ee;
}

.candour-insight-related__item:first-child {
    padding-top: 0;
}

.candour-insight-related__item:last-child {
    padding-bottom: 0;

    border-bottom: 0;
}

.candour-insight-related__thumb {
    display: block;

    width: 82px;
    height: 62px;

    overflow: hidden;

    background: #eef1f4;
}

.candour-insight-related__thumb img {
    display: block;

    width: 100% !important;
    height: 100% !important;

    object-fit: cover;
}

.candour-insight-related__category {
    margin-bottom: 4px;

    color: #927342;

    font-size: 9px;
    line-height: 1.2;
    font-weight: 700;

    letter-spacing: 0.04em;

    text-transform: uppercase;
}

.candour-insight-related__title {
    margin: 0 0 5px;

    font-size: 12px;
    line-height: 1.34;
    font-weight: 600;
}

.candour-insight-related__title a {
    color: #17283c;

    text-decoration: none;
}

.candour-insight-related__title a:hover {
    text-decoration: underline;

    text-underline-offset: 2px;
}

.candour-insight-related__date {
    color: #87909a;

    font-size: 9px;
    line-height: 1.3;
}


/* ---------- Share ---------- */

.candour-insight-share {
    display: flex;

    flex-direction: column;

    gap: 12px;
}

.candour-insight-share__socials {
    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 10px;
}

.candour-insight-share__icon-button,
.candour-insight-share__copy-button {
    appearance: none;
    -webkit-appearance: none;

    text-decoration: none;

    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.candour-insight-share__icon-button {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    aspect-ratio: 1 / 1;
    min-height: 48px;

    border: 1px solid #dfe5eb;
    border-radius: 999px;

    background: #ffffff;
    color: #304458;
}

.candour-insight-share__icon-button svg {
    width: 18px;
    height: 18px;

    fill: currentColor;
}

.candour-insight-share__copy-button {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 44px;

    padding: 10px 16px;

    border: 1px solid #1f2f3f;
    border-radius: 999px;

    background: #1f2f3f;
    color: #ffffff;

    font-family: inherit;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 600;

    cursor: pointer;
}

.candour-insight-share__icon-button:hover {
    border-color: #1f2f3f;

    background: #1f2f3f;

    color: #ffffff;

    transform: translateY(-1px);
}

.candour-insight-share__copy-button:hover {
    border-color: #17283c;

    background: #17283c;

    color: #ffffff;

    transform: translateY(-1px);
}

/* ---------- Topics ---------- */

.candour-insight-topics {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;
}

.candour-insight-topics a {
    display: flex;

    align-items: center;

    padding:
        6px
        10px;

    border-radius: 999px;

    background: #f4f7fa;

    color: #425466;

    font-size: 10px;
    line-height: 1.2;
    font-weight: 600;

    text-decoration: none;
}

.candour-insight-topics a:hover {
    background: #1f2f3f;

    color: #ffffff;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {
    .candour-insight-layout {
        grid-template-columns:
            minmax(0, 1fr)
            245px;

        gap: 58px;

        width: min(
            980px,
            calc(100vw - 48px)
        );
    }
}

@media (max-width: 900px) {
    .candour-insight-layout {
        grid-template-columns: 1fr;

        gap: 40px;
    }

    .candour-insight-rail {
        position: static;

        padding-top: 0;
    }
}

@media (max-width: 767px) {
    .candour-insight-hero {
        height: 300px;
    }

    .candour-insight-layout {
        width: calc(100vw - 30px);

        margin-top: -48px;
        margin-bottom: 60px;
    }

    .candour-insight-article {
        padding:
            28px
            24px
            40px;
    }

    .candour-insight-article__title {
        font-size: 30px;
        line-height: 1.15;
    }

    .candour-insight-article__content {
        font-size: 15.5px;
        line-height: 1.65;
    }

    .candour-insight-article__content h2 {
        font-size: 23px;
    }

    .candour-insight-panel {
        padding: 18px;
    }
}
