* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
}
.main-index {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  align-items: center;
  background-color: #fafbfc;
  position: relative;
  overflow: hidden;
}
.box-vdo{
  width: 100%;
  height: 50vw;
}
.vdo_present {
  width: 100%;
  height: auto;
  margin-top: 5vw;
}
#video {
  width: 100%;
  height: 46vw;
  object-fit: cover;
}
.vdo_present video {
  width: 100%;
  height: auto;
}
.text_present {
  width: 90vw;
  height: 7vw;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 4vw;
  margin-bottom: 2vw;
}
.text1 {
  font-size: 3vw;
  font-weight: 200;
  margin: 0;
}
.line {
  width: 0.3vw;
  height: 3.5vw;
  background-color: #fa9d24;
  margin-right: 2vw;
  margin-left: 2vw;
}
.text2 {
  font-size: 2vw;
  font-weight: 200;
  margin: 0;
}
.text_select {
  width: 95vw;
  font-size: 3vw;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.image-slider-container {
  width: 100%;
  overflow: hidden;
  margin: 0 auto;
}

.image-slider {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  white-space: nowrap;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  margin-bottom: 5vw;
  margin-left: 5vw;
}

.image-slider::-webkit-scrollbar {
  display: none;
}

.image-card {
  width: 15vw;
  height: 22vw;
  border-radius: 1.5vw;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  margin-right: 2vw;
  background-color: #fff;
  margin-bottom: 20px;
  font-size: 0.75vw;
}

.img_rewardss {
  width: 100%;
  height: 70%;
  pointer-events: none;
  border-radius: 1.5vw 1.5vw 0vw 0vw;
}
.img_rewardss_taiwan {
  width: 100%;
  height: 60%;
  pointer-events: none;
  border-radius: 1.5vw 1.5vw 0vw 0vw;
}

.info-rewards{
  margin:1vw;
}
.why_text_select{
  margin-top: 5vw;
}
.text3 {
  font-size: 3vw;
  font-weight: 500;
  margin-bottom: 2vw;
}
.product_rec {
  margin-top: 1vw;
  width: 90vw;
  height: 20vw;
  z-index: 5;
}
.why {
  justify-content: center;
}
.why_box {
  width: 95vw;
  height: 40vw;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.why1 {
  width: 40vw;
  height: 40vw;
  display: flex;
  align-items: center;
  justify-content: center;
}
.why_text {
  width: 40vw;
  height: 40vw;
  margin-left: 5vw;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.why_box1 {
  width: 38vw;
  height: 7vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.box1 {
  width: 5vw;
  height: 5vw;
  border-radius: 10vw;
  background-color: #fa9d24;
  display: flex;
  align-items: center;
  justify-content: center;
}
.content {
  font-size: 1vw;
  margin: 0;
  padding: 1vw;
}
.content-th{
  font-size: 1vw;
  margin: 0;
  padding: 1vw;
}
.img_why {
  width: 3vw;
  height: 3vw;
}
.box2 {
  width: 33vw;
  height: 6vw;
  display: flex;
  align-items: center;
  font-size: 1vw;
}
.why_line {
  width: 40vw;
  height: 1px;
  background-color: #d7d7d7;
}
.why2 {
  width: 48vw;
  display: flex;
  align-items: center;
  justify-content: center;
}
.why_box2 {
  width: 100%;
  border-radius: 1vw;
}
.img_reward {
  width: 100%;
  height: 100%;
  border-radius: 1vw;
}
.box-spin {
  width: 100%;
  height:46vw ;
  display: flex;
  background-color: white;
  position: absolute;
  z-index: 10;
  animation: bgfade 6s;
}
@keyframes bgfade {
  0% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

#spin {
  position: absolute;
  width: 50px;
  height: 50px;
  animation: moveAndRotate 6s ease;
}

@keyframes moveAndRotate {
  0% {
    transform: translate(0, 0) rotate(0deg);
    width: 0px;
    height: 0px;
  }
  40% {
    transform: translate(45vw, 14vw) rotate(5400deg);
    width: 18vw;
    height: 18vw;
  }
  50% {
    transform: translate(45vw, 14vw) rotate(5400deg);
    width: 18vw;
    height: 18vw;
  }
  60% {
    transform: translate(45vw, 14vw) rotate(5400deg);
    width: 18vw;
    height: 18vw;
  }
  100% {
    transform: translate(96vw, 6vw) rotate(10800deg);
    width: 0px;
    height: 0px;
  }
}

.rcsa-logo-intro {
  width: 40vw;
  height: 20vw;
  position: relative;
  left: 30%;
  top: 15vw;
  opacity: 0;
  animation: fade 6s;
}

@keyframes fade {
  0% {
    opacity: 0;
  }
  25% {
    opacity: 0;
  }
  55% {
    opacity: 1;
  }
  60% {
    opacity: 1;
  }
  80% {
    opacity: 0;
  }
}

.volume-button {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  cursor: pointer;
  margin: 5px;
}
.button-group {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
}
.gallery {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 2vw;
  margin-top: 1vw;
  width: 95vw;
}

.gallery-item {
  position: relative;
  width: 17vw;
  height: 22vw;
  padding-top: 18%; /* Maintains the aspect ratio */
  border-radius: 1vw;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  background-color: #fff;
  transition: transform 0.3s ease;
}
.gallery-item:hover{
  transform: scale(1.03);
}
a{
  color: inherit; /* Inherit text color */
}

.gallery-item img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item .overlay {
  position: absolute;
  bottom: 0.7vw;
  color: #fff;
  width: 100%;
  text-align: center;
  padding: 1vw;
}

.gallery-item .overlay h3 {
  margin: 0;
  font-size: 1.2vw;
  font-weight: 600;
}

.gallery-item .overlay p {
  margin: 5px 0 0;
  font-size: 1vw;
}

@media only screen and (max-width: 700px) {
  .box-spin {
    display: none;
}
.rcsa-logo-intro {
  display: none;
}
  .why_box {
    width: 95vw;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-around;
  }
  .why1 {
    width: 95vw;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .box1 {
    width: 14vw;
    height: 14vw;
    border-radius: 10vw;
    background-color: #fa9d24;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .img_why {
    width: 6vw;
    height: 6vw;
  }
  .box2 {
    width: 80vw;
    height: auto;
    display: flex;
    align-items: center;
    font-size: 3vw;
  }
  .why_text {
    width: 95vw;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
  }
  .why_box1 {
    width: 95vw;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .why2 {
    width: 95vw;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8vw;
  }
  .why_box2 {
    width: auto;
    height: auto;
    border-radius: 2vw;
    background-color: #929292;
  }
  .img_reward {
    width: 90vw;
    height: 55vw;
    border-radius: 2vw;
  }
  .text_present {
    width: 90vw;
    height: 7vw;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin-top: -25vw;
    margin-bottom: 170vw;
}
.text_select {
  width: 95vw;
  font-size: 3vw;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.text1 {
  font-size: 10vw;
  font-weight: 500;
  margin-bottom: 2vw;
  color: white;
}
.text2 {
  font-size: 4vw;
  font-weight: 500;
  text-align: center;
  color: white;
  margin: 0;
}
  .text3 {
    font-size: 5vw;
    font-weight: 500;
    margin-top: 7vw;
  }
  .content {
    font-size: 2.5vw;
    margin: 0;
    padding: 5vw;
  }
  .content-th{
    font-size: 3vw;
    margin: 0;
    padding: 5vw;
  }
  .why_line {
    width: 90vw;
    height: 1px;
    background-color: #d7d7d7;
}
  .image-slider-container {
    width: 100%;
    overflow: hidden;
    margin: 0 auto;
  }
  .image-slider {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    margin-bottom: 5vw;
    margin-left: 5vw;
  }
  .image-card {
    width: 50vw;
    height: 70vw;
    border-radius: 3vw;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    margin-right: 5vw;
    background-color: #fff;
    margin-bottom: 20px;
    font-size: 0.75vw;
  }
  .info-rewards{
    padding: 3vw;
    width: 100%;
    margin: 0;
  }
  .info-rewards h6 {
    font-size: 3vw;
  }
  .info-rewards span {
    font-size: 2.5vw;
  }
  .img_rewardss {
    width: 100%;
    height: 60%;
    pointer-events: none;
    border-radius: 1.5vw 1.5vw 0vw 0vw;
  }
  .img_rewardss_taiwan {
    width: 100%;
    height: 60%;
    pointer-events: none;
    border-radius: 1.5vw 1.5vw 0vw 0vw;
  }
  
  .gallery {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 7vw;
    width: 100%;
    padding: 5vw;
    overflow-x: scroll;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  
  .gallery::-webkit-scrollbar {
    display: none;
  }
  
  .gallery-item {
    position: relative;
    min-width: 60vw; /* ตั้งค่าความกว้างขั้นต่ำของแต่ละไอเท็มเพื่อให้ออก overflow */
    min-height: 80vw;
    padding-top: 18%;
    border-radius: 5vw;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    background-color: #fff;
    transition: transform 0.3s ease;
  }
  
  a {
    color: inherit; /* Inherit text color */
  }
  
  .gallery-item img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  .gallery-item .overlay {
    position: absolute;
    bottom: 2.7vw;
    color: #fff;
    width: 100%;
    text-align: center;
    padding: 1vw;
  }
  
  .gallery-item .overlay h3 {
    margin: 0;
    font-size: 5.2vw;
    font-weight: 600;
  }
  
  .gallery-item .overlay p {
    margin: 5px 0 0;
    font-size: 3vw;
  }

  #video {
    width: 100%;
    height: 88vh;
    object-fit: cover;
}
.vdo_present {
  width: 100%;
  height: auto;
  margin-top: 10vw;
}
}
