/* Production-ready custom styles for El Daftar software section */

/* Import Google Fonts - Cairo supports both Arabic and English */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700&display=swap');

/* Color Schema */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --light-bg: #ecf0f1;
    --dark-text: #2c3e50;
    --light-text: #7f8c8d;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    --gradient-accent: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    --gradient-success: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    --shadow-light: 0 8px 30px rgba(44, 62, 80, 0.08);
    --shadow-medium: 0 15px 40px rgba(44, 62, 80, 0.12);
    --shadow-dark: 0 10px 30px rgba(44, 62, 80, 0.15);
}

/* ========================================
   Universal Font - Same for AR and EN
======================================== */
body,
.ubea-nav,
.ubea-nav ul li a,
h1, h2, h3, h4, h5, h6,
p, a, span, button, input, textarea,
.ubea-accordion h3,
.ubea-heading h2,
.btn {
    font-family: 'Cairo', Arial, sans-serif !important;
}

/* Navigation bar styling - consistent for both languages */
.ubea-nav ul li a {
    font-weight: 600;
    letter-spacing: 0;
}

/* ========================================
   Prevent Flash of Unstyled Content (FOUC)
   during language switching
======================================== */

/* Instant text change - no flash */
[data-i18n-key] {
    color: inherit !important;
}

/* Override any color transitions on translatable text */
body.lang-switching * {
    transition: none !important;
}

/* Ensure navigation text stays consistent */
.ubea-nav ul li a {
    color: #000 !important;
}

.ubea-nav ul li a:hover,
.ubea-nav ul li a:focus,
.ubea-nav ul li a:active,
.ubea-nav ul li.active a {
    color: #FF5126 !important;
}

/* Headings and text - prevent any gold flash */
h1, h2, h3, h4, h5, h6 {
    color: #000 !important;
}

.ubea-heading h2 {
    color: #000 !important;
}

/* Active accordion heading */
.ubea-accordion.active h3 {
    color: #FF5126 !important;
}

/* Hero Section Text Styling */
#ubea-hero .slider-text-inner h2 {
    color: #fff !important;
}

#ubea-hero .btn.btn-primary {
    color: #fff !important;
}

/* ========================================
   Hero Slide 3 - EWIND Image Fix
   Match display style with other slides
======================================== */
#ubea-hero .flexslider .slides li:nth-child(3) {
    background-size: cover !important;
    background-position: center top !important;
}

/* ========================================
   Logo Styling - إضافة اللوجو
======================================== */
#ubea-logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #000000;
    font-size: 26px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

#ubea-logo a:hover {
    transform: scale(1.05);
}

/* Logo Image Styles */
.logo-img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.logo-img:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* RTL Support for Logo */
[dir="rtl"] .logo-img {
    margin-left: 10px;
    margin-right: 0;
}

/* Navigation Menu Styling - Like Logo */
.ubea-nav ul.main-nav li a {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 5px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.ubea-nav ul.main-nav li a:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ubea-nav ul.main-nav li.active a {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Responsive Logo */
@media (max-width: 767px) {
    .logo-img {
        width: 35px;
        height: 35px;
    }
    
    #ubea-logo a {
        font-size: 20px;
    }
}

/* ========================================
   Feature Cards
======================================== */
.feature-card {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(44, 62, 80, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient-primary);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.feature-icon i {
    font-size: 24px;
    color: var(--white);
}

.feature-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark-text);
}

.feature-content p {
    font-size: 15px;
    line-height: 1.6;
    color: var(--light-text);
    margin-bottom: 20px;
}

.btn-learn-more {
    display: inline-flex;
    align-items: center;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(52, 152, 219, 0.1);
}

.btn-learn-more:hover {
    color: var(--white);
    background: var(--gradient-primary);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-learn-more i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.btn-learn-more:hover i {
    transform: translateX(3px);
}

/* ========================================
   Showcase Container
======================================== */
.showcase-container {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.showcase-item {
    margin-bottom: 30px;
    height: 100%;
    display: flex;
    align-items: stretch;
    flex: 1;
}

.image-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-dark);
    transition: transform 0.3s ease;
    background: var(--light-bg);
    height: 100%;
    min-height: 200px;
}

