/* ============================================
   BASE NAVBAR STYLES (shared across styles)
   ============================================ */

.pb-navbar {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.pb-navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 70px;
}

/* Logo */
.pb-navbar-logo {
    flex-shrink: 0;
}
.pb-navbar-logo img {
    max-height: 50px;
    width: auto;
}
.pb-navbar-logo a {
    text-decoration: none;
    color: inherit;
}
.pb-navbar-logo .site-title {
    font-size: 24px;
    font-weight: 700;
}

/* Menu */
.pb-navbar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}
.pb-navbar-menu li {
    position: relative;
}
.pb-navbar-menu a {
    text-decoration: none;
    color: inherit;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pb-navbar-menu a:hover {
    background: rgba(255,255,255,0.1);
}

/* Dropdown arrow icon */
.pb-navbar-menu .dropdown-icon {
    font-size: 0.7em;
    margin-left: 4px;
    transition: transform 0.3s;
}

/* Sub-menu */
.pb-navbar-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-radius: 6px;
    padding: 8px 0;
    min-width: 200px;
    list-style: none;
    z-index: 999;
}
.pb-navbar-menu .menu-item-has-children:hover > .sub-menu,
.pb-navbar-menu .menu-item-has-children:focus-within > .sub-menu {
    display: block;
}
.pb-navbar-menu .sub-menu a {
    padding: 8px 20px;
    color: #333;
}
.pb-navbar-menu .sub-menu a:hover {
    background: #f5f5f5;
}

/* Mobile toggle */
.pb-navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
}
.pb-navbar-toggle span {
    display: block;
    width: 26px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: 0.3s;
}

/* Top bar (contact & social) */
.pb-navbar-top-bar {
    background: #222;
    color: #fff;
    padding: 6px 0;
    font-size: 13px;
}
.pb-navbar-top-bar .pb-navbar-top-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    flex-wrap: wrap;
    gap: 10px;
}
.pb-navbar-top-bar .pb-contact-items {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.pb-navbar-top-bar .pb-contact-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.pb-navbar-top-bar .pb-contact-item i {
    font-size: 14px;
}
.pb-navbar-top-bar .pb-contact-item a {
    color: inherit;
    text-decoration: none;
}
.pb-navbar-top-bar .pb-social-items {
    display: flex;
    gap: 12px;
}
.pb-navbar-top-bar .pb-social-items a {
    color: inherit;
    text-decoration: none;
    font-size: 16px;
}
.pb-navbar-top-bar .pb-social-items a:hover {
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .pb-navbar-toggle {
        display: flex;
    }
    .pb-navbar-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        padding: 20px;
        gap: 10px;
    }
    .pb-navbar-menu.open {
        display: flex;
    }
    .pb-navbar-menu .sub-menu {
        position: static;
        box-shadow: none;
        padding-left: 20px;
        border-radius: 0;
        background: transparent;
    }
    .pb-navbar-menu .menu-item-has-children:hover > .sub-menu {
        display: none;
    }
    .pb-navbar-menu .menu-item-has-children.open > .sub-menu {
        display: block;
    }
    .pb-navbar-top-bar .pb-navbar-top-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .pb-navbar-top-bar .pb-contact-items,
    .pb-navbar-top-bar .pb-social-items {
        justify-content: center;
    }
}

/* Sticky */
.pb-navbar.sticky {
    position: sticky;
    top: 0;
    z-index: 9999;
}

/* Transparent (will be used with background image/color) */
.pb-navbar.transparent {
    background: transparent !important;
}

/* ============================================
   ADMIN UI STYLES (used only in WP admin)
   ============================================ */

/* --- Placeholders --- */
.pb-navbar-placeholder {
    border: 2px dashed #ccd0d4;
    border-radius: 12px;
    background: #fdfdfd;
    padding: 40px 20px;
    text-align: center;
    color: #646970;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.pb-navbar-placeholder i {
    font-size: 32px;
    color: #2271b1;
    opacity: 0.6;
}
.pb-navbar-placeholder span {
    font-weight: 600;
    font-size: 15px;
    color: #1d2327;
}
.pb-navbar-placeholder p {
    margin: 0;
    font-size: 13px;
    max-width: 300px;
    line-height: 1.5;
}

