/* 1000 Granite Elementor Mega Menu v1.0.10 */

.hpmm,
.hpmm * {
    box-sizing: border-box;
}

.hpmm {
    position: relative;
    z-index: 9999;
    width: 100%;
    font-family: inherit;
}

.hpmm-bar {
    position: relative;
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    background: #373635;
}

.hpmm-top-list {
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 32px;
    width: 100%;
    max-width: 1450px;
    min-height: 74px;
    margin: 0 auto;
    padding: 0 30px;
    list-style: none;
}

.hpmm-top-item {
    position: static;
    display: flex;
    align-items: stretch;
    margin: 0;
    padding: 0;
}

.hpmm-top-row {
    display: flex;
    align-items: stretch;
}

.hpmm-top-link {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 100%;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color .18s ease;
}

.hpmm-top-link:hover,
.hpmm-top-link:focus {
    color: #d9b75f;
}

.hpmm-arrow {
    width: 9px;
    height: 9px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transform-origin: center;
    transition: transform .2s ease;
}

.hpmm-top-item.is-open .hpmm-arrow {
    transform: rotate(225deg) translate(-1px, -1px);
}

/* Compact dropdown option: a small thumbnail panel under the menu item */
.hpmm-top-item.hpmm-dropdown-compact {
    position: relative;
}

.hpmm-top-item.hpmm-dropdown-compact > .hpmm-dropdown {
    left: 0;
    right: auto;
    width: max-content;
    max-width: calc(100vw - 32px);
    transform: translateY(8px);
    border-radius: 0 0 4px 4px;
}

.hpmm-top-item.hpmm-dropdown-compact:hover > .hpmm-dropdown,
.hpmm-top-item.hpmm-dropdown-compact:focus-within > .hpmm-dropdown,
.hpmm-top-item.hpmm-dropdown-compact.is-open > .hpmm-dropdown {
    transform: translateY(0);
}

.hpmm-top-item.hpmm-dropdown-compact .hpmm-dropdown-inner {
    width: auto;
    max-width: none;
    margin: 0;
    padding: 18px;
}

.hpmm-top-item.hpmm-dropdown-compact .hpmm-grid {
    grid-template-columns: repeat(var(--hpmm-cols, 4), var(--hpmm-card-width, 210px));
}

.hpmm-top-item.hpmm-dropdown-compact .hpmm-card {
    width: var(--hpmm-card-width, 210px);
}

.hpmm-top-item.hpmm-dropdown-compact .hpmm-thumb {
    height: 125px;
}

.hpmm-submenu-toggle {
    display: none;
}

.hpmm-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);
    transition:
        opacity .2s ease,
        transform .2s ease,
        visibility .2s ease;
    box-shadow: 0 18px 28px rgba(0,0,0,.16);
    border-top: 1px solid rgba(0,0,0,.08);
}

.hpmm-top-item:hover > .hpmm-dropdown,
.hpmm-top-item:focus-within > .hpmm-dropdown,
.hpmm-top-item.is-open > .hpmm-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.hpmm-dropdown-inner {
    width: calc(100% - 40px);
    max-width: 1450px;
    margin: 0 auto;
    padding: 30px;
}

.hpmm-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.hpmm-card {
    display: block;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.hpmm-thumb {
    position: relative;
    display: block;
    width: 100%;
    height: 165px;
    overflow: hidden;
    background: #eceae5;
    border-radius: 2px;
}

.hpmm-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .32s ease, filter .32s ease;
}

.hpmm-card:hover .hpmm-thumb img {
    transform: scale(1.045);
    filter: brightness(.94);
}

.hpmm-card-copy {
    display: block;
    padding-top: 12px;
}

.hpmm-card-title {
    display: block;
    color: #2f2f2f;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.25;
}

.hpmm-card-desc {
    display: block;
    margin-top: 4px;
    color: #777;
    font-size: 13px;
    line-height: 1.35;
}

.hpmm-mobile-toggle {
    display: none;
}

/* Elementor editor: keep dropdowns usable while editing */
.elementor-editor-active .hpmm-top-item.is-open > .hpmm-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Mobile behavior is enabled dynamically by JS using the Elementor control breakpoint */
.hpmm.is-mobile .hpmm-bar {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.hpmm.is-mobile .hpmm-mobile-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 58px;
    padding: 0 20px;
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    text-align: left;
}

.hpmm-hamburger {
    display: grid;
    gap: 4px;
    width: 22px;
}

.hpmm-hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background: currentColor;
}

.hpmm.is-mobile .hpmm-top-list {
    display: none;
    width: 100%;
    min-height: 0;
    max-width: none;
    gap: 0;
    padding: 0;
}

.hpmm.is-mobile.mobile-open .hpmm-top-list {
    display: block;
}

.hpmm.is-mobile .hpmm-top-item {
    display: block;
    width: 100%;
    border-top: 1px solid rgba(255,255,255,.12);
}