.image-wrapper:hover {
    transform: scale(1.02);
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-wrapper:hover .image-overlay {
    opacity: 1;
}

.image-wrapper:hover img {
    transform: scale(1.05);
}

.overlay-content {
    text-align: center;
    color: var(--white);
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.image-wrapper:hover .overlay-content {
    transform: translateY(0);
}

.overlay-content h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.overlay-content p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ========================================
   Section Heading Enhancement
======================================== */
.ubea-section#ubea-services {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 80px 0;
}

.ubea-section#ubea-services .ubea-heading h2 {
    color: var(--dark-text);
    font-weight: 700;
    margin-bottom: 10px;
}

.ubea-section#ubea-services .ubea-heading p {
    color: var(--light-text);
    font-size: 18px;
    font-weight: 500;
}

/* ========================================
   Software Section - Single Page Style
======================================== */

/* Remove all border-radius - one continuous page */
#ubea-services .software-section:first-of-type,
#ubea-services .software-section:last-of-type,
#ubea-services .software-section:only-of-type {
    border-radius: 0;
}

.software-section {
    background: var(--white);
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0;
    padding: 40px;
    transition: background 0.3s ease;
    border-bottom: none;
}

.software-section:last-of-type {
    border-bottom: none;
}

/* Single unified container - no rounded corners */
#ubea-services .ubea-container {
    background: var(--white);
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    overflow: visible;
}

#ubea-services .ubea-container > .row {
    padding: 40px 40px 20px 40px;
}

/* No hover effect on software sections */

/* Section Title */
.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-color) !important;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: none;
    text-align: right;
}

[dir="ltr"] .section-title,
html:not([dir="rtl"]) .section-title {
    text-align: left;
}

/* Section Features - Bullet List */
.section-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.section-features li {
    position: relative;
    padding-right: 30px;
    padding-left: 0;
    font-size: 16px;
    color: var(--dark-text);
    line-height: 2.2;
    text-align: right;
}

.section-features li::before {
    content: '✓';
    position: absolute;
    right: 0;
    left: auto;
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 18px;
}

/* LTR Support */
[dir="ltr"] .section-features li,
html:not([dir="rtl"]) .section-features li {
    padding-right: 0;
    padding-left: 30px;
    text-align: left;
}

[dir="ltr"] .section-features li::before,
html:not([dir="rtl"]) .section-features li::before {
    right: auto;
    left: 0;
}

/* Section Images */
.section-images {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.section-images.two-images {
    flex-wrap: wrap;
}

.section-images.two-images .image-item {
    flex: 0 0 auto;
}

.section-images.two-images .image-item img {
    max-width: 280px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.section-images.one-image .image-item img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.section-images .image-item img:hover {
    transform: scale(1.02);
}

/* Responsive */
@media (max-width: 991px) {
    #ubea-services .ubea-container > .row {
        padding: 30px 30px 15px 30px;
    }
    
    .software-section {
        padding: 30px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .section-features li {
        font-size: 15px;
        line-height: 2;
    }
    
    .section-images.two-images .image-item img {
        max-width: 240px;
    }
}

@media (max-width: 767px) {
    #ubea-services .ubea-container {
        border-radius: 12px;
        margin: 0 10px;
    }
    
    #ubea-services .ubea-container > .row {
        padding: 25px 20px 15px 20px;
    }
    
    .software-section {
        padding: 25px 20px;
        margin-bottom: 0;
        border-radius: 0;
    }
    
    .section-title {
        font-size: 18px;
        text-align: center !important;
    }
    
    .section-features li {
        font-size: 14px;
        line-height: 1.9;
        text-align: right;
    }
    
    [dir="ltr"] .section-features li,
    html:not([dir="rtl"]) .section-features li {
        text-align: left;
    }
    
    .section-images {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .section-images.two-images .image-item img {
        max-width: 260px;
    }
}

/* Legacy support */
.software-feature-row {
    margin-bottom: 60px;
    display: flex;
    align-items: center;
    min-height: 450px;
}

.software-feature-row:last-child {
    margin-bottom: 0;
}

/* Trial Text - Bold under image */
.trial-text {
    margin-top: 30px;
    padding: 20px 30px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff !important;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.3);
}

