/* Team Expertise Spotlight Card Styles - Optimized for Performance */
.expertise-card {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 30px 0 30px 30px;
    padding: 2.5rem 2rem 4rem 2rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: visible; /* Changed from hidden to ensure hover area */
    min-height: 480px;
    height: 100%;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    will-change: transform;
    transform: translateZ(0); /* Force hardware acceleration */
    z-index: 1;
}

/* Color Variables for Different Cards */
.expertise-card[data-spotlight-color="#3b82f6"] {
    --card-color: #3b82f6;
}

.expertise-card[data-spotlight-color="#8b5cf6"] {
    --card-color: #8b5cf6;
}

.expertise-card[data-spotlight-color="#10b981"] {
    --card-color: #10b981;
}

.expertise-card[data-spotlight-color="#f59e0b"] {
    --card-color: #f59e0b;
}

.expertise-card[data-spotlight-color="#ef4444"] {
    --card-color: #ef4444;
}

.expertise-card[data-spotlight-color="#6366f1"] {
    --card-color: #6366f1;
}

/* Curved colored base */
.expertise-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--card-color, #4f46e5);
    border-radius: 0 0 30px 30px;
    clip-path: ellipse(100% 100% at 50% 100%);
}

/* Circular badge with number */
.expertise-card::before {
    content: attr(data-number);
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: white;
    border: 4px solid var(--card-color, #4f46e5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--card-color, #4f46e5);
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Enhanced Badge Hover Effects */
.spotlight-card:hover .expertise-card::before {
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: translateX(-50%) scale(1);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: translateX(-50%) scale(1.05);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    }
}

/* Optimized Spotlight Card with Hardware Acceleration */
.spotlight-card {
    position: relative;
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px) translateZ(0);
    animation: cardSlideIn 0.6s ease-out forwards;
    will-change: transform, opacity;
}

.spotlight-card:nth-child(1) { animation-delay: 0.05s; }
.spotlight-card:nth-child(2) { animation-delay: 0.1s; }
.spotlight-card:nth-child(3) { animation-delay: 0.15s; }
.spotlight-card:nth-child(4) { animation-delay: 0.2s; }
.spotlight-card:nth-child(5) { animation-delay: 0.25s; }
.spotlight-card:nth-child(6) { animation-delay: 0.3s; }

/* Enhanced Color-Coded Spotlight Overlay */
.card-spotlight-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(300px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
                               rgba(59, 130, 246, 0.12), 
                               transparent 70%);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    border-radius: 30px 0 30px 30px;
    z-index: 3;
    will-change: opacity;
}

/* Color-specific spotlight effects for each card */
.spotlight-card[data-spotlight-color="#3b82f6"]:hover .card-spotlight-overlay {
    background: radial-gradient(350px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
                               rgba(59, 130, 246, 0.18), 
                               rgba(59, 130, 246, 0.08) 50%,
                               transparent 75%);
}

.spotlight-card[data-spotlight-color="#8b5cf6"]:hover .card-spotlight-overlay {
    background: radial-gradient(350px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
                               rgba(139, 92, 246, 0.18), 
                               rgba(139, 92, 246, 0.08) 50%,
                               transparent 75%);
}

.spotlight-card[data-spotlight-color="#10b981"]:hover .card-spotlight-overlay {
    background: radial-gradient(350px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
                               rgba(16, 185, 129, 0.18), 
                               rgba(16, 185, 129, 0.08) 50%,
                               transparent 75%);
}

.spotlight-card[data-spotlight-color="#f59e0b"]:hover .card-spotlight-overlay {
    background: radial-gradient(350px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
                               rgba(245, 158, 11, 0.18), 
                               rgba(245, 158, 11, 0.08) 50%,
                               transparent 75%);
}

.spotlight-card[data-spotlight-color="#ef4444"]:hover .card-spotlight-overlay {
    background: radial-gradient(350px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
                               rgba(239, 68, 68, 0.18), 
                               rgba(239, 68, 68, 0.08) 50%,
                               transparent 75%);
}

.spotlight-card[data-spotlight-color="#6366f1"]:hover .card-spotlight-overlay {
    background: radial-gradient(350px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
                               rgba(99, 102, 241, 0.18), 
                               rgba(99, 102, 241, 0.08) 50%,
                               transparent 75%);
}

.spotlight-card:hover .card-spotlight-overlay {
    opacity: 1;
}