.hpmm.is-mobile .hpmm-top-row {
    display: flex;
    width: 100%;
    align-items: stretch;
}

.hpmm.is-mobile .hpmm-top-link {
    flex: 1 1 auto;
    min-height: 56px;
    padding: 0 18px;
    white-space: normal;
}

.hpmm.is-mobile .hpmm-top-link > .hpmm-arrow {
    display: none;
}

.hpmm.is-mobile .hpmm-submenu-toggle {
    display: grid;
    place-items: center;
    flex: 0 0 54px;
    border: 0;
    border-left: 1px solid rgba(255,255,255,.1);
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.hpmm.is-mobile .hpmm-dropdown {
    position: static;
    display: none;
    width: 100%;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
    border-top: 0;
}

.hpmm.is-mobile .hpmm-top-item:hover > .hpmm-dropdown,
.hpmm.is-mobile .hpmm-top-item:focus-within > .hpmm-dropdown {
    display: none;
}

.hpmm.is-mobile .hpmm-top-item.is-open > .hpmm-dropdown {
    display: block;
}

/* Mobile submenu: text links only (desktop thumbnails remain unchanged) */
.hpmm.is-mobile .hpmm-dropdown-inner {
    width: 100%;
    max-width: none;
    padding: 0;
}

.hpmm.is-mobile .hpmm-grid,
.hpmm.is-mobile .hpmm-top-item.hpmm-dropdown-compact .hpmm-grid {
    display: block;
    width: 100%;
}

.hpmm.is-mobile .hpmm-card,
.hpmm.is-mobile .hpmm-top-item.hpmm-dropdown-compact .hpmm-card {
    display: block;
    width: 100%;
    border-top: 1px solid rgba(255,255,255,.12);
    background: #373635;
}

.hpmm.is-mobile .hpmm-thumb {
    display: none !important;
}

.hpmm.is-mobile .hpmm-card-copy {
    display: block;
    padding: 14px 22px 14px 58px;
}

.hpmm.is-mobile .hpmm-card-title {
    display: block;
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.35;
}

.hpmm.is-mobile .hpmm-card-desc {
    display: none !important;
}

.hpmm.is-mobile .hpmm-card:hover,
.hpmm.is-mobile .hpmm-card:focus {
    background: #41403f;
}


/* 1000 Granite CTA */
.hpmm-top-item.hpmm-cta-item {
    margin-left: auto;
    align-items: center;
}

.hpmm-top-item.hpmm-cta-item .hpmm-top-link {
    min-height: 44px;
    padding: 0 22px;
    margin: auto 0;
    background: #000000;
    color: #ffffff !important;
    border-radius: 3px;
    font-weight: 700;
    letter-spacing: .4px;
}

.hpmm-top-item.hpmm-cta-item .hpmm-top-link:hover {
    background: #1b1b1b;
    color: #ffffff !important;
}

.hpmm.is-mobile .hpmm-top-item.hpmm-cta-item {
    margin-left: 0;
    padding: 12px 16px 16px;
}

.hpmm.is-mobile .hpmm-top-item.hpmm-cta-item .hpmm-top-link {
    justify-content: center;
    width: 100%;
    min-height: 50px;
    margin: 0;
}


/* =========================================================
 * v1.0.7 — CLEAN MOBILE ACCORDION
 * Desktop thumbnail menus remain unchanged.
 * ========================================================= */
.hpmm-mobile-call-wrap {
    display: none;
}

.hpmm.is-mobile .hpmm-bar {
    overflow: visible;
}

.hpmm.is-mobile .hpmm-mobile-toggle {
    min-height: 64px;
    padding: 0 22px;
    border-bottom: 1px solid rgba(255,255,255,.16);
    font-weight: 600;
}

.hpmm.is-mobile .hpmm-hamburger {
    width: 24px;
    gap: 5px;
}

.hpmm.is-mobile .hpmm-hamburger span {
    height: 2px;
}

.hpmm.is-mobile .hpmm-top-list {
    width: 100%;
    margin: 0;
    padding: 0 !important;
    list-style: none;
    background: inherit;
}

.hpmm.is-mobile .hpmm-top-item {
    margin: 0;
    padding: 0;
    background: transparent;
    border-top: 0;
    border-bottom: 1px solid rgba(255,255,255,.14);
}

.hpmm.is-mobile .hpmm-top-row {
    min-height: 62px;
    background: transparent;
}

.hpmm.is-mobile .hpmm-top-link {
    display: flex;
    align-items: center;
    min-height: 62px;
    padding: 0 22px !important;
    color: #fff;
    background: transparent;
    line-height: 1.2;
    text-decoration: none;
}

.hpmm.is-mobile .hpmm-submenu-toggle {
    flex: 0 0 62px;
    width: 62px;
    min-height: 62px;
    border: 0;
    border-left: 1px solid rgba(255,255,255,.12);
    background: transparent;
}

/* Critical reset: compact desktop dropdown rules must never affect mobile */
.hpmm.is-mobile .hpmm-top-item.hpmm-dropdown-compact > .hpmm-dropdown,
.hpmm.is-mobile .hpmm-top-item.hpmm-dropdown-full > .hpmm-dropdown,
.hpmm.is-mobile .hpmm-dropdown {
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: rgba(0,0,0,.16) !important;
}

.hpmm.is-mobile .hpmm-top-item.hpmm-dropdown-compact > .hpmm-dropdown,
.hpmm.is-mobile .hpmm-top-item.hpmm-dropdown-full > .hpmm-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.hpmm.is-mobile .hpmm-top-item:not(.is-open) > .hpmm-dropdown {
    display: none !important;
}

.hpmm.is-mobile .hpmm-top-item.is-open > .hpmm-dropdown {
    display: block !important;
}

.hpmm.is-mobile .hpmm-dropdown-inner,
.hpmm.is-mobile .hpmm-top-item.hpmm-dropdown-compact .hpmm-dropdown-inner {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.hpmm.is-mobile .hpmm-grid,
.hpmm.is-mobile .hpmm-top-item.hpmm-dropdown-compact .hpmm-grid {
    display: block !important;
    width: 100% !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.hpmm.is-mobile .hpmm-card,
.hpmm.is-mobile .hpmm-top-item.hpmm-dropdown-compact .hpmm-card {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-top: 1px solid rgba(255,255,255,.09) !important;
    background: transparent !important;
    color: #fff !important;
    text-decoration: none;
}

.hpmm.is-mobile .hpmm-thumb,
.hpmm.is-mobile .hpmm-card-desc {
    display: none !important;
}

.hpmm.is-mobile .hpmm-card-copy {
    display: block !important;
    width: 100%;
    margin: 0 !important;
    padding: 14px 22px 14px 40px !important;
    background: transparent !important;
}

.hpmm.is-mobile .hpmm-card-title {
    display: block;
    color: rgba(255,255,255,.94) !important;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
}

.hpmm.is-mobile .hpmm-card:hover,
.hpmm.is-mobile .hpmm-card:focus {
    background: rgba(255,255,255,.06) !important;
}

/* Hide desktop CTA treatment inside the mobile accordion */
.hpmm.is-mobile .hpmm-cta-item .hpmm-top-link {
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

/* Dedicated mobile-only phone CTA */
.hpmm.is-mobile .hpmm-mobile-call-wrap {
    display: none;
    padding: 18px 22px 22px;
    background: inherit;
}

.hpmm.is-mobile.mobile-open .hpmm-mobile-call-wrap {
    display: block;
}

.hpmm.is-mobile .hpmm-mobile-call {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 52px;
    padding: 12px 18px;
    border: 2px solid #ffffff;
    border-radius: 4px;
    background: #075f9b;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
}

.hpmm.is-mobile .hpmm-mobile-call:hover,
.hpmm.is-mobile .hpmm-mobile-call:focus {
    background: #064f81;
    color: #ffffff;
}

.hpmm.is-mobile .hpmm-mobile-call-icon {
    font-size: 18px;
    line-height: 1;
}


/* v1.0.10 — smooth desktop sticky behavior.
   Unlike Elementor's fixed sticky effect, this waits until the menu naturally
   reaches the top of the viewport, so it does not jump over the logo/header. */
@media (min-width: 1025px) {
    .hpmm.hpmm-sticky-enabled:not(.is-mobile) .hpmm-bar {
        position: sticky;
        top: var(--hpmm-sticky-top, 0px);
        z-index: 99999;
    }

    body.admin-bar .hpmm.hpmm-sticky-enabled:not(.is-mobile) .hpmm-bar {
        top: calc(var(--hpmm-sticky-top, 0px) + 32px);
    }
}

@media (min-width: 783px) and (max-width: 1024px) {
    body.admin-bar .hpmm.hpmm-sticky-enabled:not(.is-mobile) .hpmm-bar {
        top: calc(var(--hpmm-sticky-top, 0px) + 32px);
    }
}

/* Never make the mobile accordion sticky. */
.hpmm.is-mobile .hpmm-bar {
    top: auto !important;
}

/* If Elementor sticky was accidentally applied directly to this widget,
   neutralize the fixed jump so the plugin's smoother sticky behavior wins. */
.elementor-widget-hp_mega_menu.elementor-sticky--active {
    position: relative !important;
    top: auto !important;
    width: auto !important;
}


/* v1.0.10 — keep compact desktop dropdowns fully inside the viewport */
@media (min-width: 1025px) {
    .hpmm-top-item.hpmm-dropdown-compact > .hpmm-dropdown {
        overflow: hidden;
    }

    .hpmm-top-item.hpmm-dropdown-compact .hpmm-dropdown-inner {
        padding: 20px;
    }

    .hpmm-top-item.hpmm-dropdown-compact .hpmm-grid {
        max-width: calc(100vw - 72px);
    }

    .hpmm-top-item.hpmm-dropdown-compact .hpmm-card {
        min-width: 0;
    }
}
