@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap");

/* Cross-browser compatibility fixes */
@supports (-webkit-touch-callout: none) {
  /* iOS Safari specific fixes */
  * {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }

  input,
  textarea,
  [contenteditable] {
    -webkit-user-select: text;
    user-select: text;
  }
}

/* Samsung Internet and Android Chrome fixes */
@supports not (-webkit-touch-callout: none) {
  /* Android specific fixes */
  .slider-btn,
  .ng-dot,
  .about-dot {
    touch-action: manipulation;
  }
}

/* Base cross-browser resets */
*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
}

/* Cross-browser viewport fixes */
html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-overflow-scrolling: touch;
}

/* Cross-browser image fixes */
img {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  -moz-transform: translateZ(0);
  -ms-transform: translateZ(0);
  transform: translateZ(0);
}

/* Cross-browser button fixes */
button,
.btn {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

/* Cross-browser input fixes */
input,
textarea,
select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  -webkit-tap-highlight-color: transparent;
}

/* Cross-browser focus fixes */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--fd-green);
  outline-offset: 2px;
}

:root {
  --fd-green: #7ac143;
  --fd-navy: #1b2147;
  --fd-dark: #22262b;
  --fd-gray: #7c847c;
  --fd-taupe: #a78c52;
  --fd-offwhite: #f4f6f3;
  --fd-white: #ffffff;

  --background: #fafafa;
  --surface: #ffffff;
  --text-primary: #1f2937;
  --text-secondary: #4b5563;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --card-bg: #ffffff;
  --card-shadow: rgba(0, 0, 0, 0.1);
  --focus-ring: 0 0 0 3px rgba(122, 193, 67, 0.35);

  /* Enhanced Font System */
  --font-en-primary: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-en-display:
    "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-ar-primary: "Cairo", "Arial", sans-serif;
  --font-ar-display: "Cairo", "Arial", sans-serif;
  --font-mono:
    "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New",
    monospace;

  /* Font Weights */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  --font-black: 900;

  /* Line Heights */
  --line-height-tight: 1.1;
  --line-height-normal: 1.4;
  --line-height-relaxed: 1.6;

  /* Letter Spacing */
  --letter-spacing-tight: -0.025em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.025em;
}

.dark {
  --background: #0f172a;
  --surface: #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --border: #334155;
  --border-light: #475569;
  --card-bg: #1e293b;
  --card-shadow: rgba(0, 0, 0, 0.3);

  --fd-green: #7ac143;
  --fd-navy: #e2e8f0;
  --fd-dark: #f8fafc;
  --fd-gray: #94a3b8;
  --fd-taupe: #d4a574;
  --fd-offwhite: #1e293b;
  --fd-white: #f8fafc;
}

/* Force language visibility */

html[lang="ar"] .lang-en {
  display: none !important;

  visibility: hidden !important;
}

html[lang="ar"] .lang-ar {
  display: block !important;

  visibility: visible !important;
}

html:not([lang="ar"]) .lang-en {
  display: block !important;

  visibility: visible !important;
}

html:not([lang="ar"]) .lang-ar {
  display: none !important;

  visibility: hidden !important;
}

/* ========== COMPREHENSIVE MOBILE NAVIGATION RTL FIXES ========== */

/* Immediate RTL Mobile Navigation - Prevent Flicker */
@media (max-width: 1023px) {
  html[lang="ar"] .mobile-nav-container {
    direction: rtl !important;
    text-align: right !important;
  }

  html[lang="ar"] .mobile-nav-container .nav-link {
    direction: rtl !important;
    text-align: right !important;
    justify-content: flex-start !important;
  }

  html[lang="ar"] .mobile-nav-container .flex.gap-4 {
    direction: rtl !important;
    justify-content: space-between !important;
  }

  html[lang="ar"] #mobileLangToggle,
  html[lang="ar"] #mobileThemeToggle {
    direction: rtl !important;
    text-align: center !important;
  }
}

/* Mobile Header Layout Consistency */
@media (max-width: 1023px) {
  /* Ensure header container maintains consistent layout in RTL */
  .rtl #mainHeader .container {
    direction: ltr; /* Keep container LTR for consistent layout */
  }

  /* RTL header flex container */
  .rtl #mainHeader .flex.items-center.justify-between {
    flex-direction: row;
    direction: rtl; /* Apply RTL only to content */
  }

  /* Logo positioning in RTL */
  .rtl #mainHeader .flex.items-center:first-child {
    order: 1;
  }

  /* Action buttons positioning in RTL */
  .rtl #mainHeader .action-buttons-container {
    order: 2;
    flex-direction: row-reverse;
    gap: 8px;
  }

  /* Mobile menu button positioning */
  .rtl #mobileMenuButton {
    order: 3;
  }
}

/* Mobile Navigation Container Consistency */
@media (max-width: 1023px) {
  /* Base mobile nav container - same for both languages */
  .mobile-nav-container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(124, 132, 124, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }

  .dark .mobile-nav-container {
    background: rgba(31, 41, 55, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* RTL mobile nav container - maintain same structure */
  .rtl .mobile-nav-container {
    direction: rtl;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(124, 132, 124, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }

  .dark.rtl .mobile-nav-container {
    background: rgba(31, 41, 55, 0.98);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* Mobile Navigation Items Consistency */
@media (max-width: 1023px) {
  /* Base nav link styling - identical for both languages */
  .mobile-nav-container .nav-link {
    margin: 0.25rem 0;
    padding: 0.9rem 1rem;
    border-radius: 0.9rem;
    background: transparent;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-decoration: none;
    font-weight: 500;
    color: var(--fd-gray);
  }

  .dark .mobile-nav-container .nav-link {
    color: rgba(203, 213, 225, 0.9);
  }

  /* RTL nav link adjustments - only text direction changes */
  .rtl .mobile-nav-container .nav-link {
    justify-content: flex-start; /* Keep same alignment */
    text-align: right; /* RTL text alignment */
    direction: rtl;
  }

  /* Hover states - identical for both languages */
  .mobile-nav-container .nav-link:hover {
    background: rgba(122, 193, 67, 0.1);
    -webkit-transform: translateX(8px);
    -moz-transform: translateX(8px);
    -ms-transform: translateX(8px);
    transform: translateX(8px);
  }

  .rtl .mobile-nav-container .nav-link:hover {
    background: rgba(122, 193, 67, 0.1);
    -webkit-transform: translateX(-8px);
    -moz-transform: translateX(-8px);
    -ms-transform: translateX(-8px);
    transform: translateX(-8px); /* RTL transform direction */
  }

  /* Active states - identical for both languages */
  .mobile-nav-container .nav-link.active {
    background: var(--fd-green);
    color: #fff;
    -webkit-transform: translateX(8px);
    -moz-transform: translateX(8px);
    -ms-transform: translateX(8px);
    transform: translateX(8px);
  }

  .rtl .mobile-nav-container .nav-link.active {
    background: var(--fd-green);
    color: #fff;
    -webkit-transform: translateX(-8px);
    -moz-transform: translateX(-8px);
    -ms-transform: translateX(-8px);
    transform: translateX(-8px); /* RTL transform direction */
  }
}

/* Mobile Toggle Buttons Consistency */
@media (max-width: 1023px) {
  /* Base toggle container - identical layout */
  .mobile-nav-container .flex.gap-4 {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(124, 132, 124, 0.1);
  }

  .dark .mobile-nav-container .flex.gap-4 {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* RTL toggle container - same layout, RTL content */
  .rtl .mobile-nav-container .flex.gap-4 {
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
    direction: rtl;
  }

  /* Base toggle button styling - identical for both */
  #mobileLangToggle,
  #mobileThemeToggle {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: rgba(243, 244, 246, 1);
    -webkit-transition: all 0.2s ease;
    -moz-transition: all 0.2s ease;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    min-height: 44px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
  }

  .dark #mobileLangToggle,
  .dark #mobileThemeToggle {
    background: rgba(55, 65, 81, 1);
    color: rgba(243, 244, 246, 1);
  }

  #mobileLangToggle:hover,
  #mobileThemeToggle:hover {
    background: rgba(229, 231, 235, 1);
    -webkit-transform: translateY(-1px);
    -moz-transform: translateY(-1px);
    -ms-transform: translateY(-1px);
    transform: translateY(-1px);
  }

  .dark #mobileLangToggle:hover,
  .dark #mobileThemeToggle:hover {
    background: rgba(75, 85, 99, 1);
  }

  /* RTL toggle buttons - same styling, RTL content direction */
  .rtl #mobileLangToggle,
  .rtl #mobileThemeToggle {
    flex: 1;
    direction: rtl;
    text-align: center;
  }

  /* Toggle button content alignment */
  .rtl #mobileLangToggle .lang-ar,
  .rtl #mobileLangToggle .lang-en,
  .rtl #mobileThemeToggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    direction: rtl;
  }
}

/* ========== DESKTOP NAVIGATION RTL/LTR CONSISTENCY FIXES ========== */

/* Desktop Header Container - Identical layout for both languages */
@media (min-width: 1024px) {
  /* Base header container structure - same for LTR and RTL */
  #mainHeader .container {
    direction: ltr; /* Keep container LTR for consistent layout structure */
  }

  /* Header flex container - maintain consistent layout */
  #mainHeader .flex.items-center.justify-between {
    direction: ltr; /* Keep main flex container LTR for structure */
  }

  /* RTL content direction only - maintain visual layout */
  .rtl #mainHeader .container {
    direction: ltr; /* Container stays LTR for layout consistency */
  }

  .rtl #mainHeader .flex.items-center.justify-between {
    direction: ltr; /* Main flex stays LTR for layout consistency */
  }

  /* RTL content elements - apply RTL only to text content */
  .rtl #mainHeader nav {
    direction: rtl; /* Navigation links get RTL text direction */
  }

  .rtl #mainHeader .action-buttons-container {
    direction: ltr; /* Action buttons keep LTR for visual consistency */
  }
}

/* Desktop Navigation Links - Perfect RTL/LTR Parity */
@media (min-width: 1024px) {
  /* Base navigation link styling - IDENTICAL for both languages */
  .hidden.lg:flex .nav-link {
    /* Layout & Sizing - EXACTLY the same */
    padding: 10px 0;
    margin: 0;
    position: relative;

    /* Typography - EXACTLY the same */
    font-weight: 600;
    font-size: 16px;
    line-height: 1.5;

    /* Colors - EXACTLY the same */
    color: var(--fd-gray);

    /* Background & Underline - EXACTLY the same */
    background: linear-gradient(to right, var(--fd-green), var(--fd-green))
      no-repeat;
    background-size: 0% 2px;
    background-position: left bottom;

    /* Transitions - EXACTLY the same */
    transition: all 0.3s ease;

    /* Display - EXACTLY the same */
    display: block;

    /* Text alignment - LTR default */
    text-align: left;
  }

  /* Dark mode navigation links - IDENTICAL for both */
  .dark .hidden.lg:flex .nav-link {
    color: rgba(203, 213, 225, 0.9);
  }

  /* RTL navigation links - ONLY text direction changes */
  .rtl .hidden.lg:flex .nav-link {
    direction: rtl;
    text-align: right; /* RTL text alignment */
    background-position: right bottom; /* Underline from right */
  }

  /* Hover states - IDENTICAL for both languages */
  .hidden.lg:flex .nav-link:hover,
  .hidden.lg:flex .nav-link.active {
    background-size: 100% 2px;
    color: var(--fd-green);
  }

  /* Dark hover states - IDENTICAL for both */
  .dark .hidden.lg:flex .nav-link:hover,
  .dark .hidden.lg:flex .nav-link.active {
    color: var(--fd-green);
  }

  /* Navigation gap - IDENTICAL for both */
  .hidden.lg:flex.items-center.gap-8 {
    gap: 2rem; /* gap-8 equivalent */
  }

  .rtl .hidden.lg:flex.items-center.gap-8 {
    gap: 2rem; /* Same gap for visual consistency */
  }
}

/* Desktop Toggle Buttons - Perfect RTL/LTR Consistency */
@media (min-width: 1024px) {
  /* Base toggle button styling - IDENTICAL for both languages */
  .toggle-btn {
    /* Layout & Sizing - EXACTLY the same */
    width: 52px;
    height: 52px;
    min-width: 52px;
    max-width: 52px;
    min-height: 52px;
    max-height: 52px;

    /* Border & Border Radius - EXACTLY the same */
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);

    /* Background - EXACTLY the same */
    background: linear-gradient(
      135deg,
      rgba(122, 193, 67, 0.2) 0%,
      rgba(122, 193, 67, 0.1) 100%
    );
    backdrop-filter: blur(15px);

    /* Display & Layout - EXACTLY the same */
    display: flex;
    align-items: center;
    justify-content: center;

    /* Transitions - EXACTLY the same */
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Position & Overflow - EXACTLY the same */
    position: relative;
    overflow: hidden;
    cursor: pointer;
    outline: none;
  }

  /* Dark mode toggle buttons - IDENTICAL for both */
  .dark .toggle-btn {
    background: linear-gradient(
      135deg,
      rgba(122, 193, 67, 0.15),
      rgba(42, 47, 58, 0.15)
    );
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* RTL toggle buttons - ONLY content direction changes, NO visual changes */
  .rtl .toggle-btn {
    /* Keep ALL visual properties identical */
    width: 52px;
    height: 52px;
    min-width: 52px;
    max-width: 52px;
    min-height: 52px;
    max-height: 52px;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: linear-gradient(
      135deg,
      rgba(122, 193, 67, 0.2) 0%,
      rgba(122, 193, 67, 0.1) 100%
    );
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    outline: none;
  }

  .dark .rtl .toggle-btn {
    background: linear-gradient(
      135deg,
      rgba(122, 193, 67, 0.15),
      rgba(42, 47, 58, 0.15)
    );
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Toggle button icons - IDENTICAL sizing for both */
  .toggle-btn i {
    font-size: 18px;
    transition: all 0.3s ease;
    flex-shrink: 0;
  }

  .rtl .toggle-btn i {
    font-size: 18px;
    transition: all 0.3s ease;
    flex-shrink: 0;
  }

  /* Hover states - IDENTICAL for both languages */
  .toggle-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(122, 193, 67, 0.25);
    border-color: var(--fd-green);
  }

  .rtl .toggle-btn:hover {
    transform: translateY(-2px) scale(1.05); /* Same transform */
    box-shadow: 0 8px 20px rgba(122, 193, 67, 0.25); /* Same shadow */
    border-color: var(--fd-green); /* Same border color */
  }

  /* Focus states - IDENTICAL for both */
  .toggle-btn:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
  }

  .rtl .toggle-btn:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
  }
}

/* Desktop Action Buttons Container - Perfect RTL/LTR Layout */
@media (min-width: 1024px) {
  /* Base action buttons container - IDENTICAL layout */
  .action-buttons-container {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100;
    direction: ltr; /* Keep LTR for consistent visual layout */
  }

  /* RTL action buttons container - SAME visual layout, RTL content only */
  .rtl .action-buttons-container {
    display: flex;
    align-items: center;
    gap: 12px; /* Same gap for visual consistency */
    z-index: 100;
    direction: ltr; /* Keep LTR for visual layout consistency */
  }

  /* Language toggle button content - RTL text direction only */
  .rtl #langToggle {
    direction: rtl;
  }

  .rtl #langToggle .lang-ar,
  .rtl #langToggle .lang-en {
    direction: rtl;
    text-align: center;
  }

  /* Flag positioning - CONSISTENT for both languages */
  .flag {
    width: 20px;
    height: 15px;
    object-fit: contain;
    flex-shrink: 0;
  }

  .rtl .flag {
    width: 20px;
    height: 15px;
    object-fit: contain;
    flex-shrink: 0;
    margin: 0 2px; /* Consistent margin */
  }
}

/* Desktop Logo Container - Perfect RTL/LTR Positioning */
@media (min-width: 1024px) {
  /* Base logo container - IDENTICAL for both */
  .logo-container {
    display: flex;
    align-items: center;
  }

  .rtl .logo-container {
    display: flex;
    align-items: center; /* Same alignment */
  }

  /* Logo image - IDENTICAL sizing for both */
  .logo-image {
    width: auto;
    height: auto;
    max-width: 215px;
    max-height: 80px;
    object-fit: contain;
  }

  .rtl .logo-image {
    width: auto;
    height: auto;
    max-width: 215px;
    max-height: 80px;
    object-fit: contain; /* Same dimensions */
  }
}

/* ========== DESKTOP NAVIGATION OVERRIDE RULES ========== */

/* Override any conflicting desktop navigation rules to ensure consistency */
@media (min-width: 1024px) {
  /* Force override navigation link styling */
  .hidden.lg:flex .nav-link,
  .rtl .hidden.lg:flex .nav-link {
    padding: 10px 0 !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    color: var(--fd-gray) !important;
    background: linear-gradient(to right, var(--fd-green), var(--fd-green))
      no-repeat !important;
    background-size: 0% 2px !important;
    transition: all 0.3s ease !important;
  }

  .rtl .hidden.lg:flex .nav-link {
    background-position: right bottom !important;
  }

  /* Force override toggle button styling */
  .toggle-btn,
  .rtl .toggle-btn {
    width: 52px !important;
    height: 52px !important;
    border-radius: 16px !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    background: linear-gradient(
      135deg,
      rgba(122, 193, 67, 0.2) 0%,
      rgba(122, 193, 67, 0.1) 100%
    ) !important;
    backdrop-filter: blur(15px) !important;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  }

  .dark .toggle-btn,
  .dark .rtl .toggle-btn {
    background: linear-gradient(
      135deg,
      rgba(122, 193, 67, 0.15),
      rgba(42, 47, 58, 0.15)
    ) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  /* Force override action buttons container */
  .action-buttons-container,
  .rtl .action-buttons-container {
    gap: 12px !important;
    direction: ltr !important;
  }

  /* Force override navigation gap */
  .hidden.lg:flex.items-center.gap-8,
  .rtl .hidden.lg:flex.items-center.gap-8 {
    gap: 2rem !important;
  }
}

/* ========== FINAL DESKTOP NAVIGATION OVERRIDE - ENSURE PRECEDENCE ========== */

/* This section must come last to override all conflicting rules */
@media (min-width: 1024px) {
  /* CRITICAL: Override ALL mobile-specific RTL rules for desktop */

  /* Reset action buttons container - CRITICAL for desktop consistency */
  .rtl #mainHeader .action-buttons-container,
  .rtl .action-buttons-container {
    order: unset !important;
    flex-direction: row !important;
    gap: 12px !important;
    direction: ltr !important;
  }

  /* Reset toggle button transforms - CRITICAL for desktop consistency */
  .rtl .toggle-btn {
    transform: none !important;
  }

  .rtl .toggle-btn:hover {
    transform: translateY(-2px) scale(1.05) !important;
  }

  /* Reset toggle button margins - CRITICAL for desktop consistency */
  .rtl .action-buttons-container .toggle-btn {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Ensure desktop navigation links are not affected by mobile rules */
  .rtl .hidden.lg:flex .nav-link {
    justify-content: unset !important;
    transform: none !important;
  }

  /* Override any conflicting mobile nav link rules for desktop */
  /* Mobile rules only - do not affect desktop navigation */

  /* Ensure desktop nav links are completely separate from mobile rules */
  .hidden.lg:flex .nav-link {
    margin: 0 !important;
    padding: 10px 0 !important;
    transform: none !important;
  }

  .rtl .hidden.lg:flex .nav-link {
    margin: 0 !important;
    padding: 10px 0 !important;
    transform: none !important;
  }

  /* CRITICAL: Hide mobile menu button on desktop in RTL mode */
  #mobileMenuButton.lg\:hidden,
  .rtl #mobileMenuButton.lg\:hidden {
    display: none !important;
  }

  /* CRITICAL: Fix profile button visibility in RTL mode */
  /* Desktop profile button - should show on desktop only */
  .toggle-btn.hidden.lg\:flex,
  .rtl .toggle-btn.hidden.lg\:flex {
    display: flex !important;
  }

  /* Mobile profile button - should show on mobile only */
  .toggle-btn.lg\:hidden,
  .rtl .toggle-btn.lg\:hidden {
    display: none !important;
  }

  /* Ensure mobile menu button stays hidden on desktop screens */
  @media (min-width: 1024px) {
    #mobileMenuButton,
    .rtl #mobileMenuButton {
      display: none !important;
    }

    /* Ensure desktop profile button shows on desktop */
    .toggle-btn.hidden.lg\:flex,
    .rtl .toggle-btn.hidden.lg\:flex {
      display: flex !important;
    }

    /* Ensure mobile profile button stays hidden on desktop */
    .toggle-btn.lg\:hidden,
    .rtl .toggle-btn.lg\:hidden {
      display: none !important;
    }
  }

  /* Ensure mobile profile button shows on mobile */
  @media (max-width: 1023px) {
    .toggle-btn.lg\:hidden,
    .rtl .toggle-btn.lg\:hidden {
      display: flex !important;
    }

    /* Ensure desktop profile button stays hidden on mobile */
    .toggle-btn.hidden.lg\:flex,
    .rtl .toggle-btn.hidden.lg\:flex {
      display: none !important;
    }
  }
}

/* RTL support */
.rtl {
  direction: rtl;
}
.rtl .flex {
  flex-direction: row-reverse;
}
/* Preserve flex-col for navigation containers in RTL */
.rtl .mobile-nav-container .flex-col,
.rtl .flex.flex-col,
.rtl .mobile-nav-container .flex {
  flex-direction: column;
}
/* Exception: Keep mobile toggle container as row in RTL */
.rtl .mobile-nav-container .flex.gap-4,
.rtl .mobile-nav-container .flex[class*="gap-"] {
  flex-direction: row !important;
}
/* Ensure mobile navigation items stack vertically in RTL */
.rtl .mobile-nav-container .space-y-2 > * + * {
  margin-top: 0.5rem;
}
/* RTL toggle button fixes */
.rtl .toggle-btn {
  transform: none;
}
.rtl .toggle-btn:hover {
  transform: translateY(-2px) scale(1.05);
}
/* Fix flag margins in RTL */
.flag {
  width: 20px;
  height: 15px;
  object-fit: contain;
}
.mobile-flag {
  width: 20px;
  height: 15px;
  object-fit: contain;
}
.rtl .flag {
  margin-left: 4px;
  margin-right: 0;
}
.rtl .mobile-flag {
  margin-left: 4px;
  margin-right: 0;
}
/* Ensure mobile toggle buttons have consistent layout in RTL */
.rtl #mobileLangToggle,
.rtl #mobileThemeToggle {
  flex-direction: row;
  justify-content: center;
  align-items: center;
  /* Ensure identical dimensions */
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  width: 100%;
}
/* RTL mobile toggle button content fixes */
.rtl #mobileLangToggle .lang-ar,
.rtl #mobileLangToggle .lang-en {
  flex-direction: row;
  align-items: center;
  justify-content: center;
}
.rtl #mobileThemeToggle {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  /* Ensure identical dimensions */
  height: 48px;
  min-height: 48px;
  max-height: 48px;
}
/* Fix mobile toggle container layout in RTL */
.rtl .mobile-nav-container .flex.gap-4 {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}
/* Ensure consistent spacing in mobile toggles for RTL */
.rtl #mobileLangToggle span,
.rtl #mobileThemeToggle span {
  text-align: center;
}
/* Ensure button content doesn't affect dimensions */
.rtl #mobileLangToggle .lang-ar,
.rtl #mobileLangToggle .lang-en,
.rtl #mobileThemeToggle {
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
}
.rtl #mobileLangToggle img,
.rtl #mobileThemeToggle i {
  flex-shrink: 0;
}
/* RTL action buttons container fixes */
.rtl .action-buttons-container {
  flex-direction: row-reverse;
}
.rtl .action-buttons-container .toggle-btn {
  margin-left: 8px;
  margin-right: 0;
}
.rtl .text-right {
  text-align: left;
}
.rtl .text-left {
  text-align: right;
}
/* Exception: Keep mobile toggle container as row in RTL */
.rtl .mobile-nav-container .flex.gap-4,
.rtl .mobile-nav-container .flex[class*="gap-"] {
  flex-direction: row !important;
}
/* Ensure mobile navigation items stack vertically in RTL */
.rtl .mobile-nav-container .space-y-2 > * + * {
  margin-top: 0.5rem;
}
/* RTL toggle button fixes */
.rtl .toggle-btn {
  transform: none;
}
.rtl .toggle-btn:hover {
  transform: translateY(-2px) scale(1.05);
}
/* Fix flag margins in RTL */
.flag {
  width: 20px;
  height: 15px;
  object-fit: contain;
}
.mobile-flag {
  width: 20px;
  height: 15px;
  object-fit: contain;
}
.rtl .flag {
  margin-left: 4px;
  margin-right: 0;
}
.rtl .mobile-flag {
  margin-left: 4px;
  margin-right: 0;
}
/* Ensure mobile toggle buttons have consistent layout in RTL */
.rtl #mobileLangToggle,
.rtl #mobileThemeToggle {
  flex-direction: row;
  justify-content: center;
  align-items: center;
  /* Ensure identical dimensions */
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  width: 100%;
}
/* RTL mobile toggle button content fixes */
.rtl #mobileLangToggle .lang-ar,
.rtl #mobileLangToggle .lang-en {
  flex-direction: row;
  align-items: center;
  justify-content: center;
}
.rtl #mobileThemeToggle {
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 8px;
  /* Ensure identical dimensions */
  height: 48px;
  min-height: 48px;
  max-height: 48px;
}
/* Fix mobile toggle container layout in RTL */
.rtl .mobile-nav-container .flex.gap-4 {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}
/* Ensure consistent spacing in mobile toggles for RTL */
.rtl #mobileLangToggle span,
.rtl #mobileThemeToggle span {
  text-align: center;
}
/* Ensure button content doesn't affect dimensions */
.rtl #mobileLangToggle .lang-ar,
.rtl #mobileLangToggle .lang-en,
.rtl #mobileThemeToggle {
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  overflow: hidden;
}
.rtl #mobileLangToggle img,
.rtl #mobileThemeToggle i {
  flex-shrink: 0;
}
/* RTL action buttons container fixes */
.rtl .action-buttons-container {
  flex-direction: row-reverse;
}
.rtl .action-buttons-container .toggle-btn {
  margin-left: 8px;
  margin-right: 0;
}
.rtl .text-right {
  text-align: left;
}