.card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Optimized Icon with Hardware Acceleration */
.expertise-icon {
    width: 90px;
    height: 90px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, var(--card-color, #3b82f6), var(--card-color, #8b5cf6));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
    will-change: transform;
    transform: translateZ(0);
}

.spotlight-card:hover .expertise-icon {
    transform: translateY(-8px) scale(1.15);
    box-shadow: 0 25px 50px rgba(59, 130, 246, 0.5);
}

.expertise-card h5 {
    color: #1f2937;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    text-align: center;
    line-height: 1.3;
}

.expertise-card p {
    color: #6b7280;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    text-align: center;
    line-height: 1.6;
    font-weight: 400;
}

.expertise-features {
    margin-top: auto;
    padding-top: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    text-align: left;
    padding: 0.5rem 0;
}

.feature-item i {
    color: var(--card-color, #3b82f6);
    font-size: 1rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.feature-item span {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.6;
    font-weight: 400;
}

/* All hover effects are now color-specific above */

/* Enhanced Card Hover Effects with Color-Coded Glow */
.spotlight-card:hover {
    transform: translateY(-10px) translateZ(0);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25);
}

/* Color-specific glow effects for each card */
.spotlight-card[data-spotlight-color="#3b82f6"]:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25), 
                0 0 40px rgba(59, 130, 246, 0.3),
                0 0 80px rgba(59, 130, 246, 0.1);
}

.spotlight-card[data-spotlight-color="#8b5cf6"]:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25), 
                0 0 40px rgba(139, 92, 246, 0.3),
                0 0 80px rgba(139, 92, 246, 0.1);
}

.spotlight-card[data-spotlight-color="#10b981"]:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25), 
                0 0 40px rgba(16, 185, 129, 0.3),
                0 0 80px rgba(16, 185, 129, 0.1);
}

.spotlight-card[data-spotlight-color="#f59e0b"]:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25), 
                0 0 40px rgba(245, 158, 11, 0.3),
                0 0 80px rgba(245, 158, 11, 0.1);
}

.spotlight-card[data-spotlight-color="#ef4444"]:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25), 
                0 0 40px rgba(239, 68, 68, 0.3),
                0 0 80px rgba(239, 68, 68, 0.1);
}

.spotlight-card[data-spotlight-color="#6366f1"]:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25), 
                0 0 40px rgba(99, 102, 241, 0.3),
                0 0 80px rgba(99, 102, 241, 0.1);
}

/* Enhanced Icon Hover Effects with Color-Coded Shadows */
.spotlight-card:hover .expertise-icon {
    transform: translateY(-6px) scale(1.12) translateZ(0);
}

/* Color-specific icon shadows for each card */
.spotlight-card[data-spotlight-color="#3b82f6"]:hover .expertise-icon {
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.4), 
                0 0 30px rgba(59, 130, 246, 0.3);
}

.spotlight-card[data-spotlight-color="#8b5cf6"]:hover .expertise-icon {
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.4), 
                0 0 30px rgba(139, 92, 246, 0.3);
}

.spotlight-card[data-spotlight-color="#10b981"]:hover .expertise-icon {
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.4), 
                0 0 30px rgba(16, 185, 129, 0.3);
}

.spotlight-card[data-spotlight-color="#f59e0b"]:hover .expertise-icon {
    box-shadow: 0 20px 40px rgba(245, 158, 11, 0.4), 
                0 0 30px rgba(245, 158, 11, 0.3);
}

.spotlight-card[data-spotlight-color="#ef4444"]:hover .expertise-icon {
    box-shadow: 0 20px 40px rgba(239, 68, 68, 0.4), 
                0 0 30px rgba(239, 68, 68, 0.3);
}

.spotlight-card[data-spotlight-color="#6366f1"]:hover .expertise-icon {
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.4), 
                0 0 30px rgba(99, 102, 241, 0.3);
}

/* Enhanced Color-Coded Particles Effect */
.spotlight-card .card-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 30px 0 30px 30px;
    z-index: 1;
    will-change: transform, opacity;
    animation: particleFloat 25s linear infinite;
}

/* Color-specific particle effects for each card */
.spotlight-card[data-spotlight-color="#3b82f6"] .card-content::before {
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.12) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(29, 78, 216, 0.12) 1px, transparent 1px),
        radial-gradient(circle at 50% 10%, rgba(59, 130, 246, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 10% 60%, rgba(37, 99, 235, 0.1) 1px, transparent 1px);
    background-size: 60px 60px, 45px 45px, 70px 70px, 55px 55px;
}

.spotlight-card[data-spotlight-color="#8b5cf6"] .card-content::before {
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(139, 92, 246, 0.12) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(124, 58, 237, 0.12) 1px, transparent 1px),
        radial-gradient(circle at 50% 10%, rgba(139, 92, 246, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 10% 60%, rgba(109, 40, 217, 0.1) 1px, transparent 1px);
    background-size: 60px 60px, 45px 45px, 70px 70px, 55px 55px;
}

