/* signature : "aHR0cHM6Ly9naXRodWIuY29tL3RoaXJhd2F0Mjc="; */
@import url("https://fonts.googleapis.com/css2?family=Sarabun:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap");
* {
  font-family: "Sarabun", sans-serif !important;
}

/* ส่วนแสดงขั้นตอนการสมัคร (Step Indicator) */
.step-indicator {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
  width: 90%;
  max-width: 800px;
  margin: 0 auto 3rem;
}

.step-line {
  position: absolute;
  top: 16px;
  left: 0;
  right: 0;
  height: 4px;
  background-color: #e5e7eb; /* gray-200 */
  z-index: 1;
}

.step-line-progress {
  position: absolute;
  top: 16px;
  left: 0;
  height: 4px;
  background-color: #22c55e; /* green-500 */
  width: 0%;
  z-index: 2;
  transition: width 0.4s ease-in-out;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 3;
  width: 120px;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #f3f4f6; /* gray-100 */
  border: 2px solid #d1d5db; /* gray-300 */
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: #6b7280; /* gray-500 */
  transition: all 0.4s ease;
}

.step-title {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280; /* gray-500 */
  transition: color 0.4s ease;
  font-weight: 500;
}

.step.completed .step-circle {
  background-color: #22c55e; /* green-500 */
  border-color: #16a34a; /* green-600 */
  color: white;
}
.step.completed .step-title {
  color: #4b5563; /* gray-600 */
}

.step.current .step-circle {
  background-color: #b91c1c; /* primary-700 */
  border-color: #991b1b; /* primary-800 */
  color: white;
}
.step.current .step-title {
  color: #b91c1c; /* primary-700 */
  font-weight: bold;
}

/* กำหนดขนาดรูปถ่ายใน PDF */
.pdf-photo {
  width: 96px; /* 1 นิ้ว (1 * 96px) - แก้ไขให้ตรงกับไฟล์ดาวน์โหลด */
  height: 96px; /* 1 นิ้ว (1 * 96px) - แก้ไขให้ตรงกับไฟล์ดาวน์โหลด */
  border: 1px solid #000;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* กล่องอัปโหลดรูปถ่าย */
.photo-container {
  width: 150px;
  height: 150px;
  border: 2px dashed #cbd5e1; /* border-slate-300 */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  border-radius: 0.375rem; /* rounded-md */
}

.photo-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

/* กล่องแสดงตัวอย่าง PDF */
.pdf-container {
  width: 210mm;
  padding: 20mm;
  background-color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  font-size: 14px;
  box-sizing: border-box;
}

.pdf-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

/* โลโก้ในหัว PDF */
.pdf-header img {
  height: 100px;
}

.pdf-title {
  text-align: center;
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 20px;
}

.pdf-content {
  font-size: 14px;
}

.pdf-row {
  display: flex;
  margin-bottom: 10px;
}

.pdf-label {
  width: 180px; /* แก้ไขจาก 150px ให้ตรงกับไฟล์ดาวน์โหลด */
  font-weight: bold;
}

.pdf-value {
  flex: 1;
}

/* ลายน้ำใน PDF */
.watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.1;
  pointer-events: none;
  z-index: 10;
}

.watermark img {
  width: 300px;
}

/* สปินเนอร์โหลดข้อมูล (ปุ่ม) */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* [ใหม่] เพิ่ม CSS สำหรับเมนูมือถือแบบ Grid */
.mobile-menu {
  display: grid;
  /* เริ่มต้นที่ 0fr คือไม่มีความสูง */
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s ease-in-out;
}

.mobile-menu > div {
  overflow: hidden;
}

/* เมื่อเมนูเปิด (มีคลาส .menu-open) ให้ขยายเป็น 1fr (ความสูงเต็มที่) */
.mobile-menu.menu-open {
  grid-template-rows: 1fr;
}

.course-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.course-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
.filter-btn {
  transition: all 0.2s ease-in-out;
  border-bottom: 2px solid transparent;
}
.filter-btn.active-filter {
  color: #b91c1c; /* primary-700 */
  border-bottom-color: #b91c1c; /* primary-700 */
  font-weight: 600;
}

/* Optimized Skeleton Animation - แทนที่ animate.css */
@keyframes skeleton-pulse {
  0%, 100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

.skeleton-animate {
  animation: skeleton-pulse 1.2s ease-in-out infinite;
}

/* ปิด transitions บน mobile เพื่อประสิทธิภาพ */
@media (hover: none) {
  .transition-colors,
  .hover\:bg-gray-50:hover {
    transition: none !important;
  }
}

/* Lazy Load Image Placeholder */
.lazy-image {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
