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

body {
  font-family: "Kanit", "Segoe UI", Verdana, Geneva, Tahoma, sans-serif;
  background-color: white;
  color: rgb(56, 56, 56);
}

.wrapper {
  width: 1100px;
  max-width: 90%;
  margin: 0 auto;

  /* background-color: rgb(207, 124, 15); */
}

a {
  color: #898a88;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
.site-header {
  background-color: white;
  padding: 20px 0;
  border-bottom: 2px solid rgb(118, 115, 115);
}

.box-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-title {
  font-weight: 700;
  /* ค่า defult 16 */
  /* ให้รองรับ responsive ใช้ rem */
  font-size: 1.5rem;
  margin-bottom: 4px;
}

.header-subtitle {
  font-weight: 400;
  font-size: 0.8rem;
  color: gray;
}

.social-icon a {
  font-weight: 600;
  font-size: 1rem;
  color: rgb(54, 54, 54);

  border: 1px solid rgb(54, 54, 54);
  border-radius: 50%;
  width: 30px;
  height: 30px;

  display: inline-flex;
  justify-content: center;
  align-items: center;

  margin-left: 10px;

  transition: all 0.3s ease;
}

.social-icon a:hover {
  border-color: rgb(255, 255, 255);
  background-color: rgb(158, 161, 159);
  color: #f3efef;

  transform: translateY(-5px);
}

/* Navbar */

.main-nav {
  background-color: rgb(42, 40, 40);
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  /* gap: 15px; */
}

.nav-menu li a {
  color: #f3efef;
  font-size: 0.9rem;
  font-weight: 400;

  display: block;
  padding: 10px 15px;
}

.nav-menu li a:hover,
.nav-menu li a.active {
  background-color: rgb(158, 161, 159);
}

/* Hero */
.hero-content {
  background-color: #e2e2e2;
  padding: 30px 0;
  box-shadow: 0 4px 15px whitesmoke;
  margin-bottom: 30px;
}

.hero-title {
  font-size: 2rem;
  font-weight: 700;
  color: #3f3f3f;
  text-shadow: 2px 2px 4px #cecaca;

  text-align: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(250px, 1fr));
  gap: 20px;
}

/*
        grid-template-columns: 1fr 1fr;
        grid-template-columns: repeat(2, 1fr);
        grid-template-columns: repeat(2, minmax(250px, 1fr));
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    */

.hero-item {
  background-color: #ffffff;
  padding: 25px;
  border-radius: 8px;
}

.hero-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  background: white;
}

.hero-item h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #333;
  line-height: 1.3;
  margin-bottom: 10px;
}

.hero-item p {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
}

.hero-item .read-more {
  font-size: 0.9rem;
  font-weight: 500;
  color: #1e8bc3;

  display: inline-block;
}

.hero-item .read-more:hover {
  color: #764ba2;
  text-decoration: none;
}

.hero-item .read-more::after {
  content: "→";
  margin-left: 5px;

  transition: margin-left 0.3s ease;
}

.hero-item .read-more:hover::after {
  margin-left: 10px;
}

/* Page Section */
.content-layout {
  display: grid;
  grid-template-columns: 2fr 0.9fr;
  gap: 20px;
  /* background-color: #1e8bc3; */
}

/* POSTS - Main - Left */

.post-list {
  display: flex;
  flex-direction: column;
}