/* --- Live Preview Wrapper --- */
.pb-live-preview-wrapper {
    margin: 20px 0 30px;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    padding: 15px 15px 20px;
}
.pb-preview-label {
    font-weight: 600;
    font-size: 15px;
    color: #1d2327;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pb-preview-label i {
    color: #2271b1;
}
.pb-preview-controls {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}
.pb-preview-size-btn {
    padding: 4px 12px;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    background: #f6f7f7;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: #50575e;
    transition: 0.2s;
}
.pb-preview-size-btn:hover {
    background: #e2e4e7;
}
.pb-preview-size-btn.active {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}
.pb-preview-frame {
    background: #1a1a1a;
    min-height: 200px;
    border-radius: 6px;
    overflow: hidden;
    transition: width 0.3s ease, opacity 0.3s ease;
    width: 100%;
    margin: 0 auto;
    position: relative;
}
.pb-preview-frame iframe,
.pb-preview-frame .pb-navbar {
    width: 100% !important;
}

/* --- Tabs Wrapper --- */
.pb-navbar-tabs-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 8px 8px 0 0;
    padding: 0 10px;
}
.pb-navbar-tabs-nav-container {
    overflow: hidden;
    width: 100%;
}
.pb-navbar-tabs-nav {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-behavior: smooth;
    padding: 10px 0 0 0;
}
.pb-navbar-tabs-nav::-webkit-scrollbar {
    display: none;
}
.pb-navbar-tab-btn {
    padding: 12px 20px;
    background: #f6f7f7;
    border: 1px solid #ccd0d4;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}
.pb-navbar-tab-btn.active {
    background: #fff;
    color: #2271b1;
    border-bottom: 2px solid #fff;
}
.pb-navbar-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
    color: #2271b1;
}
.pb-navbar-slider-btn.prev {
    left: 5px;
}
.pb-navbar-slider-btn.next {
    right: 5px;
}
.pb-navbar-slider-btn.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* --- Registry Items --- */
.pb-navbar-registry-item {
    display: none;
    border: 1px solid #e0e0e0;
    border-radius: 0 0 6px 6px;
    margin-bottom: 10px;
}
.pb-navbar-registry-item.active {
    display: block;
}

.pb-navbar-item-header {
    display: flex;
    justify-content: flex-end;
    padding: 10px 15px 0;
}
.pb-navbar-remove-item {
    background: none !important;
    border: none !important;
    color: #d63638 !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    padding: 4px 8px;
}
.pb-navbar-remove-item:hover {
    color: #b32d2d !important;
    text-decoration: underline;
}

.pb-navbar-sub-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    background: #f9f9f9;
    margin-bottom: 15px;
}
.pb-navbar-sub-tab-btn {
    padding: 6px 14px;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: #50575e;
    transition: all 0.2s;
}
.pb-navbar-sub-tab-btn.active {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}
.pb-navbar-sub-tab-content {
    display: none;
    padding: 15px;
}
.pb-navbar-sub-tab-content.active {
    display: block;
}

