@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');

* {
    font-family: 'Inter', sans-serif;
}

/* Premium Blue Color Palette */
:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --secondary: #3b82f6;
    --accent: #60a5fa;
    --light-blue: #93bbfc;
    --dark: #0f172a;
    --light: #f8fafc;
    --gradient-primary: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #60a5fa 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

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

/* Hide scrollbar but keep functionality */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 5px;
}

/* Cursor Effects */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    z-index: 1;
}

/* Text Gradient Animation */
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.text-gradient {
    background: var(--gradient-primary);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
}

/* Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(1deg); }
    66% { transform: translateY(-10px) rotate(-1deg); }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* Pulse Animation */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.pulse-animation {
    animation: pulse 3s ease-in-out infinite;
}

/* Glow Effect */
.glow {
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.5));
}

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

.glass-dark {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Smooth Reveal */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Button Hover Effect */
.btn-premium {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

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

.btn-premium:hover::before {
    width: 300px;
    height: 300px;
}

/* 3D Card Effect */
.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.6s;
    perspective: 1000px;
}

.card-3d:hover {
    transform: rotateY(5deg) rotateX(5deg) translateZ(20px);
}

/* Special 3D Effect for Comparison Cards */
.comparison-card {
    transform-style: preserve-3d;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.320, 1);
    cursor: pointer;
}

.comparison-card:hover {
    transform: rotateY(10deg) translateZ(50px) scale(1.05);
}

.comparison-card.left:hover {
    transform: rotateY(-10deg) translateZ(50px) scale(1.05);
}

/* Center card special styling */
.apex-center-card {
    transform: scale(1.1);
    z-index: 10;
    box-shadow: 0 20px 60px rgba(59, 130, 246, 0.4);
}

@media (max-width: 1024px) {
    .apex-center-card {
        transform: scale(1);
    }
}

/* Gradient Border */
.gradient-border {
    position: relative;
    background: linear-gradient(var(--dark), var(--dark)) padding-box,
                var(--gradient-primary) border-box;
    border: 2px solid transparent;
}

/* Noise Texture */
.noise {
    position: relative;
}

.noise::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    opacity: 0.5;
}

/* Improved Carousel Styles for Mobile */
.carousel-container {
    overflow: hidden;
    position: relative;
    touch-action: pan-y;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* Infinite scroll styles */
.carousel-infinite {
    display: flex;
    animation: scroll 20s linear infinite;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.carousel-infinite:hover {
    animation-play-state: paused;
}

.carousel-item {
    flex: 0 0 85%;
    padding: 0 0.5rem;
}

@media (min-width: 640px) {
    .carousel-item {
        flex: 0 0 45%;
        padding: 0 1rem;
    }
}

@media (min-width: 1024px) {
    .carousel-item {
        flex: 0 0 30%;
    }
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel-container:hover .carousel-nav {
    opacity: 1;
}

/* Mobile touch indicators */
.swipe-indicator {
    position: absolute;
    bottom: -2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
}

@media (min-width: 640px) {
    .swipe-indicator {
        display: none;
    }
}

/* Enhanced Chat Widget Styles */
.chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 100;
}

.chat-bubble {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(30, 64, 175, 0.5);
    transition: all 0.3s ease;
}

.chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(30, 64, 175, 0.6);
}

/* Enhanced Chat Section for Mobile */
.chat-section {
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    backdrop-filter: blur(10px);
}

.chat-container {
    position: relative;
    min-height: 600px;
}

@media (max-width: 1024px) {
    .chat-container {
        min-height: 500px;
    }
}

.chat-iframe-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 600px;
    border-radius: 20px;
    overflow: hidden;
}

@media (max-width: 640px) {
    .chat-iframe-container {
        min-height: 500px;
        border-radius: 15px;
    }
}

.predefined-question {
    cursor: pointer;
    transition: all 0.3s ease;
}

.predefined-question:hover {
    transform: translateX(5px);
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1) 0%, transparent 100%);
}

.predefined-question:active {
    transform: scale(0.98);
}

/* Map Custom Styles */
#map {
    height: 500px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.leaflet-container {
    background: #1e293b;
    font-family: 'Inter', sans-serif;
}

.leaflet-popup-content-wrapper {
    background: rgba(15, 23, 42, 0.95);
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
}

.leaflet-popup-tip {
    background: rgba(15, 23, 42, 0.95);
}

