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

/* Collapse Toggle Button - Custom CSS (no Tailwind) */
#desktopCollapseToggle {
    position: fixed;
    left: 80px;
    bottom: 1.5rem;
    width: 2rem;
    height: 2rem;
    min-width: 2rem;
    min-height: 2rem;
    border-radius: 50%;
    background: linear-gradient(to bottom right, #06B6D4, #0EA5E9);
    border: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 10px 15px -3px rgba(6, 182, 212, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    transform: translateX(-50%);
    opacity: 1;
    visibility: visible;
    padding:0px!important;
}

/* Hide toggle button on mobile/tablet (below lg breakpoint) */
@media (max-width: 1023px) {
    #desktopCollapseToggle {
        display: none;
    }
}

#desktopCollapseToggle:hover {
    transform: translateX(-50%) scale(1.1);
}

#desktopCollapseToggle svg {
    width: 90%;
    height: 90%;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
    transform: rotate(180deg);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    33% {
        transform: translateY(-20px) translateX(10px);
    }
    66% {
        transform: translateY(-10px) translateX(-10px);
    }
}

@keyframes float-delayed {
    0%, 100% {
        transform: translateY(0px) translateX(0px);
    }
    33% {
        transform: translateY(15px) translateX(-15px);
    }
    66% {
        transform: translateY(-15px) translateX(10px);
    }
}

@keyframes gradient-x {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes pulse-slow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

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

.animate-float-delayed {
    animation: float-delayed 10s ease-in-out infinite;
}

.animate-gradient-x {
    background-size: 200% 200%;
    animation: gradient-x 3s ease infinite;
}

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

/* Sidebar Styles */
.scrollbar-thin::-webkit-scrollbar {
    width: 6px;
}

.scrollbar-thin::-webkit-scrollbar-track {
    background: transparent;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background: rgba(6, 182, 212, 0.2);
    border-radius: 3px;
}

.scrollbar-thin::-webkit-scrollbar-thumb:hover {
    background: rgba(6, 182, 212, 0.4);
}

.scrollbar-track-transparent::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-link {
    position: relative;
    overflow: hidden;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, #06B6D4, #0EA5E9);
    transition: height 0.3s ease;
    border-radius: 0 3px 3px 0;
}

.sidebar-link:hover::before,
.sidebar-link.active::before {
    height: 70%;
}

.sidebar-link.active {
    background: rgba(6, 182, 212, 0.1);
    color: #06B6D4;
}

/* Collapsed sidebar state (only from lg/1024px and up) */
@media (min-width: 1024px) {
    #sidebar.collapsed {
        width: 80px;
    }

#sidebar.collapsed .sidebar-link {
    justify-content: center;
    padding: 0.75rem;
}

#sidebar.collapsed svg {
    margin: 0;
}

#sidebar.collapsed #themeToggle {
    justify-content: center;
    padding: 0.75rem;
}

/* Hide text in collapsed state */
#sidebar.collapsed .sidebar-text,
#sidebar.collapsed .sidebar-content .text-xs {
    display: none !important;
}

/* Default: Hide text until JS loads (prevents flash) */
/* .sidebar-text {
    display: none;
} */

/* Tooltip for collapsed sidebar (from lg up) */
@media (min-width: 1024px) {
    #sidebar.collapsed .sidebar-link {
        position: relative;
    }
    
    #sidebar.collapsed .sidebar-link:hover::after {
        content: attr(data-tooltip);
        position: absolute;
        left: 100%;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(6, 182, 212, 0.95);
        color: white;
        padding: 0.5rem 1rem;
        border-radius: 0.5rem;
        white-space: nowrap;
        margin-left: 0.5rem;
        font-size: 0.875rem;
        z-index: 100;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
}

/* Sidebar only shown from lg (1024px) and up */
@media (max-width: 1023px) {
    #sidebar {
        display: none !important;
    }
}

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