/* --- Style Selection Modal --- */
#pb-navbar-style-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
    z-index: 999999;
}
.pb-navbar-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    width: 900px;
    max-width: 90%;
    max-height: 85vh;
    overflow-y: auto;
}
.pb-navbar-style-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.pb-navbar-style-option {
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    transition: 0.2s;
    background: #fff;
}
.pb-navbar-style-option:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.pb-navbar-style-preview {
    height: 140px;
    background: #f0f0f1;
    border-radius: 6px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* --- Add Section Bar --- */
.pb-add-section-bar {
    text-align: center;
    padding: 20px;
    margin-top: 10px;
}

/* --- Full View Mode --- */
.mode-full .pb-navbar-tabs-wrapper {
    display: none;
}
.mode-full .pb-navbar-registry-item {
    display: block !important;
    margin-bottom: 30px;
}

/* --- Hamburger Preview (from theme options) --- */
.npadev-hamburger-preview-wrap { display: flex; flex-wrap: wrap; gap: 20px; margin-top: 10px; }
.npadev-hamburger-option { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.npadev-hamburger-option label { display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.npadev-hb-preview {
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
    width: 60px; height: 60px;
    background: #1e1e1e; border-radius: 6px; cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    border: 2px solid transparent;
}
.npadev-hb-preview:hover { background: #333; }
.npadev-hb-preview span {
    display: block; height: 2px; background: #fff; border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
    transform-origin: center;
}
.npadev-hb1 span { width: 26px; }
.npadev-hb1.toggled span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.npadev-hb1.toggled span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.npadev-hb1.toggled span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.npadev-hb2 span:nth-child(1) { width: 26px; }
.npadev-hb2 span:nth-child(2) { width: 18px; align-self: flex-start; margin-left: 17px; }
.npadev-hb2 span:nth-child(3) { width: 22px; }
.npadev-hb2.toggled span:nth-child(1) { width: 26px; transform: translateY(7px) rotate(45deg); }
.npadev-hb2.toggled span:nth-child(2) { opacity: 0; }
.npadev-hb2.toggled span:nth-child(3) { width: 26px; transform: translateY(-7px) rotate(-45deg); }

.npadev-hb3 { flex-direction: row; width: auto; min-width: 80px; padding: 0 12px; gap: 8px; }
.npadev-hb3-lines { display: flex; flex-direction: column; gap: 5px; }
.npadev-hb3-lines span { width: 22px; }
.npadev-hb3-label { font-size: 10px; font-weight: 700; color: #fff; letter-spacing: 1px; position: relative; height: 14px; overflow: hidden; }
.npadev-hb3-label span { display: block; transition: transform 0.3s ease, opacity 0.3s ease; line-height: 14px; }
.npadev-hb3-label .lbl-close { position: absolute; top: 0; transform: translateY(100%); opacity: 0; }
.npadev-hb3.toggled .npadev-hb3-lines span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.npadev-hb3.toggled .npadev-hb3-lines span:nth-child(2) { opacity: 0; }
.npadev-hb3.toggled .npadev-hb3-lines span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.npadev-hb3.toggled .npadev-hb3-label .lbl-menu { transform: translateY(-100%); opacity: 0; }
.npadev-hb3.toggled .npadev-hb3-label .lbl-close { transform: translateY(0); opacity: 1; }

.npadev-hb4 { width: 60px; height: 60px; border-radius: 50%; }
.npadev-hb4 span:nth-child(1) { width: 20px; }
.npadev-hb4 span:nth-child(2) { width: 14px; align-self: flex-start; margin-left: 20px; }
.npadev-hb4 span:nth-child(3) { width: 18px; }
.npadev-hb4.toggled span:nth-child(1) { width: 20px; transform: translateY(7px) rotate(45deg); }
.npadev-hb4.toggled span:nth-child(2) { opacity: 0; }
.npadev-hb4.toggled span:nth-child(3) { width: 20px; transform: translateY(-7px) rotate(-45deg); }

.npadev-hb-selected { border-color: #2271b1 !important; box-shadow: 0 0 0 1px #2271b1; }

/* --- Dropdown Icon Picker (from theme options) --- */
.npadev-icon-picker { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.npadev-icon-option input[type=radio] { position: absolute; opacity: 0; width: 0; height: 0; }
.npadev-icon-option label {
    display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 2px solid #ddd; border-radius: 6px; cursor: pointer; font-size: 18px; transition: 0.2s; background: #fff;
}
.npadev-icon-option input[type=radio]:checked + label { border-color: #2271b1; background: #f0f6ff; }

/* --- Contact/Social fields – full width, no add/remove buttons --- */
.pb-contact-item-fields .pb-field-wrapper,
.pb-social-item-fields .pb-field-wrapper {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
}
.pb-contact-item-fields .pb-char-counter,
.pb-social-item-fields .pb-char-counter {
    font-size: 10px;
    margin-left: 2px;
    min-width: 30px;
    display: inline-block;
}
.pb-contact-item, .pb-social-item {
    margin-bottom: 12px;
}
.pb-contact-item-fields, .pb-social-item-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.pb-contact-item-fields input[type="text"],
.pb-social-item-fields input[type="text"] {
    flex: 1;
    min-width: 100px;
}
.pb-contact-item-fields .pb-contact-label { width: 120px; }
.pb-contact-item-fields .pb-contact-value { width: 200px; }
.pb-social-item-fields .pb-social-url { flex: 1; min-width: 150px; }

/* Hide add/remove buttons in navbar component */
.pb-add-contact, .pb-add-social, .pb-remove-contact, .pb-remove-social {
    display: none !important;
}

.pb-navbar-nav.menu-left .pb-navbar-menu { justify-content: flex-start; }
.pb-navbar-nav.menu-center .pb-navbar-menu { justify-content: center; }
.pb-navbar-nav.menu-right .pb-navbar-menu { justify-content: flex-end; }


/* Mega menu styles */
.pb-navbar.megamenu-enabled .pb-navbar-menu .menu-item-has-children {
    position: relative;
}

.pb-megamenu-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
}

.pb-navbar.hover-trigger .menu-item-has-children:hover .pb-megamenu-container {
    opacity: 1;
    visibility: visible;
}

.pb-navbar.click-trigger .pb-megamenu-container.active {
    opacity: 1;
    visibility: visible;
}

.pb-megamenu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.pb-megamenu-grid {
    display: grid;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
}

.pb-megamenu-grid.columns-2 { grid-template-columns: repeat(2, 1fr); }
.pb-megamenu-grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.pb-megamenu-grid.columns-4 { grid-template-columns: repeat(4, 1fr); }

.pb-megamenu-grid .megamenu-item {
    margin: 0;
}

.pb-megamenu-grid .megamenu-item a {
    display: flex;
    flex-direction: column;
    padding: 10px;
    border-radius: 4px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
}

.pb-megamenu-grid .megamenu-item a:hover {
    background: rgba(0,0,0,0.05);
}

.pb-megamenu-grid .megamenu-item i {
    font-size: 24px;
    margin-bottom: 6px;
}

.pb-megamenu-grid .megamenu-description {
    font-size: 0.85em;
    opacity: 0.7;
    margin-top: 4px;
}

/* Mobile responsiveness for mega menu */
@media (max-width: 768px) {
    .pb-megamenu-container {
        position: relative;
        opacity: 1;
        visibility: visible;
        width: 100%;
        left: auto;
        transform: none;
        display: none;
    }
    .pb-navbar .menu-item-has-children.open .pb-megamenu-container {
        display: block;
    }
    .pb-megamenu-grid {
        grid-template-columns: 1fr !important;
    }
    .pb-megamenu-grid .megamenu-item a {
        padding: 8px 15px;
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
    .pb-megamenu-grid .megamenu-item i {
        font-size: 20px;
        margin-bottom: 0;
    }
}

/* ============================================
   MEGA MENU STYLES (Navbar V2) – IMPROVED
   ============================================ */

/* Ensure the navbar can contain the mega menu without clipping */
.pb-navbar {
    overflow: visible !important;
}

/* Allow the preview frame to show the mega menu without clipping */
.pb-preview-frame {
    overflow: visible !important;
    min-height: 400px;
}

.pb-navbar.megamenu-enabled .pb-navbar-menu {
    display: flex;
    gap: 0;
}

.pb-navbar.megamenu-enabled .pb-navbar-menu > li {
    position: relative;
}

/* For full‑width mega menu, the parent li must be static so the container can span the navbar */
.pb-navbar.megamenu-full .pb-navbar-menu > li {
    position: static !important;
}

.pb-navbar.megamenu-enabled .pb-navbar-menu > li > a {
    padding: 0 20px;
    height: 70px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-weight: 500;
    transition: background 0.2s;
}

.pb-navbar.megamenu-enabled .pb-navbar-menu > li > a:hover {
    background: rgba(255,255,255,0.15);
}

.pb-navbar.megamenu-enabled .pb-navbar-menu > li.menu-item-has-children > a .dropdown-icon {
    margin-left: 6px;
    transition: transform 0.3s ease;
    font-size: 0.7em;
}

.pb-navbar.megamenu-enabled .pb-navbar-menu > li.menu-item-has-children:hover > a .dropdown-icon {
    transform: rotate(180deg);
}

/* Mega menu container – full width with proper centering */
.pb-megamenu-container {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    max-width: 100vw;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
    padding-top: 10px; /* gap between trigger and menu */
    pointer-events: none;
    /* custom properties for arrow */
    --arrow-left: 50%;
    --mm-bg: #ffffff;
}

/* Full‑width override: position relative to the navbar, not the li */
.pb-navbar.megamenu-full .pb-megamenu-container {
    left: 0;
    right: 0;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
    padding-top: 10px;
}

/* Arrow connecting mega menu to parent */
.pb-megamenu-container::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: var(--arrow-left);
    transform: translateX(-50%);
    border: 10px solid transparent;
    border-bottom-color: var(--mm-bg, #ffffff);
    z-index: 1;
    pointer-events: none;
}

.pb-navbar.hover-trigger .menu-item-has-children:hover .pb-megamenu-container,
.pb-navbar.click-trigger .pb-megamenu-container.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* If container width is chosen (not full) */
.pb-navbar.megamenu-container .pb-megamenu-container {
    left: 0;
    transform: none;
    width: 100%;
    max-width: 100%;
}

.pb-megamenu-inner {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    padding: 20px 30px;
    width: 100%;
}

/* Overlay */
.pb-megamenu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    border-radius: inherit;
}

/* Grid layout */
.pb-megamenu-grid {
    display: grid;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
}

.pb-megamenu-grid.columns-2 { grid-template-columns: repeat(2, 1fr); }
.pb-megamenu-grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.pb-megamenu-grid.columns-4 { grid-template-columns: repeat(4, 1fr); }

.megamenu-column {
    list-style: none;
    padding: 0;
}

.megamenu-column-items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.megamenu-item {
    margin-bottom: 16px;
}

.megamenu-item a {
    display: flex;
    flex-direction: column;
    padding: 10px 14px;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    transition: background 0.2s, transform 0.2s;
}

.megamenu-item a:hover {
    background: rgba(0,126,253,0.08);
    transform: translateX(4px);
}

.megamenu-item i {
    font-size: 28px;
    margin-bottom: 6px;
    color: #007efd;
    display: inline-block;
}

.megamenu-item a:hover i {
    color: #005bb5;
}

.megamenu-description {
    font-size: 0.85em;
    opacity: 0.7;
    margin-top: 2px;
    color: #666;
}

/* Force dark text for mega menu items */
.pb-megamenu-inner .megamenu-item a {
    color: #333 !important;
}

.pb-megamenu-inner .megamenu-item a:hover {
    color: #007efd !important;
    background: rgba(0,126,253,0.08);
}

/* Ensure the dropdown icon on parent menu items stays white (if needed) */
.pb-navbar .pb-navbar-menu > li > a .dropdown-icon {
    color: inherit; /* keeps the navbar text color */
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .pb-navbar.megamenu-enabled .pb-navbar-menu {
        flex-direction: column;
        gap: 0;
        background: #fff;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        padding: 0;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12);
        display: none;
    }
    .pb-navbar.megamenu-enabled .pb-navbar-menu.open {
        display: flex;
    }
    .pb-navbar.megamenu-enabled .pb-navbar-menu > li > a {
        height: auto;
        padding: 12px 20px;
        border-bottom: 1px solid #eee;
    }
    .pb-megamenu-container {
        position: relative;
        opacity: 1 !important;
        visibility: visible !important;
        width: 100% !important;
        left: auto !important;
        transform: none !important;
        padding-top: 0;
        display: none;
        pointer-events: auto;
    }
    .pb-megamenu-container::before {
        display: none; /* hide arrow on mobile */
    }
    .pb-navbar .menu-item-has-children.open .pb-megamenu-container {
        display: block;
    }
    .pb-megamenu-inner {
        box-shadow: none;
        border-radius: 0;
        padding: 10px 20px;
        background: transparent !important;
        max-width: 100% !important;
    }
    .pb-megamenu-grid {
        grid-template-columns: 1fr !important;
        gap: 0;
    }
    .megamenu-column {
        margin-bottom: 0;
    }
    .megamenu-item a {
        padding: 8px 12px;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        border-bottom: 1px solid #f0f0f0;
    }
    .megamenu-item i {
        font-size: 20px;
        margin-bottom: 0;
        width: 30px;
        text-align: center;
    }
    .megamenu-description {
        font-size: 0.8em;
    }
}