:root {
  --bg: #eef3fb;
  --bg-2: #e8eef9;
  --surface: #ffffff;
  --surface-2: #f7faff;
  --line: rgba(148, 166, 204, 0.22);
  --text: #20356a;
  --text-strong: #1b2d57;
  --muted: #6d7fa6;
  --navy-1: #162447;
  --navy-2: #1e2e5a;
  --navy-3: #27407a;
  --blue-1: #1e4ed8;
  --blue-2: #3d7dff;
  --orange-1: #f9a52b;
  --orange-2: #f18411;
  --teal-1: #45c8a8;
  --teal-2: #69bf80;
  --violet-1: #7a83f7;
  --violet-2: #6273df;
  --shadow-soft: 0 22px 46px rgba(31, 51, 96, 0.10);
  --shadow-card: 0 16px 34px rgba(33, 56, 108, 0.10);
  --shadow-premium: 0 18px 38px rgba(17, 34, 78, 0.18);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Noto Sans Thai', sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(78, 123, 255, 0.12), transparent 23%),
    radial-gradient(circle at 100% 10%, rgba(249, 164, 41, 0.08), transparent 16%),
    radial-gradient(circle at 50% 55%, rgba(255,255,255,0.45), transparent 32%),
    linear-gradient(180deg, #f8fbff 0%, #f1f5fd 38%, var(--bg) 70%, var(--bg-2) 100%);
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.page-shell { min-height: 100vh; }
.container-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }

.topbar,
.hero-card,
.action-pill,
.service-card,
.contact-btn,
.lang-switch,
.service-icon {
  transition: transform .32s ease, box-shadow .32s ease, border-color .32s ease, background .32s ease, opacity .32s ease;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(135deg, var(--navy-1) 0%, var(--navy-2) 65%, #22376a 100%);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 16px 36px rgba(14, 24, 56, 0.24);
  backdrop-filter: blur(10px);
}
.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 0% 0%, rgba(78,123,255,.18), transparent 25%),
    radial-gradient(circle at 90% 10%, rgba(249,164,41,.08), transparent 18%),
    linear-gradient(180deg, rgba(255,255,255,.06), transparent 65%);
  pointer-events: none;
}
.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  pointer-events: none;
}
.topbar-inner {
  position: relative;
  min-height: 92px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
}
.brand { display:inline-flex; align-items:center; gap:16px; }
.brand:hover { transform: translateY(-1px); }
.brand-mark {
  width:54px;
  height:54px;
  border-radius:18px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:34px;
  font-weight:800;
  color:#fff;
  background: linear-gradient(145deg, var(--orange-1), var(--orange-2) 38%, var(--blue-1) 39%, var(--blue-2));
  box-shadow: 0 14px 28px rgba(15, 26, 58, 0.30), inset 0 1px 0 rgba(255,255,255,.25);
}
.brand-text { display:flex; flex-direction:column; line-height:1.05; }
.brand-text strong { font-size:2rem; letter-spacing:-0.03em; color:#ffffff; }
.brand-text span { font-size:1.12rem; color:rgba(228,236,255,.78); margin-top:4px; }
.topbar-actions { display:flex; align-items:center; gap:12px; flex-wrap:wrap; justify-content:flex-end; }
.topbar-meta {
  font-weight:700;
  color:rgba(238,243,255,.92);
  padding:12px 14px;
  text-shadow: 0 1px 0 rgba(0,0,0,.14);
}
.lang-switch {
  height:48px;
  min-width:58px;
  padding:0 14px;
  border-radius:14px;
  background: rgba(255,255,255,0.10);
  border:1px solid rgba(255,255,255,0.16);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  color:#ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.10), 0 8px 18px rgba(8,15,34,0.18);
  backdrop-filter: blur(8px);
}
.lang-switch:hover {
  transform: translateY(-2px);
  border-color: rgba(255,255,255,.3);
  background: rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16), 0 10px 22px rgba(8,15,34,0.22);
}
.contact-btn {
  height:54px;
  padding:0 20px;
  border-radius:16px;
  background: linear-gradient(135deg, var(--orange-1), var(--orange-2));
  color:#fff;
  font-weight:800;
  display:inline-flex;
  align-items:center;
  gap:8px;
  box-shadow: 0 16px 28px rgba(241, 132, 17, 0.28), inset 0 1px 0 rgba(255,255,255,.28);
  border: 1px solid rgba(255,255,255,.18);
  position: relative;
  overflow: hidden;
}
.contact-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255,255,255,.18), transparent 42%, transparent 62%, rgba(255,255,255,.08));
  pointer-events: none;
}
.contact-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 38px rgba(241, 132, 17, 0.34), inset 0 1px 0 rgba(255,255,255,.28);
}
.contact-btn i { font-size:1.45rem; line-height:1; }
.topbar-highlight {
  height:3px;
  background: linear-gradient(90deg, transparent, rgba(71,129,255,.35), rgba(250,170,45,.52), rgba(86,139,255,.35), transparent);
  box-shadow: 0 0 18px rgba(76,118,225,.25);
}

