/* ============================================================
   JND28 Prediction Platform - Custom Styles
   SaaS Landing Page - Indigo/Blue Theme
   ============================================================ */

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

/* Selection Color */
::selection {
    background-color: rgba(79, 70, 229, 0.2);
    color: #312e81;
}

/* Navbar Scroll Effect */
#navbar.scrolled {
    background: rgba(49, 46, 129, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Feature Card Hover Gradient Border */
.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    padding: 1px;
    background: linear-gradient(135deg, transparent 40%, rgba(99, 102, 241, 0.3) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

/* FAQ Accordion Styles */
.faq-item.active {
    background-color: #eef2ff;
    border-color: #c7d2fe;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    background-color: #4f46e5;
    color: white;
}

.faq-item.active .faq-icon i {
    color: white;
}

/* Counter Animation */
.counter {
    display: inline-block;
}

/* Stats Counter Glow */
.stat-item:hover {
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.15);
}

/* Nav Link Active State */
.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

/* Back to Top Button Visibility */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu Link Active */
.mobile-link:active {
    background: rgba(255, 255, 255, 0.2);
}

/* Testimonial Card Star Colors */
.text-amber-400 {
    color: #fbbf24;
}

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

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

::-webkit-scrollbar-thumb {
    background: #a5b4fc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #818cf8;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

.animate-pulse {
    animation: pulse-dot 2s ease-in-out infinite;
}

/* Reveal on Scroll */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Loading Skeleton Placeholder */
.skeleton {
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

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

/* Gradient Text Utility */
.gradient-text {
    background: linear-gradient(135deg, #6366f1, #4f46e5, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive Fixes */
@media (max-width: 640px) {
    #navbar.scrolled {
        background: rgba(49, 46, 129, 0.95);
    }

    .feature-card {
        padding: 1.5rem;
    }
}

/* Print Styles */
@media print {
    #navbar, #back-to-top, #mobile-menu {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        transition: none;
    }

    * {
        animation-duration: 0.01ms !important;
    }
}

/* Focus Visible - Accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
    border-radius: 4px;
}

/* FAQ Content Transition */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-item.active .faq-content {
    max-height: 500px;
    padding-bottom: 1.25rem;
}
