/* =====================================================================
   Hinet Site Shell — Menu · Footer · Floating buttons
   Generated system: markup comes from _site-tools/hn_shell.py
   Design: Hinet Blue Design Language (IBM Plex Sans Thai · #145ADC · Navy footer)
   Every selector is namespaced .hn-* so it never collides with Bootstrap /
   templatemo.css / page-level CSS. templatemo.css forces
   `p, a {font-family:Kanit !important; font-weight:200}` — overridden below
   with scoped !important on purpose.
   ===================================================================== */
:root {
  --hns-font: 'IBM Plex Sans Thai', -apple-system, 'Segoe UI', Tahoma, sans-serif;
  --hns-blue: #145adc;
  --hns-blue-hover: #0f48b8;
  --hns-blue-tint: #e8f0fd;
  --hns-navy: #0b2a6b;
  --hns-navy-deep: #071d4d;
  --hns-ink: #1a1d23;
  --hns-body: #3d4250;
  --hns-muted: #6c7280;
  --hns-hairline: #e4e7ec;
  --hns-line: #06c755;
  --hns-shadow: rgba(20,30,60,.03) 0 0 0 1px, rgba(20,30,60,.05) 0 2px 6px 0, rgba(20,30,60,.10) 0 4px 12px 0;
  --hns-nav-h: 80px;
  --hns-float-offset: 0px;
}
html { scroll-padding-top: calc(var(--hns-nav-h) + 12px); }

/* ---------- shared resets inside the shell ---------- */
.hns-shell, .hns-shell *, .hns-shell *::before, .hns-shell *::after { box-sizing: border-box; }
.hns-shell, .hns-shell a, .hns-shell p, .hns-shell span, .hns-shell b, .hns-shell small,
.hns-shell li, .hns-shell h2, .hns-shell address, .hns-shell button {
  font-family: var(--hns-font) !important;
  letter-spacing: normal;
}
.hns-shell ul { list-style: none; margin: 0; padding: 0; }
.hns-shell a { text-decoration: none !important; }
.hns-shell img { display: block; max-width: none; }
.hns-shell button { font: inherit; margin: 0; }
.hns-wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.hns-shell :focus-visible { outline: 3px solid var(--hns-blue); outline-offset: 2px; border-radius: 6px; }
.hns-shell button:focus:not(:focus-visible), .hns-shell a:focus:not(:focus-visible) { outline: none; box-shadow: none; }

.hns-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 9px 20px; min-height: 42px;
  font-size: .95rem !important; font-weight: 500 !important; line-height: 1.2;
  border: 2px solid transparent; white-space: nowrap; cursor: pointer;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.hns-btn i { font-size: 1.15rem; }