::-webkit-scrollbar-track {
    background: #070B13;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #06B6D4, #0EA5E9);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #14B8A6, #06B6D4);
}

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



/* Glassmorphism */
.backdrop-blur {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Gradient Text */
.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
}

/* Custom delays for animations */
.delay-1000 {
    animation-delay: 1s;
}

.delay-2000 {
    animation-delay: 2s;
}


/* Chart container styles */
canvas {
    max-width: 100%;
    height: auto;
}

/* Button hover effects */
button {
    transition: all 0.3s ease;
}

button:active {
    transform: scale(0.95);
}

/* Progress bar smoothness */
#progressBar {
    transition: width 0.1s ease-out;
}

/* Pulse animation for badges */
@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

.animate-ping {
    animation: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* Grid improvements for bento layout */
.grid-flow-dense {
    grid-auto-flow: dense;
}

/* Testimonial card styles */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -10px rgba(6, 182, 212, 0.3);
}

/* Pricing card hover */
.pricing-card:hover {
    transform: translateY(-10px);
}



/* Remove outline for FAQ buttons (already has border on parent) */
.faq-question:focus {
    outline: none;
}

/* Selection color */
::selection {
    background-color: #06B6D4;
    color: white;
}

::-moz-selection {
    background-color: #06B6D4;
    color: white;
}

/* Loading animation for images */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Custom utility classes */
.text-shadow {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.glow-cyan {
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.5);
}

.glow-blue {
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.5);
}

/* Transition defaults */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Prevent layout shift */
.aspect-video {
    aspect-ratio: 16 / 9;
}

.aspect-square {
    aspect-ratio: 1 / 1;
}

/* Enhanced link styles */
a {
    text-decoration: none;
}

/* Nav link underline - only for top level links, not dropdown items */
nav > div > div > a {
    position: relative;
}

nav > div > div > a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #06B6D4, #0EA5E9);
    transition: width 0.3s ease;
}

nav > div > div > a:hover::after,
nav > div > div > a.active::after {
    width: 100%;
}

/* Stats animation on scroll */
.stat-number {
    transition: transform 0.3s ease;
}

.stat-number:hover {
    transform: scale(1.1);
}

/* Skeleton loading (for future use) */
@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background-color: #1F2937;
    background-image: linear-gradient(
        90deg,
        #1F2937 0px,
        #374151 40px,
        #1F2937 80px
    );
    background-size: 200px 100%;
    animation: skeleton-loading 1.2s ease-in-out infinite;
}



/* Mobile - Full aggressive mode */
@media (max-width: 640px) {
    
    /* ===== TOP NAV FIXES ===== */
    #topNav {
        height: 64px !important;
        width: 100vw !important;
        left: 0 !important;
        right: 0 !important;
        top: 0 !important;
        position: fixed !important;
        transform: none !important;
        transition: none !important;
        will-change: auto !important;
    }
    
    /* Don't override inline styles */
    #topNav > div[style] {
        padding: 0.5rem 0.5rem !important;
        max-width: 100vw !important;
    }
    
    /* ===== UNIVERSAL RESETS ===== */
    * {
        overflow-wrap: break-word;
        word-wrap: break-word;
    }
    
    /* ===== BODY & MAIN CONTAINER ===== */
    body {
        overflow-x: hidden !important;
        padding-top: 0 !important;
        position: relative !important;
    }
    
    /* Fix for content being pushed under nav */
    section:first-of-type,
    main > section:first-child {
        margin-top: 0 !important;
    }
    
    main, main > div {
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    
    /* ===== CHARTS ===== */
    canvas {
        max-height: 200px !important;
        max-width: 100% !important;
        margin: 0.5rem auto !important;
    }

    
    svg:not(.sidebar-link svg):not(#menuIcon):not(#collapseIcon) {
        /* width: 1rem !important;
        height: 1rem !important; */
    }
    #topNavToggle{
        padding: 0px!important;
    }

}
