/* Bilingual Support - Arabic Primary, English Secondary */

/* Language toggle button */
.lang-toggle {
  background: var(--accent-color);
  color: var(--contrast-color);
  border: 2px solid var(--accent-color);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: var(--nav-font);
  margin-left: 12px;
  white-space: nowrap;
}

.lang-toggle:hover {
  background: transparent;
  color: var(--accent-color);
}

/* Language visibility */
body.lang-ar .lang-en {
  display: none !important;
}

body.lang-en .lang-ar {
  display: none !important;
}

/* Inline elements need inline display */
span.lang-ar,
span.lang-en {
  display: inline;
}

/* RTL Support for Arabic */
body.lang-ar {
  direction: rtl;
  text-align: right;
}

body.lang-en {
  direction: ltr;
  text-align: left;
}

/* RTL adjustments */
body.lang-ar .navmenu ul {
  direction: rtl;
}

body.lang-ar .navmenu .dropdown .dropdown > a .toggle-dropdown {
  transform: scaleX(-1);
}

body.lang-ar .hero-content {
  text-align: right;
}

body.lang-ar .about .content {
  text-align: right;
}

body.lang-ar .section-title {
  text-align: center;
}

body.lang-ar .footer-contact {
  text-align: right !important;
}

body.lang-ar .copyright {
  text-align: center;
}

body.lang-ar .form-wrapper .form-header {
  text-align: right;
}

body.lang-ar .detail-item {
  direction: rtl;
}

body.lang-ar .info-item {
  direction: rtl;
}

/* Arabic font support */
body.lang-ar h1,
body.lang-ar h2,
body.lang-ar h3,
body.lang-ar h4,
body.lang-ar h5,
body.lang-ar h6 {
  font-family: "Cairo", "Tajawal", sans-serif;
}

body.lang-ar p,
body.lang-ar span,
body.lang-ar a,
body.lang-ar li,
body.lang-ar label,
body.lang-ar input,
body.lang-ar textarea,
body.lang-ar button {
  font-family: "Cairo", "Tajawal", sans-serif;
}

body.lang-ar .navmenu a {
  font-family: "Cairo", "Tajawal", sans-serif;
}

body.lang-ar .hero-stats .stat-label,
body.lang-ar .stats-row .stat-label {
  font-family: "Cairo", "Tajawal", sans-serif;
}

/* RTL flex adjustments */
body.lang-ar .d-flex {
  direction: rtl;
}

body.lang-ar .hero .row,
body.lang-ar .about .row,
body.lang-ar .why-us .row {
  direction: rtl;
}

body.lang-ar .contact .row {
  direction: rtl;
}

body.lang-ar .footer-top .row {
  direction: rtl;
}

body.lang-ar .features-grid .row {
  direction: rtl;
}

/* RTL icon adjustments */
body.lang-ar .service-link i,
body.lang-ar .primary-action i,
body.lang-ar .submit-btn i {
  transform: scaleX(-1);
}

/* Journey detail cards - border direction */
body.lang-en [style*="border-right"] {
  border-right: none !important;
  border-left: 4px solid var(--accent-color) !important;
}

body.lang-ar .bi-arrow-right::before {
  content: "\f12f";
}

body.lang-en .bi-arrow-left::before {
  content: "\f12f";
}

/* Service link position */
body.lang-ar .services .service-item .service-link {
  align-self: flex-end;
}

body.lang-en .services .service-item .service-link {
  align-self: flex-end;
}

body.lang-en .services .service-item .service-link i {
  order: -1;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  body.lang-ar .hero-content {
    text-align: center;
  }

  body.lang-ar .about .content {
    text-align: center;
  }

  body.lang-ar .footer-contact {
    text-align: center !important;
  }
}

/* ==========================================
   Branch Gallery Cards
   ========================================== */
.branch-card {
  display: block;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
  aspect-ratio: 4/3;
}

.branch-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.branch-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.branch-card:hover img {
  transform: scale(1.1);
}

.branch-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 22, 137, 0.9));
  padding: 60px 20px 20px;
  opacity: 0;
  transition: all 0.4s ease;
}

.branch-card:hover .branch-overlay {
  opacity: 1;
}

.branch-info h4 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 4px;
  font-family: "Cairo", "Montserrat", sans-serif;
}

.branch-info p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.branch-map-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-color);
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.3s;
}

.branch-card:hover .branch-map-link {
  color: #fff;
}

