/* Language switcher (dropdown, matches Pages submenu) + Urdu/Chinese support */
.lang-switcher {
  position: relative;
  display: inline-block;
  margin-left: 18px;
  margin-right: 0;
  direction: ltr;
  flex-shrink: 0;
  z-index: 20;
  overflow: visible;
}

.lang-switcher .lang-label {
  display: none !important;
}

.lang-switcher-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  border: 1px solid rgba(69, 38, 177, 0.18);
  background: linear-gradient(180deg, #ffffff 0%, #f6f3ff 100%);
  color: #2a2158;
  font-size: 13px;
  font-weight: 600;
  font-family: "Montserrat", "Noto Sans SC", sans-serif;
  line-height: 1;
  padding: 7px 10px 7px 8px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(69, 38, 177, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.lang-switcher-toggle:hover,
.lang-switcher.is-open .lang-switcher-toggle {
  border-color: rgba(69, 38, 177, 0.35);
  color: #4526b1;
  box-shadow: 0 4px 14px rgba(69, 38, 177, 0.14);
}

.lang-switcher-toggle .lang-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 0;
  background: transparent;
  color: #4526b1;
  flex-shrink: 0;
  line-height: 0;
  margin: 0;
  padding: 0;
}

.lang-switcher-toggle .lang-icon svg {
  display: block;
  width: 16px;
  height: 16px;
}

.lang-switcher-toggle .lang-current {
  min-width: 0;
  margin: 0 0 0 6px;
  padding: 0;
  text-align: left;
  display: inline-block;
  height: 16px;
  line-height: 16px;
  font-size: 13px;
  vertical-align: middle;
}

.lang-switcher-toggle .lang-caret {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 16px;
  color: #4526b1;
  transition: transform 0.2s ease;
  margin-left: 6px;
  line-height: 0;
}

.lang-switcher-toggle .lang-caret svg {
  display: block;
}

.lang-switcher.is-open .lang-switcher-toggle .lang-caret,
.lang-switcher:hover .lang-switcher-toggle .lang-caret {
  transform: rotate(180deg);
}

.lang-switcher-menu {
  position: absolute;
  left: 0;
  right: auto;
  top: 100%;
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 100%;
  width: max-content;
  background: #f5f7ff;
  box-shadow: 0 0 6px -3px;
  border: 1px solid #bba7ff;
  border-radius: 0 0 8px 8px;
  transform-origin: 0 0 0;
  transform: scaleY(0);
  transition: all 0.3s ease-in-out;
  z-index: 30;
  overflow: hidden;
}

.lang-switcher:hover .lang-switcher-menu,
.lang-switcher.is-open .lang-switcher-menu {
  transform: scaleY(1);
}

.lang-switcher-menu li {
  padding: 0;
  border-bottom: 1px solid #ccbdff;
}

.lang-switcher-menu li:last-child {
  border-bottom: none;
}

.lang-switcher-menu button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  font-weight: 500;
  font-size: 15px;
  font-family: "Montserrat", "Noto Sans SC", "Noto Nastaliq Urdu", sans-serif;
  color: #1c1c1c;
  padding: 14px 20px;
  cursor: pointer;
  direction: ltr;
}

.lang-switcher-menu button:hover,
.lang-switcher-menu button.is-active {
  background: #4526b1;
  color: #fff;
}

.lang-switcher-menu li:last-child button:hover,
.lang-switcher-menu li:last-child button.is-active {
  border-radius: 0 0 8px 8px;
}

/* Keep header structure identical to English */
html.lang-ur body {
  font-family: "Noto Nastaliq Urdu", "Jameel Noori Nastaleeq", "Segoe UI", Tahoma, sans-serif;
}

html.lang-ur .header-wrap,
html.lang-ur .header-wrap .navbar-collapse,
html.lang-ur .header-wrap .navbar-nav,
html.lang-ur .header-wrap .conInfo,
html.lang-ur .header-wrap .phonewrp {
  direction: ltr !important;
}

/* Longer Urdu nav labels: keep header from overflowing */
html.lang-ur .header-wrap .navbar-nav .nav-link {
  padding-left: 10px;
  padding-right: 10px;
  font-size: 14px;
}

