/*
 * BizTac – Header & Navigation Styles
 * Replaces the old .site-header / .navbar blocks in style.css
 * @package BizTac v1.2.1
 */

/* =========================================================
   TOP BAR
========================================================= */
.top-bar {
    background: #0F172A;
    height: 42px;
    display: flex;
    align-items: center;
    font-size: 0.81rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.top-bar-follow {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.35);
    margin-right: 4px;
}

.top-bar a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color 0.2s;
}

.top-bar a:hover {
    color: #fff;
}

.top-bar-icon {
    color: #06B6D4;
    margin-right: 5px;
    font-size: 0.82rem;
}

/* Social circles in top bar */
.top-bar-social {
    display: flex;
    gap: 5px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.78rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.social-link:hover {
    background: var(--primary, #2563EB);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
}

/* =========================================================
   MAIN HEADER SHELL
========================================================= */
.site-header {
    background: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
    position: relative;
    z-index: 1050;
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

.site-header.sticky-header {
    position: sticky;
    top: 0;
}

.site-header.scrolled {
    box-shadow: 0 4px 32px rgba(37, 99, 235, 0.10);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.97);
}

/* Inner flex row — strictly bounded */
.header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 80px;
    /* fixed header row height */
    overflow: visible;
    /* allow dropdown to escape */
}

/* =========================================================
   SITE IDENTITY – clean, no background box
========================================================= */
.site-identity {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    /* Hard cap so logo can NEVER push out of the row */
    max-height: 60px;
    overflow: hidden;
}

.site-brand-link {
    display: flex;
    align-items: center;
    text-decoration: none !important;
    gap: 10px;
    line-height: 1;
}

/* ── Custom logo image: slider-controlled, no nested <a> ── */
.site-identity .custom-logo-link {
    display: flex;
    align-items: center;
    line-height: 0;
    /* kill extra space under image */
}

.site-identity .custom-logo {
    display: block;
    height: var(--logo-h, 36px);
    max-height: var(--logo-h, 36px);
    width: auto;
    max-width: 200px;
    object-fit: contain;
    object-position: left center;
}

/* ── Text-only brand fallback ── */
.site-text-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    line-height: 1;
}

.site-title {
    font-size: 1.55rem;
    font-weight: 900;
    color: #0F172A;
    letter-spacing: -0.6px;
    display: block;
    font-style: normal;
    line-height: 1.1;
    margin: 0;
    white-space: nowrap;
}

/* Accent the last word */
.site-title em {
    font-style: normal;
    color: var(--primary, #2563EB);
}

.site-tagline {
    font-size: 0.66rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #94A3B8;
    display: block;
    white-space: nowrap;
    margin: 0;
}

/* =========================================================
   PRIMARY NAVIGATION MENU
========================================================= */
.biztac-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* ---- Top-level list ---- */
#primary-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 2px;
}

#primary-menu>li {
    position: relative;
}

#primary-menu>li>a {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.92rem;
    font-weight: 650;
    color: #1E293B;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.22s ease;
    white-space: nowrap;
    position: relative;
}

/* Animated underline indicator */
#primary-menu>li>a::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 18px;
    right: 18px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary, #2563EB), var(--accent, #06B6D4));
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.25s ease;
    transform-origin: left center;
}

#primary-menu>li>a:hover,
#primary-menu>li.current-menu-item>a,
#primary-menu>li.current-menu-ancestor>a {
    color: var(--primary, #2563EB);
    background: rgba(37, 99, 235, 0.06);
}

#primary-menu>li>a:hover::after,
#primary-menu>li.current-menu-item>a::after,
#primary-menu>li.current-menu-ancestor>a::after {
    transform: scaleX(1);
}

/* Caret for parent items */
#primary-menu>li.menu-item-has-children>a::before {
    content: '\F282';
    /* bi-chevron-down */
    font-family: 'bootstrap-icons';
    font-size: 0.7rem;
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    transition: transform 0.2s ease;
}

#primary-menu>li.menu-item-has-children:hover>a::before {
    transform: translateY(-50%) rotate(-180deg);
}

