/* Arabic styles (RTL) */
@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@400;500;600;700&display=swap');

html { direction: rtl; }
body { 
  font-family: 'Alexandria', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji"; 
  overflow: hidden;
}

/* Header and navigation Arabic font */
header, nav, .nav-link, .language-text, .dropdown-language-text {
  font-family: 'Alexandria', sans-serif !important;
}

/* Ensure all text elements use Alexandria font */
h1, h2, h3, h4, h5, h6, p, span, div, a, button {
  font-family: 'Alexandria', sans-serif;
}

/* Mobile Menu Animations */
#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-in-out, opacity 0.3s ease-in-out;
  opacity: 0;
  transform-origin: top;
  transform: scaleY(0);
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, max-height 0.3s ease-in-out;
}

#mobile-menu.active {
  max-height: 500px; /* Adjust based on your content */
  opacity: 1;
  transform: scaleY(1);
  transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out, max-height 0.5s ease-in-out;
}

/* Mobile menu items animation */
#mobile-menu a {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobile-menu.active a {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

/* Hamburger icon animation */
.mobile-menu-btn {
  transition: transform 0.3s ease-in-out;
}

.mobile-menu-btn.active {
  transform: rotate(90deg);
}

/* Custom styles for improved homepage */
.hero-section {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.service-card {
  border-radius: 16px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.service-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.service-card-content {
  padding: 1.5rem;
}

.service-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.service-card-description {
  color: #6b7280;
  line-height: 1.6;
}

/* Logo styles moved to partners-slider.css */

/* Chat button animations */
.chat-button {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

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

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

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Header Styles - Consistent across all pages */
:root {
  --header-height: 150px;
}

header.absolute {
  max-width: 1400px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: 100%;
  padding: 0 4%;
  top: 4%;
  height: var(--header-height);
}

/* Header navigation hover styles */
header.absolute nav a:hover {
  color: #0FA304 !important;
}

/* Mobile menu hover styles */
header.absolute #mobile-menu a:hover {
  color: #0FA304 !important;
}

/* Home Page Header - White Text with Green Glow */

.home-header .text-black {
  color: white !important;
  text-shadow: 0 0 8px rgba(15, 163, 4, 0.3);
}

.home-header .text-black:hover {
  color: #0FA304 !important;
}

.home-header .language-text {
  color: white !important;
  text-shadow: 0 0 8px rgba(15, 163, 4, 0.3);
}

.home-header .dropdown-language-text {
  color: white !important;
  text-shadow: 0 0 8px rgba(15, 163, 4, 0.3);
}

.home-header .dropdown-icon svg {
  color: white !important;
  filter: drop-shadow(0 0 8px rgba(15, 163, 4, 0.3));
}

.home-header .language-switcher-button {
  outline: 0.75px white solid !important;
  box-shadow: 0 0 12px rgba(15, 163, 4, 0.2);
}

.home-header .language-switcher-button:hover {
  outline: 0.75px #0FA304 solid !important;
}

.home-header .language-switcher-button:hover .language-text {
  color: #0FA304 !important;
}

.home-header .language-switcher-button:hover .dropdown-icon svg {
  color: #0FA304 !important;
}

.home-header .language-dropdown {
  outline: 0.75px white solid !important;
}

header.absolute > div {
  max-width: 100%;
  width: 100%;
  position: relative;
}

/* RTL Header Layout - Mirror the English version */
header.absolute .flex-row-reverse {
  direction: rtl;
}

/* Ensure proper spacing in RTL */
header.absolute .flex-row-reverse .flex-shrink-0 {
  order: 3; /* Logo on the right */
}

header.absolute .flex-row-reverse nav {
  order: 2; /* Navigation in the middle */
}

header.absolute .flex-row-reverse .flex.items-center.space-x-4 {
  order: 1; /* Language switcher on the left */
}

/* Mobile menu RTL adjustments */
header.absolute #mobile-menu {
  direction: rtl;
  text-align: right;
}

/* Additional RTL-specific styles for better layout */

/* Ensure proper RTL layout for header elements */
header.absolute .flex-row-reverse {
  direction: rtl;
}

/* RTL spacing adjustments */
header.absolute .space-x-reverse > * + * {
  margin-right: 0.5rem;
  margin-left: 0;
}

/* RTL text alignment */
header.absolute nav a {
  text-align: right;
}

/* RTL language switcher */
header.absolute .space-x-reverse .flex.items-center.space-x-2 {
  direction: rtl;
}

/* Language Switcher - Exact Design Match */
.language-switcher-container {
  width: 72px;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 4px;
  display: inline-flex;
}

.language-switcher-button {
  min-width: 110px;
  padding: 6px;
  box-shadow: 0px 1px 4px rgba(24.73, 32.61, 60.56, 0.06);
  border-radius: 200px;
  outline: 0.75px black solid;
  outline-offset: -0.75px;
  justify-content: center;
  align-items: center;
  gap: 6px;
  display: inline-flex;
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
  cursor: pointer;
}

.language-switcher-button:hover {
  transform: translateY(-1px);
  color: #0FA304 !important;
  outline: 0.75px #0FA304 solid !important;
}

.language-switcher-button:hover .language-text {
  color: #0FA304 !important;
}

.language-switcher-button:hover .dropdown-icon svg {
  color: #0FA304 !important;
}

/* Language Dropdown */
.language-dropdown {
  position: absolute;
  top: 100%;
  min-width: 110px;
  border-radius: 200px;
  box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.15);
  outline: 0.75px black solid;
  outline-offset: -0.75px;
  display: none;
  z-index: 1000;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.language-dropdown-item {
  padding: 6px;
  justify-content: center;
  align-items: center;
  gap: 6px;
  display: inline-flex;
  width: 100%;
  text-decoration: none;
  transition: all 0.2s ease;
  border-radius: 200px;
}

.language-dropdown-item:hover {
  transform: scale(1.02);
  color: #0FA304 !important;
  outline: 0.75px #0FA304 solid !important;
}

.language-dropdown-item:hover .dropdown-language-text {
  color: #0FA304 !important;
}

.dropdown-language-content {
  justify-content: flex-start;
  align-items: center;
  gap: 4px;
  display: flex;
}

.dropdown-language-text {
  text-align: center;
  color: black;
  font-size: 14px;
  font-family: Alexandria;
  font-weight: 500;
  line-height: 26px;
  word-wrap: break-word;
}

.dropdown-flag-icon {
  width: 16px;
  height: 16px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.language-content {
  justify-content: flex-start;
  align-items: center;
  gap: 4px;
  display: flex;
}

.dropdown-icon {
  width: 14px;
  height: 14px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropdown-icon svg {
  width: 100%;
  height: 100%;
  color: black;
}

.globe-icon {
  width: 14px;
  height: 14px;
  position: relative;
}

.globe-shape {
  width: 7.70px;
  height: 4.15px;
  left: 3.15px;
  top: 5.98px;
  position: absolute;
  outline: 0.75px black solid;
  outline-offset: -0.38px;
}

.language-text {
  text-align: center;
  color: black;
  font-size: 14px;
  font-family: Alexandria;
  font-weight: 500;
  line-height: 26px;
  word-wrap: break-word;
}

.toggle-switch {
  justify-content: flex-start;
  align-items: center;
  gap: 5.33px;
  display: flex;
}

.flag-icon {
  width: 16px;
  height: 16px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flag-image {
  min-width: 16px;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
}

.switch-container {
  width: 16px;
  height: 16px;
  position: relative;
  background: #EEEEEE;
  box-shadow: 0px 0.8707483410835266px 1.3061225414276123px rgba(66, 71, 76, 0.08);
  overflow: hidden;
  border-radius: 88.53px;
}

.switch-inner {
  width: 22.40px;
  height: 16px;
  left: 0px;
  top: 0px;
  position: absolute;
  background: #EEEEEE;
}

/* Main Content Adjustments */
main {
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* Homepage specific adjustments */
body.homepage main {
  margin-top: 0; /* Homepage uses full screen */
}

/* Responsive Header Styles */
@media (max-width: 1920px) {
  /* Font sizes handled by Tailwind */
}

@media (max-width: 1400px) {
  header.absolute {
    max-width: 100%;
    left: 0;
    right: auto;
    transform: none;
    padding: 0 4%;
  }
  
  header.absolute > div {
    max-width: 100%;
    width: 100%;
  }
  
  /* Adjust main content margin for smaller screens */
  main {
    margin-top: var(--header-height);
  }
  
  .page, .company-page {
    margin-top: var(--header-height);
  }
}

@media (max-width: 1200px) {
  /* Spacing handled by Tailwind */
}

/* Page Specific Styles */
.page {
  min-height: calc(100vh - var(--header-height));
  position: relative;
  margin-top: var(--header-height);
  padding: 2rem 1rem;
}

/* Company Page Specific Styles */
.company-page {
  background: white;
  height: calc(100vh - var(--header-height));
  position: relative;
  margin-top: var(--header-height);
  overflow: hidden;
}

.company-page .background-image {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100vh;
  object-fit: cover;
  z-index: 1;
}

.company-content {
  max-width: 1090px;
  margin: 0 auto;
  padding: 5rem 1rem;
  height: 100%;
  display: flex;
  align-items: center;
}

.company-text-section {
  max-width: 781px;
}

.company-title {
  font-size: 1.5rem;
  font-weight: bold;
  font-family: 'Alexandria', sans-serif;
  color: black;
  margin-bottom: 2.5rem;
}

.company-description {
  font-size: 1rem;
  font-weight: 500;
  font-family: 'Alexandria', sans-serif;
  line-height: 1.6;
  color: #333;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.company-description p {
  margin-bottom: 1rem;
}

/* RTL Support for Company Page */
.company-page.rtl {
  direction: rtl;
}

.company-page.rtl .company-content {
  text-align: right;
}

/* Keep partners slider LTR even in RTL pages */
.company-page.rtl .partners-section {
  direction: ltr;
}

div#swal2-html-container {
  font-size: 1rem; 
}
h2#swal2-title {
  font-size: 1.5rem; 
}

input, textarea {
  background: hsl(0deg 0% 100% / 15%);
}

/* Responsive adjustments for company page */
@media (max-width: 1024px) {
  .company-content {
    padding: 0 2rem;
  }
  
}

@media (max-width: 768px) {
  .company-title {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
  }
  
  header.absolute .flex-row-reverse {
    direction: ltr;
}

  .company-description {
    font-size: 0.9rem;
  }
}

@media (max-width: 1024px) {
  /* Mobile layout adjustments */
  :root {
    --header-height: 56px; /* Smaller header on mobile */
  }
  
  main {
    margin-top: var(--header-height);
  }
  
  .page, .company-page {
    margin-top: var(--header-height);
    padding: 5rem 0.5rem;
  }
}