/* Content Toggler v6
 * --ct-h  : ความสูงเนื้อหาที่โผล่ก่อนกด
 * --ct-up : ระยะที่แถบเบลอ+ปุ่มยื่นขึ้นไปทับภาพหน้าปก (ถ้ามีภาพอยู่ด้านบนเนื้อหา)
 */
.short-content { --ct-h: 200px; --ct-up: 0px; }
.short-content.ct-over-image { --ct-h: 60px; --ct-up: 140px; }

/* ไม่มี JS = แสดงเนื้อหาเต็ม ไม่มีปุ่ม */
.short-content .ct-overlay { display: none; }

.ct-js .short-content {
  position: relative;
  max-height: calc(var(--ct-h) + var(--ct-up));
  overflow: hidden;
  margin-top: calc(-1 * var(--ct-up));
  padding-top: var(--ct-up);
}
.ct-js .short-content .ct-overlay {
  display: flex;
  position: absolute;
  inset: 0;
  z-index: 2;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to bottom, rgba(255,255,255,.25), rgba(255,255,255,.9) 75%);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  /* ด้านบนค่อยๆ ใส → ภาพหน้าปก/ข้อความยังมองเห็นจางๆ */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 45%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 45%);
}

/* กดแล้ว: เนื้อหาเต็ม ไม่มีแถบเบลอ ไม่มีปุ่ม */
.ct-js .short-content.expand {
  max-height: none;
  overflow: visible;
  margin-top: 0;
  padding-top: 0;
}
.ct-js .short-content.expand .ct-overlay { display: none; }

/* ปุ่ม READ MORE (หน้าตาเหมือนเดิม) */
.short-content a.toggle-btn.readmore-btn {
  display: inline-block;
  font-size: 18px;
  font-weight: 700;
  padding: 14px 28px;
  color: #1E3A8A !important;
  background: #f0f6ff;
  border: 2px solid #60A5FA;
  border-radius: 6px;
  text-align: center;
  line-height: 1.1;
  min-width: 180px;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}
.short-content a.toggle-btn.readmore-btn:hover,
.short-content a.toggle-btn.readmore-btn:active,
.short-content a.toggle-btn.readmore-btn:focus {
  color: #1E3A8A !important;
  background: #dbeafe;
  border-color: #3B82F6;
  outline: none;
  text-decoration: none;
}