/* ---- Dropdown panel ---- */
#primary-menu .sub-menu {
    list-style: none;
    padding: 8px;
    margin: 0;
    position: absolute;
    top: 100%;           /* flush to the li — no gap to cross */
    left: 0;
    min-width: 230px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.05);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
    z-index: 9999;
    margin-top: 8px;     /* visual breathing room, inside hover zone */
}

/* Invisible bridge above the dropdown so hover doesn't break */
#primary-menu .sub-menu::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
    background: transparent;
}

#primary-menu li:hover > .sub-menu,
#primary-menu li:focus-within > .sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

/* Dropdown items */
#primary-menu .sub-menu li {
    position: relative;
}

/* Kill the underline ::after inherited from top-level links */
#primary-menu .sub-menu li a::after {
    display: none !important;
}

#primary-menu .sub-menu li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1E293B;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.18s ease;
}

#primary-menu .sub-menu li a:hover {
    background: rgba(37, 99, 235, 0.07);
    color: var(--primary, #2563EB);
    padding-left: 18px;
}

/* Caret for nested dropdowns — re-enable ::after only for parent items */
#primary-menu .sub-menu li.menu-item-has-children > a::after {
    display: flex !important;
    content: '\F285';
    font-family: 'bootstrap-icons';
    font-size: 0.75rem;
    color: #94A3B8;
    position: static;
    background: none;
    height: auto;
    width: auto;
    transform: none;
    transition: transform 0.2s ease;
}

#primary-menu .sub-menu li.menu-item-has-children:hover > a::after {
    transform: translateX(3px);
}

/* Nested 3rd-level */
#primary-menu .sub-menu .sub-menu {
    top: 0;
    left: calc(100% + 4px);
    transform: translateY(8px);
}

#primary-menu .sub-menu li:hover > .sub-menu {
    transform: translateY(0);
}

/* =========================================================
   HEADER ACTIONS (right side)
========================================================= */
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}

/* Search toggle icon */
.header-search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: #334155;
    transition: all 0.2s ease;
}

.header-search-toggle:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--primary, #2563EB);
}

/* CTA Button */
.header-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 26px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, var(--primary, #2563EB) 0%, var(--accent, #06B6D4) 100%);
    border-radius: 50px;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.30);
    transition: all 0.25s ease;
    white-space: nowrap;
    letter-spacing: 0.2px;
}

.header-cta-btn i {
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

.header-cta-btn:hover {
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.42);
    transform: translateY(-2px);
}

.header-cta-btn:hover i {
    transform: translateX(3px);
}