.spotlight-card[data-spotlight-color="#10b981"] .card-content::before {
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(16, 185, 129, 0.12) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(5, 150, 105, 0.12) 1px, transparent 1px),
        radial-gradient(circle at 50% 10%, rgba(16, 185, 129, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 10% 60%, rgba(4, 120, 87, 0.1) 1px, transparent 1px);
    background-size: 60px 60px, 45px 45px, 70px 70px, 55px 55px;
}

.spotlight-card[data-spotlight-color="#f59e0b"] .card-content::before {
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(245, 158, 11, 0.12) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(217, 119, 6, 0.12) 1px, transparent 1px),
        radial-gradient(circle at 50% 10%, rgba(245, 158, 11, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 10% 60%, rgba(180, 83, 9, 0.1) 1px, transparent 1px);
    background-size: 60px 60px, 45px 45px, 70px 70px, 55px 55px;
}

.spotlight-card[data-spotlight-color="#ef4444"] .card-content::before {
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(239, 68, 68, 0.12) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(220, 38, 38, 0.12) 1px, transparent 1px),
        radial-gradient(circle at 50% 10%, rgba(239, 68, 68, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 10% 60%, rgba(185, 28, 28, 0.1) 1px, transparent 1px);
    background-size: 60px 60px, 45px 45px, 70px 70px, 55px 55px;
}

.spotlight-card[data-spotlight-color="#6366f1"] .card-content::before {
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.12) 1px, transparent 1px),
        radial-gradient(circle at 80% 80%, rgba(79, 70, 229, 0.12) 1px, transparent 1px),
        radial-gradient(circle at 50% 10%, rgba(99, 102, 241, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 10% 60%, rgba(67, 56, 202, 0.1) 1px, transparent 1px);
    background-size: 60px 60px, 45px 45px, 70px 70px, 55px 55px;
}

.spotlight-card:hover .card-content::before {
    opacity: 1;
}

/* Optimized Animation Keyframes */
@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) translateZ(0);
    }
    to {
        opacity: 1;
        transform: translateY(0) translateZ(0);
    }
}

/* Enhanced Particle Animation with More Dynamic Movement */
@keyframes particleFloat {
    0% {
        background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%;
        transform: rotate(0deg);
    }
    25% {
        background-position: 25% 25%, -25% 25%, 15% -15%, 35% 15%;
        transform: rotate(0.5deg);
    }
    50% {
        background-position: 50% 50%, -50% 50%, 30% -30%, 70% 30%;
        transform: rotate(0deg);
    }
    75% {
        background-position: 75% 75%, -75% 75%, 45% -45%, 105% 45%;
        transform: rotate(-0.5deg);
    }
    100% {
        background-position: 100% 100%, -100% 100%, 60% -60%, 140% 60%;
        transform: rotate(0deg);
    }
}

/* Removed Heavy Animations - Keep Simple Effects Only */

/* Performance Optimizations for Mobile */
@media (max-width: 768px) {
    .expertise-card {
        min-height: 420px;
        padding: 2rem 1.5rem 3.5rem 1.5rem;
    }
    
    .expertise-card::before {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        bottom: -15px;
    }
    
    .expertise-card::after {
        height: 60px;
    }
    
    .expertise-icon {
        width: 70px;
        height: 70px;
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .expertise-card h5 {
        font-size: 1.5rem;
    }
    
    .expertise-card p {
        font-size: 1rem;
    }
    
    #bi-team-expertise {
        padding: 80px 0;
    }
    
    #bi-team-expertise .bi-section-title-2 h2 {
        font-size: 2.5rem;
    }
    
    /* Simplified effects on mobile for better performance */
    .spotlight-card .card-content::before {
        display: none;
    }
    
    .spotlight-card:hover {
        transform: translateY(-4px) translateZ(0);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    }
    
    .spotlight-card:hover .expertise-icon {
        transform: translateY(-2px) scale(1.05) translateZ(0);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    }
    
    /* Disable badge pulse on mobile */
    .spotlight-card:hover .expertise-card::before {
        animation: none;
    }
}

@media (max-width: 480px) {
    .expertise-card {
        min-height: 380px;
        padding: 1.5rem 1rem 3rem 1rem;
    }
    
    .expertise-card::before {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        bottom: -12px;
    }
    
    .expertise-card::after {
        height: 50px;
    }
    
    .expertise-icon {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }
    
    .expertise-card h5 {
        font-size: 1.3rem;
    }
}

