:root {
  --text-color: #000000;
  --hover-color: #ffffff;
}

#work {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  width: 100%;
  height: auto;
  box-sizing: border-box;
}

#work .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 40px 10px;
  background-color: #f0f0f0;
  box-sizing: border-box;
  position: relative;
}

/* Feed Container */
#feed {
  /* max-width: 1200px; */
  /* margin: 0 auto; */
  padding: 30px;
  background-color: #f9f9f9;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* ลด min-width */
  gap: 20px;
  width: auto;
  height: auto;
}

.activity-card {
  min-height: 300px; /* ลดความสูงขั้นต่ำ */
  width: 100%; /* การ์ดเต็มความกว้าง */
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* เว้นระยะระหว่างเนื้อหาภายใน */
  background-color: rgb(9, 231, 68);
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}

.activity-card-img {
  width: 100%;
  height: 300px;
}

.activity-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Card Header */
.card-header {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.card-header h3 {
  margin: 0;
  font-size: 0.875rem;
  font-weight: bold;
  color: #1f2937;
}

.card-header p {
  font-size: 0.75rem;
  color: #6b7280;
  margin: 4px 0;
}

/* Card Body */
.card-body {
  flex-grow: 1;
  font-size: 0.875rem;
  line-height: 1.4;
  color: #374151;
  width: 20pv; /* กำหนดให้ขยายเต็มพื้นที่ภายในการ์ด */
  padding: 16px; /* เพิ่ม padding เพื่อให้มีระยะห่างระหว่างข้อความและขอบการ์ด */
}


/* Card Footer */
.card-footer {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

/* Buttons */
.detail-btn,
.register-btn {
  font-size: 0.75rem;
  padding: 6px 12px;
  border-radius: 4px;
}

.detail-btn {
  color: #2563eb;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

.detail-btn:hover {
  color: #1e40af;
}

.register-btn {
  background-color: #2563eb;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.register-btn:hover {
  background-color: #1e40af;
}

/* Responsive Design */
@media (max-width: 768px) {
  #feed {
    grid-template-columns: 1fr;
    padding: 20px;
  }
    .activity-card {
      padding: 12px;
      min-height: 250px;
    }
  
  .card-header h3 {
    font-size: 0.875rem;
  }
  
  .card-body {
    width: 100%; /* ทำให้การ์ดกว้างเต็มที่ในอุปกรณ์มือถือ */
    padding: 10px; /* เพิ่ม padding เล็กน้อยบนมือถือ */
  } 
  .register-btn,
  .detail-btn {
    padding: 5px 10px;
    font-size: 0.75rem;
  }
}

#search {
  background-color: #f9f9f9;
  height: auto;
  justify-content: space-between;
  text-align: center;
}

#search-container.py-5 {
  justify-content: space-between;
  text-align: center;
  width: 100%;
  background-color: #1e40af;
}

#search-card.mb-4 {
  justify-content: space-between;
  text-align: center;
  width: 100%;
}

#search-card.body {
  justify-content: space-between;
  text-align: center;
  width: 100%;
}
