/* --- HEADER VISIBILITY FIX --- */
    .uc-navbar-main {
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(226, 232, 240, 0.8) !important;
    }

    :root {
        /* FOOD PALETTE (Appetizing) */
        --rm-food-red: #E11D48;      /* Primary Red */
        --rm-food-orange: #F97316;   /* Orange */
        --rm-food-yellow: #F59E0B;   /* Mustard Yellow */
        
        /* AIPSOFT BRAND (Professional Tech) */
        --rm-tech-navy: #0A0045;     /* Deep Navy */
        --rm-tech-purple: #5334D1;   /* Brand Purple */
        --rm-tech-pink: #C5299D;     /* Brand Pink */
        
        /* UTILITIES */
        --rm-text-main: #0F172A;
        --rm-text-muted: #64748B;
        --rm-bg-light: #FFF7ED;      /* Very subtle warm tint */
        
        /* FOOD GRADIENT (For CTA) */
        --rm-gradient-food: linear-gradient(135deg, #E11D48 0%, #F97316 50%, #F59E0B 100%);
        /* TECH GRADIENT (For AI Section) */
        --rm-gradient-tech: linear-gradient(135deg, #0A0045 0%, #5334D1 100%);
    }

    /* Base Layout */
    .rm-wrapper {
        font-family: 'Lexend', sans-serif;
        color: var(--rm-text-main);
        background-color: #FFFFFF;
        overflow-x: hidden;
        line-height: 1.6;
    }

    .rm-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 24px;
        position: relative;
        z-index: 2;
    }

    /* Typography */
    .rm-title {
        font-size: 3.5rem;
        font-weight: 700;
        line-height: 1.1;
        letter-spacing: -0.02em;
        margin-bottom: 1.5rem;
        color: var(--rm-tech-navy);
    }
    
    .rm-subtitle {
        font-size: 1.25rem;
        color: var(--rm-text-muted);
        line-height: 1.6;
        max-width: 650px;
        margin: 0 auto 2.5rem;
    }

    .rm-section-title {
        font-size: 2.25rem;
        font-weight: 700;
        margin-bottom: 1rem;
        color: var(--rm-tech-navy);
    }

    .rm-text-center { text-align: center; }

    .rm-badge {
        display: inline-flex;
        align-items: center;
        padding: 8px 20px;
        background: #FFF1F2;
        color: var(--rm-food-red);
        border: 1px solid rgba(225, 29, 72, 0.2);
        border-radius: 100px;
        font-size: 0.85rem;
        font-weight: 600;
        margin-bottom: 24px;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

    /* Buttons - ALL ANIMATED */
    .rm-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 14px 36px;
        border-radius: 50px;
        font-weight: 600;
        text-decoration: none !important;
        transition: all 0.3s ease;
        gap: 10px;
        font-size: 1rem;
    }

    /* Standard Button Styles */
    .rm-btn-primary {
        background: var(--rm-food-red);
        color: white !important;
        box-shadow: 0 4px 15px rgba(225, 29, 72, 0.3);
        border: none;
    }
    .rm-btn-primary:hover {
        background: #BE123C;
        transform: translateY(-3px);
        box-shadow: 0 8px 25px rgba(225, 29, 72, 0.5);
    }

    .rm-btn-outline {
        background: white;
        border: 1px solid #E2E8F0;
        color: var(--rm-tech-navy) !important;
    }
    .rm-btn-outline:hover {
        border-color: var(--rm-food-red);
        background: #FFF1F2;
        color: var(--rm-food-red) !important;
        transform: translateY(-3px);
        box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    }
    
    /* CTA White Buttons */
    .rm-btn-white {
        background: white;
        color: var(--rm-food-red) !important;
        border: 1px solid white;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }
    .rm-btn-white:hover {
        background: #FFF1F2;
        transform: translateY(-3px);
        box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    }

    .rm-btn-white-outline {
        background: transparent;
        border: 1px solid white;
        color: white !important;
    }
    .rm-btn-white-outline:hover {
        background: rgba(255,255,255,0.1);
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    
    .rm-btn-glass {
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: white !important;
    }
    .rm-btn-glass:hover {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-3px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    }
    
    /* Learn More Text Link Button - Animated */
    .rm-btn-text {
        background: transparent;
        color: var(--rm-tech-navy) !important;
        font-weight: 600;
        padding: 10px 20px;
        border: 1px solid #E2E8F0;
        border-radius: 50px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        transition: all 0.3s;
    }
    .rm-btn-text:hover {
        border-color: var(--rm-food-yellow);
        color: var(--rm-food-orange) !important;
        background: #FFFBEB;
        transform: translateY(-2px);
        box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    }

    /* SECTION: HERO */
    .rm-hero {
        padding: 160px 0 100px;
        text-align: center;
        position: relative;
        overflow: hidden;
    }

    /* Professional Background with Light Texture */
    .rm-hero-bg {
        position: absolute;
        inset: 0;
        /* Subtle restaurant texture */
        background-image: url('https://images.unsplash.com/photo-1552566626-52f8b828add9?auto=format&fit=crop&w=2000&q=80');
        background-size: cover;
        background-position: center;
        opacity: 0.05; /* Very light opacity for professional look */
        z-index: 0;
    }
    
    /* Overlay gradient for tint */
    .rm-hero-overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(255,247,237,0.95) 100%);
        z-index: 1;
    }

    /* --- 3D HERO VISUAL COMPOSITION --- */
    .rm-hero-visual-wrapper {
        margin-top: 60px;
        position: relative;
        height: 600px;
        width: 100%;
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
        perspective: 1500px;
        transform-style: preserve-3d;
        z-index: 10;
    }

    .rm-vis-item {
        position: absolute;
        transition: all 0.5s ease;
        border: none !important; /* Explicitly removing borders */
    }
    
    .rm-vis-item img {
        width: 100%;
        height: auto;
        display: block;
        /* Updated: Smoother shadow without negative spread to avoid "line" effect */
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15); 
        border-radius: 12px;
    }
    
    /* Phone specific styling */
    .rm-vis-phone img { 
        border-radius: 35px; 
        box-shadow: 0 25px 60px rgba(15, 23, 42, 0.2);
    }

    /* 1. Main Dashboard (Center Back) */
    .rm-vis-dashboard {
        width: 65%;
        top: 40px;
        left: 17.5%;
        z-index: 2;
        transform: translateZ(-40px);
        animation: float-main 8s ease-in-out infinite;
    }

    /* 2. Kitchen Display (Left Tilted - Adjusted Size) */
    .rm-vis-kds {
        width: 22%; /* Reduced width */
        top: 130px; /* Moved down slightly */
        left: 5%; /* Moved in slightly */
        z-index: 3;
        transform: rotateY(15deg);
        animation: float-side 7s ease-in-out infinite;
    }

    /* 3. Driver App (Right Phone) */
    .rm-vis-driver {
        width: 220px;
        bottom: 40px;
        right: 8%;
        z-index: 4;
        transform: rotateY(-15deg) translateZ(30px);
        animation: float-front 6s ease-in-out infinite;
    }

    /* 4. KOT Ticket (Floating Top Right - Adjusted) */
    .rm-vis-kot {
        width: 160px;
        top: -30px; /* Moved up as requested */
        right: 18%;
        z-index: 1;
        transform: rotateZ(8deg);
        opacity: 0.95;
        animation: float-back 9s ease-in-out infinite;
    }

    /* 5. Incoming Call (Floating Top Left) */
    .rm-vis-call {
        width: 260px;
        top: 10px; 
        left: 10%; 
        z-index: 10;
        animation: float-pulse 5s ease-in-out infinite;
    }

    @keyframes float-main { 0%, 100% { transform: translateY(0) translateZ(-40px); } 50% { transform: translateY(-15px) translateZ(-40px); } }
    @keyframes float-side { 0%, 100% { transform: translateY(0) rotateY(15deg); } 50% { transform: translateY(-20px) rotateY(15deg); } }
    @keyframes float-front { 0%, 100% { transform: translateY(0) rotateY(-15deg) translateZ(30px); } 50% { transform: translateY(-15px) rotateY(-15deg) translateZ(30px); } }
    @keyframes float-back { 0%, 100% { transform: translateY(0) rotateZ(8deg); } 50% { transform: translateY(-10px) rotateZ(12deg); } }
    @keyframes float-pulse { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

    /* SECTION: TRUSTED CLIENTS */
    .rm-clients-section {
        padding: 60px 0;
        background-color: #f8fafc;
        border-top: 1px solid #e2e8f0;
        border-bottom: 1px solid #e2e8f0;
        position: relative;
        z-index: 5;
    }

    .rm-clients-header {
        text-align: center;
        margin-bottom: 40px;
    }

    .rm-marquee-wrapper {
        width: 100%;
        display: inline-flex;
        flex-wrap: nowrap;
        overflow: hidden;
        mask-image: linear-gradient(to right, transparent 0, black 128px, black calc(100% - 128px), transparent 100%);
        -webkit-mask-image: linear-gradient(to right, transparent 0, black 128px, black calc(100% - 128px), transparent 100%);
    }

    .rm-marquee-content {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        margin: 0;
        list-style: none;
        animation: rm-scroll 30s linear infinite;
    }

    .rm-marquee-content li { margin: 0 40px; flex-shrink: 0; }
    .rm-marquee-content img { height: 40px; width: auto; transition: 0.3s; }
    .rm-marquee-content img:hover { opacity: 1; filter: grayscale(0%); }
    
    @keyframes rm-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

    /* SECTION: AI SPOTLIGHT (AiPSoft Brand Colors) */
    .rm-spotlight {
        margin: 100px 0;
        background: var(--rm-gradient-tech); /* AiPSoft Navy/Purple */
        border-radius: 24px;
        overflow: hidden;
        color: white;
        box-shadow: 0 20px 50px -10px rgba(10, 0, 69, 0.4);
    }
    
    .rm-spotlight-inner {
        display: flex;
        align-items: center;
    }
    
    .rm-spotlight-content {
        padding: 80px 60px;
        flex: 1;
        position: relative;
        z-index: 2;
    }
    
    .rm-spotlight-image {
        flex: 1;
        height: 500px;
        position: relative;
    }
    
    .rm-spotlight-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .rm-check-list { list-style: none; padding: 0; margin: 30px 0; }
    .rm-check-list li {
        display: flex;
        gap: 15px;
        margin-bottom: 20px;
        font-size: 1.05rem;
        color: #E0E7FF;
    }
    .rm-check-list i { color: #A855F7; margin-top: 5px; } 

    /* SECTION: FEATURES GRID */
    .rm-features-section { padding: 100px 0; background: #fffcf8; /* Very light cream */ }
    
    .rm-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }

    .rm-card {
        background: white;
        padding: 40px;
        border-radius: 16px;
        border: 1px solid #F1F5F9;
        transition: all 0.3s ease;
        display: flex;
        flex-direction: column;
        position: relative;
        overflow: hidden;
        text-decoration: none !important;
    }
    
    .rm-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.05);
        border-color: var(--rm-food-red);
    }
    
    /* Removed ::before underline as requested */

    .rm-icon-box {
        width: 60px;
        height: 60px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        margin-bottom: 25px;
    }

    .rm-card-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; color: var(--rm-secondary); }
    .rm-card-text { color: var(--rm-text-muted); font-size: 0.95rem; margin-bottom: 20px; flex-grow: 1; }
    
    .rm-read-more {
        color: var(--rm-food-red);
        font-weight: 600;
        font-size: 0.9rem;
        display: flex;
        align-items: center;
        gap: 8px;
        transition: gap 0.2s;
    }
    .rm-card:hover .rm-read-more { gap: 12px; }

    /* CTA Section - Food Gradient */
    .rm-cta {
        padding: 100px 0;
        background: var(--rm-gradient-food);
        text-align: center;
        position: relative;
    }
    .rm-cta h2, .rm-cta p { color: white; }

