/* 
 * dropdown-menu.css
 * Enhanced styles with section divider and colorful icons
 */

 .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.overlay.active {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.mega-menu {
    position: absolute;
    top: 64px; /* Height of the header */
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    width: auto;
    max-width: 1000px; /* Adjust this value to your preference */
    min-width: 800px;
    background-color: #FFFFFF;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* Shadow lg */
    z-index: 999 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
    border-radius: 8px;
}

.mega-menu.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%) translateY(0) !important;
    display: block !important;
}

.mega-menu-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    width: 100%;
    padding: 2rem;
    position: relative; /* For absolute positioned divider */
}

/* Add vertical divider between sections */
.mega-menu-container::after {
    content: '';
    position: absolute;
    top: 25%; /* Start at 25% from the top */
    bottom: 25%; /* End at 25% from the bottom (so 50% height total) */
    left: 33%; /* Position at the grid split */
    width: 1px;
    background: linear-gradient(to bottom, transparent, #E5E7EB 20%, #E5E7EB 80%, transparent);
}

.mega-menu-section {
    padding: 1rem;
}

.mega-menu-heading {
    font-size: 1.25rem;
    font-weight: 500;
    color: #111827;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

/* Add a subtle underline to section headings */
.mega-menu-heading:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #4A0DFF, #7444FF);
    border-radius: 2px;
}

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

.mega-menu-item {
    margin-bottom: 0.75rem;
}

.mega-menu-link {
    display: flex;
    align-items: center;
    color: #374151;
    font-weight: 400;
    transition: color 0.3s ease;
    padding: 0.75rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.mega-menu-link:hover {
    color: #4A0DFF;
    background-color: #F8F9FF;
    transform: translateX(3px);
}

/* Icon backgrounds - varied colors that match the theme */
.mega-menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    margin-right: 0.75rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

/* AI icon - purple */
.mega-menu-item:nth-child(1) .mega-menu-icon {
    background-color: #F3F0FF;
}
.mega-menu-item:nth-child(1) .mega-menu-icon svg {
    color: #4A0DFF;
}

/* Integrations icon - blue */
.mega-menu-item:nth-child(2) .mega-menu-icon {
    background-color: #EFF6FF;
}
.mega-menu-item:nth-child(2) .mega-menu-icon svg {
    color: #3B82F6;
}

/* Rapid Learning icon - pink */
.mega-menu-item:nth-child(3) .mega-menu-icon {
    background-color: #FDF2F8;
}
.mega-menu-item:nth-child(3) .mega-menu-icon svg {
    color: #EC4899;
}

/* Core Features icon - teal */
.mega-menu-item:nth-child(4) .mega-menu-icon {
    background-color: #F0FDFA;
}
.mega-menu-item:nth-child(4) .mega-menu-icon svg {
    color: #14B8A6;
}

/* Insights icon - orange */
.mega-menu-item:nth-child(5) .mega-menu-icon {
    background-color: #FFF7ED;
}
.mega-menu-item:nth-child(5) .mega-menu-icon svg {
    color: #F59E0B;
}

/* Infrastructure icon - indigo */
.mega-menu-item:nth-child(6) .mega-menu-icon {
    background-color: #EEF2FF;
}
.mega-menu-item:nth-child(6) .mega-menu-icon svg {
    color: #6366F1;
}

.mega-menu-link:hover .mega-menu-icon {
    transform: scale(1.1);
}

.mega-menu-icon svg {
    width: 20px;
    height: 20px;
}

.mega-menu-text {
    flex: 1;
}

.mega-menu-title {
    font-weight: 500;
    margin-bottom: 2px;
}

.mega-menu-description {
    font-size: 0.875rem;
    color: #6B7280;
}

.mega-menu-subsection {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.mega-menu-subsection-title {
    font-size: 1.125rem;
    font-weight: 500;
    color: #1F2937;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    padding-left: 0.75rem;
}

/* Subsection icons with unique colors */
.mega-menu-subsection:nth-child(2) .mega-menu-subsection-title svg {
    color: #4A0DFF; /* Purple for Garth Platform */
}

.mega-menu-subsection:nth-child(3) .mega-menu-subsection-title svg {
    color: #06B6D4; /* Cyan for Agents */
}

.mega-menu-subsection-title svg {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
}

.mega-menu-subsection-description {
    font-size: 0.875rem;
    color: #4B5563;
    margin-bottom: 1rem;
    padding-left: 2.75rem;
}

/* Product items with consistent hover but varied icon colors */
.mega-menu-product {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
}

.mega-menu-product:hover {
    background-color: #F8F9FF;
    transform: translateX(3px);
}

/* Workspace product - gradient from purple to blue */
.mega-menu-subsection:nth-child(2) .mega-menu-product:nth-child(3) .mega-menu-product-icon {
    background: linear-gradient(135deg, #4A0DFF, #3B82F6);
}

/* Assistant product - gradient from purple to pink */
.mega-menu-subsection:nth-child(2) .mega-menu-product:nth-child(4) .mega-menu-product-icon {
    background: linear-gradient(135deg, #4A0DFF, #F01DE9);
}

/* PR Review Agent - gradient from cyan to blue */
.mega-menu-subsection:nth-child(3) .mega-menu-product:nth-child(3) .mega-menu-product-icon {
    background: linear-gradient(135deg, #06B6D4, #3B82F6);
}

/* PR Code Agent - gradient from cyan to green */
.mega-menu-subsection:nth-child(3) .mega-menu-product:nth-child(4) .mega-menu-product-icon {
    background: linear-gradient(135deg, #06B6D4, #10B981);
}

.mega-menu-product-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    margin-right: 0.75rem;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.mega-menu-product:hover .mega-menu-product-icon {
    transform: scale(1.1);
}

.mega-menu-product-icon svg {
    width: 24px;
    height: 24px;
    color: #FFFFFF;
}

.mega-menu-product-content {
    flex: 1;
}

.mega-menu-product-title {
    font-weight: 500;
    margin-bottom: 2px;
}

.mega-menu-product-description {
    font-size: 0.875rem;
    color: #4B5563;
}

/* Ensure header has proper z-index */
header, 
.sticky-nav {
    position: relative;
    z-index: 1000 !important;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 850px) {
    .mega-menu {
        min-width: 90vw;
        left: 5vw;
        transform: translateX(0) translateY(-10px);
    }
    
    .mega-menu.active {
        transform: translateX(0) translateY(0) !important;
    }
    
    .mega-menu-container::after {
        left: 35%; /* Adjust divider position for smaller screens */
    }
}