/* ============================================================
   MICRON SOFTWARE SERVICE — Modern Redesign 2024
   Shared Stylesheet
   ============================================================ */

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

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:        #0F1C3F;
  --navy-mid:    #1a2f5e;
  --navy-light:  #1d3a6b;
  --accent:      #E8A020;
  --accent-lt:   #FFC94D;
  --teal:        #0E9F8A;
  --coral:       #E05A2B;
  --purple:      #534AB7;
  --soft-bg:     #F7F8FC;
  --card-bg:     #FFFFFF;
  --text-main:   #1a1a2e;
  --text-muted:  #6b7280;
  --border:      rgba(0,0,0,0.08);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Sarabun', sans-serif;
  background: var(--soft-bg);
  color: var(--text-main);
  font-size: 15px;
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ---- TOPBAR / NAV ---- */
.topbar {
  background: var(--navy);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 2px solid var(--accent);
  box-shadow: 0 2px 16px rgba(15,28,63,0.25);
}
.logo-area { display: flex; align-items: center; gap: 12px; }
.logo-icon {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; color: var(--navy);
  font-family: 'Kanit', sans-serif;
  flex-shrink: 0;
}
.logo-text {
  color: #fff;
  font-family: 'Kanit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}
.logo-text span {
  color: rgba(255,255,255,0.55);
  display: block;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  gap: 2px;
  list-style: none;
  flex-wrap: wrap;
}
.nav-links li { position: relative; }
.nav-links li a {
  color: rgba(255,255,255,0.75);
  font-size: 11.5px;
  padding: 7px 11px;
  border-radius: 6px;
  transition: all 0.2s;
  font-family: 'Kanit', sans-serif;
  letter-spacing: 0.4px;
  display: block;
  white-space: nowrap;
}
.nav-links li a:hover { color: #fff; background: rgba(255,255,255,0.1); }
.nav-links li a.active { color: var(--accent); background: rgba(232,160,32,0.12); }

/* Dropdown */
.nav-links li ul {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: var(--navy-mid);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 6px;
  min-width: 160px;
  z-index: 300;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.nav-links li:hover ul { display: block; }
.nav-links li ul li a {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 5px;
}

/* ---- PAGE HERO (inner pages) ---- */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 60%, var(--navy-light) 100%);
  padding: 2.5rem 2rem;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: '';
  position: absolute;
  bottom: -40px; right: -40px;
  width: 180px; height: 180px;
  border: 30px solid rgba(232,160,32,0.08);
  border-radius: 50%;
}
.page-hero-inner { max-width: 960px; margin: 0 auto; }
.breadcrumb {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 8px;
  font-family: 'Kanit', sans-serif;
  letter-spacing: 1px;
}
.breadcrumb a { color: rgba(255,255,255,0.55); }
.breadcrumb a:hover { color: var(--accent); }
.page-hero h1 {
  font-family: 'Kanit', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.page-hero h1 span { color: var(--accent); }
.page-hero p {
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  margin-top: 6px;
  max-width: 600px;
}

/* ---- MAIN CONTENT WRAPPER ---- */
.page-body {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem;
}

/* ---- SECTION LABELS ---- */
.sec-label {
  font-family: 'Kanit', sans-serif;
  font-size: 11px;
  font-weight: 600;
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin-bottom: 4px;
}
.sec-title {
  font-family: 'Kanit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1.25rem;
}

/* ---- CARDS ---- */
.card {
  background: var(--card-bg);
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
  box-shadow: 0 8px 28px rgba(15,28,63,0.09);
  transform: translateY(-2px);
}
.card-accent-top::before {
  content: '';
  display: block;
  height: 3px;
  border-radius: 3px 3px 0 0;
  margin: -1.5rem -1.5rem 1rem;
}
.card-teal::before  { background: var(--teal); }
.card-amber::before { background: var(--accent); }
.card-purple::before { background: var(--purple); }
.card-coral::before { background: var(--coral); }
.card-navy::before  { background: var(--navy); }

/* ---- GRID ---- */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }

/* ---- TAGS / BADGES ---- */
.tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  font-family: 'Kanit', sans-serif;
  letter-spacing: 0.5px;
}
.tag-teal   { background: rgba(14,159,138,0.12); color: #0a7a6a; }
.tag-amber  { background: rgba(232,160,32,0.12); color: #9a6a0a; }
.tag-purple { background: rgba(83,74,183,0.12); color: #4a42a0; }
.tag-coral  { background: rgba(224,90,43,0.12); color: #b84520; }
.tag-navy   { background: rgba(15,28,63,0.1); color: var(--navy); }

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 22px;
  border-radius: 8px;
  border: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Kanit', sans-serif;
  transition: all 0.2s;
  text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--navy); }
.btn-primary:hover { background: var(--accent-lt); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1px solid rgba(15,28,63,0.25);
}
.btn-outline:hover { background: rgba(15,28,63,0.05); }
.btn-sm { padding: 7px 16px; font-size: 12px; }

/* ---- FEATURE LIST ---- */
.feature-list { list-style: none; margin: 0; }
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-main);
}
.feature-list li:last-child { border-bottom: none; }
.feature-list li::before {
  content: '✓';
  color: var(--teal);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ---- MODULE PILLS ---- */
.modules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 1rem 0;
}
.module-pill {
  background: var(--navy);
  color: #fff;
  font-family: 'Kanit', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

/* ---- TABLE ---- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 1rem 0;
}
.data-table th {
  background: var(--navy);
  color: #fff;
  padding: 10px 14px;
  font-family: 'Kanit', sans-serif;
  font-weight: 600;
  text-align: left;
  font-size: 12px;
  letter-spacing: 0.5px;
}
.data-table th:first-child { border-radius: 8px 0 0 0; }
.data-table th:last-child  { border-radius: 0 8px 0 0; }
.data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
}
.data-table tr:nth-child(even) td { background: #f9fafb; }
.data-table tr:hover td { background: #eef2ff; }

/* ---- INFO BOX ---- */
.info-box {
  background: rgba(14,159,138,0.07);
  border: 1px solid rgba(14,159,138,0.25);
  border-left: 4px solid var(--teal);
  border-radius: 0 8px 8px 0;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: 14px;
  line-height: 1.6;
}
.info-box.amber {
  background: rgba(232,160,32,0.07);
  border-color: rgba(232,160,32,0.25);
  border-left-color: var(--accent);
}

/* ---- CONTACT ROW ---- */
.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.contact-row:last-child { border-bottom: none; }
.contact-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}
.ci-teal   { background: rgba(14,159,138,0.12); color: var(--teal); }
.ci-amber  { background: rgba(232,160,32,0.12); color: #9a6a0a; }
.ci-purple { background: rgba(83,74,183,0.12); color: var(--purple); }
.contact-label { font-size: 11px; color: var(--text-muted); display: block; }
.contact-value { font-family: 'Kanit', sans-serif; font-weight: 600; color: var(--navy); }

/* ---- STATS BAR ---- */
.stats-bar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: center;
}
.stat-item {
  text-align: center;
  padding: 0.9rem 2rem;
  border-right: 1px solid var(--border);
  flex: 1;
  max-width: 200px;
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-family: 'Kanit', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  display: block;
  line-height: 1.2;
}
.stat-num em { color: var(--accent); font-style: normal; }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ---- DIVIDER ---- */
.divider { height: 1px; background: var(--border); margin: 2rem 0; }

/* ---- FOOTER ---- */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.55);
  padding: 2rem;
  border-top: 2px solid var(--accent);
  margin-top: 3rem;
}
.footer-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: flex-start;
}
.footer-brand .logo-text { margin-top: 8px; font-size: 13px; }
.footer-contact { font-size: 12px; line-height: 1.9; }
.footer-contact a { color: var(--accent-lt); }
.footer-bottom {
  max-width: 960px;
  margin: 1.25rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
}
.footer-bottom span { color: var(--accent); }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .topbar { flex-direction: column; height: auto; padding: 10px 1rem; gap: 8px; }
  .nav-links { gap: 2px; justify-content: center; }
  .page-body { padding: 1.25rem 1rem; }
  .stat-item { padding: 0.75rem 1rem; }
  .footer-inner { flex-direction: column; }
}
