
.image-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.scale-effect {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.scale-effect:hover {
  transform: scale(1.05);
}

.card {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

/*Skeleton Effect*/

.hover-scale:hover {
    transform: translateY(-5px);
    transition: all 0.3s ease;
}
.object-fit-cover { object-fit: cover; }
.hover-text-brown:hover { color: #8B4513 !important; }
.hover-text-orange:hover { color: #ff7b00 !important; }

/* ตัดข้อความสูงสุด 4 บรรทัด */
.text-truncate-4 {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 🔄 Skeleton Loading Animation */
.skeleton {
  position: relative;
  overflow: hidden;
  background-color: #e9e9e9;
  border-radius: 6px;
}
.skeleton::after {
  content: "";
  position: absolute;
  top: 0; left: -150px;
  height: 100%;
  width: 150px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: loading 1.2s infinite;
}
@keyframes loading {
  0% { left: -150px; }
  100% { left: 100%; }
}
.skeleton-img { width: 100%; height: 250px; }
.skeleton-text { height: 16px; margin-bottom: 8px; }
.skeleton-btn { height: 14px; }
.skeleton-card { background: #fff; padding-bottom: 10px; transition: none !important; }

/* ✨ เอฟเฟกต์ fade-in หลังโหลดเสร็จ */
.fade-in {
  opacity: 0;
  animation: fadeIn 1s ease forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ============================= */
/* 🔹 Skeleton สำหรับส่วนการบริการ (#services) */
/* ============================= */
.skeleton-service {
  width: 100%;
  height: 140px;              /* ขนาดกล่อง skeleton ของไอคอนบริการ */
  background-color: #e9e9e9;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.skeleton-service::after {
  content: "";
  position: absolute;
  top: 0; left: -150px;
  height: 100%;
  width: 150px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: loading 1.2s infinite; /* ใช้ keyframes loading เดิม */
}


/* 🔄 Skeleton Loading Animation */
.skeleton {
  position: relative;
  overflow: hidden;
  background-color: #e9e9e9;
  border-radius: 6px;
}
.skeleton::after {
  content: "";
  position: absolute;
  top: 0; left: -150px;
  height: 100%;
  width: 150px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: loading 1.2s infinite;
}
@keyframes loading {
  0% { left: -150px; }
  100% { left: 100%; }
}
.skeleton-img { width: 100%; height: 250px; border-radius: 10px 10px 0 0; }
.skeleton-text { height: 16px; margin-bottom: 8px; }
.skeleton-btn { height: 14px; }
.skeleton-card { background: #fff; border-radius: 10px; padding-bottom: 10px; }

/* ✨ เอฟเฟกต์ fade-in หลังโหลดเสร็จ */
.fade-in {
  opacity: 0;
  animation: fadeIn 1s ease forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
