/* ------------------------------------------------------------------
   SiamGold — สไตล์ร่วมของหน้าสาธารณะ (ติดต่อเรา / นโยบายความเป็นส่วนตัว)
   ใช้กับ layout "login" เท่านั้น คลาสขึ้นต้นด้วย sg- ทั้งหมดเพื่อไม่ชน
   กับธีม metronic ใน theme_portal/
   ------------------------------------------------------------------ */

.sg-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 10px 0 56px;
  color: #3A3427;
  font-family: 'Noto Sans Thai', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.8;
}
.sg-page *,
.sg-page *:before,
.sg-page *:after { box-sizing: border-box; }

/* ---------- หัวหน้า (hero) ---------- */
.sg-hero {
  position: relative;
  overflow: hidden;
  margin: 22px 0 26px;
  padding: 40px 30px 36px;
  text-align: center;
  border: 1px solid #F0DFA8;
  border-radius: 18px;
  background: linear-gradient(135deg, #FFFAEC 0%, #FDF0CA 48%, #F8DE9B 100%);
  box-shadow: 0 10px 30px rgba(176, 124, 8, .10);
}
.sg-hero:before,
.sg-hero:after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .45);
  pointer-events: none;
}
.sg-hero:before { width: 230px; height: 230px; top: -110px; right: -70px; }
.sg-hero:after  { width: 150px; height: 150px; bottom: -80px; left: -50px; }

.sg-hero-logo {
  position: relative;
  display: inline-block;
  margin-bottom: 18px;
  padding: 14px 22px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(122, 90, 12, .14);
}
.sg-hero-logo img { display: block; width: 190px; max-width: 100%; height: auto; }

.sg-hero h1 {
  position: relative;
  margin: 0;
  font-size: 30px;
  line-height: 1.45;
  font-weight: 700;
  color: #4A3A10;
}
.sg-hero p {
  position: relative;
  margin: 14px auto 0;
  max-width: 760px;
  font-size: 16px;
  color: #6E5C2C;
}
.sg-hero-rule {
  position: relative;
  width: 72px;
  height: 4px;
  margin: 16px auto 0;
  border-radius: 4px;
  background: linear-gradient(90deg, #EDB011, #FCC843);
}

/* ---------- การ์ด ---------- */
.sg-card {
  background: #fff;
  border: 1px solid #EFE7D3;
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 6px 22px rgba(74, 58, 16, .06);
}
.sg-card + .sg-card { margin-top: 22px; }
.sg-card-title {
  margin: 0 0 18px;
  font-size: 20px;
  font-weight: 700;
  color: #3A3427;
}
.sg-card-title small {
  display: block;
  margin-top: 4px;
  font-size: 14.5px;
  font-weight: 400;
  color: #8B8069;
}

/* ---------- กริด 2 คอลัมน์ ---------- */
.sg-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: flex-start;
}
.sg-col-info { flex: 1 1 330px; min-width: 0; }
.sg-col-form { flex: 1.25 1 420px; min-width: 0; }

/* ---------- รายการช่องทางติดต่อ ---------- */
.sg-contact-list { margin: 0; padding: 0; list-style: none; }
.sg-contact-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 0;
  border-top: 1px dashed #EFE7D3;
}
.sg-contact-list li:first-child { padding-top: 0; border-top: 0; }
.sg-contact-list li:last-child { padding-bottom: 0; }

