/* CSS Reset & Variables */
:root {
    --primary: #ff1e1e;
    --secondary: #8b0000;
    --dark: #050505;
    --darker: #020202;
    --light: #f5f5f5;
    --gray: #a0a0a0;
}

body {
    background-color: var(--dark);
    color: var(--light);
    overflow-x: hidden;
    cursor: none; /* Hide default cursor for custom cursor */
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--darker);
}
::-webkit-scrollbar-thumb {
    background: #222;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: screen;
    transition: width 0.3s, height 0.3s, background-color 0.3s;
}

.cursor-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 30, 30, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9998;
    transition: width 0.3s, height 0.3s, border-color 0.3s;
    /* smooth following */
    transition-timing-function: ease-out;
}

.custom-cursor.hover {
    width: 0px;
    height: 0px;
    background-color: transparent;
}
.cursor-glow.hover {
    width: 60px;
    height: 60px;
    border-color: var(--primary);
    background-color: rgba(255, 30, 30, 0.1);
    backdrop-filter: blur(2px);
}

/* Typography Enhancements */
.text-gradient {
    background: linear-gradient(to right, #ff1e1e, #ff7e7e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow-text {
    text-shadow: 0 0 20px rgba(255, 30, 30, 0.6), 0 0 40px rgba(255, 30, 30, 0.2);
}

/* Navbar */
#navbar.scrolled {
    background-color: rgba(2, 2, 2, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 30, 30, 0.1);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.nav-link {
    position: relative;
    color: var(--gray);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--light);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transform: translateX(-50%);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(255, 30, 30, 0.8);
}

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

/* Hero Section Styles */
.hero-container {
    background: linear-gradient(135deg, rgba(20,20,20,0.4) 0%, rgba(5,5,5,0.8) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(40, 40, 40, 0.5);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 0 0 1px rgba(255,255,255,0.05);
    transition: border-color 0.5s ease;
}

.hero-container:hover {
    border-color: rgba(255, 30, 30, 0.2);
}

/* 3D Tilt Effect */
.perspective-container {
    perspective: 1000px;
    transform-style: preserve-3d;
}

.3d-tilt {
    transform-style: preserve-3d;
    will-change: transform;
}

.character-img {
    transform: translateZ(50px);
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.8));
    animation: floating 6s ease-in-out infinite;
}

.moon-glow {
    transform: translateZ(-20px);
    animation: pulse 4s ease-in-out infinite alternate;
}

/* Animations */
@keyframes floating {
    0% { transform: translateZ(50px) translateY(0px); }
    50% { transform: translateZ(50px) translateY(-15px); }
    100% { transform: translateZ(50px) translateY(0px); }
}

@keyframes pulse {
    0% { opacity: 0.6; transform: translateZ(-20px) scale(0.95); }
    100% { opacity: 1; transform: translateZ(-20px) scale(1.05); }
}

@keyframes scrollLine {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

.scroll-line {
    animation: scrollLine 2s cubic-bezier(0.77, 0, 0.175, 1) infinite;
}

/* Typewriter cursor */
.typewriter-text {
    display: inline-block;
    min-width: 10px;
    animation: blinkCursor 0.75s step-end infinite;
}

@keyframes blinkCursor {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary); }
}

/* Social Icons */
.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray);
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.02);
}

.social-icon:hover {
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(255, 30, 30, 0.4);
    transform: translateY(-3px);
    background: rgba(255,30,30,0.05);
}

/* Page Loader */
.loader-progress {
    transition: width 0.1s ease;
}

