/* SiteOS Service Directory v1.1.2
   Scoped to #links so legacy content, admin, footer and other components stay intact.
*/
#links,
#links * { box-sizing: border-box; }

#links > .wrap.panel {
  position: relative;
  isolation: isolate;
  z-index: 2; /* Keep decorative site-wide spark particles behind directory content. */
  overflow: hidden;
  border: 1px solid rgba(111, 226, 161, .25) !important;
  border-radius: 26px !important;
  padding: clamp(22px, 3.3vw, 38px) !important;
  background:
    radial-gradient(ellipse 52% 42% at 100% 0%, rgba(64, 202, 125, .12), transparent 80%),
    linear-gradient(145deg, #112219 0%, #0a1810 40%, #07120e 100%) !important;
  box-shadow: 0 24px 70px rgba(0,0,0,.32), inset 0 1px rgba(255,255,255,.04) !important;
}
#links > .wrap.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent 1%, #5be5a1 25%, #b5ec88 58%, transparent 99%);
}
#links > .wrap.panel::after {
  content: "";
  position: absolute;
  top: -220px;
  right: -160px;
  width: 490px;
  height: 490px;
  border: 1px solid rgba(148, 249, 178, .055);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}
#links .siteos-links-overline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 13px;
  color: #a8cbb8;
  font: 700 12px/1.5 Tahoma, 'Noto Sans Thai', sans-serif;
}
#links .siteos-links-overline-label {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  min-width: 0;
  letter-spacing: .05em;
}
#links .siteos-links-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6ff0a8;
  box-shadow: 0 0 0 4px rgba(111,240,168,.12), 0 0 14px rgba(111,240,168,.24);
}
#links .siteos-links-overline-en {
  margin-left: 3px;
  padding-left: 12px;
  border-left: 1px solid rgba(147,201,166,.24);
  font: 700 10px/1.4 Arial, sans-serif;
  letter-spacing: .17em;
  color: #6e9f86;
}
#links .siteos-links-count {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border: 1px solid rgba(139,238,167,.22);
  background: rgba(61,164,99,.1);
  border-radius: 99px;
  color: #b9dfc7;
  white-space: nowrap;
  font-weight: 700;
}
#links .siteos-links-count strong {
  color: #bbf5b2;
  font: 800 14px/1 Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}
#links .section-title {
  margin: 0 0 12px !important;
  color: #f5fff8 !important;
  font: 800 clamp(27px, 3.2vw, 42px)/1.26 Tahoma, 'Noto Sans Thai', sans-serif !important;
  letter-spacing: -.025em;
  text-shadow: none !important;
  overflow-wrap: anywhere;
}
#links .section-title::before { content: none !important; }
#links .section-title span { color: #aeeb99 !important; }
#links p.lead {
  max-width: 1010px;
  margin: 0 0 23px !important;
  padding: 0 0 22px !important;
  background: none !important;
  border-bottom: 1px solid rgba(131,194,153,.17);
  color: #b4cfbf !important;
  font: 400 clamp(13px, 1.2vw, 14.5px)/1.87 Tahoma, 'Noto Sans Thai', sans-serif !important;
  text-shadow: none !important;
}
#links .service-link-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  align-items: stretch;
  gap: 13px !important;
  margin: 0 !important;
  width: 100%;
  max-width: 100%;
}
#links .service-group {
  --links-accent: #65e8b1;
  --links-soft: rgba(101,232,177,.1);
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  margin: 0 !important;
  padding: 16px 13px 14px !important;
  overflow: hidden;
  border-radius: 17px !important;
  border: 1px solid rgba(147,213,172,.18) !important;
  background: linear-gradient(158deg, rgba(34,66,47,.66), rgba(13,32,22,.98) 35%, rgba(8,24,16,.97)) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.04), 0 12px 29px rgba(0,0,0,.12) !important;
  transition: border-color .2s ease, box-shadow .2s ease !important;
}
#links .service-group:nth-child(2) { --links-accent: #b8e89a; --links-soft: rgba(184,232,154,.1); }
#links .service-group:nth-child(3) { --links-accent: #8bdcce; --links-soft: rgba(139,220,206,.1); }
#links .service-group:nth-child(4) { --links-accent: #e2d6a2; --links-soft: rgba(226,214,162,.1); }
#links .service-group::before {
  content: "";
  position: absolute;
  height: 2px;
  inset: 0 14px auto;
  background: linear-gradient(90deg, var(--links-accent), transparent);
  opacity: .85;
  pointer-events: none;
}
#links .service-group:hover,
#links .service-group.is-visible:hover {
  border-color: rgba(143,226,180,.36) !important;
  box-shadow: inset 0 1px rgba(255,255,255,.05), 0 16px 35px rgba(0,0,0,.2) !important;
  transform: none !important;
}
#links .service-group h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  margin: 0 0 13px !important;
  padding: 0 2px 13px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(149,213,173,.14) !important;
  color: #f2fff6 !important;
  background: none !important;
  font: 800 16px/1.35 Tahoma, 'Noto Sans Thai', sans-serif !important;
  letter-spacing: 0;
  text-shadow: none !important;
}
#links .service-group h3::before {
  content: "01";
  display: inline-grid;
  place-items: center;
  flex: 0 0 37px;
  width: 37px;
  height: 37px;
  border: 1px solid color-mix(in srgb, var(--links-accent), transparent 65%);
  border-radius: 11px;
  background: var(--links-soft);
  color: var(--links-accent);
  font: 800 12px/1 Arial, sans-serif;
  letter-spacing: .06em;
}
#links .service-group:nth-child(2) h3::before { content: "02"; }
#links .service-group:nth-child(3) h3::before { content: "03"; }
#links .service-group:nth-child(4) h3::before { content: "04"; }
#links .service-group ul {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-content: start;
  gap: 6px !important;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
