:root {
  --bg-color: #f4f7fe;
  --color-white: #ffffff;
  --color-main: #2b3674;
  --color-hove: #9ea7bb;
}

/* === Normalize.css (ปรับปรุง) === */
/* 1. ตั้งค่าพื้นฐานให้เหมือนกันในทุกเบราว์เซอร์ */
html {
  box-sizing: border-box;
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  /* ป้องกัน iOS ซูมอัตโนมัติ */
  -webkit-tap-highlight-color: transparent;
  /* ลดเอฟเฟกต์แตะบนมือถือ */
}

*, *::before, *::after {
  box-sizing: inherit;
  margin: 0;
  padding: 0;
}

/* 2. ปรับ body ให้เริ่มต้นอย่างเหมาะสม */
body {
  font-family: "Poppins", "Prompt", system-ui, sans-serif;
  line-height: 1.6;
  text-rendering: optimizeSpeed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-color);
  color: var(--color-main);
}

/* 3. ปรับ heading และข้อความให้สม่ำเสมอ */
h1, h2, h3, h4, h5, h6 {
  font-size: inherit;
  font-weight: inherit;
  line-height: 1.3;
}

p {
  margin-bottom: 1rem;
}

/* 4. รีเซ็ต list และ table */
ul, ol {
  list-style: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}

/* 5. ปรับ a และป้องกัน outline ที่ไม่น่าพึงประสงค์ */
a {
  text-decoration: none;
  color: inherit;
}

a:focus-visible {
  outline: 2px solid #007bff;
  outline-offset: 2px;
}

/* 6. ปรับ input, button และ element ที่ใช้ interact */
input, button, textarea, select {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

textarea {
  resize: vertical;
}

/* 7. ปรับปรุงภาพและวิดีโอ */
img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* 8. ป้องกัน text overflow */
pre, code {
  white-space: pre-wrap;
  word-break: break-word;
  background-color: #e5e5e5;
  border-radius: 6px;
  padding: 12px;
}

/* 9. รีเซ็ต iframe ให้แสดงผลเต็มที่ */
iframe {
  border: 0;
  width: 100%;
}

/* Width of the scrollbar */
::-webkit-scrollbar {
  width: 0px;
  height: 0px;
}

/* Track (background of scrollbar) */
::-webkit-scrollbar-track {
  background: var(--bg-color);
  border-radius: 10px;
}

/* Handle (scroll thumb) */
::-webkit-scrollbar-thumb {
  background: var(--color-main);
  border-radius: 6px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
  background: #555;
}


/* 10. ปรับแต่งโหมดมืด */
/* @media (prefers-color-scheme: dark) {
  body {
    background-color: #121212;
    color: #e0e0e0;
  }

  a {
    color: #4da3ff;
  }
} */
.text-left {
  text-align: left;
  /* display: flex;
  justify-content: start; */
}
.text-center {
  text-align: center;
  /* display: flex;
  justify-content: center; */
}
.text-right {
  text-align: right;
  /* display: flex;
  justify-content: end; */
}

.box-right{
  display: flex;
  justify-content: end;
  gap: 1rem;
}
