/* APEX AI - Main Styles */

/* Custom Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDelay {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Solid color replacements for gradient utilities */
[class*="bg-gradient-to-"] {
    background-image: none !important;
    background-color: var(--tw-gradient-from, #0f0f0f) !important;
}

[class*="bg-gradient-to-"]::before,
[class*="bg-gradient-to-"]::after {
    background-image: none !important;
}

/* Fade In Animation Classes */
.fade-in,
.fade-in-delay {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.active,
.fade-in-delay.active {
    opacity: 1;
    transform: none;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #8B5CF6;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7C3AED;
}

/* Gradient Text */
.gradient-text {
    color: #8B5CF6 !important;
    background: none !important;
}

/* Hover Effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.3);
}

/* Card Glow Effect */
.card-glow {
    position: relative;
    transition: all 0.3s ease;
}

.card-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: rgba(139, 92, 246, 0.4);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.card-glow:hover::before {
    opacity: 1;
}

/* Button Animations */
button, .btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

button::before, .btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::before, .btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Form Focus States */
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Ensure all input fields have thin white borders */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
textarea,
select {
    border: 1px solid white !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: #8B5CF6 !important;
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(139, 92, 246, 0.3);
    border-top: 3px solid #8B5CF6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Section Dividers */
.section-divider {
    height: 1px;
    background-color: #8B5CF6;
}

/* Glass Morphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Stat Counter Animation */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* Mobile Menu Transition */
#mobile-menu {
    transition: max-height 0.3s ease-in-out;
    overflow: hidden;
}

#mobile-menu.hidden {
    max-height: 0;
}

#mobile-menu:not(.hidden) {
    max-height: 500px;
}

/* Image Hover Effects */
.image-zoom {
    overflow: hidden;
}

.image-zoom img {
    transition: transform 0.5s ease;
}

.image-zoom:hover img {
    transform: scale(1.1);
}

/* Pricing Card Highlight */
.pricing-card-featured {
    position: relative;
    z-index: 10;
}

/* Testimonial Carousel */
.testimonial-slide {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Progress Bar */
.progress-bar {
    height: 4px;
    background-color: #8B5CF6;
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Tooltip */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1F2937;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    font-size: 14px;
}

.tooltip:hover::after {
    opacity: 1;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-primary {
    background: rgba(139, 92, 246, 0.2);
    color: #A78BFA;
    border: 1px solid #8B5CF6;
}

.badge-success {
    background: rgba(34, 197, 94, 0.2);
    color: #4ADE80;
    border: 1px solid #22C55E;
}

/* Grid Patterns */
.grid-pattern {
    background-image: 
        linear-gradient(rgba(139, 92, 246, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.05) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Reveal on Scroll */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: none;
}

/* Hero Slideshow */
.hero-slider {
    position: absolute;
    inset: 0;
    overflow: hidden;
    display: block;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.hero-slide.is-active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slider-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    background-color: rgba(0, 0, 0, 0.35);
}

.hero-slider-indicator::before {
    content: '';
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.35);
    border-top-color: rgba(255, 255, 255, 0.85);
    animation: hero-spinner 1s linear infinite;
}

.hero-slider.is-transitioning .hero-slider-indicator {
    opacity: 1;
}

@keyframes hero-spinner {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Utilities */
@media (max-width: 768px) {
    .fade-in.active,
    .fade-in-delay.active {
        animation-duration: 0.5s;
    }
}

/* Card Styles - White Border and Active Animation */
.card-border {
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
    z-index: 1;
    pointer-events: none;
}

.card-border:hover::before {
    left: 100%;
}

.card-border:hover {
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 40px rgba(255, 255, 255, 0.2), 0 0 20px rgba(255, 255, 255, 0.1);
}

.card-border.active {
    border-color: rgba(255, 255, 255, 0.7) !important;
    box-shadow: 0 0 25px rgba(255, 255, 255, 0.25);
    animation: cardPulse 2s ease-in-out infinite;
}

@keyframes cardPulse {
    0%, 100% {
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.25);
        border-color: rgba(255, 255, 255, 0.7);
    }
    50% {
        box-shadow: 0 0 35px rgba(255, 255, 255, 0.35);
        border-color: rgba(255, 255, 255, 0.8);
    }
}

/* Ensure all cards have white borders - target divs with rounded corners and background colors */
div[class*="rounded-2xl"]:not(button):not(a),
div[class*="rounded-xl"]:not(button):not(a) {
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

div[class*="rounded-2xl"]:not(button):not(a)::before,
div[class*="rounded-xl"]:not(button):not(a)::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
    transition: left 0.6s ease;
    z-index: 1;
    pointer-events: none;
}

div[class*="rounded-2xl"]:not(button):not(a):hover::before,
div[class*="rounded-xl"]:not(button):not(a):hover::before {
    left: 100%;
}

div[class*="rounded-2xl"]:not(button):not(a):hover,
div[class*="rounded-xl"]:not(button):not(a):hover {
    border-color: rgba(255, 255, 255, 0.4) !important;
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 35px rgba(255, 255, 255, 0.15);
}

/* Print Styles */
@media print {
    nav, footer, .no-print {
        display: none !important;
    }
}

/* Global Icon Styles - White and Bold */
[data-lucide] {
    color: white !important;
    stroke-width: 2.5 !important;
}

/* Card Icons - Ensure white and bold */
.card [data-lucide],
[class*="rounded-2xl"] [data-lucide],
[class*="rounded-xl"] [data-lucide] {
    color: white !important;
    stroke-width: 2.5 !important;
}

/* Mobile-First Responsive Design */
@media (max-width: 640px) {
    /* Mobile Navigation Improvements */
    #mobile-menu {
        max-height: 600px;
        transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    }
    
    #mobile-menu.hidden {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
    }
    
    #mobile-menu:not(.hidden) {
        opacity: 1;
    }
    
    /* Mobile Menu Links */
    #mobile-menu a {
        padding: 12px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    /* Mobile Container Padding */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Mobile Card Spacing */
    [class*="rounded-2xl"],
    [class*="rounded-xl"] {
        margin-bottom: 1rem;
    }
    
    /* Mobile Text Sizes */
    h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
    }
    
    /* Mobile Grid Adjustments */
    .grid {
        gap: 1rem;
    }
}

/* Tablet Responsive */
@media (min-width: 641px) and (max-width: 1024px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Smooth Mobile Menu Transitions */
#mobile-menu-btn {
    transition: transform 0.3s ease;
}

#mobile-menu-btn:active {
    transform: scale(0.95);
}

/* Footer Text - All White */
footer {
    color: white !important;
}

footer p,
footer h4,
footer a,
footer li,
footer span {
    color: white !important;
}

footer a:hover {
    color: #A78BFA !important;
}

/* Ensure footer links are visible */
footer ul li a {
    color: white !important;
    transition: color 0.3s ease;
}

footer ul li a:hover {
    color: #A78BFA !important;
}