/* Shared site chrome: header, Products dropdown and footer (site/build/partials.mjs).
   Loaded by every page, including the homepages, which don't load vendor.css. Self-contained values on purpose. */

.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: #F4F7FB; color: #0A0F1C; padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { left: 12px; }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 60; background: #0A0F1C; color: #F4F7FB; border-bottom: 1px solid #1F2A40; view-transition-name: site-head; font-family: 'Space Grotesk', 'IBM Plex Sans Thai', system-ui, sans-serif; }
.head-wrap { max-width: 1376px; margin: 0 auto; padding: 14px 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 36px; }
.head-logo { display: flex; align-items: center; flex: none; }
.head-logo img { height: 52px; width: auto; display: block; }
.head-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 28px; flex: 1 1 auto; font-size: 15.5px; font-weight: 500; }
.head-nav > a, .nav-dd-link { color: #F4F7FB; text-decoration: none; padding: 10px 0; white-space: nowrap; }
.head-nav > a:hover, .nav-dd-link:hover { color: #4DB5EA; }
.head-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 #4DB5EA; }
.head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.head-lang { display: flex; border: 1px solid #34425F; border-radius: 8px; overflow: hidden; font-size: 13px; font-weight: 600; }
.head-lang a { padding: 10px 12px; color: #9AA6BD; text-decoration: none; line-height: 1; }
.head-lang a[aria-current] { background: #F4F7FB; color: #0A0F1C; }
.head-btn { display: inline-flex; align-items: center; height: 44px; padding: 0 18px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 15px; white-space: nowrap; }
.head-btn-ghost { border: 1px solid #F4F7FB; color: #F4F7FB; }
.head-btn-primary { background: #4DB5EA; color: #0A0F1C; }
.head-btn:hover { filter: brightness(1.08); }
.site-head a:focus-visible, .site-head button:focus-visible { outline: 2px solid #4DB5EA; outline-offset: 3px; border-radius: 4px; }

/* ---------- Products dropdown ---------- */
.nav-dd { position: relative; display: flex; align-items: center; gap: 2px; }
.nav-dd-toggle { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; margin: 0; border: 0; border-radius: 6px; background: transparent; color: #9AA6BD; cursor: pointer; }
.nav-dd-toggle svg { transition: transform .15s ease; }
.nav-dd.open .nav-dd-toggle svg { transform: rotate(180deg); }
.nav-dd-menu { position: absolute; top: 100%; left: -18px; padding-top: 10px; display: none; z-index: 70; }
.nav-dd.open .nav-dd-menu { display: block; }
@media (hover: hover) { .nav-dd:hover .nav-dd-menu { display: block; } .nav-dd:hover .nav-dd-toggle svg { transform: rotate(180deg); } }
.nav-dd-menu ul { list-style: none; margin: 0; padding: 8px; width: 340px; background: #121A2B; border: 1px solid #34425F; border-radius: 14px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .7); }
.nav-dd-menu li a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #F4F7FB; text-decoration: none; }
.nav-dd-menu li a:hover, .nav-dd-menu li a:focus-visible, .nav-dd-menu li a[aria-current="page"] { background: #1F2A40; outline: none; }
.nav-dd-menu img { width: 28px; height: 28px; object-fit: contain; flex: none; }
.nav-dd-menu span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.nav-dd-menu b { font-size: 15px; font-weight: 600; }
.nav-dd-menu small { font-size: 12.5px; color: #9AA6BD; }

/* ---------- footer ---------- */
.site-foot { background: #0A0F1C; color: #9AA6BD; border-top: 1px solid #1F2A40; font-family: 'Space Grotesk', 'IBM Plex Sans Thai', system-ui, sans-serif; }
.foot-wrap { max-width: 1376px; margin: 0 auto; padding: 72px 48px 36px; display: grid; grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)); gap: 40px 32px; font-size: 14px; }
.foot-brand { display: flex; flex-direction: column; gap: 18px; }
.foot-brand img { height: 60px; width: auto; align-self: flex-start; }
.foot-brand address { font-style: normal; line-height: 1.75; }
.foot-brand b { color: #F4F7FB; font-weight: 600; }
.foot-brand a { color: #F4F7FB; }
.foot-col { display: flex; flex-direction: column; gap: 12px; }
.foot-col b { color: #F4F7FB; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 2px; }
.foot-col a { color: #DCE3EE; text-decoration: none; }
.foot-col a:hover, .foot-col a[aria-current="page"] { color: #4DB5EA; }
.foot-legal { grid-column: 1 / -1; margin: 12px 0 0; padding-top: 24px; border-top: 1px solid #1F2A40; font-size: 12.5px; line-height: 1.6; }
.site-foot :lang(th) { line-height: 1.75; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .foot-wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 980px) {
  .head-wrap { padding: 10px 24px; gap: 8px 16px; }
  .head-nav { order: 3; flex-basis: 100%; flex-wrap: nowrap; overflow-x: auto; gap: 22px; scrollbar-width: none; }
  .head-nav::-webkit-scrollbar { display: none; }
  .head-actions { margin-left: auto; }
  /* the nav scrolls sideways here, so the menu is placed against the screen (top set by nav.js) */
  .nav-dd { position: static; }
  .nav-dd-menu { position: fixed; left: 12px; right: 12px; top: var(--dd-top, 120px); padding-top: 6px; }
  .nav-dd-menu ul { width: auto; max-width: 420px; }
}
@media (max-width: 640px) {
  .head-wrap { padding: 10px 16px; column-gap: 10px; }
  .head-logo img { height: 40px; }
  .head-btn-ghost { display: none; }
  .head-actions { gap: 6px; flex-wrap: nowrap; }
  .head-btn { height: 38px; padding: 0 10px; font-size: 14px; }
  .head-lang a { padding: 7px 8px; }
  .foot-wrap { grid-template-columns: minmax(0, 1fr); padding: 56px 16px 28px; }
  .foot-brand img { height: 52px; }
}
[id] { scroll-margin-top: 110px; }
@media (max-width: 980px) { [id] { scroll-margin-top: 130px; } }
