/* ===================================
   BusinessGenie - Premium Business Loans
   Custom Styles & Animations
   =================================== */

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: #fff;
}

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

::-webkit-scrollbar-track {
    background: #0F172A;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* ===================================
   Typography
   =================================== */

.text-gradient {
    background: linear-gradient(135deg, #3B82F6 0%, #10B981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===================================
   Buttons
   =================================== */

.btn-primary {
    display: inline-flex;
    align-items: center;
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #60A5FA 0%, #3B82F6 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.5);
}

.btn-primary span,
.btn-primary svg {
    position: relative;
    z-index: 1;
}

.btn-primary.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 0.875rem 1.75rem;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-weight: 600;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ===================================
   Navbar
   =================================== */

#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
}

/* ===================================
   Glass Cards
   =================================== */

.glass-card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 24px;
}

/* ===================================
   Feature Cards
   =================================== */

.feature-card {
    background: rgba(30, 41, 59, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

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

.feature-card > * {
    position: relative;
    z-index: 1;
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* ===================================
   Testimonial Cards
   =================================== */

.testimonial-card {
    background: rgba(30, 41, 59, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.3);
}

/* ===================================
   Company Logos
   =================================== */

.company-logo {
    transition: all 0.3s ease;
    color: #94a3b8;
}

.company-logo:hover {
    color: #fff;
    transform: scale(1.05);
}

/* ===================================
   Range Slider
   =================================== */

.range-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: #1E293B;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #3B82F6 0%, #10B981 100%);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.range-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #3B82F6 0%, #10B981 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.range-slider::-moz-range-thumb:hover {
    transform: scale(1.1);
}

/* ===================================
   FAQ Accordion
   =================================== */

.faq-item {
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid rgba(51, 65, 85, 0.5);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(59, 130, 246, 0.3);
}

.faq-item.active {
    border-color: rgba(59, 130, 246, 0.5);
    background: rgba(30, 41, 59, 0.5);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: transparent;
    border: none;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-question:hover {
    color: #60A5FA;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: #3B82F6;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

/* ===================================
   Gradient Orbs (Background)
   =================================== */

.gradient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
}

.gradient-orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.3) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation: float 20s ease-in-out infinite;
}

.gradient-orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.25) 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    animation: float 25s ease-in-out infinite reverse;
}

.gradient-orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.2) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float 30s ease-in-out infinite;
}

/* Grid Pattern */
.grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}

/* ===================================
   Animations
   =================================== */

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(50px, -50px) scale(1.05);
    }
    50% {
        transform: translate(-30px, 30px) scale(0.95);
    }
    75% {
        transform: translate(-50px, -30px) scale(1.02);
    }
}

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

@keyframes floating {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Fade In Up Animation */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Fade Animation */
.scroll-fade {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ===================================
   Responsive Adjustments
   =================================== */

@media (max-width: 768px) {
    .gradient-orb-1 {
        width: 300px;
        height: 300px;
        top: -100px;
        right: -100px;
    }

    .gradient-orb-2 {
        width: 250px;
        height: 250px;
        bottom: -75px;
        left: -75px;
    }

    .gradient-orb-3 {
        width: 200px;
        height: 200px;
    }

    .glass-card {
        border-radius: 20px;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .btn-primary.btn-large,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .feature-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }

    .faq-question {
        padding: 1.25rem;
        font-size: 0.9375rem;
    }

    .faq-answer {
        padding: 0 1.25rem;
    }
}

/* ===================================
   Accessibility
   =================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .gradient-orb {
        animation: none;
    }

    .floating {
        animation: none;
    }

    .scroll-fade {
        opacity: 1;
        transform: none;
    }
}

/* Focus Styles for Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid #3B82F6;
    outline-offset: 2px;
}

/* ===================================
   Print Styles
   =================================== */

@media print {
    .gradient-orb,
    .grid-pattern,
    #navbar,
    .btn-primary,
    .btn-secondary {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .glass-card,
    .feature-card,
    .testimonial-card,
    .faq-item {
        background: white;
        border: 1px solid #ccc;
    }
}
