/* 🌤 พื้นหลังรวมทั้งหน้า */
body {
  background: linear-gradient(135deg, #c2e9fb, #a1c4fd);
  font-family: "Prompt", sans-serif;
  color: #333;
}

/* 🌈 การ์ดแพ็กเกจ */
.pricing-card {
  border-radius: 1rem;
  background: linear-gradient(180deg, #f8fcfcff, #d1e1ecff);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1.5px solid rgba(23, 143, 241, 1);
}

.pricing-card:hover {
  transform: translateY(-5px);
  border-color: #56f7f7ff;
  box-shadow: 0 0 20px rgba(92, 160, 242, 0.4);
}

/* 💰 ป้ายราคา */
.old-price {
  font-size: 1rem;
  color: #999;
  text-decoration: line-through;
  text-decoration-color: red;
  text-decoration-thickness: 1px;
}

.new-price {
  font-size: 1.8rem;
  font-weight: bold;
  color: #007bff; /* ฟ้าแบบโปร */
  animation: softPulse 2s ease-in-out infinite;
}

.promo-badge {
  background: #ff4747;
  color: #fff;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  display: inline-block;
  margin-bottom: 6px;
}
/* เอฟเฟกต์กระพริบนุ่มแบบโปร */
@keyframes softPulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.75;
    transform: scale(1.04);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Basic */
.card-basic {
  border-left: 6px solid #5cb9f1; /* น้ำเงิน */
  box-shadow: 0 3px 8px rgba(119, 208, 243, 0.3);
}
.card-basic .btn {
  background: linear-gradient(90deg, #5cb9f1, #3aaee6);
  border: none;
  color: white;
}
.card-basic .btn:hover {
  background: linear-gradient(90deg, #3aaee6, #279fd4);
}

/* Pro */
.card-pro {
  border-left: 6px solid #8fd86f; /* เขียวอ่อน */
  box-shadow: 0 3px 8px rgba(143, 216, 111, 0.3);
}
.card-pro .btn {
  background: linear-gradient(90deg, #8fd86f, #6fc15c);
  border: none;
  color: white;
}
.card-pro .btn:hover {
  background: linear-gradient(90deg, #6fc15c, #58a84a);
}

/* Enterprise */
.card-enterprise {
  border-left: 6px solid #ffc57a; /* ส้มอ่อน */
  box-shadow: 0 3px 8px rgba(255, 197, 122, 0.4);
}

.card-enterprise .btn {
  background: linear-gradient(90deg, #ffb960, #ffa33b);
  border: none;
  color: white;
}
.card-enterprise .btn:hover {
  background: linear-gradient(90deg, #ffa33b, #ff9220);
}

/* ✅ รายการฟีเจอร์ */
.feature-list i {
  color: #43a047;
  margin-right: 5px;
}

/* 🩵 Navbar */
.navbar {
  background: linear-gradient(90deg, #4f86e2, #67b0f8) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* หัวตาราง */
table.table thead {
  background: linear-gradient(90deg, #5480d3, #25afda) !important;
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

/* แถวหัวข้อ subscription ให้แตกต่างชัดเจนตามระดับ */
table.table tbody tr.table-primary td {
  font-weight: bold;
  text-align: center;
  color: #fff !important;
}

/* ระดับ Basic — สีฟ้าอ่อนสดใส */
table.table tbody tr.table-basic td {
  background-color: #a0d8f1 !important; /* ฟ้าอ่อน */
  color: #004085 !important; /* ตัวอักษรเข้ม */
}

/* ระดับ Pro — สีเขียวอ่อน สดชื่น */
table.table tbody tr.table-pro td {
  background-color: #b8e986 !important; /* เขียวอ่อน */
  color: #155724 !important; /* ตัวอักษรเข้ม */
}

/* ระดับ Enterprise — สีส้มอ่อน สะดุดตา */
table.table tbody tr.table-enterprise td {
  background-color: #ffd6a5 !important; /* ส้มอ่อน */
  color: #7a4100 !important; /* ตัวอักษรเข้ม */
}

/* สลับสีแถวทั่วไป ยกเว้น tr.header/subscription */
table.table tbody tr:not(.table-primary):nth-child(even) {
  background: rgba(230, 238, 245, 0.9) !important;
}

table.table tbody tr:not(.table-primary):nth-child(odd) {
  background: rgba(217, 230, 240, 0.9) !important;
}

/* ไอคอนเช็ค/กากบาทให้ชัดเจน */
.text-success {
  color: #28a745 !important;
  font-weight: bold;
  font-size: 1.1em;
}
.text-danger {
  color: #dc3545 !important;
  font-weight: bold;
  font-size: 1.1em;
}
.text-muted {
  color: #6c757d !important;
  font-size: 1em;
}

/* 🎯 กล่องฟีเจอร์ */
#features .pricing-card {
  background: linear-gradient(180deg, #bfdcf5ff, #f2f7faff);
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
  border-radius: 1rem;
  padding: 15px;
  border: 1.5px solid rgba(190, 205, 220, 0.5);
}

/* ✅ ปรับสีข้อความและไอคอนใน feature list */
.feature-list {
  color: #2c3e50;
  /* ข้อความเทาเข้ม อ่านชัดบนพื้นหลังอ่อน */
  font-size: 15px;
  line-height: 1.7;
}

.feature-list li {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  transition:
    color 0.3s ease,
    transform 0.2s ease;
}

/* สีและเอฟเฟกต์ของไอคอน */
.feature-list i {
  color: #2a6ff0ff;
  /* เขียวมรกตสดใส */
  font-size: 1rem;
  margin-right: 10px;
  transition:
    transform 0.2s ease,
    color 0.3s ease;
}

/* เอฟเฟกต์ hover เพิ่มความน่าสนใจ */
.feature-list li:hover {
  color: #1565c0;
  /* เปลี่ยนสีข้อความเมื่อ hover */
}

.feature-list li:hover i {
  color: #16a085;
  /* ไอคอนเขียวเข้มขึ้นเล็กน้อยเมื่อ hover */
  transform: scale(1.2);
}

/* 🌤 ส่วนของ Program Preview Section */
.program-preview {
  background: linear-gradient(180deg, #f5f8fa 0%, #e2f0fd 100%);
  padding-top: 3rem;
  padding-bottom: 3rem;
}

/* หัวข้อใหญ่ */
.program-preview h2 {
  letter-spacing: 0.5px;
  font-weight: 700;
  color: #2b3e55;
  margin-bottom: 1.5rem;
}

/* คำอธิบายหรือข้อความย่อย */
.program-preview p {
  color: #4b5563;
  font-size: 1rem;
}

/* รูปภาพตัวอย่าง */
.program-preview img {
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

/* เอฟเฟกต์เมื่อ hover */
.program-preview img:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* กล่องคำอธิบายแต่ละเมนู */
.program-preview .card {
  background-color: #ffffffcc; /* ขาวโปร่งนิดๆ */
  border: 1px solid #dee2e6;
  border-radius: 15px;
  padding: 1rem;
  transition: box-shadow 0.3s ease;
}

.program-preview .card:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* กล่องแสดงตัวอย่างเอกสาร */
.doc-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  border: 2px solid transparent; /* เตรียมพื้นที่ border เพื่อป้องกันเลื่อน layout */
  border-radius: 8px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.doc-card:hover {
  transform: translateY(-6px) scale(1.05);
}

.doc-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.35s ease;
}

.modal-content {
  background: transparent;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.doc-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  background: rgba(0, 0, 0, 0.65);
  border-radius: 50%;
  border: none;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
}

.doc-modal-close::before {
  content: "✕";
  font-size: 20px;
  color: #fff;
  font-weight: bold;
}

/* กล่องแสดงลิงค์วีดีโอ */
.video-card {
  overflow: hidden;
  transition: transform 0.3s;
}
.video-card:hover {
  transform: translateY(-6px);
}
.play-btn i {
  font-size: 85px;
  color: rgba(255, 0, 0, 0.85);
  transition: color 0.3s;
}
.video-card:hover .play-btn i {
  color: #ff0000;
}
.video-card img {
  border-radius: 20px;
}

/* ควบคุมความสูง Feature Comparison + เอฟเฟกต์เฟด */
.table-wrapper {
  overflow: hidden;
  position: relative;

  /* เดิม 0.4s → ปรับเป็น 0.9s และใส่ easing นุ่ม ๆ */
  transition:
    max-height 0.9s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.3s ease;
}

/* สถานะพับ */
.table-wrapper.collapsed {
  max-height: 500px; /* ปรับความสูงเริ่มต้นตามใจ */
}

/* สถานะขยาย */
.table-wrapper.expanded {
  max-height: 3000px; /* ค่าสูงพอให้เห็นทั้งหมด */
}

/* เงาด้านล่างให้รู้ว่ายังมีข้อมูลอีก */
.table-wrapper.collapsed::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
}
