/* ========== GLOBAL VARIABLES & RESET ========== */
:root {
    /* Premium Color Palette - Enhanced */
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #6366f1;
    --secondary: #7c3aed;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Premium Dark Mode */
    --bg-main: #0a0f1c;
    --bg-secondary: #111827;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-light: #cbd5e1;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --nav-bg: rgba(15, 23, 42, 0.95);
    --card-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 30px 60px rgba(79, 70, 229, 0.15);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
    
    /* Premium Gradient Background */
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(79, 70, 229, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(124, 58, 237, 0.08) 0%, transparent 40%),
        linear-gradient(to bottom right, var(--bg-main) 0%, #111827 100%);
}

/* =========================================
   ☀️ LIGHT MODE (CORRECTED & FIXED)
   ========================================= */
body.light-mode {
    --bg-main: #f8fafc;
    --bg-secondary: #ffffff;
    --text-main: #0f172a;
    --text-muted: #475569;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(203, 213, 225, 0.8);
    --nav-bg: rgba(255, 255, 255, 0.95);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
}

body.light-mode h1, 
body.light-mode h2, 
body.light-mode h3, 
body.light-mode p,
body.light-mode span,
body.light-mode .text-white { 
    color: #1e293b;
}

/* 1. General Text Color Fix in Light Mode */
body.light-mode .text-white { 
    color: #1e293b !important; /* Dark text for general content */
}
body.light-mode .text-gray-300,
body.light-mode .text-gray-400 { 
    color: #64748b !important; 
}

body.light-mode .btn-primary-glow,
body.light-mode .btn-primary-glow *,
body.light-mode .btn-primary-glow i,
body.light-mode .btn-primary-glow span {
    color: #ffffff !important;
}

body.light-mode footer {
    background-color: #0f172a !important; /* Force Dark Background */
}
body.light-mode footer .text-white,
body.light-mode footer h4,
body.light-mode footer span {
    color: #ffffff !important; /* Force White Text in Footer */
}
body.light-mode footer .text-gray-400, 
body.light-mode footer li a {
    color: #94a3b8 !important; /* Muted text fix */
}
body.light-mode footer li a:hover {
    color: #60a5fa !important; /* Blue hover */
}

/* 4. PROTECT GLASS PANELS (Cards) */
body.light-mode .glass-panel {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
body.light-mode .glass-panel h3,
body.light-mode .glass-panel h4 {
    color: #0f172a !important;
}
body.light-mode .glass-panel p {
    color: #475569 !important;
}

/* 5. Navbar Mobile Menu Text Fix */
body.light-mode #mobileMenu {
    background: rgba(255, 255, 255, 0.98);
}
body.light-mode #mobileMenu a {
    color: #0f172a !important;
}

/* ========== TYPOGRAPHY ENHANCEMENTS ========== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

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

/* Light mode gradient fix */
body.light-mode .gradient-text {
    background: linear-gradient(135deg, #4338ca 0%, #7c3aed 50%, #0891b2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ========== NAVBAR PREMIUM STYLES ========== */
.nav-glass {
    background: var(--nav-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.nav-link {
    position: relative;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0.5rem 0;
}

body.light-mode .nav-link {
    color: #475569;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.nav-link:hover::after {
    width: 100%;
}

/* ========== PREMIUM GLASS MORPHISM ========== */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid var(--glass-border);
    box-shadow: var(--card-shadow);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glass-panel::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;
}

.glass-panel:hover::before {
    left: 100%;
}

.glass-panel:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--primary);
    box-shadow: var(--card-shadow-hover);
}

/* ========== BUTTONS - PREMIUM STYLES ========== */
.btn-primary-glow {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    color: white !important;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.3);
    background-size: 200% 200%;
    border: none;
}

.btn-primary-glow:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.4);
    background-position: 100% 50%;
    animation: gradient-shift 1.5s ease infinite;
}

