:root {
  --color-primary: #414042;
  --color-secondary: #6ab4e3;
  --color-text: #333333;
  --color-background: #ffffff;
  --color-muted: #f4f4f4;
  --color-border: #dddddd;
  --font-family-base: 'Cairo', sans-serif;
  --btn-radius: 8px;
  --transition-speed: 0.3s;
  --swiper-navigation-size: 48px;
  --swiper-pagination-bullet-size: 12px;
  --swiper-pagination-bullet-horizontal-gap: 6px;
  --slide-min-height: 400px;
  --slide-border-radius: 12px;
  --slide-box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --slide-content-padding: 2rem;
  --arrow-color-rgb: 59, 130, 246;
  --arrow-icon-color: white;
  --bullet-color: #ccc;
  --bullet-active-color: #000;
  --bullet-text-color: #fff;  
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  direction: rtl;
}

body {
  font-family: var(--font-family-base);
  background-color: var(--color-background);
  color: var(--color-text);
  line-height: 1.6;
  text-align: right;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

button, .btn {
  border-radius: var(--btn-radius);
  padding: 0.6rem 1.2rem;
  border: none;
  cursor: pointer;
  transition: background-color var(--transition-speed);
}

.whatsapp {
    color: var(--color-whatapp) !important;;
}

.text-secondary {
  color: var(--color-secondary) !important;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background-color: #2e2e2f;
}

.btn-accent {
  background-color: var(--color-secondary);
  color: white;
}

.btn-accent:hover {
  background-color: #51a3dc;
}

.lang-switch {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-direction: row-reverse;
}

.lang-switch .btn {
  min-width: 100px;
  padding: 0.5rem 1rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.navbar {
  background-color: var(--color-primary);
  color: white;
  padding: 1rem 2rem;
}

.navbar a {
  color: white;
  margin-left: 1rem;
  text-decoration: none;
  transition: color var(--transition-speed);
}

.navbar a:hover {
  color: var(--color-secondary);
}

.navbar .nav-link {
  position: relative;
  transition: color var(--transition-speed);
}

.navbar .nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 50%;
  width: 0;
  height: 2px;
  background-color: var(--color-secondary);
  transition: all var(--transition-speed) ease-in-out;
  transform: translateX(50%);
}

.navbar .nav-link:hover::after {
  width: 100%;
}

#langDropdown + .dropdown-menu a {
  color: var(--color-text);
  background-color: white;
  text-align: right;
}

#langDropdown + .dropdown-menu a:hover {
  background-color: var(--color-secondary);
  color: white;
}

.dropdown-menu {
  background-color: var(--color-primary);
  border: none;
  border-radius: var(--btn-radius);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  min-width: auto;
  width: max-content;
  z-index: 1050;
  white-space: nowrap;
}

