:root {
    --inv-fix-gold: #d7aa4f;
    --inv-fix-ink: #111713;
    --inv-fix-cream: #f6f2e9;
}

/* Keep the crowded legacy navigation out of laptop widths. */
@media (min-width: 1367px) and (max-width: 1599px) {
    #sp-header .sp-megamenu-wrapper.d-flex {
        display: none !important;
    }

    #sp-header .offcanvas-toggler,
    #sp-header .offcanvas-toggler-secondary {
        align-items: center !important;
        display: flex !important;
        justify-content: center !important;
    }
}

/* Make the account flyout usable when the full desktop navigation is present. */
@media (min-width: 1600px) {
    #sp-header {
        overflow: visible !important;
        z-index: 10050 !important;
    }

    #sp-header .sp-megamenu-wrapper,
    #sp-header .sp-megamenu-parent {
        overflow: visible !important;
    }

    #sp-header .sp-megamenu-parent > li.btn-account {
        position: relative !important;
    }

    #sp-header .sp-megamenu-parent > li.btn-account > .sp-dropdown {
        left: auto !important;
        min-width: 260px !important;
        right: 0 !important;
        top: 100% !important;
        width: 290px !important;
        z-index: 10060 !important;
    }

    #sp-header .sp-megamenu-parent > li.btn-account:hover > .sp-dropdown,
    #sp-header .sp-megamenu-parent > li.btn-account:focus-within > .sp-dropdown {
        display: block !important;
    }

    #sp-header .sp-megamenu-parent > li.btn-account > .sp-dropdown > .sp-dropdown-inner {
        background: #fff !important;
        border: 1px solid rgba(17, 23, 19, .12) !important;
        border-radius: 0 0 10px 10px !important;
        box-shadow: 0 18px 42px rgba(0, 0, 0, .2) !important;
        padding: 10px !important;
    }

    #sp-header .sp-megamenu-parent > li.btn-account .sp-dropdown-inner > .row,
    #sp-header .sp-megamenu-parent > li.btn-account .sp-dropdown-items {
        display: block !important;
        margin: 0 !important;
        width: 100% !important;
    }

    #sp-header .sp-megamenu-parent > li.btn-account .sp-dropdown-inner [class*="col-"],
    #sp-header .sp-megamenu-parent > li.btn-account .sp-dropdown-items > li {
        display: block !important;
        float: none !important;
        max-width: none !important;
        padding: 0 !important;
        width: 100% !important;
    }

    #sp-header .sp-megamenu-parent > li.btn-account .sp-dropdown-items > li > a {
        border-radius: 6px !important;
        color: #172019 !important;
        display: block !important;
        line-height: 1.35 !important;
        padding: 11px 12px !important;
        white-space: normal !important;
    }

    #sp-header .sp-megamenu-parent > li.btn-account .sp-dropdown-items > li > a:hover,
    #sp-header .sp-megamenu-parent > li.btn-account .sp-dropdown-items > li > a:focus-visible {
        background: #f1f6f2 !important;
        color: #0e5a34 !important;
        outline: none !important;
    }
}

/* The portfolio script adds inv-portfolio-hero after load; keep truncation links readable. */
.inv-portfolio-hero .sppb-content-truncation-show,
.inv-portfolio-hero .sppb-content-truncation-show a,
.inv-portfolio-hero .sppb-addon-text-block a,
.inv-portfolio-hero a[role="button"] {
    color: var(--inv-fix-gold) !important;
    text-decoration-color: currentColor !important;
}

.inv-portfolio-hero .sppb-content-truncation-show:hover,
.inv-portfolio-hero .sppb-content-truncation-show a:hover,
.inv-portfolio-hero .sppb-addon-text-block a:hover,
.inv-portfolio-hero a[role="button"]:hover {
    color: #f2cd7e !important;
}

.inv-portfolio-hero a:focus-visible,
.inv-portfolio-hero button:focus-visible {
    outline: 3px solid #f2cd7e !important;
    outline-offset: 3px !important;
}

/* Briefing replaces the empty category state without touching Joomla content data. */
body.inv-page-briefing #sp-component > .sp-column > #system-message-container,
body.inv-page-briefing #sp-component > .sp-column > style,
body.inv-page-briefing #sp-component > .sp-column > .blog {
    display: none !important;
}

body.inv-page-briefing #sp-main-body {
    background:
        radial-gradient(circle at 80% 10%, rgba(199, 154, 59, .14), transparent 34%),
        linear-gradient(180deg, #0e1511 0%, #17231b 58%, #f5f1e8 58%, #f5f1e8 100%);
    padding: clamp(34px, 5vw, 76px) 0 72px;
}

.inv-briefing {
    color: #eef4ef;
    margin: 0 auto;
    max-width: 1180px;
}

.inv-briefing__hero {
    max-width: 850px;
    padding: clamp(22px, 4vw, 54px) 0 clamp(40px, 6vw, 76px);
}

.inv-briefing__eyebrow {
    color: var(--inv-fix-gold);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .18em;
    margin: 0 0 18px;
    text-transform: uppercase;
}

.inv-briefing h1 {
    color: #fff;
    font-size: clamp(42px, 6vw, 78px);
    font-weight: 750;
    letter-spacing: -.045em;
    line-height: .98;
    margin: 0;
}

.inv-briefing__lead {
    color: #cdd8d0;
    font-size: clamp(18px, 2vw, 23px);
    line-height: 1.55;
    margin: 30px 0 0;
    max-width: 760px;
}

.inv-briefing__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.inv-briefing__actions a {
    border-radius: 7px;
    display: inline-flex;
    font-weight: 750;
    justify-content: center;
    padding: 14px 20px;
    text-decoration: none;
}

.inv-briefing__primary {
    background: var(--inv-fix-gold);
    color: #111713 !important;
}

.inv-briefing__secondary {
    border: 1px solid rgba(255, 255, 255, .32);
    color: #fff !important;
}

.inv-briefing__actions a:hover,
.inv-briefing__actions a:focus-visible {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.inv-briefing__actions a:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.inv-briefing__grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inv-briefing__grid article {
    background: #fff;
    border: 1px solid rgba(17, 23, 19, .1);
    border-radius: 12px;
    box-shadow: 0 14px 36px rgba(16, 24, 19, .09);
    color: var(--inv-fix-ink);
    min-height: 255px;
    padding: 30px;
}

.inv-briefing__grid span {
    color: #9b6f19;
    font-size: 13px;
    font-weight: 850;
    letter-spacing: .15em;
}

.inv-briefing__grid h2 {
    color: var(--inv-fix-ink);
    font-size: 25px;
    line-height: 1.15;
    margin: 40px 0 14px;
}

.inv-briefing__grid p,
.inv-briefing__footer p {
    color: #526057;
    line-height: 1.65;
    margin: 0;
}

.inv-briefing__footer {
    color: var(--inv-fix-ink);
    padding: 30px 4px 0;
}

@media (max-width: 767px) {
    body.inv-page-briefing #sp-main-body {
        background: linear-gradient(180deg, #0e1511 0%, #17231b 44%, #f5f1e8 44%, #f5f1e8 100%);
    }

    .inv-briefing__grid {
        grid-template-columns: 1fr;
    }

    .inv-briefing__grid article {
        min-height: 0;
    }
}
