/* Custom Styles for Wojoodi Website - Production Level Design */

/* 
    ===== LOTTIE ANIMATION SIZE CONTROLS =====
    
    TO EDIT ANIMATION SIZES:
    
    1. HOME PAGE ANIMATIONS:
       - Our Work Animation: Edit w-64 h-64 md:w-80 md:h-80 lg:w-96 lg:h-96 xl:w-[500px] xl:h-[500px] in home.html
       - Rocket Launch Animation: Edit w-[400px] h-[400px] md:w-[600px] md:h-[600px] lg:w-[800px] lg:h-[800px] xl:w-[1000px] xl:h-[1000px] in home.html
    
    2. 404 PAGE ANIMATION:
       - Engineering Gears: Edit w-64 h-64 md:w-80 md:h-80 in 404.html
    
    3. whatsappbutton BUTTON:
       - All pages: Edit w-16 h-16 in the floating button sections
    
    4. CSS CONTROLS (this file):
       - lottie-player {} - Root scaling controls
       - .lottie-container {} - Container styling
       - .lottie-responsive {} - Responsive sizing
       - .lottie-fullscreen {} - Full screen mode
    
    SIZE REFERENCE:
    - w-64 h-64 = 256px x 256px
    - w-80 h-80 = 320px x 320px  
    - w-96 h-96 = 384px x 384px
    - w-[500px] h-[500px] = 500px x 500px
    - w-[800px] h-[800px] = 800px x 800px
    - w-screen h-screen = Full viewport
    
    POSITION CONTROLS:
    - justify-center = Center horizontally
    - items-center = Center vertically
    - mt-16 = Top margin (adjust for spacing)
    - mb-12 = Bottom margin (adjust for spacing)
*/

/* ===== BASE STYLES ===== */
* {
    scroll-behavior: smooth;
    box-sizing: border-box;
}

/* Root color variables for consistency */
:root {
    --primary: #4B6043;        /* Deep Olive */
    --secondary: #F3EED9;      /* Sand Beige */
    --accent: #00B894;         /* Emerald */
    --bg-light: #FAFAFA;       /* Paper White */
    --bg-dark: #222222;        /* Charcoal Gray */
    --text-main: #1A1A1A;      /* Jet Black */
    --text-secondary: #6B7280; /* Gray */
    --border-light: #E0E0E0;   /* Light Gray */
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-dark: rgba(0, 0, 0, 0.3);
    --text-on-gray: #00B894;   /* Emerald text on gray backgrounds */
}

/* ===== ENHANCED TYPOGRAPHY HIERARCHY ===== */
.font-arabic {
    font-family: 'Cairo', sans-serif;
    font-weight: 500;
    letter-spacing: 0.02em;
    line-height: 1.7;
    word-spacing: 0.1em;
}

.font-english {
    font-family: 'Inter', 'Poppins', sans-serif;
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.6;
}

/* Enhanced Typography Scale with proper hierarchy */
h1, .text-6xl, .text-7xl, .text-8xl {
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h2, .text-4xl, .text-5xl {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

h3, .text-2xl, .text-3xl {
    font-weight: 600;
    line-height: 1.3;
}

h4, .text-xl {
    font-weight: 500;
    line-height: 1.4;
}

p, .text-base, .text-lg {
    font-weight: 400;
    line-height: 1.6;
}

.text-sm {
    font-weight: 400;
    line-height: 1.5;
}

/* Improved Arabic typography */
.font-arabic h1, .font-arabic h2, .font-arabic h3 {
    font-weight: 600;
    line-height: 1.4;
}

.font-arabic p, .font-arabic .text-base, .font-arabic .text-lg {
    line-height: 1.8;
}

/* ===== SMOOTH LOADING & TRANSITIONS ===== */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.loading-spinner.show {
    opacity: 1;
    visibility: visible;
}

.dark .loading-spinner {
    background: rgba(34, 34, 34, 0.95);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--border-light);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced fade animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Language transition smoothing */
.language-transition {
    transition: all 0.2s ease-in-out;
}

/* ===== ENHANCED NAVIGATION ===== */
.navbar-scroll {
    transition: all 0.3s ease-in-out;
    backdrop-filter: blur(10px);
    background: rgba(250, 250, 250, 0.95);
}

.dark .navbar-scroll {
    background: rgba(34, 34, 34, 0.95);
}

.nav-link {
    color: var(--text-main);
    font-weight: 500;
    padding: 0.5rem 1rem;
    position: relative;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.dark .nav-link {
    color: white;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    left: 50%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(75, 96, 67, 0.1);
}

.nav-link-mobile {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-main);
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.dark .nav-link-mobile {
    color: white;
}

.nav-link-mobile:hover {
    color: var(--primary);
    background: rgba(75, 96, 67, 0.1);
}

/* Logo spacing fix */
.navbar-logo-spacing {
    gap: 0.5rem;
    align-items: center;
}

.navbar-logo-text {
    margin-top: 0.25rem;
}

/* ===== ENHANCED BUTTONS ===== */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), #5a7052);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(75, 96, 67, 0.3);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--text-main);
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 2px solid var(--border-light);
    cursor: pointer;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(243, 238, 217, 0.3);
    border-color: var(--primary);
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), #00a085);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    cursor: pointer;
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 184, 148, 0.3);
}