.branch-map-link i {
  font-size: 1rem;
}

/* Always show overlay on touch devices */
@media (hover: none) {
  .branch-overlay {
    opacity: 1;
  }
}

/* RTL branch card */
body.lang-ar .branch-info h4 {
  font-family: "Cairo", sans-serif;
  text-align: right;
}

body.lang-ar .branch-info p {
  text-align: right;
}

body.lang-ar .branch-map-link {
  direction: rtl;
}

/* ==========================================
   Service Icons - Color Scheme
   ========================================== */
a.service-item {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}
.services .service-item .icon-wrapper {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-color), color-mix(in srgb, var(--accent-color), var(--heading-color) 20%));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  transition: all 0.4s ease-in-out;
}

.services .service-item .icon-wrapper i {
  font-size: 28px;
  color: var(--contrast-color);
}

.services .service-item:hover .icon-wrapper {
  background: linear-gradient(135deg, var(--heading-color), color-mix(in srgb, var(--heading-color), var(--accent-color) 30%));
  transform: scale(1.1) rotate(5deg);
}

body.lang-en .services .service-item:hover .icon-wrapper {
  transform: scale(1.1) rotate(-5deg);
}

.services .service-item:hover .icon-wrapper i {
  color: var(--contrast-color);
}

.services .service-item .service-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  margin-bottom: 28px;
  padding-top: 18px;
  border-top: 1px solid color-mix(in srgb, var(--default-color), transparent 88%);
}

.services .service-item .service-contact .contact-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: color-mix(in srgb, var(--default-color), transparent 25%);
}

.services .service-item .service-contact .contact-line i {
  color: var(--accent-color);
  font-size: 15px;
}

.services .service-item .service-contact .contact-line span {
  font-weight: 600;
  color: var(--heading-color);
}

/* Values section icons */
.why-us .icon-wrapper {
  background-color: color-mix(in srgb, var(--accent-color), transparent 85%);
  color: var(--accent-color);
}

.why-us .feature-item:hover .icon-wrapper {
  background-color: var(--accent-color);
  color: var(--contrast-color);
}

/* Journey section icons */
#journey .service-item .icon-wrapper {
  background: linear-gradient(135deg, var(--heading-color), color-mix(in srgb, var(--heading-color), var(--accent-color) 20%));
}

#journey .service-item .icon-wrapper i {
  color: var(--contrast-color);
}

#journey .service-item:hover .icon-wrapper {
  background: linear-gradient(135deg, var(--accent-color), color-mix(in srgb, var(--accent-color), var(--heading-color) 30%));
}

/* ==========================================
   Photo Gallery Cards
   ========================================== */
.gallery-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-card:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 22, 137, 0.7), rgba(193, 172, 123, 0.7));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.4s ease;
}

.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay i {
  font-size: 2.5rem;
  color: #fff;
  transform: scale(0.5);
  transition: transform 0.4s ease;
}

.gallery-card:hover .gallery-overlay i {
  transform: scale(1);
}

/* Always show overlay on touch devices */
@media (hover: none) {
  .gallery-overlay {
    opacity: 1;
  }
  .gallery-overlay i {
    transform: scale(1);
  }
}

/* ==============================
   Service Detail Pages
   ============================== */
.service-hero .section-title h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.service-hero .section-title p {
  font-size: 1.1rem;
  line-height: 1.8;
}

.service-features .bi-check-circle-fill {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.service-hero-icon {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* ==============================
   Partners Section
   ============================== */
.partners-section {
  padding: 60px 0;
  background: #fff;
  overflow: hidden;
}

.partners-track-wrapper {
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.partners-track {
  display: flex;
  gap: 60px;
  align-items: center;
  width: max-content;
  animation: scrollPartners 30s linear infinite;
}
body.lang-ar .partners-track {
  display: flex;
  gap: 60px;
  align-items: center;
  width: max-content;
  animation:  scrollPartners-arabic 30s linear infinite;
  animation-direction: reverse;
}

.partners-track:hover {
  animation-play-state: paused;
}

@keyframes scrollPartners {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes scrollPartners-arabic {
  0% { transform: translateX(0); }
  100% { transform: translateX(50%); }
}

.partner-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 80px;
  filter: grayscale(100%);
  opacity: 0.5;
  transition: all 0.4s ease;
}

.partner-item:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.05);
}

.partner-item img {
  max-height: 70px;
  max-width: 160px;
  object-fit: contain;
  white-space: nowrap;
}
