/* ==========================================================================
   Mega Dropdown Styles (XL & LG Screens)
   ========================================================================== */
@media (min-width: 992px) {
    .dropdown.mega-dropdown-li {
        position: static;
        /* Supports wider menus if needed */
        position: relative;
    }

    .dropdown-menu.mega-menu-wrapper {
        width: 700px;
        /* Wide mega menu */
        padding: 0;
        overflow: hidden;
        border-radius: 20px;
        /* Enhanced 20px Rounded Corners */
        display: none;
        /* Managed by hover/open states below */
        left: 50%;
        transform: translateX(-50%);
        /* Center relative to parent item */
        margin-top: 15px;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
        border: none !important;
    }

    .navbar-nav>li:last-child .dropdown-menu.mega-menu-wrapper {
        left: auto;
        right: 0;
        transform: none;
    }

    /* Show on Hover or Click (Open class) for Desktop - XL & LG */
    .dropdown.mega-dropdown-li:hover>.dropdown-menu,
    .dropdown.mega-dropdown-li.open>.dropdown-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        margin-top: 0 !important;
        z-index: 10005 !important;
    }

    .mega-menu-content {
        display: flex;
        align-items: stretch;
        min-height: auto;
        /* Removed 320px fixed min-height */
    }

    /* Left Column: Links */
    .mega-menu-links {
        flex: 1;
        padding: 15px 20px;
        /* Reduced from 25px */
        background: #ffffff;
        display: flex;
        flex-direction: column;
        gap: 8px;
        /* Reduced from 15px */
    }

    .mega-link-item {
        display: flex;
        align-items: center;
        gap: 15px;
        text-decoration: none !important;
        padding: 8px 12px;
        /* Reduced vertical padding from 12px */
        border-radius: 8px;
        transition: all 0.3s ease;
    }

    .mega-link-item:hover {
        background: #f4f6f8;
    }

    .mega-icon {
        width: 45px;
        height: 45px;
        background: rgba(126, 188, 18, 0.1);
        color: var(--primary-color);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        transition: all 0.3s ease;
    }

    .mega-link-item:hover .mega-icon {
        background: var(--primary-color);
        color: #ffffff;
        box-shadow: 0 5px 15px rgba(126, 188, 18, 0.3);
    }

    .mega-text {
        display: flex;
        flex-direction: column;
    }

    .mega-title {
        font-family: 'Tomorrow', sans-serif;
        font-size: 16px;
        font-weight: 700;
        color: var(--dark-color);
        margin-bottom: 2px;
    }

    .mega-desc {
        font-family: 'Tomorrow', sans-serif;
        font-size: 12px;
        color: #889097;
    }

    /* Right Column: Visual/Promo */
    .mega-menu-promo {
        width: 280px;
        background-color: var(--primary-color);
        background-size: cover;
        background-position: center;
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: center;
        /* Changed from flex-end to center */
        padding: 20px 30px;
        /* Reduced padding */
        color: #ffffff;
    }

    .mega-menu-promo.domain-promo {
        background: linear-gradient(135deg, #1d2833 0%, #2a3b4c 100%);
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .mega-promo-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to bottom, rgba(126, 188, 18, 0.7), rgba(29, 40, 51, 0.9));
        z-index: 1;
    }

    .mega-promo-content {
        position: relative;
        z-index: 2;
    }

    .mega-promo-content h4 {
        font-family: 'Tomorrow', sans-serif;
        font-size: 24px;
        font-weight: 700;
        margin-bottom: 10px;
        color: #ffffff;
    }

    .mega-promo-content p {
        font-family: 'Tomorrow', sans-serif;
        font-size: 14px;
        opacity: 0.9;
        margin-bottom: 20px;
        line-height: 1.5;
    }

    .btn-mega-promo {
        display: inline-block;
        padding: 8px 20px;
        background: #ffffff;
        color: var(--primary-color);
        border-radius: 4px;
        font-size: 13px;
        font-weight: 700;
        text-transform: uppercase;
        text-decoration: none !important;
        transition: all 0.3s ease;
    }

    .btn-mega-promo:hover {
        background: var(--dark-color);
        color: #ffffff;
    }

    .feature-icon-large {
        font-size: 40px;
        margin-bottom: 20px;
        color: var(--primary-color);
    }
}

/* Mobile Adjustments for Mega Menu - Clean List Style (Green Line Left) */
@media (max-width: 991px) {
    .dropdown-menu.mega-menu-wrapper {
        background: transparent !important;
        box-shadow: none !important;
        padding: 0 !important;
        border: none !important;
        margin: 0 !important;
        display: none;
        /* Managed by .in class */
        opacity: 1 !important;
        visibility: visible !important;
    }

    .dropdown.open>.dropdown-menu.mega-menu-wrapper {
        display: block !important;
    }

    .mega-menu-links {
        padding: 10px 0 10px 25px !important;
        border-left: 2px solid var(--primary-color) !important;
        margin-left: 35px !important;
        gap: 20px !important;
        display: flex;
        flex-direction: column;
    }

    .mega-link-item {
        padding: 0 !important;
        display: block !important;
        text-decoration: none !important;
        background: transparent !important;
        border: none !important;
    }

    .mega-icon,
    .mega-desc,
    .mega-menu-promo {
        display: none !important;
    }

    .mega-title {
        font-family: 'Tomorrow', sans-serif;
        font-size: 15px !important;
        text-transform: uppercase !important;
        color: #777 !important;
        font-weight: 500 !important;
        letter-spacing: 0.5px;
    }

    .mega-link-item:hover .mega-title {
        color: var(--primary-color) !important;
    }
}