/* CTA Button shine effect */
.cta-button {
    position: relative;
    overflow: hidden;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.8s;
}

.cta-button:hover::before {
    left: 100%;
}

/* ===== ENHANCED CARDS & COMPONENTS ===== */
.card-hover {
    transition: all 0.3s ease;
    border-radius: 1rem;
    overflow: hidden;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px var(--shadow-light);
}

.dark .card-hover:hover {
    box-shadow: 0 20px 40px var(--shadow-dark);
}

/* ===== ENHANCED FORM ELEMENTS ===== */
.form-input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-light);
    border-radius: 0.75rem;
    background: white;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.dark .form-input {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.1);
    background: white;
}

/* ===== ENHANCED LOTTIE ANIMATION CONTROLS ===== */
/* Root fix for lottie animation scaling - allows unlimited size increases */
lottie-player {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    min-width: auto !important;
    min-height: auto !important;
    /* Force proper scaling */
    transform: scale(1) !important;
    transform-origin: center center !important;
    /* Ensure no overflow issues */
    overflow: visible !important;
    /* Remove any default constraints */
    box-sizing: border-box !important;
}

/* Enhanced container for large lottie animations */
.lottie-large-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto;
    overflow: visible;
    /* Remove any padding/margin that might interfere */
    padding: 0;
    margin: 0;
}

/* Ensure lottie animations can scale beyond normal limits */
.lottie-player-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    /* Allow unlimited scaling */
    max-width: none;
    max-height: none;
    /* Remove any flex constraints */
    flex-shrink: 0;
    flex-grow: 0;
}

/* Ensure whatsappbutton button lottie animation is visible */
.whatsappbutton-float lottie-player,
a[href*="wa.me"] lottie-player {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1001 !important;
    position: relative !important;
}

/* Container for lottie animations with proper scaling */
.lottie-container {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

/* Enhanced responsive lottie sizing */
.lottie-responsive {
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
}

/* Full screen lottie animation */
.lottie-fullscreen {
    width: 100vw !important;
    height: 100vh !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 99999 !important;
}

/* ===== ENHANCED whatsappbutton FLOAT ===== */
.whatsappbutton-float {
    position: fixed;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: pulse-green 2s infinite;
    bottom: 2rem;
    right: 2rem;
}

.whatsappbutton-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
}

@keyframes pulse-green {
    0% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3); }
    50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.5); }
    100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3); }
}

/* ===== ENHANCED ICON CIRCLES ===== */
.icon-circle {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.icon-circle i {
    font-size: 1.25rem;
    z-index: 2;
    transition: all 0.3s ease;
}

/* ===== PERFECT RTL/LTR LAYOUT MATCHING ===== */
[dir="rtl"] {
    text-align: right;
}

[dir="ltr"] {
    text-align: left;
}

/* RTL centering fix */
.rtl-center {
    text-align: center;
}

[dir="rtl"] .rtl-center {
    text-align: center;
}

/* Contact items alignment */
.contact-item-rtl {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-direction: row-reverse;
}

.contact-item-ltr {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* RTL spacing fixes */
[dir="rtl"] .space-x-2 > * + * {
    margin-left: 0;
    margin-right: 0.5rem;
}

[dir="rtl"] .space-x-3 > * + * {
    margin-left: 0;
    margin-right: 0.75rem;
}

[dir="rtl"] .space-x-4 > * + * {
    margin-left: 0;
    margin-right: 1rem;
}

[dir="rtl"] .space-x-6 > * + * {
    margin-left: 0;
    margin-right: 1.5rem;
}

[dir="rtl"] .space-x-8 > * + * {
    margin-left: 0;
    margin-right: 2rem;
}

/* RTL gap fixes */
[dir="rtl"] .gap-2 {
    gap: 0.5rem;
}

[dir="rtl"] .gap-3 {
    gap: 0.75rem;
}

[dir="rtl"] .gap-4 {
    gap: 1rem;
}

[dir="rtl"] .gap-6 {
    gap: 1.5rem;
}

/* whatsappbutton float RTL positioning */
[dir="rtl"] .whatsappbutton-float {
    right: auto;
    left: 2rem;
}

/* Enhanced whatsappbutton button visibility and fallback */
.whatsappbutton-button-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    animation: pulse-green 2s infinite;
    /* Ensure proper display */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    /* Force proper positioning */
    transform: none !important;

}

[dir="rtl"] .whatsappbutton-button-container {
    right: auto;
    left: 1.5rem;
}

.whatsappbutton-button-container:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.5);
}