.sg-ic {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  color: #7A5504;
  background: linear-gradient(135deg, #FDECB9, #F7CD57);
  box-shadow: 0 3px 10px rgba(237, 176, 17, .28);
}
.sg-ic svg { display: block; width: 21px; height: 21px; }

.sg-contact-label {
  font-size: 13.5px;
  color: #9A8F76;
  line-height: 1.5;
}
.sg-contact-value {
  font-size: 17px;
  font-weight: 600;
  color: #3A3427;
  word-break: break-word;
}
.sg-contact-value a { color: #A87A07; text-decoration: none; }
.sg-contact-value a:hover,
.sg-contact-value a:focus { color: #7A5504; text-decoration: underline; }
.sg-contact-sub { margin-top: 4px; font-size: 14px; }
.sg-contact-sub a { color: #A87A07; text-decoration: none; }
.sg-contact-sub a:hover { color: #7A5504; text-decoration: underline; }

/* ---------- ฟอร์ม ---------- */
.sg-form .form-group { margin-bottom: 18px; }
.sg-form label,
.sg-form .control-label {
  display: block;
  margin-bottom: 7px;
  font-size: 15px;
  font-weight: 600;
  color: #4A4332;
}
.sg-form .form-control {
  height: auto;
  padding: 12px 15px;
  font-size: 16px;
  line-height: 1.6;
  color: #3A3427;
  background-color: #FFFDF7;
  border: 1px solid #E3DAC3;
  border-radius: 10px;
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.sg-form .form-control:focus {
  background-color: #fff;
  border-color: #EDB011;
  box-shadow: 0 0 0 3px rgba(237, 176, 17, .18);
  outline: 0;
}
.sg-form .form-control::-webkit-input-placeholder { color: #B3A992; }
.sg-form .form-control::placeholder { color: #B3A992; }
.sg-form textarea.form-control { min-height: 150px; resize: vertical; }
.sg-form .help-block { margin: 7px 0 0; font-size: 13.5px; color: #8B8069; }
.sg-form .has-error .form-control { border-color: #D9534F; background-color: #FFFBFB; }
.sg-form .has-error .form-control:focus { box-shadow: 0 0 0 3px rgba(217, 83, 79, .16); }
.sg-form .has-error .help-block { color: #A94442; }

.sg-captcha .sg-captcha-box {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.sg-captcha img {
  flex: 0 0 auto;
  max-width: 100%;
  height: 46px;
  padding: 3px;
  background: #fff;
  border: 1px solid #E3DAC3;
  border-radius: 10px;
  cursor: pointer;
}
.sg-captcha .sg-captcha-input { flex: 1 1 180px; min-width: 0; }

.sg-btn {
  display: block;
  width: 100%;
  padding: 14px 26px;
  border: 0;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 600;
  color: #4A3A10;
  background: linear-gradient(180deg, #FCC843 0%, #EDB011 100%);
  box-shadow: 0 6px 16px rgba(237, 176, 17, .34);
  transition: background .15s ease, box-shadow .15s ease, transform .08s ease;
}
.sg-btn:hover,
.sg-btn:focus {
  color: #3A2D08;
  background: linear-gradient(180deg, #FFD467 0%, #E3A607 100%);
  box-shadow: 0 8px 20px rgba(237, 176, 17, .44);
  outline: 0;
}
.sg-btn:active { transform: translateY(1px); box-shadow: 0 3px 10px rgba(237, 176, 17, .32); }

/* ---------- แจ้งเตือน ---------- */
.sg-page .alert {
  padding: 15px 18px;
  margin-bottom: 22px;
  font-size: 15px;
  border: 1px solid transparent;
  border-radius: 12px;
  box-shadow: none;
}
.sg-page .alert-success { color: #33691E; background-color: #F1F8EC; border-color: #CDE8C4; }
.sg-page .alert-danger  { color: #A03028; background-color: #FDEEED; border-color: #F5C6C2; }
.sg-page .alert .close { color: inherit; opacity: .5; }

/* ---------- สารบัญ (หน้านโยบาย) ---------- */
.sg-toc {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sg-toc a {
  display: flex;
  gap: 11px;
  align-items: center;
  height: 100%;
  padding: 12px 15px;
  font-size: 15px;
  line-height: 1.5;
  color: #4A4332;
  text-decoration: none;
  background: #FFFDF6;
  border: 1px solid #F0E7D2;
  border-radius: 12px;
  transition: border-color .15s ease, background .15s ease, color .15s ease, transform .08s ease;
}
.sg-toc a:hover,
.sg-toc a:focus {
  color: #7A5504;
  text-decoration: none;
  background: #FFF8E4;
  border-color: #EDB011;
  transform: translateY(-1px);
}

.sg-num {
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  color: #5A420A;
  background: linear-gradient(135deg, #FDECB9, #F7CD57);
}

/* ---------- ส่วนเนื้อหานโยบาย ---------- */
.sg-sec {
  padding: 28px 0;
  border-top: 1px solid #F2EBDB;
  scroll-margin-top: 20px;
}
.sg-sec:first-child { padding-top: 4px; border-top: 0; }
.sg-sec:last-child { padding-bottom: 4px; }
.sg-sec > h2 {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 0 0 14px;
  font-size: 20px;
  line-height: 1.5;
  font-weight: 700;
  color: #3A3427;
}
.sg-sec > h2 .sg-num { flex-basis: 31px; width: 31px; height: 31px; font-size: 14px; }
.sg-sec p { margin: 0 0 14px; color: #4E4739; }
.sg-sec p:last-child { margin-bottom: 0; }

.sg-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: sgitem;
}
.sg-list > li {
  position: relative;
  padding-left: 36px;
  margin-bottom: 14px;
  color: #4E4739;
}
.sg-list > li:last-child { margin-bottom: 0; }
.sg-list > li:before {
  counter-increment: sgitem;
  content: counter(sgitem);
  position: absolute;
  left: 0;
  top: 5px;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  color: #7A5504;
  background: #FBEFC8;
}

.sg-rights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: sgright;
}
.sg-rights > li {
  position: relative;
  padding: 12px 15px 12px 46px;
  font-size: 15px;
  line-height: 1.6;
  color: #4E4739;
  background: #FFFDF6;
  border: 1px solid #F0E7D2;
  border-radius: 12px;
}
.sg-rights > li:before {
  counter-increment: sgright;
  content: counter(sgright);
  position: absolute;
  left: 13px;
  top: 13px;
  width: 23px;
  height: 23px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  color: #5A420A;
  background: linear-gradient(135deg, #FDECB9, #F7CD57);
}

.sg-highlight {
  padding: 20px 22px;
  background: #FFFBEF;
  border: 1px solid #F0DFA8;
  border-radius: 14px;
}
.sg-highlight p:last-child { margin-bottom: 0; }

.sg-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.sg-chip {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  padding: 11px 18px;
  font-size: 15px;
  font-weight: 600;
  color: #7A5504;
  text-decoration: none;
  background: #FFF6DC;
  border: 1px solid #F0DFA8;
  border-radius: 999px;
  transition: background .15s ease, color .15s ease, transform .08s ease;
}
.sg-chip:hover,
.sg-chip:focus {
  color: #5A420A;
  text-decoration: none;
  background: #FDEBBF;
  transform: translateY(-1px);
}
.sg-chip svg { display: block; width: 17px; height: 17px; }

.sg-backtop {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  margin-top: 22px;
  font-size: 14.5px;
  color: #8B8069;
  text-decoration: none;
}
.sg-backtop:hover, .sg-backtop:focus { color: #7A5504; text-decoration: none; }
.sg-backtop svg { width: 15px; height: 15px; }

/* ---------- จอเล็ก ---------- */
@media (max-width: 767px) {
  .sg-page { padding-bottom: 36px; font-size: 15.5px; }
  .sg-hero { margin: 16px 0 20px; padding: 28px 18px 26px; border-radius: 14px; }
  .sg-hero-logo { padding: 11px 18px; }
  .sg-hero-logo img { width: 150px; }
  .sg-hero h1 { font-size: 23px; }
  .sg-hero p { font-size: 15px; }
  .sg-card { padding: 20px 17px; border-radius: 14px; }
  .sg-card-title { font-size: 18px; }
  .sg-sec { padding: 22px 0; }
  .sg-sec > h2 { font-size: 18px; align-items: flex-start; }
  .sg-grid { gap: 16px; }
}