.dropdown-menu .dropdown-item {
  color: white;
  background-color: transparent;
  transition: background-color var(--transition-speed), color var(--transition-speed);
  white-space: nowrap;
  padding: 0.5rem 1.25rem;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus,
.dropdown-menu .dropdown-item.active {
  background-color: var(--color-secondary);
  color: var(--color-primary);
}

.dropdown-submenu {
  position: relative;
}

.dropdown-submenu > .dropdown-menu {
  min-width: auto !important;
  width: max-content;
  white-space: nowrap;
  top: 0;
  left: 100%;
  margin-top: -1px;
  border-radius: var(--btn-radius);
  background-color: var(--color-primary);
  display: none;
}

[dir="rtl"] .dropdown-submenu > .dropdown-menu {
  left: auto;
  right: 100%;
}

.dropdown-submenu:hover > .dropdown-menu {
  display: block;
}

/* Completely hide any ::after from dropdowns */
.dropdown-toggle::after {
  content: none !important;
  display: none !important;
}

/* Show custom arrow only on hover/focus in submenu */
.dropdown-submenu:hover > .dropdown-toggle::after,
.dropdown-submenu > .dropdown-toggle:focus::after {
  content: "";
  display: inline-block !important;
  border: solid white;
  border-width: 0 2px 2px 0;
  padding: 3px;
  transform: rotate(45deg);
  margin-inline-start: 0.5rem;
  vertical-align: middle;
}

[dir="rtl"] .dropdown-submenu:hover > .dropdown-toggle::after,
[dir="rtl"] .dropdown-submenu > .dropdown-toggle:focus::after {
  transform: rotate(-135deg);
  margin-inline-end: 0.5rem;
  margin-inline-start: 0;
}

.card {
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background-color: var(--color-background);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  padding: 20px;
  transition: box-shadow var(--transition-speed);
  text-align: right;
}

.card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-body {
  overflow-x: auto;
}

.card .btn-primary {
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.card .btn-primary:hover {
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  border: 1px solid var(--color-border);
  border-radius: 5px;
  padding: 0.6rem 1rem;
  font-family: var(--font-family-base);
  width: 100%;
  transition: border-color var(--transition-speed);
  text-align: right;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--color-secondary);
  outline: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  direction: rtl;
}

th, td {
  border: 1px solid var(--color-border);
  padding: 0.75rem;
  text-align: right;
}

th {
  background-color: var(--color-primary);
  color: white;
}

tr:nth-child(even) {
  background-color: var(--color-muted);
}

.alert {
  padding: 1rem;
  border-radius: 5px;
  margin-bottom: 1rem;
  text-align: right;
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
}

.page-content {
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  text-align: right;
}

.page-content img,
.page-content iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

.btn i {
  margin-inline-end: 0.5rem;
}

.dropdown-item.active,
.dropdown-item:active {
  background-color: var(--color-secondary);
  color: white;
}

.logo-img {
  height: 50px;
  width: auto;
}

.footer {
  background-color: var(--color-primary);
  color: var(--color-secondary);
  padding: 3rem 0;
}

.footer h5 {
  color: var(--color-secondary);
  font-weight: bold;
  font-size: 1.2rem;
}

.footer a,
.footer .list-unstyled li a {
  color: white;
  text-decoration: none;
  transition: color var(--transition-speed);
}

.footer a:hover,
.footer .list-unstyled li a:hover {
  color: var(--color-secondary) !important;
}

.footer .social-icons a {
  color: white;
  font-size: 1.25rem;
  margin-inline-start: 0.75rem;
  transition: color var(--transition-speed);
}

.footer .social-icons a:hover {
  color: var(--color-secondary) !important;
}

.highlight-brand {
  color: var(--color-secondary);
  font-weight: bold;
}

.service-feature {
  transition: all 0.3s ease;
  border: 1px solid var(--color-border);
  border-radius: var(--btn-radius);
  text-align: right;
}

.service-feature:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.icon-lg {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-secondary);
}

.section-divider {
  height: 3px;
  width: 100px;
  background: var(--color-secondary);
  margin: 1.5rem auto;
}

.circle-icon {
  width: 80px;
  height: 80px;
  background-color: var(--color-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.4s ease;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}

.circle-icon:hover {
  transform: rotate(360deg);
}

.material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 48;
}

.material-symbols-outlined.bg-primary,
.fas.bg-primary {
  background-color: var(--color-secondary);
  padding: 0.5rem;
  border-radius: 50%;
  font-size: 1.5rem;
}

#backToTop {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 100px;
  height: 180px;
  cursor: pointer;
  z-index: 9999;
}

#batteryIcon {
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: block;
}

.card.text-center:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease-in-out;
}

.card .card-body i,
.card .card-body svg,
.card .card-body .fa,
.card .card-body .fas,
.card .card-body .material-icons {
  color: var(--color-secondary) !important;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.card .card-body i.fas {
  font-size: 2.5rem !important;
}

iconify-icon {
  color: var(--color-secondary);
}


.contact-form {
  --form-border-color: var(--color-secondary);
  direction: rtl;
}

.contact-form .form-label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
  text-align: right;
}

.contact-form .form-control,
.contact-form .form-select,
.contact-form textarea {
  border: 2px solid var(--form-border-color);
  border-radius: 8px;
  min-height: 46px;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  text-align: right;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form .form-control:focus,
.contact-form .form-select:focus,
.contact-form textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 0.25rem rgba(106, 180, 227, 0.25);
}

.contact-form textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

.contact-form .btn {
  padding: 0.6rem 2rem;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 6px;
}

