/* ================================================================
   PUBLIC NAVIGATION BAR - MEGA MENU
   Professional telecom-style navigation
   ================================================================ */

/* Navbar Container */
/* Navbar Container - now inside main bar */
/* Navigation in main bar - right aligned, closer to Contact Us */
.mainbar-nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding-left: 2rem;
}

.navbar-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* ================================================================
   DESKTOP MENU
   ================================================================ */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: static;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.75rem 0.75rem;
    color: var(--main-dark-blue);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.25s ease;
    position: relative;
    white-space: nowrap;
}

.nav-link i:first-child {
    font-size: 1.05rem;
    color: var(--main-red);
    transition: all 0.25s ease;
}

.nav-arrow {
    font-size: 0.7rem !important;
    color: #9ca3af !important;
    transition: transform 0.3s ease;
    margin-left: 2px;
}

/* Hover State */
.nav-link:hover {
    background: rgba(0, 201, 80, 0.06);
    color: var(--main-dark-blue);
}

.nav-link:hover i:first-child {
    color: var(--main-green);
    transform: scale(1.15);
}

.nav-link:hover .nav-arrow {
    color: var(--main-green) !important;
}

/* Active/Open State */
.nav-item.is-open > .nav-link {
    background: rgba(0, 201, 80, 0.08);
    color: var(--main-green);
}

.nav-item.is-open > .nav-link i:first-child {
    color: var(--main-green);
}

.nav-item.is-open > .nav-link .nav-arrow {
    transform: rotate(180deg);
    color: var(--main-green) !important;
}

/* Bottom accent line on hover */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--main-green);
    border-radius: 2px;
    transition: transform 0.3s ease;
}

.nav-item.is-open > .nav-link::after,
.nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
}

/* ================================================================
   MEGA MENU PANEL
   ================================================================ */
/* ================================================================
   MEGA MENU PANEL
   ================================================================ */
.megamenu-panel {
    position: fixed;
    top: auto;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 90vw;
    min-width: 800px;
    max-width: 1100px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(2, 6, 24, 0.12);
    padding: 1.75rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    margin-top: 8px;
}

/* Remove the arrow since panel is now fixed positioned */
.megamenu-panel::before {
    display: none;
}

.nav-item.is-open > .megamenu-panel {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-item.is-open > .megamenu-panel {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Loader state */
.megamenu-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 3rem;
    color: #64748b;
    font-size: 0.9rem;
}

.megamenu-content.d-none {
    display: none;
}

/* ================================================================
   MEGA MENU CONTENT LAYOUT
   ================================================================ */
.megamenu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
}

.megamenu-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--main-dark-blue);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.megamenu-title i {
    color: var(--main-green);
    font-size: 1.25rem;
}

.megamenu-viewall {
    font-size: 0.82rem;
    color: var(--main-red);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 50px;
    background: rgba(224, 25, 30, 0.06);
    transition: all 0.25s ease;
}

.megamenu-viewall:hover {
    background: var(--main-red);
    color: #ffffff;
    transform: translateX(2px);
}

/* Grid layout for menu items */
.megamenu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

/* Individual menu item card */
.megamenu-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 1rem;
    background: #fafafa;
    border: 1px solid transparent;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
}

.megamenu-item:hover {
    background: #ffffff;
    border-color: var(--main-green);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 201, 80, 0.1);
}

.megamenu-item-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(0, 201, 80, 0.1);
    color: var(--main-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: all 0.25s ease;
}

.megamenu-item:hover .megamenu-item-icon {
    background: var(--main-green);
    color: #ffffff;
    transform: scale(1.05);
}

.megamenu-item-content {
    flex: 1;
    min-width: 0;
}

.megamenu-item-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--main-dark-blue);
    margin: 0 0 4px 0;
    line-height: 1.2;
}

.megamenu-item-desc {
    font-size: 0.78rem;
    color: #64748b;
    line-height: 1.4;
    margin: 0;
}

