/* ===================================
   FLOWSILY - MEGA MENU SYSTEM
   Monday.com Style Navigation
   =================================== */

/* ===================================
   MEGA MENU STRUCTURE
   =================================== */

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

.nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: var(--transition-base);
    border-radius: var(--radius-sm);
}

.nav-link:hover {
    color: var(--primary-purple);
    background: var(--bg-secondary);
}

.nav-link.active {
    color: var(--primary-purple);
}

/* Dropdown Arrow */
.nav-arrow {
    font-size: 12px;
    transition: var(--transition-base);
}

.nav-item:hover .nav-arrow {
    transform: rotate(180deg);
}

/* ===================================
   MEGA MENU DROPDOWN - MONDAY.COM EXACT
   =================================== */

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    border: 1px solid var(--border-light);
    padding: 24px 32px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    min-width: 750px;
}

.nav-item:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    margin-top: 4px;
}

/* Mega Menu Grid Layouts - Compact */
.mega-menu-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
}

.mega-menu-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.mega-menu-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* Mega Menu Column */
.mega-menu-column {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Mega Menu Column Header - Compact */
.mega-menu-header {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #9699A6;
    margin-bottom: 12px;
    padding-bottom: 0;
    border-bottom: none;
}

/* Mega Menu Items - Compact */
.mega-menu-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    transition: var(--transition-fast);
}

.mega-menu-item:hover {
    background: #F6F7FB;
}

/* Menu Item Icon - Smaller */
.mega-menu-icon {
    font-size: 18px;
    color: var(--primary-purple);
    flex-shrink: 0;
    margin-top: 1px;
}

/* Menu Item Content - Compact */
.mega-menu-content {
    flex: 1;
}

.mega-menu-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
    line-height: 1.3;
}

.mega-menu-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Mega Menu Showcase (Right Side Visual) - Compact */
.mega-menu-showcase {
    background: linear-gradient(135deg, var(--bg-purple-light) 0%, var(--bg-pink-light) 100%);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px dashed var(--border-light);
}

.mega-menu-showcase-image {
    width: 100%;
    height: 120px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 36px;
    color: var(--primary-purple);
    opacity: 0.3;
}

.mega-menu-showcase-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.3;
}

.mega-menu-showcase-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-purple);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    transition: var(--transition-base);
}

.mega-menu-showcase-link:hover {
    gap: 10px;
}

/* Mega Menu Footer - Compact */
.mega-menu-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    text-align: center;
}

.mega-menu-footer-link {
    color: var(--primary-purple);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-base);
}

.mega-menu-footer-link:hover {
    gap: 10px;
}

/* ===================================
   SIMPLE DROPDOWN (Single Column) - COMPACT
   =================================== */

.simple-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    border: 1px solid var(--border-light);
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1000;
    min-width: 260px;
}

.nav-item:hover .simple-dropdown {
    opacity: 1;
    visibility: visible;
    margin-top: 4px;
}

/* Simple Dropdown Sections */
.dropdown-section {
    margin-bottom: 20px;
}

.dropdown-section:last-child {
    margin-bottom: 0;
}

.dropdown-section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #9699A6;
    margin-bottom: 10px;
}

/* Simple Dropdown Items - Compact */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    text-decoration: none;
    transition: var(--transition-fast);
}

.dropdown-item:hover {
    background: #F6F7FB;
}

.dropdown-item-icon {
    font-size: 16px;
    color: var(--primary-purple);
}

.dropdown-item-content {
    flex: 1;
}

.dropdown-item-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: 2px;
    line-height: 1.3;
}

.dropdown-item-desc {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
    line-height: 1.3;
}

/* ===================================
   MOBILE MEGA MENU
   =================================== */

@media (max-width: 1024px) {
    .mega-menu,
    .simple-dropdown {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        margin-top: 0;
        min-width: 100%;
        box-shadow: none;
        border: none;
        border-top: 1px solid var(--border-light);
        border-radius: 0;
        padding: 16px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .nav-item.active .mega-menu,
    .nav-item.active .simple-dropdown {
        max-height: 2000px;
    }
    
    .mega-menu-grid-2,
    .mega-menu-grid-3,
    .mega-menu-grid-4 {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .mega-menu-showcase {
        display: none;
    }
    
    .nav-arrow {
        margin-left: auto;
    }
    
    .nav-item.active .nav-arrow {
        transform: rotate(180deg);
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.menu-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-left: 8px;
}

.menu-badge-new {
    background: var(--accent-green);
    color: white;
}

.menu-badge-popular {
    background: var(--accent-orange);
    color: white;
}

.menu-badge-free {
    background: var(--secondary-blue);
    color: white;
}

/* Divider in Mega Menu */
.mega-menu-divider {
    width: 1px;
    background: var(--border-light);
    margin: 0 24px;
}

/* Special Highlighted Item */
.mega-menu-item-highlighted {
    background: var(--bg-purple-light);
    border: 1px solid var(--primary-purple);
}

.mega-menu-item-highlighted:hover {
    background: var(--bg-purple-light);
    border-color: var(--primary-purple-dark);
}