#links .service-group li {
  display: block;
  margin: 0 !important;
  padding: 0 !important;
  min-width: 0;
  list-style: none !important;
}
#links .service-group li::before { content: none !important; }
#links .service-group li a {
  position: relative;
  display: flex !important;
  align-items: center;
  min-height: 43px;
  width: 100%;
  margin: 0 !important;
  padding: 9px 27px 9px 11px !important;
  min-width: 0;
  border: 1px solid rgba(129,194,153,.12) !important;
  border-radius: 10px !important;
  background: rgba(3,17,10,.57) !important;
  color: #d8ebe0 !important;
  font: 600 13.5px/1.45 Tahoma, 'Noto Sans Thai', sans-serif !important;
  text-decoration: none !important;
  text-align: left;
  overflow-wrap: anywhere;
  word-break: normal;
  box-shadow: none !important;
  transform: none !important;
  transition: border-color .18s ease, background .18s ease, color .18s ease !important;
}
#links .service-group li a::after {
  content: "›";
  display: block;
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-51%);
  color: #7da68f;
  font: 500 21px/1 Arial, sans-serif;
  transition: color .18s ease, right .18s ease;
}
#links .service-group li a:hover,
#links .service-group li a:focus-visible {
  background: rgba(64,162,104,.14) !important;
  border-color: rgba(126,235,166,.54) !important;
  color: #fff !important;
  box-shadow: none !important;
  transform: none !important;
}
#links .service-group li a:hover::after,
#links .service-group li a:focus-visible::after {
  color: #a8f6ba;
  right: 8px;
}
#links .service-group li a:focus-visible {
  outline: 2px solid #9cf3b4;
  outline-offset: 2px;
}

@media (max-width: 1050px) {
  #links .service-link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  #links .service-group h3 { font-size: 17px !important; }
  #links .service-group li a { font-size: 14px !important; }
}
@media (max-width: 650px) {
  #links > .wrap.panel { padding: 20px 15px 18px !important; border-radius: 19px !important; }
  #links .siteos-links-overline { align-items: flex-start; margin-bottom: 11px; }
  #links .siteos-links-overline-en { display: none; }
  #links .siteos-links-count { padding: 4px 9px; font-size: 11px; }
  #links .section-title { font-size: clamp(25px, 7vw, 32px) !important; line-height: 1.32 !important; }
  #links p.lead { font-size: 13.5px !important; line-height: 1.77 !important; padding-bottom: 18px !important; margin-bottom: 17px !important; }
  #links .service-link-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 12px !important; }
  #links .service-group { padding: 14px 12px 13px !important; border-radius: 14px !important; }
  #links .service-group h3 { min-height: 45px; margin-bottom: 11px !important; font-size: 16px !important; }
  #links .service-group h3::before { width: 34px; height: 34px; flex-basis: 34px; }
  #links .service-group li a { min-height: 43px; font-size: 13.5px !important; }
}
@media (max-width: 370px) {
  #links > .wrap.panel { padding: 17px 11px 15px !important; }
  #links .siteos-links-overline-label { font-size: 11px; }
  #links .service-group { padding: 12px 9px !important; }
  #links .service-group li a { padding-left: 10px !important; font-size: 13px !important; }
}
@media (prefers-reduced-motion: reduce) {
  #links .service-group, #links .service-group li a,
  #links .service-group li a::after { transition: none !important; }
}