.trial-text a {
    color: #fff;
    text-decoration: underline;
}

@media (max-width: 767px) {
    .trial-text {
        font-size: 15px;
        padding: 15px 20px;
    }
}

/* Individual item matching */
.feature-card,
.showcase-item {
    height: calc(33.33% - 10px);
    margin-bottom: 15px;
}

.feature-card:last-child,
.showcase-item:last-child {
    margin-bottom: 0;
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 991px) {
    .showcase-container {
        padding-left: 0;
        margin-top: 30px;
    }
    
    .feature-card {
        margin-bottom: 20px;
        padding: 25px;
    }
    
    .ubea-section#ubea-services {
        padding: 60px 0;
    }
}

@media (max-width: 767px) {
    .feature-card {
        padding: 20px;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
    }
    
    .feature-icon i {
        font-size: 20px;
    }
    
    .feature-content h3 {
        font-size: 18px;
    }
    
    .feature-content p {
        font-size: 14px;
    }
    
    .ubea-section#ubea-services {
        padding: 40px 0;
    }
    
    .ubea-section#ubea-services .ubea-heading p {
        font-size: 16px;
    }
}

/* ========================================
   Hero Slider Background Fixes
======================================== */
#ubea-hero .flexslider .slides li:nth-child(2) {
    background-size: contain !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    background-color: #f5f5f5 !important; /* Light gray to match image background */
}

/* Remove dark overlay for this slide so content is fully visible */
#ubea-hero .flexslider .slides li:nth-child(2) .overlay {
    background: rgba(0, 0, 0, 0.15) !important;
}

/* ========================================
   Customer & Partner Sections
======================================== */
.ubea-section#ubea-customers,
.ubea-section#ubea-partners {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 80px 0;
    border-top: 1px solid rgba(44, 62, 80, 0.1);
}

.ubea-section#ubea-customers .ubea-heading h2,
.ubea-section#ubea-partners .ubea-heading h2 {
    color: var(--dark-text);
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.ubea-section#ubea-customers .ubea-heading h2::after,
.ubea-section#ubea-partners .ubea-heading h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.ubea-section#ubea-customers .ubea-heading p,
.ubea-section#ubea-partners .ubea-heading p {
    color: var(--light-text);
    font-size: 18px;
    max-width: 600px;
    margin: 20px auto 0;
}

/* Customer Logo Cards */
.customer-logo,
.partner-logo {
    background: var(--white);
    border-radius: 20px;
    padding: 0;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(44, 62, 80, 0.08);
    border: 1px solid rgba(44, 62, 80, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.customer-logo:hover,
.partner-logo:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 60px rgba(44, 62, 80, 0.15);
    border-color: rgba(52, 152, 219, 0.3);
}

.customer-logo::before,
.partner-logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #3498db 0%, #2980b9 50%, #3498db 100%);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
    z-index: 1;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.customer-logo::after,
.partner-logo::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 50%, rgba(255,255,255,0.1) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 2;
}

.customer-logo:hover::after,
.partner-logo:hover::after {
    opacity: 1;
}

.customer-logo img,
.partner-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    margin-bottom: 0;
    filter: brightness(0.95) contrast(1.05);
    opacity: 1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px;
    padding: 10px;
    box-sizing: border-box;
}

.customer-logo:hover img,
.partner-logo:hover img {
    filter: brightness(1) contrast(1.1) saturate(1.1);
    opacity: 1;
    transform: scale(1.05);
}

.customer-logo h4,
.partner-logo h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.customer-logo:hover h4,
.partner-logo:hover h4 {
    color: var(--secondary-color);
}

.customer-logo p,
.partner-logo p {
    font-size: 14px;
    color: var(--light-text);
    margin: 0;
    line-height: 1.5;
}

/* Partner section specific styling */
.ubea-section#ubea-partners {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.partner-logo::before {
    background: var(--gradient-success);
}

/* Partner specific layout for text at bottom */
.partner-logo {
    justify-content: flex-start;
    padding: 20px;
    min-height: 280px;
}

.partner-logo img {
    max-height: 120px;
    width: auto;
    height: auto;
    margin-bottom: 15px;
    padding: 5px;
}

