/* 1. ฟอนต์และพื้นหลัง */
body {
  font-family: 'Kanit', sans-serif;
  background-color: #f2f4f9;
  margin: 0;
  padding: 0;
  color: #333;
}

/* 2. Breadcrumb */
.breadcrumb-area {
  background-image: linear-gradient(rgba(0, 51, 102, 0.7), rgba(0, 51, 102, 0.7)), url('../assets/images/join-work-3.jpg');
  background-size: cover;
  background-position: center;
  padding: 80px 0;
  background-color: #0066cc;
  height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: brightness(0.8);
}

.breadcrumb-content h4 {
  color: #fff;
  font-size: 60px;
  font-weight: 600;
  margin-bottom: 10px;
  text-shadow: 1.5px 1.5px 5px rgba(0, 0, 0, 0.7);
}

/* หัวข้อกลาง */
.nogift-mid-title {
    margin-bottom: 60px;
    text-align: center;
}

.nogift-mid-title h1 {
    font-size: 50px;
    font-weight: 600;
    background: #d94a70;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 auto;
    max-width: 900px;
    word-spacing: nowrap;
}

/* 3. เนื้อหาหลัก */
.nogift-content {
  padding: 60px 20px 80px;
  max-width: 1500px;
  margin: 0 auto;
  /* ไม่มี background หรือ border-radius และ box-shadow */
}

.filter-tabs {
  margin-bottom: 30px;
  background: #f7f7f7;
  padding: 0 12px;
  border-radius: 8px 8px 0 0;
  display: flex;
  gap: 10px;
  flex-wrap: nowrap;
  border-bottom: 2px solid #ccc;
}

.filter-tabs button {
  border: none;
  padding: 10px 20px;
  border-radius: 8px 8px 0 0;  /* โค้งเฉพาะมุมบน */
  cursor: pointer;
  font-weight: 600;
  color: #fff;
  background-color: transparent;
  font-family: 'Kanit', sans-serif;
  letter-spacing: 0.04em;
  font-size: 1.1rem;
  box-shadow: none;
  transition: all 0.3s ease;
  position: relative;
  top: 2px;  /* เลื่อนลงนิดหน่อยเพื่อให้แท็บ active ยกขึ้น */
}

/* ปุ่มที่ active */
.filter-tabs button.active {
  background-color: #d94a70; /* สีชมพูแดง */
  color: #fff;
  box-shadow:
    0 -4px 8px rgba(217, 74, 112, 0.7),
    inset 0 -3px 6px rgba(217, 74, 112, 0.8);
  top: 0;  /* ยกขึ้น */
  border-bottom: 2px solid #fff;  /* ปิดขอบล่างแท็บ */
  z-index: 10;
}

/* Hover สำหรับปุ่มอื่น */
.filter-tabs button:not(.active):hover {
  background-color: #b34a61; /* สีเข้มกว่าหน่อย */
  color: #fff;
  box-shadow: 0 2px 5px rgba(179, 74, 97, 0.5);
  top: 0;
}

/* ปุ่มอื่นๆ ปกติให้สีอ่อน */
.filter-tabs button:not(.active) {
  background-color: #f0c7d3aa; /* ชมพูแดงโปร่งแสง */
  color: #d94a70;
}

/* ปรับความกว้างแท็บให้เท่ากัน */
.filter-tabs button {
  flex: 1 1 auto;
  text-align: center;
  white-space: nowrap;
}



/* 5. ตาราง */
table {
  width: 100%;
  border-collapse: collapse;
  font-family: 'Kanit', sans-serif;
  font-size: 15px;
  color: #2c3e50;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
  table-layout: fixed;
  word-wrap: break-word;
  font-weight: 500;
}

thead {
  background-color: #004080;
  color: #ffffff;
  text-transform: uppercase;
  font-weight: 700;
}

th,
td {
  padding: 14px 20px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid #e0e0e0;
}

tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

tbody tr:hover {
  background-color: #cce4ff;
  box-shadow: inset 0 0 10px rgba(0, 119, 255, 0.2);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* 6. คอลัมน์แรก (เลขลำดับ) */
td:nth-child(1),
th:nth-child(1) {
  width: 40px;
  text-align: center;
}

/* 7. คอลัมน์ปุ่มดาวน์โหลดและดูรายละเอียด */
td:nth-child(4),
td:nth-child(5),
thead th:nth-child(4),
thead th:nth-child(5) {
  width: 50px;
  text-align: center;
}

/* 8. Badge สีตามหมวดหมู่ใต้ชื่อไฟล์ */
.file-desc {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 300;
  user-select: none;
  white-space: nowrap;
  display: inline-block;
  margin-top: 6px;
}

.file-desc.report-asset {
  background-color: #a8d0e6; /* ฟ้าอ่อน */
  color: #000; /* ตัวหนังสือสีดำ */
}

.file-desc.announcement-nogift {
  background-color: #f5c7d3; /* ชมพูอ่อน */
  color: #000; /* ตัวหนังสือสีดำ */
}

.file-desc.report-nogift {
  background-color: #b4d9b4; /* เขียวอ่อน */
  color: #000; /* ตัวหนังสือสีดำ */
}


/* 9. ปุ่มดูรายละเอียดและดาวน์โหลด */
.btn-download,
.btn-view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 16px;
  color: white;
  cursor: pointer;
  text-decoration: none;
  border: none;
  padding: 0;
  transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* ปุ่มดูรายละเอียด (btn-view) - สีฟ้าอมเขียว สดใส */
.btn-view {
  background-color: #17a2b8; /* สีฟ้าอมเขียว (teal) */
  box-shadow: 0 3px 6px rgba(23, 162, 184, 0.5);
}

.btn-view:hover {
  background-color: #117a8b;
  transform: scale(1.15);
  box-shadow: 0 0 12px rgba(17, 122, 139, 0.8);
}

/* ปุ่มดาวน์โหลด (btn-download) - สีม่วงอมชมพู สดใส */
.btn-download {
  background-color: #9b59b6; /* สีม่วงอมชมพู */
  box-shadow: 0 3px 6px rgba(155, 89, 182, 0.5);
}

.btn-download:hover {
  background-color: #6c3483;
  transform: scale(1.15);
  box-shadow: 0 0 12px rgba(108, 52, 131, 0.8);
}

/* 10. ปรับหัวตารางให้อักษรสีขาวและไอคอนอยู่ตรงกลาง */
thead th {
  color: #fff;
  text-align: center;
}

thead th:nth-child(2),
thead th:nth-child(3) {
  text-align: left;
}

/* 11. Responsive */
@media (max-width: 1024px) {
  .nogift-content {
    padding: 40px 15px 60px;
  }
}

@media (max-width: 768px) {
  .breadcrumb-content h4 {
    font-size: 30px;
    padding: 0 10px;
    text-align: center;
  }

  .filter-tabs {
    flex-direction: column;
    gap: 8px;
  }

  table {
    font-size: 14px;
  }

  td:nth-child(2) {
    max-width: 220px;
    white-space: normal;
  }
}