/* ========== MOBILE GALLERY CARD POSITIONING FIX ========== */

/* Mobile backdrop-filter optimization - Prevent GPU overload */
@media (max-width: 768px) {
  .mobile-nav-container {
    /* Reduce backdrop-filter complexity on mobile */
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
  }

  .toggle-btn {
    /* Disable backdrop-filter on mobile toggle buttons */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(122, 193, 67, 0.2) !important;
  }

  .btn-primary {
    /* Simplify backdrop-filter on mobile buttons */
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
  }

  .btn-primary:hover {
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
  }

  /* 3D Gallery specific mobile optimizations */
  .mdw-image-gallery-3d {
    /* Disable backdrop-filter effects in gallery on mobile */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .gallery-card {
    /* Prevent backdrop-filter interference with gallery cards */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }

  .image-slider-container {
    /* Remove backdrop-filter from slider containers */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

/* Override inline JavaScript positioning on mobile to center cards */
@media (max-width: 768px) {
  .gallery-card {
    left: 50% !important;
    transform: translateX(-50%);
    /* Prevent z-index conflicts during animation */
    z-index: 10 !important;
  }
}

/* ========== MOBILE RESPONSIVE BREAKPOINT FIXES ========== */

/* Small Mobile Devices (640px and below) */
@media (max-width: 640px) {
  /* Header adjustments */
  .rtl #mainHeader .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  /* Logo size consistency */
  .rtl .logo-image {
    width: 190px !important;
    height: 70px !important;
    object-fit: contain;
  }

  /* Action buttons spacing */
  .rtl #mainHeader .action-buttons-container {
    gap: 0.25rem;
  }

  /* Toggle button size */
  .rtl .toggle-btn {
    width: 40px !important;
    height: 40px !important;
  }

  /* Mobile nav container padding */
  .rtl .mobile-nav-container .py-6 {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  /* Nav link padding for smaller screens */
  .rtl .mobile-nav-container .nav-link {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }

  /* Toggle button adjustments */
  .rtl #mobileLangToggle,
  .rtl #mobileThemeToggle {
    padding: 0.625rem 0.875rem;
    font-size: 0.8rem;
    min-height: 40px;
  }

  /* Toggle container gap */
  .rtl .mobile-nav-container .flex.gap-4 {
    gap: 0.75rem;
  }
}

/* Medium Mobile Devices (641px to 768px) */
@media (min-width: 641px) and (max-width: 768px) {
  /* Slightly larger spacing for medium screens */
  .rtl #mobileLangToggle,
  .rtl #mobileThemeToggle {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    min-height: 44px;
  }

  .rtl .mobile-nav-container .nav-link {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
  }
}

/* Large Mobile/Small Tablet (769px to 1023px) */
@media (min-width: 769px) and (max-width: 1023px) {
  /* Header container adjustments */
  .rtl #mainHeader .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Action buttons spacing */
  .rtl #mainHeader .action-buttons-container {
    gap: 0.5rem;
  }

  /* Mobile nav adjustments */
  .rtl .mobile-nav-container .py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }

  /* Nav links for larger mobile screens */
  .rtl .mobile-nav-container .nav-link {
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }

  /* Toggle buttons for larger mobile screens */
  .rtl #mobileLangToggle,
  .rtl #mobileThemeToggle {
    padding: 0.875rem 1.125rem;
    font-size: 0.9rem;
    min-height: 48px;
  }
}

/* ========== GALLERY CARDS MOBILE RTL FIXES ========== */
@media (max-width: 639px) {
  /* RTL gallery container rules removed - 3D gallery must retain original behavior */

  /* RTL gallery inner rules removed - 3D gallery must retain original behavior */

  /* RTL gallery card rules removed - 3D gallery must retain original behavior */
}

/* ========== GALLERY CARDS RTL INITIALIZATION REMOVED ========== */
/* 3D gallery must retain original behavior - no RTL modifications applied */

/* News Header RTL Fixes - OVERRIDE EXISTING STYLES */
.rtl .news-header {
  direction: rtl !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-direction: row !important;
}

.rtl .news-header .text-left {
  text-align: right !important;
  direction: rtl !important;
}

.rtl .news-header .text-left h2 {
  text-align: right !important;
  direction: rtl !important;
}

.rtl .news-header .text-left .w-16 {
  margin-left: auto !important;
  margin-right: 0 !important;
}

/* News Grid RTL Fixes - OVERRIDE EXISTING STYLES */
.rtl .news-grid {
  direction: rtl !important;
}

/* News Item RTL Fixes - CRITICAL for proper RTL layout - OVERRIDE ALL */
.rtl .news-item {
  border-left: none !important;
  border-right: 6px solid var(--fd-green) !important;
  text-align: right !important;
  direction: rtl !important;
  padding: 24px !important;
  background-color: var(--card-bg) !important;
  box-shadow: 0 4px 12px var(--card-shadow) !important;
  transition:
    transform 0.2s,
    box-shadow 0.2s !important;
  cursor: pointer !important;
}

.rtl .news-item:hover {
  transform: translateY(-4px) !important;
  box-shadow: 0 12px 24px var(--card-shadow) !important;
}

.rtl .news-item .date {
  text-align: right !important;
  direction: rtl !important;
  display: block !important;
  font-size: 0.8rem !important;
  color: var(--fd-gray) !important;
  margin-bottom: 10px !important;
  font-weight: 500 !important;
  letter-spacing: 0.3px !important;
}

.rtl .news-item p {
  text-align: right !important;
  direction: rtl !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
  line-height: 1.5 !important;
}

/* Dark mode RTL news item fixes - OVERRIDE EXISTING STYLES */
.dark .rtl .news-item {
  border-left: none !important;
  border-right-color: var(--fd-green) !important;
  background-color: var(--card-bg) !important;
  box-shadow: 0 4px 12px var(--card-shadow) !important;
}

.dark .rtl .news-item:hover {
  box-shadow: 0 12px 24px var(--card-shadow) !important;
}

/* News Slider Controls RTL Fixes */
.rtl .slider-controls {
  direction: ltr !important; /* Keep controls LTR for intuitive operation */
}

.rtl .slider-btn {
  transform: scaleX(-1) !important; /* Flip chevron icons for RTL */
}

.rtl #news-prev i::before {
  content: "\f054" !important; /* fa-chevron-right */
}

.rtl #news-next i::before {
  content: "\f053" !important; /* fa-chevron-left */
}

/* News Gallery RTL Fixes */
.rtl .news-gallery {
  direction: rtl !important;
}

.rtl .news-gallery-grid {
  direction: rtl !important;
}

.rtl .branch-card {
  text-align: right !important;
  direction: rtl !important;
}

.rtl .branch-content {
  text-align: right !important;
  direction: rtl !important;
}

.rtl .branch-content h3 {
  text-align: right !important;
  direction: rtl !important;
}

.rtl .branch-content p {
  text-align: right !important;
  direction: rtl !important;
}

/* ========== NEWS SECTION MOBILE RTL FIXES ========== */
@media (max-width: 639px) {
  /* RTL news section - fix overall container */
  .rtl .news {
    direction: rtl !important;
    padding: 48px 0 !important; /* Reduced padding for mobile */
  }

  /* RTL news section container - fix overflow and positioning */
  .rtl .news .container {
    direction: rtl !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 1rem !important;
  }

  /* RTL news header - fix layout and text direction */
  .rtl .news-header {
    direction: rtl !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 2rem !important;
    flex-direction: row !important;
  }

  /* RTL news header text container - fix text alignment */
  .rtl .news-header .text-left {
    direction: rtl !important;
    text-align: right !important;
    font-size: 1.75rem !important; /* Reduced for mobile */
    margin-bottom: 1rem !important;
  }

  /* RTL news slider container - fix direction and overflow */

  /* RTL news slider controls - fix positioning and direction */
  .rtl .news-header .slider-controls {
    direction: ltr !important; /* Keep LTR for intuitive operation */
    display: flex !important;
    gap: 8px !important;
    align-self: center !important;
    flex-shrink: 0 !important;
  }

  /* RTL news slider container - fix overflow and positioning */
  .rtl .news-slider-container {
    direction: ltr !important; /* Keep LTR for slider mechanics */
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    margin: 0 -5px !important;
    padding: 0 5px !important;
    display: block !important;
    visibility: visible !important;
  }

  /* RTL news slider track - fix transform direction */
  .rtl #news-slider {
    direction: ltr !important; /* Keep LTR for proper flex behavior */
    display: flex !important;
    -webkit-transition: transform 0.5s ease;
    -moz-transition: transform 0.5s ease;
    transition: transform 0.5s ease;
    gap: 20px !important;
    padding: 10px 0 !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* RTL news item - fix content direction and override desktop styles */
  .rtl #news-slider .news-item {
    direction: rtl !important; /* Apply RTL only to item content */
    text-align: right !important;
    flex: 0 0 calc(100% - 0px) !important; /* Mobile: 1 item visible */
    min-width: 100% !important;
    padding: 20px !important; /* Slightly reduced for mobile */
    background-color: var(--card-bg) !important;
    border-left: none !important;
    border-right: 6px solid var(--fd-green) !important;
    box-shadow: 0 4px 12px var(--card-shadow) !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
    display: block !important;
    visibility: visible !important;
    position: relative !important;
    overflow: visible !important;
  }

  /* RTL news item hover - fix mobile hover behavior */
  .rtl #news-slider .news-item:hover {
    -webkit-transform: translateY(-4px) scale(1.02);
    -moz-transform: translateY(-4px) scale(1.02);
    -ms-transform: translateY(-4px) scale(1.02);
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 24px var(--card-shadow) !important;
    z-index: 10 !important;
  }

  /* RTL news item date - fix text direction */
  .rtl #news-slider .news-item .date {
    direction: rtl !important;
    text-align: right !important;
    display: block !important;
    font-size: 0.8rem !important;
    color: var(--fd-gray) !important;
    margin-bottom: 8px !important;
    font-weight: 500 !important;
    letter-spacing: 0.3px !important;
  }

  /* RTL news item text - fix text direction */
  .rtl #news-slider .news-item p {
    direction: rtl !important;
    text-align: right !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    line-height: 1.5 !important;
    margin: 0 !important;
  }

  /* RTL news slider buttons - fix styling and positioning */
  .rtl .slider-btn {
    transform: scaleX(-1) !important; /* Flip chevron icons for RTL */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: var(--fd-green) !important;
    color: white !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-size: 14px !important;
  }

  /* RTL news slider button hover */
  .rtl .slider-btn:hover {
    background: var(--fd-navy) !important;
    transform: scaleX(-1) scale(1.1) !important;
  }

  /* RTL news slider button disabled state */
  .rtl .slider-btn:disabled {
    background: var(--fd-gray) !important;
    cursor: not-allowed !important;
    opacity: 0.5 !important;
  }

  /* RTL news slider button icons - fix icon direction */
  .rtl #news-prev i::before {
    content: "\f054" !important; /* fa-chevron-right */
  }

  .rtl #news-next i::before {
    content: "\f053" !important; /* fa-chevron-left */
  }
}

/* Dark mode RTL news section mobile fixes */
@media (max-width: 639px) {
  .dark .rtl #news-slider .news-item {
    background-color: var(--card-bg) !important;
    border-right-color: var(--fd-green) !important;
    box-shadow: 0 4px 12px var(--card-shadow) !important;
  }

  .dark .rtl #news-slider .news-item:hover {
    box-shadow: 0 12px 24px var(--card-shadow) !important;
  }

  .dark .rtl #news-slider .news-item .date {
    color: var(--fd-gray) !important;
  }

  .dark .rtl #news-slider .news-item p {
    color: var(--text-primary) !important;
  }

  .dark .rtl .slider-btn {
    background: var(--fd-green) !important;
  }

  .dark .rtl .slider-btn:hover {
    background: var(--fd-navy) !important;
  }

  .dark .rtl .slider-btn:disabled {
    background: var(--fd-gray) !important;
  }
}

/* ========== NEWS GALLERY MOBILE RTL ENHANCEMENTS ========== */
@media (max-width: 639px) {
  /* RTL news gallery slider container - ensure stable RTL from first render */
  html[lang="ar"] .news-gallery-mobile-slider {
    direction: rtl !important;
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
  }

  /* RTL news gallery track - fix transform direction */
  html[lang="ar"] #newsGalleryTrack {
    direction: ltr !important; /* Keep LTR for proper flex behavior */
    display: flex !important;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1) !important;
    width: 100% !important;
    height: auto !important;
  }

  /* RTL news gallery slide - fix content direction only */
  html[lang="ar"] .news-gallery-mobile-slide {
    direction: rtl !important; /* Apply RTL only to slide content */
    flex: 0 0 100% !important;
    min-width: 100% !important;
    width: 100% !important;
    padding: 0 4px !important;
    display: block !important;
    position: relative !important;
    overflow: hidden !important;
  }

  /* RTL branch card inside mobile slide - override desktop styles for mobile */
  html[lang="ar"] .news-gallery-mobile-slide .branch-card {
    direction: rtl !important;
    text-align: right !important;
    position: relative !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    height: 200px !important;
    background: var(--card-bg) !important;
    box-shadow: 0 4px 12px var(--card-shadow) !important;
    transition: all 0.3s ease !important;
  }

  html[lang="ar"] .news-gallery-mobile-slide .branch-card:hover {
    transform: translateY(-4px) scale(1.02) !important;
    box-shadow: 0 12px 24px var(--card-shadow) !important;
  }

  /* RTL branch content - fix text alignment and positioning, override desktop styles */
  html[lang="ar"] .news-gallery-mobile-slide .branch-content {
    direction: rtl !important;
    text-align: right !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 1rem !important;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8)) !important;
    color: white !important;
  }

  /* RTL branch content headings - fix text direction and override desktop styles */
  html[lang="ar"] .news-gallery-mobile-slide .branch-content h3 {
    direction: rtl !important;
    text-align: right !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    margin-bottom: 0.25rem !important;
    color: white !important;
  }

  html[lang="ar"] .news-gallery-mobile-slide .branch-content p {
    direction: rtl !important;
    text-align: right !important;
    font-size: 0.85rem !important;
    font-weight: 400 !important;
    line-height: 1.4 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 0 !important;
  }

  /* RTL news gallery dots - fix positioning and direction */
  html[lang="ar"] .news-gallery-mobile-dots {
    direction: ltr !important; /* Keep dots LTR for consistent navigation */
    display: flex !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-top: 1rem !important;
    padding: 0 1rem !important;
  }

  html[lang="ar"] .ng-dot {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: var(--border-light) !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    direction: ltr !important;
  }

  html[lang="ar"] .ng-dot.active {
    background: var(--fd-green) !important;
    width: 24px !important;
    border-radius: 4px !important;
  }

  html[lang="ar"] .ng-dot:hover {
    background: var(--fd-gray) !important;
  }
}

/* ========== NEWS GALLERY RTL JAVASCRIPT INTEGRATION FIXES ========== */
@media (max-width: 639px) {
  /* Ensure news gallery starts from correct position in RTL mobile */
  html[lang="ar"]
    .news-gallery-mobile-slider[data-initialized="true"]
    #newsGalleryTrack {
    transform: translateX(0) !important; /* Start from first slide */
  }

  /* Prevent layout shift during initialization */
  html[lang="ar"] .news-gallery-mobile-slider {
    min-height: 250px !important; /* Prevent content jump */
  }

  /* Fix dots container positioning */
  html[lang="ar"] .news-gallery-mobile-dots {
    position: relative !important;
    z-index: 10 !important;
  }
}
@media (max-width: 639px) {
  /* RTL mobile slider container - fix overflow and positioning */
  .rtl .news-gallery-mobile-slider {
    direction: ltr !important; /* Keep LTR for slider mechanics */
    position: relative;
    overflow: hidden;
    width: 100%;
    display: block !important;
    visibility: visible !important;
  }

  /* RTL mobile slider track - fix transform direction */
  .rtl .news-gallery-mobile-track {
    direction: ltr !important; /* Keep LTR for proper flex behavior */
    display: flex !important;
    -webkit-transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    -moz-transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    -webkit-will-change: transform;
    will-change: transform;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* RTL mobile slide - fix content direction only */
  .rtl .news-gallery-mobile-slide {
    direction: rtl !important; /* Apply RTL only to slide content */
    flex: 0 0 100% !important;
    min-width: 100% !important;
    padding: 0 4px !important;
    width: 100% !important;
    display: block !important;
    visibility: visible !important;
    overflow: visible !important;
  }

  /* RTL branch card inside mobile slide - override desktop styles for mobile */
  .rtl .news-gallery-mobile-slide .branch-card {
    direction: rtl !important;
    text-align: right !important;
    position: relative !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    height: 220px !important;
    width: 100% !important;
    display: block !important;
    visibility: visible !important;
    cursor: pointer !important;
    /* Override desktop grid positioning */
    grid-row: unset !important;
    grid-column: unset !important;
    /* Mobile-friendly styling */
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 50%,
      rgba(0, 0, 0, 0.05) 100%
    ) !important;
  }

  /* RTL branch card image - ensure proper sizing and override desktop styles */
  .rtl .news-gallery-mobile-slide .branch-card img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    visibility: visible !important;
    /* Override desktop hover effects for mobile */
    transform: none !important;
    transition: none !important;
  }

  /* RTL branch overlay - ensure proper positioning and override desktop styles */
  .rtl .news-gallery-mobile-slide .branch-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    visibility: visible !important;
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.1) 0%,
      rgba(0, 0, 0, 0.6) 100%
    ) !important;
    transition: none !important;
  }

  /* RTL branch content - fix text alignment and positioning, override desktop styles */
  .rtl .news-gallery-mobile-slide .branch-content {
    direction: rtl !important;
    text-align: right !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    padding: 16px !important; /* Reduced padding for mobile */
    color: var(--fd-white) !important;
    z-index: 2 !important;
    display: block !important;
    visibility: visible !important;
    /* Override desktop transform and transition */
    transform: translateY(0) !important;
    transition: none !important;
  }

  /* RTL branch content headings - fix text direction and override desktop styles */
  .rtl .news-gallery-mobile-slide .branch-content h3 {
    direction: rtl !important;
    text-align: right !important;
    margin: 0 0 4px 0 !important; /* Reduced margin for mobile */
    display: block !important;
    visibility: visible !important;
    font-size: 1.25rem !important; /* Reduced font size for mobile */
    font-weight: 600 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5) !important;
    color: var(--fd-white) !important;
  }

  /* RTL branch content dates - fix text direction and override desktop styles */
  .rtl .news-gallery-mobile-slide .branch-content .branch-date {
    direction: rtl !important;
    text-align: right !important;
    display: block !important;
    visibility: visible !important;
    font-size: 0.875rem !important;
    opacity: 0.9 !important;
    font-weight: 400 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
    color: var(--fd-white) !important;
  }

  /* RTL mobile dots container - RTL direction on mobile Arabic only */
  .rtl .news-gallery-mobile-dots {
    direction: rtl !important; /* RTL for mobile Arabic */
    display: flex !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-top: 16px !important;
    padding: 0 16px !important;
  }

  /* RTL mobile dots - fix individual dot styling */
  .rtl .news-gallery-mobile-dots .ng-dot {
    direction: rtl !important; /* RTL for mobile Arabic */
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    border: none !important;
    background: rgba(27, 33, 71, 0.25) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    padding: 0 !important;
    display: block !important;
    visibility: visible !important;
  }

  /* RTL active dot - fix styling */
  .rtl .news-gallery-mobile-dots .ng-dot.active {
    background: var(--fd-green) !important;
    width: 24px !important;
    border-radius: 4px !important;
  }

  /* RTL hover state for dots */
  .rtl .news-gallery-mobile-dots .ng-dot:hover {
    background: var(--fd-navy) !important;
  }

  /* Ensure no hover effects on mobile branch cards */
  .rtl .news-gallery-mobile-slide .branch-card:hover {
    transform: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  }

  .rtl .news-gallery-mobile-slide .branch-card:hover img {
    transform: none !important;
  }

  .rtl .news-gallery-mobile-slide .branch-card:hover .branch-overlay {
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.1) 0%,
      rgba(0, 0, 0, 0.6) 100%
    ) !important;
  }

  .rtl .news-gallery-mobile-slide .branch-card:hover .branch-content {
    transform: translateY(0) !important;
  }
}

/* Dark mode RTL mobile news gallery fixes */
@media (max-width: 639px) {
  .dark .rtl .news-gallery-mobile-dots .ng-dot {
    background: rgba(226, 232, 240, 0.25) !important;
  }

  .dark .rtl .news-gallery-mobile-dots .ng-dot.active {
    background: var(--fd-green) !important;
  }

  .dark .rtl .news-gallery-mobile-dots .ng-dot:hover {
    background: var(--fd-navy) !important;
  }
}

/* ========== ABOUT CAROUSEL RTL FIXES - VISION, MISSION & COMMITMENT ========== */
@media (max-width: 639px) {
  /* RTL about carousel wrapper - fix overflow and positioning */
  .rtl .about-carousel-wrapper {
    direction: ltr !important; /* Keep LTR for slider mechanics */
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    display: block !important;
    visibility: visible !important;
  }

  /* RTL about carousel track - fix transform direction */
  .rtl .about-carousel-track {
    direction: ltr !important; /* Keep LTR for proper flex behavior */
    display: flex !important;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1) !important;
    will-change: transform !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* RTL about carousel slide - fix content direction only */
  .rtl .about-carousel-slide {
    direction: rtl !important; /* Apply RTL only to slide content */
    flex: 0 0 100% !important;
    min-width: 100% !important;
    padding: 0 4px !important;
    width: 100% !important;
    display: block !important;
    visibility: visible !important;
    overflow: visible !important;
  }

  /* RTL about carousel card container - ensure proper display */
  .rtl .about-carousel-slide .relative {
    direction: rtl !important;
    text-align: right !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 0.75rem !important; /* rounded-xl */
    box-shadow:
      0 10px 15px -3px rgba(0, 0, 0, 0.1),
      0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    display: block !important;
    visibility: visible !important;
    width: 100% !important;
    height: 288px !important; /* h-72 */
  }

  /* RTL about carousel image - ensure proper sizing */
  .rtl .about-carousel-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    visibility: visible !important;
  }

  /* RTL about carousel gradient overlay - ensure proper positioning */
  .rtl .about-carousel-slide .absolute.inset-0 {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    visibility: visible !important;
    background: linear-gradient(
      to top,
      rgba(0, 0, 0, 0.7),
      rgba(0, 0, 0, 0.4),
      transparent
    ) !important;
  }

  /* RTL about carousel content container - fix positioning and text direction */
  .rtl .about-carousel-slide .absolute.bottom-0 {
    direction: rtl !important;
    text-align: right !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    padding: 1.5rem !important;
    display: block !important;
    visibility: visible !important;
  }

  /* RTL about carousel icon - fix positioning */
  .rtl .about-carousel-slide .absolute.top-4 {
    position: absolute !important;
    top: 1rem !important;
    left: auto !important;
    right: 1rem !important; /* Move to right in RTL */
    display: block !important;
    visibility: visible !important;
  }

  /* RTL about carousel title - fix text direction */
  .rtl .about-carousel-slide h3 {
    direction: rtl !important;
    text-align: right !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    margin: 0 0 0.5rem 0 !important;
    color: var(--fd-white) !important;
    display: block !important;
    visibility: visible !important;
  }

  /* RTL about carousel description - fix text direction */
  .rtl .about-carousel-slide p {
    direction: rtl !important;
    text-align: right !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    display: block !important;
    visibility: visible !important;
  }

  /* RTL about carousel dots container - RTL direction on mobile Arabic only */
  .rtl .about-carousel-dots {
    direction: rtl !important; /* RTL for mobile Arabic */
    display: flex !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-top: 16px !important;
    padding: 0 16px !important;
  }

  /* RTL about carousel dots - fix individual dot styling */
  .rtl .about-carousel-dots .about-dot {
    direction: rtl !important; /* RTL for mobile Arabic */
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    border: none !important;
    background: rgba(27, 33, 71, 0.25) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    padding: 0 !important;
    display: block !important;
    visibility: visible !important;
  }

  /* RTL active dot - fix styling */
  .rtl .about-carousel-dots .about-dot.active {
    background: var(--fd-green) !important;
    width: 24px !important;
    border-radius: 4px !important;
  }

  /* RTL hover state for dots */
  .rtl .about-carousel-dots .about-dot:hover {
    background: var(--fd-navy) !important;
  }
}

