/* ==========================================================================
   Top bar + main header
   Layout: [logo + name]   [ centred menu ]   [ Sign in  Get started ]
   Below 1200px the menu collapses into the slide-in drawer (site-drawer.css).
   ========================================================================== */

/* ---------- top bar ---------- */
.top-bar { background: linear-gradient(90deg, var(--navy-2) 0%, #0a2472 100%); color: rgba(255, 255, 255, .9); font-size: .82rem; font-weight: 700; padding: .4rem 0; position: relative; z-index: 1200; }
.tb-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 28px; }
.tb-left, .tb-right { display: flex; align-items: center; gap: 1.5rem; }
.tb-item { display: inline-flex; align-items: center; gap: .5rem; line-height: 1; white-space: nowrap; color: inherit; transition: color .2s; }
.top-bar a.tb-item { color: rgba(255, 255, 255, .9); }
.top-bar a.tb-item:hover { color: var(--gold); }
.top-bar i { color: var(--gold); font-size: .85em; }
.tb-slogan { font-family: var(--font-head); font-weight: 500; letter-spacing: .4px; color: #fff; }
.tb-muted { color: rgba(255, 255, 255, .72); font-weight: 600; }
.top-bar .social-links { display: flex; gap: .35rem; }
.top-bar .social-links a { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .1); color: #fff; transition: transform .25s var(--ease), background .25s; }
.top-bar .social-links a:hover { background: var(--gold); transform: translateY(-2px); }
.top-bar .social-links a:hover i { color: var(--navy); }
.top-install { display: inline-flex; align-items: center; gap: .4rem; background: var(--grad-gold); color: var(--navy) !important; padding: .28rem .85rem; border-radius: 999px; font-size: .8rem; font-weight: 800; line-height: 1.2; border: 0; cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s; }
.top-install:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(255, 159, 10, .4); }
.top-install i { color: var(--navy); }
.top-install[hidden] { display: none !important; }

/* ---------- main header ---------- */
.main-header { position: sticky; top: 0; z-index: 1100; background: rgba(255, 255, 255, .96); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); transition: box-shadow .3s; }
.main-header::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--blue), var(--sky), var(--gold), var(--orange)); pointer-events: none; }
.main-header.scrolled { box-shadow: 0 10px 28px rgba(10, 36, 114, .12); }
.main-header .navbar { padding: .6rem 0 .7rem; gap: 1rem; flex-wrap: nowrap; }

/* brand */
.navbar-brand.brand { display: flex; align-items: center; gap: .7rem; padding: 0; margin: 0; flex: none; }
.brand-logo { display: block; flex: none; }
/* "main-header" in the selector is needed: body.site img { height: auto } would otherwise win and show the logo at its full 420x242 size. */
.main-header .brand-logo img { display: block; height: 46px; width: auto; max-width: none; transition: transform .4s var(--ease); }
.main-header .navbar-brand:hover .brand-logo img { transform: scale(1.06) rotate(-3deg); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; color: var(--navy); letter-spacing: .3px; }
.brand-name b { color: var(--orange); font-weight: 700; }
.brand-sub { margin-top: 3px; font-size: .68rem; font-weight: 800; color: var(--blue); letter-spacing: .25px; white-space: nowrap; }

/* menu links */
.main-header .navbar-nav { flex-wrap: nowrap; gap: .1rem; }
.main-header .nav-link { position: relative; display: flex; align-items: center; font-family: var(--font-head); font-weight: 500; font-size: 1rem; line-height: 1.4; white-space: nowrap; color: var(--navy) !important; padding: .55rem .85rem !important; border-radius: 12px; transition: background .2s, color .2s; }
.main-header .nav-link::before { content: ''; position: absolute; left: 50%; bottom: 3px; width: 0; height: 3px; border-radius: 3px; background: var(--grad-gold); transform: translateX(-50%); transition: width .25s var(--ease); }
.main-header .nav-link:hover, .main-header .nav-link.show { background: var(--sky-soft); color: var(--blue) !important; }
.main-header .nav-link:hover::before, .main-header .nav-link.show::before { width: 14px; }
.main-header .nav-link.active { color: var(--blue) !important; }
.main-header .nav-link.active::before { width: 24px; }
.main-header .dropdown-toggle::after { margin-left: .45em; vertical-align: 0; border-top-width: .32em; border-right-width: .3em; border-left-width: .3em; transition: transform .2s var(--ease); }
.main-header .dropdown-toggle.show::after { transform: rotate(180deg); }

/* dropdown panels */
.main-header .dropdown-menu { border: 1px solid var(--line); border-radius: 18px; padding: .5rem; margin-top: .6rem; min-width: 340px; box-shadow: var(--shadow-lg); animation: dropIn .22s var(--ease); }
.dd-head { display: block; padding: .45rem .75rem .35rem; font-size: .7rem; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.main-header .dropdown-item { display: flex; align-items: center; gap: .8rem; padding: .55rem .75rem; border-radius: 12px; white-space: normal; color: var(--navy); transition: background .2s; }
.dd-ico { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; font-size: 1rem; background: var(--c-bg, var(--sky-soft)); color: var(--c, var(--blue)); transition: transform .25s var(--ease); }
.dd-txt { display: flex; flex-direction: column; line-height: 1.25; }
.dd-txt b { font-family: var(--font-head); font-weight: 500; font-size: 1rem; }
.dd-txt small { color: var(--muted); font-weight: 600; font-size: .8rem; }
.main-header .dropdown-item:hover, .main-header .dropdown-item:focus, .main-header .dropdown-item.active { background: var(--sky-soft); color: var(--navy); }
.main-header .dropdown-item:hover .dd-ico { transform: scale(1.08); }
.main-header .dropdown-item.active .dd-txt b { color: var(--blue); }
@keyframes dropIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* right-hand actions */
.nav-actions { display: flex; align-items: center; gap: .4rem; flex: none; }
.nav-signin { display: inline-flex; align-items: center; gap: .5rem; padding: .55rem .9rem; border-radius: 12px; font-family: var(--font-head); font-weight: 500; font-size: 1rem; line-height: 1.4; white-space: nowrap; color: var(--navy) !important; transition: background .2s, color .2s; }
.nav-signin i { color: var(--blue); }
.nav-signin:hover { background: var(--sky-soft); color: var(--blue) !important; }
.nav-actions .btn-cbc { white-space: nowrap; }

/* phones and tablets */
.nav-mobile { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.mobile-menu-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--navy); font-size: 1.15rem; display: inline-grid; place-items: center; cursor: pointer; transition: background .2s, color .2s, border-color .2s; }
.mobile-menu-btn:hover { background: var(--navy); border-color: var(--navy); color: #fff; }

@media (min-width: 1200px) and (max-width: 1399.98px) {
    .main-header .nav-link { padding: .55rem .65rem !important; font-size: .98rem; }
    .nav-signin { padding: .55rem .7rem; }
    .brand-name { font-size: 1.3rem; }
    .brand-sub { font-size: .64rem; }
}
@media (max-width: 1199.98px) {
    .main-header .navbar { padding: .5rem 0 .6rem; }
    .main-header .navbar-collapse { display: none !important; }
    .main-header .brand-logo img { height: 42px; }
    .brand-name { font-size: 1.3rem; }
}
@media (max-width: 575.98px) {
    .brand-sub { display: none; }
    .main-header .brand-logo img { height: 38px; }
}