.btn-primary-glow::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.btn-primary-glow:hover::after {
    left: 100%;
}

/* Light mode secondary buttons */
body.light-mode .glass-panel.text-white {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary) !important;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

body.light-mode .glass-panel.text-white:hover {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.15);
}

/* ========== ANIMATIONS ========== */
@keyframes float {
    0%, 100% { 
        transform: translateY(0) rotate(0deg); 
    }
    50% { 
        transform: translateY(-25px) rotate(2deg); 
    }
}

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

@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}

.animate-blob {
    animation: blob 7s infinite;
}

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

/* Fade-in animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

/* Ye class JS add karega tab element dikhega */
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}
/* ========== COMPARISON SLIDER ========== */
.comparison-container {
    border-radius: 1.5rem;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

body.light-mode .comparison-container {
    border: 1px solid #e2e8f0;
}

.slider-handle {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    transform: translateX(-50%);
    cursor: col-resize;
    z-index: 10;
}

.slider-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 4px solid var(--bg-main);
    transition: all 0.3s ease;
}

.comparison-range {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: col-resize;
    z-index: 20;
}

/* ========== MOBILE MENU ========== */
#mobileMenu {
    background: linear-gradient(135deg, var(--nav-bg), rgba(15, 23, 42, 0.95));
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
}

body.light-mode #mobileMenu {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.95));
}

body.light-mode #mobileMenu .text-white {
    color: #0f172a !important;
}

body.light-mode #mobileMenu .text-gray-400 {
    color: #64748b !important;
}

/* ========== FORM ELEMENTS ========== */
input, textarea, select {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, var(--primary), var(--secondary));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, var(--primary-dark), var(--secondary));
}

/* ========== RESPONSIVE ADJUSTMENTS ========== */
@media (max-width: 768px) {
    .glass-panel {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
}

/* Loading animation for initial load */
body.loading * {
    animation-play-state: paused !important;
}

/* Premium hover effects for icons */
.fab, .fas, .far {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fab:hover, .fas:hover, .far:hover {
    transform: scale(1.2);
}

/* Gradient underline effect */
.gradient-underline {
    position: relative;
    display: inline-block;
}

.gradient-underline::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.gradient-underline:hover::after {
    transform: scaleX(1);
}

/* Keep specific elements white even in light mode */
body.light-mode .btn-primary-glow,
body.light-mode .btn-primary-glow *,
body.light-mode .badge {
    color: white !important;
}

/* =========================================
   🔘 LIGHT MODE BUTTON FIXES
   ========================================= */

/* 1. Primary Gradient Buttons */
body.light-mode .btn-primary-glow,
body.light-mode .btn-primary-glow span,
body.light-mode .btn-primary-glow i {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* 2. Secondary Glass Buttons */
body.light-mode a.glass-panel, 
body.light-mode button.glass-panel {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid #cbd5e1 !important;
    color: #4f46e5 !important;
}

body.light-mode a.glass-panel i,
body.light-mode button.glass-panel i {
    color: #4f46e5 !important;
}

body.light-mode a.glass-panel:hover, 
body.light-mode button.glass-panel:hover {
    background: #ffffff !important;
    border-color: #4f46e5 !important;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.15) !important;
}

/* 3. Theme Toggle & Mobile Menu Button Fix */
body.light-mode #themeToggle,
body.light-mode #mobileMenuBtn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    color: #334155 !important;
}

body.light-mode #themeToggle:hover {
    color: #4f46e5 !important;
    background: #ffffff;
}

/* 4. Navbar Links Hover Fix */
body.light-mode .nav-link:hover {
    color: #4f46e5 !important;
}

/* ========== FIX: SUCCESS STORIES & FAQ TEXT VISIBILITY ========== */

/* 1. Section Subtitles (Heading ke niche wali line "Join thousands...") */
body.light-mode p.text-gray-400 {
    color: #475569 !important; /* Light Grey ko Dark Grey kiya taaki white pe dikhe */
}

/* 2. Success Story Cards (Testimonials) */
/* Card ke andar ka Naam (Sarah Chen etc.) */
body.light-mode .glass-panel h4.text-white {
    color: #0f172a !important; /* White text ko Dark Black/Blue kiya */
}

/* Card ke andar ka Review Text */
body.light-mode .glass-panel p.italic {
    color: #334155 !important; /* Text ko Dark Grey kiya */
}

/* 3. FAQ Section (Success Stories ke niche wala section) */
/* FAQ Question Text (Jo click karne par khulta hai) */
body.light-mode .glass-panel button.text-white {
    color: #1e293b !important; /* White question ko Dark kiya */
}
body.light-mode .glass-panel button span {
    color: #1e293b !important;
}

/* FAQ Answer Text */
body.light-mode .glass-panel div.text-gray-400 p {
    color: #475569 !important; /* Answer text ko Dark Grey kiya */
}

/* ========== SCROLL REVEAL ANIMATION (Isse end me paste karo) ========== */

/* Initial State: Thoda niche aur gayab */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
    will-change: opacity, transform;
}