.partner-logo p {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(44, 62, 80, 0.1);
    font-size: 13px;
    line-height: 1.4;
    flex-shrink: 0;
    text-align: center;
}

.partner-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

.partner-logo:hover h4 {
    color: var(--success-color);
}

/* Responsive Design for Customer & Partner Sections */
@media (max-width: 991px) {
    .ubea-section#ubea-customers,
    .ubea-section#ubea-partners {
        padding: 60px 0;
    }
    
    .customer-logo,
    .partner-logo {
        margin-bottom: 20px;
        padding: 0;
        height: 180px;
    }
    
    .customer-logo img,
    .partner-logo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

@media (max-width: 767px) {
    .ubea-section#ubea-customers,
    .ubea-section#ubea-partners {
        padding: 40px 0;
    }
    
    .ubea-section#ubea-customers .ubea-heading p,
    .ubea-section#ubea-partners .ubea-heading p {
        font-size: 16px;
    }
    
    .customer-logo,
    .partner-logo {
        padding: 0;
        margin-bottom: 15px;
        height: 160px;
    }
    
    .customer-logo img,
    .partner-logo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .customer-logo h4,
    .partner-logo h4 {
        font-size: 16px;
    }
    
    .customer-logo p,
    .partner-logo p {
        font-size: 13px;
    }
}

/* ========================================
   FAQ Accordion RTL Support
======================================== */

/* Base accordion icon positioning fix */
.ubea-accordion .ubea-accordion-heading {
  position: relative;
}

.ubea-accordion .ubea-accordion-heading .icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
  transition: transform 0.3s ease;
}

/* LTR (English) - icon on right */
.ubea-accordion .ubea-accordion-heading .icon {
  right: 20px;
  left: auto;
}

/* RTL (Arabic) - icon on left */
body.lang-ar .ubea-accordion .ubea-accordion-heading .icon,
[dir="rtl"] .ubea-accordion .ubea-accordion-heading .icon {
  left: 20px;
  right: auto;
}

/* Active state rotation */
.ubea-accordion.active .ubea-accordion-heading .icon {
  transform: translateY(-50%) rotate(0deg);
}

/* RTL text alignment for FAQ */
body.lang-ar .ubea-accordion .ubea-accordion-heading h3,
[dir="rtl"] .ubea-accordion .ubea-accordion-heading h3 {
  text-align: right;
  padding-left: 40px;
  padding-right: 0;
}

/* LTR text alignment for FAQ */
body.lang-en .ubea-accordion .ubea-accordion-heading h3,
[dir="ltr"] .ubea-accordion .ubea-accordion-heading h3 {
  text-align: left;
  padding-right: 40px;
  padding-left: 0;
}

/* RTL content alignment */
body.lang-ar .ubea-accordion .ubea-accordion-content .inner,
[dir="rtl"] .ubea-accordion .ubea-accordion-content .inner {
  text-align: right;
}

body.lang-en .ubea-accordion .ubea-accordion-content .inner,
[dir="ltr"] .ubea-accordion .ubea-accordion-content .inner {
  text-align: left;
}

/* ============================================
   COMPREHENSIVE RESPONSIVE DESIGN
   Mobile-First Approach
   ============================================ */

/* Extra Large Devices (1400px and up) */
@media (min-width: 1400px) {
  .ubea-container {
    max-width: 1320px;
  }
}

/* Large Devices / Laptops (992px - 1199px) */
@media (max-width: 1199px) {
  .ubea-heading h2 {
    font-size: 32px;
  }
  
  .ubea-heading p {
    font-size: 15px;
  }
  
  .feature-card {
    padding: 25px;
  }
  
  .feature-content h3 {
    font-size: 20px;
  }
}