/* Dark theme optimization */
@media (prefers-color-scheme: dark) {
    .expertise-card {
        background: rgba(30, 30, 30, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .expertise-card h5 {
        color: #f9fafb;
    }
    
    .expertise-card p {
        color: #d1d5db;
    }
    
    .feature-item span {
        color: #9ca3af;
    }
}

@supports not (backdrop-filter: blur(15px)) {
    .expertise-card {
        background: rgba(255, 255, 255, 0.98);
        border-color: rgba(0, 0, 0, 0.08);
    }
}

/* Enhanced Reduced Motion and Performance Settings */
@media (prefers-reduced-motion: reduce) {
    .spotlight-card,
    .expertise-icon,
    .card-spotlight-overlay,
    .spotlight-card .card-content::before {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
    
    .spotlight-card:hover {
        transform: none !important;
    }
    
    .spotlight-card:hover .expertise-icon {
        transform: none !important;
    }
}

/* Force GPU acceleration for supported browsers */
@supports (transform: translateZ(0)) {
    .spotlight-card,
    .expertise-icon,
    .card-spotlight-overlay {
        transform: translateZ(0);
        backface-visibility: hidden;
        perspective: 1000px;
    }
}

/* Ensure Full Card Hover Area - Especially for DevOps Card */
.spotlight-card {
    position: relative;
    cursor: pointer;
    opacity: 0;
    transform: translateY(30px) translateZ(0);
    animation: cardSlideIn 0.6s ease-out forwards;
    will-change: transform, opacity;
}

.spotlight-card:nth-child(1) { animation-delay: 0.05s; }
.spotlight-card:nth-child(2) { animation-delay: 0.1s; }
.spotlight-card:nth-child(3) { animation-delay: 0.15s; }
.spotlight-card:nth-child(4) { animation-delay: 0.2s; }
.spotlight-card:nth-child(5) { animation-delay: 0.25s; }
.spotlight-card:nth-child(6) { animation-delay: 0.3s; }

/* Force hover effects on entire card area including all child elements */
.spotlight-card,
.spotlight-card .card-content,
.spotlight-card .expertise-features,
.spotlight-card .feature-item {
    pointer-events: auto;
}

/* Ensure DevOps card hover effects trigger on entire card */
.spotlight-card[data-spotlight-color="#f59e0b"]:hover,
.spotlight-card[data-spotlight-color="#f59e0b"]:hover .card-content,
.spotlight-card[data-spotlight-color="#f59e0b"] .card-content:hover,
.spotlight-card[data-spotlight-color="#f59e0b"] .expertise-features:hover,
.spotlight-card[data-spotlight-color="#f59e0b"] .feature-item:hover {
    /* DevOps card area is hoverable */
    cursor: pointer;
}

.spotlight-card[data-spotlight-color="#f59e0b"]:hover .card-spotlight-overlay,
.spotlight-card[data-spotlight-color="#f59e0b"] .card-content:hover ~ .card-spotlight-overlay,
.spotlight-card[data-spotlight-color="#f59e0b"] .expertise-features:hover ~ .card-spotlight-overlay {
    opacity: 1;
    background: radial-gradient(350px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
                               rgba(245, 158, 11, 0.18), 
                               rgba(245, 158, 11, 0.08) 50%,
                               transparent 75%);
}

.spotlight-card[data-spotlight-color="#f59e0b"]:hover .card-content::before,
.spotlight-card[data-spotlight-color="#f59e0b"] .card-content:hover::before,
.spotlight-card[data-spotlight-color="#f59e0b"] .expertise-features:hover .card-content::before {
    opacity: 1;
}

/* Enhanced Hover State Management with JavaScript Class */
.spotlight-card.is-hovered .card-spotlight-overlay {
    opacity: 1;
}

.spotlight-card.is-hovered .card-content::before {
    opacity: 1;
}

/* DevOps Card Specific Hover Enhancement */
.spotlight-card[data-spotlight-color="#f59e0b"].is-hovered {
    transform: translateY(-10px) translateZ(0);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.25), 
                0 0 40px rgba(245, 158, 11, 0.3),
                0 0 80px rgba(245, 158, 11, 0.1);
}

.spotlight-card[data-spotlight-color="#f59e0b"].is-hovered .card-spotlight-overlay {
    background: radial-gradient(350px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), 
                               rgba(245, 158, 11, 0.18), 
                               rgba(245, 158, 11, 0.08) 50%,
                               transparent 75%);
}

.spotlight-card[data-spotlight-color="#f59e0b"].is-hovered .expertise-icon {
    transform: translateY(-6px) scale(1.12) translateZ(0);
    box-shadow: 0 20px 40px rgba(245, 158, 11, 0.4), 
                0 0 30px rgba(245, 158, 11, 0.3);
}
