/* === Services Mega Menu === */

/* Styling for the content inside the links */
.menu-item-content {
    display: flex;
    align-items: flex-start;
    gap: 16.9% 8.55%;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.menu-item-content:hover {
    background-color: #f9f9f9;
}

/* Icon styling */
.menu-icon {
    background-color: #eafbf3;
    color: #009d61;
    padding: 10px;
    border-radius: 12px;
    /* Soft square/circle */
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

/* Text container */
.menu-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    /* Override inherited center alignment */
    align-items: flex-start;
    /* Ensure flex items align left */
}

.menu-title {
    font-weight: 700;
    font-size: 15px;
    color: #1a1919;
    margin-bottom: 4px;
}

.menu-desc {
    font-size: 13px;
    color: #666;
    font-weight: 400;
    line-height: 1.4;
    white-space: normal;
    /* Allow wrapping */
}

/* Hover state for title */
.nav-menu li a:hover .menu-title {
    color: #009d61;
}

/* Desktop Specific Styles for Grid Layout */
@media (min-width: 769px) {

    /* Default state: inherit from dropdown-menu (hidden) */
    .services-mega-menu {
        width: 850px !important;
        /* Do not force display: grid here, otherwise it overrides display: none */
        /* Force grid over block */
        grid-template-columns: repeat(3,1fr);
        gap: 35px;
        padding: 24px !important;
        border-radius: 16px;

        /* Center styling relative to parent if needed, or just left aligned */
        left: -150% !important;
        transform: translateX(-25%);
        /* Shift slightly left */
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
        border: none !important;
    }

    /* Only apply grid when the dropdown is OPEN */
    .dropdown.open>.services-mega-menu {
        display: grid !important;
        top: 80px;
    }

    /* Remove default list padding/margin issues if any */
    .services-mega-menu li {
        padding: 0 !important;
        /* Reset padding from default dropdown */
        width: 100%;
    }

    .services-mega-menu li a {
        text-align: left;
        display: block;
        width: 100%;
    }

    /* Business Mega Menu Styles */
    .business-mega-menu {
        width: 380px !important;
        gap: 16px;
        padding: 24px !important;
        border-radius: 16px;
        left: 50% !important;
        transform: translateX(-50%);
        /* Centered */
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
        border: none !important;
    }

    .dropdown.open>.business-mega-menu {
        display: grid !important;
        top: 80px;
        grid-template-columns: 1fr;
        /* Stacked layout */
    }

    .business-mega-menu li {
        padding: 0 !important;
        width: 100%;
    }

    .business-mega-menu li a {
        text-align: left;
        display: block;
        width: 100%;
    }

    /* About Mega Menu Styles */
    .about-mega-menu {
        width: 220px !important;
        padding: 16px !important;
        border-radius: 16px;
        left: 50% !important;
        transform: translateX(-50%);
        /* Centered */
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
        border: none !important;
        display: none;
        /* Ensure it is hidden by default */
        /* Flex col instead of grid for simple list */
        flex-direction: column;
        gap: 8px;
    }

    .dropdown.open>.about-mega-menu {
        display: flex !important;
        top: 80px;
    }

    .about-mega-menu li {
        padding: 0 !important;
        width: 100%;
    }

    .about-mega-menu li a {
        text-align: left;
        display: block;
        width: 100%;
        padding: 10px 16px;
        color: #1a1919;
        font-weight: 500;
        font-size: 15px;
        border-radius: 8px;
        transition: background-color 0.2s;
    }

    .about-mega-menu li a:hover {
        background-color: #f9f9f9;
        color: #009d61;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {

    .menu-item-content {
        align-items: center;
        padding: 0;
        gap: 14px;
    }
    .menu-item-content img{
        width: 40px;
    }
    .dropdown.open>.dropdown-menu{
        padding: 0;
    }
    .menu-icon {
        width: 36px;
        height: 36px;
        font-size: 20px;
        padding: 8px;
    }
}