/* Fallback whatsappbutton icon if lottie fails to load */
.whatsappbutton-button-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2rem;
    height: 2rem;
    background-size: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1002;
}



/* ===== ENHANCED MOBILE RESPONSIVENESS ===== */
@media (max-width: 768px) {
    /* Remove underline on mobile */
    .nav-link::after {
        display: none;
    }

    /* Enhanced whatsappbutton float on mobile */
    .whatsappbutton-float {
        width: 50px;
        height: 50px;
        bottom: 1.5rem;
        right: 1.5rem;
        font-size: 1.25rem;
    }

    [dir="rtl"] .whatsappbutton-float {
        right: auto;
        left: 1.5rem;
    }

    /* Responsive text sizes */
    .responsive-text-5xl {
        font-size: 2.5rem;
    }

    .responsive-text-4xl {
        font-size: 2rem;
    }

    .responsive-text-3xl {
        font-size: 1.5rem;
    }

    /* Enhanced mobile typography */
    [dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 {
        text-align: center;
    }

    [dir="ltr"] h1, [dir="ltr"] h2, [dir="ltr"] h3 {
        text-align: center;
    }

    /* Mobile contact items */
    .contact-item-rtl,
    .contact-item-ltr {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    /* Mobile button stack */
    .mobile-button-stack {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .mobile-button-stack .btn-primary,
    .mobile-button-stack .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 640px) {
    /* Enhanced mobile lottie animations */
    .lottie-container {
        padding: 1rem;
    }
    
    /* Ultra-mobile whatsappbutton */
    .whatsappbutton-float {
        width: 45px;
        height: 45px;
        bottom: 1.25rem;
        right: 1.25rem;
    }

    /* Mobile form inputs */
    .form-input {
        padding: 0.875rem;
        font-size: 0.9rem;
    }

    /* Mobile cards */
    .card-hover {
        margin-bottom: 1rem;
    }
}

/* ===== ENHANCED VISUAL EFFECTS ===== */
.transition-all-smooth {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-transition {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fade-transition.show {
    opacity: 1;
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.glassmorphism {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glassmorphism {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== ACCESSIBILITY ===== */
.focus\:outline-primary:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===== LOADING CLOAK ===== */
[x-cloak] {
    display: none !important;
}

/* ===== PRINT STYLES ===== */
@media print {
    .no-print {
        display: none !important;
    }
    .print-only {
        display: block !important;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ===== ENHANCED LANGUAGE TRANSITION ===== */
body {
    font-family: 'Inter', 'Poppins', sans-serif;
    transition: font-family 0.2s ease;
}

body.font-arabic {
    font-family: 'Cairo', sans-serif;
}

/* ===== ENHANCED SECTION ANIMATIONS ===== */
.section-fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.section-fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-animation > * {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.stagger-animation.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-animation.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-animation.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-animation.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-animation.visible > *:nth-child(5) { transition-delay: 0.5s; }

.stagger-animation.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* ===== PAGE TRANSITION ===== */
.page-enter {
    animation: pageEnter 0.5s ease-out;
}

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== ENHANCED ICONS ===== */
.fa, .fas, .far, .fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ===== ENHANCED CONSISTENCY ===== */
.btn-primary,
.btn-secondary,
.btn-accent {
    min-height: 48px;
    line-height: 1.2;
}

.card-hover {
    margin-bottom: 2rem;
}

.form-input {
    margin-bottom: 1rem;
}

/* Footer enhancement */
.footer-link-spacing a {
    margin-right: 1.5rem;
}

[dir="rtl"] .footer-link-spacing a {
    margin-right: 0;
    margin-left: 1.5rem;
}

/* Contact methods alignment */
.contact-method {
    display: flex;
    align-items: center;
    gap: 1rem;
}

[dir="rtl"] .contact-method {
    flex-direction: row-reverse;
}

/* ===== LAYOUT CONSISTENCY ===== */
* {
    box-sizing: border-box;
}

/* Smooth transitions for all interactive elements */
a, button, input, textarea, select {
    transition: all 0.3s ease;
}

/* Enhanced RTL text alignment */
[dir="rtl"] .text-left {
    text-align: right !important;
}

[dir="rtl"] .text-right {
    text-align: left !important;
}

[dir="rtl"] .justify-start {
    justify-content: flex-end !important;
}

[dir="rtl"] .justify-end {
    justify-content: flex-start !important;
}

/* ===== ENHANCED MOBILE OPTIMIZATIONS ===== */

/* Nav Icon 1 - Hamburger Menu (from CodePen) */
.nav-icon1 {
  width: 24px;
  height: 24px;
  position: relative;
  margin: 0;
  transform: rotate(0deg);
  transition: .5s ease-in-out;
  cursor: pointer;
}

.nav-icon1 span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: #4B6043;
  border-radius: 9px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
}

.dark .nav-icon1 span {
  background: #00B894;
}

.nav-icon1 span:nth-child(1) {
  top: 0px;
}

.nav-icon1 span:nth-child(2) {
  top: 10px;
}

.nav-icon1 span:nth-child(3) {
  top: 20px;
}

.nav-icon1.open span:nth-child(1) {
  top: 10px;
  transform: rotate(135deg);
}

.nav-icon1.open span:nth-child(2) {
  opacity: 0;
  left: -60px;
}

.nav-icon1.open span:nth-child(3) {
  top: 10px;
  transform: rotate(-135deg);
}

/* Mobile menu styling */
.nav-link-mobile {
  display: block;
  padding: 0.75rem 1rem;
  color: #374151;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  border-radius: 0.5rem;
}

.dark .nav-link-mobile {
  color: #D1D5DB;
}

.nav-link-mobile:hover {
  background-color: #F3F4F6;
  color: #00B894;
}

.dark .nav-link-mobile:hover {
  background-color: #374151;
  color: #00B894;
}

.nav-link-mobile.text-primary {
  color: #4B6043;
  font-weight: 600;
}

.dark .nav-link-mobile.text-primary {
  color: #00B894;
}

/* Mobile Styles */
@media (max-width: 768px) {
    /* Enhanced hero section on mobile */
    .hero-section {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.5;
    }

    .mobile-button-stack .btn-primary,
    .mobile-button-stack .btn-secondary {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }

    .card-hover {
        margin-bottom: 1.5rem;
        padding: 1rem;
    }

    .form-input {
        padding: 0.875rem;
        font-size: 0.9rem;
    }

    .contact-item-ltr,
    .contact-item-rtl {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .contact-item-ltr .icon-circle,
    .contact-item-rtl .icon-circle {
        width: 2.5rem;
        height: 2.5rem;
    }

    .nav-link-mobile {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }

    /* Enhanced transformation section on mobile */
    .store-transformation {
        flex-direction: column;
        gap: 1rem;
    }

    .store-transformation > div {
        width: 100%;
        max-width: none;
    }

    .store-transformation .fa-arrow-right {
        transform: rotate(90deg);
    }

    [dir="rtl"] .store-transformation .fa-arrow-right {
        transform: rotate(-90deg);
    }

/* ===== ULTRA-SMALL SCREENS ===== */
@media (max-width: 640px) {
    /* Ultra-compact container */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .card-hover {
        margin-bottom: 1rem;
    }

    .whatsappbutton-float {
        width: 45px;
        height: 45px;
        bottom: 0.75rem;
        right: 0.75rem;
    }

    .contact-item-ltr .icon-circle,
    .contact-item-rtl .icon-circle {
        width: 2rem;
        height: 2rem;
    }
}

/* ===== GLOBAL LAYOUT FIXES ===== */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Enhanced mobile container */
@media (max-width: 768px) {
    * {
        scroll-behavior: smooth;
    }

    body {
        overflow-x: hidden;
    }

    .container {
        padding-left: 1rem;
        padding-right: 1rem;
        max-width: 100%;
        margin: 0 auto;
    }

    /* Fix horizontal scrolling issues */
    .flex {
        flex-wrap: wrap;
    }

    [dir="rtl"] {
        direction: rtl;
    }

    h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word;
        hyphens: auto;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .mx-6 {
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .px-4 {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .store-transformation {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    .store-transformation .mx-6 {
        margin: 0;
    }
}

/* ===== TRANSFORMATION SECTION FIXES ===== */
.transformation-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    flex-wrap: nowrap;
    position: relative;
}

.transformation-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 100px;
    max-width: 120px;
}

.transformation-arrow {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
}

@media (max-width: 768px) {
    .transformation-container {
        flex-direction: column;
        gap: 2rem;
    }

    .transformation-item {
        min-width: 120px;
        max-width: 150px;
    }

    .transformation-arrow {
        transform: rotate(90deg);
    }

    .transformation-item span {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .transformation-container {
        gap: 1.5rem;
    }

    .transformation-item {
        min-width: 100px;
        max-width: 130px;
    }

    .transformation-arrow {
        min-width: 30px;
    }
}

/* ===== ENHANCED RTL SUPPORT ===== */
[dir="rtl"] * {
    box-sizing: border-box;
}

[dir="rtl"] .text-center {
    text-align: center;
}

[dir="rtl"] .text-left {
    text-align: right;
}

[dir="rtl"] .text-right {
    text-align: left;
}

/* Enhanced Arabic font support */
.font-arabic {
    font-family: 'Cairo', sans-serif;
    font-weight: 500;
    line-height: 1.7;
}

.font-arabic p,
.font-arabic span,
.font-arabic div {
    line-height: 1.8;
    word-spacing: 0.1em;
}

.font-arabic.text-center,
.font-arabic .text-center {
    text-align: center;
}

[dir="rtl"] .text-center .font-arabic,
[dir="rtl"] .font-arabic.text-center {
    text-align: center;
}

.font-arabic {
    direction: rtl;
    unicode-bidi: embed;
}

/* ===== ENHANCED LANGUAGE TRANSITIONS ===== */
.language-transition {
    transition: all 0.2s ease-in-out;
}

.transformation-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    flex-wrap: nowrap;
}

.transformation-item {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 100px;
    max-width: 120px;
}

.transformation-item span {
    font-size: 0.875rem;
    line-height: 1.3;
    text-align: center;
    margin-top: 0.5rem;
}

/* ===== LAYOUT SHIFT PREVENTION ===== */
.no-layout-shift {
    position: relative;
    overflow: hidden;
}

.no-layout-shift.switching {
    transition: all 0.2s ease-in-out;
}

/* ===== ENHANCED FLEX LAYOUTS ===== */
[dir="rtl"] .flex-row-reverse {
    flex-direction: row-reverse;
}

[dir="rtl"] .space-x-reverse > * + * {
    margin-left: 0;
    margin-right: 0.5rem;
}

[dir="rtl"] .btn-primary,
[dir="rtl"] .btn-secondary,
[dir="rtl"] .btn-accent {
    flex-direction: row-reverse;
}

[dir="rtl"] .flex-row-reverse .font-arabic {
    direction: rtl;
}

/* ===== ENHANCED TYPOGRAPHY ===== */
.font-arabic.leading-tight {
    line-height: 1.4;
}

.font-arabic.leading-relaxed {
    line-height: 1.8;
}

/* ===== COLOR REPLACEMENT FOR GRAY BACKGROUNDS ===== */
/* Apply emerald color to text on gray-800 backgrounds */
.text-primary-on-gray {
    color: rgb(0 184 148 / var(--tw-text-opacity, 1)) !important;
}

.dark .text-primary-on-gray {
    color: rgb(0 184 148 / var(--tw-text-opacity, 1)) !important;
}

/* Ensure proper contrast on gray backgrounds */
.bg-gray-800 .text-primary,
.bg-gray-900 .text-primary {
    color: rgb(0 184 148 / var(--tw-text-opacity, 1)) !important;
}

.dark .bg-gray-800 .text-primary,
.dark .bg-gray-900 .text-primary {
    color: rgb(0 184 148 / var(--tw-text-opacity, 1)) !important;
}

/* Close the mobile styles media query */
} 