/* ------------------------------ MODAL DEMO -------------------------------------- */


    .uc-modal.uc-open {
        background: rgba(15, 23, 42, 0.85) !important;
        backdrop-filter: blur(4px);
    }

    .rs-modal-card {
        background: white;
        border-radius: 16px;
        overflow: hidden;
        max-width: 820px;
        width: 95%;
        display: flex; /* Keeps image left, form right */
        border: none;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    }

    .rs-modal-left {
        width: 40%;
        padding: 0 !important;
        position: relative;
        min-height: 100%;
        overflow: hidden;
        background-color: #000; /* Backdrop for image */
        display: block;
    }

    .rs-modal-left img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .rs-modal-right {
        width: 60%;
        background: white;
        padding: 25px 30px; /* Tighter padding for height reduction */
        position: relative;
        overflow-y: auto;
    }

    /* Uniform Form Height (Strict 40px) */
    #demoForm.vstack { gap: 10px !important; }
    
    #demoForm .form-control,
    #demoForm .form-select,
    #demoForm input[type="text"],
    #demoForm input[type="email"],
    #demoForm input[type="tel"],
    #demoForm input[type="number"],
    #demoForm .h-48px { 
        height: 40px !important; 
        min-height: 40px !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        font-size: 14px !important;
        line-height: 40px !important;
    }

    /* Icon Alignment Fix for 40px Height */
    .form-icon-group { position: relative; }
    .form-icon-group i {
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: #94a3b8;
        font-size: 0.85rem;
        pointer-events: none;
        z-index: 5;
    }
    .form-icon-group .form-control, 
    .form-icon-group .form-select { padding-left: 40px !important; }

    .rs-submit-btn {
        /*background-color: var(--rs-submit-yellow) !important;*/
        color: white !important;
        font-weight: 700 !important;
        height: 44px;
        border-radius: 8px !important;
        transition: all 0.2s;
        border: none !important;
        font-size: 14px;
        cursor: pointer;
    }
    .rs-submit-btn:hover { background-color: #8e54d7 !important; transform: translateY(-2px); }



/* 2. Branded Submit Button Style */
.rs-modal-submit-btn {
    background-color: var(--rs-tadkeer-green) !important; /* Matches aipsoft-color */
    color: white !important;
    font-weight: 700 !important;
    height: 48px !important;
    border-radius: 10px !important;
    transition: all 0.2s;
    border: none !important;
    font-size: 1rem;
    cursor: pointer;
}

.rs-modal-submit-btn:hover {
    background-color: #8e54d7 !important;
    transform: translateY(-2px);
}


/* Modal Overlay */
.rs-video-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.6); /* Dimmed backdrop */
    backdrop-filter: blur(4px); /* Light blur as requested */
    z-index: 10001;
    align-items: center;
    justify-content: center;
}

