/* --- Main Navigation Bar Styles --- */
/* You may need to adjust these to match your theme's structure. */
.main-navigation {
    /* Razorpay uses 'Inter'. Use a common fallback like sans-serif. */
    background-color: #E1EAFF; /* Example background */
    padding: 0 20px;       /* Example padding */
    border-bottom: 1px solid #e0e0e0; /* Example border */
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    height: 70px; /* Example height */
}

.main-navigation ul li {
    position: relative; /* Crucial for positioning the dropdown */
}

.main-navigation ul li a {
    display: block;
    padding: 20px 15px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 15px;
        transition: all 0.4s ease 0s;
    -webkit-transition: all 0.4s ease 0s;
}

.main-navigation ul li a:hover {
    color: #0d60f2; /* Highlight color on hover */
}

.arrow-down {
    font-size: 10px;
    display: inline-block;
    margin-left: 4px;
        transition: all 0.4s ease 0s;
    -webkit-transition: all 0.4s ease 0s;
}

.main-navigation ul li:hover .arrow-down {
    transform: rotate(180deg);
}


/* --- Mega Menu Container (WITH TRANSITION) --- */
.mega-menu {
    
    opacity: 0; /* Start fully transparent */
    visibility: hidden; /* Hide from screen readers and prevent interaction */
    transform: translateY(-15px) translateX(-20%); /* Start above and offset */
    transition: all 0.4s ease 0s;
    -webkit-transition: all 0.4s ease 0s;

    /* Positioning and Styling */
    position: absolute;
    top: 100%;
    left: -250px;
    background-color: #E1EAFF;
    width: 960px;
    max-width: 100vw;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #f0f1f3;
    padding: 24px;
    z-index: 1000;
}

/* --- Show the menu on hover (Desktop) or with .menu-open class (Mobile) --- */
.menu-item-has-children:hover .mega-menu,
.menu-item-has-children.menu-open .mega-menu {
    opacity: 1; /* Fade it in to be fully visible */
    visibility: visible; /* Make it visible and clickable */
    transform: translateY(0) translateX(-20%); /* Move it down to its final position */
    transition: all 0.4s ease 0s;
    -webkit-transition: all 0.4s ease 0s;
}


/* --- Mega Menu Inner Layout (Flexbox Columns) --- */
.mega-menu-inner {
    display: flex;
    gap: 32px; /* Space between columns */
}

.mega-menu-column {
    flex: 1; /* Each column takes up equal space */
}

.mega-menu-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    height: auto; /* Override nav height */
    border: none;  /* Override nav border */
}

/* --- Mega Menu Content Styling --- */
.mega-menu-heading {
    font-size: 11px;
    font-weight: 600;
    color: #8a94a4;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0 0 16px 0;
    padding-left: 12px;
}

.heading-top-margin {
    margin-top: 24px;
}

.mega-menu-column li a {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    border-radius: 6px;
        transition: all 0.4s ease 0s;
    -webkit-transition: all 0.4s ease 0s;
    height: auto; /* Override default link height */
}

.mega-menu-column li a:hover {
    background-color: #f7f9fc;
}

.menu-item-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background-color: #eef7ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
}

.menu-item-icon img {
    width: 20px;
    height: 20px;
}

.menu-item-text {
    display: flex;
    flex-direction: column;
}

.menu-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e263c;
    line-height: 1.4;
    display: flex;
    align-items: center;
}

.menu-item-description {
    font-size: 13px;
    color: #5c687e;
    line-height: 1.5;
}

.new-badge {
    background-color: #0d60f2;
    color: #fff;
    font-size: 9px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    line-height: 1;
}

/* ===================================================================
   Responsive Adjustments (for Mobile / Smaller Screens)
   =================================================================== */

@media (max-width: 991px) {
    /* On smaller screens, the menu will likely be triggered by a hamburger icon
       and take up the full width. These styles adjust the mega menu for that. */
    .mega-menu,
    .menu-item-has-children:hover .mega-menu,
    .menu-item-has-children.menu-open .mega-menu {
        /* Override desktop positioning */
        width: 100vw;
        left: 0;
        transform: translateY(0); /* Remove the horizontal transform */
        border-radius: 0;
        box-shadow: none;
        border-left: none;
        border-right: none;
    }

    .mega-menu-inner {
        flex-direction: column; /* Stack columns vertically on mobile */
    }
}