/* DaiTeck - language switcher (navbar) and left-to-right (English) adjustments.
   Persian is the original design and is not touched by anything here:
   every direction rule below only applies when <html dir="ltr">. */

/* ---------- language button + menu ---------- */
.lang-switch { position: relative; }

.lang-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  z-index: 1100;
  min-width: 156px;
  margin: 0;
  padding: 6px;
  list-style: none;
  direction: ltr;
  transform: translateX(-50%);
  border: 1px solid rgba(75, 169, 255, .27);
  border-radius: 12px;
  background: rgba(5, 18, 37, .97);
  box-shadow: 0 18px 38px rgba(0, 0, 0, .35);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  animation: lang-pop .16s ease;
}
.lang-menu[hidden] { display: none; }
@keyframes lang-pop {
  from { opacity: 0; transform: translate(-50%, -6px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}
.lang-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 12px;
  color: #d1dced;
  font-size: 17px;
  line-height: 1.4;
  text-align: start;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}
.lang-menu button[lang="fa"],
.lang-menu button[lang="ps"] { direction: rtl; }
.lang-menu button[lang="en"] { direction: ltr; font-family: Arial, sans-serif; font-size: 15px; }
.lang-menu button:hover,
.lang-menu button:focus-visible { color: var(--cyan); background: rgba(75, 169, 255, .1); outline: none; }
.lang-menu button i { font-style: normal; font-size: 14px; color: var(--cyan); opacity: 0; }
.lang-menu button.is-current { color: var(--cyan); font-weight: bold; }
.lang-menu button.is-current i { opacity: 1; }

[data-theme="light"] .lang-menu {
  background: rgba(255, 255, 255, .97);
  border-color: rgba(11, 111, 214, .22);
  box-shadow: 0 18px 38px rgba(20, 50, 90, .18);
}
[data-theme="light"] .lang-menu button { color: #2b3f5c; }
[data-theme="light"] .lang-menu button:hover,
[data-theme="light"] .lang-menu button:focus-visible { background: rgba(11, 111, 214, .08); }
[data-theme="light"] .lang-menu button:hover,
[data-theme="light"] .lang-menu button.is-current { color: var(--cyan); }

@media (prefers-reduced-motion: reduce) { .lang-menu { animation: none; } }

/* ============================================================
   English (left-to-right)
   The navbar keeps exactly the same arrangement (brand on the
   left, button on the right); the text and sections flip.
   ============================================================ */
html[dir="ltr"] body { font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; line-height: 1.75; }
html[dir="ltr"] .dt-footer,
html[dir="ltr"] .dt-contact,
html[dir="ltr"] .dt-portfolio,
html[dir="ltr"] .dtx-services,
html[dir="ltr"] .dt-team,
html[dir="ltr"] .dt-about { font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }

html[dir="ltr"] .header-inner { direction: ltr; flex-direction: row-reverse; }
html[dir="ltr"] .search-panel { direction: ltr; }
html[dir="ltr"] .nav-link { font-size: 17px; }
html[dir="ltr"] .nav-link::after { right: auto; left: 0; }
html[dir="ltr"] .btn { font-size: 16px; }

/* page sections that were fixed to rtl */
html[dir="ltr"] .dtx-services,
html[dir="ltr"] .dt-portfolio .dt-container,
html[dir="ltr"] .dt-contact .dc-info-content,
html[dir="ltr"] .dt-contact,
html[dir="ltr"] .dt-about { direction: ltr; }

/* small decorations that sit on a physical side */
html[dir="ltr"] .dt-portfolio .dt-number { right: auto; left: 13px; }
html[dir="ltr"] .dt-portfolio .dt-button:hover .dt-arrow { transform: translateX(3px); }
html[dir="ltr"] .dtx-card:hover .dtx-link svg,
html[dir="ltr"] .dtx-link:hover svg { transform: translateX(3px) rotate(180deg); }
html[dir="ltr"] .dtx-link svg { transform: rotate(180deg); }
html[dir="ltr"] .dt-about .da-network-note { border-right: 0; border-left: 3px solid var(--da-cyan); }
html[dir="ltr"] .dt-footer-glow { right: auto; left: 10%; }
html[dir="ltr"] .dt-footer-column li a { padding-right: 0; }

/* the three small team helper lines read better left aligned in English */
html[dir="ltr"] .dt-bio,
html[dir="ltr"] .dt-value { text-align: left; }

/* headings were tuned for Persian line height; English reads better a little tighter */
html[dir="ltr"] .hero h1 { line-height: 1.3; }
html[dir="ltr"] .dtx-heading h2,
html[dir="ltr"] .dt-heading h2,
html[dir="ltr"] .dc-heading h2,
html[dir="ltr"] .da-heading h2,
html[dir="ltr"] .dt-hero h1 { line-height: 1.3; }
