/* Shared header/menu + footer styles. Moved out of menu.php and footer.php so the browser caches them. */
  .main-menu{
    position: relative;
}

.navigation{
    position: static;
}

.mega-menu-parent{
    position: static;
}

.mega-menu{
    position:absolute;
    top:100%;
    left:50%;
    transform:translateX(-50%);

    width:1000px;
    max-width:calc(100vw - 48px);
    box-sizing:border-box;

    background:#fff;
    border-radius:10px;

    padding:25px 35px;

    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:30px 50px;

    box-shadow:0 15px 40px rgba(0,0,0,.08);

    opacity:0;
    visibility:hidden;
    transition:.3s;

    z-index:99999;
}

.mega-menu-parent:hover .mega-menu{
    opacity:1;
    visibility:visible;
}

/* invisible bridge so the dropdown doesn't close while the pointer crosses the gap under the menu */
.mega-menu::before{
    content:"";
    position:absolute;
    left:0;
    right:0;
    top:-30px;
    height:30px;
}

.mega-column .mega-title{
    font-size:20px;
    font-weight:600;
    color:#061153;
    margin-bottom:12px;
    padding-bottom:8px;
    border-bottom:2px solid #f1f1f1;
}

.mega-column ul{
    margin:0;
    padding:0;
    list-style:none;
}

.main-menu .mega-column ul li{
    display:block;
    margin-bottom:8px;
}

.mega-column ul li a{
    font-size:14px;
    color:#555;
    text-decoration:none;
    transition:.3s;
}

.mega-column ul li a:hover{
    color:#ff4d4d;
    padding-left:5px;
}

/* Never clip or scroll the mega menu (also in the sticky header) */
.sticky-header .mega-menu,
.main-menu .mega-menu{
    max-height:none !important;
    height:auto !important;
    overflow:visible !important;
}

/* laptops and tablets: 4 columns so all 8 sections fit in 2 rows.
   Placed after the base rules above so these values win. */
@media(min-width:992px) and (max-width:1399px){
    .mega-menu{
        grid-template-columns:repeat(4,1fr);
        gap:22px 28px;
        padding:22px 26px;
    }
    .mega-column .mega-title{
        font-size:16px;
    }
    .mega-column ul li a{
        font-size:13px;
    }
}

/* current page in the main, sticky and mobile menus */
.main-menu > ul > li.bn-current > a,
.sticky-header .main-menu > ul > li.bn-current > a,
.mobile-menu > ul > li.bn-current > a{
    color:var(--theme-color);
}

@media(max-width:991px){
    .mega-menu{
        display:none;
    }
}

/* ===== Mobile Services accordion (mobile menu only) ===== */
.mobile-menu li.bn-m-services{
    display:block;
    border-bottom:0;
}
.bn-m-row{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}
.mobile-menu li.bn-m-services .bn-m-row > a{
    flex:1 1 auto;
    border:0 !important;
}
.bn-m-toggle,
.bn-m-cat{
    -webkit-appearance:none;
    appearance:none;
    background:none;
    border:0;
    cursor:pointer;
    font:inherit;
    color:#fff;
}
.bn-m-toggle{
    width:36px;
    height:36px;
    flex:0 0 36px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:rgba(255,255,255,.12);
}
.bn-m-chev{
    display:inline-block;
    width:8px;
    height:8px;
    border-right:2px solid currentColor;
    border-bottom:2px solid currentColor;
    transform:translateY(-2px) rotate(45deg);
    transition:transform .3s;
}
.bn-open > .bn-m-row .bn-m-chev,
.bn-open > .bn-m-cat .bn-m-chev{
    transform:translateY(2px) rotate(-135deg);
}
.mobile-menu ul.bn-m-cats,
.mobile-menu ul.bn-m-sub{
    display:none;
    list-style:none;
    margin:0;
    padding:0;
}
.mobile-menu ul.bn-m-cats{
    padding:4px 0 10px 14px;
}
.mobile-menu ul.bn-m-cats > li{
    display:block;
    border:0;
    padding:0;
    margin:0;
}
.bn-m-cat{
    width:100%;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:10px 4px;
    text-align:left;
    font-size:15px;
    font-weight:600;
    line-height:1.35;
    border-bottom:1px solid rgba(255,255,255,.12);
}
.bn-m-cat .bn-m-chev{
    width:7px;
    height:7px;
    flex:0 0 7px;
}
.bn-open > .bn-m-cat{
    color:#ff4d4d;
}
.mobile-menu ul.bn-m-sub{
    padding:6px 12px;
    margin:8px 0 10px;
    background:rgba(255,255,255,.06);
    border-radius:8px;
}
.mobile-menu ul.bn-m-sub li{
    display:block;
    border:0;
    padding:0;
    margin:0;
}
.mobile-menu ul.bn-m-sub li + li{
    border-top:1px solid rgba(255,255,255,.08);
}
.mobile-menu ul.bn-m-sub li a{
    position:relative;
    display:block;
    padding:9px 0 9px 16px;
    font-size:14px;
    font-weight:400;
    line-height:1.4;
    color:rgba(255,255,255,.8);
    border:0 !important;
    white-space:normal;
}
.mobile-menu ul.bn-m-sub li a::before{
    content:"";
    position:absolute;
    left:2px;
    top:50%;
    width:6px;
    height:6px;
    margin-top:-3px;
    border-radius:50%;
    background:rgba(255,255,255,.45);
}
.mobile-menu ul.bn-m-sub li a.bn-here::before,
.mobile-menu ul.bn-m-sub li a:hover::before{
    background:#ff4d4d;
}
.mobile-menu ul.bn-m-sub li a:hover,
.mobile-menu ul.bn-m-sub li a.bn-here{
    color:#ff4d4d;
}
@media(min-width:992px){
    .bn-m-services{ display:none !important; }
}
/* Laptop + tablet only (768px - 1399px). Desktop (1400px+) keeps the original layout. */
@media (min-width: 768px) and (max-width: 1399.98px) {
    /* Stack FREE CONVERSATION and CALL US in two rows */
    .footer-section .brand-info .contact-info {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        align-items: flex-start;
        gap: 20px;
    }
    .footer-section .brand-info .contact-info .contact-item {
        width: 100%;
        margin: 0 !important;
    }
    .footer-section .brand-info .contact-info .contact-item a {
        word-break: break-word;
    }
    /* Narrower brand column, wider links column (3 + 5 columns of 12) */
    .footer-section .footer-top .row > .footer-brand {
        width: 25% !important;
    }
    .footer-section .footer-top .row > .footer-links-col {
        width: 41.66667% !important;
    }
}
/* address active color*/
.addr-link,
.addr-link:visited,
.addr-link:hover,
.addr-link:focus,
.addr-link:active {
  color: inherit;
  text-decoration: none;
}

/* Keyboard users: open the Services mega menu on focus, not only on hover */
.mega-menu-parent:focus-within .mega-menu,
.mega-menu-parent.bn-open .mega-menu{
    opacity:1;
    visibility:visible;
}
.mega-menu-parent.bn-closed .mega-menu{
    opacity:0;
    visibility:hidden;
}

/* Footer: current page in "Our Services" */
.footer-widget a.bn-here { color: var(--theme-color); }
