/* สไตล์หลักสำหรับหน้านโยบาย */
.policy-content {
  min-height: 100vh;
  padding-top: 40px;
  padding-bottom: 60px;
}

/* คอนเทนเนอร์หลักที่รวมทั้งหัวข้อและเนื้อหา */
.policy-container {
  position: relative;
  background-color: #e1f1ff;
  backdrop-filter: blur(15px);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05), 0 10px 20px rgba(0, 0, 0, 0.02);
  padding: 40px;
  margin-top: 30px;
  margin-bottom: 50px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.policy-container::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -50px;
  width: 200px;
  height: 200px;
  background: linear-gradient(
    135deg,
    rgba(139, 184, 223, 0.3),
    rgba(74, 137, 220, 0.2)
  );
  border-radius: 50%;
  z-index: 0;
}

.policy-container::after {
  content: "";
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 250px;
  height: 250px;
  background: linear-gradient(
    135deg,
    rgba(74, 137, 220, 0.2),
    rgba(139, 184, 223, 0.1)
  );
  border-radius: 50%;
  z-index: 0;
}

.policy-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.07), 0 15px 25px rgba(0, 0, 0, 0.03);
}

/* ส่วนหัวของนโยบาย (อยู่ในคอนเทนเนอร์เดียวกัน) */
.policy-header {
  position: relative;
  margin-bottom: 30px;
  text-align: center;
  z-index: 1;
}

.section-title {
  position: relative;
  color: #00509d;
  font-weight: 700;
  margin-bottom: 15px;
}

.section-subtitle {
  position: relative;
  color: #555;
  max-width: 800px;
  margin: 0 auto 20px;
}

/* ตัวแบ่งส่วน */
.divider-custom {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.5rem 0 2.5rem;
  position: relative;
  z-index: 1;
}

.divider-line {
  width: 80px;
  height: 3px;
  background: linear-gradient(
    90deg,
    rgba(0, 80, 157, 0.1) 0%,
    rgba(0, 80, 157, 0.5) 100%
  );
  border-radius: 3px;
}

.divider-icon {
  padding: 0 1rem;
  color: #00509d;
  font-size: 1.5rem;
  animation: float 3s ease-in-out infinite;
}

/* สไตล์สำหรับเนื้อหา */
.policy-section {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #444;
  position: relative;
  z-index: 1;
}

.card-body {
  padding: 0 !important;
  /* ยกเลิก padding ของ card-body */
}

.policy-section h2 {
  color: #00509d;
  margin-top: 2.5rem;
  margin-bottom: 1.2rem;
  font-weight: 600;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(0, 80, 157, 0.1);
}

.policy-section h2:first-child {
  margin-top: 0;
  /* ลบ margin ด้านบนของหัวข้อแรก */
}

.policy-section h3 {
  font-size: 1.3rem;
  margin-top: 1.8rem;
  color: #333;
  font-weight: 500;
}

.policy-section ul,
.policy-section ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.policy-section li {
  margin-bottom: 0.7rem;
  position: relative;
}

.policy-section p {
  margin-bottom: 1.2rem;
}

 /* ปุ่มกลับขึ้นด้านบน */
#back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  display: none;
  width: 55px;
  height: 55px;
  background-color: rgba(255, 255, 255, 0.25); /* สีใส */
  backdrop-filter: blur(5px);
  border: 1px solid rgba(0, 80, 157, 0.2);
  box-shadow: 0 8px 20px rgba(0, 80, 157, 0.10);
  color: #00509d;
  border-radius: 50%;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

#back-to-top:hover {
  transform: translateY(-5px);
  background-color: rgba(0, 80, 157, 0.15); /* สีใสเข้มขึ้น */
  box-shadow: 0 12px 25px rgba(0, 80, 157, 0.18);
  color: #003366;
}

#back-to-top i {
  font-size: 1.2rem;
}

/* เพิ่มเอฟเฟกต์เมื่อเลื่อนเมาส์ไปที่หัวข้อ */
.policy-heading {
  transition: color 0.3s ease, transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.policy-heading:hover {
  color: #00509d;
  transform: translateX(5px);
}

/* ปรับแต่งสำหรับอุปกรณ์มือถือ */
@media (max-width: 768px) {
  .policy-container {
    padding: 25px;
  }

  .divider-line {
    width: 50px;
  }

  .policy-section {
    font-size: 1rem;
  }

  .policy-section h2 {
    font-size: 1.5rem;
  }

  .policy-section h3 {
    font-size: 1.2rem;
  }

  #back-to-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
  }
}
