 /* --- HEADER VISIBILITY FIX --- */
    .uc-navbar-main {
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(226, 232, 240, 0.6) !important;
    }

    :root {
        /* TAILORING PALETTE (Elegant & Bespoke) */
        --tm-primary: #D97706; /* Amber/Gold - represents thread/craftsmanship */
        --tm-primary-dark: #B45309;
        --tm-secondary: #0F172A; /* Slate Navy (AiPSoft Base) */
        --tm-bg-light: #FFFBEB; /* Very light amber tint */
        --tm-bg-white: #ffffff;
        --tm-accent: #7C3AED; /* AiPSoft Purple */
        --tm-text-gray: #64748b;
        --tm-tadkeer-green: #178d72; /* Sourced from your theme for clients */
        /* Gradient: Gold to Purple */
        --tm-gradient: linear-gradient(135deg, #D97706 0%, #7C3AED 100%);
    }

    /* Base Layout */
    .tm-wrapper {
        font-family: 'Lexend', sans-serif;
        color: var(--tm-secondary);
        background-color: var(--tm-bg-white);
        overflow-x: hidden;
        line-height: 1.6;
    }
    body.ar_selected .tm-corner-arrow
    {
        left: 0 !important;
        right: auto !important;
    }
    .tm-container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 24px;
        position: relative;
        z-index: 2;
    }

    /* Typography */
    .tm-title {
        font-size: 3rem;
        font-weight: 700;
        line-height: 1.1;
        letter-spacing: -0.02em;
        margin-bottom: 1.5rem;
        color: var(--tm-secondary);
    }
    
    .tm-subtitle {
        font-size: 1.15rem;
        color: var(--tm-text-gray);
        max-width: 650px;
        margin: 0 auto 2.5rem;
    }
    
    .tm-section-title {
        font-size: 2.25rem;
        font-weight: 700;
        margin-bottom: 1rem;
        text-align: center;
        color: var(--tm-secondary);
    }
    
    .tm-badge {
        display: inline-flex;
        align-items: center;
        padding: 6px 16px;
        background: var(--tm-bg-light);
        color: var(--tm-primary);
        border: 1px solid rgba(217, 119, 6, 0.2);
        border-radius: 100px;
        font-size: 0.85rem;
        font-weight: 600;
        margin-bottom: 20px;
        letter-spacing: 0.03em;
        text-transform: uppercase;
    }

    /* Buttons - ANIMATED */
    .tm-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 12px 30px;
        border-radius: 50px; /* Pill shape */
        font-weight: 600;
        text-decoration: none !important;
        transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
        gap: 8px;
        font-size: 0.95rem;
        cursor: pointer;
    }

    .tm-btn-primary {
        background: var(--tm-gradient);
        color: white !important;
        box-shadow: 0 10px 25px -5px rgba(217, 119, 6, 0.4);
        border: none;
    }
    .tm-btn-primary:hover {
        /* Standard hover: Lift Up */
        transform: translateY(-3px);
        box-shadow: 0 15px 30px -5px rgba(217, 119, 6, 0.5);
    }

    .tm-btn-outline {
        background: white;
        border: 1px solid #e2e8f0;
        color: var(--tm-secondary) !important;
    }
    .tm-btn-outline:hover {
        border-color: var(--tm-primary);
        color: var(--tm-primary) !important;
        background: var(--tm-bg-light);
        transform: translateY(-3px); /* Lift Up */
        box-shadow: 0 10px 20px -5px rgba(0,0,0,0.1);
    }
    
    /* White Buttons for CTA */
    .tm-btn-white {
        background: white;
        color: var(--tm-primary) !important;
        border: 1px solid white;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }
    .tm-btn-white:hover {
        background: #FFFBEB;
        transform: translateY(-3px); /* Lift Up */
        box-shadow: 0 10px 25px -5px rgba(0,0,0,0.2);
    }

    .tm-btn-white-outline {
        background: transparent;
        border: 1px solid rgba(255,255,255,0.6);
        color: white !important;
    }
    .tm-btn-white-outline:hover {
        background: rgba(255,255,255,0.1);
        transform: translateY(-3px); /* Lift Up */
        box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    }

    /* SECTION: HERO (Tailoring Style) */
    .tm-hero {
        padding: 160px 0 100px;
        text-align: center;
        background: radial-gradient(circle at 50% 0%, #fffbeb 0%, #ffffff 70%);
        position: relative;
        overflow: visible;
    }

    /* Decorative Elements (Stitches/Fabric feel) */
    .tm-stitch-line {
        position: absolute;
        width: 100%;
        height: 2px;
        background-image: linear-gradient(to right, #e2e8f0 50%, transparent 50%);
        background-size: 20px 2px;
        top: 100px;
        left: 0;
        opacity: 0.5;
        z-index: 0;
    }

    /* --- HERO VISUAL COMPOSITION (Asymmetrical / Layered) --- */
    .tm-hero-visual-wrapper {
        margin-top: 100px;
        position: relative;
        height: 600px;
        width: 100%;
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
        
        /* Premium Scroll Fly Animation Variables Setup */
        --meas-x: 0px; --meas-y: 0px; --meas-r: 0deg; --meas-o: 1;
        --dash-x: 0px; --dash-y: 0px; --dash-r: 0deg; --dash-o: 1;
        --app-x: 0px; --app-y: 0px; --app-r: 0deg; --app-o: 1;
        --fab-x: 0px; --fab-y: 0px; --fab-r: 5deg; --fab-o: 1;
        --mach-x: 0px; --mach-y: 0px; --mach-r: -5deg; --mach-o: 1;
    }
    
    .tm-vis-item {
        position: absolute;
        transition: opacity 0.1s ease;
        background: transparent;
        overflow: visible;
    }
    
    .tm-vis-item img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 20px;
        box-shadow: 0 30px 60px -15px rgba(15, 23, 42, 0.15); /* Soft Shadow */
    }

    /* 1. Main Dashboard (Center Back) */
    .tm-vis-dashboard {
        width: 65%;
        top: 20px;
        left: 17.5%; /* Shifted right to centralize */
        z-index: 2;
        animation: float-main 8s ease-in-out infinite;
        opacity: var(--dash-o); 
        --fly-x: var(--dash-x); --fly-y: var(--dash-y); --fly-s: 1; --fly-r: var(--dash-r);
    }
    
    /* 2. Measurements Screen (Right Front - Desktop/Tablet) */
    .tm-vis-measurements {
        width: 50%;
        bottom: 50px;
        right: 0;
        z-index: 5;
        animation: float-side 7s ease-in-out infinite;
        opacity: var(--meas-o); 
        --fly-x: var(--meas-x); --fly-y: var(--meas-y); --fly-s: 1; --fly-r: var(--meas-r);
    }
    
    /* 3. Customer App (Left Front - Mobile) */
    .tm-vis-app {
        width: 240px;
        height: auto;
        aspect-ratio: 9/18;
        bottom: 20px;
        left: 0;
        z-index: 10;
        animation: float-side 6s ease-in-out infinite;
        opacity: var(--app-o); 
        --fly-x: var(--app-x); --fly-y: var(--app-y); --fly-s: 1; --fly-r: var(--app-r);
    }
    
    /* 4. Fabric/Pattern (Top Right Floating) */
    .tm-vis-fabric {
        width: 200px;
        top: -20px;
        right: 15%;
        z-index: 3;
        animation: float-tag 9s ease-in-out infinite;
        opacity: var(--fab-o); 
        --fly-x: var(--fab-x); --fly-y: var(--fab-y); --fly-s: 1; --fly-r: var(--fab-r);
    }

    /* 5. Sewing Machine (Bottom Center Floating) */
    .tm-vis-machine {
        width: 240px;
        bottom: 0px;
        left: 35%;
        z-index: 12;
        animation: float-machine 10s ease-in-out infinite;
        opacity: var(--mach-o); 
        --fly-x: var(--mach-x); --fly-y: var(--mach-y); --fly-s: 1; --fly-r: var(--mach-r);
    }
    
    /* Specific styling for phone to remove borders/add specific shadow */
    .tm-vis-app img {
        border-radius: 35px; /* Mobile Radius */
        box-shadow: 0 40px 80px -20px rgba(15, 23, 42, 0.25);
    }

    /* Gentle Floating Animations - Using Variables */
    @keyframes float-main { 
        0%, 100% { transform: translate(var(--fly-x), var(--fly-y)) scale(var(--fly-s)) rotate(var(--fly-r)); } 
        50% { transform: translate(var(--fly-x), calc(var(--fly-y) - 10px)) scale(var(--fly-s)) rotate(var(--fly-r)); } 
    }
    @keyframes float-side { 
        0%, 100% { transform: translate(var(--fly-x), var(--fly-y)) scale(var(--fly-s)) rotate(var(--fly-r)); } 
        50% { transform: translate(var(--fly-x), calc(var(--fly-y) - 15px)) scale(var(--fly-s)) rotate(var(--fly-r)); } 
    }
    
    @keyframes float-tag { 
        0%, 100% { transform: translate(var(--fly-x), var(--fly-y)) scale(var(--fly-s)) rotate(var(--fly-r)); } 
        50% { transform: translate(var(--fly-x), calc(var(--fly-y) - 12px)) scale(var(--fly-s)) rotate(var(--fly-r)); } 
    }
    
    @keyframes float-machine { 
        0%, 100% { transform: translate(var(--fly-x), var(--fly-y)) scale(var(--fly-s)) rotate(var(--fly-r)); } 
        50% { transform: translate(var(--fly-x), calc(var(--fly-y) - 12px)) scale(var(--fly-s)) rotate(var(--fly-r)); } 
    }

    /* SECTION: MEASUREMENTS (Custom Grid) */
    .tm-measures-section {
        padding: 100px 0;
        background-color: white;
    }
    
    .tm-measures-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 60px;
        align-items: center;
    }

    /* SECTION: FEATURES (Clickable Grid) */
    .tm-features { padding: 100px 0; background: var(--tm-bg-light); }
    
    .tm-feature-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 30px;
    }
    
    .tm-feature-card {
        padding: 30px;
        border-radius: 16px;
        background: white;
        border: 1px solid #e2e8f0;
        box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02);
        transition: 0.3s;
        display: flex;
        flex-direction: column;
        text-decoration: none !important;
        color: var(--tm-secondary);
        position: relative;
        overflow: hidden;
    }
    .tm-feature-card:hover {
        border-color: var(--tm-primary);
        box-shadow: 0 15px 30px -5px rgba(217, 119, 6, 0.15);
        transform: translateY(-3px);
    }
    
    .tm-feature-icon {
        width: 50px;
        height: 50px;
        background: var(--tm-bg-light);
        color: var(--tm-primary);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
        margin-bottom: 20px;
        transition: 0.3s;
    }
    .tm-feature-card:hover .tm-feature-icon {
        background: var(--tm-primary);
        color: white;
    }
    
    /* Corner Arrow */
    .tm-corner-arrow {
        position: absolute;
        bottom: 0;
        right: 0;
        width: 50px;
        height: 50px;
        background: #F8FAFC;
        display: flex;
        align-items: center;
        justify-content: center;
        border-top-left-radius: 16px;
        color: var(--tm-secondary);
        transition: all 0.3s ease;
    }
    .tm-corner-arrow i { font-size: 1.1rem; transition: transform 0.3s ease; }
    .tm-feature-card:hover .tm-corner-arrow { background: var(--tm-primary); color: white; }
    .tm-feature-card:hover .tm-corner-arrow i { transform: translate(2px, -2px); }

    /* SECTION: CTA */
    .tm-cta {
        margin: 60px 0 100px;
        background: var(--tm-gradient);
        border-radius: 24px;
        padding: 80px 20px;
        text-align: center;
        color: white;
        position: relative;
        overflow: hidden;
        box-shadow: 0 20px 40px -10px rgba(124, 58, 237, 0.4);
    }
    
    /* Marquee Styles (Matched with Laundry) */
    .tm-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%);
    }
    
    .tm-marquee-content {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        margin: 0;
        list-style: none;
        animation: tm-scroll 30s linear infinite;
    }
    
    .tm-marquee-content li { margin: 0 40px; flex-shrink: 0; }
    .tm-marquee-content img { height: 40px; width: auto; transition: 0.3s; }
    .tm-marquee-content img:hover { opacity: 0.9; }
    
    @keyframes tm-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

    /* Clients Header */
    .tm-clients-section {
        padding: 80px 0;
        background-color: transparent; 
        overflow: hidden;
        position: relative;
        z-index: 1;
    }
    .tm-clients-header { text-align: center; margin-bottom: 60px; }
    .tm-clients-subtitle { color: var(--tm-tadkeer-green); font-weight: 600; display: block; margin-bottom: 10px; }
    .tm-clients-title { font-size: 2.25rem; font-weight: 800; color: var(--tm-secondary); margin: 0 0 1rem; }
    .tm-clients-desc { font-size: 1.125rem; color: var(--tm-text-gray); max-width: 42rem; margin: 0 auto; }


    /* ------------------------------ 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);
}
 


    /* Responsive */
    @media (max-width: 991px) {
        .tm-title { font-size: 2.5rem; }
        .tm-feature-grid { grid-template-columns: 1fr; }
        .tm-hero { padding-top: 120px; }
        .tm-btn-learn { flex: 0 1 auto !important; width: auto !important; }
        
        /* Hero Mobile Stack */
        .tm-hero-visual-wrapper { height: auto; display: flex; flex-direction: column; gap: 20px; margin-top: 50px; }
        .tm-vis-item { position: relative; width: 100% !important; top: auto !important; left: auto !important; right: auto !important; bottom: auto !important; animation: none !important; margin-bottom: 15px; border: none; transform: none !important; opacity: 1 !important; }
        .tm-vis-machine, .tm-vis-fabric { display: none; }
        .tm-vis-app { margin: 0 auto; width: 70% !important; }
        .tm-vis-measurements { width: 100% !important; }
        .tm-vis-dashboard { width: 100% !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 */
        .tm-clients-title { font-size: 1.75rem; }
        .tm-marquee-content img { height: 36px; }
        .tm-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; }

    }


    /* 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;
    }
}

/* 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); 
    }
