/**
 * Icon Fixes and Enhancements for Landing Page
 * Ensures proper display of icons and provides fallbacks
 */

/* Global icon visibility fixes */
i.fas, i.far, i.fab, i.fa {
    display: inline-block !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    line-height: 1 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure FontAwesome icons are properly loaded */
.fas::before, .far::before, .fab::before, .fa::before {
    font-family: "Font Awesome 5 Free", "Font Awesome 5 Pro", "Font Awesome 5 Brands" !important;
    font-weight: 900 !important;
}

/* Specific icon content for critical icons in case FontAwesome fails */
.fa-robot::before { content: "🤖"; }
.fa-brain::before { content: "🧠"; }
.fa-user-circle::before { content: "👤"; }
.fa-check-circle::before { content: "✓"; }
.fa-arrow-right::before { content: "→"; }
.fa-plus::before { content: "+"; }

/* Feature tag icons enhancement */
.feature-tag i {
    min-width: 16px;
    text-align: center;
    flex-shrink: 0;
}

/* Showcase specific icon improvements */
.showcase-image {
    position: relative;
    overflow: visible;
}

/* Ensure showcase icons are always visible */
.showcase-image .fas {
    font-size: 6rem !important;
    color: inherit !important;
    z-index: 10 !important;
    position: relative !important;
}

/* Icon loading fallback with CSS animations */
@keyframes iconLoad {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Apply loading animation to showcase icons */
.showcase-icon {
    animation: iconLoad 0.5s ease-out, glowPulse 3s infinite alternate 0.5s;
}

/* Capability card icon enhancements */
.agent-capability-icon i {
    font-size: 2.5rem !important;
    display: block !important;
    line-height: 1 !important;
}

/* Platform icons in social section */
.platform-icon {
    min-width: 3rem;
    text-align: center;
    display: block !important;
}

/* Language feature icons */
.language-feature i,
.platform-capability i,
.agent-capability-feature i {
    min-width: 14px;
    text-align: center;
    display: inline-block !important;
}

/* Emergency icon fallback styling */
.icon-emergency-fallback {
    display: inline-block;
    width: 1em;
    height: 1em;
    background: currentColor;
    border-radius: 50%;
    opacity: 0.7;
}

/* Media query for icon size adjustments on smaller screens */
@media (max-width: 768px) {
    .showcase-icon {
        font-size: 4rem !important;
    }
    
    .agent-capability-icon {
        font-size: 2rem !important;
    }
    
    .platform-icon {
        font-size: 2.5rem !important;
    }
}

/* Improved contrast for better visibility */
.showcase-icon,
.agent-capability-icon i,
.platform-icon {
    filter: contrast(1.2) brightness(1.1);
}