/* Medium Devices / Tablets (768px - 991px) */
@media (max-width: 991px) {
  /* Navigation */
  .ubea-nav {
    padding: 10px 0;
  }
  
  .ubea-nav ul li a {
    padding: 10px 12px;
    font-size: 13px;
  }
  
  /* Language Switcher */
  .language-switcher {
    margin-left: 15px !important;
  }
  
  /* Hero Section */
  #ubea-hero .slider-text-inner h2 {
    font-size: 36px !important;
    line-height: 1.3;
  }
  
  #ubea-hero .btn.btn-primary {
    padding: 12px 25px;
    font-size: 14px;
  }
  
  /* Sections */
  .ubea-section {
    padding: 60px 0;
  }
  
  .ubea-heading {
    margin-bottom: 40px;
  }
  
  .ubea-heading h2 {
    font-size: 28px;
  }
  
  /* Software Products Section */
  .showcase-container {
    padding-left: 0;
    margin-top: 30px;
  }
  
  .feature-card {
    margin-bottom: 20px;
    padding: 25px;
  }
  
  /* Customer/Partner Cards */
  .customer-logo,
  .partner-logo {
    padding: 25px 20px;
    margin-bottom: 20px;
  }
  
  /* FAQ */
  .ubea-accordion .ubea-accordion-heading h3 {
    font-size: 16px;
    padding-right: 35px;
  }
  
  /* About Section */
  #ubea-about .ubea-heading {
    margin-bottom: 20px;
  }
  
  #ubea-about p {
    font-size: 15px;
  }
  
  /* Contact Section */
  #ubea-contact h3 {
    font-size: 18px;
  }
  
  /* Footer */
  #ubea-footer {
    padding: 30px 0;
  }
}

/* Small Devices / Mobile Landscape (576px - 767px) */
@media (max-width: 767px) {
  /* Navigation - Hamburger Menu */
  .ubea-nav-toggle {
    display: block !important;
    position: fixed;
    right: 15px;
    top: 15px;
    z-index: 9998;
    transform: none;
  }
  
  /* Keep hamburger in same position for RTL */
  body.lang-ar .ubea-nav-toggle {
    right: 15px;
    left: auto;
  }
  
  .ubea-nav-toggle i {
    background: #333;
  }
  
  .ubea-nav-toggle i::before,
  .ubea-nav-toggle i::after {
    background: #333;
  }
  
  /* Move language switcher next to hamburger */
  .language-switcher.mobile-only {
    right: 65px !important;
    top: 15px;
  }
  
  body.lang-ar .language-switcher.mobile-only {
    right: 65px !important;
    left: auto !important;
  }
  
  #ubea-logo .logo-img {
    height: 35px;
    width: auto;
  }
  
  /* Language Switcher Mobile */
  .language-switcher {
    margin-left: 10px !important;
  }
  
  .lang-current {
    padding: 6px 10px !important;
  }
  
  .current-lang {
    font-size: 11px !important;
  }
  
  .globe-icon {
    width: 16px !important;
    height: 16px !important;
  }
  
  .lang-menu {
    min-width: 160px !important;
    right: 0 !important;
  }
  
  /* Hero Section */
  #ubea-hero {
    min-height: 500px;
  }
  
  #ubea-hero .slider-text-inner h2 {
    font-size: 26px !important;
    line-height: 1.4;
    padding: 0 15px;
  }
  
  #ubea-hero .btn.btn-primary {
    padding: 10px 20px;
    font-size: 13px;
  }
  
  /* Sections */
  .ubea-section {
    padding: 40px 0;
  }
  
  .ubea-heading {
    margin-bottom: 30px;
  }
  
  .ubea-heading h2 {
    font-size: 24px;
    line-height: 1.4;
  }
  
  .ubea-heading p {
    font-size: 14px;
    padding: 0 10px;
  }
  
  /* Software Products */
  .feature-card {
    padding: 20px;
    margin-bottom: 15px;
  }
  
  .feature-icon {
    width: 50px;
    height: 50px;
  }
  
  .feature-icon i {
    font-size: 20px;
  }
  
  .feature-content h3 {
    font-size: 18px;
  }
  
  .feature-content p {
    font-size: 14px;
  }
  
  .btn-learn-more {
    font-size: 13px;
  }
  
  /* Showcase Images */
  .showcase-container {
    margin-top: 20px;
  }
  
  .showcase-item {
    margin-bottom: 15px;
  }
  
  .image-wrapper {
    border-radius: 8px;
  }
  
  /* Hardware Products */
  .ubea-card-item figure {
    border-radius: 8px;
  }
  
  /* Customer/Partner Section */
  .customer-logo,
  .partner-logo {
    padding: 20px 15px;
    margin-bottom: 15px;
    min-height: auto;
  }
  
  .customer-logo h4,
  .partner-logo h4 {
    font-size: 16px;
  }
  
  .customer-logo p,
  .partner-logo p {
    font-size: 13px;
  }
  
  .customer-logo i,
  .partner-logo i {
    font-size: 36px;
  }
  
  /* FAQ Section */
  .ubea-accordion {
    margin-bottom: 10px;
  }
  
  .ubea-accordion .ubea-accordion-heading {
    padding: 15px;
  }
  
  .ubea-accordion .ubea-accordion-heading h3 {
    font-size: 14px;
    line-height: 1.5;
  }
  
  .ubea-accordion .ubea-accordion-heading .icon {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }
  
  .ubea-accordion .ubea-accordion-content .inner {
    padding: 15px;
    font-size: 14px;
  }
  
  /* About Section */
  #ubea-about {
    padding: 40px 0;
  }
  
  #ubea-about .ubea-heading h2 {
    font-size: 22px;
  }
  
  #ubea-about p {
    font-size: 14px;
    line-height: 1.7;
    padding: 0 10px;
  }
  
  /* Contact Section */
  #ubea-contact {
    padding: 60px 0;
  }
  
  #ubea-contact h3 {
    font-size: 16px;
    line-height: 1.6;
    padding: 0 15px;
  }
  
  #ubea-contact h3 a {
    display: block;
    margin-top: 10px;
  }
  
  /* Footer */
  #ubea-footer {
    padding: 25px 0;
  }
  
  #ubea-footer p {
    font-size: 13px;
  }
}

