:root {
      --primary-color: #F35D21;
    }
body::-webkit-scrollbar {
    display: none; /* Hides the scrollbar */
    width: 0; /* Ensures no space is taken by the scrollbar */
    height: 0; /* Ensures no space is taken by the scrollbar */
}
body {
    /* display: flex; */
    scrollbar-width: none;
    font-family: "Noto Sans Thai", sans-serif;
}
.header {
  display: none;
  background-color: var(--primary-color);
  align-items: center;
  gap: 0.5rem;
}
.header img{
  height: 2.5rem;
}
.header h1{
  margin: 0;
  height: fit-content;
}

.welcome {
    background-image: url('./img/mainmenu_bg.jpg');
    height: 100vh;
    /* width: 100vw; */
    background-size: cover;
    background-position: center;
    background-repeat: repeat;
    transition: height 0.3s ease; /* สำหรับ shrink */
    position: relative; /* ติดกับด้านบน */
    animation: moveBackground 100s linear infinite;
    top: 0;
    z-index: 10;
}
@keyframes moveBackground {
    0% {
        background-position: 25% 0;
    }
    50% {
        background-position: 100% 0; /* เลื่อนจากซ้ายไปขวา */
    }
    100% {
        background-position: 25% 0; /* รีเซ็ตกลับตำแหน่งเริ่มต้น */
    }
}

.welcome-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column; /* เพื่อวาง h1 และ p ในแนวตั้ง */
  text-align: center;
  color: white;
  pointer-events: none;
/* position: sticky; */
  /* z-index: 20; */
}

.container {
    align-self: center;
    
}
.list_title{
    display: flex;
    align-items: flex-end;
    flex-direction: row;
    justify-content: space-between;
    padding: 0.7rem 1rem;
    /* z-index: 30; */
}
#item-list{
    display: flex;
    flex-direction: column;
    border-radius: 1.8rem 1.8rem 0 0;
    /* height: 80%; */
    padding-bottom: 2rem;
}
.card {
  display: flex;
  flex-direction: row; /* ✅ รูปซ้าย ข้อความขวา */
  outline: 1px solid #CBCBCB;
  height: 100%;
  background-color: #ffffff;
  border-radius: 1rem;
  box-shadow: 0 0px 4px rgba(0,0,0,0.2);
  margin: 0 1rem 1rem 1rem;
  cursor: pointer;
  font-weight: 500;
  overflow: hidden; /* ป้องกันรูปเกินกรอบ */
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card img {
  width: 20vw;
  min-width: 100px;
  max-height: 20vh;
  object-fit: cover;
  object-position: top;
  background-color: #D9D7D8;
}

.card-content {
  flex-grow: 1;
  padding: 1rem;      /* ✅ เพิ่มระยะห่างระหว่างข้อความกับขอบ */
  display: flex;
  flex-direction: column;
  justify-content: center; /* ✅ จัดข้อความให้อยู่กลางแนวตั้ง */
}

.card-content h3 {
  margin: 0;
  /* margin-bottom: 0.5rem; */
  flex-grow: 2;
  font-size: 1.2rem;
  padding-bottom: 0.2rem;
}

.card-content-head {
  display: flex;
  flex-direction: row;
}

.card-content-head p{
  color: rgb(39, 39, 39);
  background-color: #e3e3e3;
}

.card-content-tag {
  display: flex;
  flex-direction: row;
  gap: 8px;
  padding-bottom: 8px;
}

.card-content-tag p{
  font-weight: 300;
  color: white;
  background-color: var(--primary-color);
}



.card-content p{
  font-size: 0.6rem;
  height:fit-content;
  padding: 2px 4px;
}

.detail {
  margin: 0;
  /* padding-left: 1rem; */
  font-size: 0.8rem;
}

/* .card:active {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
} */

.card:hover, .card:active {
  transform: scale(1.05); /* ✅ ขยายขึ้น 5% ตอนกดค้าง */
  box-shadow: 0 4px 12px rgba(0,0,0,0.3); /* เพิ่มเงาให้ดูเด่น */
}



/* เริ่มซ่อน */
  .popup-hidden {
    display: none;
    opacity: 0;
  }

  /* ให้ container มี transition */
  /* เวลาโชว์ */
  #popup-container.show {
    display: flex;
    opacity: 1;
    pointer-events: auto;
  }

  /* animation ของกล่อง popup */
  #popup-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    /* แบ็กกราวด์สีดำจางๆ */
    background: rgba(0,0,0,0.4); 
    z-index: 9999;
    /* การจัดกึ่งกลาง */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* สถานะเริ่มต้น: ซ่อนไว้ */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

.no-scroll {
  overflow: hidden;
}