/* Dark mode RTL about carousel fixes */
@media (max-width: 639px) {
  .dark .rtl .about-carousel-dots .about-dot {
    background: rgba(226, 232, 240, 0.25) !important;
  }

  .dark .rtl .about-carousel-dots .about-dot.active {
    background: var(--fd-green) !important;
  }

  .dark .rtl .about-carousel-dots .about-dot:hover {
    background: var(--fd-navy) !important;
  }
}

/* ENSURE RTL MOBILE FIXES DON'T AFFECT DESKTOP OR ENGLISH */
@media (min-width: 640px) {
  /* Reset mobile RTL styles on desktop - critical for desktop consistency */
  .rtl .news-gallery-mobile-slider,
  .rtl .news-gallery-mobile-track,
  .rtl .news-gallery-mobile-slide,
  .rtl .news-gallery-mobile-slide .branch-card,
  .rtl .news-gallery-mobile-slide .branch-card img,
  .rtl .news-gallery-mobile-slide .branch-overlay,
  .rtl .news-gallery-mobile-slide .branch-content,
  .rtl .news-gallery-mobile-slide .branch-content h3,
  .rtl .news-gallery-mobile-slide .branch-content .branch-date,
  .rtl .news-gallery-mobile-dots,
  .rtl .news-gallery-mobile-dots .ng-dot,
  .rtl .about-carousel-wrapper,
  .rtl .about-carousel-track,
  .rtl .about-carousel-slide,
  .rtl .about-carousel-slide .relative,
  .rtl .about-carousel-slide img,
  .rtl .about-carousel-slide .absolute.inset-0,
  .rtl .about-carousel-slide .absolute.bottom-0,
  .rtl .about-carousel-slide .absolute.top-4,
  .rtl .about-carousel-slide h3,
  .rtl .about-carousel-slide p,
  .rtl .about-carousel-dots,
  .rtl .about-carousel-dots .about-dot,
  .rtl .news,
  .rtl .news .container,
  .rtl .news-header,
  .rtl .news-header .text-left,
  .rtl .news-header .text-left h2,
  .rtl .news-header .slider-controls,
  .rtl .news-slider-container,
  .rtl #news-slider,
  .rtl #news-slider .news-item,
  .rtl #news-slider .news-item .date,
  .rtl #news-slider .news-item p,
  .rtl .slider-btn {
    all: unset !important;
    display: none !important;
  }
}

/* Ensure English mode is not affected by RTL mobile fixes */
html:not([lang="ar"]) .news-gallery-mobile-slider,
html:not([lang="ar"]) .news-gallery-mobile-track,
html:not([lang="ar"]) .news-gallery-mobile-slide,
html:not([lang="ar"]) .news-gallery-mobile-slide .branch-card,
html:not([lang="ar"]) .news-gallery-mobile-slide .branch-card img,
html:not([lang="ar"]) .news-gallery-mobile-slide .branch-overlay,
html:not([lang="ar"]) .news-gallery-mobile-slide .branch-content,
html:not([lang="ar"]) .news-gallery-mobile-slide .branch-content h3,
html:not([lang="ar"]) .news-gallery-mobile-slide .branch-content .branch-date,
html:not([lang="ar"]) .news-gallery-mobile-dots,
html:not([lang="ar"]) .news-gallery-mobile-dots .ng-dot,
html:not([lang="ar"]) .about-carousel-wrapper,
html:not([lang="ar"]) .about-carousel-track,
html:not([lang="ar"]) .about-carousel-slide,
html:not([lang="ar"]) .about-carousel-slide .relative,
html:not([lang="ar"]) .about-carousel-slide img,
html:not([lang="ar"]) .about-carousel-slide .absolute.inset-0,
html:not([lang="ar"]) .about-carousel-slide .absolute.bottom-0,
html:not([lang="ar"]) .about-carousel-slide .absolute.top-4,
html:not([lang="ar"]) .about-carousel-slide h3,
html:not([lang="ar"]) .about-carousel-slide p,
html:not([lang="ar"]) .about-carousel-dots,
html:not([lang="ar"]) .about-carousel-dots .about-dot,
html:not([lang="ar"]) .news,
html:not([lang="ar"]) .news .container,
html:not([lang="ar"]) .news-header,
html:not([lang="ar"]) .news-header .text-left,
html:not([lang="ar"]) .news-header .text-left h2,
html:not([lang="ar"]) .news-header .slider-controls,
html:not([lang="ar"]) .news-slider-container,
html:not([lang="ar"]) #news-slider,
html:not([lang="ar"]) #news-slider .news-item,
html:not([lang="ar"]) #news-slider .news-item .date,
html:not([lang="ar"]) #news-slider .news-item p,
html:not([lang="ar"]) .slider-btn {
  direction: ltr !important;
  text-align: left !important;
}

/* English mode mobile gallery - ensure proper LTR behavior */
@media (max-width: 639px) {
  html:not([lang="ar"]) .news-gallery-mobile-slider {
    direction: ltr !important;
    overflow: hidden !important;
    width: 100% !important;
  }

  html:not([lang="ar"]) .news-gallery-mobile-track {
    direction: ltr !important;
    display: flex !important;
  }

  html:not([lang="ar"]) .news-gallery-mobile-slide {
    direction: ltr !important;
    flex: 0 0 100% !important;
    min-width: 100% !important;
  }

  html:not([lang="ar"]) .news-gallery-mobile-slide .branch-content {
    direction: ltr !important;
    text-align: left !important;
  }

  html:not([lang="ar"]) .news-gallery-mobile-slide .branch-content h3 {
    direction: ltr !important;
    text-align: left !important;
  }

  html:not([lang="ar"])
    .news-gallery-mobile-slide
    .branch-content
    .branch-date {
    direction: ltr !important;
    text-align: left !important;
  }

  html:not([lang="ar"]) .news-gallery-mobile-dots {
    direction: ltr !important;
    justify-content: center !important;
  }

  /* English mode about carousel - ensure proper LTR behavior */
  html:not([lang="ar"]) .about-carousel-wrapper {
    direction: ltr !important;
    overflow: hidden !important;
    width: 100% !important;
  }

  html:not([lang="ar"]) .about-carousel-track {
    direction: ltr !important;
    display: flex !important;
  }

  html:not([lang="ar"]) .about-carousel-slide {
    direction: ltr !important;
    flex: 0 0 100% !important;
    min-width: 100% !important;
  }

  html:not([lang="ar"]) .about-carousel-slide .absolute.bottom-0 {
    direction: ltr !important;
    text-align: left !important;
  }

  html:not([lang="ar"]) .about-carousel-slide h3 {
    direction: ltr !important;
    text-align: left !important;
  }

  html:not([lang="ar"]) .about-carousel-slide p {
    direction: ltr !important;
    text-align: left !important;
  }

  html:not([lang="ar"]) .about-carousel-dots {
    direction: ltr !important;
    justify-content: center !important;
  }

  /* English mode news section - ensure proper LTR behavior */
  html:not([lang="ar"]) .news {
    direction: ltr !important;
  }

  html:not([lang="ar"]) .news .container {
    direction: ltr !important;
  }

  html:not([lang="ar"]) .news-header {
    direction: ltr !important;
  }

  html:not([lang="ar"]) .news-header .text-left {
    direction: ltr !important;
    text-align: left !important;
  }

  html:not([lang="ar"]) .news-header .text-left h2 {
    direction: ltr !important;
    text-align: left !important;
  }

  html:not([lang="ar"]) .news-header .slider-controls {
    direction: ltr !important;
  }

  html:not([lang="ar"]) .news-slider-container {
    direction: ltr !important;
  }

  html:not([lang="ar"]) #news-slider {
    direction: ltr !important;
    display: flex !important;
  }

  html:not([lang="ar"]) #news-slider .news-item {
    direction: ltr !important;
    text-align: left !important;
    border-left: 6px solid var(--fd-green) !important;
    border-right: none !important;
  }

  html:not([lang="ar"]) #news-slider .news-item .date {
    direction: ltr !important;
    text-align: left !important;
  }

  html:not([lang="ar"]) #news-slider .news-item p {
    direction: ltr !important;
    text-align: left !important;
  }

  html:not([lang="ar"]) .slider-btn {
    transform: none !important;
  }
}

/* ========== FOOTER MOBILE RTL FIXES - CENTER LTR-CONTENT ========== */
@media (max-width: 639px) {
  /* RTL footer - center ltr-content elements on mobile */
  .rtl footer .ltr-content {
    text-align: center !important;
    direction: ltr !important;
    display: block !important;
    margin: 0 auto !important;
    width: fit-content !important;
  }

  /* RTL footer - specific fixes for different ltr-content types */
  .rtl footer .ltr-content.font-mono {
    /* Registration numbers, VAT numbers, etc. */
    text-align: center !important;
    display: inline-block !important;
    margin: 0 auto !important;
  }

  .rtl footer .ltr-content a {
    /* Phone and email links */
    text-align: center !important;
    display: block !important;
    margin: 0 auto !important;
  }

  .rtl footer .ltr-content p {
    /* Contact information paragraphs */
    text-align: center !important;
    margin: 0 auto !important;
  }

  /* RTL footer copyright section - center on mobile */
  .rtl footer .order-2.lg\\:order-1 {
    text-align: center !important;
  }

  .rtl footer .order-2.lg\\:order-1 .ltr-content {
    text-align: center !important;
    display: block !important;
    margin: 0 auto !important;
  }

  /* RTL footer payment section - center MADA logo */
  .rtl footer .ltr-content:has(span[text="MADA"]) {
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .rtl footer .ltr-content span:contains("MADA") {
    text-align: center !important;
    display: block !important;
  }
}

/* ========== FOOTER DESKTOP RTL FIXES - CENTER LTR-CONTENT ========== */
@media (min-width: 1024px) {
  /* RTL footer - center ltr-content elements on desktop */
  .rtl footer .ltr-content {
    text-align: center !important;
    direction: ltr !important;
    display: block !important;
    margin: 0 auto !important;
    width: fit-content !important;
  }

  /* RTL footer - specific fixes for different ltr-content types */
  .rtl footer .ltr-content.font-mono {
    /* Registration numbers, VAT numbers, etc. */
    text-align: center !important;
    display: inline-block !important;
    margin: 0 auto !important;
  }

  .rtl footer .ltr-content a {
    /* Phone and email links */
    text-align: center !important;
    display: block !important;
    margin: 0 auto !important;
  }

  .rtl footer .ltr-content p {
    /* Contact information paragraphs */
    text-align: center !important;
    margin: 0 auto !important;
  }

  /* RTL footer copyright section - center on desktop */
  .rtl footer .order-2.lg\\:order-1 {
    text-align: center !important;
  }

  .rtl footer .order-2.lg\\:order-1 .ltr-content {
    text-align: center !important;
    display: block !important;
    margin: 0 auto !important;
  }

  /* RTL footer payment section - center MADA logo */
  .rtl footer .ltr-content:has(span[text="MADA"]) {
    text-align: center !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
  }

  .rtl footer .ltr-content span:contains("MADA") {
    text-align: center !important;
    display: block !important;
  }
}

/* ========== HEADER MOBILE RTL FIXES - REVERSE TOGGLE AND WEBSITE BUTTON ========== */
@media (max-width: 1023px) {
  /* RTL mobile header - reverse order of menu button and website button */
  .rtl .action-buttons-container {
    direction: ltr !important; /* Keep container LTR for controlled layout */
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }

  /* RTL mobile - move menu button to left position (first in order) */
  .rtl #mobileMenuButton {
    order: 1 !important; /* First position */
  }

  /* RTL mobile - move website/profile button to right position (second in order) */
  .rtl
    .action-buttons-container
    > a[href="https://profile.familydiscount.com/"].lg:hidden {
    order: 2 !important; /* Second position */
  }

  /* RTL mobile - ensure other action buttons maintain proper order */
  .rtl .action-buttons-container > button:not(#mobileMenuButton) {
    order: 0 !important; /* Keep language/theme buttons in original position */
  }
}

/* News Section Container RTL Fixes */
.rtl .news {
  direction: rtl !important;
}

.rtl .news .container {
  direction: rtl !important;
}

/* News Slider Container RTL Fixes */
.rtl .news-slider-container {
  direction: rtl !important;
}

/* Override existing #news-slider styles for RTL */
.rtl #news-slider .news-item {
  border-left: none !important;
  border-right: 6px solid var(--fd-green) !important;
  text-align: right !important;
  direction: rtl !important;
}

/* Desktop News Section Layout - Match Mobile Layout */
@media (min-width: 601px) {
  /* Arabic (RTL) Desktop Layout */
  .rtl .news-header {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .rtl .news-header .text-left {
    text-align: right !important;
    width: auto !important;
    direction: rtl !important;
    order: 1;
  }

  .rtl .news-header .slider-controls {
    align-self: center !important;
    margin-top: 0 !important;
    order: 2;
  }

  /* English (LTR) Desktop Layout */
  .news-header {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .news-header .text-left {
    text-align: left !important;
    width: auto !important;
    direction: ltr !important;
    order: 1;
  }

  .news-header .slider-controls {
    align-self: center !important;
    margin-top: 0 !important;
    order: 2;
  }
}

/* Responsive RTL Fixes for News Section */
@media (max-width: 992px) {
  .rtl .news-header .text-left {
    text-align: right !important;
    direction: rtl !important;
  }

  .rtl .news-item {
    border-left: none !important;
    border-right: 6px solid var(--fd-green) !important;
  }

  .rtl #news-slider .news-item {
    border-left: none !important;
    border-right: 6px solid var(--fd-green) !important;
  }
}

@media (max-width: 600px) {
  .rtl .news-header {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .rtl .news-header .text-left {
    text-align: right !important;
    width: auto !important;
    direction: rtl !important;
    order: 1;
  }

  .rtl .slider-controls {
    align-self: center !important;
    margin-top: 0 !important;
    order: 2;
  }

  /* English (LTR) Mobile Layout - Both text and controls on right */
  .news-header {
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .news-header .text-left {
    text-align: left !important;
    width: auto !important;
    direction: ltr !important;
    order: 1;
  }

  .slider-controls {
    align-self: center !important;
    margin-top: 0 !important;
    order: 2;
  }

  .rtl .news-item {
    border-left: none !important;
    border-right: 4px solid var(--fd-green) !important;
    padding: 1rem !important;
  }

  .rtl #news-slider .news-item {
    border-left: none !important;
    border-right: 4px solid var(--fd-green) !important;
    padding: 1rem !important;
  }
}

/* ========== 3D GALLERY SECTION - EXCLUDED FROM RTL FIXES ========== */
/* 3D gallery must retain original behavior - no RTL modifications applied */

@media (max-width: 768px) {
  /* RTL gallery rules removed - 3D gallery must retain original behavior */
}

@media (max-width: 480px) {
  /* RTL gallery rules removed - 3D gallery must retain original behavior */
}

/* ========== MOBILE NAVIGATION VISUAL CONSISTENCY ========== */

@media (max-width: 1023px) {
  /* Ensure consistent borders and shadows */
  .mobile-nav-container {
    border-top: 1px solid rgba(124, 132, 124, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }

  .rtl .mobile-nav-container {
    border-top: 1px solid rgba(124, 132, 124, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }

  .dark .mobile-nav-container,
  .dark .rtl .mobile-nav-container {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  }

  /* Toggle container border */
  .mobile-nav-container .flex.gap-4 {
    border-top: 1px solid rgba(124, 132, 124, 0.1);
  }

  .rtl .mobile-nav-container .flex.gap-4 {
    border-top: 1px solid rgba(124, 132, 124, 0.1);
  }

  .dark .mobile-nav-container .flex.gap-4,
  .dark .rtl .mobile-nav-container .flex.gap-4 {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }

  /* Nav link border radius consistency */
  .mobile-nav-container .nav-link,
  .rtl .mobile-nav-container .nav-link {
    border-radius: 0.75rem;
  }

  /* Toggle button border radius consistency */
  #mobileLangToggle,
  #mobileThemeToggle,
  .rtl #mobileLangToggle,
  .rtl #mobileThemeToggle {
    border-radius: 0.75rem;
  }
}

/* ========== MOBILE TOGGLE BUTTONS - PERFECT CONSISTENCY FIX ========== */

@media (max-width: 1023px) {
  /* Base toggle button styling - IDENTICAL for both languages */
  #mobileLangToggle,
  #mobileThemeToggle {
    /* Layout & Sizing - EXACTLY the same */
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    height: 44px;
    max-height: 44px;
    width: 100%;

    /* Spacing - EXACTLY the same */
    gap: 0.5rem;
    padding: 0.75rem 1rem;

    /* Border & Border Radius - EXACTLY the same */
    border: 1px solid transparent;
    border-radius: 0.75rem; /* rounded-xl equivalent */

    /* Background - EXACTLY the same */
    background: rgba(243, 244, 246, 1); /* bg-gray-100 equivalent */

    /* Typography - EXACTLY the same */
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25;
    text-align: center;

    /* Transitions - EXACTLY the same */
    transition: all 0.2s ease;

    /* Cursor - EXACTLY the same */
    cursor: pointer;

    /* Overflow & Display - EXACTLY the same */
    overflow: hidden;
    white-space: nowrap;
  }

  /* Dark mode styling - IDENTICAL for both */
  .dark #mobileLangToggle,
  .dark #mobileThemeToggle {
    background: rgba(55, 65, 81, 1); /* dark:bg-gray-700 equivalent */
    color: rgba(243, 244, 246, 1);
    border-color: rgba(75, 85, 99, 0.5);
  }

  /* Hover state - IDENTICAL for both */
  #mobileLangToggle:hover,
  #mobileThemeToggle:hover {
    background: rgba(229, 231, 235, 1); /* hover:bg-gray-200 equivalent */
    transform: translateY(-1px);
    border-color: rgba(156, 163, 175, 0.5);
  }

  /* Dark hover state - IDENTICAL for both */
  .dark #mobileLangToggle:hover,
  .dark #mobileThemeToggle:hover {
    background: rgba(75, 85, 99, 1); /* dark:hover:bg-gray-600 equivalent */
    border-color: rgba(107, 114, 128, 0.5);
  }

  /* RTL adjustments - ONLY text direction, NO visual changes */
  .rtl #mobileLangToggle,
  .rtl #mobileThemeToggle {
    direction: rtl;
    text-align: center;
  }

  /* RTL content alignment - ONLY direction, NO visual changes */
  .rtl #mobileLangToggle .lang-ar,
  .rtl #mobileLangToggle .lang-en,
  .rtl #mobileThemeToggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    direction: rtl;
  }

  /* Ensure content doesn't affect button dimensions - IDENTICAL for both */
  .rtl #mobileLangToggle .lang-ar,
  .rtl #mobileLangToggle .lang-en,
  .rtl #mobileThemeToggle,
  #mobileLangToggle .lang-ar,
  #mobileLangToggle .lang-en,
  #mobileThemeToggle {
    white-space: nowrap;
    overflow: hidden;
    flex-shrink: 0;
  }

  /* Icon and flag sizing - CONSISTENT for both languages */
  .rtl #mobileLangToggle img,
  .rtl #mobileThemeToggle i,
  #mobileLangToggle img,
  #mobileThemeToggle i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    object-fit: contain;
  }
}

/* ========== MOBILE RESPONSIVE BREAKPOINT ADJUSTMENTS ========== */

/* Small Mobile Devices (640px and below) */
@media (max-width: 640px) {
  #mobileLangToggle,
  #mobileThemeToggle,
  .rtl #mobileLangToggle,
  .rtl #mobileThemeToggle {
    /* Smaller but IDENTICAL dimensions */
    min-height: 40px;
    height: 40px;
    max-height: 40px;
    padding: 0.625rem 0.875rem;
    font-size: 0.8rem;
    gap: 0.375rem;
  }

  /* Smaller but IDENTICAL icons */
  .rtl #mobileLangToggle img,
  .rtl #mobileThemeToggle i,
  #mobileLangToggle img,
  #mobileThemeToggle i {
    width: 14px;
    height: 14px;
  }
}

/* Medium Mobile Devices (641px to 768px) */
@media (min-width: 641px) and (max-width: 768px) {
  #mobileLangToggle,
  #mobileThemeToggle,
  .rtl #mobileLangToggle,
  .rtl #mobileThemeToggle {
    /* Medium but IDENTICAL dimensions */
    min-height: 44px;
    height: 44px;
    max-height: 44px;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    gap: 0.5rem;
  }

  /* Medium but IDENTICAL icons */
  .rtl #mobileLangToggle img,
  .rtl #mobileThemeToggle i,
  #mobileLangToggle img,
  #mobileThemeToggle i {
    width: 16px;
    height: 16px;
  }
}

/* Large Mobile Devices (769px to 1023px) */
@media (min-width: 769px) and (max-width: 1023px) {
  #mobileLangToggle,
  #mobileThemeToggle,
  .rtl #mobileLangToggle,
  .rtl #mobileThemeToggle {
    /* Larger but IDENTICAL dimensions */
    min-height: 48px;
    height: 48px;
    max-height: 48px;
    padding: 0.875rem 1.125rem;
    font-size: 0.9rem;
    gap: 0.625rem;
  }

  /* Larger but IDENTICAL icons */
  .rtl #mobileLangToggle img,
  .rtl #mobileThemeToggle i,
  #mobileLangToggle img,
  #mobileThemeToggle i {
    width: 18px;
    height: 18px;
  }
}

/* ========== OVERRIDE OLD CONFLICTING RULES ========== */

/* Override any previous mobile toggle button rules to ensure consistency */
@media (max-width: 1023px) {
  /* Force override any conflicting height/padding rules */
  #mobileLangToggle,
  #mobileThemeToggle,
  .rtl #mobileLangToggle,
  .rtl #mobileThemeToggle {
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 0.75rem 1rem !important;
    border-radius: 0.75rem !important;
    border: 1px solid transparent !important;
    gap: 0.5rem !important;
    flex: 1 !important;
    width: 100% !important;
  }

  /* Override dark mode styling */
  .dark #mobileLangToggle,
  .dark #mobileThemeToggle,
  .dark .rtl #mobileLangToggle,
  .dark .rtl #mobileThemeToggle {
    background: rgba(55, 65, 81, 1) !important;
    color: rgba(243, 244, 246, 1) !important;
    border-color: rgba(75, 85, 99, 0.5) !important;
  }

  /* Override hover styling */
  #mobileLangToggle:hover,
  #mobileThemeToggle:hover,
  .rtl #mobileLangToggle:hover,
  .rtl #mobileThemeToggle:hover {
    background: rgba(229, 231, 235, 1) !important;
    border-color: rgba(156, 163, 175, 0.5) !important;
    transform: translateY(-1px) !important;
  }

  .dark #mobileLangToggle:hover,
  .dark #mobileThemeToggle:hover,
  .dark .rtl #mobileLangToggle:hover,
  .dark .rtl #mobileThemeToggle:hover {
    background: rgba(75, 85, 99, 1) !important;
    border-color: rgba(107, 114, 128, 0.5) !important;
  }

  /* Override icon/flag sizing */
  #mobileLangToggle img,
  #mobileThemeToggle i,
  .rtl #mobileLangToggle img,
  .rtl #mobileThemeToggle i {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
    object-fit: contain !important;
  }

  /* Override content alignment */
  #mobileLangToggle .lang-ar,
  #mobileLangToggle .lang-en,
  #mobileThemeToggle,
  .rtl #mobileLangToggle .lang-ar,
  .rtl #mobileLangToggle .lang-en,
  .rtl #mobileThemeToggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
  }
}

* {
  font-family: var(--font-en-primary);
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}

/* Enhanced Language-Specific Typography */
html[lang="ar"] * {
  font-family: var(--font-ar-primary);
}

/* Enhanced Arabic Typography */
.arabic-font {
  font-family: var(--font-ar-primary) !important;
  font-weight: var(--font-medium);
  line-height: var(--line-height-relaxed);
  letter-spacing: var(--letter-spacing-normal);
}

/* Enhanced English Typography */
.english-font {
  font-family: var(--font-en-primary) !important;
  font-weight: var(--font-normal);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-tight);
}

/* Display Typography */
.text-display {
  font-family: var(--font-en-display);
  font-weight: var(--font-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
}

html[lang="ar"] .text-display {
  font-family: var(--font-ar-display);
  font-weight: var(--font-extrabold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-normal);
}

/* Monospace Typography */
.text-mono {
  font-family: var(--font-mono);
  font-weight: var(--font-normal);
  letter-spacing: var(--letter-spacing-wide);
}

/* Enhanced Typography Scale */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-en-display);
  font-weight: var(--font-bold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  margin-bottom: 0.5em;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] h5,
html[lang="ar"] h6 {
  font-family: var(--font-ar-display);
  font-weight: var(--font-extrabold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-normal);
}

/* Specific Heading Sizes */
h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: var(--font-extrabold);
}