/* Extra Small Devices / Mobile Portrait (< 576px) */
@media (max-width: 575px) {
  /* Logo */
  #ubea-logo .logo-img {
    height: 30px;
  }
  
  #ubea-logo em {
    font-size: 14px;
  }
  
  /* Hero */
  #ubea-hero {
    min-height: 450px;
  }
  
  #ubea-hero .slider-text-inner h2 {
    font-size: 22px !important;
  }
  
  #ubea-hero .btn.btn-primary {
    padding: 8px 18px;
    font-size: 12px;
  }
  
  /* Sections */
  .ubea-section {
    padding: 35px 0;
  }
  
  .ubea-heading h2 {
    font-size: 20px;
  }
  
  .ubea-heading p {
    font-size: 13px;
  }
  
  /* Feature Cards */
  .feature-card {
    padding: 15px;
  }
  
  .feature-icon {
    width: 45px;
    height: 45px;
  }
  
  .feature-icon i {
    font-size: 18px;
  }
  
  .feature-content h3 {
    font-size: 16px;
  }
  
  .feature-content p {
    font-size: 13px;
  }
  
  /* FAQ */
  .ubea-accordion .ubea-accordion-heading h3 {
    font-size: 13px;
  }
  
  /* Customer/Partner */
  .customer-logo i,
  .partner-logo i {
    font-size: 32px;
  }
  
  .customer-logo h4,
  .partner-logo h4 {
    font-size: 14px;
  }
  
  .customer-logo p,
  .partner-logo p {
    font-size: 12px;
  }
  
  /* Contact */
  #ubea-contact h3 {
    font-size: 14px;
  }
}

/* Fix for RTL on mobile */
@media (max-width: 767px) {
  body.lang-ar .ubea-nav ul {
    text-align: right;
  }
  
  body.lang-ar .feature-card {
    text-align: right;
  }
  
  body.lang-ar .ubea-accordion .ubea-accordion-heading h3 {
    padding-left: 35px;
    padding-right: 0;
  }
  
  body.lang-ar .ubea-accordion .ubea-accordion-heading .icon {
    left: 15px;
    right: auto;
  }
}

/* Flexslider responsive fixes */
@media (max-width: 767px) {
  #ubea-hero .flexslider .slides li {
    min-height: 450px;
  }
  
  .flex-control-nav {
    bottom: 20px;
  }
  
  .flex-direction-nav {
    display: none;
  }
}

/* ========================================
   Hardware Products Section - RTL/LTR Support
======================================== */

/* Base LTR styles for hardware section */
#ubea-portfolio .dynamometer-content,
#ubea-portfolio .product-content {
    text-align: left;
}