/* Featured banner inside mega menu */
.megamenu-featured {
    background: linear-gradient(135deg, var(--main-dark-blue) 0%, #0a2540 100%);
    border-radius: 12px;
    padding: 1.25rem;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 160px;
    position: relative;
    overflow: hidden;
}

.megamenu-featured::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(0, 201, 80, 0.3) 0%, transparent 70%);
    pointer-events: none;
}

.megamenu-featured-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    position: relative;
    z-index: 1;
}

.megamenu-featured-text {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 1rem 0;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

.megamenu-featured-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--main-green);
    color: #ffffff;
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    align-self: flex-start;
    position: relative;
    z-index: 1;
}

.megamenu-featured-btn:hover {
    background: #00b347;
    transform: translateX(3px);
    color: #ffffff;
}

/* Kiosk state group */
.kiosk-state-group {
    margin-bottom: 1rem;
}

.kiosk-state-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--main-red);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.kiosk-state-name i {
    color: var(--main-red);
    font-size: 0.85rem;
}

.kiosk-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.kiosk-list li {
    margin-bottom: 0.35rem;
}

.kiosk-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    color: var(--main-grey);
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.kiosk-list a:hover {
    background: rgba(0, 201, 80, 0.08);
    color: var(--main-green);
    transform: translateX(3px);
}

.kiosk-list a i {
    color: var(--main-green);
    font-size: 0.85rem;
}

/* ================================================================
   MOBILE TOGGLE BUTTON
   ================================================================ */
.navbar-toggler {
    background: transparent;
    border: 1.5px solid rgba(2, 6, 24, 0.15);
    border-radius: 10px;
    padding: 8px 12px;
    color: var(--main-dark-blue);
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: none;
}

.navbar-toggler:hover {
    background: rgba(0, 201, 80, 0.08);
    border-color: var(--main-green);
    color: var(--main-green);
}

/* ================================================================
   MOBILE MENU
   ================================================================ */
/* ================================================================
   MOBILE MENU - now inside main bar
   ================================================================ */
.mobile-menu {
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    width: 100%;
}

.mobile-menu.is-open {
    max-height: 600px;
    border-top: 1px solid #e2e8f0;
}

.mobile-menu-list {
    list-style: none;
    padding: 0.5rem 1rem 1rem;
    margin: 0;
}

.mobile-menu-item {
    border-bottom: 1px solid #f1f5f9;
}

.mobile-menu-item:last-child {
    border-bottom: none;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.85rem 0.5rem;
    color: var(--main-dark-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.mobile-menu-link i:first-child {
    color: var(--main-red);
    font-size: 1.1rem;
}

.mobile-arrow {
    margin-left: auto;
    color: #9ca3af;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.mobile-menu-item.is-open .mobile-arrow {
    transform: rotate(180deg);
    color: var(--main-green);
}

.mobile-submenu {
    list-style: none;
    padding: 0 0 0.5rem 2rem;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-menu-item.is-open .mobile-submenu {
    max-height: 300px;
}

.mobile-submenu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 0.75rem;
    color: var(--main-grey);
    text-decoration: none;
    font-size: 0.88rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.mobile-submenu a:hover {
    background: rgba(0, 201, 80, 0.08);
    color: var(--main-green);
}

.mobile-submenu a i {
    color: var(--main-green);
    font-size: 0.9rem;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 991.98px) {
    .nav-menu {
        display: none;
    }
    
    .mainbar-nav {
        flex: 1;
        justify-content: flex-end;
        padding-left: 0;
    }
    
    .navbar-toggler {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .mainbar-wrapper {
        gap: 1rem;
    }
}

@media (max-width: 767.98px) {
    .megamenu-panel {
        min-width: calc(100vw - 2rem);
        max-width: calc(100vw - 2rem);
        left: 1rem;
        right: 1rem;
        transform: translateY(10px);
    }
    
    .megamenu-panel::before {
        left: 30px;
        transform: rotate(45deg);
    }
    
    .nav-item.is-open > .megamenu-panel {
        transform: translateY(0);
    }
    
    .megamenu-grid {
        grid-template-columns: 1fr;
    }
}