/* Final State: Apni jagah par aur visible */
.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Delay (Ek-ek karke aane ke liye) */
/* Agar ek sath 3-4 cards hain, to wo line se ayenge */
.reveal-on-scroll:nth-child(1) { transition-delay: 0.1s; }
.reveal-on-scroll:nth-child(2) { transition-delay: 0.2s; }
.reveal-on-scroll:nth-child(3) { transition-delay: 0.3s; }
.reveal-on-scroll:nth-child(4) { transition-delay: 0.4s; }

/* ========== SCROLL REVEAL CSS (Isse end me rakho) ========== */

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(50px); /* Pehle 30px tha, ab 50px kiya taaki movement dikhe */
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
    will-change: opacity, transform;
}

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

/* ========== FIX FOR SLIDER IMAGES ========== */
/* Ye code slider ki images ko zabardasti visible rakhega */

#comparisonSlider img {
    opacity: 1 !important;       /* Hamesha dikhao */
    transform: none !important;  /* Koi animation mat karo */
    transition: none !important; /* Dragging fast honi chahiye */
    visibility: visible !important;
}

/* Container ko animate hone do, par images ko chhod do */
#comparisonSlider.reveal-on-scroll {
    opacity: 0;
    transition: all 0.8s ease;
}

#comparisonSlider.reveal-on-scroll.visible {
    opacity: 1;
}

/* Toast Notification Style */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 100;
    transform: translateX(200%); /* Start hidden */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast-notification.show {
    transform: translateX(0);
}
.toast-notification i {
    color: #4ade80; /* Green check */
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.animate-scroll {
    animation: scroll 20s linear infinite;
}
.hover\:pause:hover {
    animation-play-state: paused;
}

/* ========== INFINITE SCROLL ANIMATION ========== */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-scroll {
    animation: scroll 20s linear infinite;
    display: flex; /* Flexbox zaroori hai */
    width: max-content; /* Content width jitni ho */
}

/* Hover par animation rokne ke liye */
.hover\:pause:hover {
    animation-play-state: paused;
}

/* =========================================
   10/10 POLISH STYLES
   ========================================= */

/* 1. Scroll To Top Button Visibility */
#scrollTopBtn.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 2. Parallax Blobs Smoothness */
.animate-blob {
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); /* Smooth mouse follow */
    will-change: transform;
}

/* 3. Text Reveal Effect (Optional for Headings) */
.reveal-text {
    background-size: 0% 100%;
    background-image: linear-gradient(90deg, #4f46e5, #06b6d4);
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: revealText 2s ease-out forwards;
}

@keyframes revealText {
    0% { background-size: 0% 100%; }
    100% { background-size: 100% 100%; }
}

/* =========================================
   MOBILE BOTTOM NAVIGATION STYLES
   ========================================= */

/* 1. Body Padding (Taaki content nav bar ke piche na chupe) */
@media (max-width: 768px) {
    body {
        padding-bottom: 80px !important; /* Space for bottom bar */
    }
}

/* 2. Dark Mode Styles (Default) */
#bottomNav {
    background: rgba(15, 23, 42, 0.95); /* Slate 900 */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Center Button Border color matching bg */
#bottomNav .rounded-full {
    border-color: #0f172a; 
}