.main-content { padding:38px 0 58px; }
.hero-card {
  position:relative;
  overflow:hidden;
  border-radius:var(--radius-xl);
  padding:62px 36px 48px;
  background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(244,248,255,.96) 100%);
  box-shadow: 0 32px 60px rgba(31, 51, 96, 0.12);
  border:1px solid rgba(197,209,236,.55);
  box-shadow:
    0 35px 70px rgba(31, 51, 96, 0.14);
}
.hero-card::before {
  content:"";
  position:absolute;
  inset:0;
  border-radius:inherit;
  pointer-events:none;
  background: linear-gradient(180deg, rgba(255,255,255,.26), transparent 18%, transparent 82%, rgba(255,255,255,.12));
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  padding:1px;
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}
.hero-card::after {
  content: "";
  position: absolute;
  top: -46%;
  left: -18%;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(56,103,233,.06) 0%, transparent 62%);
  pointer-events: none;
}
.hero-content { text-align:center; position:relative; z-index:1; }
.hero-content h1 {
  margin:0;
  font-size:clamp(2.2rem, 4.2vw, 3.55rem);
  letter-spacing:-0.045em;
  line-height:1.06;
  color: var(--text-strong);
  text-wrap: balance;
}
.hero-content p {
  margin:16px 0 0;
  font-size:clamp(1rem, 2vw, 1.42rem);
  color:var(--muted);
}
.hero-wave { position:absolute; height:190px; width:56%; border-radius:999px; filter:blur(2px); opacity:.98; }
.hero-wave-left { left:-8%; top:20px; background:radial-gradient(circle at 0% 50%, rgba(84,129,255,.18), transparent 60%); }
.hero-wave-right { right:-10%; top:22px; background:radial-gradient(circle at 100% 50%, rgba(112,143,255,.18), transparent 60%); }

.quick-actions {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  margin-top:28px;
}
.action-pill {
  min-height:84px;
  border-radius:22px;
  padding:15px 20px;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  font-size:1.18rem;
  font-weight:800;
  box-shadow: var(--shadow-premium);
  border:1px solid rgba(255,255,255,.28);
  position:relative;
  overflow:hidden;
  isolation: isolate;
}
.action-pill::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(110deg, transparent 25%, rgba(255,255,255,.22) 46%, transparent 66%);
  transform: translateX(-130%);
  transition: transform .9s ease;
}
.action-pill::after {
  content:"";
  position:absolute;
  left:8%;
  right:8%;
  bottom:8px;
  height:10px;
  border-radius:999px;
  background:radial-gradient(circle, rgba(255,255,255,.52), transparent 72%);
  opacity:.64;
}
.action-pill:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 44px rgba(24, 39, 88, 0.24);
}
.action-pill:hover::before{ transform: translateX(130%); }
.action-pill-icon {
  width:40px;
  height:40px;
  border-radius:13px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.30), 0 8px 16px rgba(0,0,0,.08);
  flex: 0 0 40px;
  position: relative;
  z-index:1;
  backdrop-filter: blur(5px);
}
.action-pill-icon img {
  width:24px;
  height:24px;
  object-fit:contain;
  display:block;
  filter:none;
  opacity:1;
}
.action-pill-icon.has-image {
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}
.action-pill-icon.has-image img {
  width:44px;
  height:44px;
  object-fit: contain;
  filter: none;
  opacity: 1;
  filter: drop-shadow(0 6px 14px rgba(6,12,28,.18));
}
.action-pill i { font-size:1.35rem; position:relative; z-index:1; }
.action-pill span:last-child{ position:relative; z-index:1; }
.action-pill-1 { background:linear-gradient(135deg, #f9a52b, #f18411); }
.action-pill-2 { background:linear-gradient(135deg, #2e6fed, #1e4ed8); }
.action-pill-3 { background:linear-gradient(135deg, #45c7a8, #65be81); }
.action-pill-4 { background:linear-gradient(135deg, #8289f7, #6273df); }
.action-pill-1:hover { box-shadow: 0 24px 44px rgba(241,132,17,.34); }
.action-pill-2:hover { box-shadow: 0 24px 44px rgba(30,78,216,.28); }
.action-pill-3:hover { box-shadow: 0 24px 44px rgba(69,199,168,.28); }
.action-pill-4:hover { box-shadow: 0 24px 44px rgba(98,115,223,.28); }

.section-divider {
  height:1px;
  margin:28px 0 22px;
  background:linear-gradient(90deg, transparent, rgba(136,156,201,.54), transparent);
}
.services-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:18px;
}
.service-card {
  position:relative;
  background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(247,250,255,.97));
  border:1px solid rgba(190,202,225,.76);
  border-radius:26px;
  min-height:236px;
  padding: 52px 28px 42px;
  box-shadow: var(--shadow-card);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  overflow:hidden;
}
.service-card::before {
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.78), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.14), transparent 28%);
  pointer-events:none;
}
.service-card::after {
  content:"";
  position:absolute;
  left:16px;
  right:16px;
  bottom:0;
  height:5px;
  border-radius:999px 999px 16px 16px;
  background: var(--accent, linear-gradient(90deg, rgba(30,78,216,.18), rgba(30,78,216,.04)));
}
.service-card:nth-child(1) { --accent: linear-gradient(90deg, rgba(249,165,43,.95), rgba(249,165,43,.14)); }
.service-card:nth-child(2) { --accent: linear-gradient(90deg, rgba(30,78,216,.95), rgba(30,78,216,.14)); }
.service-card:nth-child(3) { --accent: linear-gradient(90deg, rgba(69,199,168,.95), rgba(69,199,168,.14)); }
.service-card:nth-child(4) { --accent: linear-gradient(90deg, rgba(122,131,247,.95), rgba(122,131,247,.14)); }
.service-card:nth-child(5),
.service-card:nth-child(6) { --accent: linear-gradient(90deg, rgba(165,178,208,.75), rgba(165,178,208,.06)); }
.service-card:hover {
  transform: translateY(-8px);
  box-shadow:0 24px 46px rgba(38,61,114,.15);
  border-color:rgba(116,139,190,.42);
}
.service-tag {
  position:absolute;
  top:16px;
  right:16px;
  height:28px;
  min-width:44px;
  padding:0 10px;
  border-radius:999px;
  background: rgba(231,237,250,.98);
  color:#5c73a8;
  font-size:.74rem;
  font-weight:800;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  letter-spacing:.06em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}
.service-icon {
  width: 230px;
  height: 130px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-1);
  font-size: 3rem;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  border-radius: 0;
}

.service-icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  transition: all .35s ease;
  filter: drop-shadow(0 16px 32px rgba(17,34,78,.15));
}

.service-card:hover .service-icon img {
  transform: scale(1.06);
}
/* ===============================
   REFINED TITLE / SUBTITLE STRUCTURE
   =============================== */

.service-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* subtitle บน */
.service-subtitle {
  font-size: 1rem;
  line-height: 1.25;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}

.service-subtitle-top {
  margin-bottom: 2px;   /* ชิด TITLE */
  min-height: 24px;
}

/* TITLE */
.service-card h2 {
  margin: 0;
  font-size: 2.05rem;
  letter-spacing: -0.04em;
  line-height: 1.05;
  min-height: 58px;     /* บาลานซ์ใบที่ 1-2 บรรทัด */
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-strong);
  text-align: center;
  text-wrap: balance;
}