html.lang-ur .header-wrap .phonewrp,
html.lang-ur .header-wrap .phonewrp a,
html.lang-ur footer .phonewrp,
html.lang-ur footer .phonewrp a {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}

/* Content readability for Urdu (do not flip whole page columns) */
html.lang-ur .banner_text,
html.lang-ur .slider_info,
html.lang-ur .about_info,
html.lang-ur .inner_banner .title,
html.lang-ur .sec-title:not(.text-center):not(.title_center),
html.lang-ur .footer-widget p,
html.lang-ur .quick-links,
html.lang-ur form label,
html.lang-ur .contact-info,
html.lang-ur .conInfo:not(.phonewrp) {
  unicode-bidi: plaintext;
}

html.lang-ur .banner_text p,
html.lang-ur .slider_info p,
html.lang-ur .about_info p {
  direction: rtl;
  text-align: left; /* keep same column edge as English */
  unicode-bidi: plaintext;
}

html.lang-ur .title_center,
html.lang-ur .text-center,
html.lang-ur .serviceWrp,
html.lang-ur .service_box,
html.lang-ur .default-service {
  text-align: center;
}

html.lang-ur .serviceWrp p,
html.lang-ur .service_box p,
html.lang-ur .default-service p {
  direction: rtl;
  text-align: center;
  unicode-bidi: plaintext;
}

html.lang-ur .readmore a,
html.lang-ur .readmore_btn a {
  display: inline-block;
}

/* Chinese */
html.lang-zh body {
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

html.lang-zh .header-wrap .navbar-nav .nav-link {
  font-size: 14px;
}

/* Portfolio / wide sections: .pd-50 uses 160px side padding (breaks mobile) */
@media (max-width: 1399px) {
  .pd-50 {
    padding-left: 60px;
    padding-right: 60px;
  }
}

@media (max-width: 1199px) {
  .pd-50 {
    padding-left: 36px;
    padding-right: 36px;
  }
}

@media (max-width: 991px) {
  .pd-50 {
    padding-left: 16px;
    padding-right: 16px;
  }

  .lang-switcher {
    display: block;
    margin: 12px 0 0;
    width: 100%;
  }

  .lang-switcher-toggle {
    width: 100%;
    justify-content: flex-start;
    padding: 10px 16px;
    border: 0;
    border-radius: 0;
    background: #6442db;
    color: #fff;
    box-shadow: none;
  }

  .lang-switcher-toggle:hover,
  .lang-switcher.is-open .lang-switcher-toggle {
    background: #6442db;
    color: #fff;
    border-color: transparent;
    box-shadow: none;
  }

  .lang-switcher-toggle .lang-icon {
    background: transparent;
    color: #fff;
  }

  .lang-switcher-toggle .lang-caret {
    margin-left: auto;
    color: #fff;
  }

  .lang-switcher-toggle .lang-current {
    flex: 1;
  }

  .lang-switcher-menu {
    position: static;
    width: 100%;
    min-width: 0;
    transform: none;
    display: none;
    border-radius: 8px;
    margin-top: 4px;
  }

  .lang-switcher.is-open .lang-switcher-menu {
    display: block;
  }

  .lang-switcher:hover .lang-switcher-menu {
    display: none;
  }

  .lang-switcher.is-open:hover .lang-switcher-menu {
    display: block;
  }

  .lang-switcher-menu li:last-child button:hover,
  .lang-switcher-menu li:last-child button.is-active {
    border-radius: 0 0 8px 8px;
  }
}

/* Local company promo video popup */
.company-promo-popup {
  position: relative;
  width: min(960px, 92vw);
  margin: 0 auto;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.company-promo-popup video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 80vh;
  background: #000;
}

.mfp-fade.mfp-bg {
  opacity: 0;
  transition: opacity 0.2s ease-out;
}

.mfp-fade.mfp-bg.mfp-ready {
  opacity: 0.8;
}

.mfp-fade.mfp-bg.mfp-removing {
  opacity: 0;
}