.card {
  background-color: #ffffff;
  border-radius: 6px;
  padding: 20px;
  box-shadow: none;
  border: 1px solid #e5e7eb;
  margin-bottom: 20px;
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.date-circle {
  width: 50px;
  height: 50px;
  background-color: #1e8bc3;
  border-radius: 50%;

  font-size: 0.65rem;
  color: #ffffff;
  font-weight: 600;

  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.date-day {
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 0.9;
}

.post-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.card-header-line {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  color: #666;
}

.post-footer {
  color: #555;
  font-size: 0.65rem;

  border-top: 1px solid rgb(163, 163, 163);
  padding-top: 8px;
}

/* Card Imgae */
.post-image {
  height: 200px;
  overflow: hidden;

  margin-top: 15px;
}

.post-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.post-detail {
  color: #555;
  font-size: 0.8rem;
  line-height: 1.6;
}

/* Table Style */
.table-description {
  font-size: 14px;
  color: #666;
  line-height: 1.5;
  margin-bottom: 15px;
}

.comparison-table {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin: 20px 0;

  /* border: 2px solid #fc2525; */
  /* border-collapse: collapse; */
  overflow: hidden;
}

.comparison-table th {
  background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
  color: white;
  font-size: 16px;
  font-weight: 600;

  text-align: left;
  padding: 15px;
}

.comparison-table td {
  border-bottom: 1px solid #e0e0e0;
  background-color: #ffffff;
  padding: 12px 15px;
}

.comparison-table tr:nth-child(even) td {
  background-color: #f8f9fa;
}

.comparison-table tr:hover td {
  background-color: #e3f2fd;
  transition: background-color 0.3s ease;
}

.comparison-table .feature {
  font-weight: 600;
  color: #333;
  background-color: #f0f4f8;
}

.comparison-table .pro {
  color: #28a745;
  font-weight: 500;
}

.comparison-table .con {
  color: #dc3545;
  font-weight: 500;
}

.comparison-table .neutral {
  color: #6c757d;
}

/* SIDEBAR - Right */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.sidebar .widget {
  background: #fff;
  border-radius: 3px;
  box-shadow: 0 0 0 1px #dee3ea;
  padding: 15px;
}

.widget-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.widget p {
  font-size: 0.875rem;
  color: #555;
  line-height: 1.5;
  margin-bottom: 8px;
}

.author-photo {
  width: 100%;
  height: 140px;
  background: #d9e3f0;
  margin: 8px 0;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 13px;
  color: #555;
}

.btn-facebook {
  background: #3b5998;
  color: #fff;
  font-size: 12px;
  border-radius: 3px;
  margin-top: 5px;

  display: inline-block;
  padding: 6px 10px;
}

/* Form for Left side */
.contact-title {
  font-size: 28px;
  font-weight: 600;
  text-align: center;
  color: #333;
  margin-bottom: 15px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/*  Container ของฟอร์ม  */
.contact-form-main {
  /* max-width: 600px; */
  width: 95%;
  border: 1px solid #e0e0e0;
  border-radius: 15px;
  background: #fff;
  padding: 40px;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ---------- Layout ของแถว/กลุ่ม ---------- */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-row.full-width {
  grid-template-columns: 1fr;
}

.form-group {
  margin-bottom: 15px;
}

/* ---------- Label ---------- */
.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

/* ---------- Controls (input/select/textarea) ---------- */
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 15px;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;

  /* transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease,
transform 0.2s ease; */
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-select {
  cursor: pointer;
}

/* ฟอร์มหลัก (พื้นขาว) */
.contact-form-main .form-input,
.contact-form-main .form-select,
.contact-form-main .form-textarea {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  color: #333;
}

/* Focus: ฟอร์มหลัก */
.contact-form-main .form-input:focus,
.contact-form-main .form-select:focus,
.contact-form-main .form-textarea:focus {
  outline: none;
  background: #fff;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.18);
  transform: translateY(-1px);
}

/* ---------- Checkbox group ---------- */
.form-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 10px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  font-size: 14px;
}

/* สีข้อความ checkbox แยกตามฟอร์ม */
.contact-form-main .checkbox-item {
  color: #333;
}

.checkbox-item input[type="checkbox"] {
  margin-right: 8px;
  transform: scale(1.15);
  accent-color: #ff6b6b;
}

/* ---------- Button (ใช้ class เดียว) ---------- */
.form-button {
  width: 100%;
  border: none;
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  transition: all 0.2s ease;

  /* transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease; */
}

/* ปุ่มของฟอร์มหลัก */
.contact-form-main .form-button {
  background: linear-gradient(45deg, #667eea, #764ba2);
}

.contact-form-main .form-button:hover {
  background: linear-gradient(45deg, #5a67d8, #6b46c1);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.35);
}

/*  Widget Base */

.subscribe-widget,
.contact-widget {
  padding: 30px 25px;
  border-radius: 20px;
  color: #fff;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.subscribe-widget {
  background: linear-gradient(180deg, #1fae8b, #34d399);
}

.contact-widget {
  background: linear-gradient(180deg, #6c7ae0, #7b4db2);
}

.widget-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

/*  Form  */

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.sidebar input,
.sidebar select,
.sidebar textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid #ccc;
  background: #fff;
  font-size: 14px;
}

.contact-widget textarea {
  min-height: 100px;
  resize: none;
}

/*  Buttons  */

.btn-subscribe,
.btn-contact {
  width: 100%;
  padding: 16px;
  border-radius: 40px;
  border: none;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  color: #fff;
  transition: 0.3s;
}

.btn-subscribe {
  background: linear-gradient(90deg, #ff8a8a, #7bdcb5);
}

.btn-contact {
  background: linear-gradient(90deg, #ff6a6a, #ff914d);
}

.btn-subscribe:hover,
.btn-contact:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Facebook Card */

.facebook-card {
  background: #ffffff;
  padding: 20px;
  border-radius: 6px; /* มุมโค้ง */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.facebook-box {
  width: 100%; /* เต็มความกว้าง */
  background: #ebeced;
  padding: 22px;
  border-radius: 10px;
  text-align: center;
}

.facebook-page-name {
  font-size: 16px; /* เล็กลง */
  font-weight: 600; /* ไม่หนาเกิน */
  color: #333;
  margin-bottom: 15px;
}

.facebook-like-box {
  background: #f1f3f5;
  padding: 22px 15px;
  border-radius: 8px;
  text-align: center;
}

.facebook-like-title {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.facebook-like-count {
  font-size: 15px;
  font-weight: 500;
  color: #333;
}

.facebook-title {
  font-size: 16px;
  font-weight: 600; /* ทำให้หนาขึ้น */
  color: #333;
  margin-bottom: 14px;
}

/*  Sponsor  */

.sponsor-box {
  width: 100%;
  margin: 12px 0;

  background: #f0f2f5;
  height: 260px;

  box-shadow: none;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 14px;
  font-weight: 400;
  color: #45474a;
}

.sponsor-card .widget-title {
  text-align: left;
  font-size: 16px;
  font-weight: 600;
}

/* Footer */
.site-footer {
  background: linear-gradient(to right, #1f2933, #111827);
  padding: 28px 20px;
  text-align: center;
}

.footer-content p {
  margin: 4px 0;
  font-size: 13px;
  color: #cbd5e1;
}

.footer-content a {
  color: #60a5fa;
  text-decoration: none;
  font-weight: 500;
}

.footer-content a:hover {
  text-decoration: underline;
}

/* Back Link */
.back-container {
  text-align: center;
  margin: 40px 0 20px;
}

.back-link {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 6px;

  background: #f3f4f6;
  color: #333;
  font-size: 14px;
  font-weight: 500;

  text-decoration: none;
  transition: all 0.2s ease;
}

.back-link:hover {
  background: #e5e7eb;
  transform: translateY(-2px);
}

/* Gold Price */

:root {
  --line: rgb(239, 161, 66);
  --bg01: rgb(220, 220, 176);
  --bg02: rgb(174, 224, 174);
  /* inside body */
  --bg04: rgb(230, 231, 228);
  --up: green;
  --down: red;
}

.wrap-table {
  border: 2px solid var(--line);
  border-radius: 5px;
  overflow: hidden;
}

.price-table {
  width: 100%;

  border: 1px solid var(--line);
  color: #111827;

  background-color: var(--bg04);

  border-radius: 5px;
  overflow: hidden;

  border-collapse: collapse;
}

.price-table th,
.price-table td {
  border: 1px solid var(--line);
  padding: 10px 4px;
}

.price-table thead th {
  background-color: var(--bg01);
}

.month {
  background-color: var(--bg01);
}

.num {
  text-align: right;
}

.delta {
  text-align: center;
}

.price-table tr.total th,
.price-table tr.total td {
  background-color: var(--bg02);
  font-weight: 600;
}

.delta.up {
  color: var(--up);
}

.delta.down {
  color: var(--down);
}

.icon {
  display: inline-block;
  width: 0px;
  height: 0px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
}

.icon.up {
  border-bottom: 10px solid var(--up);
  margin-right: 5px;
}
.icon.down {
  border-top: 10px solid var(--down);
}

/* order ลำดับใหม่ */
.order-widget01 {order: 2}
.order-widget02 {order: 3}
.order-widget03 {order: 4}
.order-widget04 {order: 5}
.order-widget05 {order: 1}

/* Responsive */

/* 
X-Small	None	<576px
Small	sm	≥576px
Medium	md	≥768px
Large	lg	≥992px
Extra large	xl	≥1200px
Extra extra large	xxl	≥1400px 
*/

@media (max-width: 922px) {
  .site-header {
    background-color: yellowgreen;
  }
}

@media (max-width: 768px) {
  .site-header {
    background-color: rgb(205, 156, 50);
  }

  .hero-grid,
  .content-layout,
  .form-row {
    grid-template-columns: 1fr;
  }

  .form-checkbox-group {
    flex-direction: column;
    gap: 10px;
  }

  .nav-menu {
    flex-direction: column;
    padding-top: 10px;
  }

  .nav-menu li a {
    border-top: 1px solid rgb(122, 122, 122);
  }
}

@media (max-width: 576px) {
  .site-header {
    background-color: rgb(205, 50, 179);
  }

  /* กำหนดขนาด / พื้นที่ของปุ่ม */
  #burger-menu {
    display: block;
    height: 25px;
    width: 30px;
    position: relative;
    z-index: 1000;
    cursor: pointer;
  }

  /* วาด เส้น 3 ขีด ด้วย span + pseudo elements */
  #burger-menu span,
  #burger-menu span::before,
  #burger-menu span::after {
    background-color: #f3efef;
    height: 3px;
    width: 100%;
    position: absolute;
    display: block;
    transition: all 0.3s ease;
    content: "";
  }

  /* จัดตำแหน่ง 3 เส้น (บน กลาง ล่าง) */
  #burger-menu span {
    top: 11px;
  }
  #burger-menu span::before {
    top: -8px;
  }
  #burger-menu span::after {
    top: 8px;
  }

  /* Animation เมื่อกด */

  /* ทำให้เส้น “กลาง” หายไป (โปร่งใส) */
  #burger-menu.close span {
    background: transparent;
  }

  /* เส้นบน rotate(45deg) หมุนเฉียงไปทางขวา */
  /* top: 0; ทำให้ทั้งสองเส้น “มาซ้อนกันตรงกลาง” ก่อนหมุน */
  #burger-menu.close span:before {
    transform: rotate(45deg);
    top: 0;
  }

  /* เส้นล่าง rotate(-45deg) หมุนเฉียงไปทางซ้าย */
  #burger-menu.close span:after {
    transform: rotate(-45deg);
    top: 0;
  }

  /* ซ่อนเมนู */
  #menu {
    display: none;
    flex-direction: column;
    background: #92adba;
  }

  /* เปิดเมนูเมื่อ active แสดงเมนูขึ้นมา */
  #menu.overlay {
    display: flex;
  }
}

/* สลับตำแหน่งของ card เนื้อหา */
/* เรียงลำดับใหม่ด้วย order กรณีที่ต้องการเปลี่ยนลำดับของ widget ใน sidebar หรือโพสต์ใน post-list โดยไม่ต้องแก้ HTML
ต้องกำหนด display: flex; ให้กับ post-list และ sidebar ก่อน */


/* ค่าลบ ตัว - มากสุด จะอยู่บนสุด */
/* .card .order-image {order: 2}
.card .order-table {order: 3}
.card .order-form {order: 1} */

/* ค่าบวก ตัวบวกน้อยสุด จะอยู่บนสุด */
.order-widget01 {order: 5}
.order-widget02 {order: 2}
.order-widget03 {order: 1}
.order-widget04 {order: 4}
.order-widget05 {order: 3}

html {
  scroll-behavior: smooth;
}