/* Container หลัก */
.view-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    background-color: rgb(16, 16, 16);
    padding: 30px 20px;
    font-family: 'Segoe UI', 'Prompt', sans-serif;
  }
  
  /* การ์ดข่าว */
  .post-card {
    background-color: #1a1a1a;
    border-radius: 12px;
    width: 350px;
    height: 300px; /* ✅ กำหนดสูงคงที่ */
    display: flex;
    flex-direction: column;
    border: 5px solid #1a1a1a; /* ✅ เพิ่มขอบสีแดง */
    transition: 0.3s ease;
  }
  
  .post-card:hover {
    border: 5px solid #ffffff; /* ✅ เพิ่มขอบสีแดง */
  }
  
  /* รูปภาพต้องคุมขนาด */
  .post-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    border-radius: 12px;
  }
  
  /* คอนเทนต์ภายในการ์ด */
  .post-content {
    padding: 14px;
    display: flex;
    flex-direction: column;
    height: calc(100% - 160px); /* ✅ เหลือพื้นที่ให้เนื้อหา */
    box-sizing: border-box;
  }
  
  /* หัวข้อ */
  .post-content h2 {
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    margin: 0 0 4px; /* ✅ ลดระยะห่างล่าง */
    line-height: 1.3;
    max-height: 38px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  
  .post-content h3 {
    font-size: 13px;
    font-weight: normal;
    color: #bbb;
    margin: 6px 0 10px;
    line-height: 1.4;
    max-height: 34px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  
    /* ✅ เพิ่มตรงนี้เพื่อแก้ปัญหาคำยาวไม่ย่อ */
    word-break: break-word;
    overflow-wrap: break-word;
  }
  
  
  
  .post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    gap: 10px;
  }
  
  /* ✅ ป้าย tag ที่ดูเด่น มีสีสด, ขอบมน, ตัวหนา */
  .post-tag {
    position: relative;
    background: linear-gradient(135deg, #1e90ff, #00bfff); /* 💙 ฟ้าสด */
    color: #ffffff;
    font-size: 10px;
    font-weight: bold;
    padding: 6px 16px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
  
    overflow: hidden;
  }
  
  /* แสงขาวเคลื่อนไหวแบบเด่น */
  .post-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -80%;
    width: 200%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.5) 10%, rgba(255, 255, 255, 0) 60%);
    transform: skewX(-20deg);
    animation: shineMove 2s infinite;
    pointer-events: none;
    z-index: 1;
  }

  @keyframes shineMove {
    0% {
      left: -80%;
    }
    100% {
      left: 100%;
    }
  }
  
  
  /* ✅ วันที่ให้นุ่มตา แต่ยังชัด */
  .date-time {
    font-size: 12px;
    color: #bbb;
    font-style: italic;
    opacity: 0.85;
    white-space: nowrap;
  }
  
  /* ป้าย Tag ตามประเภท */
.tag-patch-note {
  background: linear-gradient(135deg, #ff6f61, #ff3b30); /* สีแดงอมส้ม */
}

.tag-event {
  background: linear-gradient(135deg, #28a745, #218838); /* สีเขียวสด */
}

.tag-tournament {
  background: linear-gradient(135deg, #ffc107, #e0a800); /* สีเหลืองทอง */
}

.tag-promotion {
  background: linear-gradient(135deg, #17a2b8, #117a8b); /* สีฟ้าน้ำทะเล */
}

/* กรณี tag ปกติ ใช้สีฟ้าเหมือนเดิม */
.tag-default {
  background: linear-gradient(135deg, #1e90ff, #00bfff);
}

  