
:root{--bg:#0b1220;--panel:#121a2b;--panel2:#0f1727;--text:#e8eefc;--muted:#9fb0d0;--line:#23304b;--accent:#4da3ff;--good:#23c483;--warn:#ffb020;--danger:#ef5350}
*{box-sizing:border-box}body{margin:0;font-family:Tahoma,Arial,sans-serif;background:linear-gradient(180deg,#0b1220,#0c1628 40%,#0a1120);color:var(--text)}a{color:inherit;text-decoration:none}img{max-width:100%}.container{width:min(1180px,calc(100% - 32px));margin:auto}
.navbar{position:sticky;top:0;z-index:40;background:rgba(8,13,24,.85);backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}
.navbar .inner{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0}.brand{display:flex;align-items:center;gap:12px;font-weight:700}.brand img{width:54px;height:54px;object-fit:contain}.brand span{font-size:1.15rem}
.nav-links,.nav-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap}.nav-link,.btn{border:1px solid var(--line);padding:10px 14px;border-radius:12px;background:#111a2c}.btn.primary{background:linear-gradient(135deg,#1570ef,#4da3ff);border-color:#2a7be8}.btn.danger{background:#2a1215;border-color:#5f2a2a}.btn.ghost{background:transparent}
.hero{padding:52px 0 26px}.hero-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:24px}.card{background:linear-gradient(180deg,var(--panel),var(--panel2));border:1px solid var(--line);border-radius:22px;padding:22px;box-shadow:0 10px 30px rgba(0,0,0,.18)}
.grid{display:grid;gap:18px}.grid-3{grid-template-columns:repeat(3,1fr)}.grid-2{grid-template-columns:repeat(2,1fr)}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.stat{padding:16px;border-radius:18px;background:#101828;border:1px solid var(--line)}
.section{padding:18px 0 34px}.section h2{margin:0 0 14px;font-size:1.45rem}.muted{color:var(--muted)}.badge{display:inline-block;padding:5px 10px;border-radius:999px;background:#13233f;border:1px solid #23406d;color:#a9cbff;font-size:.85rem}
.package-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.package-card{display:flex;flex-direction:column;gap:10px}.price{font-size:2rem;font-weight:700}.list{margin:0;padding-left:18px}.list li{margin:6px 0}.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse}.table th,.table td{padding:10px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}
.form-grid{display:grid;gap:14px}.form-grid.two{grid-template-columns:repeat(2,1fr)}input,select,textarea{width:100%;padding:12px 13px;background:#0d1524;border:1px solid var(--line);border-radius:12px;color:var(--text)}textarea{min-height:120px}.footer{padding:26px 0 50px;color:var(--muted)}
.ai-chat-widget{position:fixed;right:20px;bottom:20px;z-index:60}.ai-chat-toggle{width:72px;height:72px;border-radius:50%;border:none;background:transparent;cursor:pointer}.ai-chat-toggle img{width:72px;height:72px;object-fit:contain}.ai-chat-box{display:none;width:min(380px,calc(100vw - 24px));margin-top:12px}.ai-chat-box.open{display:block}.ai-chat-messages{height:280px;overflow:auto;padding:12px;background:#0b1322;border-radius:16px;border:1px solid var(--line);margin-bottom:10px}.ai-msg{padding:10px 12px;border-radius:12px;background:#101b30;margin-bottom:8px}.ai-msg.user{background:#163b6b}
@media (max-width:980px){.hero-grid,.package-grid,.grid-3,.stats,.form-grid.two{grid-template-columns:1fr}.navbar .inner{align-items:flex-start;flex-direction:column}.nav-links,.nav-actions{width:100%}}


:root{
  --bg:#050913;
  --bg-2:#091222;
  --panel:#0c1526;
  --panel-2:#101b31;
  --line:rgba(255,255,255,.07);
  --line-soft:rgba(110,158,255,.18);
  --text:#eef3ff;
  --muted:#9daccc;
  --primary:#3b82f6;
  --primary-2:#60a5fa;
  --gold:#d7b46a;
  --shadow:0 18px 50px rgba(0,0,0,.42);
  --radius:22px;
}

*{
  box-sizing:border-box;
}

html,body{
  margin:0;
  padding:0;
}

body{
  font-family:'Inter',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at top right, rgba(59,130,246,.10), transparent 24%),
    radial-gradient(circle at top left, rgba(215,180,106,.07), transparent 20%),
    linear-gradient(180deg,#04070d 0%, #09111d 42%, #091320 100%);
}

a{
  color:inherit;
  text-decoration:none;
}

img{
  max-width:100%;
  display:block;
}

.container{
  width:min(1280px, calc(100% - 40px));
  margin:0 auto;
}

.site-header{
  position:sticky;
  top:0;
  z-index:1000;
  padding:14px 0;
  backdrop-filter:blur(16px);
  background:rgba(4,8,15,.68);
  border-bottom:1px solid rgba(255,255,255,.05);
}

.nav-shell{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  min-height:74px;
}

.brand{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:220px;
}

.brand img{
  width:52px;
  height:52px;
  object-fit:contain;
}

.brand-text{
  display:flex;
  flex-direction:column;
  line-height:1.05;
}

.brand-title{
  font-weight:800;
  letter-spacing:.02em;
}

.main-nav{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  flex:1;
  flex-wrap:wrap;
}

.main-nav a{
  padding:12px 16px;
  border-radius:12px;
  color:#dfe9ff;
  transition:.2s ease;
}

.main-nav a:hover,
.main-nav a.is-active{
  background:rgba(255,255,255,.06);
}

.nav-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
  min-width:260px;
}

.lang-switch{
  display:flex;
  align-items:center;
  background:rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.08);
  border-radius:999px;
  padding:4px;
}

.lang-switch a{
  min-width:42px;
  height:34px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  color:#d5e2ff;
  font-weight:700;
  font-size:13px;
}

.lang-switch a.active{
  background:linear-gradient(90deg,var(--primary),var(--primary-2));
  color:#fff;
}

.nav-btn{
  min-height:42px;
  padding:0 16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  font-weight:700;
  transition:.2s ease;
}

.nav-btn-soft{
  background:rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.08);
}

.nav-btn-primary{
  background:linear-gradient(90deg,var(--primary),var(--primary-2));
  color:#fff;
  box-shadow:0 10px 24px rgba(59,130,246,.24);
}

.site-footer{
  padding:34px 0 44px;
  border-top:1px solid rgba(255,255,255,.06);
  margin-top:50px;
}

.footer-shell{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:20px;
  flex-wrap:wrap;
}

.footer-brand{
  font-size:20px;
  font-weight:800;
  margin-bottom:10px;
}

.footer-text{
  margin:0;
  color:var(--muted);
  line-height:1.8;
  max-width:650px;
}

.footer-right{
  display:flex;
  flex-wrap:wrap;
  gap:16px;
}

.footer-right a{
  color:#dbe7ff;
}

@media (max-width:1040px){
  .nav-shell{
    flex-direction:column;
    align-items:stretch;
  }

  .brand,
  .nav-actions{
    min-width:auto;
  }

  .main-nav{
    justify-content:flex-start;
  }

  .nav-actions{
    justify-content:flex-start;
  }
}

@media (max-width:740px){
  .container{
    width:min(100% - 24px, 1280px);
  }

  .main-nav{
    gap:6px;
  }

  .main-nav a{
    padding:10px 12px;
    font-size:14px;
  }

  .footer-shell{
    flex-direction:column;
  }
}

.ai-chat-float{
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:9999;
}

/* ปุ่มแชทแบบโปร่ง */
.ai-chat-toggle{
  width:110px;
  height:110px;
  border:none;
  background:transparent;
  padding:0;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:transform .2s ease;
}

/* รูปใหญ่ขึ้น */
.ai-chat-toggle img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
  filter:drop-shadow(0 10px 20px rgba(0,0,0,.35));
}

/* hover ลอยขึ้น */
.ai-chat-toggle:hover{
  transform:translateY(-6px) scale(1.05);
}

/* ตอนกด */
.ai-chat-toggle:active{
  transform:scale(.95);
}

/* ===== AI CHAT FINAL OVERRIDE ===== */
.ai-chat-widget{
  display:none !important;
}

.ai-chat-float{
  position:fixed !important;
  right:24px !important;
  bottom:24px !important;
  z-index:9999 !important;
}

.ai-chat-toggle{
  width:232px !important;
  height:232px !important;
  border:none !important;
  background:transparent !important;
  border-radius:0 !important;
  box-shadow:none !important;
  padding:0 !important;
  cursor:pointer !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  transition:transform .2s ease !important;
}

.ai-chat-toggle:hover{
  transform:translateY(-6px) scale(1.05) !important;
}

.ai-chat-toggle:active{
  transform:scale(.96) !important;
}

.ai-chat-toggle img{
  width:100% !important;
  height:100% !important;
  object-fit:contain !important;
  display:block !important;
  background:transparent !important;
  filter:drop-shadow(0 12px 24px rgba(0,0,0,.32)) !important;
}

.ai-chat-box{
  position:absolute !important;
  right:0 !important;
  bottom:118px !important;
  width:400px !important;
  display:none !important;
  background:linear-gradient(180deg, rgba(10,19,34,.98), rgba(8,14,26,.98)) !important;
  border:1px solid rgba(110,158,255,.18) !important;
  border-radius:22px !important;
  overflow:hidden !important;
  box-shadow:0 24px 70px rgba(0,0,0,.46) !important;
}

.ai-chat-box.open{
  display:block !important;
}

.ai-chat-header{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  padding:16px 18px !important;
  border-bottom:1px solid rgba(255,255,255,.06) !important;
  background:rgba(255,255,255,.02) !important;
}

.ai-chat-header strong{
  font-size:22px !important;
  line-height:1 !important;
}

.ai-chat-header button{
  background:transparent !important;
  border:none !important;
  color:#fff !important;
  font-size:24px !important;
  cursor:pointer !important;
}

.ai-chat-messages{
  height:320px !important;
  overflow-y:auto !important;
  padding:14px !important;
  background:#091321 !important;
}

.ai-msg{
  margin-bottom:10px !important;
  padding:12px 14px !important;
  border-radius:14px !important;
  line-height:1.7 !important;
  font-size:15px !important;
}

.ai-msg-bot{
  background:rgba(255,255,255,.06) !important;
  color:#e8efff !important;
}

.ai-msg-user{
  background:linear-gradient(90deg,#2563eb,#60a5fa) !important;
  color:#fff !important;
  margin-left:40px !important;
}

.ai-chat-form{
  display:flex !important;
  gap:8px !important;
  padding:12px !important;
  border-top:1px solid rgba(255,255,255,.06) !important;
  background:#0a1322 !important;
}

.ai-chat-form input{
  flex:1 !important;
  min-height:46px !important;
  border-radius:14px !important;
  border:1px solid rgba(255,255,255,.08) !important;
  background:#091321 !important;
  color:#fff !important;
  padding:0 14px !important;
  font-size:15px !important;
}

.ai-chat-form button{
  min-width:84px !important;
  border:none !important;
  border-radius:14px !important;
  color:#fff !important;
  font-weight:700 !important;
  background:linear-gradient(90deg,#2563eb,#60a5fa) !important;
  cursor:pointer !important;
}

@media (max-width:740px){
  .ai-chat-float{
    right:16px !important;
    bottom:16px !important;
  }

  .ai-chat-toggle{
    width:194px !important;
    height:194px !important;
  }

  .ai-chat-box{
    width:min(360px, calc(100vw - 24px)) !important;
    bottom:90px !important;
  }
}

.nav-toggle {
  display: none;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
  }

  .main-nav {
    display: none;
  }

  .main-nav.open {
    display: flex;
    flex-direction: column;
  }
}

/* =========================
   PUBLIC NAV FIX
   Desktop + Mobile
========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(4, 10, 24, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.site-header .container {
  width: min(1280px, calc(100% - 32px));
  margin: 0 auto;
}

.nav-shell {
  min-height: 86px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  flex: 0 0 auto;
}

.brand img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 0.95;
}

.brand-title {
  color: #f3f7ff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.main-nav a {
  color: rgba(232,239,255,0.92);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 12px 16px;
  border-radius: 14px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.is-active {
  color: #fff;
  background: rgba(255,255,255,0.07);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.nav-btn-soft {
  color: #eef4ff;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}

.nav-btn-soft:hover {
  background: rgba(255,255,255,0.1);
}

.nav-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #2f6fff 0%, #67b7ff 100%);
  box-shadow: 0 10px 25px rgba(63,129,255,0.28);
}

.nav-btn-primary:hover {
  transform: translateY(-1px);
}

.public-lang-dropdown {
  position: relative;
}

.lang-current {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.lang-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 190px;
  padding: 8px;
  background: #0a1224;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  display: none;
}

.public-lang-dropdown.open .lang-dropdown-menu {
  display: block;
}

.lang-dropdown-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-decoration: none;
  color: #eef4ff;
  padding: 10px 12px;
  border-radius: 12px;
}

.lang-dropdown-menu a:hover,
.lang-dropdown-menu a.active {
  background: rgba(255,255,255,0.08);
}

.lang-dropdown-menu small {
  opacity: 0.65;
  font-size: 12px;
}

.nav-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  color: #fff;
  font-size: 22px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}

/* =========================
   TABLET
========================= */
@media (max-width: 1100px) {
  .main-nav a {
    padding: 11px 12px;
    font-size: 14px;
  }

  .nav-btn {
    padding: 0 14px;
    font-size: 14px;
  }

  .brand-title {
    font-size: 17px;
  }
}

/* =========================
   MOBILE
========================= */
@media (max-width: 860px) {
  .site-header .container {
    width: min(100%, calc(100% - 24px));
  }

  .nav-shell {
    min-height: 78px;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 0;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand img {
    width: 40px;
    height: 40px;
  }

  .brand-title {
    font-size: 16px;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .main-nav {
    display: none;
    order: 10;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-top: 8px;
  }

  .main-nav.open {
    display: flex;
  }

  .main-nav a {
    width: 100%;
    text-align: center;
    padding: 14px 16px;
  }

  .nav-actions {
    display: none;
    order: 11;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding-bottom: 6px;
  }

  .nav-actions.open {
    display: flex;
  }

  .nav-btn,
  .lang-current {
    width: 100%;
    justify-content: center;
  }

  .public-lang-dropdown {
    width: 100%;
  }

  .lang-dropdown-menu {
    position: static;
    width: 100%;
    min-width: 100%;
    margin-top: 8px;
  }
}

.public-lang-dropdown{position:relative}
.public-lang-dropdown .lang-current{min-height:42px;padding:0 14px;border-radius:12px;border:1px solid rgba(255,255,255,.08);background:rgba(255,255,255,.05);color:#dbe7ff;display:inline-flex;align-items:center;gap:10px;font-weight:700;cursor:pointer}
.public-lang-dropdown .lang-dropdown-menu{position:absolute;right:0;top:calc(100% + 10px);min-width:220px;background:#0d1524;border:1px solid rgba(255,255,255,.08);border-radius:16px;box-shadow:0 18px 40px rgba(0,0,0,.35);padding:8px;display:none}
.public-lang-dropdown.open .lang-dropdown-menu{display:block}
.public-lang-dropdown .lang-dropdown-menu a{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border-radius:12px;color:#dbe7ff}
.public-lang-dropdown .lang-dropdown-menu a:hover,.public-lang-dropdown .lang-dropdown-menu a.active{background:rgba(255,255,255,.06)}
.public-lang-dropdown .lang-dropdown-menu small{opacity:.75}
