/* ============================================================
   IT SMART NETWORK — Enterprise Dark Theme
   itsn.co.th  |  Global Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Sarabun:wght@300;400;500;600;700&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg-primary:    #080c18;
  --bg-secondary:  #0d1225;
  --bg-card:       #111827;
  --bg-card-hover: #151f35;
  --border:        rgba(0, 180, 255, 0.12);
  --border-hover:  rgba(0, 180, 255, 0.35);

  --accent:        #00b4ff;
  --accent-glow:   rgba(0, 180, 255, 0.25);
  --accent-dark:   #0077cc;
  --accent-green:  #00e5a0;
  --accent-orange: #ff8c42;
  --accent-red:    #ff4d6d;

  --text-primary:  #e8f0fe;
  --text-secondary:#8da0c4;
  --text-muted:    #4a5568;

  --nav-height:    68px;
  --radius:        12px;
  --radius-lg:     20px;
  --shadow:        0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow:   0 0 32px rgba(0, 180, 255, 0.15);

  --font-th: 'Sarabun', sans-serif;
  --font-en: 'Inter', sans-serif;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-th);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: #fff; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; }

/* ── Background Grid ────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(0, 180, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 180, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

/* ── Navigation ─────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-height);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px;
  background: rgba(8, 12, 24, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s;
}
.navbar.scrolled { box-shadow: 0 4px 32px rgba(0,0,0,.6); }

.nav-logo {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-en);
}
.nav-logo .logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: #fff;
  letter-spacing: -1px;
  box-shadow: 0 0 16px var(--accent-glow);
}
.nav-logo .logo-text { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.nav-logo .logo-sub { font-size: 10px; color: var(--accent); letter-spacing: 2px; text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a {
  color: var(--text-secondary);
  font-size: 14px; font-weight: 500;
  padding: 8px 16px; border-radius: 8px;
  transition: all .2s;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--text-primary);
  background: rgba(0, 180, 255, 0.08);
}
.nav-links a.active { color: var(--accent); }

.nav-cta {
  display: flex; align-items: center; gap: 12px;
}
.btn-nav {
  padding: 9px 20px; border-radius: 8px;
  font-size: 14px; font-weight: 600;
  border: 1px solid var(--border-hover);
  color: var(--accent); background: transparent;
  transition: all .2s;
}
.btn-nav:hover { background: var(--accent-glow); color: #fff; }
.btn-nav-primary {
  padding: 9px 20px; border-radius: 8px;
  font-size: 14px; font-weight: 600;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  transition: all .2s;
  box-shadow: 0 0 16px var(--accent-glow);
}
.btn-nav-primary:hover { transform: translateY(-1px); box-shadow: 0 0 24px var(--accent-glow); color: #fff; }

.nav-hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  background: none; border: none; padding: 4px;
}
.nav-hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--text-secondary); border-radius: 2px;
  transition: all .3s;
}

/* ── Page Wrapper ───────────────────────────────────────────── */
.page-wrapper { padding-top: var(--nav-height); min-height: 100vh; position: relative; z-index: 1; }

/* ── Section Shared ─────────────────────────────────────────── */
.section { padding: 100px 48px; }
.section-sm { padding: 60px 48px; }
.container { max-width: 1200px; margin: 0 auto; }

.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-en);
  font-size: 11px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--accent);
  padding: 6px 14px; border-radius: 20px;
  background: rgba(0, 180, 255, 0.08);
  border: 1px solid rgba(0, 180, 255, 0.2);
  margin-bottom: 16px;
}
.section-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800; line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 16px;
}
.section-title span { color: var(--accent); }
.section-desc {
  font-size: 17px; color: var(--text-secondary);
  max-width: 560px; line-height: 1.8;
}
.text-center { text-align: center; }
.text-center .section-desc { margin: 0 auto; }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: 10px;
  font-size: 15px; font-weight: 600;
  border: none; transition: all .25s;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 0 24px var(--accent-glow);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 36px rgba(0,180,255,.4); color: #fff; }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-hover);
  color: var(--text-primary);
}
.btn-outline:hover { background: rgba(0,180,255,.07); border-color: var(--accent); color: var(--accent); }
.btn-ghost {
  background: rgba(255,255,255,.04);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(255,255,255,.08); color: var(--text-primary); }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all .3s;
}
.card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 600; font-family: var(--font-en);
}
.badge-blue   { background: rgba(0,180,255,.12); color: var(--accent); border: 1px solid rgba(0,180,255,.25); }
.badge-green  { background: rgba(0,229,160,.12); color: var(--accent-green); border: 1px solid rgba(0,229,160,.25); }
.badge-orange { background: rgba(255,140,66,.12); color: var(--accent-orange); border: 1px solid rgba(255,140,66,.25); }
.badge-red    { background: rgba(255,77,109,.12); color: var(--accent-red); border: 1px solid rgba(255,77,109,.25); }