.rs-video-modal.active { display: flex !important; }

/* Video Container */
.rs-video-container {
    position: relative;
    width: 90%;
    max-width: 1000px;
    background: #000;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

.rs-video-container video { 
    width: 100%; 
    display: block; 
    border-radius: 16px; 
}

/* Close Button */
.rs-video-close-btn {
    position: absolute;
    top: -45px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    transition: 0.2s;
}

/* Mobile Responsive - YouTube style */
@media (max-width: 767px) {
    .rs-video-container {
        width: 100%;
        border-radius: 0;
    }
    .rs-video-container video { border-radius: 0; }
    .rs-video-close-btn {
        top: 10px;
        right: 10px;
        background: rgba(0,0,0,0.5);
        width: 35px;
        height: 35px;
        border-radius: 50%;
        font-size: 20px;
        z-index: 10;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}



    /* Responsive */
    @media (max-width: 991px) {
        .rm-title { font-size: 2.5rem; }
        .rm-hero { padding-top: 120px; }
        .rm-hero-visual-wrapper { height: auto; display: flex; flex-direction: column; gap: 30px; margin-top: 60px; transform-style: flat; perspective: none; }
        .rm-vis-item { position: relative; top: auto !important; left: auto !important; right: auto !important; bottom: auto !important; transform: none !important; width: 100% !important; animation: none !important; margin-bottom: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.1) !important; }
        .rm-vis-kot { display: none; }
        .rm-vis-driver { width: 60% !important; margin: 0 auto; border-radius: 20px; }
        
        .rm-spotlight-inner { flex-direction: column-reverse; }
        .rm-spotlight-image { height: 300px; width: 100%; }
        .rm-spotlight-content { padding: 40px 30px; }
        .rm-grid { grid-template-columns: 1fr; }

        /* --- MODAL LAYOUT REFINEMENTS --- */
        .uc-modal.uc-open {
            background: rgba(15, 23, 42, 0.8) !important;
            backdrop-filter: blur(4px);
        }
        
        .rs-hero-title { font-size: 2.5rem; }
        .rs-hero-layout, .rs-zigzag-row, .rs-zigzag-row.reverse { flex-direction: column; text-align: center; }
        .rs-hero-text { text-align: center; }
        .rs-hero-visuals { width: 100%; min-height: 350px; margin-top: 40px; }
        
        .rs-mobile-center { justify-content: center !important; }
        
        .rs-btn { 
            width: auto; /* Let content dictate width */
            min-width: 140px; /* Minimum width for tap targets */
            max-width: 100%; /* Prevent overflow */
            margin-bottom: 0; /* Remove rigid margin, rely on flex gap */
            padding: 12px 20px; /* Slightly compact padding */
            flex: 1 0 auto; /* Allow growth to fill rows evenly */
            white-space: nowrap; /* Keep text on one line if possible */
            font-size: 0.95rem;
        }
        .rs-btn-learn {
            flex: 0 1 auto !important;
            min-width: auto !important;
        }
        
        .rs-container { padding: 0 15px; }
        
        .rs-checklist { display: inline-block; text-align: left; }
        .rs-section-title { font-size: 2rem; }
        .rs-d-flex.rs-align-center.gap-4 { justify-content: center; }
        
        .rs-badge-pill { margin: 0 auto 20px; }
        .rs-hero-features-list { justify-content: center; display: flex; flex-wrap: wrap; gap: 10px; }
        
        .rs-img-mobile { width: 25%; left: 0; top: -10px; }
        .rs-img-pos { width: 45%; right: 0; bottom: -10px; }
        
        /* Clients Section Adjustments for Mobile */
        .rm-clients-title { font-size: 1.75rem; }
        .rm-marquee-content img { height: 36px; }
        .rm-marquee-content li { margin: 0 15px; }

        .rs-modal-left { display: none !important; }
        .rs-modal-right { width: 100% !important; padding: 25px 20px; }
        .rs-modal-card { max-width: 450px; }
        
        .rs-hero-title { font-size: 2.5rem; }
        .rs-hero-layout, .rs-zigzag-row, .rs-zigzag-row.reverse { flex-direction: column; text-align: center; }
        .rs-hero-text { text-align: center; }
        .rs-hero-visuals { width: 100%; min-height: 350px; margin-top: 40px; }
        .rs-mobile-center { justify-content: center !important; }
        .rs-btn { width: auto; min-width: 140px; max-width: 100%; padding: 12px 20px; flex: 1 0 auto; white-space: nowrap; font-size: 0.95rem; }

    }

    /* Breadcrumbs (Uses rs- class to match PHP, but rm- variables for theme) */
    .rs-breadcrumbs {
        display: flex;
        align-items: center;
        justify-content: center; /* Centered to match the restaurant hero */
        flex-wrap: wrap;
        gap: 10px;
        font-size: 0.95rem;
        font-weight: 500;
        margin-bottom: 25px;
        color: var(--rm-text-muted); 
        flex-direction: <?php echo ($lang == 'ar') ? 'row-reverse' : 'row'; ?>; /* RTL Support */
    }

    .rs-breadcrumbs a {
        color: #2563EB; /* Changed to standard AiPSoft bright blue */
        text-decoration: none;
        transition: color 0.2s ease;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        flex-direction: <?php echo ($lang == 'ar') ? 'row-reverse' : 'row'; ?>; /* RTL Support */
    }

    .rs-breadcrumbs a:hover {
        color: var(--rm-food-red); /* Restaurant red on hover */
        text-decoration: underline;
    }

    .rs-breadcrumbs .rs-separator {
        color: #94a3b8;
        font-size: 0.8rem;
        transform: <?php echo ($lang == 'ar') ? 'rotate(180deg)' : 'none'; ?>; /* Flip arrows for Arabic */
    }

    .rs-breadcrumbs .rs-current {
        color: var(--rm-text-main); 
    }