#ubea-portfolio .dynamometer-content h2,
#ubea-portfolio .dynamometer-content h3,
#ubea-portfolio .dynamometer-content p,
#ubea-portfolio .product-content h2,
#ubea-portfolio .product-content h3,
#ubea-portfolio .product-content p {
    text-align: left;
}

#ubea-portfolio .dynamometer-content ul,
#ubea-portfolio .product-content ul {
    text-align: left;
}

#ubea-portfolio .dynamometer-content hr,
#ubea-portfolio .product-content hr {
    margin-left: 0;
    margin-right: auto;
}

#ubea-portfolio .brand-header {
    text-align: left;
}

#ubea-portfolio .dynamometer-image,
#ubea-portfolio .product-image {
    text-align: left;
}

/* RTL (Arabic) styles for hardware section */
[dir="rtl"] #ubea-portfolio .dynamometer-content,
[dir="rtl"] #ubea-portfolio .product-content {
    text-align: right;
}

[dir="rtl"] #ubea-portfolio .dynamometer-content h2,
[dir="rtl"] #ubea-portfolio .dynamometer-content h3,
[dir="rtl"] #ubea-portfolio .dynamometer-content p,
[dir="rtl"] #ubea-portfolio .product-content h2,
[dir="rtl"] #ubea-portfolio .product-content h3,
[dir="rtl"] #ubea-portfolio .product-content p {
    text-align: right;
}

[dir="rtl"] #ubea-portfolio .dynamometer-content ul,
[dir="rtl"] #ubea-portfolio .product-content ul {
    text-align: right;
}

[dir="rtl"] #ubea-portfolio .dynamometer-content ul li,
[dir="rtl"] #ubea-portfolio .product-content ul li {
    text-align: right;
}

[dir="rtl"] #ubea-portfolio .dynamometer-content hr,
[dir="rtl"] #ubea-portfolio .product-content hr {
    margin-left: auto;
    margin-right: 0;
}

[dir="rtl"] #ubea-portfolio .brand-header {
    text-align: right;
}

[dir="rtl"] #ubea-portfolio .dynamometer-image,
[dir="rtl"] #ubea-portfolio .product-image {
    text-align: right;
}

/* RTL row reversal - swap image and content positions */
[dir="rtl"] #ubea-portfolio .row[style*="display: flex"] {
    flex-direction: row-reverse;
}

/* Hardware section gallery responsive */
@media (max-width: 991px) {
  .ubea-card-item {
    margin-bottom: 20px;
  }
  
  /* Stack columns on tablet */
  #ubea-portfolio .row[style*="display: flex"] {
    flex-direction: column !important;
  }
  
  [dir="rtl"] #ubea-portfolio .row[style*="display: flex"] {
    flex-direction: column !important;
  }
  
  #ubea-portfolio .dynamometer-content,
  #ubea-portfolio .product-content {
    margin-bottom: 30px;
  }
  
  #ubea-portfolio .dynamometer-image,
  #ubea-portfolio .product-image {
    text-align: center;
  }
  
  [dir="rtl"] #ubea-portfolio .dynamometer-image,
  [dir="rtl"] #ubea-portfolio .product-image {
    text-align: center;
  }
}

@media (max-width: 767px) {
  .ubea-card-item {
    margin-bottom: 15px;
  }
  
  .ubea-card-item figure {
    margin: 0;
  }
  
  #ubea-portfolio .dynamometer-content h2,
  #ubea-portfolio .product-content h2 {
    font-size: 32px !important;
  }
  
  #ubea-portfolio .dynamometer-content p,
  #ubea-portfolio .product-content p {
    font-size: 16px !important;
  }
  
  #ubea-portfolio .dynamometer-content ul li,
  #ubea-portfolio .product-content ul li {
    font-size: 16px !important;
  }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
  .feature-card:hover {
    transform: none;
  }
  
  .customer-logo:hover,
  .partner-logo:hover {
    transform: none;
  }
  
  .btn-learn-more:hover i {
    transform: none;
  }
  
  /* Larger touch targets */
  .ubea-nav ul li a {
    padding: 12px 15px;
  }
  
  .ubea-accordion .ubea-accordion-heading {
    padding: 18px;
  }
}