/* ==================== AI TOOLS SECTION ==================== */

.hi-ai-tools-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 32px 40px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(56, 189, 248, 0.08));
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    margin-bottom: 32px;
}

.hi-ai-tools-header-content h2 {
    font-size: 28px;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 8px 0;
    background: linear-gradient(135deg, #a855f7, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hi-ai-tools-header-content p {
    font-size: 15px;
    line-height: 1.5;
    color: rgba(148, 163, 184, 0.9);
    margin: 0;
}

.hi-ai-tools-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 100px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(56, 189, 248, 0.15));
    border: 1px solid rgba(168, 85, 247, 0.3);
    color: rgba(168, 85, 247, 0.95);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    animation: pulse 3s ease-in-out infinite;
}

.hi-ai-tools-badge svg {
    width: 16px;
    height: 16px;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(168, 85, 247, 0);
    }
}

/* AI Tools Grid */
.hi-ai-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.hi-ai-tool-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 32px 32px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
    border: 1px solid rgba(148, 163, 184, 0.2);
    backdrop-filter: blur(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
}

.hi-ai-tool-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(56, 189, 248, 0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.hi-ai-tool-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(168, 85, 247, 0.4);
    box-shadow: 
        0 30px 80px rgba(168, 85, 247, 0.3),
        0 0 0 1px rgba(168, 85, 247, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hi-ai-tool-card:hover::before {
    opacity: 1;
}

/* AI Agent Animation */
.hi-ai-agent-animation {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 32px;
}

.hi-agent-orb {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    animation: pulse 2.5s ease-in-out infinite;
}

.hi-agent-orb--purple {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.4), rgba(139, 92, 246, 0.4));
    box-shadow: 
        0 0 40px rgba(168, 85, 247, 0.5),
        0 0 80px rgba(168, 85, 247, 0.3),
        inset 0 0 40px rgba(255, 255, 255, 0.1);
}

.hi-agent-orb--cyan {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.4), rgba(14, 165, 233, 0.4));
    box-shadow: 
        0 0 40px rgba(56, 189, 248, 0.5),
        0 0 80px rgba(56, 189, 248, 0.3),
        inset 0 0 40px rgba(255, 255, 255, 0.1);
}

.hi-agent-orb--amber {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.4), rgba(245, 158, 11, 0.4));
    box-shadow: 
        0 0 40px rgba(251, 191, 36, 0.5),
        0 0 80px rgba(251, 191, 36, 0.3),
        inset 0 0 40px rgba(255, 255, 255, 0.1);
}

.hi-agent-orb::before {
    content: '';
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    background: inherit;
    filter: blur(8px);
    animation: rotate 4s linear infinite;
}

.hi-agent-orb::after {
    content: '✨';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    animation: float 3s ease-in-out infinite;
}

.hi-agent-particles {
    position: absolute;
    inset: 0;
}

.hi-agent-particles span {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: orbit 3s linear infinite;
}

.hi-ai-tool-card:nth-child(1) .hi-agent-particles span {
    background: linear-gradient(135deg, #a855f7, #8b5cf6);
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.8);
}

.hi-ai-tool-card:nth-child(2) .hi-agent-particles span {
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.8);
}

.hi-ai-tool-card:nth-child(3) .hi-agent-particles span {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.8);
}

.hi-agent-particles span:nth-child(1) {
    top: 0;
    left: 50%;
    animation-delay: 0s;
}

.hi-agent-particles span:nth-child(2) {
    top: 25%;
    right: 0;
    animation-delay: 0.6s;
}

.hi-agent-particles span:nth-child(3) {
    bottom: 0;
    right: 25%;
    animation-delay: 1.2s;
}

.hi-agent-particles span:nth-child(4) {
    bottom: 25%;
    left: 0;
    animation-delay: 1.8s;
}

.hi-agent-particles span:nth-child(5) {
    top: 50%;
    left: 0;
    animation-delay: 2.4s;
}

.hi-ai-tool-card:hover .hi-agent-orb {
    animation: pulse 1.5s ease-in-out infinite;
}

.hi-ai-tool-card:hover .hi-agent-particles span {
    animation-duration: 2s;
}

.hi-ai-tool-content {
    flex: 1;
    text-align: center;
    margin-bottom: 28px;
}

.hi-ai-tool-content h3 {
    font-size: 22px;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 12px 0;
    line-height: 1.3;
    background: linear-gradient(135deg, #f8fafc, rgba(148, 163, 184, 0.9));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hi-ai-tool-content p {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(148, 163, 184, 0.85);
    margin: 0 0 20px 0;
}

.hi-ai-tool-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.hi-ai-feature-tag {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 100px;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: rgba(226, 232, 240, 0.9);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.hi-ai-tool-card:hover .hi-ai-feature-tag {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.3);
    color: rgba(168, 85, 247, 0.95);
    transform: translateY(-2px);
}

.hi-ai-tool-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, #a855f7, #38bdf8);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 24px rgba(168, 85, 247, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    position: relative;
    overflow: hidden;
}

.hi-ai-tool-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hi-ai-tool-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 40px rgba(168, 85, 247, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.hi-ai-tool-btn:hover::before {
    opacity: 1;
}

.hi-ai-tool-btn:active {
    transform: translateY(-1px);
}

.hi-ai-tool-btn svg {
    width: 18px;
    height: 18px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Highlight Portfolio Builder */
#ai-portfolio-builder {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(56, 189, 248, 0.12));
    border-color: rgba(168, 85, 247, 0.3);
}

#ai-portfolio-builder::before {
    opacity: 0.6;
}

@keyframes highlightPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.6);
        border-color: rgba(168, 85, 247, 0.3);
    }
    50% {
        box-shadow: 0 0 0 25px rgba(168, 85, 247, 0);
        border-color: rgba(168, 85, 247, 0.7);
    }
}

@keyframes orbit {
    0% {
        transform: rotate(0deg) translateX(50px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: rotate(360deg) translateX(50px) rotate(-360deg);
        opacity: 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .hi-ai-tools-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hi-ai-tools-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 24px;
    }
    
    .hi-ai-tools-header-content h2 {
        font-size: 24px;
    }
    
    .hi-ai-tool-card {
        padding: 40px 24px 24px;
    }
    
    .hi-ai-agent-animation {
        width: 80px;
        height: 80px;
    }
    
    .hi-agent-orb::after {
        font-size: 28px;
    }
    
    .hi-ai-tool-content h3 {
        font-size: 19px;
    }
    
    .hi-ai-tool-content p {
        font-size: 13px;
    }
}