section.bg-light {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

ul.rtl-list {
  direction: rtl;
  text-align: right;
  padding-right: 1.5rem;
  padding-left: 0;
  list-style-type: disc;
  list-style-position: inside;
}
[dir="rtl"] .contact-info-section,
[dir="rtl"] .map-section {
  background: linear-gradient(to left, #f8f9fa, #ffffff);
  padding: 60px 0;
  border-top: 1px solid #ddd;
  text-align: center;
}

[dir="rtl"] .contact-info-section h2,
[dir="rtl"] .map-section h2 {
  color: var(--color-primary, #414042);
  font-family: 'Cairo', sans-serif;
}

[dir="rtl"] .contact-info-section p,
[dir="rtl"] .map-section p {
  color: #555;
  font-family: 'Cairo', sans-serif;
}

[dir="rtl"] .contact-card {
  background-color: #fff;
  border-radius: 16px;
  padding: 30px 20px;
  text-align: center;
  transition: all 0.3s ease;
  height: 100%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

[dir="rtl"] .contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

[dir="rtl"] .contact-card .icon {
  color: var(--color-secondary, #6ab4e3);
  margin-bottom: 16px;
}

[dir="rtl"] .contact-card i {
  font-size: 2rem;
}

[dir="rtl"] .contact-card h5 {
  color: var(--color-primary, #414042);
  font-size: 1.25rem;
  margin-bottom: 10px;
}

[dir="rtl"] .contact-card p,
[dir="rtl"] .contact-card a {
  color: #555;
  font-size: 0.95rem;
}

[dir="rtl"] .contact-card a:hover {
  color: var(--color-secondary, #6ab4e3);
  text-decoration: underline;
}

[dir="rtl"] .map-section iframe,
[dir="rtl"] .map-section #mapPreview,
[dir="rtl"] .map-section #mapCanvas {
  width: 100%;
  height: 400px;
  border: 0;
  border-radius: 12px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  background-color: #e9ecef;
}
.empty-state .btn-outline-primary {
  border-color: var(--color-primary, #0d6efd) !important;
  color: var(--color-primary, #0d6efd) !important;
  background-color: transparent !important;
  opacity: 1 !important;
  visibility: visible !important;
}

input[type="date"],
input[type="datetime-local"] {
  direction: ltr; /* Ensure proper interaction */
  text-align: right; /* Keeps date readable */
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 1.5rem;
  position: relative;
  background-position: left center;
  background-repeat: no-repeat;
  background-size: 1rem;
}
[dir="rtl"] input[type="date"],
[dir="rtl"] input[type="datetime-local"] {
  direction: ltr;         /* makes calendar work on full input */
  text-align: right;      /* visually right-aligned for RTL */
}

/*video.js - RTL Version*/
/* Make control bar taller */
.video-js .vjs-control-bar {
  height: 48px !important;
  align-items: center !important;
  padding: 0 !important;
  direction: rtl !important;
}

/* Make progress bar fill the control bar */
.video-js .vjs-progress-control {
  flex: 1 !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
}

/* Remove radius and make it full height */
.video-js .vjs-progress-holder {
  height: 100% !important;
  background-color: #e0e0e0 !important;
  border-radius: 0 !important;
}

/* Fill progress with secondary color */
.video-js .vjs-play-progress {
  background-color: var(--color-secondary) !important;
  height: 100% !important;
  border-radius: 0 !important;
  right: auto !important;
  left: 0 !important;
}

/* Hide circular knob */
.video-js .vjs-play-progress::before {
  display: none !important;
}

.video-js .vjs-control:hover {
  color: var(--color-secondary) !important;
}

.video-js {
  width: 100% !important;
  height: 400px !important;
  max-height: 500px;
  margin: 0 auto;
  display: block;
  background-color: #000; /* Black background for letterboxing */
  border-radius: 8px;     /* Rounded corners (optional) */
  overflow: hidden;
  direction: rtl !important;
}

/* Apply object-fit to the <video> element inside */
.video-js video {
  object-fit: cover !important;
  width: 100% !important;
  height: 100% !important;
}

/* Fullscreen mode: ensure cover remains */
.video-js.vjs-fullscreen video {
  object-fit: cover !important;
}

/* RTL specific adjustments for video.js controls */
.video-js.vjs-rtl .vjs-progress-control {
  direction: ltr !important;
}

.video-js.vjs-rtl .vjs-time-tooltip {
  right: auto !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
}

.video-js.vjs-rtl .vjs-mouse-display .vjs-time-tooltip {
  transform: translateX(50%) !important;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-background: #121212;
    --color-text: #f0f0f0;
    --color-border: #444;
    --color-muted: #1e1e1e;
  }
}