/* =========================================================
   SLIDE-DOWN SEARCH PANEL
========================================================= */
.header-search-panel {
    background: #fff;
    border-bottom: 2px solid rgba(37, 99, 235, 0.12);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.header-search-panel.open {
    max-height: 90px;
    padding: 16px 0;
}

.search-panel-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-panel-inner .search-field {
    flex: 1;
    border: 2px solid #E2E8F0;
    border-radius: 50px;
    padding: 11px 22px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.search-panel-inner .search-field:focus {
    border-color: var(--primary, #2563EB);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10);
}

.search-panel-inner .search-submit {
    background: var(--primary, #2563EB);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 11px 24px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.88rem;
    transition: all 0.2s;
}

.search-panel-inner .search-submit:hover {
    background: #1D4ED8;
    transform: translateY(-1px);
}

.search-close {
    background: none;
    border: none;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #64748B;
    transition: all 0.2s;
}

.search-close:hover {
    background: #F1F5F9;
    color: #0F172A;
}

/* =========================================================
   MOBILE TOGGLER (hamburger)
========================================================= */
.navbar-toggler-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.2s;
    margin-left: auto;
}

.navbar-toggler-btn:hover {
    background: #F1F5F9;
}

.toggler-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: #1E293B;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* =========================================================
   SECONDARY MENU BAR
========================================================= */
.secondary-menu-bar {
    background: var(--primary, #2563EB);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Kill ALL bullets */
.secondary-menu-bar ul,
.secondary-menu-bar li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Top-level list — horizontal row */
.secondary-menu-bar > .container > ul {
    display: flex !important;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}

/* Every li is a positioning anchor */
.secondary-menu-bar li {
    position: relative;
}

/* Top-level links (white on blue) */
.secondary-menu-bar > .container > ul > li > a {
    display: flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 9px 16px;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.secondary-menu-bar > .container > ul > li > a:hover,
.secondary-menu-bar li.current-menu-item > a,
.secondary-menu-bar li.current-menu-ancestor > a {
    color: #fff !important;
    border-bottom-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
}

/* Down-caret on parent items */
.secondary-menu-bar li.menu-item-has-children > a::after {
    content: '\F282';
    font-family: 'bootstrap-icons';
    font-size: 0.65rem;
    margin-left: 2px;
    transition: transform 0.2s ease;
}
.secondary-menu-bar li.menu-item-has-children:hover > a::after {
    transform: rotate(-180deg);
}

/* ---- DROPDOWN: HIDDEN by default ---- */
.secondary-menu-bar ul ul {
    position: absolute !important;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #fff !important;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-top: 3px solid var(--primary, #2563EB);
    /* Cross-browser hide */
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    /* Prevent flex inheritance */
    display: block !important;
    flex-direction: unset !important;
}

/* ---- DROPDOWN: SHOWN on hover ---- */
.secondary-menu-bar li:hover > ul {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0);
}

/* Dropdown items */
.secondary-menu-bar ul ul li {
    display: block !important;
    width: 100%;
    background: #fff !important;
    float: none !important;
    position: relative;
}
.secondary-menu-bar ul ul li::before,
.secondary-menu-bar ul ul li::marker {
    display: none !important;
    content: none !important;
}

/* Dropdown links — override Customizer's white !important */
.secondary-menu-bar ul ul li a {
    color: #334155 !important;
    padding: 10px 18px;
    font-size: 0.8rem;
    font-weight: 500;
    border: none !important;
    background: transparent !important;
    border-bottom: 1px solid #F1F5F9 !important;
    display: flex !important;
    justify-content: space-between;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.secondary-menu-bar ul ul li:last-child > a {
    border-bottom: none !important;
}
.secondary-menu-bar ul ul li a:hover {
    color: var(--primary, #2563EB) !important;
    background: #F8FAFC !important;
    padding-left: 22px;
}

/* Level 3+ — fly out right */
.secondary-menu-bar ul ul ul {
    top: -3px;
    left: 100%;
    border-radius: 8px;
}

/* Right-caret on nested parents */
.secondary-menu-bar ul ul li.menu-item-has-children > a::after {
    content: '\F285';
    font-family: 'bootstrap-icons';
    margin-left: auto;
    transform: none;
}
.secondary-menu-bar ul ul li.menu-item-has-children:hover > a::after {
    transform: translateX(3px);
}

/* =========================================================
   RESPONSIVE – MOBILE NAV
========================================================= */
@media (max-width: 991.98px) {
    .site-header {
        position: sticky;
        top: 0;
    }

    .header-inner {
        height: 66px;
        gap: 12px;
    }

    .navbar-toggler-btn {
        display: flex;
    }

    /* Logo uses CSS var on mobile too — just override max-width */
    .site-identity .custom-logo {
        max-width: 140px;
    }

    .site-title {
        font-size: 1.25rem;
    }

    .site-tagline {
        font-size: 0.6rem;
    }

    .biztac-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid #F1F5F9;
        border-bottom: 4px solid var(--primary, #2563EB);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
        z-index: 1049;
        padding: 12px 0;
    }

    .biztac-nav.nav-open {
        display: block;
    }

    #primary-menu {
        flex-direction: column;
        gap: 0;
        padding: 0 16px;
    }

    #primary-menu>li>a {
        padding: 12px 16px;
        border-radius: 8px;
        font-size: 0.95rem;
    }

    #primary-menu>li>a::after {
        display: none;
    }

    #primary-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: #F8FAFC;
        padding: 4px 8px;
        margin: 4px 0;
        border-left: 3px solid var(--primary, #2563EB);
        border-radius: 0 8px 8px 0;
    }

    .header-cta-btn {
        padding: 9px 16px;
        font-size: 0.8rem;
    }

    .header-search-toggle {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }
}

@media (max-width: 575.98px) {
    .header-cta-btn {
        display: none;
    }

    /* hide CTA on very small screens to avoid crowding */
}