html[lang="ar"] h1 {
  font-weight: var(--font-black);
}

h2 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: var(--font-bold);
}

html[lang="ar"] h2 {
  font-weight: var(--font-extrabold);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  font-weight: var(--font-semibold);
}

html[lang="ar"] h3 {
  font-weight: var(--font-bold);
}

/* Body Text Enhancement */
p,
span,
div {
  font-family: var(--font-en-primary);
  font-weight: var(--font-normal);
  line-height: var(--line-height-normal);
  letter-spacing: var(--letter-spacing-normal);
}

html[lang="ar"] p,
html[lang="ar"] span,
html[lang="ar"] div {
  font-family: var(--font-ar-primary);
  font-weight: var(--font-normal);
  line-height: var(--line-height-relaxed);
  letter-spacing: var(--letter-spacing-normal);
}

/* Enhanced Readability */
.text-body {
  font-size: clamp(0.875rem, 2vw, 1rem);
  line-height: var(--line-height-relaxed);
  font-weight: var(--font-normal);
}

html[lang="ar"] .text-body {
  font-weight: var(--font-medium);
  line-height: var(--line-height-relaxed);
}

/* Small Text */
.text-small {
  font-size: clamp(0.75rem, 1.5vw, 0.875rem);
  line-height: var(--line-height-normal);
  font-weight: var(--font-normal);
}

html[lang="ar"] .text-small {
  font-weight: var(--font-medium);
}

/* Navigation Typography */
.nav-link {
  font-family: var(--font-en-primary);
  font-weight: var(--font-medium);
  letter-spacing: var(--letter-spacing-tight);
  text-decoration: none;
  transition: all 0.3s ease;
}

html[lang="ar"] .nav-link {
  font-family: var(--font-ar-primary);
  font-weight: var(--font-semibold);
  letter-spacing: var(--letter-spacing-normal);
}

/* Button Typography */
.btn,
button {
  font-family: var(--font-en-primary);
  font-weight: var(--font-medium);
  letter-spacing: var(--letter-spacing-tight);
  text-decoration: none;
  transition: all 0.3s ease;
}

html[lang="ar"] .btn,
html[lang="ar"] button {
  font-family: var(--font-ar-primary);
  font-weight: var(--font-semibold);
  letter-spacing: var(--letter-spacing-normal);
}

/* Hero Typography Enhancement */
.hero h1 {
  font-family: var(--font-en-display);
  font-weight: var(--font-extrabold);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--fd-white);
}

html[lang="ar"] .hero h1 {
  font-family: var(--font-ar-display);
  font-weight: var(--font-black);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-normal);
}

.hero p {
  font-family: var(--font-en-primary);
  font-weight: var(--font-normal);
  line-height: var(--line-height-relaxed);
  letter-spacing: var(--letter-spacing-normal);
  color: var(--fd-white);
}

html[lang="ar"] .hero p {
  font-family: var(--font-ar-primary);
  font-weight: var(--font-medium);
  line-height: var(--line-height-relaxed);
  letter-spacing: var(--letter-spacing-normal);
}

/* Base Hero Content Layout - IDENTICAL for both languages */
.hero {
  position: relative;
  height: 220vh;
  max-height: 1800px;
  overflow: hidden;
  background-color: var(--fd-dark);
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(0.85) contrast(1.1);
  transform: scale(1.05);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(27, 33, 71, 0.2) 0%,
    rgba(27, 33, 71, 0.4) 50%,
    rgba(27, 33, 71, 0.3) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  width: 100%;
  padding: 80px 60px;
  color: var(--fd-white);
}

/* DESKTOP HERO SECTION - PERFECT RTL/LTR MIRRORING */
@media (min-width: 1024px) {
  /* English (LTR) - Content positioned on left */
  html[lang="en"] .hero-content {
    align-items: flex-start;
    text-align: left;
    padding-left: 100px; /* Further from left edge */
    padding-right: 60px;
  }

  /* Arabic (RTL) - Content positioned on right */
  html[lang="ar"] .hero-content {
    align-items: flex-end;
    text-align: right;
    padding-left: 60px;
    padding-right: 100px; /* Further from right edge - MIRROR of English */
  }
}

/* Hero Text Container */
.hero-text {
  margin-bottom: 24px;
  width: 100%;
  max-width: 600px;
}

/* DESKTOP HERO TEXT ALIGNMENT */
@media (min-width: 1024px) {
  html[lang="en"] .hero-text {
    margin-right: auto;
    margin-left: 0;
  }

  html[lang="ar"] .hero-text {
    margin-left: auto;
    margin-right: 0;
  }
}

/* Hero Title */
.hero-title {
  font-size: 3.4rem;
  font-weight: 700;
  max-width: 600px;
  margin-bottom: 24px;
  color: var(--fd-white);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    sans-serif;
}

.light .hero-title {
  color: var(--fd-white);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dark .hero-title {
  color: var(--fd-white);
}

/* Hero Subtitle */
.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 400;
  max-width: 580px;
  margin: 0 auto;
  opacity: 0.9;
  line-height: 1.6;
}

.light .hero-subtitle {
  color: var(--fd-white);
  opacity: 0.85;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.dark .hero-subtitle {
  color: var(--fd-white);
  opacity: 0.9;
}

/* DESKTOP HERO SUBTITLE ALIGNMENT */
@media (min-width: 1024px) {
  html[lang="en"] .hero-subtitle {
    margin-right: auto;
    margin-left: 0;
    text-align: left;
  }

  html[lang="ar"] .hero-subtitle {
    margin-left: auto;
    margin-right: 0;
    text-align: right;
  }
}

/* Hero Actions Container */
.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 0px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 400px;
  transition: transform 0.3s ease;
}

/* DESKTOP HERO ACTIONS - PERFECT RTL/LTR MIRRORING */
@media (min-width: 1024px) {
  /* English (LTR) - Actions on left, hover moves right */
  html[lang="en"] .hero-actions {
    justify-content: flex-start;
    margin-left: 0;
    margin-right: auto;
  }

  html[lang="en"] .hero-actions:hover {
    transform: translateX(8px); /* Move right on hover */
  }

  /* Arabic (RTL) - Actions on right, hover moves left */
  html[lang="ar"] .hero-actions {
    justify-content: flex-end;
    margin-left: auto;
    margin-right: 0;
    padding-right: 0; /* Remove right padding */
    padding-left: 200px; /* Increased left padding to move button further left */
  }

  html[lang="ar"] .hero-actions:hover {
    transform: translateX(-8px); /* Move left on hover - MIRROR of English */
  }
}

/* ========== HERO SECTION - ARABIC MOBILE BUTTON POSITIONING ========== */

/* Arabic RTL Mobile - Move hero button all the way to left side */
@media (max-width: 767px) {
  html[lang="ar"] .hero-actions {
    justify-content: flex-start !important;
    align-items: flex-start !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* ========== RESPONSIVE HERO BUTTON POSITIONING ========== */

/* Tablet Devices (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .hero-content {
    padding: 60px 40px 80px;
  }

  html[lang="en"] .hero-content {
    padding-left: 40px;
    padding-right: 30px;
  }

  html[lang="ar"] .hero-content {
    padding-left: 30px;
    padding-right: 40px;
  }

  .hero-actions {
    max-width: 350px;
    gap: 14px;
  }
}

/* Mobile Devices (480px - 767px) */
@media (min-width: 480px) and (max-width: 767px) {
  .hero-content {
    padding: 40px 24px 60px;
  }

  html[lang="en"] .hero-content {
    padding-left: 24px;
    padding-right: 20px;
  }

  html[lang="ar"] .hero-content {
    padding-left: 20px;
    padding-right: 24px;
  }

  .hero-actions {
    max-width: 100%;
    gap: 12px;
    flex-direction: column;
    align-items: stretch;
  }

  /* Mobile - Center buttons but maintain language-specific text alignment */
  html[lang="en"] .hero-actions {
    justify-content: center;
    align-items: center;
  }

  html[lang="ar"] .hero-actions {
    justify-content: center;
    align-items: center;
  }

  /* Mobile hover effects */
  html[lang="en"] .hero-actions:hover,
  html[lang="ar"] .hero-actions:hover {
    transform: none;
  }
}

/* Small Mobile Devices (max-width: 479px) */
@media (max-width: 479px) {
  .hero-content {
    padding: 30px 16px 50px;
  }

  html[lang="en"] .hero-content {
    padding-left: 16px;
    padding-right: 12px;
  }

  html[lang="ar"] .hero-content {
    padding-left: 12px;
    padding-right: 16px;
  }

  .hero-actions {
    gap: 10px;
  }
}

/* ========== HERO BUTTON STYLING CONSISTENCY ========== */

/* Base Button Styling - Consistent across languages */
.btn-primary {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 500;
  color: #ffffff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  min-height: 52px;
}

/* RTL Button Content Direction */
html[lang="ar"] .btn-primary {
  direction: rtl;
}

/* Button Hover Effects - Consistent across languages */
.btn-primary:hover {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Arrow Icon Styling */
.arrow-icon {
  color: #ffffff;
  padding: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-primary:hover .arrow-icon {
  background: rgba(255, 255, 255, 0.95);
  color: var(--fd-green);
}

/* English Arrow - Point Right */
html[lang="en"] .btn-primary:hover .arrow-icon {
  transform: translateX(2px);
}

/* Arabic Arrow - Point Left */
html[lang="ar"] .btn-primary:hover .arrow-icon {
  transform: translateX(-2px);
}

/* ========== HERO TEXT POSITIONING CONSISTENCY ========== */

/* Hero Text Container */
.hero-text {
  margin-bottom: 24px;
  width: 100%;
  max-width: 600px;
}

/* English (LTR) - Text on Left */
html[lang="en"] .hero-text {
  text-align: left;
  margin-left: 0;
  margin-right: auto;
}

/* Arabic (RTL) - Text on Right */
html[lang="ar"] .hero-text {
  text-align: right;
  margin-left: auto;
  margin-right: 0;
  direction: rtl;
}

/* Dark mode specific font optimizations */
.dark body {
  font-weight: 400; /* Slightly bolder for better contrast */
  letter-spacing: 0.01em; /* Minimal letter spacing for clarity */
}

/* Dark mode heading enhancements */
.dark h1,
.dark h2,
.dark h3,
.dark h4,
.dark h5,
.dark h6 {
  font-weight: 600; /* Reduced weight for softer appearance */
  letter-spacing: 0.02em; /* Slightly increased spacing */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

.dark h1 {
  font-weight: 700; /* Keep h1 bold */
  letter-spacing: -0.02em; /* Tighter spacing for large text */
}

.dark h2 {
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* Dark mode paragraph and text optimizations */
.dark p,
.dark .text-content,
.dark .description {
  font-weight: 400;
  line-height: 1.65; /* Increased line height for readability */
  color: rgba(241, 245, 249, 0.95); /* Slightly reduced opacity for comfort */
}

/* Dark mode small text optimizations */
.dark small,
.dark .text-sm,
.dark .caption,
.dark .meta {
  font-weight: 500; /* Slightly bolder for small text */
  color: rgba(203, 213, 225, 0.9); /* Better contrast for small text */
}

/* Dark mode link enhancements */
.dark a {
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

.dark a:hover {
  font-weight: 600;
}

/* Dark mode button text optimizations */
.dark button,
.dark .btn {
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Dark mode navigation text */
.dark nav a,
.dark .nav-link {
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* Dark mode card text */
.dark .card-title,
.dark .card-header {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.dark .card-text,
.dark .card-content {
  font-weight: 400;
  line-height: 1.6;
}

/* Dark mode hero section specific fonts */
.dark .hero-title {
  font-weight: 800;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dark .hero-subtitle {
  font-weight: 400;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Dark mode brand section fonts */
.dark .brand-item {
  font-weight: 500;
}

/* Dark mode news section fonts */
.dark .news-title {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.dark .news-date {
  font-weight: 400;
  color: rgba(148, 163, 184, 0.8);
}

/* Dark mode footer fonts */
.dark footer {
  font-weight: 400;
}

.dark .footer-link {
  font-weight: 400;
  color: rgba(203, 213, 225, 0.9);
}

.dark .footer-link:hover {
  font-weight: 500;
  color: var(--fd-white);
}

/* Dark mode input and form elements */
.dark input,
.dark textarea,
.dark select {
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* Dark mode quote and emphasis */
.dark blockquote {
  font-weight: 400;
  font-style: italic;
  color: rgba(241, 245, 249, 0.9);
}

.dark em,
.dark .emphasis {
  font-weight: 500;
}

/* Dark mode code and pre */
.dark code,
.dark pre {
  font-weight: var(--font-normal);
  font-family: var(--font-mono);
  background: rgba(30, 41, 59, 0.5);
}

/* Dark mode list items */
.dark li,
.dark .list-item {
  font-weight: 400;
  line-height: 1.6;
}

/* Dark mode badge and tag text */
.dark .badge,
.dark .tag {
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Dark mode table text */
.dark table {
  font-weight: 400;
}

.dark th {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.dark td {
  font-weight: 400;
}

/* Dark mode alert and notification text */
.dark .alert,
.dark .notification {
  font-weight: 500;
}

/* Dark mode modal text */
.dark .modal-title {
  font-weight: 600;
  letter-spacing: 0.01em;
}

.dark .modal-content {
  font-weight: 400;
  line-height: 1.6;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  background-color: var(--background);
  color: var(--text-primary);
  overflow-x: hidden;
  max-width: 100vw;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

@keyframes scale {
  from {
    transform: scale(0.95);
  }
  to {
    transform: scale(1);
  }
}

@keyframes pulseGlow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(122, 193, 67, 0.3);
  }
  50% {
    box-shadow: 0 0 30px rgba(122, 193, 67, 0.6);
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--border-light);
}

::-webkit-scrollbar-thumb {
  background: var(--fd-green);
  border-radius: 5px;
}

.dark ::-webkit-scrollbar-thumb {
  background: var(--fd-green);
}

/* Image modal styles */
.image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  animation: fadeIn 0.3s ease-out;
}

.modal-content {
  max-width: 90%;
  max-height: 90%;
  animation: scale 0.3s ease-out;
}

.modal-open {
  overflow: hidden;
}

/* Theme transition */
.theme-transition {
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

/* Card styles with CSS variables */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: 0 4px 6px var(--card-shadow);
}

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

/* Gradient backgrounds */
.gradient-bg {
  background: linear-gradient(135deg, var(--fd-green) 0%, var(--fd-navy) 100%);
}

.gradient-text {
  background: linear-gradient(135deg, var(--fd-green), var(--fd-taupe));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hide scrollbar for modal */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* === ENHANCED HERO (clean layout with minimal animations) === */
.hero {
  position: relative;
  height: 220vh;
  max-height: 1800px;
  overflow: hidden;
  background-color: var(--fd-dark);
}
.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: brightness(0.85) contrast(1.1);
  transform: scale(1.05);
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(27, 33, 71, 0.2) 0%,
    rgba(27, 33, 71, 0.4) 50%,
    rgba(27, 33, 71, 0.3) 100%
  );
  z-index: 1;
}
/* REMOVED - Using comprehensive RTL/LTR fixes above */
.hero-text {
  margin-bottom: 4px;
  width: 100%;
  max-width: 600px;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
}

.light .hero-title {
  color: var(--fd-white);
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.dark .hero-title {
  color: var(--fd-white);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 400;
  line-height: 1.6;
  max-width: 700px;
  margin: 0 auto 2rem;
  opacity: 0.95;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
}

.light .hero-subtitle {
  color: var(--fd-white);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  opacity: 0.9;
}

.dark .hero-subtitle {
  color: var(--fd-white);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* REMOVED - Using comprehensive RTL/LTR fixes above */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.btn-primary {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--fd-white);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow:
    0 8px 32px rgba(31, 38, 135, 0.12),
    0 4px 8px rgba(31, 38, 135, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(122, 193, 67, 0.15);
}

/* RTL Button Content Direction */
html[lang="ar"] .btn-primary {
  direction: rtl;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--fd-green), rgba(122, 193, 67, 0.8));
  transition: width 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: -1;
  border-radius: 50px;
}

/* RTL Button Background Animation - REVERSE direction */
html[lang="ar"] .btn-primary::before {
  right: 0;
  left: auto;
  background: linear-gradient(
    270deg,
    /* Reverse gradient direction for RTL */ var(--fd-green),
    rgba(122, 193, 67, 0.8)
  );
}

/* Button Hover Effects - IDENTICAL visual behavior */
.btn-primary:hover {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(122, 193, 67, 0.25);
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 12px 40px rgba(122, 193, 67, 0.18),
    0 6px 16px rgba(122, 193, 67, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(122, 193, 67, 0.25);
}

.btn-primary:hover::before {
  width: 100%;
}

/* Arrow Icon Styling - IDENTICAL for both languages */
.btn-primary .arrow-icon {
  color: #ffffff;
  padding: 10px;
  border-radius: 50%;
  margin: 0; /* Remove margin, use gap instead */
  transition: all 0.3s ease;
  z-index: 2;
  position: relative;
  font-weight: 300;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.btn-primary:hover .arrow-icon {
  background: rgba(255, 255, 255, 0.95);
  color: var(--fd-green);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
}

/* English Arrow Animation - Move Right */
html[lang="en"] .btn-primary:hover .arrow-icon {
  transform: translateX(2px);
}

/* Arabic Arrow Animation - Move Left (MIRROR) */
html[lang="ar"] .btn-primary:hover .arrow-icon {
  transform: translateX(-2px);
}

/* Secondary Button */
.btn-secondary {
  background-color: transparent;
  color: var(--fd-white);
  border-color: var(--fd-white);
}

.btn-secondary:hover {
  background-color: var(--fd-white);
  color: var(--fd-navy);
}

/* Mobile-specific button text visibility - hide all by default, then show appropriate text */
.btn-primary .desktop-text,
.btn-primary .mobile-text {
  display: none !important;
}

/* Desktop - show desktop text only */
@media (min-width: 769px) {
  .btn-primary .desktop-text {
    display: block !important;
  }

  .btn-primary .mobile-text {
    display: none !important;
  }
}

/* Mobile - show mobile text only */
@media (max-width: 768px) {
  .btn-primary .desktop-text {
    display: none !important;
  }

  .btn-primary .mobile-text {
    display: block !important;
  }
}

/* Responsive fixes */
@media (max-width: 1200px) {
  .hero-title {
    font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  }

  .hero-subtitle {
    font-size: clamp(1rem, 1.8vw, 1.2rem);
  }

  .btn {
    padding: 0.875rem 1.75rem;
    font-size: 0.95rem;
    min-height: 48px;
  }
}

@media (max-width: 992px) {
  .hero-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin-bottom: 1.25rem;
  }

  .hero-subtitle {
    font-size: clamp(0.95rem, 1.6vw, 1.1rem);
    margin-bottom: 1.75rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    margin-top: 2rem;
  }

  /* Language-specific mobile alignment */
  html[lang="en"] .hero-actions {
    align-items: flex-start;
  }

  html[lang="ar"] .hero-actions {
    align-items: flex-end;
  }

  .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    min-height: 52px;
  }

  .btn-primary .arrow-icon {
    width: 28px;
    height: 28px;
    padding: 6px;
  }
}

@media (max-width: 768px) {
  .hero-content {
    padding: 0 16px 80px;
  }

  .hero-title {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: 1rem;
  }

  .hero-subtitle {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    line-height: 1.5;
    margin-bottom: 1.5rem;
  }

  .hero-actions {
    gap: 0.875rem;
    margin-top: 1.75rem;
  }

  /* Language-specific mobile alignment for 768px breakpoint */
  html[lang="en"] .hero-actions {
    align-items: flex-start;
  }

  html[lang="ar"] .hero-actions {
    align-items: flex-end;
  }

  .btn {
    padding: 0.875rem 1.25rem;
    font-size: 0.9rem;
    min-height: 48px;
    max-width: 240px;
  }

  .btn-primary .arrow-icon {
    width: 24px;
    height: 24px;
    padding: 4px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
    margin-bottom: 0.875rem;
  }

  .hero-subtitle {
    font-size: clamp(0.85rem, 3vw, 0.9rem);
    margin-bottom: 1.25rem;
  }

  .hero-actions {
    gap: 0.75rem;
    margin-top: 1.5rem;
  }

  /* Language-specific mobile alignment for 480px breakpoint */
  html[lang="en"] .hero-actions {
    align-items: flex-start;
  }

  html[lang="ar"] .hero-actions {
    align-items: flex-end;
  }

  .btn {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    min-height: 44px;
    max-width: 200px;
  }

  .btn-primary .arrow-icon {
    width: 20px;
    height: 20px;
    padding: 3px;
  }
}
.btn-secondary {
  background-color: transparent;
  color: var(--fd-white);
  border-color: var(--fd-white);
}
.btn-secondary:hover {
  background-color: var(--fd-white);
  color: var(--fd-navy);
}
.hero-stats {
  display: flex;
  gap: 60px;
  flex-wrap: wrap;
  justify-content: center;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--fd-green);
  margin-bottom: 8px;
}
.stat-label {
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
}
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  cursor: pointer;
  animation: upDown 2s ease-in-out infinite;
}
.scroll-indicator i {
  font-size: 1.5rem;
  color: var(--fd-white);
  opacity: 0.7;
}
.light .scroll-indicator i {
  opacity: 0.6;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.dark .scroll-indicator i {
  opacity: 0.7;
}
.scroll-indicator:hover i {
  opacity: 1;
}

@keyframes upDown {
  0%,
  100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-10px);
  }
}

/* Hero Video Styles */
.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media screen and (max-width: 1024px) {
  .hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  #hero-video {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    aspect-ratio: 5 / 4;
  }
}

@media screen and (max-width: 767px) {
  .hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  #hero-video {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    aspect-ratio: 4 / 5;
  }
}

/* Enhanced animations inspired by alfuttaim */
.hero-block-section {
  animation: fadeIn 1s ease-out;
}

.hero-media-container {
  position: relative;
  overflow: hidden;
}

.video-container {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
}

/* Hardware acceleration for smooth animations */
.hero-video,
.hero-media-container,
.video-container {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Al-Futtaim Elementor button styling */
.elementor-button {
  background-color: #ffffff;
  border: none;
  border-radius: 3px;
  padding: 12px 24px;
  font-size: 13px;
  font-weight: 500;
  color: #1a1a1a;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  font-family: inherit;
  line-height: 1.4;
}

.elementor-button:hover {
  background-color: #f5f5f5;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.elementor-button.elementor-size-sm {
  padding: 10px 20px;
  font-size: 12px;
}

.elementor-button-wrapper {
  display: inline-block;
}

.elementor-button-content-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
}

.elementor-button-icon {
  display: flex;
  align-items: center;
}

.elementor-button-text {
  font-weight: 500;
}

/* Responsive video aspect ratios */
@media screen and (max-width: 1024px) {
  .hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  #hero-video {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    aspect-ratio: 5 / 4;
  }
}

@media screen and (max-width: 767px) {
  .hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  #hero-video {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    aspect-ratio: 4 / 5;
  }

  .hero-content h1 {
    font-size: 1.75rem;
  }

  .hero-content p {
    font-size: 0.95rem;
  }
}

/* Enhanced hover effects */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 50px -12px var(--card-shadow);
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Loading animation */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

.shimmer {
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}

/* Loading states for lazy loading */
.loading {
  opacity: 0.6;
  filter: blur(2px);
  transition: all 0.3s ease;
}

.loaded {
  opacity: 1;
  filter: blur(0);
  transition: all 0.3s ease;
}

/* Enhanced mobile responsiveness */
@media screen and (max-width: 768px) {
  .hero-video {
    transform: scale(1.05);
  }

  /* Move branch4 image up below hero section on mobile */
  #about .grid.grid-cols-1.lg\:grid-cols-2 {
    display: flex !important;
    flex-direction: column !important;
  }

  #about .grid.grid-cols-1.lg\:grid-cols-2 > div:nth-child(2) {
    order: -1 !important;
    margin-bottom: 2rem !important;
  }

  #about .grid.grid-cols-1.lg\:grid-cols-2 > div:first-child {
    order: 1 !important;
  }

  .card-hover:hover {
    transform: translateY(-4px) scale(1.01);
  }

  .category-card {
    transition: all 0.3s ease;
  }

  .stats-container {
    text-align: center;
  }
}

/* Touch interactions for mobile */
@media (hover: none) and (pointer: coarse) {
  .category-card:active,
  .card-hover:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }

  .category-card:hover,
  .card-hover:hover {
    transform: none;
  }
}

/* Enhanced accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus indicators */
*:focus-visible {
  outline: 2px solid var(--fd-green);
  outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .card {
    border: 2px solid var(--text-primary);
  }

  .gradient-text {
    -webkit-text-fill-color: var(--text-primary);
  }
}

/* Ripple effect for buttons */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  transform: scale(0);
  animation: ripple-animation 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Enhanced button styles */
button,
.btn {
  position: relative;
  overflow: hidden;
}

/* Scroll progress bar */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--fd-green);
  z-index: 9999;
  transition: width 0.2s ease;
}

