/* --- 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;
    }

    /* =========================================
       RETAIL SOLUTIONS CUSTOM STYLES
       Scoped with 'rs-' prefix to avoid conflicts
       ========================================= */
    :root {
        --rs-color-primary: #2563EB; /* AiPSoft Blue */
        --rs-color-primary-dark: #1d4ed8;
        --rs-color-secondary: #1E293B;
        --rs-color-dark: #0F172A;
        --rs-color-light: #F8FAFC;
        --rs-color-text: #475569;
        --rs-color-white: #ffffff;
        --rs-tadkeer-green: #178d72; /* Sourced from your theme */
        --rs-gradient-text: linear-gradient(to right, #2563EB, #9333ea);
    }

    /* Utilities */
    .rs-text-center { text-align: center; }
    .rs-d-flex { display: flex; }
    .rs-align-center { align-items: center; }
    .rs-justify-center { justify-content: center; }
    .rs-flex-wrap { flex-wrap: wrap; }
    .rs-gap-2 { gap: 10px; }
    .rs-relative { position: relative; }
    
    /* Container for Redesigned Sections */
    .rs-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
        position: relative;
    }

    /* Buttons (Scoped) - ANIMATED */
    .rs-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 14px 30px;
        border-radius: 12px;
        font-weight: 600;
        cursor: pointer;
        gap: 10px;
        transition: all 0.3s ease;
        font-size: 1rem;
        text-decoration: none !important;
    }

    .rs-btn-primary {
        background-color: var(--rs-color-primary);
        color: white !important;
        border: none;
        box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
    }

    .rs-btn-primary:hover {
        background-color: var(--rs-color-primary-dark);
        transform: translateY(-2px); /* Lift animation */
        color: white !important;
        box-shadow: 0 15px 30px -5px rgba(37, 99, 235, 0.5);
    }

    .rs-btn-outline {
        background-color: transparent;
        border: 1px solid #e2e8f0;
        color: var(--rs-color-secondary) !important;
    }

    .rs-btn-outline:hover {
        background-color: #f1f5f9;
        border-color: #cbd5e1;
        color: var(--rs-color-primary) !important;
        transform: translateY(-2px); /* Lift animation */
    }

    /* New CTA Button Styles for Dark Backgrounds */
    .rs-btn-white {
        background: white;
        color: var(--rs-color-dark) !important;
        border: 1px solid white;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }
    .rs-btn-white:hover {
        background: #F8FAFC;
        transform: translateY(-3px); /* Lift animation */
        box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    }

    .rs-btn-white-outline {
        background: transparent;
        border: 1px solid rgba(255,255,255,0.5);
        color: white !important;
    }
    .rs-btn-white-outline:hover {
        background: rgba(255,255,255,0.1);
        border-color: white;
        transform: translateY(-3px); /* Lift animation */
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }

    .rs-btn-sm {
        padding: 10px 24px;
        font-size: 0.9rem;
    }

    /* Hero Section */
    .rs-hero-section {
        padding: 140px 0 100px; /* Increased padding to clear header */
        position: relative;
        background: transparent; 
    }

    .rs-blob {
        position: absolute;
        border-radius: 50%;
        filter: blur(80px);
        z-index: -1;
        opacity: 0.5;
        pointer-events: none;
    }
    .rs-blob-1 { top: -50px; left: -50px; width: 400px; height: 400px; background: #bfdbfe; }
    .rs-blob-2 { bottom: -150px; right: -100px; width: 600px; height: 600px; background: #e9d5ff; }

    .rs-hero-layout {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 60px;
        position: relative;
        z-index: 1;
    }

    .rs-hero-text { flex: 1; min-width: 300px; }
    .rs-hero-visuals { flex: 1; min-width: 300px; position: relative; min-height: 450px; }

    .rs-badge-pill {
        display: inline-flex;
        align-items: center;
        padding: 6px 14px;
        background: #eff6ff;
        color: var(--rs-color-primary);
        border-radius: 50px;
        font-size: 0.85rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-bottom: 20px;
    }
    .rs-badge-dot { width: 8px; height: 8px; background: var(--rs-color-primary); border-radius: 50%; margin-right: 8px; }

    .rs-hero-title {
        font-size: 3.5rem;
        font-weight: 700;
        color: var(--rs-color-dark);
        margin-bottom: 20px;
        line-height: 1.2;
    }
    
    .rs-gradient-span {
        background: var(--rs-gradient-text);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .rs-hero-features-list {
        margin-top: 30px;
        color: #64748b;
        font-size: 0.9rem;
    }
    .rs-hero-features-list i { color: #22c55e; margin-right: 5px; }
    .rs-hero-features-list span { margin: 0 10px; opacity: 0.5; }

    /* Video Placeholder */
    .rs-video-wrapper {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        z-index: 10;
    }

    .rs-video-placeholder {
        width: 100%;
        aspect-ratio: 16/9;
        background-color: #1e293b;
        border-radius: 16px;
        border: 1px solid rgba(255,255,255,0.1);
        position: relative;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    }
    
    .rs-video-bg {
        position: absolute;
        inset: 0;
        background-image: url('../..//assets/images/software_images/aipsoft_video_thumbnail.png');
        background-size: cover;
        background-position: center;
        opacity: 0.4;
    }

    .rs-play-btn-circle {
        width: 70px;
        height: 70px;
        background: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--rs-color-primary);
        font-size: 24px;
        padding-left: 5px;
        cursor: pointer;
        transition: transform 0.3s;
        animation: rs-pulse 2s infinite;
    }
    
    @keyframes rs-pulse {
        0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
        70% { box-shadow: 0 0 0 15px rgba(37, 99, 235, 0); }
        100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
    }

    /* Floating Images */
    .rs-floating-img {
        position: absolute;
        border-radius: 12px;
        /*box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);*/
        /*border: 4px solid white;*/
        z-index: 20;
        transition: transform 0.3s ease;
        object-fit: cover;
    }
    .rs-floating-img:hover { transform: scale(1.05); z-index: 25; }
    
    .rs-img-pos { bottom: -30px; right: -20px; width: 60%; height: auto; }
    .rs-img-mobile { top: -30px; left: -30px; width: 35%; height: auto; }

    .rs-floating-badge {
        position: absolute;
        top: 20px;
        right: 0;
        background: white;
        padding: 12px 20px;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        display: flex;
        align-items: center;
        gap: 12px;
        z-index: 30;
        animation: rs-bounce 3s infinite;
    }
    @keyframes rs-bounce {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-10px); }
    }
    
    .rs-badge-icon {
        background: #dcfce7;
        color: #16a34a;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Clients Section (Marquee) */
    .rs-clients-section {
        padding: 60px 0;
        background-color: #f8fafc;
        border-top: 1px solid #e2e8f0;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .rs-clients-header {
        text-align: center;
        margin-bottom: 40px;
    }
    
    .rs-clients-subtitle {
        color: var(--rs-tadkeer-green);
        font-weight: 600;
        font-size: 1rem;
        display: block;
        margin-bottom: 10px;
        text-transform: uppercase;
        letter-spacing: 1px;
    }
    
    .rs-clients-title {
        font-size: 2rem;
        font-weight: 700;
        color: var(--rs-color-dark);
        margin: 0;
    }
    
    .rs-marquee-wrapper {
        width: 100%;
        display: inline-flex;
        flex-wrap: nowrap;
        overflow: hidden;
        /* Gradient mask for smooth fade in/out on sides */
        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%);
    }
    
    .rs-marquee-content {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        margin: 0;
        list-style: none;
        animation: rs-scroll 30s linear infinite;
    }
    
    .rs-marquee-content li { margin: 0 40px; flex-shrink: 0; }
    .rs-marquee-content img { height: 40px; width: auto; transition: 0.3s; }
    .rs-marquee-content img:hover { opacity: 1; filter: grayscale(0%); }
    
    @keyframes rs-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }


    /* Features Grid */
    .rs-features-section { padding: 100px 0; background: white; }
    .rs-section-header { text-align: center; max-width: 700px; margin: 0 auto 60px; }
    .rs-section-title { font-size: 2.5rem; font-weight: 700; color: var(--rs-color-dark); margin-bottom: 15px; line-height: 1.2; }

    .rs-features-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
    }

    /* Updated Card to be 'A' tag */
    .rs-feature-card {
        background: white;
        padding: 30px;
        border-radius: 16px;
        border: 1px solid #f1f5f9;
        transition: all 0.3s ease;
        display: flex;
        flex-direction: column;
        text-decoration: none !important; /* Ensure link underline doesn't show */
        color: var(--rs-color-text); /* Reset text color */
        position: relative; /* For corner icon positioning */
        overflow: hidden; /* Ensure corner icon doesn't spill out (optional) */
    }
    .rs-feature-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 40px -10px rgba(0,0,0,0.08);
        border-color: #e2e8f0;
    }
    
    .rs-feature-icon-box {
        width: 56px;
        height: 56px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        margin-bottom: 20px;
    }
    /* Icon box colors */
    .rs-bg-blue { background: #eff6ff; color: #2563EB; }
    .rs-bg-purple { background: #f3e8ff; color: #9333ea; }
    .rs-bg-orange { background: #ffedd5; color: #ea580c; }
    .rs-bg-teal { background: #ccfbf1; color: #0d9488; }
    .rs-bg-pink { background: #fce7f3; color: #db2777; }
    .rs-bg-indigo { background: #e0e7ff; color: #4f46e5; }

    .rs-feature-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; color: var(--rs-color-dark); }
    .rs-feature-desc { font-size: 0.95rem; color: #64748b; margin-bottom: 0; }

    /* Corner Arrow Button Style */
    .rs-corner-arrow {
        position: absolute;
        bottom: 0;
        right: 0;
        width: 50px;
        height: 50px;
        background: #F8FAFC; /* Light gray background initially */
        display: flex;
        align-items: center;
        justify-content: center;
        border-top-left-radius: 16px; /* Smooth curve into the card */
        color: var(--rs-color-text);
        transition: all 0.3s ease;
    }
    body.ar_selected .rs-corner-arrow
    {
        left: 0 !important;
        right: auto !important;
    }
    .rs-corner-arrow i {
        font-size: 1.1rem;
        transition: transform 0.3s ease;
    }

    .rs-feature-card:hover .rs-corner-arrow {
        background: var(--rs-color-primary); /* Brand color on hover */
        color: white;
    }
    
    .rs-feature-card:hover .rs-corner-arrow i {
        transform: translate(2px, -2px); /* Slight movement */
    }

    /* Zig Zag Section */
    .rs-zigzag-section { padding: 80px 0; }
    .rs-bg-light { background-color: #f8fafc; }
    
    .rs-zigzag-row {
        display: flex;
        align-items: center;
        gap: 60px;
        margin-bottom: 0;
    }
    .rs-zigzag-row.reverse { flex-direction: row-reverse; }

    .rs-zigzag-content { flex: 1; }
    .rs-zigzag-image { flex: 1; position: relative; }
    
    .rs-zigzag-image img {
        width: 100%;
        border-radius: 16px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.1);
        object-fit: cover;
    }

    .rs-small-label {
        font-size: 0.85rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-bottom: 10px;
        display: block;
    }
    .rs-text-primary { color: var(--rs-color-primary); }
    .rs-text-purple { color: #9333ea; }

    .rs-checklist { list-style: none; padding: 0; margin-top: 20px; }
    .rs-checklist li {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 12px;
        color: var(--rs-color-secondary);
        font-weight: 500;
    }
    .rs-checklist i { color: #22c55e; }

    /* CTA Section */
    .rs-cta-section {
        background-color: #0f172a;
        padding: 80px 0;
        text-align: center;
        color: white;
        position: relative;
        overflow: hidden;
    }
    .rs-cta-content { position: relative; z-index: 2; }
    .rs-cta-title { color: white; font-size: 2.5rem; margin-bottom: 20px; }
    .rs-cta-desc { color: #94a3b8; max-width: 600px; margin: 0 auto 40px; font-size: 1.1rem; }



/* 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 Breakpoints */
    @media (max-width: 991px) {
        html.uc-modal-page, 
        html.uc-modal-page body {
            padding-right: 0px !important;
            margin-right: 0px !important;
        }

        /* --- 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 */
        .rs-clients-title { font-size: 1.75rem; }
        .rs-marquee-content img { height: 36px; }
        .rs-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 */
    .rs-breadcrumbs {
        display: flex;
        align-items: center;
        justify-content: flex-start; /* Left-aligned for retail hero */
        flex-wrap: wrap;
        gap: 10px;
        font-size: 0.95rem;
        font-weight: 500;
        margin-bottom: 20px;
        color: var(--rs-color-text);
        flex-direction: <?php echo ($lang == 'ar') ? 'row-reverse' : 'row'; ?>;
    }

    .rs-breadcrumbs a {
        color: var(--rs-color-primary);
        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'; ?>;
    }

    .rs-breadcrumbs a:hover {
        color: var(--rs-color-primary-dark);
        text-decoration: underline;
    }

    .rs-breadcrumbs .rs-separator {
        color: #94a3b8;
        font-size: 0.8rem;
        transform: <?php echo ($lang == 'ar') ? 'rotate(180deg)' : 'none'; ?>;
    }

    .rs-breadcrumbs .rs-current {
        color: var(--rs-color-dark);
    }

    