/* Utilities */
.magnetic-wrap {
    display: inline-block;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .character-img {
        animation: none; /* Reduce heavy animations on mobile */
    }
    .hero-content {
        margin-top: -80px;
    }
    #services-grid .glass-card {
        padding: 1.25rem !important;
    }
    #services-grid .glass-card h3 {
        font-size: 1.1rem;
    }
    #services-grid .glass-card p, #services-grid .glass-card ul {
        font-size: 0.8rem;
    }
}


        /* Services Specific Styles */
        .scan-line {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 2px;
            background: linear-gradient(to right, transparent, var(--primary), transparent);
            animation: scan 3s infinite linear;
            opacity: 0.7;
            box-shadow: 0 0 10px var(--primary);
        }
        @keyframes scan {
            0% { transform: translateY(-100%); }
            100% { transform: translateY(1000%); }
        }

        .glass-card {
            background: linear-gradient(135deg, rgba(20,20,20,0.6) 0%, rgba(5,5,5,0.8) 100%);
            backdrop-filter: blur(16px);
            border: 1px solid rgba(40, 40, 40, 0.5);
            box-shadow: 0 10px 30px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
            transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
            overflow: hidden;
        }

        .glass-card::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0;
            height: 1px;
            background: linear-gradient(to right, transparent, rgba(255,30,30,0.5), transparent);
            opacity: 0;
            transition: opacity 0.4s ease;
        }

        .glass-card:hover {
            border-color: rgba(255, 30, 30, 0.4);
            transform: translateY(-10px) scale(1.02);
            box-shadow: 0 20px 40px rgba(0,0,0,0.8), 0 0 30px rgba(255,30,30,0.15);
            z-index: 10;
        }

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

        .icon-box {
            position: relative;
            width: 60px;
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255,30,30,0.05);
            border-radius: 12px;
            border: 1px solid rgba(255,30,30,0.1);
            transition: all 0.3s ease;
        }

        .glass-card:hover .icon-box {
            background: rgba(255,30,30,0.15);
            border-color: rgba(255,30,30,0.4);
            box-shadow: 0 0 20px rgba(255,30,30,0.3);
            transform: scale(1.1);
        }

        .icon-box svg {
            transition: all 0.3s ease;
        }

        .glass-card:hover .icon-box svg {
            filter: drop-shadow(0 0 8px rgba(255,30,30,0.8));
        }

        .divider-energy {
            height: 1px;
            width: 100%;
            background: linear-gradient(to right, transparent, var(--secondary), var(--primary), var(--secondary), transparent);
            box-shadow: 0 0 15px var(--primary);
            position: relative;
        }
        
        .divider-energy::after {
            content: '';
            position: absolute;
            top: 50%; left: 50%;
            transform: translate(-50%, -50%);
            width: 50px; height: 4px;
            background: var(--light);
            border-radius: 4px;
            box-shadow: 0 0 10px #fff, 0 0 20px var(--primary);
        }

        .timeline-node {
            width: 20px; height: 20px;
            background: var(--darker);
            border: 2px solid var(--primary);
            border-radius: 50%;
            position: relative;
            z-index: 2;
            transition: all 0.3s ease;
        }
        
        .timeline-item:hover .timeline-node {
            background: var(--primary);
            box-shadow: 0 0 20px var(--primary);
            transform: scale(1.3);
        }

        .timeline-line {
            position: absolute;
            left: 9px;
            top: 20px;
            bottom: -50px;
            width: 2px;
            background: rgba(255,30,30,0.2);
            z-index: 1;
        }

        .accordion-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.4s ease;
        }
        .accordion-item.active .accordion-content {
            max-height: 500px; /* arbitrary large value */
        }
        .accordion-item.active .accordion-icon {
            transform: rotate(180deg);
            color: var(--primary);
        }

        /* Cyber Glitch Animation */
        .glitch-cyber {
            position: relative;
            display: inline-block;
            animation: glitch-main 2.5s infinite linear;
        }

        .glitch-cyber::before,
        .glitch-cyber::after {
            content: attr(data-text);
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: transparent;
            opacity: 0;
        }

        .glitch-cyber::before {
            color: #000;
            z-index: 10;
            /* Changing the blue/cyan layer to a blurry fade glitch */
            animation: glitch-blur-fade 2.5s infinite linear;
        }

        .glitch-cyber::after {
            color: #ff006e;
            z-index: 11;
            animation: glitch-blue 2.5s infinite linear;
        }

        @keyframes glitch-main {
            0% { transform: translate(0); }
            4% { transform: translate(-2px, 2px); }
            8% { transform: translate(-2px, -2px); }
            12% { transform: translate(2px, 2px); }
            16% { transform: translate(2px, -2px); }
            20%, 100% { transform: translate(0); }
        }

        /* New Blurry Fade Glitch for the Blue color */
        @keyframes glitch-blur-fade {
            0% { filter: blur(0px); opacity: 1; transform: translate(-4px, -2px); }
            4% { filter: blur(3px); opacity: 0.5; transform: translate(4px, 2px) scale(1.02); }
            8% { filter: blur(8px); opacity: 0; transform: translate(-6px, 3px) scale(1.05); }
            12% { filter: blur(4px); opacity: 0.7; transform: translate(3px, -4px) scale(1.02); }
            16% { filter: blur(2px); opacity: 0.9; transform: translate(-5px, 2px); }
            20% { filter: blur(6px); opacity: 0.3; transform: translate(5px, -2px); }
            21%, 100% { opacity: 0; filter: blur(0px); transform: translate(0); }
        }

        @keyframes glitch-blue {
            0% { clip-path: inset(80% 0 5% 0); transform: translate(4px, 0); opacity: 1; }
            4% { clip-path: inset(15% 0 70% 0); transform: translate(-4px, 2px); opacity: 1; }
            8% { clip-path: inset(55% 0 25% 0); transform: translate(3px, -2px); opacity: 1; }
            12% { clip-path: inset(20% 0 55% 0); transform: translate(-3px, 2px); opacity: 1; }
            16% { clip-path: inset(65% 0 15% 0); transform: translate(5px, -1px); opacity: 1; }
            20% { clip-path: inset(35% 0 40% 0); transform: translate(-5px, 1px); opacity: 1; }
            21%, 100% { opacity: 0; transform: translate(0); }
        }

        /* Pricing & Expertise Mobile Scroll */
        @media (max-width: 767px) {
            #pricing-grid, #expertise-grid {
                display: flex !important;
                flex-wrap: nowrap !important;
                overflow-x: auto !important;
                -webkit-overflow-scrolling: touch;
                scroll-snap-type: x mandatory;
                gap: 1.5rem;
                padding-top: 1.5rem;
                margin-top: -1.5rem;
                padding-bottom: 2rem;
                scrollbar-width: none;
            }
            #pricing-grid::-webkit-scrollbar, #expertise-grid::-webkit-scrollbar {
                display: none;
            }
            #pricing-grid > div {
                flex: 0 0 50vw !important;
                min-width: 50vw !important;
                scroll-snap-align: center;
            }
            #expertise-grid > div {
                flex: 0 0 65vw !important;
                min-width: 65vw !important;
                scroll-snap-align: center;
            }
        }

        /* =============================================
           PAYMENT GATEWAY MODAL STYLES
           ============================================= */

        /* Payment Method Button Shimmer */
        .pm-btn {
            position: relative;
            overflow: hidden;
        }
        .pm-btn::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
            transform: translateX(-100%);
            transition: transform 0.6s ease;
        }
        .pm-btn:hover::after {
            transform: translateX(100%);
        }

        /* Form Field Shake Animation */
        @keyframes pmShake {
            0%, 100% { transform: translateX(0); }
            15%, 45%, 75% { transform: translateX(-5px); }
            30%, 60%, 90% { transform: translateX(5px); }
        }

        /* Success Checkmark Animation */
        @keyframes pmSuccessPulse {
            0% { transform: scale(0.5); opacity: 0; }
            60% { transform: scale(1.1); opacity: 1; }
            100% { transform: scale(1); opacity: 1; }
        }
        .pm-success-anim {
            animation: pmSuccessPulse 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }