:root {
  color-scheme: light only;
  --black: #111111;
  --grey: #707070;
  --white: #f2eae0;
  --active: #271b0e;
  
  --font: "Noto Sans TC", sans-serif;
  --navheight: 70px;
}

@media only screen and (max-width: 768px) {
  :root {
    --navheight: 65px;
  } 
}
/*---------------------------------------
   Animation
-----------------------------------------*/
@keyframes fadein{
	from {opacity: 0;}
    to {opacity: 1;}
}
@keyframes fadein_top{
	from {transform: translateY(300px); opacity: 0;}
    to {transform: translateY(0); opacity: 1;}
}
@keyframes fadein_bottom{
	from {transform: translateY(-300px); opacity: 0;}
    to {transform: translateY(0); opacity: 1;}
}
@keyframes fadein_left{
	from {transform: translateX(-500px); opacity: 0;}
    to {transform: translateX(0); opacity: 1;}
}
@keyframes fadein_right{
	from {transform: translateX(500px);}
    to {transform: translateX(0);}
}
@keyframes float{
  0% {transform: translateY(0px);}
  100% { transform: translateY(25px);}
}
@keyframes popin{
  0% {transform: scale(2); opacity: 0;}
  100% {transform: scale(1); opacity: 1;}
}
@keyframes zoom{
  0% {transform:  translate(-50%, -50%) scale(1);}
  100% {transform:  translate(-50%, -50%) scale(1.03);}
}
@keyframes swing {
  0% {rotate: 0deg;}
  25% {rotate: -5deg;}
  50% {rotate: 5deg;}
  75% {rotate: -5deg;}
  100% {rotate: 0deg;} 
}

/*---------------------------------------
   Normalize    
-----------------------------------------*/
body{
  position: relative;
  width: 100%;
  margin: 0px;
  padding: 0px;
  color: var(--black);
  font-size:  var(--txt_s);
  font-family: var(--font);
  font-weight: 500;
  text-wrap: pretty;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  background: unset;
}

.maincontainer{
  width: 100%;
  max-width: 1200px;
  height: 100%;
  margin: auto;
  padding-bottom: 150px;
  z-index: 15;
}

p, li {
  font-size: var(--txt_body);
  line-height: calc(var(--txt_body) + 5px);
  font-weight: 400;
}

li{
  list-style: disc;
  margin-left: 15px;
}

.divider.verti{
  width: 0;
  height: 100px;
  border-left: 1.5px solid white;
}

@media screen and (max-width: 768px) {
  .maincontainer{
    padding-bottom: 200px;
  }
  .draggable-scroll{
    cursor: grab;
  }
}

/*---------------------------------------
   Scroll Effect       
-----------------------------------------*/
::-webkit-scrollbar {
  width: 3.5px;
  height: 3.5px;
  /* display: none; */
}
::-webkit-scrollbar-track {
  opacity: 0;
  background:  rgba(226, 226, 226,.5);
}
::-webkit-scrollbar-thumb {
  background: var(--black);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--black);
}

body.modal-open {
  overflow-y: scroll; /* Ensures the scrollbar stays visible */
}


/*---------------------------------------
   NAVBAR
-----------------------------------------*/
.navbar{
  padding: 0px 50px 15px 50px;
}
.navbar-brand{
  padding: var(--p_s);
  pointer-events: all;
}
.navbar-brand img{
  height: 100px;
  max-height: fit-content;
  z-index: 5;
  transition: all .3s;
}
.scrolled .navbar-brand img{
  height: 75px;
  transition: all .3s;
  padding: 0;
}

#navbarNav{
  padding: 30px 0;
}
.navbar-nav{
  gap: var(--p_s);
}

.nav-item{
  pointer-events: all;
  cursor: pointer;
  background: url(../img/nav/navbg.png) bottom no-repeat;
  filter: drop-shadow(0px 0px 5px rgba(73, 38, 38, 0.5));
}

.nav-item:hover{
  filter: brightness(.3) saturate(100%) sepia(1) hue-rotate(-20deg) saturate(500%) brightness(.75);
}


@media screen and (max-width: 767px) {
  .navbar{
    padding: 10px 50px;
    background: var(--black);
    border-bottom: 3px solid var(--active);
  }
  .navbarwrapper{
    align-items: center !important;
  }
  #navbarNav{
    padding: unset;
    transform-origin: right;
    scale: .8;
  }
  .navbar *{
    color: var(--white);
  }
  .navbar-brand{
    padding: 0px;
    margin: 0px !important;
  }
  .navbar-brand img{
    height: 75px;
    transition: all .3s;
    padding: 0;
  }
}
@media screen and (max-width: 380px) {
  #navbarNav{
    gap: 0px;
  }
}

/*---------------------------------------
   KV
-----------------------------------------*/
#KV{
  position: relative;
  min-height: 100vh;
  height: fit-content;
  background: url(../img/bg.png) no-repeat bottom center;
  background-size: cover;
  background-attachment: fixed;
}

.tltimg{
  position: absolute;
  bottom:50px;
  right: 50px;
  width: 150px;
  height: 100%;
  background: url(../img/event/tlt.png) no-repeat bottom;
  background-size: contain;
}
#en .tltimg{
  width: 250px;
  background: url(../img/event/tlt-en.png) no-repeat bottom;
  background-size: contain;
}
@media screen and (max-width: 1550px) {
  .tltimg{display: none;}
}

#event-tab {
  position: absolute;
  height: 100%;
  width: fit-content;
  z-index: 99;
  gap: 0;
  left: 0;
}
.btn_tab {
  position: relative;
  pointer-events: all;
  min-width: fit-content;
  width: 50px;
  height: 50px;
  background-color: #271b0e;
}

.btn_tab:hover{
  background-color: rgb(56, 29, 27);
}
.btn_tab.active {
  background-color: #bb7922;
}

.btn_tab::before{
  --btntabwidth: 396px;
  content: '';
  position: absolute;
  width: calc(var(--btntabwidth) / 10);
  height: 40px;
  background: url(../img/event/btn_tab.png) left center no-repeat;
  right: 5px;
  top: 50%;
  transform-origin: center;
  transform: translateY(-50%) scale(.85);
  filter: brightness(100) saturate(0);
  transition: all;
}
.btn_tab:nth-child(2)::before{
  background-position: calc((var(--btntabwidth)* -1) / 10 * 1) 0;
}
.btn_tab:nth-child(3)::before{
  background-position: calc((var(--btntabwidth)* -1) / 10 * 2) 0;
}
.btn_tab:nth-child(4)::before{
  background-position: calc((var(--btntabwidth)* -1) / 10 * 3) 0;
}
.btn_tab:nth-child(5)::before{
  background-position: calc((var(--btntabwidth)* -1) / 10 * 4) 0;
}
.btn_tab:nth-child(6)::before{
  background-position: calc((var(--btntabwidth)* -1) / 10 * 5) 0;
}
.btn_tab:nth-child(7)::before{
  background-position: calc((var(--btntabwidth)* -1) / 10 * 6) 0;
}
.btn_tab:nth-child(8)::before{
  background-position: calc((var(--btntabwidth)* -1) / 10 * 7) 0;
}
.btn_tab:nth-child(9)::before{
  background-position: calc((var(--btntabwidth)* -1) / 10 * 8) 0;
}
.btn_tab:nth-child(10)::before{
  background-position: calc((var(--btntabwidth)* -1) / 10 * 9) 0;
}

.tabtitle{
  font-family: 'Noto Serif SC', serif;
  color: var(--white);
  opacity: 0;
  padding: 0 20px;
  display: block;
  width: 0;
  text-wrap: nowrap;
  text-align: start;
  transition: all .3s;
}
.btn_tab:hover .tabtitle{
  opacity: 100%;
  padding-right: 60px;
  width: fit-content;
  transition: all .3s;
}

@media screen and (max-width: 768px) {
  #KV{
    max-height: 100vh;
  }
  #event-tab {
    width: 100vw;
    flex-direction: row !important;
    bottom: 0;
    background-color: #271b0e;
    height: fit-content;
  }
  .tabtitle, .tabtitle:hover{
    display: none;
  }
}
@media screen and (max-width:500px) {
  #event-tab {
    justify-content: flex-start !important;
    overflow-x: scroll;
  }
  .btn_tab{
    min-width: 50px;
  }
  .btn_tab::before{
    right: unset;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}


.eventmainwrapper{
  position: relative;
  width: 100%;
  min-width: 300px;
  max-width: 1080px;
  height: 100%;
  max-height: 595px;
  margin: 10px;
  padding-top: 10px;
  background: url(../img/event/ctnbg.png) top right no-repeat;
  background-size: cover;
  transform-origin: top;
  animation: expand .5s ease-in-out backwards;
  animation-delay: 350ms;
}

.eventmainwrapper::before, .eventmainwrapper::after{
  content: '';
  z-index: 10;
  position: absolute;
  width: 110%;
  height: 10px;
  background: url(../img/event/border.png) top center no-repeat;
  left: 50%;
  transform: translateX(-50%);
}
.eventmainwrapper::before{
  top: -50px;
  background: url(../img/event/top.png) top center no-repeat;
  background-size: contain;
  transform: translateX(-50%);
  height: 135px;
  width: 105%;
}
.eventmainwrapper::after{
  bottom: -8px;
}

.tab-content>.tab-pane {
  display: unset;
  flex-direction: column;
}

.fade:not(.show) {
  display: none;
}

.contentwrapper{
  display: flex;
  overflow-y: scroll;
  width: 100%;
  height: 100%;
  min-height: 500px;
  max-height: 70vh;
  padding: 60px 8% 25px 8%;
}