/* Active Link Color (Blue) */
.bottom-nav-item.active {
    color: #60a5fa; /* Blue 400 */
}
.bottom-nav-item.active i {
    transform: translateY(-2px);
    filter: drop-shadow(0 0 8px rgba(96, 165, 250, 0.5));
}

/* 3. Light Mode Overrides */
body.light-mode #bottomNav {
    background: rgba(255, 255, 255, 0.95) !important;
    border-top: 1px solid #e2e8f0 !important;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
}

body.light-mode #bottomNav .text-gray-400 {
    color: #64748b !important; /* Slate 500 */
}

body.light-mode #bottomNav .rounded-full {
    border-color: #ffffff !important; /* White border for center button */
}

body.light-mode .bottom-nav-item.active {
    color: #2563eb !important; /* Darker Blue */
}

/* 4. iPhone Safe Area Support */
.pb-safe {
    padding-bottom: env(safe-area-inset-bottom);
}

/* =========================================
   TOAST NOTIFICATION MOBILE FIX
   Paste at the end of home.css
   ========================================= */

.toast-notification {
    /* Desktop Default */
    bottom: 24px !important;
}

@media (max-width: 768px) {
    .toast-notification {
        /* Mobile: Lift it above Bottom Nav */
        bottom: 90px !important; 
        left: 20px !important;
        right: 20px !important;
        width: auto !important;
        display: flex;
        justify-content: center;
    }
}

/* =========================================
   USER DROPDOWN LIGHT MODE FIX
   ========================================= */

/* 1. Dropdown Container Background */
body.light-mode .group:hover .absolute {
    background-color: #ffffff !important;   /* Pure White Background */
    border-color: #e2e8f0 !important;       /* Light Grey Border */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important; /* Soft Shadow */
}

/* 2. Header Section (User Name & Email) */
body.light-mode .group .absolute .border-b {
    border-bottom-color: #f1f5f9 !important; /* Light separator line */
}

body.light-mode .group .absolute p.font-bold {
    color: #1e293b !important; /* Dark Text for Name */
}

body.light-mode .group .absolute p.text-gray-400 {
    color: #64748b !important; /* Medium Grey for Email */
}

/* 3. Dropdown Links (Dashboard, Logout) */
body.light-mode .group .absolute a {
    color: #334155 !important; /* Dark Grey Text */
}

/* 4. Hover State for Links */
body.light-mode .group .absolute a:hover {
    background-color: #f8fafc !important; /* Very Light Grey on Hover */
    color: #2563eb !important; /* Blue Text on Hover */
}

/* 5. Logout Link Specific */
body.light-mode .group .absolute a.text-red-400 {
    color: #ef4444 !important; /* Red Text */
}
body.light-mode .group .absolute a.text-red-400:hover {
    background-color: #fef2f2 !important; /* Light Red Background */
    color: #dc2626 !important; /* Darker Red on Hover */
}

/* 6. Main Button (User Icon + Name) in Navbar */
body.light-mode .group > button {
    background-color: rgba(0, 0, 0, 0.05) !important; /* Light transparent bg */
    border-color: rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .group > button .text-white {
    color: #1e293b !important; /* Dark Name Text */
}

body.light-mode .group > button .text-gray-400 {
    color: #64748b !important; /* Dark "Welcome" Text */
}

body.light-mode .group > button:hover {
    background-color: rgba(0, 0, 0, 0.08) !important;
    border-color: rgba(59, 130, 246, 0.5) !important; /* Blue border on hover */
}