/* Main navbar wrapper - provides positioning context for mega menus */
.navbar-wrapper {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    width: 100%;
    z-index: 9999;
}

.navbar {
    position: relative; /* Keep relative for nav-item positioning */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    max-width: 1200px;
    margin: 0 auto;
    height: 50px;
}


/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 4px;
    color: #000;
    margin-left: auto;
    margin-right: 0px;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background: #000;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 1rem;
}

.nav-item {
    /* position: relative; */
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    gap: 0.5rem;
}

.nav-link:hover {
    color: #6366f1;
    /* background: #f8fafc; */
}

.nav-link i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.dropdown:hover .nav-link i {
    transform: rotate(180deg);
}

/* Navigation Container - alternative structure */
.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    width: 100%;
}

.nav-logo a {
    font-size: 24px;
    font-weight: bold;
    color: #2c5aa0;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-logo i {
    font-size: 28px;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    margin-left: auto;
    padding: 0;
    align-items: center;
}

.nav-item {
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 5px 6px;
    text-decoration: none;
    color: #000;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-transform: uppercase;
}

.nav-link:hover {
    color: #2c5aa0;
}

.nav-link i {
    margin-left: 5px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.dropdown:hover .nav-link i {
    transform: rotate(180deg);
}

/* Mega Menu Base Styles */
.mega-menu {
    position: absolute;
    top: 100%;
    left: calc(-50vw + 50%);
    width: calc(100dvw - 8px);
    background: #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 12px 12px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    border-top: 3px solid #6366f1;
}

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

.mega-menu-content {
    display: grid;
    gap: 0;
    padding: 2rem;
    width: 90vw;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 300px;
}

/* Column Layout Options */
.mega-menu-content.cols-2 {
    grid-template-columns: 1fr 1fr;
}

.mega-menu-content.cols-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

.mega-menu-content.cols-4 {
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

/* Custom column widths */
.mega-menu-content.cols-25-50-25 {
    grid-template-columns: 25% 50% 25%;
}

.mega-menu-content.cols-33-33-33 {
    grid-template-columns: 1fr 1fr 1fr;
}

.mega-menu-content.cols-50-25-25 {
    grid-template-columns: 50% 25% 25%;
}

.mega-menu-column {
    padding: 1.5rem;
    /* border-right: 1px solid #e5e7eb; */
}

.mega-menu-column:last-child {
    border-right: none;
}

.mega-menu-column h3 {
    color: #6366f1;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f3f4f6;
}

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

.mega-menu-column ul li {
    /* margin-bottom: 0.5rem; */
    padding-bottom: 0px;
}

.mega-menu-column ul li a {
    color: #4b5563;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    line-height: 1.4;
}

.mega-menu-column ul li a:hover {
    color: #6366f1;
    background: #f8fafc;
    transform: translateX(4px);
}

/* Featured Item Styles */
.featured-item {
    text-align: center;
}

.featured-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 12px;
}

.featured-item h4 {
    color: #333;
    font-size: 16px;
    margin-bottom: 8px;
}

.featured-item p {
    color: #666;
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.4;
}

/* Regular Dropdown Styles */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 9999;
    overflow: hidden;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: block;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-link:last-child {
    border-bottom: none;
}

.dropdown-link:hover {
    background: #f8f9fa;
    color: #2c5aa0;
    padding-left: 25px;
}


/* Mobile Menu Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}


/* ===== SIMPLE DROPDOWN STYLES ===== */
.simple-dropdown {
    position: relative;
    z-index: 9999;
}

.simple-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 220px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-radius: 0px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    border-top: 3px solid var(--primary_color);
    overflow: hidden;
    margin-top: 10px;
}

.simple-dropdown:hover .simple-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.simple-dropdown-link {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
    gap: 0.75rem;
}

.simple-dropdown-link:last-child {
    border-bottom: none;
}

.simple-dropdown-link:hover {
    background: #f8fafc;
    color: var(--primary_color);
    transform: translateX(4px);
}

.simple-dropdown-link i {
    width: 16px;
    color: var(--primary_color);
    font-size: 0.9rem;
    display: none;
}

/* ===== IMAGE CARD DROPDOWN STYLES ===== */
.image-dropdown {
    /* position: relative; */
    z-index: 9999;
}