.contentwrapper::before, .contentwrapper::after{
  content: '';
  width: 21px;
  height: 145px;
  transform-origin: top center;
  position: absolute;
  display: flex;
  justify-content: center;
  background: url(../img/event/deco.png) bottom center no-repeat;
  animation: swing 3s ease-in-out infinite backwards;
  top: 0;
  left: -15px;
}

.contentwrapper::after{
  left: unset;
  right: -15px;
  animation-delay: 50ms;
}

.header h1, .header p{ line-height: 3rem;}

.title{
  font-family: 'Noto Serif SC', serif;
  font-weight: 900;
  font-size: 3rem;
  color: #a31e11;
  margin: 0;
  text-transform: none;
}

#en .title,#en .title-small{
  letter-spacing: -2px;
}

.date {
  color: #f5ece2;
  width: fit-content;
  max-width: 80%;
  background: #442a2b;
  /* background: url(../img/event/datebg.png) top center no-repeat; */
  font-weight: 600;
  font-size: 0.8rem;
  height: 40px;
  margin: 0;
  margin-left: 25px;
  display: flex;
  align-items: center;
  line-height: 1rem !important;
  position: relative;
}

.date::before, .date::after{
  content: "";
  position: absolute;
  width: 40px;
  aspect-ratio: 1/1;
  background: url(../img/event/datebg_l.png) left center no-repeat;
  background-size: contain;
  right: 100%;
  top: 0;
}
.date::after{ 
 right: unset;
  left: 100%;
  background: url(../img/event/datebg_r.png) right center no-repeat;
}

.title-small{
  font-family: 'Noto Serif SC', serif;
  font-weight: 900;
  font-size: 1.75rem;
  color: #7f4e48;
  line-height: 1.5rem;
}

.content{
  display: flex;
  flex-direction: column;
  padding-bottom: 25px;
}

.contentwrapper > div.content:nth-of-type(2) {
  margin-top: 25px;
}

.content img{
  width: 100%;
  max-width: fit-content;
  align-self: center;
}

.contentmain{
  font-family: 'Noto Serif SC', serif;
  color: #7f4e48;
  font-size: 18px;
  font-weight: 900;
}

.contentinfo{
  font-family: 'Noto Serif SC', serif;
  color: #7f4e48;
}
b{
  font-weight: 900;
  color: #a31e11;
}

.reward{
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 25px;
  padding: 10px;
  flex-wrap: wrap;
}

.rewardicon{
  width: 120px;
  max-width: fit-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.rewardicon p{
  text-align: center;
  margin: 0 !important;
}

.rewardicon img{
  width: 70px;
  aspect-ratio: 1/1;
  background-color: #442a2b;
  border-radius: 5px;
}

@media screen and (max-width: 1200px) {
  .eventmainwrapper{border: 2px solid #b6928e;}
  .eventmainwrapper::after, .eventmainwrapper::before{width: 105%;}
  .reward{gap: 15px;}
  .eventmainwrapper::before{
    top: -10px;
    width: 110%;
  }
}
@media screen and (max-width: 500px) {
  .eventmainwrapper{max-height: 70vh;}
  .rewardicon img{ width: 55px;}
}

/*---------------------------------------
   TABLE
-----------------------------------------*/
table td {
  font-size: 14px;
  line-height: 18px;
  color: #442a2b !important;
  border: 1px solid #b1b1b1a6;
  word-break: break-all;
  padding: .5rem .5rem;
  text-align: center;
  background: none !important;
}

table tr:first-child td {
  font-size: 16px;
  padding: .8rem .35rem;
  background-color: #442a2b !important;
  text-align: center;
  font-weight: 500;
  color: #fbf7e8 !important;
}

/*---------------------------------------
   MODAL
-----------------------------------------*/
.btn-close {
  position: absolute;
  border: 1px solid var(--grey);
  border-radius: var(--border_s);
  align-items: center;
  justify-items: center;
  width: 14px;
  background-color: var(--grey);
  z-index: 99;
  margin: 30px auto;
  left: 50%;
  top: 105%;
  transform: translateX(-50%);
}
.btn-close:hover{
  border: 1px solid var(--white);
  background-color: var(--white);
  opacity: 1;
}

.modal-backdrop.show {
  opacity: .75 !important;
}
.modal-dialog{
  margin: 0 auto;
}
.modal-content {
  color: var(--active);
  border: none;
  border-radius: 0px;
  height: 100%;
  min-height: fit-content;
  background: none;
  gap: 0;
}

.modal-header, .modal-body, .modal-footer{
  border: 0px;
  margin: 0 !important;
}
.modal-body {
  min-width: fit-content;
  min-height: 370px;
  gap: 30px;
  background-image: linear-gradient(to right, rgb(255 240 194) 0%, rgb(255 247 222) 100%);
}


/*---------------------------------------
   FOOTER
-----------------------------------------*/
footer{
  background-color: var(--black);
  color: var(--white);
}
#footer{
  background: var(--black);
}