/* === RESPONSIVE === */
@media (max-width: 992px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .hero-subtitle {
    font-size: 1.1rem;
  }
  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  /* Language-specific mobile alignment for 992px breakpoint */
  html[lang="en"] .hero-actions {
    align-items: flex-start;
  }

  html[lang="ar"] .hero-actions {
    align-items: flex-end;
  }
  .btn {
    width: 100%;
    max-width: 250px;
  }
}
@media (max-width: 600px) {
  .header-container {
    gap: 8px;
  }
  .logo {
    font-size: 1.4rem;
  }
  .hero-title {
    font-size: 2.2rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .hero-actions {
    gap: 12px;
  }
  .btn {
    padding: 14px 30px;
    font-size: 0.9rem;
  }
  .hero-stats {
    gap: 30px;
  }
  .stat-number {
    font-size: 1.8rem;
  }
  .stat-label {
    font-size: 0.8rem;
  }
  .highlights-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Enhanced Mobile Header Styles */
.lg\:hidden nav {
  position: relative;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface) 100%);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

/* === NEWS SECTION === */
.news {
  padding: 80px 0;
  background-color: var(--surface);
  display: flex;
  justify-content: center;
  align-items: center;
}

.news .container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.news-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 48px;
  gap: 24px;
  position: relative;
}

.news-header .text-left {
  text-align: left;
  margin-bottom: 0;
  flex: 1;
  width: 100%;
}

.news-header .text-left .w-16 {
  margin-left: 0;
  margin-right: auto;
}

.news-header h2 {
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--fd-navy);
  text-align: left;
}

.news-header .slider-controls {
  position: static;
  transform: none;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
  justify-content: flex-end;
}

/* Ensure proper alignment for news header */
.news-header .text-left h2 {
  text-align: left !important;
}

.news-header .text-left .w-16 {
  margin: 0 !important;
}

/* Responsive slider controls */
@media (max-width: 768px) {
  .news-header .slider-controls {
    position: static;
    transform: none;
    justify-content: center;
    margin-top: 16px;
  }

  .news-header {
    position: relative;
  }
}

@media (max-width: 480px) {
  .news-header .slider-controls {
    gap: 8px;
  }

  .slider-btn {
    width: 35px !important;
    height: 35px !important;
    font-size: 12px !important;
  }
}
.news-header h2 {
  font-size: 2.2rem;
  font-weight: 600;
  color: var(--fd-navy);
  text-align: center;
}
.view-more {
  text-decoration: none;
  font-weight: 600;
  color: var(--fd-green);
  border-bottom: 2px solid var(--fd-green);
  padding-bottom: 3px;
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}
.news-item {
  padding: 24px;
  background-color: var(--card-bg);
  border-left: 6px solid var(--fd-green);
  box-shadow: 0 4px 12px var(--card-shadow);
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  cursor: pointer;
}
.news-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px var(--card-shadow);
}
.news-item .date {
  display: block;
  font-size: 0.8rem;
  color: var(--fd-gray);
  margin-bottom: 10px;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.news-item p {
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
}

/* News Slider */
.slider-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.slider-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--fd-green);
  background: transparent;
  color: var(--fd-green);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 14px;
}

.slider-btn:hover {
  background: var(--fd-green);
  color: white;
  transform: scale(1.1);
}

/* Desktop-specific Social Media Section Enhancements */
@media (min-width: 1024px) {
  /* Enhanced spacing and alignment for desktop Social Media block */
  footer .lg\\:col-span-1.sm\\:col-span-2 .lg\\:text-left {
    position: relative;
  }

  /* Ensure consistent visual hierarchy in desktop footer */
  footer .lg\\:col-span-1.sm\\:col-span-2 h3 {
    margin-bottom: 1.25rem;
  }

  /* Desktop social icons alignment refinement */
  footer .lg\\:col-span-1.sm\\:col-span-2 .lg\\:justify-start {
    justify-content: flex-start;
  }

  /* Desktop branches text alignment */
  footer .lg\\:col-span-1.sm\\:col-span-2 .lg\\:text-left {
    text-align: left;
  }
}

.slider-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  transform: none;
}

#news-slider {
  display: flex;
  transition: transform 0.5s ease;
  gap: 20px;
  padding: 10px 0;
}

#news-slider .news-item {
  flex: 0 0 calc(33.333% - 14px);
  min-width: 280px;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

#news-slider .news-item:hover {
  z-index: 10;
  transform: translateY(-4px) scale(1.02);
}

/* Responsive News Slider */
@media (max-width: 992px) {
  #news-slider .news-item {
    flex: 0 0 calc(50% - 10px);
    min-width: 250px;
  }
}

@media (max-width: 600px) {
  #news-slider .news-item {
    flex: 0 0 calc(100% - 0px);
    min-width: 100%;
  }

  .news-slider-container {
    margin: 0;
    padding: 0;
  }

  .slider-btn {
    width: 35px;
    height: 35px;
    font-size: 12px;
  }
}

/* === BRANDS SECTION === */
.brand-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem;
  text-align: center;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
  cursor: pointer;
  min-height: 120px;
  height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.brand-item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  border-color: var(--fd-green);
  z-index: 10;
}

.brand-item img {
  height: 56px !important;
  width: auto !important;
  max-width: 100%;
  max-height: 56px !important;
  object-fit: contain;
  transition: all 0.3s ease;
}

.brand-item:hover img {
  transform: scale(1.05);
}

/* Ensure consistent card dimensions */
.brand-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(122, 193, 67, 0.05) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.brand-item:hover::before {
  opacity: 1;
}

/* Special handling for logos with different aspect ratios */
.brand-item img[src*="sama"] {
  height: 60px !important;
  width: auto !important;
  max-height: 60px !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .brand-item {
    min-height: 100px;
    height: 120px;
    padding: 0.75rem;
  }

  .brand-item img {
    height: 48px !important;
    max-height: 48px !important;
  }

  .brand-item img[src*="sama"] {
    height: 36px !important;
    max-height: 36px !important;
  }

  /* Mobile brand grid layout: 3 rows x 3 columns */
  #brands-slider .min-w-full {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    grid-template-rows: repeat(3, auto) !important;
    gap: 0.75rem !important;
    padding: 0.75rem !important;
  }

  #brands-slider .min-w-full .brand-item {
    grid-column: auto !important;
    grid-row: auto !important;
  }

  /* Ensure only 9 items are visible per slide on mobile */
  #brands-slider .min-w-full .brand-item:nth-child(n + 10) {
    display: none !important;
  }
}

/* Brands slider navigation enhancements */
#brands-prev,
#brands-next {
  z-index: 20;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#brands-prev:hover,
#brands-next:hover {
  transform: translateY(-50%) translateX(-50%) scale(1.1);
  border-color: var(--fd-green);
}

#brands-next:hover {
  transform: translateY(-50%) translateX(50%) scale(1.1);
}

#brands-prev:disabled,
#brands-next:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

#brands-prev:disabled {
  transform: translateY(-50%) translateX(-50%) scale(0.9);
}

#brands-next:disabled {
  transform: translateY(-50%) translateX(50%) scale(0.9);
}

@media (max-width: 480px) {
  /* Mobile brand grid layout for smaller screens */
  #brands-slider .min-w-full {
    grid-template-columns: repeat(3, 1fr) !important;
    grid-template-rows: repeat(3, auto) !important;
    gap: 0.5rem !important;
    padding: 0.5rem !important;
  }

  .brand-item {
    min-height: 85px !important;
    height: 100px !important;
    padding: 0.5rem !important;
  }

  .brand-item img {
    height: 40px !important;
    max-height: 40px !important;
  }

  .brand-item img[src*="sama"] {
    height: 32px !important;
    max-height: 32px !important;
  }

  .brand-item h3 {
    font-size: 0.75rem !important;
  }

  /* Hide navigation buttons on small mobile */
  #brands-prev,
  #brands-next {
    display: none;
  }
}

@media (max-width: 767px) {
  #brands-prev,
  #brands-next {
    display: none;
  }
}

/* Bottom dots styling */
#brands-dots {
  z-index: 10;
}

#brands-dots button {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#brands-dots button:hover {
  transform: scale(1.2);
}

#brands-dots button:focus {
  outline: 2px solid var(--fd-green);
  outline-offset: 2px;
}

.brand-item h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

/* === HIGHLIGHTS (stats) - Enhanced Clean Layout === */
.highlight-item {
  padding: 2rem 1.5rem;
  border: 1px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 1rem;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.8) 0%,
    rgba(255, 255, 255, 0.4) 100%
  );
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.highlight-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--fd-green) 0%, var(--fd-navy) 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.highlight-item:hover::before {
  transform: scaleX(1);
}

.highlight-item:hover {
  border-color: var(--border);
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.6) 100%
  );
}

.highlight-item:hover .w-24 {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(122, 193, 67, 0.2);
  border-color: var(--fd-green);
}

.highlight-item:hover i {
  transform: scale(1.1);
}

.highlight-item .w-24 {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 2;
}

.highlight-item i {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced responsive adjustments for highlights */
@media (max-width: 1024px) {
  .highlight-item {
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .highlight-item {
    padding: 1.25rem;
  }
  .highlight-item .text-4xl {
    font-size: 2.5rem;
  }
}

@media (max-width: 640px) {
  .highlight-item {
    padding: 1rem;
  }
  .highlight-item .text-4xl {
    font-size: 2.25rem;
  }
  .highlight-item .text-sm {
    font-size: 0.75rem;
  }
  .highlight-item .w-24 {
    width: 5rem;
    height: 5rem;
  }
}

/* Subtle animation for numbers on scroll */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.highlight-item .text-4xl {
  animation: countUp 0.6s ease-out;
}

/* Social Media Hover Colors */
.hover\:bg-instagram:hover {
  background: linear-gradient(
    45deg,
    #f09433 0%,
    #e6683c 25%,
    #dc2743 50%,
    #cc2366 75%,
    #bc1888 100%
  );
}

.hover\:bg-tiktok:hover {
  background: #000000;
}

.hover\:bg-snapchat:hover {
  background: #fffc00;
  color: #000000;
}

.hover\:bg-snapchat:hover i {
  color: #000000 !important;
}

/* ========== DARK MODE ENHANCEMENTS ========== */
/* These styles only apply when dark mode is active and do not affect light mode */

.dark .highlight-item {
  background: linear-gradient(135deg, var(--surface) 0%, var(--card-bg) 100%);
  backdrop-filter: blur(10px);
  border-color: var(--border);
}

.dark .highlight-item:hover {
  background: linear-gradient(135deg, var(--card-bg) 0%, var(--surface) 100%);
  border-color: var(--fd-green);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.dark .highlight-item .w-24 {
  background-color: var(--surface) !important;
  border-color: var(--border) !important;
}

.dark .highlight-item:hover .w-24 {
  border-color: var(--fd-green) !important;
}

.dark .global-sourcing,
.dark .news-gallery {
  background-color: var(--surface) !important;
}

.dark .global-sourcing .bg-white,
.dark .news-gallery .bg-white {
  background-color: var(--card-bg) !important;
  border-color: var(--border) !important;
}

.dark .global-sourcing .border-gray-200,
.dark .news-gallery .border-gray-200 {
  border-color: var(--border) !important;
}

.dark .news-item {
  background-color: var(--card-bg);
  border-left-color: var(--fd-green);
  box-shadow: 0 4px 12px var(--card-shadow);
}

.dark .news-item:hover {
  box-shadow: 0 12px 24px var(--card-shadow);
}

.dark .brand-item {
  background-color: var(--card-bg);
  border-color: var(--border);
}

.dark .brand-item:hover {
  border-color: var(--fd-green);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.dark .footer,
.dark footer {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
}

.dark footer .bg-gradient-to-br {
  background: linear-gradient(135deg, #0f172a, #1e293b) !important;
}

.dark .social-link {
  background-color: var(--surface);
  border-color: var(--border);
}

.dark .social-link:hover {
  background-color: var(--card-bg);
  border-color: var(--fd-green);
}

.dark .branch-dialog-content {
  background-color: var(--surface);
  border-color: var(--border);
}

.dark .branch-option-btn {
  background-color: var(--card-bg);
  border-color: var(--border);
}

.dark .branch-option-btn:hover {
  border-color: var(--fd-green);
}

.dark .branch-option-title {
  color: var(--text-primary);
}

.dark .branch-option-description {
  color: var(--text-secondary);
}

.dark .mdw-image-gallery-3d {
  background-color: var(--surface);
}

.dark .gallery-card h2,
.dark .gallery-card h3 {
  color: var(--text-primary);
}

.dark .slider-nav {
  background: rgba(0, 0, 0, 0.7);
  color: white;
}

.dark .slider-nav:hover {
  background: var(--fd-green);
}

.dark .slider-dot {
  background: rgba(255, 255, 255, 0.3);
}

.dark .slider-dot.active {
  background: white;
}

/* Improve text contrast in dark mode */
.dark .text-gray-900,
.dark .text-gray-800,
.dark .text-gray-700 {
  color: var(--text-primary) !important;
}

.dark .text-gray-600,
.dark .text-gray-500 {
  color: var(--text-secondary) !important;
}

.dark .border-gray-300,
.dark .border-gray-200 {
  border-color: var(--border) !important;
}

.dark .bg-gray-50,
.dark .bg-gray-100 {
  background-color: var(--surface) !important;
}

.dark .bg-white {
  background-color: var(--card-bg) !important;
}

.dark .prose p {
  color: var(--text-secondary);
}

.dark .prose strong {
  color: var(--text-primary);
}

/* GALLERY CONTAINER – creates scroll length */
.mdw-image-gallery-3d {
  position: relative;
  width: 100%;
  background: var(--surface);
  margin: 20px 0;
  border-radius: 16px;
  height: auto;
  overflow: visible;
}

/* inner fixed panel – holds 3D cards */
.mdw-image-gallery-inner {
  position: relative;
  width: 100%;
  height: 60vh;
  transform-style: preserve-3d;
  perspective: 1000px;
  backface-visibility: hidden;
  will-change: transform;
  padding: 40px 20px;
}

/* BACKGROUND LAYER – covers gallery area only */
.mdw-image-gallery-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  opacity: 0.6;
  pointer-events: none;
  z-index: 1;
}
.mdw-image-gallery-bg img {
  position: absolute;
  left: 0;
  top: 0;
  filter: blur(50px);
  transform: scale(1.125);
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.5s;
  will-change: opacity;
}

/* CARD STYLES */
.gallery-card {
  position: absolute;
  left: 50%;
  top: 55%;
  transform: translate(-50%, -50%) translateZ(0px);
  width: 420px;
  text-align: center;
  will-change: transform, opacity;
  z-index: 10;
  backface-visibility: hidden;
  transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  padding: 20px;
}
.gallery-card:nth-child(even) {
  left: 30%;
}
.gallery-card:nth-child(odd) {
  left: 70%;
}
.gallery-card h2 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  line-height: 1.2;
}
.gallery-card h3 {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.8;
}
.gallery-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 16px;
  display: block;
  transition: transform 0.3s ease;
}
.gallery-card:hover img {
  transform: scale(1.02);
}

/* Image Slider Styles */
.image-slider-container {
  position: relative;
  width: 100%;
  height: 280px;
  border-radius: 16px;
  overflow: visible;
  margin: 0 25px;
}

.image-slider {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.image-slider-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease-in-out;
}

.slider-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
  flex-shrink: 0;
  display: block;
}

/* Slider navigation - Fixed z-index stacking on mobile */
.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 15; /* Fixed z-index - prevents jumping */
  font-size: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  /* Prevent z-index changes during animation */
  will-change: transform, background, box-shadow;
}

.slider-nav:hover {
  background: rgba(122, 193, 67, 0.9);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 12px rgba(122, 193, 67, 0.4);
  /* Keep z-index stable during hover */
  z-index: 15 !important;
}

.slider-nav-prev {
  left: -18px;
}

.slider-nav-next {
  right: -18px;
}

/* Slider dots - Fixed z-index positioning */
.slider-dots {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 12; /* Fixed z-index - below nav buttons */
  pointer-events: none; /* Prevent interference with slider */
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: auto; /* Re-enable for dots */
  z-index: 13; /* Ensure dots are clickable */
}

.slider-dot.active {
  background: white;
  width: 24px;
  border-radius: 4px;
}

.slider-dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

/* Responsive improvements for 3D gallery */
@media (max-width: 1024px) {
  .mdw-image-gallery-inner {
    height: 50vh;
    padding: 30px 15px;
  }
  .gallery-card {
    width: 360px;
    padding: 15px;
  }
  .gallery-card:nth-child(even) {
    left: 35%;
  }
  .gallery-card:nth-child(odd) {
    left: 65%;
  }
  .gallery-card h2 {
    font-size: 2rem;
  }
  .gallery-card h3 {
    font-size: 1rem;
  }
  .gallery-card img {
    height: 240px;
  }
  .image-slider-container {
    height: 240px;
  }
}

@media (max-width: 768px) {
  section[class*="pt-"][class*="pb-"] {
    padding-top: 60px;
    padding-bottom: 40px;
    margin: 40px 0 15px 0;
  }
  .mdw-image-gallery-inner {
    height: 45vh;
    padding: 20px 10px;
  }
  .gallery-card {
    width: 320px;
    padding: 12px;
  }
  .gallery-card:nth-child(even),
  .gallery-card:nth-child(odd) {
    left: 50%;
  }
  .gallery-card h2 {
    font-size: 1.75rem;
  }
  .gallery-card h3 {
    font-size: 0.875rem;
    margin-bottom: 1rem;
  }
  .gallery-card img {
    height: 200px;
  }
  .image-slider-container {
    height: 200px;
  }
}

@media (max-width: 480px) {
  .container.mx-auto.px-6 {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .gallery-card {
    width: 280px;
  }
  .gallery-card h2 {
    font-size: 1.5rem;
  }
  .gallery-card img {
    height: 180px;
  }
  .image-slider-container {
    height: 180px;
  }
}

/* sticky classes for inner panel (used by JS) */
.sticky {
  position: fixed;
  top: 0;
  z-index: 40;
}
.sticky-end {
  position: absolute;
  bottom: 0;
  top: auto !important;
}

/* LENIS SMOOTH SCROLL STYLES */
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: hidden;
}

/* Floating Social Media Side Panel - Compact Narrow Style */
.social-side-panel {
  position: fixed;
  right: 0;
  top: 45%;
  transform: translateY(-50%);
  z-index: 1000;
  padding: 24px 0;
  transition:
    background-color 0.6s ease,
    border-color 0.6s ease;
}

.social-item {
  position: absolute;
  right: 0;
  overflow: visible;
}

.social-item:nth-child(1) {
  top: 0;
}
.social-item:nth-child(2) {
  top: 70px;
}
.social-item:nth-child(3) {
  top: 140px;
}
.social-item:nth-child(4) {
  top: 210px;
}

.social-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-primary);
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 60px 0 0 60px;
  padding: 16px 18px;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.15),
    0 6px 20px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05);
  transition:
    all 0.5s cubic-bezier(0.23, 1, 0.32, 1),
    background-color 0.6s ease,
    border-color 0.6s ease;
  position: relative;
  overflow: hidden;
  width: 54px;
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
}

.social-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.8s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 1;
}

.social-link:hover::before {
  left: 100%;
}

.social-link::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
}

.social-link:hover::after {
  opacity: 1;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: 22px;
  flex-shrink: 0;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  z-index: 2;
  background: linear-gradient(135deg, var(--fd-navy) 0%, #1e293b 100%);
  color: #ffffff;
  border-radius: 50%;
  padding: 6px;
  box-shadow:
    0 4px 12px rgba(27, 33, 71, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.social-label {
  white-space: nowrap;
  font-weight: 800;
  font-size: 16px;
  position: absolute;
  left: 54px;
  top: 50%;
  transform: translateY(-50%) translateX(-40px) scale(0.7);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  letter-spacing: 0.5px;
}

/* Enhanced Hover Effects - Premium animations */
.social-link:hover {
  width: 180px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.25),
    0 10px 30px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  transform: translateX(-12px) scale(1.03);
  border-color: transparent;
  z-index: 10;
}

.social-link:hover .social-icon {
  transform: rotate(360deg) scale(1.15);
  background: linear-gradient(135deg, var(--fd-navy) 0%, #334155 100%);
  box-shadow:
    0 8px 24px rgba(27, 33, 71, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.social-link:hover .social-label {
  opacity: 1;
  transform: translateY(-50%) translateX(0) scale(1);
}

/* Simple clean hover effects with brand color icon backgrounds */
.social-item:nth-child(1) .social-link:hover {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.social-item:nth-child(1) .social-link:hover .social-icon {
  background: #fffc00;
  color: #000000;
  text-shadow: none;
  box-shadow: 0 4px 12px rgba(255, 252, 0, 0.3);
}

.social-item:nth-child(2) .social-link:hover {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.social-item:nth-child(2) .social-link:hover .social-icon {
  background: #000000;
  color: #ffffff;
  text-shadow: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.social-item:nth-child(3) .social-link:hover {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.social-item:nth-child(3) .social-link:hover .social-icon {
  background: linear-gradient(
    45deg,
    #f09433 0%,
    #e6683c 25%,
    #dc2743 50%,
    #cc2366 75%,
    #bc1888 100%
  );
  color: #ffffff;
  text-shadow: none;
  box-shadow: 0 4px 12px rgba(228, 64, 95, 0.3);
}

.social-item:nth-child(4) .social-link:hover {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.social-item:nth-child(4) .social-link:hover .social-icon {
  background: #25d366;
  color: #ffffff;
  text-shadow: none;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* Pulse animation for icons - removed to prevent all icons from animating */

.social-link:hover .social-icon {
  animation: none;
  transform: rotate(360deg) scale(1.1);
}

/* Section-based adaptive backgrounds */
.social-panel-adaptive {
  background-color: rgba(244, 246, 243, 0.95) !important;
  border-color: rgba(229, 231, 235, 0.8) !important;
}

.social-panel-dark {
  background-color: rgba(30, 41, 59, 0.95) !important;
  border-color: rgba(51, 65, 85, 0.8) !important;
}

.social-panel-hero {
  background-color: rgba(27, 33, 71, 0.9) !important;
  border-color: rgba(122, 193, 67, 0.3) !important;
}

.social-panel-offwhite {
  background-color: rgba(244, 246, 243, 0.95) !important;
  border-color: rgba(229, 231, 235, 0.8) !important;
}

.social-panel-white {
  background-color: rgba(255, 255, 255, 0.95) !important;
  border-color: rgba(229, 231, 235, 0.8) !important;
}

.social-panel-surface {
  background-color: rgba(248, 250, 252, 0.95) !important;
  border-color: rgba(226, 232, 240, 0.8) !important;
}

/* Enhanced Dark mode support */
.dark .social-panel-adaptive {
  background-color: rgba(30, 41, 59, 0.95) !important;
  border-color: rgba(51, 65, 85, 0.8) !important;
}

.dark .social-panel-hero {
  background-color: rgba(15, 23, 42, 0.9) !important;
  border-color: rgba(122, 193, 67, 0.4) !important;
}

.dark .social-panel-offwhite {
  background-color: rgba(30, 41, 59, 0.95) !important;
  border-color: rgba(51, 65, 85, 0.8) !important;
}

.dark .social-panel-white {
  background-color: rgba(30, 41, 59, 0.95) !important;
  border-color: rgba(51, 65, 85, 0.8) !important;
}

.dark .social-panel-surface {
  background-color: rgba(30, 41, 59, 0.95) !important;
  border-color: rgba(51, 65, 85, 0.8) !important;
}

/* Enhanced RTL support - Updated for consistency with HTML inline styles */
.rtl .social-side-panel {
  right: auto;
  left: 0;
}

.rtl .social-item {
  right: auto;
  left: 0;
}

.rtl .social-link {
  border-radius: 0 60px 60px 0;
  flex-direction: row;
  justify-content: flex-start;
}

.rtl .social-link:hover {
  transform: translateX(12px) scale(1.03);
}

.rtl .social-label {
  left: auto;
  right: 54px;
  transform: translateY(-50%) translateX(40px) scale(0.7);
  text-align: right;
  direction: rtl;
}

.rtl .social-link:hover .social-label {
  transform: translateY(-50%) translateX(0) scale(1);
}

.rtl .social-link::before {
  left: auto;
  right: -100%;
}

.rtl .social-link:hover::before {
  right: 100%;
}

.rtl .social-link::after {
  right: auto;
  left: -2px;
}

/* Enhanced Mobile responsiveness */
@media (max-width: 768px) {
  .social-side-panel {
    gap: 12px;
    padding: 20px 0;
  }

  .social-link {
    padding: 12px 14px;
    max-width: 48px;
  }

  .social-icon {
    width: 26px;
    height: 26px;
    font-size: 18px;
  }

  .social-link:hover {
    max-width: 130px;
  }

  .social-label {
    font-size: 13px;
    margin-left: 10px;
    margin-right: 6px;
  }

  /* RTL mobile social bar adjustments - Updated for consistency */
  .rtl .social-side-panel {
    left: 0;
    right: auto;
  }

  .rtl .social-link {
    border-radius: 0 60px 60px 0;
    flex-direction: row;
    justify-content: flex-start;
  }

  .rtl .social-label {
    left: auto;
    right: 54px;
    margin-left: 6px;
    margin-right: 10px;
    text-align: right;
    direction: rtl;
  }
}

@media (max-width: 480px) {
  .social-side-panel {
    gap: 10px;
    padding: 16px 0;
  }

  .social-link {
    padding: 10px 12px;
    max-width: 44px;
  }

  .social-link:hover {
    max-width: 120px;
  }

  .social-icon {
    width: 24px;
    height: 24px;
    font-size: 16px;
  }

  .social-label {
    font-size: 12px;
  }

  /* RTL mobile social bar adjustments for 480px */
  .rtl .social-side-panel {
    left: 0;
    right: auto;
  }

  .rtl .social-link {
    flex-direction: row-reverse;
  }

  .rtl .social-label {
    margin-left: 6px;
    margin-right: 10px;
  }
}

/* Additional visual enhancements */
.social-link::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -2px;
  width: 4px;
  height: 0;
  background: var(--fd-green);
  border-radius: 2px;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  transform: translateY(-50%);
}

.social-link:hover::after {
  height: 60%;
}

.rtl .social-link::after {
  right: auto;
  left: -2px;
}

/* Glow effect on hover */
@keyframes glow {
  0%,
  100% {
    box-shadow:
      0 16px 48px rgba(0, 0, 0, 0.2),
      0 8px 24px rgba(0, 0, 0, 0.15),
      inset 0 1px 0 rgba(255, 255, 255, 0.2);
  }
  50% {
    box-shadow:
      0 20px 60px rgba(0, 0, 0, 0.25),
      0 10px 30px rgba(0, 0, 0, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.3),
      0 0 20px rgba(122, 193, 67, 0.3);
  }
}

.social-link:hover {
  animation: glow 2s ease-in-out infinite;
}

/* Branch Dialog Styles */
.branch-dialog {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 10000;
  animation: fadeIn 0.3s ease-out;
}

.branch-dialog.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.branch-dialog-content {
  background: var(--surface);
  border-radius: 20px;
  max-width: 520px;
  width: 90%;
  max-height: 90vh;
  overflow: auto;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.2),
    0 15px 30px rgba(0, 0, 0, 0.15),
    0 5px 15px rgba(0, 0, 0, 0.1);
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--border);
}

.branch-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--border-light);
}

.branch-dialog-title {
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.025em;
}

.branch-dialog-close {
  background: none;
  border: none;
  font-size: 1.375rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 10px;
  border-radius: 10px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
}

.branch-dialog-close:hover {
  background: var(--border-light);
  color: var(--text-primary);
  transform: scale(1.05);
}

.branch-dialog-body {
  padding: 20px 32px 32px;
}

.branch-dialog-subtitle {
  color: var(--text-secondary);
  margin: 0 0 28px 0;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-weight: 400;
}

.branch-dialog-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.branch-option-btn {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.branch-option-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(122, 193, 67, 0.05),
    transparent
  );
  transition: left 0.6s ease;
}

.branch-option-btn:hover::before {
  left: 100%;
}

.branch-option-btn:hover {
  border-color: var(--fd-green);
  transform: translateY(-3px);
  box-shadow:
    0 12px 32px rgba(122, 193, 67, 0.15),
    0 6px 16px rgba(122, 193, 67, 0.1);
}

.branch-option-btn:focus {
  outline: none;
  border-color: var(--fd-green);
  box-shadow:
    0 0 0 4px rgba(122, 193, 67, 0.1),
    0 12px 32px rgba(122, 193, 67, 0.15);
}

.branch-option-btn:active {
  transform: translateY(-1px);
}

.branch-option-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--fd-green);
  color: white;
  border-radius: 12px;
  font-size: 1.25rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(122, 193, 67, 0.2);
  transition: all 0.2s ease;
}

.branch-option-btn:hover .branch-option-icon {
  background: var(--fd-navy);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(27, 33, 71, 0.3);
}

.branch-option-content {
  flex: 1;
  min-width: 0;
}

.branch-option-title {
  font-size: 1.1875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px 0;
  letter-spacing: -0.025em;
  transition: color 0.2s ease;
}

.branch-option-description {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
  transition: color 0.2s ease;
}

.branch-option-btn:hover .branch-option-title {
  color: var(--fd-green);
}

.branch-option-btn:hover .branch-option-description {
  color: var(--text-primary);
}

/* RTL Support for Dialog */
.rtl .branch-dialog-content {
  direction: rtl;
}

.rtl .branch-dialog-header {
  flex-direction: row-reverse;
}

.rtl .branch-option-btn {
  flex-direction: row-reverse;
  text-align: right;
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .branch-dialog-content {
    width: 95%;
    margin: 16px;
    border-radius: 16px;
  }

  .branch-dialog-header,
  .branch-dialog-body {
    padding: 24px;
  }

  .branch-dialog-title {
    font-size: 1.375rem;
  }

  .branch-dialog-subtitle {
    font-size: 1rem;
    margin-bottom: 24px;
  }

  .branch-option-btn {
    padding: 16px;
    gap: 16px;
    border-radius: 12px;
  }

  .branch-option-icon {
    width: 44px;
    height: 44px;
    font-size: 1.125rem;
  }

  .branch-option-title {
    font-size: 1.0625rem;
  }

  .branch-option-description {
    font-size: 0.875rem;
  }

  .branch-dialog-close {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .branch-dialog-header,
  .branch-dialog-body {
    padding: 20px;
  }

  .branch-option-btn {
    padding: 14px;
    gap: 14px;
  }

  .branch-option-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

/* ========== NEWS GALLERY SECTION STYLES ========== */
.news-gallery {
  padding: 60px 0;
  background-color: var(--surface);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.news-gallery .container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.news-gallery-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 20px;
  height: 500px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Branch Cards for News Gallery */
.branch-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    transparent 50%,
    rgba(0, 0, 0, 0.05) 100%
  );
}

.branch-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  z-index: 10;
}

.branch-card.featured {
  grid-row: span 2;
  grid-column: 1;
}

.branch-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.branch-card:hover img {
  transform: scale(1.08);
}

.branch-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.6) 100%
  );
  transition: background 0.4s ease;
}

