/* =====================================================
   Internationalisation (i18n) — language switcher + RTL
   Loaded on every page after style.css.
   ===================================================== */

/* ---------- Language switcher ---------- */
.apg-lang-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin-right: 10px;
}
.apg-lang-current {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: 1px solid var(--borders-color, #e8e8e8);
  border-radius: 6px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  color: var(--title-color, #020202);
  transition: color .25s ease, border-color .25s ease;
}
.apg-lang-current:hover {
  border-color: var(--primary-color2, #3655ff);
  color: var(--primary-color2, #3655ff);
}
.apg-lang-current .bi-caret-down-fill {
  font-size: 10px;
  transition: transform .25s ease;
}
.apg-lang-switcher.open .apg-lang-current .bi-caret-down-fill {
  transform: rotate(180deg);
}

.apg-lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1000;
  min-width: 210px;
  max-height: 65vh;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--white-color, #fff);
  border: 1px solid var(--borders-color, #e8e8e8);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.apg-lang-switcher.open .apg-lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.apg-lang-menu li {
  margin: 0;
}
.apg-lang-menu li a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 7px;
  text-decoration: none;
  color: var(--title-color, #020202);
  transition: background .2s ease;
}
.apg-lang-menu li a:hover {
  background: rgba(54, 85, 255, 0.07);
}
.apg-lang-menu li.active a {
  background: rgba(54, 85, 255, 0.12);
}
.apg-lang-menu .native {
  font-weight: 600;
  font-size: 14px;
}
.apg-lang-menu .name {
  font-size: 12px;
  color: var(--text-color, #525252);
}

/* ---------- Login switcher ---------- */
.apg-login-switcher {
  position: relative;
}
.apg-login-current {
  cursor: pointer;
  background: transparent;
  padding: 0;
}
.apg-login-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1000;
  min-width: 220px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--white-color, #fff);
  border: 1px solid var(--borders-color, #e8e8e8);
  border-radius: 10px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}
.apg-login-switcher.open .apg-login-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.apg-login-menu li {
  margin: 0;
}
.apg-login-menu li a {
  display: block;
  padding: 10px 12px;
  border-radius: 7px;
  text-decoration: none;
  color: var(--title-color, #020202);
  font-size: 14px;
  font-weight: 600;
  transition: background .2s ease, color .2s ease;
}
.apg-login-menu li a:hover {
  background: rgba(54, 85, 255, 0.07);
  color: var(--primary-color2, #3655ff);
}

/* On narrower screens show the globe only, hide the language label */
@media (max-width: 1199px) {
  .apg-lang-current .apg-lang-label {
    display: none;
  }
  .apg-lang-current {
    padding: 8px 10px;
  }
}

/* ---------- Arabic right-to-left ---------- */
html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}
html[dir="rtl"] .apg-lang-switcher {
  margin-right: 0;
  margin-left: 10px;
}
html[dir="rtl"] .apg-lang-menu {
  right: auto;
  left: 0;
}
html[dir="rtl"] .apg-login-menu {
  right: auto;
  left: 0;
}
html[dir="rtl"] .menu-list,
html[dir="rtl"] .sub-menu,
html[dir="rtl"] .widget-list,
html[dir="rtl"] .social-list,
html[dir="rtl"] .breadcrumb-list,
html[dir="rtl"] .mail-and-call {
  padding-right: 0;
  padding-left: 0;
}
/* Flip the split-map divider for RTL */
html[dir="rtl"] .contact-map-section .contact-map-label {
  left: auto;
  right: 24px;
}
html[dir="rtl"] .contact-map-section .contact-map-col:first-child {
  border-right: 0;
  border-left: 4px solid var(--primary-color1, #fac12e);
}