/* ── Form Elements ──────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; margin-bottom: 8px;
  font-size: 14px; font-weight: 600; color: var(--text-secondary);
}
.form-group label span.required { color: var(--accent-red); margin-left: 3px; }
.form-control {
  width: 100%; padding: 12px 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 15px; font-family: inherit;
  transition: all .2s;
  outline: none;
  -webkit-appearance: none;
}
.form-control:focus {
  border-color: var(--accent);
  background: rgba(0,180,255,.04);
  box-shadow: 0 0 0 3px rgba(0,180,255,.1);
}
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ── Alert / Toast ──────────────────────────────────────────── */
.alert {
  padding: 14px 18px; border-radius: var(--radius);
  font-size: 14px; display: flex; align-items: center; gap: 10px;
}
.alert-success { background: rgba(0,229,160,.08); border: 1px solid rgba(0,229,160,.25); color: var(--accent-green); }
.alert-error   { background: rgba(255,77,109,.08); border: 1px solid rgba(255,77,109,.25); color: var(--accent-red); }
.alert-info    { background: rgba(0,180,255,.08);  border: 1px solid rgba(0,180,255,.25);  color: var(--accent); }

/* ── Divider ────────────────────────────────────────────────── */
.divider {
  border: none; border-top: 1px solid var(--border);
  margin: 48px 0;
}

/* ── Stats ──────────────────────────────────────────────────── */
.stat-num {
  font-family: var(--font-en);
  font-size: 42px; font-weight: 800;
  color: var(--text-primary); line-height: 1;
}
.stat-num span { color: var(--accent); }
.stat-label { font-size: 14px; color: var(--text-secondary); margin-top: 6px; }

/* ── Status Dot ─────────────────────────────────────────────── */
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  display: inline-block;
}
.status-dot.online  { background: var(--accent-green); box-shadow: 0 0 6px var(--accent-green); animation: pulse 2s infinite; }
.status-dot.busy    { background: var(--accent-orange); }
.status-dot.offline { background: var(--text-muted); }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

/* ── Icon Box ───────────────────────────────────────────────── */
.icon-box {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  background: rgba(0,180,255,.1);
  border: 1px solid rgba(0,180,255,.2);
  margin-bottom: 16px;
}

/* ── Page Hero (inner pages) ────────────────────────────────── */
.page-hero {
  padding: 80px 48px 60px;
  background: linear-gradient(180deg, rgba(0,180,255,.05) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}
.page-hero-inner { max-width: 1200px; margin: 0 auto; }
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 16px;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--text-muted); }

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 64px 48px 32px;
}
.footer-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 48px;
}
.footer-col h4 {
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--text-muted); margin-bottom: 16px;
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: var(--text-secondary); font-size: 14px; }
.footer-col ul li a:hover { color: var(--accent); }
.footer-brand p { font-size: 14px; color: var(--text-secondary); margin-top: 16px; line-height: 1.7; }
.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 24px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-muted);
}
.footer-badges { display: flex; gap: 8px; }

/* ── Mobile Nav Menu ────────────────────────────────────────── */
.mobile-menu {
  display: none;
  position: fixed; top: var(--nav-height); left: 0; right: 0;
  background: rgba(8, 12, 24, 0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px; z-index: 999;
  flex-direction: column; gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: var(--text-secondary); font-size: 15px; font-weight: 500;
  padding: 12px 16px; border-radius: 8px;
  transition: all .2s;
}
.mobile-menu a:hover, .mobile-menu a.active {
  background: rgba(0,180,255,.08);
  color: var(--accent);
}
.mobile-menu .btn-nav-primary {
  margin-top: 8px; text-align: center;
  display: flex; align-items: center; justify-content: center;
}

/* ── Scroll to Top ──────────────────────────────────────────── */
.scroll-top {
  position: fixed; bottom: 28px; right: 28px;
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-hover);
  color: var(--accent); font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: all .3s;
  z-index: 100; box-shadow: var(--shadow);
}
.scroll-top.show { opacity: 1; pointer-events: auto; }
.scroll-top:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }

/* ── Animations ─────────────────────────────────────────────── */
.fade-in { opacity: 0; transform: translateY(24px); transition: all .6s cubic-bezier(.2,.8,.2,1); }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in-delay-1 { transition-delay: .1s; }
.fade-in-delay-2 { transition-delay: .2s; }
.fade-in-delay-3 { transition-delay: .3s; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .navbar { padding: 0 24px; }
  .section { padding: 80px 24px; }
  .section-sm { padding: 48px 24px; }
  .page-hero { padding: 60px 24px 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  footer { padding: 48px 24px 24px; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-links, .nav-cta { display: none; }
  .nav-hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}