.branch-card:hover .branch-overlay {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.2) 0%,
    rgba(0, 0, 0, 0.7) 100%
  );
}

.branch-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  color: var(--fd-white);
  z-index: 2;
  transform: translateY(10px);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.branch-card:hover .branch-content {
  transform: translateY(0);
}

.branch-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  color: var(--fd-white);
}

.branch-card.featured .branch-content h3 {
  font-size: 2rem;
}

.branch-date {
  font-size: 0.875rem;
  opacity: 0.9;
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  color: var(--fd-white);
  display: flex;
  align-items: center;
  gap: 6px;
}

.branch-date::before {
  content: "\f133";
  font-family: "Font Awesome 6 Free";
  font-weight: 400;
  font-size: 0.75rem;
}

/* Dark mode for News Gallery */
.dark .news-gallery {
  background-color: var(--surface);
}

.dark .branch-card {
  border-color: var(--border);
  background: linear-gradient(
    135deg,
    rgba(30, 41, 59, 0.8) 0%,
    transparent 50%,
    rgba(0, 0, 0, 0.2) 100%
  );
}

.dark .branch-card:hover {
  border-color: var(--fd-green);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Responsive News Gallery */
@media (max-width: 1024px) {
  .news-gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, 200px);
    height: auto;
    gap: 15px;
  }

  .branch-card.featured {
    grid-row: span 2;
    grid-column: 1;
  }

  .branch-content h3 {
    font-size: 1.25rem;
  }

  .branch-card.featured .branch-content h3 {
    font-size: 1.5rem;
  }
}

@media (max-width: 768px) {
  .news-gallery {
    padding: 40px 0;
  }

  .news-gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(5, 200px);
    height: auto;
    padding: 15px;
  }

  .branch-card.featured {
    grid-row: span 1;
    grid-column: 1;
  }

  .branch-content {
    padding: 16px;
  }

  .branch-content h3 {
    font-size: 1.125rem;
  }

  .branch-card.featured .branch-content h3 {
    font-size: 1.25rem;
  }
}

/* ========== NEWS SECTION CENTERING FIXES ========== */
/* Center the news header content properly */
.news-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 48px;
  gap: 24px;
}

.news-header .text-center {
  width: 100%;
  text-align: center;
}

.news-header h2 {
  text-align: center;
  width: 100%;
  margin: 0 auto;
}

.news-header .slider-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}

/* Center news grid container */
.news-slider-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* ========== MAP SECTION CENTERING ========== */
/* Center the map link in the footer */
footer .flex.items-start.gap-3:has(.fa-map-marker-alt) {
  justify-content: center;
  align-items: center;
}

footer .flex.items-start.gap-3:has(.fa-map-marker-alt) .flex-1 {
  text-align: center;
}

footer .flex.items-start.gap-3:has(.fa-map-marker-alt) a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Alternative: Target the map section directly with class */
.map-section-center {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.map-section-center .flex-1 {
  text-align: center;
}

/* ========== GLOBAL SOURCING OPERATIONS CENTERING ========== */
.global-sourcing {
  padding: 80px 0;
  background-color: #ffffff;
}

.global-sourcing .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.global-sourcing .text-center {
  text-align: center;
}

.global-sourcing h2 {
  text-align: center;
  margin: 0 auto;
}

.global-sourcing .max-w-4xl {
  margin: 0 auto;
  text-align: center;
}

/* Center map container */
.global-sourcing .map-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  max-width: 1000px;
}

.global-sourcing .map-container img {
  margin: 0 auto;
  display: block;
}

/* Center legend */
.global-sourcing .flex.justify-center {
  display: flex;
  justify-content: center;
  width: 100%;
}

.global-sourcing .bg-white.border.rounded-lg {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

/* Force theme changes */

.dark {
  color-scheme: dark !important;

  background-color: #1a1a1a !important;

  color: #ffffff !important;
}

html:not(.dark) {
  color-scheme: light !important;

  background-color: #ffffff !important;

  color: #000000 !important;
}

/* Force dark mode on all elements */

.dark body {
  background-color: #1a1a1a !important;

  color: #ffffff !important;
}

.dark header {
  background: rgba(31, 41, 55, 0.98) !important;
}

.dark .toggle-btn {
  background: linear-gradient(
    135deg,
    rgba(122, 193, 67, 0.15),
    rgba(42, 47, 58, 0.15)
  ) !important;

  border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* ============================================



   Header & Navigation (FD Profile Match)



   ============================================ */

header {
  backdrop-filter: blur(20px) saturate(180%);

  -webkit-backdrop-filter: blur(20px) saturate(180%);

  background: rgba(255, 255, 255, 0.98) !important;

  border-bottom: 1px solid rgba(124, 132, 124, 0.1);

  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);

  position: fixed;

  top: 0;

  width: 100%;

  z-index: 9999;

  height: 80px;
}

[dir="ltr"] header {
  left: 0;

  right: 0;
}

[dir="rtl"] header {
  right: 0;

  left: 0;
}

.dark header {
  background: rgba(31, 41, 55, 0.98) !important;

  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

body {
  padding-top: 96px !important;
  overflow-x: hidden;
  max-width: 100vw;
}

/* Desktop: Fix gap between header and hero section */
@media (min-width: 1024px) {
  body {
    padding-top: 80px !important;
  }
}

.logo-container {
  display: flex;

  align-items: center;

  gap: 0.75rem;

  color: inherit;

  text-decoration: none;

  transition: 0.25s;
}

.logo-image {
  width: 240px;

  height: 100px;

  object-fit: contain;

  transition: 0.25s;
}

.logo-container:hover .logo-image {
  transform: scale(1.06) translateY(-4px);

  opacity: 0.95;
}

.nav-link {
  position: relative;

  padding: 10px 0;

  font-weight: 600;

  color: var(--fd-gray);

  font-size: 16px;

  background: linear-gradient(to right, var(--fd-green), var(--fd-green))
    no-repeat;

  background-size: 0% 2px;

  background-position: left bottom;
}

[dir="rtl"] .nav-link {
  background-position: right bottom;
}

.nav-link:hover,
.nav-link.active {
  background-size: 100% 2px;

  color: var(--fd-green);
}

.toggle-btn {
  width: 52px;

  height: 52px;

  border-radius: 16px;

  background: linear-gradient(
    135deg,
    rgba(122, 193, 67, 0.2) 0%,

    rgba(122, 193, 67, 0.1) 100%
  );

  backdrop-filter: blur(15px);

  border: 2px solid rgba(255, 255, 255, 0.3);

  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);

  display: flex;

  align-items: center;

  justify-content: center;

  position: relative;

  overflow: hidden;

  cursor: pointer;

  outline: none;
}

.toggle-btn i {
  font-size: 18px;

  transition: all 0.3s ease;
}

.dark .toggle-btn {
  background: linear-gradient(
    135deg,
    rgba(122, 193, 67, 0.15),
    rgba(42, 47, 58, 0.15)
  );

  border: 1px solid rgba(255, 255, 255, 0.1);
}

.toggle-btn:hover {
  transform: translateY(-2px) scale(1.05);

  box-shadow: 0 8px 20px rgba(122, 193, 67, 0.25);

  border-color: var(--fd-green);
}

.toggle-btn:focus-visible {
  outline: none;

  box-shadow: var(--focus-ring);
}

.action-buttons-container {
  display: flex;

  align-items: center;

  gap: 12px;

  z-index: 100;
}

.mobile-nav-container {
  max-height: 0;

  overflow: hidden;

  transition:
    max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease;

  background: rgba(255, 255, 255, 0.98);

  backdrop-filter: blur(10px);

  border-top: 1px solid rgba(124, 132, 124, 0.1);

  position: relative;

  display: block;

  opacity: 0;
}

.dark .mobile-nav-container {
  background: rgba(31, 41, 55, 0.98);

  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-nav-container.active {
  max-height: 80vh;
  opacity: 1;
}

/* Ensure closed state is always collapsed */

.mobile-nav-container:not(.active) {
  max-height: 0 !important;

  overflow: hidden !important;

  opacity: 0 !important;
}

.mobile-nav-container .nav-link {
  margin: 0.25rem 0;

  padding: 0.9rem 1rem;

  border-radius: 0.9rem;

  background: transparent;

  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-container .nav-link:hover {
  background: rgba(122, 193, 67, 0.1);

  transform: translateX(8px);
}

[dir="rtl"] .mobile-nav-container .nav-link:hover {
  transform: translateX(-8px);
}

.mobile-nav-container .nav-link.active {
  background: var(--fd-green);

  color: #fff;

  transform: translateX(8px);
}

[dir="rtl"] .mobile-nav-container .nav-link.active {
  transform: translateX(-8px);
}

.search-container {
  opacity: 0;

  visibility: hidden;

  transform: translateY(-20px) scale(0.95);

  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);

  background: rgba(255, 255, 255, 0.98);

  backdrop-filter: blur(40px) saturate(200%);

  border: 1px solid rgba(124, 132, 124, 0.1);

  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  border-radius: 1.25rem;
}

.dark .search-container {
  background: rgba(31, 41, 55, 0.98);

  border: 1px solid rgba(255, 255, 255, 0.15);
}

.search-container.active {
  opacity: 1;

  visibility: visible;

  transform: translateY(0) scale(1);
}

/* Responsive Design */

@media (max-width: 768px) {
  body {
    padding-bottom: 64px;
  }

  #mainHeader .container {
    padding-left: 1rem;

    padding-right: 1rem;
  }

  #mainHeader .flex {
    flex-wrap: nowrap;
  }

  #mainHeader .logo-container {
    flex-shrink: 0;
  }

  #mainHeader .action-buttons-container {
    flex-shrink: 0;

    gap: 0.5rem;
  }

  /* Mobile navigation — stays in document flow (relative), not absolute */

  .mobile-nav-container {
    position: relative;

    width: 100%;

    background: rgba(255, 255, 255, 0.98);

    backdrop-filter: blur(20px);

    border-top: 1px solid rgba(124, 132, 124, 0.1);

    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  }

  .dark .mobile-nav-container {
    background: rgba(31, 41, 55, 0.98);
  }

  .mobile-nav-container .container {
    padding: 0;
  }
}

/* Extra small mobile devices */

@media (max-width: 640px) {
  #mainHeader .container {
    padding-left: 0.75rem;

    padding-right: 0.75rem;
  }

  #mainHeader .action-buttons-container {
    gap: 0.25rem;
  }

  .toggle-btn {
    width: 40px !important;

    height: 40px !important;
  }

  .logo-image {
    width: 190px !important;

    height: 70px !important;

    object-fit: contain;
  }

  .mobile-nav-container.active {
    max-height: 70vh;

    overflow-y: auto;
  }

  .mobile-nav-container .py-6 {
    padding-top: 1rem;

    padding-bottom: 1rem;
  }

  .mobile-nav-container .nav-link {
    padding: 0.75rem 1rem;

    font-size: 0.9rem;
  }
}

/* ========== MOBILE RESPONSIVE ADDITIONS ========== */

/* === HIGHLIGHTS (STATS) - 3 per row on mobile === */
@media (max-width: 767px) {
  /* Reduce section header spacing on mobile */
  .highlight-item {
    padding: 0.75rem 0.5rem;
    border-radius: 0.75rem;
  }
  /* Icon circle smaller on mobile */
  .highlight-item .w-24 {
    width: 3.5rem;
    height: 3.5rem;
  }
}

/* === ABOUT SECTION - Mobile typography === */
@media (max-width: 767px) {
  #about .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  /* Hero content padding on mobile */
  .hero-content {
    padding: 40px 20px 80px;
    margin-left: 0;
  }
  .hero-title {
    font-size: 2rem;
  }
  .hero-subtitle {
    font-size: 0.95rem;
  }
}

/* === ABOUT CAROUSEL - Mobile slider for Vision/Mission/Commitment === */
.about-carousel-wrapper {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.about-carousel-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform;
}

.about-carousel-slide {
  flex: 0 0 100%;
  min-width: 100%;
  padding: 0 4px;
}

/* Carousel dot indicators */
.about-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  padding-bottom: 4px;
}

.about-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(27, 33, 71, 0.25);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.about-dot.active {
  background: var(--fd-green);
  width: 24px;
  border-radius: 4px;
}

.about-dot:hover {
  background: var(--fd-navy);
}

/* === NEWS GALLERY DESKTOP - hide on mobile, show on sm+ === */
.news-gallery-desktop {
  display: none;
}
@media (min-width: 640px) {
  .news-gallery-desktop {
    display: grid;
  }
}

/* === NEWS GALLERY - Mobile slider (visible only on mobile <640px) === */
.news-gallery-mobile-slider {
  position: relative;
  overflow: hidden;
  width: 100%;
}
@media (min-width: 640px) {
  .news-gallery-mobile-slider {
    display: none;
  }
}

.news-gallery-mobile-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform;
}

.news-gallery-mobile-slide {
  flex: 0 0 100%;
  min-width: 100%;
  padding: 0 4px;
}

/* News gallery mobile dots */
.news-gallery-mobile-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.ng-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(27, 33, 71, 0.25);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.ng-dot.active {
  background: var(--fd-green);
  width: 24px;
  border-radius: 4px;
}

.ng-dot:hover {
  background: var(--fd-navy);
}

/* === BRANDS SECTION - Mobile compact layout === */
@media (max-width: 767px) {
  /* Compact brand cards on mobile */
  .brand-item {
    min-height: 80px;
    height: 90px;
    padding: 0.5rem;
    border-radius: 0.5rem;
  }

  .brand-item img {
    height: 36px !important;
    max-height: 36px !important;
  }

  /* Nav arrows hidden on small mobile, use dots only */
  #brands-prev,
  #brands-next {
    width: 32px;
    height: 32px;
    padding: 0.4rem;
  }

  /* Brands section reduced top/bottom padding */
  #brands {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
  }

  #brands .text-center.mb-16 {
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 480px) {
  .brand-item {
    min-height: 70px;
    height: 80px;
    padding: 0.4rem;
  }

  .brand-item img {
    height: 30px !important;
    max-height: 30px !important;
  }
}

/* === GLOBAL SOURCING - Mobile responsive === */
@media (max-width: 767px) {
  .global-sourcing {
    padding: 40px 0 !important;
  }

  .global-sourcing .flex.justify-center .bg-white {
    flex-wrap: wrap;
    gap: 12px !important;
    padding: 12px;
  }
}

/* === NEWS SECTION - Mobile compact === */
@media (max-width: 767px) {
  .news {
    padding: 48px 0;
  }

  .news-header {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 12px;
  }

  .news-header .text-left {
    width: 100%;
  }

  .news-header .slider-controls {
    align-self: flex-end;
  }
}

/* ========== CAREERS SECTION - ARABIC RTL BUTTON POSITIONING ========== */

/* Arabic RTL - Move Career button all the way to left side */
@media (min-width: 640px) {
  html[lang="ar"] #careers .flex.flex-col.sm\:flex-row {
    justify-content: flex-start !important;
    align-items: flex-start !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: auto !important;
  }
}

/* === CAREERS SECTION - Mobile responsive === */
@media (max-width: 767px) {
  #careers {
    padding-top: 3rem;
    padding-bottom: 3rem;
    min-height: auto;
  }

  #careers h2 {
    font-size: 1.75rem !important;
  }

  #careers p.text-lg {
    font-size: 0.9rem !important;
  }
}

/* === FOOTER - Mobile responsive === */
@media (max-width: 767px) {
  footer .flex.flex-col.lg\:flex-row {
    gap: 1.5rem;
  }

  footer .py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
  }
}

/* === DARK MODE - about carousel and news gallery mobile dots === */
.dark .about-dot {
  background: rgba(226, 232, 240, 0.25);
}

.dark .about-dot.active {
  background: var(--fd-green);
}

.dark .ng-dot {
  background: rgba(226, 232, 240, 0.25);
}

.dark .ng-dot.active {
  background: var(--fd-green);
}

/* ========== COMPREHENSIVE MOBILE OPTIMIZATIONS ========== */
/* Ultra-compact mobile layout for minimized fonts and elements */