.hns-btn-primary { background: var(--hns-blue); color: #fff !important; }
.hns-btn-primary:hover { background: var(--hns-blue-hover); color: #fff !important; transform: translateY(-1px); box-shadow: var(--hns-shadow); }
.hns-btn-light { background: #fff; color: var(--hns-navy) !important; margin-top: 18px; }
.hns-btn-light:hover { background: var(--hns-blue-tint); color: var(--hns-navy) !important; }
.hns-line-ic { display: block; }

/* =====================================================================
   NAV
   ===================================================================== */
.hns-nav {
  position: sticky; top: 0; z-index: 1030;
  height: var(--hns-nav-h);
  background: rgba(255,255,255,.96);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hns-hairline);
  transition: box-shadow .2s ease;
}
.hns-nav.is-scrolled { box-shadow: var(--hns-shadow); }
.hns-nav > .hns-wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.hns-brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.hns-brand img { width: 60px; height: 60px; }
.hns-brand span { color: var(--hns-blue) !important; font-size: 1.12rem !important; font-weight: 600 !important; line-height: 1.2; white-space: nowrap; }

.hns-menu { display: flex; align-items: center; }
.hns-links { display: flex; align-items: center; gap: 2px; }
.hns-links > li { position: relative; display: flex; align-items: center; }
.hns-links > li > a {
  display: block; padding: 8px 14px; border-radius: 999px;
  color: var(--hns-body) !important; font-size: .95rem !important; font-weight: 500 !important; line-height: 1.4;
  transition: background .15s ease, color .15s ease;
}
.hns-links > li > a:hover, .hns-links > li.hns-open > a { background: var(--hns-blue-tint); color: var(--hns-blue) !important; }
.hns-links > li > a[aria-current="page"] { color: var(--hns-blue) !important; background: var(--hns-blue-tint); font-weight: 600 !important; }
.hns-has-sub > .hns-sub-link { padding-right: 6px !important; }
.hns-sub-btn {
  background: none; border: 0; padding: 4px 6px 4px 0; margin-left: -4px; cursor: pointer;
  color: var(--hns-body); display: flex; align-items: center; border-radius: 999px;
}
.hns-sub-btn i { font-size: 1.15rem; transition: transform .2s ease; }
.hns-has-sub.hns-open .hns-sub-btn i { transform: rotate(180deg); }
.hns-menu-quote { display: none; }

/* Service dropdown */
.hns-sub {
  position: absolute; top: calc(100% + 12px); left: -20px; width: 580px;
  background: #fff; border: 1px solid var(--hns-hairline); border-radius: 16px;
  box-shadow: var(--hns-shadow); padding: 12px;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}
.hns-sub::before { content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px; } /* hover bridge */
.hns-has-sub.hns-open .hns-sub { opacity: 1; visibility: visible; transform: none; }
.hns-sub ul { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.hns-sub ul a { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; color: var(--hns-ink) !important; }
.hns-sub ul a:hover { background: #f3f7fe; }
.hns-sub ul i { flex: 0 0 36px; height: 36px; border-radius: 10px; background: var(--hns-blue-tint); color: var(--hns-blue); display: grid; place-items: center; font-size: 1.25rem; }
.hns-sub ul b { display: block; font-size: .93rem !important; font-weight: 600 !important; line-height: 1.35; color: var(--hns-ink) !important; }
.hns-sub ul small { display: block; font-size: .8rem !important; font-weight: 400 !important; line-height: 1.4; color: var(--hns-muted) !important; margin-top: 2px; }
.hns-sub-all { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 6px; padding: 10px 12px 4px; border-top: 1px solid var(--hns-hairline); color: var(--hns-blue) !important; font-size: .9rem !important; font-weight: 600 !important; }

/* CTA cluster */
.hns-cta { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.hns-line { width: 42px; height: 42px; border-radius: 50%; background: var(--hns-line); color: #fff !important; display: grid; place-items: center; transition: transform .2s ease, box-shadow .2s ease; }
.hns-line:hover { transform: translateY(-1px); box-shadow: var(--hns-shadow); color: #fff !important; }
.hns-line .hns-line-ic { width: 26px; height: 26px; }
.hns-lang {
  min-width: 42px; height: 42px; padding: 0 10px; border-radius: 999px;
  border: 2px solid var(--hns-blue); color: var(--hns-blue) !important;
  font-size: .88rem !important; font-weight: 700 !important; display: grid; place-items: center;
  transition: background .15s ease;
}
.hns-lang:hover { background: var(--hns-blue-tint); }
.hns-toggle { display: none; width: 44px; height: 44px; border: 0; background: none; color: var(--hns-ink); font-size: 1.9rem; cursor: pointer; border-radius: 10px; place-items: center; }
.hns-toggle:hover { background: var(--hns-blue-tint); }

/* ---------- collapsed (tablet / mobile) ---------- */
@media (max-width: 1199.98px) {
  .hns-toggle { display: grid; }
  .hns-menu {
    position: absolute; top: var(--hns-nav-h); left: 0; right: 0;
    display: none; flex-direction: column; align-items: stretch;
    background: #fff; border-bottom: 1px solid var(--hns-hairline); box-shadow: var(--hns-shadow);
    padding: 10px 24px 22px; max-height: calc(100vh - var(--hns-nav-h)); overflow-y: auto;
  }
  .hns-nav.hns-menu-open .hns-menu { display: flex; }
  .hns-links { flex-direction: column; align-items: stretch; gap: 0; }
  .hns-links > li { flex-wrap: wrap; border-bottom: 1px solid #eef0f4; }
  .hns-links > li > a { flex: 1; padding: 13px 4px; border-radius: 0; font-size: 1rem !important; background: none !important; }
  .hns-links > li > a[aria-current="page"] { color: var(--hns-blue) !important; }
  .hns-sub-btn { padding: 10px; margin: 0; }
  .hns-sub {
    position: static; width: 100%; opacity: 1; visibility: visible; transform: none;
    border: 0; box-shadow: none; padding: 0 0 10px; display: none; border-radius: 0;
  }
  .hns-sub::before { display: none; }
  .hns-has-sub.hns-open .hns-sub { display: block; }
  .hns-sub ul { grid-template-columns: 1fr; }
  .hns-sub ul a { padding: 9px 6px; }
  .hns-sub-all { justify-content: flex-start; padding: 10px 6px 0; }
  .hns-menu-quote { display: inline-flex; margin-top: 18px; min-height: 48px; }
}
@media (max-width: 640px) {
  :root { --hns-nav-h: 68px; }
  .hns-wrap { padding: 0 16px; }
  .hns-nav > .hns-wrap { gap: 8px; }
  .hns-brand img { width: 48px; height: 48px; }
  .hns-brand span { display: none; }
  .hns-cta { gap: 8px; }
  .hns-quote { padding: 9px 12px; }
  .hns-quote span { display: none; }
  .hns-menu { padding: 6px 16px 20px; }
}

/* =====================================================================
   FOOTER
   ===================================================================== */
.hns-footer { background: var(--hns-navy); color: #c9d6ee; padding: 60px 0 0; margin: 0; font-size: .93rem; line-height: 1.7; }
.hns-footer-grid { display: grid; grid-template-columns: 1.45fr 1fr 1.25fr 1.2fr; gap: 40px; padding-bottom: 48px; }
.hns-footer-logo { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.hns-footer-logo img { width: 44px; height: 44px; background: #fff; border-radius: 12px; padding: 4px; }
.hns-footer-logo span { color: #fff !important; font-size: 1.1rem !important; font-weight: 600 !important; }
.hns-shell.hns-footer p { color: #c9d6ee !important; font-size: .92rem !important; font-weight: 400 !important; line-height: 1.7; margin: 0 0 12px; }
.hns-shell.hns-footer address { color: #c9d6ee; font-style: normal; font-size: .9rem; font-weight: 400; margin: 0 0 18px; line-height: 1.7; }
.hns-shell.hns-footer .hns-footer-h { color: #fff !important; font-size: 1rem !important; font-weight: 600 !important; line-height: 1.4; margin: 4px 0 16px; letter-spacing: .01em; }
.hns-footer ul li { margin: 0 0 9px; }
.hns-shell.hns-footer ul a, .hns-footer-contact span {
  color: #c9d6ee !important; font-size: .92rem !important; font-weight: 400 !important; line-height: 1.5;
  display: inline-flex; align-items: center; gap: 8px; transition: color .15s ease;
}
.hns-shell.hns-footer ul a:hover { color: #fff !important; }
.hns-footer-contact i { font-size: 1.1rem; color: #8fb2f5; }
.hns-social { display: flex; gap: 10px; }
.hns-social a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.08); color: #fff !important; display: grid; place-items: center; font-size: 1.35rem; transition: background .15s ease, transform .15s ease; }
.hns-social a:hover { background: rgba(255,255,255,.18); transform: translateY(-1px); color: #fff !important; }
.hns-social a.hns-social-line { background: var(--hns-line); }
.hns-social a.hns-social-line:hover { background: #05a648; }
.hns-social .hns-line-ic { width: 22px; height: 22px; }
.hns-footer-legal { background: var(--hns-navy-deep); padding: 16px 0; }
.hns-footer-legal .hns-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-right: 100px; } /* keep clear of floating buttons */
.hns-shell.hns-footer .hns-footer-legal span, .hns-shell.hns-footer .hns-footer-legal a { color: #9fb3d9 !important; font-size: .85rem !important; font-weight: 400 !important; }
.hns-shell.hns-footer .hns-footer-legal a:hover { color: #fff !important; }
@media (max-width: 991.98px) { .hns-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 575.98px) {
  .hns-footer { padding-top: 44px; }
  .hns-footer-grid { grid-template-columns: 1fr; gap: 28px; padding-bottom: 36px; }
  .hns-footer-legal { padding-bottom: 28px; }
  .hns-footer-legal .hns-wrap { flex-direction: column; padding-right: 72px; } /* keep clear of floating buttons */
}

/* =====================================================================
   FLOATING BUTTONS (LINE · Call · Back to top)
   ===================================================================== */
.hns-float {
  position: fixed; right: 20px; bottom: calc(20px + var(--hns-float-offset)); z-index: 1020;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  transition: bottom .25s ease;
}
.hns-fab {
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; font-size: 1.5rem; color: #fff !important;
  box-shadow: 0 6px 18px rgba(11,42,107,.22); transition: transform .2s ease, opacity .25s ease, visibility .25s;
}
.hns-fab:hover { transform: translateY(-2px); color: #fff !important; }
.hns-fab-line { background: var(--hns-line); }
.hns-fab-line .hns-line-ic { width: 30px; height: 30px; }
.hns-fab-call { background: var(--hns-blue); }
.hns-fab-top { background: #fff; color: var(--hns-navy) !important; border: 1px solid var(--hns-hairline); opacity: 0; visibility: hidden; transform: translateY(8px); }
.hns-fab-top:hover { color: var(--hns-blue) !important; }
.hns-float.show-top .hns-fab-top { opacity: 1; visibility: visible; transform: none; }
@media (max-width: 640px) {
  .hns-float { right: 14px; bottom: calc(14px + var(--hns-float-offset)); gap: 8px; }
  .hns-fab { width: 46px; height: 46px; font-size: 1.35rem; }
  .hns-fab-line .hns-line-ic { width: 26px; height: 26px; }
}
@media print { .hns-float, .hns-nav { position: static; } .hns-float { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .hns-shell *, .hns-shell { transition: none !important; }
}

/* Pages that ship their own floating back-to-top / scroll FAB (MS365 .scroll-fab, Pricing + IT Outsource #backToTop)
   — the shell's floating buttons replace them (their markup/JS stay untouched, just hidden) */
.scroll-fab, #backToTop { display: none !important; }

/* Page-level sticky bars must sit below the sticky shell menu (Pricing tab bar) */
.pricing-tab-nav { top: var(--hns-nav-h) !important; }
