/* =====================================================================
   style-menu.css  —  NEW, additive, GLOBAL. Load LAST from common.php.
   Does not touch the live style.css.
   ===================================================================== */

.main-navigation .navbar > .container { position: relative; }
.mega-dropdown { position: static; }

/* Doubled class = higher specificity so it wins over style-category.css. Centered. */
.main-navigation .navbar .mega-menu.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: 800px;
    max-width: 94vw;
    margin-top: 10px;
    padding: 28px 32px;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(16,24,40,.14);
    background: #fff;
}

/* Hide the theme's dropdown pointer/arrow (the stray "cut mark") */
.main-navigation .mega-menu::before,
.main-navigation .mega-menu::after { display: none !important; }

.mega-inner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px 34px;
}
.mega-col { min-width: 0; }

.mega-col-title {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #d4a017;
    margin: 0 0 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0e2bf;
}

.mega-col-list { list-style: none; margin: 0; padding: 0; }
.mega-col-list li { margin-bottom: 4px; }
.mega-col-list a {
    display: block;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #1f2d3d;
    text-decoration: none;
    white-space: nowrap;
    padding: 7px 10px;
    border-radius: 8px;
    transition: all .15s ease;
}
.mega-col-list a:hover {
    color: #d4a017;
    background: #fff8e6;
    padding-left: 14px;
}

/* Separate row: cufflinks / signage */
.mega-extra {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 20px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #eee;
}
.mega-extra span {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #8a94a6;
    white-space: nowrap;
}
.mega-extra a {
    font-size: 14px;
    font-weight: 500;
    color: #1f2d3d;
    text-decoration: none;
    white-space: nowrap;
}
.mega-extra a:hover { color: #d4a017; }
.mega-extra a + a { padding-left: 20px; border-left: 1px solid #ddd; }

/* Desktop: open on hover */
@media (min-width: 992px) {
    .main-navigation .nav-item.mega-dropdown:hover > .mega-menu { display: block; }
    .mega-col-title { cursor: default; }
    .mobile-cta { display: none; }
    #kap-drawer { display: flex !important; }
}

/* Mobile drawer backdrop */
.kap-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    opacity: 0; visibility: hidden;
    transition: opacity .3s ease;
    z-index: 1040;
}
.kap-backdrop.open { opacity: 1; visibility: visible; }

/* ---- Mobile: slide-in drawer + accordion ---- */
@media (max-width: 991px) {

    /* Neutralize any ancestor transform/overflow that could clip the fixed drawer */
    .main-navigation,
    .main-navigation .navbar,
    .main-navigation > .navbar > .container,
    .mobile-menu-right,
    header.header { transform: none !important; overflow: visible !important; }

    /* Drawer: full-height, slides in from the right */
    #kap-drawer,
    #kap-drawer.navbar-collapse {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: auto !important;
        width: 84% !important;
        max-width: 340px !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: none !important;          /* beats style.css .navbar-collapse{max-height:220px} */
        background: #fff !important;
        z-index: 1055 !important;
        padding: 24px 20px 40px !important;
        overflow-y: auto !important;
        transform: translateX(100%) !important;
        transition: transform .3s ease !important;
        display: block !important;
        box-shadow: -12px 0 40px rgba(0,0,0,.18) !important;
    }
    #kap-drawer.open { transform: translateX(0) !important; }

    #kap-drawer .navbar-nav { flex-direction: column; }
    #kap-drawer .nav-link {
        padding: 14px 4px;
        font-size: 16px;
        border-bottom: 1px solid #f0f0f0;
    }

    /* CTA block */
    .mobile-cta { margin-top: 22px; }
    .mobile-cta-btn {
        display: block; text-align: center;
        background: #d4a017; color: #fff; font-weight: 600;
        padding: 14px; border-radius: 10px; text-decoration: none;
    }
    .mobile-cta-contact { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
    .mobile-cta-contact a { color: #1f2d3d; text-decoration: none; font-size: 14px; }
    .mobile-cta-contact i { color: #d4a017; margin-right: 8px; }
    .mobile-cta-contact .fa-phone {
        transform: scaleX(-1);   /* flip horizontally */
    }

    /* Mega menu = inline accordion inside the drawer */
    #kap-drawer .mega-menu {
        position: static !important;
        transform: none !important;
        inset: auto !important;
        float: none;
        width: 100% !important;
        max-width: none;
        margin-top: 6px;
        padding: 6px 0 10px;
        box-shadow: none;
        border: 0;
        border-radius: 0;
        display: none;
    }
    
    #kap-drawer .mega-menu.mega-open {  /* ← add this whole rule */
        display: block;
    }
    
    #kap-drawer .mega-inner { grid-template-columns: 1fr; gap: 0; }
    #kap-drawer .mega-col { border-bottom: 1px solid #f0f0f0; }
    #kap-drawer .mega-col-title {
        position: relative;
        margin: 0; padding: 12px 4px;
        border-bottom: 0; cursor: pointer;
        color: #1f2d3d; font-size: 14px;
    }
    #kap-drawer .mega-col-title::after {
        content: "+"; position: absolute; right: 6px; top: 50%;
        transform: translateY(-50%); font-size: 18px; color: #d4a017;
    }
    #kap-drawer .mega-col.open-col .mega-col-title::after { content: "\2212"; }
    #kap-drawer .mega-col-list { display: none; padding: 0 4px 10px; }
    #kap-drawer .mega-col.open-col .mega-col-list { display: block; }
    #kap-drawer .mega-col-list a { white-space: normal; padding: 8px 6px; font-weight: 500; }
    #kap-drawer .mega-col-list li { margin-bottom: 4px; }
    #kap-drawer .mega-extra { display: block; padding: 12px 4px; margin-top: 4px; }
    #kap-drawer .mega-extra span { display: block; margin-bottom: 6px; }
    #kap-drawer .mega-extra a { display: block; padding: 8px 0; border: 0; }
    #kap-drawer .mega-extra a + a { padding-left: 0; border-left: 0; }
}