/* ============================================
   AI TOOLS SECTION STYLES - MIGRATIVE PARTNERS
   Grid Layout, Tool Cards, Badges, Hover Effects
   ============================================ */

/* AI Tools Section */
.ai-tools-section {
    padding: var(--spacing-2xl) 0;
    background: var(--bg-primary);
    position: relative;
    border-top: 1px solid rgba(0, 255, 170, 0.05);
}

.ai-tools-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--spacing-3xl);
    align-items: start;
}

/* Text Content */
.ai-tools-text {
    max-width: 500px;
}

.ai-tools-section h2 {
    font-size: clamp(var(--text-4xl), 6vw, var(--text-5xl));
    font-weight: var(--font-black);
    line-height: 1.1;
    letter-spacing: var(--tracking-tight);
    color: var(--white);
    margin-bottom: var(--spacing-lg);
    background: linear-gradient(
        180deg, 
        var(--white) 0%, 
        rgba(255, 255, 255, 0.9) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ai-tools-section h2 .accent {
    background: linear-gradient(
        90deg, 
        var(--neon-green) 0%, 
        #00FFD4 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ai-tools-description {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: var(--gray-light);
    margin-bottom: var(--spacing-xl);
    font-weight: var(--font-light);
}


/* AI Ecosystem Container - NEW BRUTALIST DESIGN */
.ai-ecosystem-new {
    position: relative;
    width: 100%;
    height: 500px;
    max-width: 800px;
    margin: 0 auto;
    background: transparent;
}

/* Central Dashboard */
.central-dashboard {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: block;
}

.dashboard-window {
    width: 200px;
    height: 140px;
    filter: drop-shadow(0 8px 25px rgba(0, 0, 0, 0.3));
}

/* Subtle Connection Lines */
.connection-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 1;
    pointer-events: none;
    display: block;
}

/* Remove duplicate - handled below */

.window-frame {
    width: 140px;
    height: 100px;
    background: #FFFFFF;
    border: 2px solid #000000;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 4px 4px 0px #000000;
}

.window-header {
    height: 24px;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border-bottom: 1px solid #000000;
}

.window-title {
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: bold;
    color: #FFFFFF;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.window-content {
    height: 74px;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.tool-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* Positioning for circular layout */
.tool-window.top-left {
    top: 20px;
    left: 120px;
}

.tool-window.top-right {
    top: 20px;
    right: 120px;
}

.tool-window.left {
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
}

.tool-window.right {
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

.tool-window.bottom-left {
    bottom: 20px;
    left: 120px;
}

.tool-window.bottom-right {
    bottom: 20px;
    right: 120px;
}

/* New AI Tools Positions for Desktop - Outer Ring */
.tool-window.new-top-left {
    top: 50px;
    left: 50px;
}

.tool-window.new-top-right {
    top: 50px;
    right: 50px;
}

.tool-window.new-bottom {
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
}

/* Hide mobile elements on desktop */
.tool-label,
.mobile-cascade-lines {
    display: none;
}

/* Desktop: tools-grid is invisible container, direct positioning */
.tools-grid {
    display: contents;
}

/* Desktop: Restore absolute positioning for tools */
.tool-window {
    position: absolute;
    z-index: 5;
    cursor: pointer;
    transition: all var(--transition-base);
    transform: none;
}

.tool-window:hover {
    transform: translateY(-2px);
    filter: drop-shadow(0 12px 30px rgba(0, 255, 170, 0.2));
}

/* Desktop: Show clean logo layout without window frames */
.window-frame {
    background: transparent;
    border: none;
    box-shadow: none;
    width: auto;
    height: auto;
}

.window-header {
    display: none;
}

.window-content {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    height: auto;
    padding: 0;
}

/* Desktop tool icons */
.tool-icon {
    width: 60px;
    height: 60px;
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-md);
    object-fit: contain;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all var(--transition-base);
    display: block;
}

.tool-window:hover .tool-icon {
    border-color: rgba(0, 255, 170, 0.4);
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 255, 170, 0.2);
}

/* Grid-like positioning inspired by hero background */
.ai-ecosystem::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(0, 255, 170, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 255, 170, 0.03) 0%, transparent 50%);
    z-index: 0;
}