.image-dropdown-menu {
    position: absolute;
    top: 100%;
    left: calc(-50vw + 50%);
    width: calc(100dvw - 8px);
    background: #ffffff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 12px 12px;
    opacity: 0;
    visibility: hidden;
    /* start slightly above for a subtle drop-in like other dropdowns */
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    border-top: 3px solid #6366f1;
    max-width: calc(100dvw - 8px);
    overflow-y: hidden;
}

.image-dropdown:hover .image-dropdown-menu {
    opacity: 1;
    visibility: visible;
    /* match mega-menu behavior: centered via left calc() and animate Y only */
    transform: translateY(0);
}

.image-dropdown-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 2rem;
    width: 90vw;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 300px;
}

.image-card {
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.image-card:hover {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.image-card-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: white;
    font-size: 1.5rem;
}

.image-card-img img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.image-card-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.image-card-content p {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}


/* ===== ICON CARD DROPDOWN STYLES ===== */
.icon-dropdown {
    /* position: relative; */
    z-index: 9999;
}

.icon-dropdown-menu {
    position: absolute;
    top: 100%;
    left: calc(-50vw + 50%);
    width: calc(100dvw - 8px);
    background: #ffffff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 12px 12px;
    opacity: 0;
    visibility: hidden;
    /* start slightly above for a subtle drop-in like other dropdowns */
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    border-top: 3px solid #6366f1;
    max-width: calc(100dvw - 8px);
    overflow-y: hidden;
}
    
.icon-dropdown:hover .icon-dropdown-menu {
    opacity: 1;
    visibility: visible;
    /* match mega-menu behavior: centered via left calc() and animate Y only */
    transform: translateY(0);
}

.icon-dropdown-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 2rem;
    width: 90vw;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 300px;
}