@media (max-width: 767px) {
  /* === GLOBAL TYPOGRAPHY REDUCTIONS === */

  /* Minimize all heading sizes */
  h1 {
    font-size: 1.5rem !important;
    line-height: 1.2 !important;
    margin-bottom: 0.75rem !important;
  }
  h2 {
    font-size: 1.25rem !important;
    line-height: 1.3 !important;
    margin-bottom: 0.625rem !important;
  }
  h3 {
    font-size: 1.1rem !important;
    line-height: 1.3 !important;
    margin-bottom: 0.5rem !important;
  }
  h4 {
    font-size: 1rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0.4rem !important;
  }
  h5,
  h6 {
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
    margin-bottom: 0.375rem !important;
  }

  /* Minimize paragraph and text content */
  p,
  .text-content,
  .description {
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
    margin-bottom: 0.75rem !important;
  }

  /* Minimize small text and captions */
  small,
  .text-sm,
  .caption,
  .meta {
    font-size: 0.75rem !important;
    line-height: 1.4 !important;
  }

  /* === HERO SECTION ULTRA-COMPACT === */
  .hero {
    height: 85vh !important;
    max-height: 700px !important;
  }

  .hero-content {
    padding: 30px 16px 80px !important;
    margin-left: 0 !important;
  }

  .hero-title {
    font-size: 1.75rem !important;
    line-height: 1.1 !important;
    margin-bottom: 0.75rem !important;
  }

  .hero-subtitle {
    font-size: 0.875rem !important;
    line-height: 1.4 !important;
    margin-bottom: 1rem !important;
  }

  .hero-actions {
    gap: 0.625rem !important;
    margin-top: 1rem !important;
  }

  /* Hide span and p elements in hero on mobile */
  .hero span,
  .hero p {
    display: none !important;
  }

  /* === BUTTON MINIMIZATION === */
  .btn {
    padding: 0.625rem 1rem !important;
    font-size: 0.8rem !important;
    min-height: 40px !important;
    border-radius: 0.5rem !important;
  }

  .btn-primary .arrow-icon {
    width: 20px !important;
    height: 20px !important;
    padding: 2px !important;
  }

  /* Elementor buttons */
  .elementor-button {
    padding: 8px 16px !important;
    font-size: 0.75rem !important;
  }

  .elementor-button.elementor-size-sm {
    padding: 6px 12px !important;
    font-size: 0.7rem !important;
  }

  /* === SECTION PADDING REDUCTIONS === */
  section[class*="pt-"][class*="pb-"],
  .py-16,
  .py-20,
  .py-24 {
    padding-top: 2rem !important;
    padding-bottom: 2rem !important;
  }

  .container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  /* === HIGHLIGHTS/STATS COMPACT === */
  .highlight-item {
    padding: 0.75rem 0.5rem !important;
    border-radius: 0.5rem !important;
  }

  .highlight-item .w-24 {
    width: 2.5rem !important;
    height: 2.5rem !important;
  }

  .highlight-item .text-4xl {
    font-size: 1.5rem !important;
  }

  .highlight-item .text-sm {
    font-size: 0.7rem !important;
  }

  /* === NEWS SECTION COMPACT === */
  .news {
    padding: 2rem 0 !important;
  }

  .news-header {
    margin-bottom: 1.5rem !important;
    gap: 0.75rem !important;
  }

  .news-header h2 {
    font-size: 1.25rem !important;
    margin-bottom: 0.5rem !important;
  }

  .news-item {
    padding: 1rem !important;
    border-left-width: 3px !important;
  }

  .news-item .date {
    font-size: 0.7rem !important;
    margin-bottom: 0.5rem !important;
  }

  .news-item p {
    font-size: 0.8rem !important;
    line-height: 1.4 !important;
  }

  .slider-btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.7rem !important;
  }

  /* === BRANDS SECTION ULTRA-COMPACT === */
  #brands {
    padding: 1.5rem 0 !important;
  }

  #brands .text-center.mb-16 {
    margin-bottom: 1rem !important;
  }

  #brands h2 {
    font-size: 1.25rem !important;
    margin-bottom: 0.5rem !important;
  }

  .brand-item {
    min-height: 60px !important;
    height: 70px !important;
    padding: 0.375rem !important;
    border-radius: 0.375rem !important;
  }

  .brand-item img {
    height: 28px !important;
    max-height: 28px !important;
  }

  .brand-item img[src*="sama"] {
    height: 24px !important;
    max-height: 24px !important;
  }

  /* === GALLERY CARDS COMPACT === */
  .gallery-card {
    width: 280px !important;
    padding: 0.75rem !important;
  }

  .gallery-card h2 {
    font-size: 1.25rem !important;
    margin-bottom: 0.375rem !important;
  }

  .gallery-card h3 {
    font-size: 0.75rem !important;
    margin-bottom: 0.75rem !important;
  }

  .gallery-card img,
  .image-slider-container {
    height: 140px !important;
  }

  .slider-nav {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.6rem !important;
  }

  .slider-dot {
    width: 6px !important;
    height: 6px !important;
  }

  .slider-dot.active {
    width: 18px !important;
  }

  /* === NEWS GALLERY COMPACT === */
  .news-gallery {
    padding: 2rem 0 !important;
  }

  .news-gallery-grid {
    gap: 0.75rem !important;
    padding: 0.75rem !important;
  }

  .branch-content {
    padding: 0.75rem !important;
  }

  .branch-content h3 {
    font-size: 0.9rem !important;
    margin-bottom: 0.25rem !important;
  }

  .branch-card.featured .branch-content h3 {
    font-size: 1rem !important;
  }

  .branch-date {
    font-size: 0.7rem !important;
  }

  /* === GLOBAL SOURCING COMPACT === */
  .global-sourcing {
    padding: 2rem 0 !important;
  }

  .global-sourcing h2 {
    font-size: 1.25rem !important;
    margin-bottom: 0.75rem !important;
  }

  .global-sourcing .max-w-4xl {
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
  }

  /* === CAREERS SECTION COMPACT === */
  #careers {
    padding: 2rem 0 !important;
  }

  #careers h2 {
    font-size: 1.25rem !important;
  }

  #careers p.text-lg {
    font-size: 0.875rem !important;
  }

  /* Hide specific careers text on mobile */
  #careers p.max-w-xl {
    display: none !important;
  }

  /* === FOOTER COMPACT === */
  footer {
    padding-top: 2rem !important;
    padding-bottom: 1rem !important;
  }

  footer .py-6 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }

  footer h3 {
    font-size: 0.9rem !important;
    margin-bottom: 0.5rem !important;
  }

  footer p,
  footer li {
    font-size: 0.75rem !important;
    line-height: 1.4 !important;
  }

  /* === DIALOG/MODAL COMPACT === */
  .branch-dialog-content {
    width: 95% !important;
    margin: 1rem !important;
    border-radius: 0.75rem !important;
  }

  .branch-dialog-header,
  .branch-dialog-body {
    padding: 1rem !important;
  }

  .branch-dialog-title {
    font-size: 1.1rem !important;
  }

  .branch-dialog-subtitle {
    font-size: 0.875rem !important;
    margin-bottom: 1rem !important;
  }

  .branch-option-btn {
    padding: 0.75rem !important;
    gap: 0.75rem !important;
    border-radius: 0.5rem !important;
  }

  .branch-option-icon {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.875rem !important;
  }

  .branch-option-title {
    font-size: 0.9rem !important;
  }

  .branch-option-description {
    font-size: 0.75rem !important;
  }

  /* === SOCIAL PANEL COMPACT === */
  .social-side-panel {
    padding: 1rem 0 !important;
  }

  .social-link {
    padding: 0.625rem 0.75rem !important;
    max-width: 40px !important;
  }

  .social-icon {
    width: 20px !important;
    height: 20px !important;
    font-size: 0.75rem !important;
  }

  .social-link:hover {
    max-width: 100px !important;
  }

  .social-label {
    font-size: 0.7rem !important;
  }

  /* === GENERAL SPACING REDUCTIONS === */
  .gap-6,
  .gap-8 {
    gap: 0.75rem !important;
  }
  .gap-4,
  .gap-5 {
    gap: 0.5rem !important;
  }
  .gap-3 {
    gap: 0.375rem !important;
  }
  .gap-2 {
    gap: 0.25rem !important;
  }

  .mb-8,
  .mb-10,
  .mb-12 {
    margin-bottom: 1rem !important;
  }
  .mb-6,
  .mb-7 {
    margin-bottom: 0.75rem !important;
  }
  .mb-4,
  .mb-5 {
    margin-bottom: 0.5rem !important;
  }
  .mb-3 {
    margin-bottom: 0.375rem !important;
  }
  .mb-2 {
    margin-bottom: 0.25rem !important;
  }

  .mt-8,
  .mt-10,
  .mt-12 {
    margin-top: 1rem !important;
  }
  .mt-6,
  .mt-7 {
    margin-top: 0.75rem !important;
  }
  .mt-4,
  .mt-5 {
    margin-top: 0.5rem !important;
  }
  .mt-3 {
    margin-top: 0.375rem !important;
  }
  .mt-2 {
    margin-top: 0.25rem !important;
  }

  .py-4,
  .py-5,
  .py-6 {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }

  .px-4,
  .px-5,
  .px-6 {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  /* === CAROUSEL AND SLIDER COMPACT === */
  .about-carousel-dots,
  .news-gallery-mobile-dots {
    margin-top: 0.75rem !important;
    gap: 0.5rem !important;
  }

  .about-dot,
  .ng-dot {
    width: 6px !important;
    height: 6px !important;
  }

  .about-dot.active,
  .ng-dot.active {
    width: 18px !important;
  }
}

/* ========== ABOUT CAROUSEL MOBILE RTL FIXES ========== */
@media (max-width: 639px) {
  /* RTL about carousel container - fix overall layout */
  .rtl .about-carousel-wrapper {
    direction: rtl !important;
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    margin-top: 2rem !important;
  }

  /* RTL about carousel track - fix transform direction */
  .rtl #aboutCarouselTrack {
    direction: ltr !important; /* Keep LTR for proper flex behavior */
    display: flex !important;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1) !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* RTL about carousel slide - fix content direction only */
  .rtl .about-carousel-slide {
    direction: rtl !important; /* Apply RTL only to slide content */
    flex: 0 0 100% !important;
    min-width: 100% !important;
    width: 100% !important;
    display: block !important;
    position: relative !important;
    overflow: hidden !important;
  }

  /* RTL about carousel slide content - fix text alignment */
  .rtl .about-carousel-slide .absolute {
    direction: rtl !important;
    text-align: right !important;
    left: 0 !important;
    right: 0 !important;
    padding: 0 1.5rem !important;
  }

  .rtl .about-carousel-slide h3 {
    direction: rtl !important;
    text-align: right !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    margin-bottom: 0.5rem !important;
    color: white !important;
  }

  .rtl .about-carousel-slide p {
    direction: rtl !important;
    text-align: right !important;
    font-size: 0.95rem !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 0 !important;
  }

  /* RTL about carousel dots container - fix positioning */
  .rtl .about-carousel-dots {
    direction: ltr !important; /* Keep dots LTR for consistent navigation */
    display: flex !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-top: 1rem !important;
    padding: 0 1rem !important;
  }

  /* RTL about carousel dots - fix individual dot styling */
  .rtl .about-dot {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.4) !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    direction: ltr !important;
  }

  .rtl .about-dot.active {
    background: white !important;
    width: 24px !important;
    border-radius: 4px !important;
  }

  .rtl .about-dot:hover {
    background: rgba(255, 255, 255, 0.7) !important;
  }
}

/* ========== ABOUT CAROUSEL RTL FIXES ========== */
@media (max-width: 639px) {
  /* RTL about carousel - ensure proper RTL initialization */
  html[lang="ar"] .about-carousel-wrapper {
    direction: rtl !important;
  }

  html[lang="ar"] #aboutCarouselTrack {
    direction: ltr !important;
  }

  html[lang="ar"] .about-carousel-slide {
    direction: rtl !important;
  }

  html[lang="ar"] .about-carousel-dots {
    direction: ltr !important;
  }

  html[lang="ar"] .about-dot {
    direction: ltr !important;
  }
}

/* Desktop Footer RTL Fixes - COMPLETE SIDE SWAPPING */
@media (min-width: 1024px) {
  /* Footer main container - RTL text direction only */
  .rtl footer {
    direction: rtl;
  }

  /* COMPLETE FOOTER LAYOUT REVERSAL - SWAP LEFT/RIGHT */
  .rtl footer .flex.flex-col.lg\:flex-row {
    flex-direction: row-reverse !important; /* COMPLETE REVERSAL */
    direction: rtl;
  }

  /* Footer brand section - MOVE TO RIGHT SIDE */
  .rtl footer .lg\:w-2\/5 {
    order: 2 !important; /* Move brand section to right */
    text-align: right;
    direction: rtl;
    display: flex !important;
    justify-content: flex-end !important; /* Push content to right edge */
    align-items: flex-start !important;
  }

  .rtl footer .lg\:w-2\/5 .text-center {
    text-align: right !important;
  }

  .rtl footer .lg\:w-2\/5 .lg\:text-right {
    text-align: right !important;
  }

  /* Logo and Vision Badge - MOVE TO RIGHT EDGE */
  .rtl footer .flex.flex-col.items-center.lg\:items-start {
    align-items: flex-end !important; /* Align to right edge */
    justify-content: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .rtl footer .flex.flex-col.items-center.lg\:items-start .text-center {
    text-align: right !important;
    align-items: flex-end !important;
    justify-content: flex-end !important;
  }

  .rtl footer .flex.flex-col.items-center.lg\:items-start .lg\:text-right {
    text-align: right !important;
    align-items: flex-end !important;
  }

  /* Logo Container - RIGHT EDGE POSITIONING */
  .rtl
    footer
    .flex.flex-col.md\:flex-row.items-center.md\:items-center.gap-3.md\:gap-4.mb-4.md\:mb-6 {
    justify-content: flex-end !important; /* Push logo and badge to right edge */
    align-items: flex-start !important;
    width: 100% !important;
    flex-direction: row-reverse !important; /* Reverse order: badge first, then logo */
  }

  .rtl
    footer
    .flex.flex-col.md\:flex-row.items-center.md\:items-center.gap-3.md\:gap-4.mb-4.md\:mb-6
    > div {
    align-items: flex-end !important;
    justify-content: flex-end !important;
  }

  /* Logo Link - RIGHT EDGE */
  .rtl footer .flex-shrink-0 {
    margin-left: 0 !important; /* Remove auto margin */
    margin-right: 0 !important;
    order: 2 !important; /* Logo comes second (rightmost) */
  }

  .rtl footer .flex-shrink-0 img {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Vision Badge - RIGHT EDGE */
  .rtl footer .flex.items-center.gap-2.bg-white\/10.px-3.py-1\.5.rounded-full {
    margin-left: 0 !important; /* Remove left margin */
    margin-right: 0.5rem !important; /* Small space before logo */
    justify-content: flex-end !important;
    order: 1 !important; /* Badge comes first (left of logo) */
  }

  .rtl
    footer
    .flex.items-center.gap-2.bg-white\/10.px-3.py-1\.5.rounded-full
    .arabic-font {
    text-align: right !important;
  }

  /* Alternative: Stack badge below logo at right edge */
  @media (min-width: 768px) {
    .rtl
      footer
      .flex.flex-col.md\:flex-row.items-center.md\:items-center.gap-3.md\:gap-4.mb-4.md\:mb-6 {
      flex-direction: column !important; /* Stack vertically */
      align-items: flex-end !important; /* Align to right edge */
      gap: 0.5rem !important; /* Tight spacing */
    }

    .rtl
      footer
      .flex.items-center.gap-2.bg-white\/10.px-3.py-1\.5.rounded-full {
      margin-right: 0 !important;
      margin-left: 0 !important;
      order: 2 !important; /* Badge below logo */
    }

    .rtl footer .flex-shrink-0 {
      order: 1 !important; /* Logo on top */
    }
  }

  /* Mobile: Keep horizontal but right-aligned */
  @media (max-width: 767px) {
    .rtl
      footer
      .flex.flex-col.md\:flex-row.items-center.md\:items-center.gap-3.md\:gap-4.mb-4.md\:mb-6 {
      flex-direction: row-reverse !important; /* Badge first, then logo */
      justify-content: flex-end !important;
    }

    .rtl
      footer
      .flex.items-center.gap-2.bg-white\/10.px-3.py-1\.5.rounded-full {
      margin-right: 0.25rem !important; /* Minimal space on mobile */
      margin-left: 0 !important;
    }
  }

  /* Company Info - RIGHT ALIGNED */
  .rtl footer .text-center.lg\:text-right {
    text-align: right !important;
    align-items: flex-end !important;
    justify-content: flex-end !important;
  }

  .rtl footer .text-center.lg\:text-right h2 {
    text-align: right !important;
    align-items: flex-end !important;
  }

  .rtl footer .text-center.lg\:text-right p {
    text-align: right !important;
    align-items: flex-end !important;
  }

  /* Registration Info - RIGHT EDGE */
  .rtl footer .border-t.border-white\/20 {
    text-align: right !important;
    align-items: flex-end !important;
    justify-content: flex-end !important;
  }

  .rtl footer .border-t.border-white\/20 .arabic-font {
    text-align: right !important;
  }

  .rtl footer .border-t.border-white\/20 .ltr-content {
    direction: ltr;
    text-align: left;
  }

  /* Footer sections grid - MOVE TO LEFT SIDE */
  .rtl footer .lg\:w-3\/5 {
    order: 1 !important; /* Move grid sections to left */
  }

  /* Footer brand section - MOVE TO RIGHT SIDE */
  .rtl footer .lg\:w-2\/5 {
    order: 2 !important; /* Move brand section to right */
    text-align: right;
    direction: rtl;
  }

  .rtl footer .lg\:w-2\/5 .text-center {
    text-align: right !important;
  }

  .rtl footer .lg\:w-2\/5 .lg\:text-right {
    text-align: right !important;
  }

  /* Footer sections grid - MOVE TO LEFT SIDE */
  .rtl footer .lg\:w-3\/5 {
    order: 1 !important; /* Move grid sections to left */
  }

  .rtl footer .lg\:w-3\/5 .grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-3 {
    direction: rtl; /* RTL for the grid content */
  }

  .rtl
    footer
    .lg\:w-3\/5
    .grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-3
    > div {
    direction: rtl;
    text-align: right;
  }

  /* Footer company info - RTL text alignment */
  .rtl footer h2.arabic-font {
    text-align: right !important;
    direction: rtl !important;
  }

  .rtl footer p.arabic-font {
    text-align: right !important;
    direction: rtl !important;
  }

  /* Footer section headers - RTL alignment */
  .rtl footer h3.arabic-font {
    text-align: right !important;
    direction: rtl !important;
  }

  .rtl footer h3.arabic-font .flex {
    justify-content: flex-start;
  }

  /* Quick links section - RTL fixes */
  .rtl footer .grid.grid-cols-2 {
    direction: rtl; /* RTL for the links grid */
  }

  .rtl footer .grid.grid-cols-2 > div {
    text-align: right;
  }

  .rtl footer .grid.grid-cols-2 .flex {
    justify-content: flex-start;
  }

  .rtl footer .grid.grid-cols-2 .fas.fa-chevron-left {
    transform: rotate(180deg); /* Flip chevron for RTL */
  }

  .rtl footer .grid.grid-cols-2 .fas.fa-chevron-right {
    transform: rotate(180deg); /* Flip chevron for RTL */
  }

  /* Contact info section - RTL fixes */
  .rtl footer .space-y-4 .flex {
    direction: rtl;
  }

  .rtl footer .space-y-4 .flex .flex-1 {
    text-align: right;
  }

  .rtl footer .space-y-4 .flex .ltr-content {
    direction: ltr;
    text-align: left;
  }

  /* VAT Certificate section - RTL fixes */
  .rtl footer .lg\:col-span-1.sm\:col-span-2 {
    text-align: right;
    direction: rtl;
  }

  .rtl footer .lg\:col-span-1.sm\:col-span-2 .text-center {
    text-align: right !important;
  }

  .rtl footer .lg\:col-span-1.sm\:col-span-2 .sm\:text-left {
    text-align: right !important;
  }

  .rtl footer .lg\:col-span-1.sm\:col-span-2 .lg\:text-left {
    text-align: right !important;
  }

  /* Social media section - RTL fixes */
  .rtl footer .lg\:text-left {
    text-align: right !important;
  }

  .rtl footer .lg\:text-left .text-center {
    text-align: right !important;
  }

  .rtl footer .lg\:text-left .sm\:text-left {
    text-align: right !important;
  }

  .rtl footer .lg\:text-left .lg\:text-left {
    text-align: right !important;
  }

  .rtl footer .lg\:text-left .lg\:justify-start {
    justify-content: flex-end; /* Align to right in RTL */
  }

  .rtl footer .lg\:text-left .sm\:justify-start {
    justify-content: flex-end; /* Align to right in RTL */
  }

  /* Footer bottom section - COMPLETE REVERSAL */
  .rtl footer .flex.flex-col.lg\:flex-row.justify-between.items-center {
    flex-direction: row-reverse !important; /* COMPLETE REVERSAL */
    direction: rtl;
  }

  .rtl footer .order-1.lg\:order-2 {
    order: 2 !important; /* Keep payment methods on right in RTL */
    text-align: right !important;
  }

  .rtl footer .order-1.lg\:order-2 .text-center {
    text-align: right !important;
  }

  .rtl footer .order-1.lg\:order-2 .lg\:text-right {
    text-align: right !important;
  }

  .rtl footer .order-1.lg\:order-2 .lg\:items-end {
    align-items: flex-end !important; /* Align to right in RTL */
  }

  .rtl footer .order-2.lg\:order-1 {
    order: 1 !important; /* Move copyright to left in RTL */
    text-align: left !important;
  }

  .rtl footer .order-2.lg\:order-1 .text-center {
    text-align: left !important;
  }

  .rtl footer .order-2.lg\:order-1 .lg\:text-left {
    text-align: left !important;
  }

  /* Footer divider - maintain position */
  .rtl footer .border-t {
    text-align: center;
  }

  /* Footer background elements - maintain position */
  .rtl footer .absolute.inset-0 {
    direction: ltr; /* Keep background LTR */
  }

  .rtl footer .relative.z-10 {
    direction: rtl; /* Apply RTL to content */
  }

  /* Footer logo section - RTL fixes */
  .rtl footer .flex.flex-col.md\:flex-row {
    direction: ltr; /* Keep layout LTR */
  }

  .rtl footer .flex.flex-col.md\:flex-row > div {
    direction: rtl; /* Apply RTL to content */
  }

  .rtl footer .flex.flex-col.items-center.lg\:items-start {
    align-items: flex-end !important; /* Align to right in RTL */
  }

  .rtl footer .flex.flex-col.items-center.lg\:items-start .text-center {
    text-align: right !important;
  }

  .rtl footer .flex.flex-col.items-center.lg\:items-start .lg\:text-right {
    text-align: right !important;
  }

  /* Footer vision badge - RTL fixes */
  .rtl footer .flex.items-center.gap-2 {
    direction: rtl;
  }

  .rtl footer .flex.items-center.gap-2 .arabic-font {
    text-align: right;
  }

  /* Footer registration info - RTL fixes */
  .rtl footer .border-t.border-white\/20 {
    text-align: right;
  }

  .rtl footer .border-t.border-white\/20 .arabic-font {
    text-align: right !important;
  }

  .rtl footer .border-t.border-white\/20 .ltr-content {
    direction: ltr;
    text-align: left;
  }

  /* ========== INTERACTIVE ELEMENTS RTL FIXES ========== */

  /* Footer Links - RTL Hover Effects */
  .rtl footer a {
    transition: all 0.3s ease;
  }

  .rtl footer a:hover {
    transform: translateX(-4px); /* Move left on hover in RTL */
  }

  /* Quick Links - RTL Animation */
  .rtl footer .grid.grid-cols-2 a {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .rtl footer .grid.grid-cols-2 a:hover {
    transform: translateX(-8px) scale(1.02); /* Move left and scale in RTL */
  }

  .rtl footer .grid.grid-cols-2 a:hover .fas.fa-chevron-left {
    transform: rotate(180deg) translateX(-2px); /* Enhanced chevron animation */
  }

  .rtl footer .grid.grid-cols-2 a:hover .fas.fa-chevron-right {
    transform: rotate(180deg) translateX(-2px); /* Enhanced chevron animation */
  }

  /* Contact Info Cards - RTL Hover Effects */
  .rtl footer .space-y-4 .flex {
    transition: all 0.3s ease;
  }

  .rtl footer .space-y-4 .flex:hover {
    transform: translateX(-4px); /* Move left on hover in RTL */
  }

  .rtl footer .space-y-4 .flex:hover .w-10 {
    background-color: rgba(
      122,
      193,
      67,
      0.3
    ) !important; /* Green hover in RTL */
    transform: scale(1.1);
  }

  /* VAT Certificate - RTL Hover Effects */
  .rtl footer .rounded-lg:hover {
    transform: translateX(-4px) scale(1.02); /* Move left and scale in RTL */
    background-color: rgba(255, 255, 255, 0.15) !important;
  }

  .rtl footer .rounded-lg:hover img {
    transform: scale(1.05);
  }

  /* Social Media Icons - RTL Hover Effects */
  .rtl footer .w-12.h-12 {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .rtl footer .w-12.h-12:hover {
    transform: translateX(-4px) translateY(-2px) scale(1.1) !important; /* Move left and up in RTL */
  }

  .rtl footer .w-12.h-12:hover i {
    transform: scale(1.2) rotate(5deg);
  }

  /* Payment Methods - RTL Hover Effects */
  .rtl footer .w-10.h-8 {
    transition: all 0.3s ease;
  }

  .rtl footer .w-10.h-8:hover {
    transform: translateX(-2px) scale(1.1) !important; /* Move left in RTL */
    background-color: rgba(122, 193, 67, 0.2) !important;
  }

  /* Logo - RTL Hover Effects */
  .rtl footer img[alt*="Family Discount"] {
    transition: all 0.3s ease;
  }

  .rtl footer img[alt*="Family Discount"]:hover {
    transform: translateX(4px) scale(1.05); /* Move right in RTL (opposite direction) */
  }

  /* Vision Badge - RTL Animation */
  .rtl footer .bg-white\/10 {
    transition: all 0.3s ease;
  }

  .rtl footer .bg-white\/10:hover {
    transform: translateX(-2px) scale(1.05); /* Move left in RTL */
    background-color: rgba(122, 193, 67, 0.2) !important;
  }

  /* ========== BRANDS SLIDER MOBILE RTL FIXES ========== */
  @media (max-width: 639px) {
    /* RTL brands slider container - fix overall layout */
    .rtl .brands-slider-container {
      direction: rtl !important;
      position: relative !important;
      overflow: hidden !important;
      width: 100% !important;
      margin: 0 -10px !important;
      padding: 0 10px !important;
    }

    /* RTL brands slider track - fix transform direction */
    .rtl #brands-slider {
      direction: ltr !important; /* Keep LTR for proper flex behavior */
      display: flex !important;
      transition: transform 0.5s ease !important;
      gap: 20px !important;
      padding: 10px 0 !important;
      width: 100% !important;
      height: auto !important;
      overflow: visible !important;
    }

    /* RTL brands slide - fix content direction only */
    .rtl #brands-slider > div {
      direction: rtl !important; /* Apply RTL only to slide content */
      flex: 0 0 100% !important;
      min-width: 100% !important;
      width: 100% !important;
      display: block !important;
      position: relative !important;
      overflow: hidden !important;
    }

    /* RTL brands grid inside slide - fix layout */
    .rtl #brands-slider .brands-grid {
      direction: rtl !important;
      display: grid !important;
      grid-template-columns: repeat(2, 1fr) !important;
      gap: 16px !important;
      padding: 0 1rem !important;
      width: 100% !important;
    }

    /* RTL brand card - fix content direction */
    .rtl #brands-slider .brand-card {
      direction: rtl !important;
      text-align: center !important;
      background: var(--card-bg) !important;
      border-radius: 12px !important;
      padding: 1.5rem !important;
      box-shadow: 0 4px 12px var(--card-shadow) !important;
      transition: all 0.3s ease !important;
      position: relative !important;
      overflow: hidden !important;
    }

    .rtl #brands-slider .brand-card:hover {
      transform: translateY(-4px) scale(1.02) !important;
      box-shadow: 0 12px 24px var(--card-shadow) !important;
    }

    /* RTL brand logo - fix alignment */
    .rtl #brands-slider .brand-logo {
      max-width: 120px !important;
      max-height: 60px !important;
      object-fit: contain !important;
      margin: 0 auto !important;
      transition: transform 0.3s ease !important;
    }

    .rtl #brands-slider .brand-card:hover .brand-logo {
      transform: scale(1.1) !important;
    }

    /* RTL brands slider buttons - fix styling and positioning */
    .rtl .brands-slider-container .slider-btn {
      position: absolute !important;
      top: 50% !important;
      transform: translateY(-50%) !important;
      z-index: 10 !important;
      width: 40px !important;
      height: 40px !important;
      border-radius: 50% !important;
      background: var(--fd-green) !important;
      color: white !important;
      border: none !important;
      cursor: pointer !important;
      transition: all 0.3s ease !important;
      display: flex !important;
      align-items: center !important;
      justify-content: center !important;
      font-size: 16px !important;
    }

    .rtl .brands-slider-container .slider-btn:hover {
      background: var(--fd-navy) !important;
      transform: translateY(-50%) scale(1.1) !important;
    }

    /* RTL brands prev button - position on right in RTL */
    .rtl .brands-slider-container #brands-prev {
      right: 10px !important;
      left: auto !important;
    }

    /* RTL brands next button - position on left in RTL */
    .rtl .brands-slider-container #brands-next {
      left: 10px !important;
      right: auto !important;
    }

    /* RTL brands dots container - fix positioning */
    .rtl .brands-slider-container .brands-dots {
      direction: ltr !important; /* Keep dots LTR for consistent navigation */
      display: flex !important;
      justify-content: center !important;
      gap: 8px !important;
      margin-top: 1rem !important;
      padding: 0 1rem !important;
    }

    /* RTL brands dots - fix individual dot styling */
    .rtl .brands-slider-container .brands-dots .brands-dot {
      width: 8px !important;
      height: 8px !important;
      border-radius: 50% !important;
      background: var(--border-light) !important;
      border: none !important;
      cursor: pointer !important;
      transition: all 0.3s ease !important;
      direction: ltr !important;
    }

    .rtl .brands-slider-container .brands-dots .brands-dot.active {
      background: var(--fd-green) !important;
      width: 24px !important;
      border-radius: 4px !important;
    }

    .rtl .brands-slider-container .brands-dots .brands-dot:hover {
      background: var(--fd-gray) !important;
    }
  }

  /* ========== BRANDS SLIDER RTL INITIALIZATION FIXES ========== */
  @media (max-width: 639px) {
    /* RTL brands slider - ensure proper RTL initialization */
    html[lang="ar"] .brands-slider-container {
      direction: rtl !important;
    }

    html[lang="ar"] #brands-slider {
      direction: ltr !important;
    }

    html[lang="ar"] #brands-slider > div {
      direction: rtl !important;
    }

    html[lang="ar"] #brands-slider .brands-grid {
      direction: rtl !important;
    }

    html[lang="ar"] #brands-slider .brand-card {
      direction: rtl !important;
    }

    html[lang="ar"] .brands-slider-container .brands-dots {
      direction: ltr !important;
    }

    html[lang="ar"] .brands-slider-container .brands-dot {
      direction: ltr !important;
    }
  }

  @media (max-width: 480px) {
    html[lang="ar"] .arabic-font {
      font-size: 0.9em !important; /* Even smaller for very small screens */
    }
  }

  /* ========== FOOTER RTL ANIMATIONS ========== */

  /* Pulse Animation for Vision Badge - RTL */
  .rtl footer .animate-pulse {
    animation: pulseRTL 2s ease-in-out infinite;
  }

  @keyframes pulseRTL {
    0%,
    100% {
      opacity: 1;
      transform: scale(1);
    }
    50% {
      opacity: 0.7;
      transform: scale(1.1) translateX(-2px); /* Pulse left in RTL */
    }
  }

  /* ========== DOCUMENT & BUTTON RTL FIXES ========== */

  /* VAT Certificate Document - RTL */
  .rtl footer .logo-image {
    transition: all 0.3s ease;
  }

  .rtl footer .logo-image:hover {
    transform: translateX(-4px) rotate(-2deg); /* Move left and rotate in RTL */
  }

  /* Scroll to Top Button - RTL */
  .rtl footer #scrollToTop {
    left: 1rem !important; /* Move to left side in RTL */
    right: auto !important;
  }

  .rtl footer #scrollToTop:hover {
    transform: translateY(-4px) scale(1.1) translateX(-2px) !important; /* Move left in RTL */
  }

  .rtl footer #scrollToTop:hover i {
    transform: rotate(180deg); /* Flip arrow in RTL */
  }

  /* ========== FOCUS & ACCESSIBILITY RTL FIXES ========== */

  /* Footer Links - Focus States */
  .rtl footer a:focus-visible {
    outline: 2px solid var(--fd-green);
    outline-offset: 2px;
    transform: translateX(-2px); /* Move left on focus in RTL */
  }

  /* Interactive Elements - Focus States */
  .rtl footer .rounded-lg:focus-visible,
  .rtl footer .w-12.h-12:focus-visible,
  .rtl footer .w-10.h-8:focus-visible {
    outline: 2px solid var(--fd-green);
    outline-offset: 2px;
    transform: translateX(-2px) scale(1.05); /* Move left and scale on focus in RTL */
  }

  /* ========== MICRO-INTERACTIONS RTL FIXES ========== */

  /* Contact Info Icons - RTL */
  .rtl footer .space-y-4 .w-10 i {
    transition: all 0.3s ease;
  }

  .rtl footer .space-y-4 .flex:hover .w-10 i {
    transform: scale(1.2) rotate(-5deg); /* Rotate left in RTL */
  }

  /* Section Headers - RTL Hover */
  .rtl footer h3.arabic-font:hover {
    transform: translateX(-2px); /* Move left on hover in RTL */
  }

  .rtl footer h3.arabic-font:hover i {
    transform: scale(1.2) rotate(-10deg);
    color: var(--fd-green) !important;
  }

  /* Footer Bottom Links - RTL */
  .rtl footer .order-2.lg\:order-1 a:hover {
    transform: translateX(-2px); /* Move left in RTL */
  }

  .rtl footer .order-1.lg\:order-2:hover {
    transform: translateX(-2px); /* Move left in RTL */
  }

  /* ========== RESPONSIVE RTL ANIMATIONS ========== */

  /* Tablet RTL Animations */
  @media (min-width: 768px) and (max-width: 1023px) {
    .rtl footer .grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-3 {
      animation: fadeInRTL 1s ease-out;
    }

    @keyframes fadeInRTL {
      from {
        opacity: 0;
        transform: translateX(-30px); /* Fade in from left in RTL */
      }
      to {
        opacity: 1;
        transform: translateX(0);
      }
    }
  }

  /* Mobile RTL Animations */
  @media (max-width: 767px) {
    .rtl footer .space-y-4 .flex:nth-child(odd) {
      animation: slideInLeftMobile 0.6s ease-out;
    }

    .rtl footer .space-y-4 .flex:nth-child(even) {
      animation: slideInRightMobile 0.6s ease-out;
    }

    @keyframes slideInLeftMobile {
      from {
        opacity: 0;
        transform: translateX(-20px); /* From left in RTL */
      }
      to {
        opacity: 1;
        transform: translateX(0);
      }
    }

    @keyframes slideInRightMobile {
      from {
        opacity: 0;
        transform: translateX(20px); /* From right in RTL */
      }
      to {
        opacity: 1;
        transform: translateX(0);
      }
    }
  }
}