/* Responsive - Tablet */
@media (max-width: 1024px) {
    .ai-tools-section {
        padding: var(--spacing-xl) 0;
    }
    
    .ai-tools-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-2xl);
        text-align: center;
    }
    
    .ai-tools-text {
        max-width: 100%;
    }
    
    .ai-ecosystem-new {
        height: 400px;
        max-width: 700px;
    }
    
    .window-frame {
        width: 120px;
        height: 85px;
    }
    
    .tool-icon {
        width: 35px;
        height: 35px;
    }
    
    .tool-logo {
        width: 64px;
        height: 64px;
    }
    
    .tool-label {
        font-size: 0.7rem;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .ai-tools-section {
        padding: var(--spacing-lg) 0;
    }
    
    .ai-tools-section h2 {
        font-size: clamp(var(--text-3xl), 8vw, var(--text-4xl));
        margin-bottom: var(--spacing-md);
    }
    
    .ai-tools-description {
        font-size: var(--text-lg);
        margin-bottom: var(--spacing-xl);
        line-height: 1.6;
        color: rgba(255, 255, 255, 0.9);
        font-weight: var(--font-normal);
    }
    
    .ai-tools-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        text-align: center;
    }
    
    /* MOBILE: Cascading layout with dashboard header */
    .ai-ecosystem-new {
        display: flex;
        flex-direction: column;
        gap: var(--spacing-lg);
        height: auto;
        max-width: 100%;
        padding: var(--spacing-md);
        background: transparent;
        position: relative;
    }
    
    .central-dashboard {
        display: flex;
        justify-content: center;
        order: -1;
        margin-bottom: var(--spacing-lg);
        position: relative;
        z-index: 10;
    }
    
    .dashboard-window {
        width: 160px;
        height: 112px;
    }
    
    .connection-lines {
        display: none !important;
    }
    
    /* Hide the SVG completely on mobile */
    .ai-ecosystem-new svg {
        display: none !important;
    }
    
    /* Hide central dashboard on mobile */
    .central-dashboard {
        display: none !important;
    }
    
    /* Hide mobile cascade lines animation */
    .mobile-cascade-lines {
        display: none !important;
    }
    
    /* Mobile cascading lines - REMOVED */
    
    .tools-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-md);
        position: relative;
        z-index: 5;
        max-width: 100%;
        width: 100%;
    }
    
    .mobile-cascade-lines {
        display: block !important;
    }
    
    .tool-window {
        position: static !important;
        transform: none !important;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-sm);
    }
    
    .tool-window:hover {
        transform: translateY(-2px) !important;
    }
    
    /* Mobile: Show window frames */
    .window-frame {
        width: 100% !important;
        height: 80px !important;
        background: #FFFFFF !important;
        border: 2px solid #000000 !important;
        box-shadow: 2px 2px 0px #000000 !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .window-header {
        height: 18px !important;
        background: #000000 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0 6px !important;
    }
    
    .window-title {
        font-size: 7px !important;
        font-weight: bold !important;
        color: #FFFFFF !important;
        text-transform: uppercase !important;
        display: block !important;
    }
    
    .window-content {
        flex: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background: #FFFFFF !important;
        padding: 6px !important;
        height: auto !important;
    }
    
    .tool-icon {
        width: 35px !important;
        height: 35px !important;
        object-fit: contain !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        border-radius: 0 !important;
    }
    
    .tool-label {
        display: none;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .ai-ecosystem-new {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
        padding: var(--spacing-sm);
    }
    
    .window-frame {
        height: 70px;
    }
    
    .window-header {
        height: 16px;
        padding: 0 4px;
    }
    
    .window-title {
        font-size: 6px;
    }
    
    .tool-icon {
        width: 30px;
        height: 30px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .tool-node {
        animation: none;
    }
    
    .tool-node:hover .tool-logo {
        transform: scale(1.05);
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .tool-logo {
        border-width: 2px;
    }
    
    .connection-lines {
        opacity: 0.8;
    }
    
    .ai-tools-section h2 {
        -webkit-text-stroke: 1px var(--white);
    }
}

/* Focus states for accessibility */
.tool-node:focus-visible {
    outline: 2px solid var(--neon-green);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}