/* =========================================
   Main Nav (v2) - sticky header, mega menus,
   simple dropdowns, mobile accordion.
   Colours/fonts reused from ModularPageBuilderBaseStyles.css
   Spec source: MegaMenu/Flow*.pdf, MegaMenu/mobile*.pdf
========================================= */

.tnav {
    /* Sticky (not just relative) so this outer header has a tall ancestor
       (the page wrapper) to stay pinned within - it's the immediate parent
       that bounds .tnav__bar's own sticky range below, and .tnav's own box
       is otherwise only as tall as that 82px bar (the mobile drawer/backdrop
       are position: fixed and contribute no flow height), which without this
       would cap .tnav__bar's stick range at ~82px of scroll. */
    position: sticky;
    top: 0;
    z-index: 1000;
    font-family: 'Raleway', sans-serif;
}

main {
    word-wrap: break-word;
}

.tnav button {
    font-family: 'Raleway';
}

.tnav__bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    height: 82px;
    box-shadow: 0 3px 20px rgba(0, 0, 0, 0.08);
}

.tnav__inner {
    height: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tnav__logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.tnav__logo img {
    display: block;
    width: 163px;
    height: 42px;
}

/* ---------- Primary menu ---------- */

.tnav__menu {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0 0 0 50px;
    padding: 0;
    flex: 1;
}

.tnav__item {
    position: relative;
}

/* Mega panels anchor to .tnav__bar (full width), not the narrow trigger <li> -
   cancel the relative positioning context for mega items specifically so the
   absolutely-positioned .tnav__panel--mega bubbles up past it. */
.tnav__item--mega {
    position: static;
}

.tnav__link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    height: 82px;
    box-sizing: border-box;
    background: none;
    border: 0;
    border-bottom: 2px solid transparent;
    font-family: 'Raleway', sans-serif;
    font-size: 19px;
    font-weight: 500;
    color: var(--color-off-black, #1e1e1e);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.tnav__item:hover > .tnav__link,
.tnav__item--mega.is-open > .tnav__link,
.tnav__item--dropdown.is-open > .tnav__link {
    /* faux-bold via text-stroke instead of font-weight, so the text
       metrics/width don't change and neighbouring items don't shift.
       (Previously used a double text-shadow for this, but any non-zero
       blur radius - even 0.6px - visibly blurs the glyph edges; a stroke
       has no blur component.) */
    -webkit-text-stroke: 0.4px currentColor;
    border-image: linear-gradient(90deg, var(--color-teal, #67D1CE), var(--color-yellow, #FFC424), var(--color-pink, #e22b7f)) 1;
}

.tnav__chevron {
    font-size: 14px;
    transition: transform 0.2s ease;
}

.tnav__item--mega.is-open .tnav__chevron,
.tnav__item--dropdown.is-open .tnav__chevron {
    transform: rotate(180deg);
    font-weight: 900;
}

/* ---------- Right-hand actions ---------- */

.tnav__actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.tnav__login {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-off-black, #1e1e1e);
    text-decoration: none;
}

.tnav__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 22px;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Raleway', sans-serif;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: box-shadow 0.2s ease, background 0.2s ease;
}

.tnav__btn--outline {
    background: #f0f0f0;
    color: var(--color-off-black, #1e1e1e);
    border: 1px solid transparent;
}

.tnav__btn--outline:hover {
    background: #e6e6e6;
}

.tnav__btn--teal {
    background: var(--color-light-teal, #b3e8e6);
    color: var(--color-off-black, #1e1e1e);
    border: 1px solid transparent;
}

.tnav__mega-head-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.tnav__burger {
    display: none;
    width: 32px;
    height: 24px;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
}

.tnav__burger span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--color-off-black, #1e1e1e);
    border-radius: 2px;
}

/* ---------- Simple dropdown (About / Resources) ---------- */

.tnav__panel--dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: #fff;
    /* Square top corners - the panel sits flush under the nav bar with no
       gap, so rounding the top made it look like a separate floating card
       rather than an attached menu. */
    border-radius: 0 0 16px 16px;
    box-shadow: 0 3px 30px rgba(0, 0, 0, 0.1);
    padding: 12px;
    z-index: 1001;
}

.tnav__item--dropdown.is-open .tnav__panel--dropdown {
    display: block;
}

.tnav__dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tnav__dropdown-list li {
    margin-bottom: 4px;
}

.tnav__dropdown-list li:last-child {
    margin-bottom: 0;
}

.tnav__dropdown-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 50px;
    padding: 0 16px;
    border-radius: 8px;
    border: 1px solid transparent;
    box-sizing: border-box;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    color: var(--color-off-black, #1e1e1e);
    text-decoration: none;
    transition: border-color 0.2s ease;
}

.tnav__dropdown-list a i {
    font-size: 13px;
    color: var(--color-medium-teal, #25837D);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tnav__dropdown-list a:hover {
    /* Bold + gradient border only on hover - no colour change on the label
       text itself for this simple dropdown style. */
    font-weight: 700;
    background-image: linear-gradient(white, white),
        linear-gradient(90deg, var(--color-teal, #67D1CE), var(--color-yellow, #FFC424), var(--color-pink, #e22b7f));
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.tnav__dropdown-list a:hover i {
    opacity: 1;
}

/* ---------- Mega menu (Platform / Solutions for) ---------- */

.tnav__panel--mega {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 3px 30px rgba(0, 0, 0, 0.1);
    z-index: 1001;
}

.tnav__item--mega.is-open .tnav__panel--mega {
    display: block;
}

.tnav__panel-inner {
    max-width: 1920px;
    margin: 0 auto;
    padding: 50px 40px;
}

.tnav__mega-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    padding-bottom: 50px;
}

.tnav__mega-title {
    font-size: 33px;
    line-height: 1.2;
    font-weight: 700;
    margin: 0 0 8px;
    font-family: 'Raleway', sans-serif;
}

.tnav__mega-sub {
    font-size: 16px;
    line-height: 1.5;
    font-family: 'Montserrat', sans-serif;
    color: #4a4a4a;
    margin: 0;
    max-width: 700px;
}

.tnav__mega-columns {
    display: flex;
    gap: 30px;
}

.tnav__mega-columns--plain .tnav__mega-col {
    padding-top: 0;
}

.tnav__mega-col {
    flex: 1;
    min-width: 0;
}

.tnav__mega-col-split {
    display: flex;
    gap: 20px;
}

.tnav__mega-col-split .tnav__mega-links {
    flex: 1;
}

.tnav__mega-col-heading {
    font-size: 19px;
    font-weight: 600;
    margin: 0 0 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e7;
}

.tnav__mega-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 50px;
    box-sizing: border-box;
    padding: 0 16px;
    border: 1px solid #e5e5e7;
    border-radius: 16px;
    box-shadow: 0 3px 10px rgba(30, 30, 30, 0.06);
    font-size: 19px;
    font-weight: 700;
    font-family: 'Raleway', sans-serif;
    margin-bottom: 28px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background:white;
    /* This is now an <a> (was a plain <div>) so it needs the browser's
       default link styling (underline, blue-ish text) explicitly reset to
       preserve the original look. */
    text-decoration: none;
    color: inherit;
}

/* Even rainbow glow behind the card, sized equally on all 4 sides via a
   blurred pseudo-element rather than stacked left/right box-shadows -
   the old 3-shadow recipe (offset left, centre, offset right) left the
   top/bottom edges with almost none of the colour, which read as a muddy
   grey band instead of a clean glow. */
.tnav__mega-card::before {
    content: '';
    position: absolute;
    inset: -6px;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--color-teal, #67D1CE), var(--color-yellow, #FFC424), var(--color-pink, #e22b7f));
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.tnav__mega-card i {
    margin-left: auto;
    font-size: 14px;
    color: #9a9a9a;
}

.tnav__mega-card-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border-radius: 5px;
    transform: rotate(45deg);
    background: linear-gradient(135deg, var(--color-teal, #67D1CE), var(--color-yellow, #FFC424), var(--color-pink, #e22b7f));
}

.tnav__mega-card:hover,
.tnav__mega-card--active {
    border-color: #fff;
    box-shadow: 0 0 0 2px #fff;
}

.tnav__mega-card:hover::before,
.tnav__mega-card--active::before {
    opacity: 0.35;
}

.tnav__mega-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tnav__mega-links li {
    margin-bottom: 14px;
}

.tnav__mega-links a {
    font-size: 16px;
    line-height: 1.5;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    color: var(--color-off-black, #1e1e1e);
    text-decoration: none;
}

.tnav__mega-links a:hover,
.tnav__mega-link--accent {
    color: var(--color-medium-teal, #25837D) !important;
    font-weight: 700 !important;
}

.tnav__mega-col--promo {
    border-left: 1px solid #e5e5e7;
    padding-left: 30px;
    flex: 0 0 260px;
}

.tnav__mega-promo-title {
    /* Matches .tnav__mega-col-heading's box model (padding-bottom instead
       of a fixed height) so their border-bottom rules land on the same
       line across columns. Also uses `gap` instead of relying on markup
       whitespace for the icon/label space - whitespace between flex
       children can collapse. */
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e7;
    font-size: 19px;
    font-weight: 700;
    margin: 0 0 28px;
}

.tnav__mega-promo-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex-shrink: 0;
}

.tnav__mega-col--promo p {
    font-size: 16px;
    line-height: 1.5;
    font-family: 'Montserrat', sans-serif;
    color: #4a4a4a;
    margin: 0 0 12px;
}

.tnav__mega-promo-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--color-medium-teal, #25837D);
    text-decoration: none;
}

.tnav__mega-promo-link i {
    transition: transform 0.2s ease;
}

.tnav__mega-promo-link:hover,
.tnav__mega-promo-link:focus-visible {
    text-decoration: underline;
}

.tnav__mega-promo-link:hover i,
.tnav__mega-promo-link:focus-visible i {
    transform: translateX(3px);
}

/* ---------- Responsive: 1600 / 1280 ---------- */

@media (max-width: 1600px) {
    .tnav__inner {
        padding: 0 30px;
    }
    .tnav__panel-inner {
        padding: 40px 30px;
    }
    .tnav__mega-head {
        padding-bottom: 40px;
    }
}

@media (max-width: 1280px) {
    .tnav__inner {
        padding: 0 20px;
    }
    .tnav__panel-inner {
        padding: 30px 20px;
    }
    .tnav__mega-head {
        padding-bottom: 30px;
        flex-wrap: wrap;
    }
    .tnav__mega-columns {
        flex-wrap: wrap;
    }
    .tnav__mega-col--promo {
        flex: 1 1 100%;
        border-left: 0;
        border-top: 1px solid #e5e5e7;
        padding-left: 0;
        padding-top: 20px;
    }
}

/* Matches ModularPageBuilderBaseStyles.css's own 1024px tier - tightens the
   nav bar enough that "Solutions for" etc. never wrap onto a second line
   before the mobile menu takes over at 991px. */
@media (max-width: 1024px) {
    .tnav__inner {
        padding: 0 15px;
    }
    .tnav__menu {
        margin-left: 25px;
    }
    .tnav__link {
        padding: 0 10px;
        font-size: 16px;
    }
    .tnav__actions {
        gap: 12px;
    }
    .tnav__btn {
        padding: 0 16px;
        font-size: 14px;
    }
    .tnav__login {
        font-size: 14px;
    }
}

/* =========================================
   Mobile overlay menu markup - hidden off-screen at ALL viewport widths
   by default; only ever reachable via the burger button, which itself
   is only shown under the 991px breakpoint below.
========================================= */

.tnav__mobile-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1049;
}

.tnav__mobile {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 420px;
    height: 100%;
    background: #fff;
    z-index: 1050;
    overflow-y: auto;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.tnav.is-mobile-open .tnav__mobile-backdrop {
    display: block;
}

.tnav.is-mobile-open .tnav__mobile {
    right: 0;
}

.tnav__mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 53px;
    padding: 0 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.16);
    flex-shrink: 0;
}

.tnav__mobile-head .tnav__logo img {
    height: 26px;
    width: auto;
}

.tnav__mobile-close {
    width: 28px;
    height: 28px;
    border: 0;
    background: none;
    font-size: 20px;
    cursor: pointer;
}

.tnav__mobile-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tnav__mobile-item {
    border-bottom: 1px solid #efefef;
}

.tnav__mobile-item > a,
.tnav__mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 53px;
    padding: 0 20px;
    background: none;
    border: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-off-black, #1e1e1e);
    text-decoration: none;
    text-align: left;
    cursor: pointer;
}

.tnav__mobile-item--accordion.is-open > .tnav__mobile-toggle {
    border-bottom: 1px solid;
    border-image: linear-gradient(90deg, var(--color-teal, #67D1CE), var(--color-yellow, #FFC424), var(--color-pink, #e22b7f)) 1;
}

.tnav__mobile-item--accordion.is-open .tnav__mobile-toggle i {
    transform: rotate(180deg);
}

.tnav__mobile-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: none;
    background: #fcfcfc;
}

.tnav__mobile-item--accordion.is-open .tnav__mobile-submenu {
    display: block;
}

.tnav__mobile-submenu a {
    display: block;
    min-height: 53px;
    line-height: 53px;
    padding: 0 20px 0 32px;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    color: var(--color-off-black, #1e1e1e);
    text-decoration: none;
    border-bottom: 1px solid #efefef;
}

.tnav__mobile-submenu a:active,
.tnav__mobile-submenu a.is-active {
    color: var(--color-medium-teal, #25837D);
}

.tnav__mobile-foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px;
}

/* =========================================
   Mobile (<= 991px) - matches existing site
   breakpoint used to toggle .mobilemenus / .nonemobilemenus
========================================= */

@media (max-width: 991px) {

    .tnav__bar {
        height: 66px;
    }

    .tnav__inner {
        padding: 0 15px;
    }

    .tnav__logo img {
        width: 130px;
        height: auto;
    }

    .tnav__menu,
    .tnav__login,
    .tnav__actions .tnav__btn--outline {
        display: none;
    }

    .tnav__burger {
        display: flex;
    }
}