.icon-card {
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.icon-card:hover {
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.icon-card-img {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: white;
    font-size: 1.5rem;
}

.icon-card-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.icon-card-content p {
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
}


.card-link {
    color: #6366f1;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.card-link:hover {
    color: #4f46e5;
    transform: translateX(2px);
}

/* Mobile Responsive */
@media (max-width: 1120px) {
    .mobile-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: auto;
        right: 0;
        background: white;
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        max-height: 70vh;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        width: 280px;
        z-index: 9999;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        z-index: 9999;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        width: 100%;
        justify-content: space-between;
        padding: 1rem;
        color: #000;
        box-sizing: border-box;
    }
    
    
    .simple-dropdown-menu,
    .image-dropdown-menu,
    .icon-dropdown-menu {
        display: none;
        position: static !important;
        width: 100% !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        border-top: none !important;
        margin-top: 0 !important;
        background: #f8fafc !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
    .dropdown.active .simple-dropdown-menu,
    .dropdown.active .image-dropdown-menu,
    .dropdown.active .icon-dropdown-menu,
    .simple-dropdown.active .simple-dropdown-menu,
    .image-dropdown.active .image-dropdown-menu,
    .icon-dropdown.active .icon-dropdown-menu {
        display: block;
    }
    
    .mega-menu {
        display: none;
        position: static !important;
        width: 100% !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        border-top: none !important;
        margin-top: 0 !important;
        background: #f8fafc !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
    .mega-menu-content {
        width: 100%
    }
    .dropdown.active .mega-menu {
        display: block;
    }
    .image-dropdown-content {
        grid-template-columns: repeat(2, 1fr);
        width: 100%
    }
    .icon-dropdown-content {
        grid-template-columns: repeat(2, 1fr);
        width: 100%
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .image-dropdown-content {
        grid-template-columns: repeat(1, 1fr);
    }
}
/* ===== CASCADING MEGA MENU STYLES ===== */

/* Desktop Cascading Menu */
@media (min-width: 1121px) {
    /* Cascading Menu Container */
    .cascading-menu {
        position: static;
    }

    .cascading-mega-menu {
        position: absolute;
        top: 100%;
        left: calc(-50vw + 50%);
        width: calc(100dvw - 8px);
        background: #ffffff;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
        border-radius: 0 0 12px 12px;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 9999;
        border-top: 3px solid #6366f1;
    max-width: calc(100dvw - 8px);
    overflow-y: hidden;
    }

    .cascading-menu:hover .cascading-mega-menu,
    .cascading-menu.active .cascading-mega-menu {
        opacity: 1;
        visibility: visible;
    }


.cascading-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0;
    width: 90vw;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 500px;
}

/* Column Styles */
.cascading-column {
    padding: 2rem 1.5rem;
    border-right: 1px solid #e5e7eb;
    background: #ffffff;
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar styling for cascading columns */
.cascading-column::-webkit-scrollbar {
    width: 6px;
}

.cascading-column::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.cascading-column::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.cascading-column::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.cascading-column:last-child {
    border-right: none;
}

.cascading-column h4 {
    margin: 0 0 1.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f3f4f6;
}

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

.cascading-column ul li {
    margin-bottom: 0rem;
}

.cascading-column ul li a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #4b5563;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    line-height: 1.4;
}

.cascading-column ul li a:hover {
    background: #f8fafc;
    color: #6366f1;
    transform: translateX(4px);
}

.cascading-column ul li a i {
    margin-right: 0.75rem;
    width: 16px;
    color: #6366f1;
    font-size: 0.9rem;
}

/* Active states */
.cascading-column ul li.active a {
    background: #eef2ff;
    color: #6366f1;
    font-weight: 500;
}

/* Level-specific styling */
.level-1 {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.level-2 {
    background: linear-gradient(135deg, #fefefe 0%, #f9fafb 100%);
}

.level-3 {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}
} /* End desktop media query */

/* Mobile Cascading Menu */
@media (max-width: 768px) {
    .cascading-mega-menu {
        display: none;
        position: static !important;
        width: 100% !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        border-top: none !important;
        margin-top: 0 !important;
        background: #f8fafc !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
    .cascading-menu.active .cascading-mega-menu {
        display: block;
    }
    
    .cascading-container {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .cascading-column {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        padding: 1.5rem 1rem;
    }
    
    .cascading-column:last-child {
        border-bottom: none;
    }

    /* Mobile Cascading Menu Styles */
    .mobile-cascading-menu {
        width: 100%;
    }

    .mobile-menu-level {
        width: 100%;
        transition: all 0.3s ease;
    }

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

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

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

    .mobile-menu-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem;
        color: #4b5563;
        text-decoration: none;
        transition: all 0.2s ease;
    }

    .mobile-menu-link:hover {
        background: #f8fafc;
        color: #6366f1;
    }

    .mobile-menu-header {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1rem;
        border-bottom: 2px solid #e5e7eb;
        background: #f8fafc;
    }

    .mobile-back-btn {
        background: none;
        border: none;
        color: #6366f1;
        font-size: 0.9rem;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        cursor: pointer;
        padding: 0.5rem;
        border-radius: 6px;
        transition: all 0.2s ease;
    }

    .mobile-back-btn:hover {
        background: #eef2ff;
    }

    .mobile-menu-arrow {
        color: #9ca3af;
        font-size: 0.8rem;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
}

/* Hide the data structure */
.cascading-menu-data {
    display: none !important;
}

/* Loading state for columns */
.cascading-column.loading {
    opacity: 0.6;
    pointer-events: none;
}

.cascading-column.empty {
    opacity: 0.4;
}

.cascading-column.empty h4 {
    color: #9ca3af;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus states for keyboard navigation */
.nav-link:focus,
.dropdown-link:focus,
.btn-primary:focus,
.btn-secondary:focus,
.btn-cta:focus {
    outline: 2px solid #2c5aa0;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .navbar {
        border-bottom: 2px solid #000;
    }
    
    .mega-menu,
    .dropdown-menu {
        border: 2px solid #000;
    }
}

/* Mobile Mega Menu Styles */
@media (max-width: 1120px) {
    .mega-menu {
        position: static;
        width: 100%;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        border-top: none;
        margin-top: 1rem;
    }
    
    .mega-menu-content {
        grid-template-columns: 1fr !important;
        padding: 1rem;
        min-height: auto;
    }
    
    .mega-menu-column {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        padding: 1rem;
    }
    
    .mega-menu-column:last-child {
        border-bottom: none;
    }
    
    .dropdown:hover .mega-menu,
    .dropdown.active .mega-menu {
        transform: none;
    }
}

.solutions-list-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem 2rem;
  list-style: disc inside;
  padding-left: 1.5rem;
}
.solutions-list-3col li {
  margin-bottom: 0.5rem;
}
@media (max-width: 1120px) {
  .solutions-list-3col {
    grid-template-columns: 1fr;
  }
}
