/**
 * mobile.css — ປັບສະເພາະໂທລະສັບ (ໂຫຼດຫຼັງສຸດໃນ layouts/header.php, ຫຼັງ CSS ສະເພາະໜ້າ):
 *   1) ໜ້າຢູ່ນິ່ງ: ບໍ່ເລື່ອນອອກຂ້າງ (ບໍ່ "ແຕກອອກ"), ບໍ່ຊູມ (ແຕະສອງເທື່ອ / ກົດຊ່ອງພິມ iOS)
 *   2) ເມນູ ☰ ເລື່ອນລົງແບບສະໂລ (ແທນການໂຜ່ຂຶ້ນທັນທີ)
 *   3) ກາດ "ເປັນຫຍັງຕ້ອງເລືອກ" ບໍ່ບິນເຂົ້າຈາກຊ້າຍ/ຂວາ — ສະແດງຢູ່ນິ່ງໆ
 *   4) "ພ້ອມບໍລິການ 24 ຊົ່ວໂມງ" ບໍ່ລົງແຖວ + ຫົວຂໍ້ບໍລິການຈັດແຖວໃໝ່
 *   5) ກາດທັງໝົດ ມຸມ 4px
 */
@media (max-width: 767.98px) {
  /* 1) ໜ້າຢູ່ນິ່ງ */
  /* ບໍ່ໃສ່ overflow-x / max-width ໃສ່ html/body ເພື່ອບໍ່ໃຫ້ iOS WebKit ເຮັດ sticky ພາດ ແລະ ມີພື້ນຂາວລຸ່ມ footer */
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { touch-action: manipulation; }   /* ບໍ່ຊູມເມື່ອແຕະສອງເທື່ອ */
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea { font-size: 16px !important; }   /* iOS ບໍ່ຊູມຕອນກົດຊ່ອງພິມ */

  /* 2) ເມນູ ☰: ເລື່ອນລົງຈາກໃຕ້ແຖບເທິງ */
  .site-nav {
    display: flex !important;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    clip-path: inset(0 0 100% 0);
    pointer-events: none;
    transition: clip-path .32s ease, opacity .25s ease, transform .32s ease, visibility 0s linear .32s;
  }
  .site-nav.open {
    visibility: visible;
    opacity: 1;
    transform: none;
    clip-path: inset(0 0 0 0);
    pointer-events: auto;
    transition: clip-path .32s ease, opacity .25s ease, transform .32s ease, visibility 0s;
  }
  .site-nav .nav-link { padding: .8rem .4rem; border-bottom: 1px solid #f1f5f9; }
  .site-nav .nav-link:last-child { border-bottom: 0; }

  /* ເມື່ອເມນູ ☰ ເປີດຢູ່: ເຊື່ອງປຸ່ມແຊັດລອຍ ບໍ່ໃຫ້ຊ້ອນ ຫຼື ບັງເມນູ */
  body.nav-open .fc-widget {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: scale(0.8) !important;
    transition: opacity 0.22s ease, transform 0.22s ease;
  }

  /* 3) ກາດ "ເປັນຫຍັງຕ້ອງເລືອກ" ແລະ ເອັບເຟັກລອຍຂຶ້ນ: ຢູ່ນິ່ງ */
  .home-why-grid .abt-why-item,
  .home-why-grid .abt-why-item.is-in,
  [data-reveal], [data-reveal]:not(.is-in) {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
    will-change: auto;
  }

  /* 4) ຫົວຂໍ້ບໍລິການ: ປ້າຍບໍ່ລົງແຖວ, ຫົວຂໍ້ເຕັມແຖວ, ລູກສອນ + "ເບິ່ງທັງໝົດ" ແຖວລຸ່ມ */
  .srv-live-pill { white-space: nowrap; }
  .srv-section-head { flex-direction: column; align-items: stretch; gap: .8rem; }
  .srv-head-nav { justify-content: space-between; width: 100%; }
  .srv-head-nav a { white-space: nowrap; }

  /* 5) ກາດ: ມຸມ 4px */
  .card, .srv-card, .bs-card, .solution-tile, .solutions-card, .wk-card, .portfolio-card, .sysp-card,
  .abt-why-item, .stack-hub-item, .ap-card, .ap-hist, .ot-table tr, .mo-box, .mf-card, .eq-banner {
    border-radius: 4px !important;
  }
}

/* ---------- popup ລົງທະບຽນ / ເຂົ້າສູ່ລະບົບ (components/member_modal.php) ໃນໂທລະສັບ ----------
   ເຕັມຈໍ (ເຫັນຟອມຄົບ ເລື່ອນໄດ້ບ່ອນດຽວ), ແຖບເທິງ: × ຊ້າຍ | ທຸງພາສາ ຂວາ — ບໍ່ທັບກັນ ແລະ ບໍ່ທັບໂລໂກ້; ເຄົາລົບຕິ່ງ/ແຖບລຸ່ມຂອງ iPhone */
@media (max-width: 767.98px) {
  .mm { padding: 0; place-items: stretch; }
  .mm-dialog { width: 100%; height: 100%; height: 100dvh; max-height: none; border-radius: 0; box-shadow: none; transform: none !important; }
  .mm-form-side {
    justify-content: flex-start;
    padding: calc(env(safe-area-inset-top, 0px) + 4rem) 1.2rem calc(env(safe-area-inset-bottom, 0px) + 1.4rem);
    -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  }
  .mm-x { position: absolute; top: calc(env(safe-area-inset-top, 0px) + .75rem); left: .9rem; right: auto; z-index: 40; width: 40px; height: 40px; }
  .mm-lang-corner { top: calc(env(safe-area-inset-top, 0px) + .75rem); right: .9rem; }
  .mm-brand-top { margin-bottom: 1.3rem; }
}

/* ---------- ຈໍຂະໜາດກາງ (768–1180px, ແທັບເລັດ / ແລັບທັອບນ້ອຍ): ເມນູ 7 ລາຍການບໍ່ພໍແຖວດຽວ
   (ປຸ່ມ ລົງທະບຽນ / ເຂົ້າສູ່ລະບົບ ຕົກຈໍ) → ຫຍໍ້ເປັນປຸ່ມ ☰ ເລື່ອນລົງ ຄືກັບໂທລະສັບ ---------- */
@media (min-width: 768px) and (max-width: 1180px) {
  .nav-toggle { display: block; }
  .nav-actions { margin-left: auto; }
  .site-nav {
    display: flex !important; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; padding: .75rem 1.5rem 1rem;
    background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
    visibility: hidden; opacity: 0; transform: translateY(-10px); clip-path: inset(0 0 100% 0); pointer-events: none;
    transition: clip-path .32s ease, opacity .25s ease, transform .32s ease, visibility 0s linear .32s;
  }
  .site-nav.open {
    visibility: visible; opacity: 1; transform: none; clip-path: inset(0 0 0 0); pointer-events: auto;
    transition: clip-path .32s ease, opacity .25s ease, transform .32s ease, visibility 0s;
  }
  .site-nav .nav-link { padding: .8rem .5rem; border-bottom: 1px solid #f1f5f9; }
  .site-nav .nav-link:last-child { border-bottom: 0; }

  body.nav-open .fc-widget {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: scale(0.8) !important;
    transition: opacity 0.22s ease, transform 0.22s ease;
  }
}

/* ---------- ເມນູ ☰ = Drawer ເລື່ອນອອກຈາກຊ້າຍ (ຈໍ ≤ 1180px) — ປຸ່ມ ☰ ຢູ່ຊ້າຍມື ຕໍ່ດ້ວຍໂລໂກ້; ທັບກົດເລື່ອນລົງເກົ່າຂ້າງເທິງ ---------- */
@media (max-width: 1180px) {
  .header-inner { gap: .85rem; }
  .nav-toggle { flex-shrink: 0; margin-left: -.5rem; }
  .site-header .site-nav {
    position: fixed !important; top: 0 !important; left: 0 !important; right: auto !important; bottom: 0 !important; z-index: 1200;
    width: min(320px, 86vw); height: 100vh; height: 100dvh; padding: 0 0 calc(1rem + env(safe-area-inset-bottom)) !important;
    display: flex !important; flex-direction: column; align-items: stretch; overflow-y: auto; overscroll-behavior: contain;
    background: #fff; border: 0 !important; box-shadow: 18px 0 40px rgba(15, 23, 42, .22) !important;
    clip-path: none !important; opacity: 1 !important; visibility: hidden; pointer-events: none;
    transform: translateX(-105%) !important; transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .3s !important;
  }
  .site-header .site-nav.open { visibility: visible; pointer-events: auto; transform: none !important; transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility 0s !important; }
  .nav-drawer-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
    padding: .85rem 1rem; border-bottom: 1px solid #eef2f7; background: #fff; }
  .nav-drawer-brand { display: inline-flex; align-items: center; gap: .55rem; color: #0f172a; }
  .nav-drawer-brand img { width: 54px; height: 36px; object-fit: contain; }
  .nav-drawer-brand b { font-size: 1.1rem; font-weight: 800; }
  .nav-drawer-x { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 8px; background: #f1f5f9; color: #334155; font-size: 1.6rem; line-height: 1; cursor: pointer; }
  .nav-drawer-x:hover { background: #e2e8f0; }
  .site-header .site-nav .nav-link { margin: 0 .75rem; padding: .9rem .75rem; border-bottom: 1px solid #f1f5f9; border-radius: 0; font-weight: 600; }
  .site-header .site-nav .nav-link.active { margin-top: .35rem; border-bottom-color: transparent; border-radius: 8px; background: #eff6ff; color: #1d4ed8; }
  .site-header .site-nav .nav-link:first-of-type { margin-top: .5rem; }
  /* ພື້ນມືດທາງຫຼັງ Drawer (ກົດ = ປິດ — main.js ຄຣິກຂ້າງນອກ): ວາງເປັນ ::after ຂອງ .site-header (z-index 1190)
     ເພື່ອຢູ່ໃນ stacking context ດຽວກັນກັບ .site-nav (z-index 1200) → ບໍ່ມີທາງທັບ ຫຼື ບັງກົດເມນູໃນທຸກໜ້າ (ລວມທັງຫ້ອງແຊັດ) */
  .site-header::after { content: ''; position: fixed; inset: 0; z-index: 1190; background: rgba(15, 23, 42, .45); opacity: 0; pointer-events: none; transition: opacity .3s ease; }
  body.nav-open .site-header::after { opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }
}
@media (max-width: 480px) {
  .header-inner { gap: .55rem; }
}
@media (max-width: 1180px) and (prefers-reduced-motion: reduce) { .site-header .site-nav, .site-header .site-nav.open, .site-header::after { transition: none !important; } }

/* ---------- ກ່ຽວກັບພວກເຮົາ (ມືຖື): ພື້ນເຫຼືອງຢຸດທີ່ເຄິ່ງກາງແບນເນີ — ລຸ່ມນັ້ນເປັນສີຂາວ (ກາດຂໍ້ຄວາມບໍ່ຢູ່ເທິງພື້ນເຫຼືອງ) ---------- */
@media (max-width: 860px) {
  .abt3::before { background: linear-gradient(180deg, transparent 0, transparent calc(1.2rem + (100vw - 2rem) / 6), #fff calc(1.2rem + (100vw - 2rem) / 6)) !important; }
}
/* backdrop-filter ຂອງແຖບເທິງ ເຮັດໃຫ້ Drawer (position: fixed) ຕິດຢູ່ໃນແຖບ → ປິດໃນຈໍນ້ອຍ; ເປີດເມນູ = ແຖບເທິງຢູ່ເໜືອທຸກຢ່າງ */
@media (max-width: 1180px) {
  .site-header { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; background: #fff; transition: z-index 0s linear .6s; }
  body.nav-open .site-header { z-index: 1195 !important; transition: none; }
}
/* Drawer: ຫົວຂໍ້ "ເມນູ" (ໂລໂກ້ບໍ່ຊ້ຳ) */
.nav-drawer-title { font-size: 1.1rem; font-weight: 800; color: #0f172a; }

/* ກ່ຽວກັບພວກເຮົາ (ມືຖື): ພື້ນເຫຼືອງ ຄ່ອຍໆຈາງເປັນຂາວ (ເລີ່ມຈາງເທິງແບນເນີ, ຂາວໝົດທີ່ເຄິ່ງກາງແບນເນີ) — ແທນເສັ້ນຕັດສີ */
@media (max-width: 860px) {
  .abt3::before { background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, 0) .4rem,
      rgba(255, 255, 255, .55) calc(1.2rem + (100vw - 2rem) / 10), #fff calc(1.2rem + (100vw - 2rem) / 5.2)) !important; }
}
/* ແບນເນີໜ້າກ່ຽວກັບພວກເຮົາ: ມຸມ 4px (ທຸກຂະໜາດຈໍ) */
.abt3-frame, .abt3-frame img { border-radius: 4px !important; }

/* ແບນເນີເຕັມຈໍໃນໂທລະສັບ (ຂອບຊ້າຍ-ຂວາຊິດຈໍ ບໍ່ມີກອບ): ກ່ຽວກັບພວກເຮົາ + ອຸປະກອນ POS */
@media (max-width: 860px) {
  .abt3 { padding-top: 0 !important; }
  .abt3-frame { width: 100vw !important; max-width: none !important; margin: 0 calc(50% - 50vw) !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
  .abt3-frame img { width: 100%; border-radius: 0 !important; }
  .eqh-media { width: 100vw; max-width: none; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
  .eqh-banwrap, .eqh-banwrap .eqh-banimg { border-radius: 0 !important; border: 0 !important; transform: none !important; box-shadow: none !important; }
  .eqh-banwrap .eqh-banimg { -webkit-box-reflect: unset; width: 100%; }
}
/* ກ່ຽວກັບພວກເຮົາ → ບັດບໍລິການ (components/about_services.php): ປຸ່ມຊິດຂວາໃນໂທລະສັບ */
@media (max-width: 767.98px) { .abs-btn { align-self: flex-end; } }
/* ບໍລິການ → ລະບົບ POS ໃນມືຖື (pages/services.php .svp-app-btns): ໂທລະສັບ = ປຸ່ມລຽງນອນແຖວດຽວ, "ຂໍທົດລອງໃຊ້ຟຣີ" ແລະ WhatsApp ຂະໜາດເທົ່າກັນ */
@media (max-width: 860px) {
  .svp-app-btns { flex-direction: row !important; flex-wrap: nowrap; gap: .6rem; width: 100%; }
  .svp-app-btns .btn { flex: 1 1 0; min-width: 0 !important; height: 48px !important; padding: 0 .75rem; font-size: .95rem; font-weight: 700; }
}
/* ກ່ຽວກັບພວກເຮົາ (ໂທລະສັບ): ສີຂາວພົ່ນທັບລຸ່ມແບນເນີ — ຈາງເຂົ້າພື້ນຂາວລຸ່ມ */
@media (max-width: 860px) {
  .abt3-frame { position: relative; }
  .abt3-frame::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 42%; z-index: 2; pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, .55) 55%, #fff 100%); }
}
/* Drawer ເມນູ ☰: ເລື່ອນອອກຊ້າລົງ (0.6 ວິ, ຄ່ອຍໆຊ້າລົງຕອນທ້າຍ) */
@media (max-width: 1180px) {
  .site-header .site-nav { transition: transform .6s cubic-bezier(.22, .61, .36, 1), visibility 0s linear .6s !important; }
  .site-header .site-nav.open { transition: transform .6s cubic-bezier(.22, .61, .36, 1), visibility 0s !important; }
  .site-header::after { transition: opacity .6s ease; }
}

/* ໜ້າຫຼັກ ບໍລິການ (ກາດຂະຫຍາຍ): ໂທລະສັບ — ເລື່ອນຂ້າງ, ກາດກາງຈໍສະແດງໜັງສື ລອຍຂຶ້ນທີລະແຖວ ແລ້ວລອຍເບົາໆ */
@media (max-width: 992px) {
  .srv-slide-col { transition: flex-basis .45s cubic-bezier(.22, 1, .36, 1), min-width .45s cubic-bezier(.22, 1, .36, 1); }
  .srv-slide-col.is-center .srv-text { animation: srvFloatIn .6s cubic-bezier(.22, 1, .36, 1) both, srvBob 4s ease-in-out .7s infinite; }
  .srv-slide-col.is-center .srv-foot { animation: srvFloatIn .6s cubic-bezier(.22, 1, .36, 1) .15s both; }
}
@keyframes srvFloatIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes srvBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .srv-slide-col.is-center .srv-text, .srv-slide-col.is-center .srv-foot, .srv-slide-col.is-center .srv-brand-mark { animation: none !important; } }

/* ================= ໂທລະສັບ: ເລືອກພາສາ = ແຜ່ນເລື່ອນຂຶ້ນຈາກລຸ່ມຈໍ =================
   ກົດທຸງ (ແຖບເທິງ layouts/navbar.php ແລະ popup ສະມາຊິກ components/member_modal.php) → ພື້ນມືດ + ແຜ່ນຂາວ
   ຫົວຂໍ້ "ເລືອກພາສາ" + ✕, ລາຍການພາສາມີເສັ້ນຂັ້ນ. ກົດພື້ນມືດ / ✕ / Esc → ປິດ (main.js, member.js) */
@media (max-width: 767.98px) {
  .lang-sheet-backdrop {
    display: block; position: fixed; inset: 0; z-index: 1100;
    background: rgba(15, 23, 42, .5);
    opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility 0s linear .3s;
  }
  .lang-switch.open .lang-sheet-backdrop, .mm-lang-corner.open .lang-sheet-backdrop { opacity: 1; visibility: visible; transition: opacity .3s ease, visibility 0s; }
  .lang-switch .lang-menu, .mm-lang-corner .mm-lang-menu {
    position: fixed; left: 0; right: 0; top: auto; bottom: 0; z-index: 1101;
    display: block; width: 100%; min-width: 0; max-height: 80vh; overflow-y: auto;
    padding: .35rem 1.5rem calc(env(safe-area-inset-bottom, 0px) + 1.6rem);
    background: #fff; border: 0; border-radius: 16px 16px 0 0;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, .18);
    font-size: 1rem; opacity: 1; pointer-events: auto;
    visibility: hidden; transform: translateY(100%); transform-origin: center bottom;
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .35s;
  }
  .lang-switch.open .lang-menu, .mm-lang-corner.open .mm-lang-menu {
    visibility: visible; transform: none; opacity: 1;
    transition: transform .35s cubic-bezier(.2, .8, .2, 1), visibility 0s;
  }
  .lang-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 1.15rem 0 .5rem; }
  .lang-sheet-head b { font-size: 1.3rem; font-weight: 600; color: #0f172a; }
  .lang-sheet-x {
    display: grid; place-items: center; width: 44px; height: 44px; margin-right: -10px; padding: 0;
    border: 0; background: none; color: #0f172a; cursor: pointer; -webkit-tap-highlight-color: transparent;
  }
  .lang-switch .lang-item, .mm-lang-corner .mm-lang-item {
    display: flex; align-items: center; gap: .85rem;
    padding: 1.05rem .1rem; border-radius: 0; border-bottom: 1px solid #e5e7eb;
    background: none; color: #0f172a; font-size: 1.1rem; font-weight: 400;
    -webkit-tap-highlight-color: transparent;
  }
  .lang-switch .lang-item img, .mm-lang-corner .mm-lang-item img { width: 28px; height: 28px; }
  .lang-switch .lang-item.active, .mm-lang-corner .mm-lang-item.active { background: none; color: #1e3a8a; font-weight: 700; }
  .lang-switch .lang-item.active::after, .mm-lang-corner .mm-lang-item.active::after {   /* ເຄື່ອງໝາຍ ✓ ພາສາປັດຈຸບັນ */
    content: ""; width: 7px; height: 13px; margin: 0 .35rem 0 auto;
    border: solid #1e3a8a; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translateY(-2px);
  }
}
@media (max-width: 767.98px) and (prefers-reduced-motion: reduce) {
  .lang-switch .lang-menu, .mm-lang-corner .mm-lang-menu, .lang-sheet-backdrop { transition: none !important; }
}
@media (max-width: 767.98px) {
  /* ແຜ່ນເລືອກພາສາເປີດຢູ່ → ເຊື່ອງປຸ່ມແຊັດລອຍ (ບໍ່ໃຫ້ທັບລາຍການພາສາ) */
  body:has(.lang-switch.open) .fc-widget, body:has(.mm-lang-corner.open) .fc-widget { visibility: hidden; }
}

/* ມືຖື: ທຸງປ່ຽນພາສາ (.lang-current) ໃຫຍ່ຂຶ້ນເລັກນ້ອຍ — ກົດງ່າຍຂຶ້ນ */
@media (max-width: 767.98px) {
  .lang-current { width: 2.5em; height: 2.5em; }
}

/* ມືຖື: ເຊື່ອງ breadcrumb (ເສັ້ນທາງ ໜ້າຫຼັກ/ໝວດ/ສິນຄ້າ) — ເປືອງບ່ອນ, ມືຖືໃຊ້ປຸ່ມກັບຄືນແທນ */
@media (max-width: 560px) {
  .sol-bc, .solution-breadcrumb { display: none; }
}