/* Loading Animation */
@keyframes loading {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading {
    animation: loading 1s linear infinite;
}

/* Gradient Orbs */
.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

/* Logo Animation */
@keyframes logoFloat {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.05); }
}

.logo-float {
    animation: logoFloat 4s ease-in-out infinite;
}

/* Connection Line Animation */
@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

.connection-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 2s ease-out forwards;
}

.connection-line-delayed {
    animation-delay: 0.5s;
}

.connection-svg {
    z-index: -1;
}

/* Solution Cards Animation Delays */
.solution-card-delayed {
    animation-delay: 0.1s;
}

.solution-card-delayed-2 {
    animation-delay: 0.2s;
}

/* Map Container */
.map-container {
    animation-delay: 0.2s;
}

/* SEO and Performance Optimizations */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Performance optimizations for animations */
.reveal,
.comparison-card,
.carousel-item,
.card-3d {
    will-change: transform, opacity;
}

.reveal.active {
    will-change: auto;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .cursor-glow {
        display: none;
    }
    
    .gradient-orb {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-gradient {
        background: none;
        -webkit-text-fill-color: inherit;
        color: #ffffff;
    }
    
    .glass,
    .glass-dark {
        background: rgba(0, 0, 0, 0.9);
        border: 2px solid #ffffff;
    }
}

/* Print styles */
@media print {
    .cursor-glow,
    .gradient-orb,
    .noise::before,
    .connection-svg {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-slate-950,
    .bg-slate-900 {
        background: white !important;
    }
    
    .text-white {
        color: black !important;
    }
}

/* Focus styles for better accessibility */
button:focus,
a:focus,
input:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Improved button states */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button:disabled:hover {
    transform: none;
}

/* Loading states */
.loading-skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

/* Error states */
.error-state {
    border: 1px solid #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Success states */
.success-state {
    border: 1px solid #10b981;
    background: rgba(16, 185, 129, 0.1);
}
/* Connection Line Animation */
@keyframes drawLine {
    to { stroke-dashoffset: 0; }
}

.connection-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 2s ease-out forwards;
}

.connection-line-delayed {
    animation-delay: 0.5s;
}

.connection-svg {
    z-index: -1;
}

/* Solution Cards Animation Delays */
.solution-card-delayed {
    animation-delay: 0.1s;
}

.solution-card-delayed-2 {
    animation-delay: 0.2s;
}

/* Map Container */
.map-container {
    animation-delay: 0.2s;
}

/* SEO and Performance Optimizations */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: inherit;
    margin: inherit;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Performance optimizations for animations */
.reveal,
.comparison-card,
.carousel-item,
.card-3d {
    will-change: transform, opacity;
}

.reveal.active {
    will-change: auto;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .cursor-glow {
        display: none;
    }
    
    .gradient-orb {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .text-gradient {
        background: none;
        -webkit-text-fill-color: inherit;
        color: #ffffff;
    }
    
    .glass,
    .glass-dark {
        background: rgba(0, 0, 0, 0.9);
        border: 2px solid #ffffff;
    }
}

/* Print styles */
@media print {
    .cursor-glow,
    .gradient-orb,
    .noise::before,
    .connection-svg {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-slate-950,
    .bg-slate-900 {
        background: white !important;
    }
    
    .text-white {
        color: black !important;
    }
}

/* Focus styles for better accessibility */
button:focus,
a:focus,
input:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Improved button states */
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

button:disabled:hover {
    transform: none;
}

/* Loading states */
.loading-skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

/* Error states */
.error-state {
    border: 1px solid #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Success states */
.success-state {
    border: 1px solid #10b981;
    background: rgba(16, 185, 129, 0.1);
}

/* Apex Logo Styles */
.apex-logo {
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.5));
    transition: all 0.3s ease;
}

.apex-logo:hover {
    filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.8));
    transform: scale(1.05);
}

.custom-popup{
    max-width: 300px;
    min-width: 200px;
    max-height: 250px;
}

/* Golden accent for center card */
.gold-accent {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Touch gestures indicator */
@keyframes swipeHint {
    0%, 100% { transform: translateX(0); opacity: 0.5; }
    50% { transform: translateX(-20px); opacity: 1; }
}

.swipe-hint {
    animation: swipeHint 2s ease-in-out infinite;
}