/* subtitle ล่าง */
.service-subtitle-bottom {
  margin-top: 14px;     /* เว้นจาก TITLE ให้ดู secondary */
  min-height: 22px;
  opacity: .9;
}
.service-card.is-placeholder { opacity:.97; }
.service-card.is-placeholder .service-icon {
  background: linear-gradient(180deg, rgba(251,253,255,.98), rgba(245,248,253,.96));
}
.service-card.is-placeholder h2,
.service-card.is-placeholder p { color:#586c9b; }

.footer {
  margin-top:64px;
  padding:26px 0;
  border-top:1px solid rgba(177,193,226,.42);
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(8px);
}
.footer-inner {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  font-size:14px;
  color:#61739d;
}
.footer .credit a {
  color:#1E3A8A;
  font-weight:700;
  text-decoration:none;
  transition:all .2s ease;
}
.footer .credit a:hover { color:#F97316; }

@media (max-width:1100px){
  .services-grid, .quick-actions { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width:820px){
  .topbar-inner { min-height:84px; }
  .brand-text strong { font-size:1.55rem; }
  .brand-text span { font-size:1rem; }
  .topbar-actions { gap:10px; }
  .topbar-meta { display:none; }
  .hero-card { padding:44px 22px 38px; }
  .service-card { min-height:212px; }
  .footer-inner { flex-direction:column; align-items:flex-start; }
}

@media (max-width:640px){
  body {
    background: linear-gradient(180deg, #f7faff 0%, #eef3fb 100%);
  }
  .container-shell { width:min(100% - 20px, 560px); }
  .topbar-inner { min-height:78px; gap:12px; }
  .brand { gap:12px; }
  .brand-mark { width:44px; height:44px; font-size:28px; border-radius:14px; }
  .brand-text strong { font-size:1.3rem; }
  .brand-text span { font-size:.95rem; }
  .lang-switch { min-width:50px; height:42px; }
  .contact-btn { height:44px; padding:0 14px; }
  .contact-btn span { display:none; }
  .main-content { padding-top:20px; }
  .hero-card { padding:34px 16px 30px; border-radius:24px; }
  .hero-content h1 { font-size:2rem; }
  .hero-content p { font-size:1rem; }
  .quick-actions, .services-grid { grid-template-columns:1fr; }
  .action-pill { min-height:72px; font-size:1.05rem; border-radius:18px; }
  .service-card { min-height:190px; border-radius:22px; padding:18px 16px 24px; }
  .service-icon { width:96px; height:96px; font-size:2.35rem; }
  .service-icon img { max-width:100%; max-height:100%; }
  .action-pill-icon.has-image img { width:34px; height:34px; }
  .service-card h2 { font-size:1.55rem; min-height:52px; }
  .service-subtitle { font-size:.92rem; }
  .service-subtitle-top { min-height:24px; }
  .service-subtitle-bottom { min-height:20px; }
}