/* ========== MOBILE FOOTER RTL FIXES ========== */

/* Mobile footer RTL Fixes - OVERRIDE EXISTING STYLES */
@media (max-width: 1023px) {
  /* Mobile footer container - RTL text direction */
  .rtl footer {
    direction: rtl;
  }

  /* ========== MOBILE FOOTER HEADERS - CENTERED FOR BOTH LANGUAGES ========== */

  /* Center ALL footer headers on mobile - regardless of language */
  footer h3 {
    text-align: center !important;
    justify-content: center !important;
    align-items: center !important;
  }

  footer h3.arabic-font {
    text-align: center !important;
    direction: rtl;
  }

  footer h3.lang-en {
    text-align: center !important;
    direction: ltr;
  }

  /* Center header icons and text */
  footer h3 .flex {
    justify-content: center !important;
    align-items: center !important;
  }

  footer h3 i {
    margin-right: 0.5rem !important;
    margin-left: 0.5rem !important;
  }

  /* Override any RTL-specific header alignment on mobile */
  .rtl footer h3.arabic-font {
    text-align: center !important;
  }

  .rtl footer h3.lang-en {
    text-align: center !important;
  }

  .rtl footer h3 .flex {
    justify-content: center !important;
  }

  /* Mobile footer brand section - RTL alignment */
  .rtl footer .text-center {
    text-align: center !important; /* Keep centered on mobile */
  }

  .rtl footer .arabic-font {
    text-align: center !important;
    direction: rtl;
  }

  /* Mobile footer grid - RTL content */
  .rtl footer .grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-3 {
    direction: rtl;
  }

  .rtl footer .grid.grid-cols-1.sm\:grid-cols-2.lg\:grid-cols-3 > div {
    text-align: right;
  }

  /* Mobile footer sections - RTL headers */
  .rtl footer h3.arabic-font {
    text-align: center !important; /* Override with center */
    direction: rtl !important;
  }

  /* Mobile quick links - RTL fixes */
  .rtl footer .grid.grid-cols-2 {
    direction: rtl;
  }

  .rtl footer .grid.grid-cols-2 > div {
    text-align: right;
  }

  .rtl footer .grid.grid-cols-2 .fas.fa-chevron-left {
    transform: rotate(180deg);
  }

  .rtl footer .grid.grid-cols-2 .fas.fa-chevron-right {
    transform: rotate(180deg);
  }

  /* Mobile contact info - RTL fixes */
  .rtl footer .space-y-4 .flex {
    direction: rtl;
  }

  .rtl footer .space-y-4 .flex .flex-1 {
    text-align: right;
  }

  .rtl footer .space-y-4 .flex .ltr-content {
    direction: ltr;
    text-align: left;
  }

  /* Mobile social media - RTL fixes */
  .rtl footer .text-center {
    text-align: center !important;
  }

  .rtl footer .sm\:text-left {
    text-align: center !important;
  }

  .rtl footer .lg\:text-left {
    text-align: center !important;
  }

  .rtl footer .justify-center {
    justify-content: center !important;
  }

  .rtl footer .sm\:justify-start {
    justify-content: center !important;
  }

  .rtl footer .lg\:justify-start {
    justify-content: center !important;
  }

  /* Mobile footer bottom - RTL fixes */
  .rtl footer .flex.flex-col.lg\:flex-row {
    direction: rtl;
  }

  .rtl footer .flex.flex-col.lg\:flex-row > div {
    text-align: center;
  }

  .rtl footer .order-1.lg\:order-2 {
    text-align: center !important;
  }

  .rtl footer .order-1.lg\:order-2 .text-center {
    text-align: center !important;
  }

  .rtl footer .order-1.lg\:order-2 .lg\:text-right {
    text-align: center !important;
  }

  .rtl footer .order-1.lg\:order-2 .lg\:items-end {
    align-items: center !important;
  }

  .rtl footer .order-2.lg\:order-1 {
    text-align: center !important;
  }

  .rtl footer .order-2.lg\:order-1 .text-center {
    text-align: center !important;
  }

  .rtl footer .order-2.lg\:order-1 .lg\:text-left {
    text-align: center !important;
  }

  /* Mobile footer logo - RTL fixes */
  .rtl footer .flex.flex-col.md\:flex-row {
    direction: rtl;
  }

  .rtl footer .flex.flex-col.items-center {
    align-items: center;
  }

  .rtl footer .flex.flex-col.items-center .text-center {
    text-align: center !important;
  }

  /* Mobile vision badge - RTL fixes */
  .rtl footer .flex.items-center.gap-2 {
    direction: rtl;
  }

  /* Mobile registration info - RTL fixes */
  .rtl footer .border-t.border-white\/20 {
    text-align: center;
  }

  .rtl footer .border-t.border-white\/20 .arabic-font {
    text-align: center !important;
  }
}

/* Extra-small mobile devices (≤480px) - Further minimization */
@media (max-width: 480px) {
  /* Ultra-compact typography */
  h1 {
    font-size: 1.375rem !important;
  }
  h2 {
    font-size: 1.125rem !important;
  }
  h3 {
    font-size: 1rem !important;
  }
  h4 {
    font-size: 0.9rem !important;
  }

  p,
  .text-content,
  .description {
    font-size: 0.8rem !important;
  }

  small,
  .text-sm,
  .caption,
  .meta {
    font-size: 0.7rem !important;
  }

  /* Ultra-compact hero */
  .hero-title {
    font-size: 1.5rem !important;
    margin-bottom: 0.625rem !important;
  }

  .hero-subtitle {
    font-size: 0.8rem !important;
    margin-bottom: 0.875rem !important;
  }

  /* Ultra-compact buttons */
  .btn {
    padding: 0.5rem 0.875rem !important;
    font-size: 0.75rem !important;
    min-height: 36px !important;
  }

  .btn-primary .arrow-icon {
    width: 18px !important;
    height: 18px !important;
  }

  /* Ultra-compact sections */
  section[class*="pt-"][class*="pb-"],
  .py-16,
  .py-20,
  .py-24 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }

  /* Ultra-compact highlights */
  .highlight-item {
    padding: 0.5rem 0.375rem !important;
  }

  .highlight-item .w-24 {
    width: 2rem !important;
    height: 2rem !important;
  }

  .highlight-item .text-4xl {
    font-size: 1.25rem !important;
  }

  .highlight-item .text-sm {
    font-size: 0.65rem !important;
  }

  /* Ultra-compact brands */
  .brand-item {
    min-height: 50px !important;
    height: 60px !important;
    padding: 0.25rem !important;
  }

  .brand-item img {
    height: 24px !important;
    max-height: 24px !important;
  }

  /* Ultra-compact gallery */
  .gallery-card {
    width: 260px !important;
    padding: 0.5rem !important;
  }

  .gallery-card h2 {
    font-size: 1.125rem !important;
  }

  .gallery-card h3 {
    font-size: 0.7rem !important;
  }

  .gallery-card img,
  .image-slider-container {
    height: 120px !important;
  }

  /* Ultra-compact spacing */
  .gap-6,
  .gap-8 {
    gap: 0.5rem !important;
  }
  .gap-4,
  .gap-5 {
    gap: 0.375rem !important;
  }
  .gap-3 {
    gap: 0.25rem !important;
  }

  .mb-8,
  .mb-10,
  .mb-12 {
    margin-bottom: 0.75rem !important;
  }
  .mb-6,
  .mb-7 {
    margin-bottom: 0.5rem !important;
  }
  .mb-4,
  .mb-5 {
    margin-bottom: 0.375rem !important;
  }

  .mt-8,
  .mt-10,
  .mt-12 {
    margin-top: 0.75rem !important;
  }
  .mt-6,
  .mt-7 {
    margin-top: 0.5rem !important;
  }
  .mt-4,
  .mt-5 {
    margin-top: 0.375rem !important;
  }
}

/* ========== COMPREHENSIVE FONT ENHANCEMENT SYSTEM - ICONS PRESERVED ========== */

/* Base Font System Application - Icons Excluded */
body,
p,
span,
div,
h1,
h2,
h3,
h4,
h5,
h6,
a,
button,
input,
textarea,
select {
  font-family: var(--font-en-primary) !important;
}

html[lang="ar"] body,
html[lang="ar"] p,
html[lang="ar"] span,
html[lang="ar"] div,
html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] h5,
html[lang="ar"] h6,
html[lang="ar"] a,
html[lang="ar"] button,
html[lang="ar"] input,
html[lang="ar"] textarea,
html[lang="ar"] select {
  font-family: var(--font-ar-primary) !important;
}

/* Icons Preservation - CRITICAL: Do not affect icons */
i,
.fa,
.fas,
.far,
.fab,
.fad,
.fass,
.fasr,
.fasl,
.fa-solid,
.fa-regular,
.fa-brands,
.fa-duotone,
.fa-sharp,
.fa-sharp-solid,
.fa-sharp-regular,
.fa-sharp-light {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
}

/* Social Icons Specific Preservation */
.social-icon i,
.social-link i,
.fa-instagram,
.fa-tiktok,
.fa-snapchat-ghost,
.fa-whatsapp,
.fa-facebook,
.fa-twitter,
.fa-linkedin,
.fa-youtube,
.fa-pinterest,
.fa-reddit {
  font-family: "Font Awesome 6 Brands" !important;
  font-weight: 400 !important;
}

/* Solid Icons Preservation */
.fas,
.fa-solid {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
}

/* Regular Icons Preservation */
.far,
.fa-regular {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 400 !important;
}

/* Brand Icons Preservation */
.fab,
.fa-brands {
  font-family: "Font Awesome 6 Brands" !important;
  font-weight: 400 !important;
}

/* Social Icons Visibility and Styling */
.social-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.social-icon i,
.social-link i {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  font-style: normal !important;
  font-variant: normal !important;
  text-rendering: auto !important;
  line-height: 1 !important;
}

/* Footer Social Icons */
footer .social-icon i,
footer .social-link i {
  color: inherit !important;
}

/* Dark Mode Social Icons */
.dark .social-icon i,
.dark .social-link i {
  color: var(--fd-green) !important;
}

/* Social Icon Hover Effects */
.social-link:hover .social-icon i {
  color: #ffffff !important;
  transform: scale(1.1) !important;
}

/* Specific Social Icon Colors */
.social-item:nth-child(1) .social-link:hover .social-icon i {
  color: #000000 !important; /* Snapchat yellow */
}

.social-item:nth-child(2) .social-link:hover .social-icon i {
  color: #ffffff !important; /* TikTok black */
}

.social-item:nth-child(3) .social-link:hover .social-icon i {
  color: #ffffff !important; /* Instagram gradient */
}

.social-item:nth-child(4) .social-link:hover .social-icon i {
  color: #ffffff !important; /* WhatsApp green */
}

/* Enhanced Arabic Typography */
.arabic-font {
  font-family: var(--font-ar-primary) !important;
  font-weight: var(--font-medium) !important;
  line-height: var(--line-height-relaxed) !important;
  letter-spacing: var(--letter-spacing-normal) !important;
}

/* Enhanced English Typography */
.english-font {
  font-family: var(--font-en-primary) !important;
  font-weight: var(--font-normal) !important;
  line-height: var(--line-height-normal) !important;
  letter-spacing: var(--letter-spacing-tight) !important;
}

/* Section Headers Enhancement */
.section-title {
  font-family: var(--font-en-display) !important;
  font-weight: var(--font-bold) !important;
  line-height: var(--line-height-tight) !important;
  letter-spacing: var(--letter-spacing-tight) !important;
}

html[lang="ar"] .section-title {
  font-family: var(--font-ar-display) !important;
  font-weight: var(--font-extrabold) !important;
  line-height: var(--line-height-tight) !important;
  letter-spacing: var(--letter-spacing-normal) !important;
}

/* Card Typography Enhancement */
.card-title {
  font-family: var(--font-en-display) !important;
  font-weight: var(--font-semibold) !important;
  line-height: var(--line-height-tight) !important;
  letter-spacing: var(--letter-spacing-tight) !important;
}

html[lang="ar"] .card-title {
  font-family: var(--font-ar-display) !important;
  font-weight: var(--font-bold) !important;
  line-height: var(--line-height-tight) !important;
  letter-spacing: var(--letter-spacing-normal) !important;
}

.card-content {
  font-family: var(--font-en-primary) !important;
  font-weight: var(--font-normal) !important;
  line-height: var(--line-height-normal) !important;
  letter-spacing: var(--letter-spacing-normal) !important;
}

html[lang="ar"] .card-content {
  font-family: var(--font-ar-primary) !important;
  font-weight: var(--font-normal) !important;
  line-height: var(--line-height-relaxed) !important;
  letter-spacing: var(--letter-spacing-normal) !important;
}

/* Navigation Typography Enhancement */
.nav-link {
  font-family: var(--font-en-primary) !important;
  font-weight: var(--font-medium) !important;
  line-height: var(--line-height-normal) !important;
  letter-spacing: var(--letter-spacing-tight) !important;
}

html[lang="ar"] .nav-link {
  font-family: var(--font-ar-primary) !important;
  font-weight: var(--font-semibold) !important;
  line-height: var(--line-height-normal) !important;
  letter-spacing: var(--letter-spacing-normal) !important;
}

/* Button Typography Enhancement - Icons Preserved */
button,
.btn,
input[type="button"],
input[type="submit"] {
  font-family: var(--font-en-primary) !important;
  font-weight: var(--font-medium) !important;
  line-height: var(--line-height-normal) !important;
  letter-spacing: var(--letter-spacing-tight) !important;
}

html[lang="ar"] button,
html[lang="ar"] .btn,
html[lang="ar"] input[type="button"],
html[lang="ar"] input[type="submit"] {
  font-family: var(--font-ar-primary) !important;
  font-weight: var(--font-semibold) !important;
  line-height: var(--line-height-normal) !important;
  letter-spacing: var(--letter-spacing-normal) !important;
}

/* Form Typography Enhancement */
input,
textarea,
select {
  font-family: var(--font-en-primary) !important;
  font-weight: var(--font-normal) !important;
  line-height: var(--line-height-normal) !important;
  letter-spacing: var(--letter-spacing-normal) !important;
}

html[lang="ar"] input,
html[lang="ar"] textarea,
html[lang="ar"] select {
  font-family: var(--font-ar-primary) !important;
  font-weight: var(--font-normal) !important;
  line-height: var(--line-height-relaxed) !important;
  letter-spacing: var(--letter-spacing-normal) !important;
}

/* Footer Typography Enhancement */
footer {
  font-family: var(--font-en-primary) !important;
  font-weight: var(--font-normal) !important;
  line-height: var(--line-height-normal) !important;
  letter-spacing: var(--letter-spacing-normal) !important;
}

html[lang="ar"] footer {
  font-family: var(--font-ar-primary) !important;
  font-weight: var(--font-normal) !important;
  line-height: var(--line-height-relaxed) !important;
  letter-spacing: var(--letter-spacing-normal) !important;
}

footer h1,
footer h2,
footer h3,
footer h4,
footer h5,
footer h6 {
  font-family: var(--font-en-display) !important;
  font-weight: var(--font-bold) !important;
  line-height: var(--line-height-tight) !important;
  letter-spacing: var(--letter-spacing-tight) !important;
}

html[lang="ar"] footer h1,
html[lang="ar"] footer h2,
html[lang="ar"] footer h3,
html[lang="ar"] footer h4,
html[lang="ar"] footer h5,
html[lang="ar"] footer h6 {
  font-family: var(--font-ar-display) !important;
  font-weight: var(--font-extrabold) !important;
  line-height: var(--line-height-tight) !important;
  letter-spacing: var(--letter-spacing-normal) !important;
}

/* News Typography Enhancement */
.news-title {
  font-family: var(--font-en-display) !important;
  font-weight: var(--font-bold) !important;
  line-height: var(--line-height-tight) !important;
  letter-spacing: var(--letter-spacing-tight) !important;
}

html[lang="ar"] .news-title {
  font-family: var(--font-ar-display) !important;
  font-weight: var(--font-extrabold) !important;
  line-height: var(--line-height-tight) !important;
  letter-spacing: var(--letter-spacing-normal) !important;
}

.news-content {
  font-family: var(--font-en-primary) !important;
  font-weight: var(--font-normal) !important;
  line-height: var(--line-height-normal) !important;
  letter-spacing: var(--letter-spacing-normal) !important;
}

html[lang="ar"] .news-content {
  font-family: var(--font-ar-primary) !important;
  font-weight: var(--font-medium) !important;
  line-height: var(--line-height-relaxed) !important;
  letter-spacing: var(--letter-spacing-normal) !important;
}

/* Monospace Enhancement - Icons Preserved */
.ltr-content,
.font-mono,
code,
pre {
  font-family: var(--font-mono) !important;
  font-weight: var(--font-normal) !important;
  letter-spacing: var(--letter-spacing-wide) !important;
}

/* Hero Title Enhancement */
.hero-title {
  font-family: var(--font-en-display) !important;
  font-weight: var(--font-extrabold) !important;
  line-height: var(--line-height-tight) !important;
  letter-spacing: var(--letter-spacing-tight) !important;
}

html[lang="ar"] .hero-title {
  font-family: var(--font-ar-display) !important;
  font-weight: var(--font-black) !important;
  line-height: var(--line-height-tight) !important;
  letter-spacing: var(--letter-spacing-normal) !important;
}

/* Responsive Font Scaling */
@media (max-width: 640px) {
  html[lang="ar"] .arabic-font {
    font-size: 0.95em !important; /* Slightly smaller for better mobile readability */
  }

  html[lang="ar"] body {
    line-height: var(--line-height-relaxed) !important;
  }

  html[lang="ar"] .section-title {
    font-size: 0.9em !important;
  }
}

@media (max-width: 480px) {
  html[lang="ar"] .arabic-font {
    font-size: 0.9em !important; /* Even smaller for very small screens */
  }
}
