/* =========================================
           JAVIONIX STYLESHEET
           
           Table of Contents:
           1. Base & Global Layout
           2. UI Components (Buttons, Inputs, Text)
           3. Navigation & Header
           4. Feature: Visuals (Parallax, Particles, Scroller)
           5. Feature: Services Section
           6. Feature: Contact Section (Merged Layout)
           7. Feature: AI Chat Widget
           8. Animations (Keyframes)
           9. Responsive & Device Logic (Media Queries)
           ========================================= */


        /* =========================================
           1. BASE & GLOBAL LAYOUT
           ========================================= */

        body {
            font-family: 'Inter', sans-serif;
            background-color: #0A0A1A; /* Fallback */
            color: #E0E0E0;
            position: relative; /* Required for widget docking */
        }

        #background-layer {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100vh;
            z-index: -2;
            /* Updated to external URL for preview */
            background: linear-gradient(rgba(0,0,0,0.50), rgba(0,0,0,0.60)), url('./Images/Javionix_background.jpg');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
        }

        #background-layer::after {
            content: "";
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.050);
            z-index: -1;
            pointer-events: none;
        }

        /* Anchor offset for fixed header */
        :root { --header-h: 80px; }
        /* Removed #about, Added #contact */
        #home, #services, #solutions, #contact { 
            scroll-margin-top: calc(var(--header-h) + 10px);
        }

        .divider, .divider-2 {
            height: 1px;
            width: 60%;
            margin: 60px auto 80px;
            background: linear-gradient(90deg, transparent, rgba(0,255,255,0.3), transparent);
            border-radius: 2px;
            box-shadow: 0 0 8px rgba(0, 255, 255, 0);
            transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1);
        }
        .divider-2 {
            width: 70%;
            margin: 100px auto 80px;
            background: linear-gradient(90deg, transparent, rgba(0,255,255,0.25), transparent);
        }
        .divider.is-visible, .divider-2.is-visible {
            animation: shimmer-glow 3.5s ease-in-out infinite;
        }


        /* =========================================
           2. UI COMPONENTS (Buttons, Typography)
           ========================================= */

        .gradient-text {
            background: linear-gradient(90deg, #00f7ff, #00aaff);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .hero-text-glow {
            text-shadow: 0 0 15px rgba(0, 247, 255, 0.27), 0 0 25px rgba(0, 170, 255, 0.18);
            animation: hero-glow-pulse 5s ease-in-out infinite alternate;
        }

        .nav-link-glow {
            transition: all 0.3s ease-in-out;
        }
        .nav-link-glow:hover {
            text-shadow: 0 0 8px rgba(0, 247, 255, 0.7);
        }

        .btn-neon {
            background: linear-gradient(90deg, #00aaff, #00f7ff);
            border: none;
            color: #0d1a2e;
            text-shadow: none;
            box-shadow: 0 0 5px rgba(0, 247, 255, 0.5), 0 0 10px rgba(0, 170, 255, 0.4);
            transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), 
                        filter 0.2s ease-out, 
                        box-shadow 0.2s ease-out, 
                        color 0.2s ease-out, 
                        text-shadow 0.2s ease-out;
            border-radius: 10px;
            transform: translateZ(0);
            user-select: none;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }
        .btn-neon:hover {
            filter: brightness(1.15);
            color: white;
            text-shadow: 0 0 8px white, 0 0 15px #00f7ff;
            box-shadow: 0 0 12px rgba(0, 247, 255, 0.6), 0 0 20px rgba(0, 170, 255, 0.5);
            transform: scale(1.03);
        }
        .btn-neon.is-pressed {
            transform: scale(0.965);
            filter: brightness(0.95);
            transition-duration: 0.1s;
        }

        /* NEW: MVP LIVE Badge Style */
        .mvp-live-badge {
            background-color: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(4px);
            border: 1px solid rgba(239, 68, 68, 0.6);
            box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
            animation: pulse-red-glow 2s ease-in-out infinite;
        }
        @keyframes pulse-red-glow {
            0%, 100% { box-shadow: 0 0 10px rgba(239, 68, 68, 0.4); border-color: rgba(239, 68, 68, 0.6); }
            50% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.8), inset 0 0 10px rgba(239, 68, 68, 0.2); border-color: rgba(239, 68, 68, 1); }
        }

        /* NEW: Finalizing Badge Style */
        .finalizing-badge {
            background-color: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(4px);
            border: 1px solid rgba(245, 158, 11, 0.6);
            box-shadow: 0 0 10px rgba(245, 158, 11, 0.4);
            animation: pulse-amber-glow 2s ease-in-out infinite;
        }
        @keyframes pulse-amber-glow {
            0%, 100% { box-shadow: 0 0 10px rgba(245, 158, 11, 0.4); border-color: rgba(245, 158, 11, 0.6); }
            50% { box-shadow: 0 0 20px rgba(245, 158, 11, 0.8), inset 0 0 10px rgba(245, 158, 11, 0.2); border-color: rgba(245, 158, 11, 1); }
        }

        .cinematic-reveal {
            opacity: 0;
            animation: cinematic-reveal 1.0s cubic-bezier(0.22, 1, 0.36, 1) forwards;
        }
        .animate-on-scroll {
            opacity: 0;
            transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1);
            will-change: opacity, transform;
        }
        .animate-on-scroll.is-visible {
            opacity: 1;
        }


        /* =========================================
           3. NAVIGATION & HEADER
           ========================================= */

        /* Mobile Menu Container */
        #mobile-menu {
            position: absolute;
            top: 55px; /* Adjusted from 70px to sit higher */
            right: 16px;
            width: 240px;
            background: rgba(28, 28, 30, 0.85); /* Apple dark menu bg */
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 0.5px solid rgba(255, 255, 255, 0.15);
            border-radius: 16px;
            padding: 8px;
            box-shadow: 0 20px 40px rgba(0,0,0,0.6);
            
            /* Animation Props */
            max-height: 0;
            opacity: 0;
            overflow: hidden;
            transform: scale(0.9) translateY(-10px);
            transform-origin: top right;
            transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
            z-index: 999;
        }
        #mobile-menu.show {
            max-height: 500px;
            opacity: 1;
            transform: scale(1) translateY(0);
        }
        
        /* Compact Menu Item Styling */
        #mobile-menu a {
            border-radius: 10px;
            margin-bottom: 2px;
            transition: background-color 0.2s ease, transform 0.2s ease;
            transform: translateY(0) !important; /* Override previous translate anim */
            opacity: 1 !important; /* Override previous fade anim */
        }
        #mobile-menu a:active, #mobile-menu a:hover {
            background-color: rgba(255,255,255,0.15);
            transform: scale(1) !important;
        }
        
        .animate-menu {
            animation: none; /* Disable old animation */
        }

        /* Apple-style Hamburger Button */
        #mobile-menu-button.hamburger-icon {
            position: relative;
            display: inline-block;
            width: 28px;
            height: 20px;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }
        #mobile-menu-button .hamburger-line {
            position: absolute;
            left: 0;
            width: 100%;
            height: 2px;
            background-color: #e5e7eb;
            border-radius: 1px;
            transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                        opacity 0.25s ease,
                        top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                        bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }
        #mobile-menu-button .hamburger-line:nth-child(1) { top: 0; }
        #mobile-menu-button .hamburger-line:nth-child(2) { top: 50%; transform: translateY(-50%); }
        #mobile-menu-button .hamburger-line:nth-child(3) { bottom: 0; }
        #mobile-menu-button:hover .hamburger-line { background-color: #ffffff; }

        /* Open State (X Shape) */
        #mobile-menu-button.open .hamburger-line:nth-child(1) {
            top: 50%;
            transform: translateY(-50%) rotate(45deg);
        }
        #mobile-menu-button.open .hamburger-line:nth-child(2) { opacity: 0; }
        #mobile-menu-button.open .hamburger-line:nth-child(3) {
            bottom: auto;
            top: 50%;
            transform: translateY(-50%) rotate(-45deg);
        }
        #mobile-menu .footer-social a:active svg {
            opacity: 0.7;
            transform: scale(0.92);
            transition: opacity 0.12s ease, transform 0.12s ease;
        }


        /* =========================================
           4. FEATURE: VISUALS (Parallax, Particles)
           ========================================= */

        .parallax-section {
            will-change: transform;
            transition: box-shadow 0.3s ease-out;
            transform: translateZ(0);
        }
        .parallax-section:target { transform: none !important; }
        .parallax-section.is-visible {
            box-shadow: none !important;
        }

        #mesh-area {
            position: absolute;
            bottom: 0;
            width: 100%;
            height: 48vh;
            pointer-events: none;
        }
        #particle-canvas {
            height: 100% !important;
        }

        /* Logo Scroller */
        .logo-scroller {
            border-radius: 20px;
            padding: 0.5rem 0 0.90rem;
            height: 90px;
            display: flex;
            align-items: center;
            width: 100%;
            overflow: hidden;
            mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
            -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
            pointer-events: none;
            opacity: 0;
            animation: cinematic-reveal 1.0s cubic-bezier(0.22, 1, 0.36, 1) 1.0s forwards;
            position: relative;
        }
        .logo-scroller-inner {
            display: flex;
            align-items: center;
            gap: 148px;
            width: fit-content;
            animation: scroll 95s linear infinite;
            will-change: transform;
        }
        .logo-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.5rem;
        }
        .logo-item img {
            height: 36px;
            width: auto;
            object-fit: contain;
            opacity: 0.8;
            filter: brightness(0) invert(1);
            transition: opacity 0.3s ease, transform 0.3s ease;
        }
        .logo-item:hover img {
            opacity: 1;
            transform: scale(1.05);
        }
        .logo-item .company-name {
            font-size: 13px;
            font-weight: 500;
            color: #bfefff;
            letter-spacing: 0.5px;
            opacity: 0.8;
            transition: opacity 0.3s ease, transform 0.3s ease;
        }


        /* =========================================
           5. FEATURE: SERVICES SECTION
           ========================================= */

        .service-card {
            background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            border: 1px solid rgba(0, 247, 255, 0.25);
            opacity: 0;
            position: relative;
            overflow: hidden;
            box-shadow:
                inset 0 1px 1px rgba(255, 255, 255, 0.08),
                0 10px 25px rgba(0,0,0,0.15),
                0 0 20px rgba(0, 247, 255, 0.05),
                0 0 40px rgba(0, 247, 255, 0.02);
            transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                        box-shadow 0.6s ease,
                        background 0.4s ease;
            will-change: opacity, transform, box-shadow;
        }
        .service-card.is-visible {
            animation: cuttingEdgeCardReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
        }
        .service-card:hover {
            transform: translateY(-8px) scale(1.02);
            box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08),
                        0 10px 25px rgba(0,0,0,0.3),
                        0 0 20px rgba(0, 247, 255, 0.25),
                        0 0 40px rgba(0, 247, 255, 0.15);
        }
        .service-card.hover-touch {
            transform: translateY(-8px) scale(1.02);
            box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08),
                        0 10px 25px rgba(0,0,0,0.3),
                        0 0 20px rgba(0, 247, 255, 0.25),
                        0 0 40px rgba(0, 247, 255, 0.15);
        }

        .icon-container {
            width: 96px;
            height: 96px;
            margin: 0 auto 1.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: rgba(0, 247, 255, 0.05);
            box-shadow: inset 0 0 15px rgba(0, 247, 255, 0.1);
            transition: background 0.4s ease, box-shadow 0.4s ease;
        }
        .service-card:hover .icon-container {
            background: rgba(0, 247, 255, 0.1);
            box-shadow: inset 0 0 20px rgba(0, 247, 255, 0.2), 0 0 20px rgba(0, 247, 255, 0.1);
        }


        /* =========================================
           6. FEATURE: CONTACT SECTION
           ========================================= */

        .contact-card {
            background-color: rgba(255, 255, 255, 0.03);
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            border: 1px solid rgba(255, 255, 255, 0.1);
            position: relative;
            overflow: hidden;
        }
        .contact-card.is-visible {
            box-shadow: 0 0 40px rgba(0, 247, 255, 0.1);
        }
        .contact-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 2px;
            background: linear-gradient(90deg, transparent, #00f7ff, transparent);
            box-shadow: 0 0 10px #00f7ff;
            animation: scan-line 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
        }
        
        /* New vertical divider for merged contact section */
        .vertical-divider {
            width: 1px;
            height: 100%;
            background: linear-gradient(to bottom, transparent, rgba(0, 247, 255, 0.3), transparent);
            box-shadow: 0 0 8px rgba(0, 247, 255, 0.1);
        }
        @media (max-width: 1024px) {
            .vertical-divider {
                width: 70%;
                height: 1px;
                margin: 2rem auto;
                background: linear-gradient(to right, transparent, rgba(0, 247, 255, 0.3), transparent);
            }
        }

        /* Staggered form reveal */
        .contact-card form > * {
            opacity: 0;
            transform: translateY(20px);
            transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
        }
        .contact-card.is-visible form > * { opacity: 1; transform: translateY(0); }
        .contact-card.is-visible form > div:nth-child(1) { transition-delay: 0.25s; }
        .contact-card.is-visible form > div:nth-child(2) { transition-delay: 0.35s; }
        .contact-card.is-visible form > div:nth-child(3) { transition-delay: 0.45s; }
        .contact-card.is-visible form > div:nth-child(4) { transition-delay: 0.55s; }

        /* Inputs */
        .form-input {
            transition: border-color 0.3s ease-out, box-shadow 0.3s ease-out;
        }
        .form-input:focus {
            outline: none;
            background: rgba(255,255,255,0.12);
            color: rgba(255, 255, 255, 0.925);
            border-color: rgba(0, 247, 255, 0.8) !important;
            box-shadow: 0 0 18px rgba(0, 247, 255, 0.35), inset 0 0 6px rgba(0, 247, 255, 0.4);
        }
        .form-input::placeholder { transition: opacity 0.3s ease, transform 0.3s ease; }
        .form-input:focus::placeholder { opacity: 0.1; transform: translateY(-3px); }

        /* Contact number - intl-tel-input theming */
        .iti {
            width: 100%;
            --iti-border-color: rgba(0, 247, 255, 0.3);
            --iti-dropdown-bg: #0d1117;
            --iti-hover-color: rgba(0, 247, 255, 0.15);
            --iti-icon-color: #9ca3af;
            --iti-dialcode-color: #6b7280;
            --iti-spacer-horizontal: 10px;
            --iti-flag-width: 20px;
            --iti-border-radius: 8px;
        }

        .iti__country-list {
            background: #0d1117;
            border: 1px solid rgba(0, 247, 255, 0.3);
            box-shadow: 0 0 20px rgba(0, 247, 255, 0.15);
            scrollbar-width: thin;
            scrollbar-color: rgba(0, 247, 255, 0.15) transparent;
        }

        .iti__country {
            color: #e5e7eb;
            font-size: 14px;
        }

        .iti__country.iti__highlight {
            background-color: rgba(0, 247, 255, 0.15) !important;
        }

        .iti__dial-code {
            color: #6b7280;
            font-size: 14px;
        }

        .iti__selected-flag {
            background: transparent !important;
            border-right: 1px solid rgba(0, 247, 255, 0.2);
        }

        .iti__selected-dial-code {
            font-size: 15px;
        }

        .iti__search-input {
            background: #0d1117 !important;
            color: #e5e7eb !important;
            border: none !important;
            border-bottom: 1px solid rgba(0, 247, 255, 0.2) !important;
            outline: none !important;
            font-size: 14px;
        }

        .iti__search-input::placeholder {
            color: #6b7280;
        }

        .iti__divider {
            border-bottom: 1px solid rgba(0, 247, 255, 0.15) !important;
        }

        .form-input.input-error {
            border-color: rgba(248, 113, 113, 0.8) !important;
            box-shadow: 0 0 10px rgba(248, 113, 113, 0.25);
        }

        /* Prevent iOS Safari auto-zoom on input focus */
        @media (max-width: 768px) {
            .form-input,
            .iti__search-input,
            textarea#message {
                font-size: 16px !important;
            }
        }

        /* Country dropdown scrollbar */
        .iti__country-list::-webkit-scrollbar,
        .iti__dropdown-content::-webkit-scrollbar {
            width: 6px;
        }
        .iti__country-list::-webkit-scrollbar-track,
        .iti__dropdown-content::-webkit-scrollbar-track {
            background: transparent;
        }
        .iti__country-list::-webkit-scrollbar-thumb,
        .iti__dropdown-content::-webkit-scrollbar-thumb {
            background: rgba(0, 247, 255, 0.15);
            border-radius: 3px;
        }
        .iti__country-list::-webkit-scrollbar-thumb:hover,
        .iti__dropdown-content::-webkit-scrollbar-thumb:hover {
            background: rgba(0, 247, 255, 0.35);
        }
        
        /* Message box scrollbar */
        #message {
            resize: none !important;
            overflow-y: auto !important;
        }
        #message::-webkit-scrollbar { width: 6px; }
        #message::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 3px; }
        #message::-webkit-scrollbar-thumb { background: rgba(0, 247, 255, 0.4); border-radius: 3px; }
        #message::-webkit-scrollbar-thumb:hover { background: rgba(0, 247, 255, 0.7); }


        /* =========================================
           7. FEATURE: AI CHAT WIDGET
           ========================================= */

        /* Docking & Container */
        #ai-chat-widget-container {
            position: fixed;
            bottom: 5px;
            left: 0;
            right: 0;
            z-index: 100;
        }
        #ai-chat-widget-container.is-docked {
            position: absolute;
            bottom: 0;
            transform: none !important;
        }
        #ai-chat-widget {
            opacity: 0;
            transform: translateY(20px);
            animation: cinematic-reveal 1s cubic-bezier(0.22, 1, 0.36, 1) 1.5s forwards;
            transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
        }

        /* Glassmorphic Shell */
        .chat-container {
            width: 100%;
            background: linear-gradient(145deg, rgba(20, 40, 65, 0.85), rgba(5, 20, 42, 0.9));
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            border: 1px solid rgba(0, 247, 255, 0.25);
            border-radius: 16px;
            box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08),
                        0 10px 25px rgba(0,0,0,0.3),
                        0 0 20px rgba(0, 247, 255, 0.25),
                        0 0 40px rgba(0, 247, 255, 0.15);
            overflow: hidden;
        }

        /* Header & Body */
        .chat-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem 1rem;
            border-bottom: 1px solid rgba(0, 247, 255, 0.2);
        }
        #chat-close-button {
            color: rgba(255, 255, 255, 0.6);
            cursor: pointer;
            transition: color 0.3s, transform 0.3s;
            padding: 0.25rem;
        }
        #chat-close-button:hover { color: white; transform: scale(1.1); }

        .chat-window-body {
            max-height: 0;
            opacity: 0;
            margin-bottom: 0;
            overflow: hidden;
            transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
            will-change: max-height, opacity, margin;
        }
        .chat-window-body.is-open {
            max-height: 516px; /* Increased by 20% from 430px */
            opacity: 1;
            margin-bottom: 0;
        }

        /* Messages Area */
        #chat-messages {
            height: 480px; /* Increased by 20% from 400px */
            overflow-y: auto;
            padding: 1rem;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            gap: 0.75rem;
            background-color: rgba(0, 0, 0, 0.2);
            scroll-behavior: smooth;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
            scrollbar-gutter: stable;
        }
        #chat-messages .chat-bubble:first-child { margin-top: auto; }

        /* Scrollbar (Default) */
        #chat-messages::-webkit-scrollbar { width: 6px; }
        #chat-messages::-webkit-scrollbar-track { background: rgba(0,0,0,0.2); border-radius: 3px; }
        #chat-messages::-webkit-scrollbar-thumb { background: rgba(0, 247, 255, 0.4); border-radius: 3px; }
        #chat-messages::-webkit-scrollbar-thumb:hover { background: rgba(0, 247, 255, 0.7); }

        /* Bubbles */
        .chat-bubble {
            padding: 0.75rem 1rem;
            border-radius: 12px;
            max-width: 95%;
            font-size: 0.9rem;
            line-height: 1.4;
            word-wrap: break-word;
        }
        .chat-bubble-user {
            background: linear-gradient(90deg, #0077ff, #00c6ff);
            color: white;
            align-self: flex-end;
            border-bottom-right-radius: 4px;
        }
        .chat-bubble-bot {
            background-color: rgba(255, 255, 255, 0.1);
            color: #E0E0E0;
            align-self: flex-start;
            border-bottom-left-radius: 4px;
        }
        .chat-bubble-bot ul { margin: 6px 0; padding-left: 20px; }
        .chat-bubble-bot li { margin-bottom: 4px; }
        .chat-bubble-bot a { color: #00c8ff; text-decoration: underline; }
        .chat-bubble-bot a:hover { color: #66e0ff; }

        /* Thinking Animation */
        .chat-bubble-bot.is-thinking { padding: 1rem; }
        .chat-bubble-bot.is-thinking span {
            display: inline-block;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background-color: rgba(255, 255, 255, 0.4);
            animation: thinking-dots 1.4s infinite both;
            margin: 0 1px;
        }
        .chat-bubble-bot.is-thinking span:nth-child(1) { animation-delay: 0s; }
        .chat-bubble-bot.is-thinking span:nth-child(2) { animation-delay: 0.2s; }
        .chat-bubble-bot.is-thinking span:nth-child(3) { animation-delay: 0.4s; }

        /* Chat Actions (Copy/Like/Dislike) */
        .chat-actions {
            display: flex;
            gap: 10px;
            margin-top: 10px;
            padding-top: 8px;
            border-top: 1px solid rgba(255,255,255,0.05);
            justify-content: flex-start;
            opacity: 0.6;
            transition: opacity 0.3s;
        }
        .chat-bubble-bot:hover .chat-actions { opacity: 1; }
        .chat-action-btn {
            background: none;
            border: none;
            color: rgba(255,255,255,0.6);
            cursor: pointer;
            padding: 2px;
            transition: color 0.2s, transform 0.2s;
            display: flex;
            align-items: center;
        }
        .chat-action-btn:hover { color: #00f7ff; transform: scale(1.15); }
        .chat-action-btn svg { width: 15px; height: 15px; }
        .chat-action-btn.active { color: #00f7ff; filter: drop-shadow(0 0 4px #00f7ff); transform: scale(1.1); }

        /* Chat Inputs */
        .chat-input-wrapper { 
            display: flex; 
            align-items: center; 
            gap: 4px;
            padding: 0.3rem 0.5rem;
            transition: padding 0.5s cubic-bezier(0.22, 1, 0.36, 1);
        }
        .chat-window-body.is-open + .chat-input-wrapper { padding-top: 0; }

        .chat-input {
            flex-grow: 1;
            background-color: rgba(0,0,0,0.4);
            border: 1px solid rgba(0, 247, 255, 0.3);
            border-radius: 10px;
            padding: 8px 12px;
            color: white;
            font-size: 0.9rem;
            outline: none;
            transition: border-color 0.3s, box-shadow 0.3s;
        }
        .chat-input::placeholder { color: rgba(255,255,255,0.5); }
        .chat-input:focus {
            border-color: rgba(0, 247, 255, 0.7);
            box-shadow: 0 0 10px rgba(0, 247, 255, 0.2);
        }

        .send-button {
            flex-shrink: 0;
            width: 36px;
            height: 36px;
            border-radius: 50%;
            background: linear-gradient(45deg, #00aaff, #00f7ff);
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 0 8px rgba(0, 247, 255, 0.5);
            transition: transform 0.2s, box-shadow 0.3s;
        }
        .send-button:hover { 
            transform: scale(1.1); 
            box-shadow: 0 0 12px rgba(0, 247, 255, 0.8);
        }
        .send-button svg { width: 20px; height: 20px; color: white; transform: translateX(1px); }
        .send-btn-pulse { animation: pulse-send-btn 2s infinite; }


        /* =========================================
           8. ANIMATIONS (Keyframes)
           ========================================= */

        @keyframes cinematic-reveal {
            from { opacity: 0; transform: scale(0.98) translateY(20px); filter: blur(5px); }
            to { opacity: 1; transform: scale(1) translateY(0); filter: blur(0px); }
        }
        @keyframes hero-glow-pulse {
            0%, 100% { text-shadow: 0 0 15px rgba(0, 247, 255, 0.3), 0 0 25px rgba(0, 170, 255, 0.2); }
            50% { text-shadow: 0 0 20px rgba(0, 247, 255, 0.4), 0 0 35px rgba(0, 170, 255, 0.25); }
        }
        @keyframes cuttingEdgeCardReveal {
            from { opacity: 0; transform: perspective(1000px) translateX(-30px) rotateY(-25deg) scale(0.9); filter: blur(5px); }
            to { opacity: 1; transform: perspective(1000px) translateX(0) rotateY(0) scale(1); filter: blur(0); }
        }
        @keyframes scan-line {
            from { transform: translateY(-10px); }
            to { transform: translateY(100%); }
        }
        @keyframes scroll {
            from { transform: translateX(0); }
            to { transform: translateX(calc(-50%)); }
        }
        @keyframes shimmer-glow {
            0% { box-shadow: 0 0 8px rgba(0, 255, 255, 0.1), 0 0 12px rgba(0, 255, 255, 0.1); }
            50% { box-shadow: 0 0 20px rgba(0, 255, 255, 0.3), 0 0 30px rgba(0, 255, 255, 0.2); }
            100% { box-shadow: 0 0 8px rgba(0, 255, 255, 0.1), 0 0 12px rgba(0, 255, 255, 0.1); }
        }
        @keyframes thinking-dots {
            0%, 80%, 100% { transform: scale(0); }
            40% { transform: scale(1.0); }
        }
        @keyframes pulse-send-btn {
            0% { box-shadow: 0 0 0 0 rgba(0, 170, 255, 0.7), 0 0 8px rgba(0, 247, 255, 0.5); }
            70% { box-shadow: 0 0 0 10px rgba(0, 170, 255, 0), 0 0 12px rgba(0, 247, 255, 0.5); }
            100% { box-shadow: 0 0 0 0 rgba(0, 170, 255, 0), 0 0 8px rgba(0, 247, 255, 0.5); }
        }
        @keyframes menuFadeIn {
            from { opacity: 0; transform: translateY(-8px); }
            to   { opacity: 1; transform: translateY(0); }
        }


        /* =========================================
           9. RESPONSIVE & DEVICE LOGIC
           ========================================= */

        /* Tablet & Large Mobile (Under 1024px) */
        @media (max-width: 1024px) {
            #background-layer::after { background-color: rgba(0, 0, 0, 0.045); }
            #background-layer {
                /* Updated to external URL for preview */
                background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.55)), url('./Images/Javionix_background.jpg');
                background-size: cover;
                background-position: center top;
                background-repeat: no-repeat;
                height: 100vh;
            }
            .container { max-width: 100%; }
            .parallax-section { transform: none !important; transition: none; }
        }

        /* Mobile Standard (Under 768px) */
        @media (max-width: 767px) {
            /* Layout */
            nav.container a.gradient-text { font-size: 1.875rem; line-height: 2.25rem; }
            nav.container { padding-top: 10px; padding-bottom: 10px; }
            .hero-content { margin-bottom: 0; padding-bottom: 5vh; }
            .hero-text-glow { text-shadow: 0 0 10px rgba(0, 247, 255, 0.2), 0 0 15px rgba(0, 170, 255, 0.15); }
            .hero-paragraph { line-height: 1.75; text-shadow: 0 1px 3px rgba(0,0,0,0.5); }
            .grid.grid-cols-1.md:grid-cols-3.gap-8 { gap: 1.5rem; }
            
            /* Contact Section Compact */
            #contact { padding-top: 1.25rem; padding-bottom: 6rem; }
            #contact h2 { font-size: 1.75rem; line-height: 1.2; margin-bottom: 0.25rem; }
            #contact p  { margin-top: 0.25rem; }
            #contact .contact-card { padding: 16px 4px !important; } /* Reduced from 14px to 4px for wider look */
            #contact .contact-card form > div { margin-bottom: 15px; } /* Updated margin */
            #contact .btn-neon { padding: 10px 14px !important; font-size: 1rem !important; }
            
            /* Mobile fullscreen country picker fix */
            .iti--fullscreen-popup .iti__dropdown-content {
                background: #0d1117 !important;
                color: #e5e7eb !important;
                z-index: 999999 !important;
            }

            .iti--fullscreen-popup .iti__country-list {
                background: #0d1117 !important;
            }

            .iti--fullscreen-popup .iti__country {
                color: #e5e7eb !important;
                font-size: 15px !important;
                padding: 10px 14px !important;
            }

            .iti--fullscreen-popup .iti__search-input {
                background: #0d1117 !important;
                color: #e5e7eb !important;
                font-size: 16px !important;
                border-bottom: 1px solid rgba(0, 247, 255, 0.25) !important;
            }
                        /* REMOVED: Conflicting Mobile Input Styles to fix alignment and height */
            /* The previous CSS here was forcing inputs to be taller (padding: 10px), causing icon misalignment */

            /* Footer */
            footer { padding-top: 0.35rem !important; padding-bottom: 0.35rem !important; }
            
            /* Logos */
            .logo-scroller { height: 70px; padding: 8px 18px; }
            .logo-scroller-inner { gap: 73px; }
            .logo-item img { height: 30px; }

            /* Chat Widget Compact */
            .chat-input-wrapper { padding: 0.4rem 0.6rem; gap: 4px; }
            /* Adjusted height to prevent clipping and added padding for gap */
            #chat-messages { height: 358px; padding-bottom: 20px; } /* Increased by 10% from 325px */
            .chat-window-body.is-open { max-height: 429px; } /* Increased by 10% from 390px */
            /* Override for really tall mobiles */
            @media (min-height: 800px) {
                #chat-messages { height: 450px; }
                .chat-window-body.is-open { max-height: 920px; }
            }
        }

        /* Smallest Mobiles */
        @media (max-width: 480px) {
            .chat-input { font-size: 16px !important; } /* Prevent iOS zoom */
        }
        @media (max-width: 390px) {
            .hero-content h1 { font-size: 2.5rem; line-height: 1.1; } 
        }

        /* Reduced Motion */
        @media (prefers-reduced-motion: reduce) {
            * { animation: none !important; transition: none !important; }
            .parallax-section { transform: none !important; }
        }

        /* Device-Specific Chat Scroll Fixes */
        @supports (-webkit-touch-callout: none) {
            #chat-messages {
                overflow-y: scroll !important;
                -webkit-overflow-scrolling: touch !important;
                touch-action: pan-y !important;
                display: flex !important;
                flex-direction: column !important;
                justify-content: flex-start !important;
            }
        }
        @media (hover: none) and (pointer: coarse) {
            /* Android Scrollbar Hiding */
            #chat-messages {
                -webkit-scrollbar-width: none !important;
                mask-image: linear-gradient(black, black) !important;
                -webkit-mask-image: linear-gradient(black, black) !important;
                scrollbar-width: none !important;
            }
            #chat-messages::-webkit-scrollbar,
            #chat-messages::-webkit-scrollbar-track,
            #chat-messages::-webkit-scrollbar-thumb {
                width: 0 !important; background: transparent !important;
            }
        }
        @media (hover: hover) and (pointer: fine) {
            #chat-messages { padding-bottom: 40px !important; }
        }