:root {
  --main-color: #436abf;
  --main-color-2: #ffcc5b;
  --main-color-2-2: #f37165;
  --sec-color: #b99c7d;
  --bg: #fff8e8;
  --text: #404040;

  --btn_primary: #c765b6;
  --btn_cancel: #38437890;
  --text_primary: #404040;
  --text_hover: #ffcc5b;
  --btn_search: #ffcc5b; /*首頁搜尋按鈕*/
  --bg_search: #fff8e8; /*首頁搜尋底色*/
  --content-max: 1224px;
  --content-gutter: 10px;
  --titleFontSize: 1.4rem;
}

body {
  font-size: 16px;
}

a {
  text-decoration: none;
}

html {
  overflow-x: hidden;
}

.mobile {
  display: none !important;
}

.maskClose {
  left: calc((100vw - 40px) / 2);
  width: 40px;
  height: 40px;
  margin: 35px auto 10px auto;
  position: fixed;
  z-index: 11;
}

.maskClose a {
  outline: none;
}

.maskClose a:focus-within div {
  outline: 2px rgba(255, 255, 255, 1) dashed;
}

.maskCloseBtn {
  width: 40px;
  height: 40px;
  background-image: url("../img/closeMask.png");
  background-color: rgba(0, 0, 0, 0.3);
  background-size: 20px;
  background-repeat: no-repeat;
  background-position: center;
  display: block;
  border: 10px transparent solid;
  border-radius: 999em;
  cursor: pointer;
}

.active {
  display: block !important;
}

.absolute {
  position: absolute;
}

/*活動介紹 ------ Start*/

.mainActivityContainer {
  height: 70vh;
  margin-top: 10vh;
  display: none;
}

.mainActivityPrev,
.mainActivityNext {
  width: calc((100vw - 600px) / 2);
  height: 70vh;
  padding: 0;
  margin: 0;
  line-height: 70vh;
  display: block;
  float: left;
}

.mainActivityPrev a,
.mainActivityNext a {
  outline: none;
}

.mainActivityPrev a:focus div,
.mainActivityNext a:focus div {
  outline: 2px rgba(255, 255, 255, 1) dashed;
}

.prevActBtn,
.prevAppBtn,
.nextActBtn,
.nextAppBtn {
  width: 52px;
  height: 52px;
  margin-left: auto;
  margin-right: auto;
  margin-top: calc((73vh - 52px) / 2);
  background-size: 16px;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 999em;
  display: block;
}

.prevActBtn,
.prevAppBtn {
  background-image: url("../img/mainActPrev.png");
}

.nextActBtn,
.nextAppBtn {
  background-image: url("../img/mainActNext.png");
}

.mainActivityBody {
  width: 600px;
  height: 70vh;
  padding: 0;
  margin: 0;
  overflow: hidden;
  display: block;
  float: left;
}

.mainActivityBody div {
  transition: all 0.5s ease;
}

.actImg,
.appImg {
  padding: 10px;
  margin: 2px;
}

.navDots {
  width: 100vw;
  height: 15px;
  text-align: center;
}

.navDots a {
  outline: none;
}

.navDots a:focus > div {
  outline: 2px rgba(255, 255, 255, 1) dashed;
}

.dotActive {
  background-color: rgba(34, 166, 139, 1) !important;
}

.navDotContainer {
  width: 15px;
  height: 15px;
  padding: 5px;
  outline: 0;
  border-radius: 999em;
  display: inline-block;
}

.navDot {
  width: 5px;
  height: 5px;
  background-color: rgba(255, 255, 255, 0.21);
  border-radius: 999em;
}
/*活動介紹 ------ End*/

/*上方大 banner ------ start*/
.tb_web,
.tb_mobile {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.tb_web {
  width: 100vw;
  height: calc(100vw / 1440 * 623);
  display: block;
}

.tb_mobile {
  display: none;
}
/*上方大 banner ------ end*/

.mainArea {
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto 50px;
  padding-left: max(var(--content-gutter), calc((100% - var(--content-max)) / 2));
  padding-right: max(var(--content-gutter), calc((100% - var(--content-max)) / 2));
}

.mainArea > .search-container,
.mainArea > .areaBtnArea,
.mainArea > .listArea {
  width: 100%;
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
}

/*search bar ------ start*/
.search-container {
  display: flex;
  align-items: center;
  padding: 65px 10px 0;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  color: var(--main-color);
}

.search-input-icon {
  position: absolute;
  left: 40px;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background-color: currentColor;
  mask: url("../img/icon_search.svg") no-repeat center / contain;
  -webkit-mask: url("../img/icon_search.svg") no-repeat center / contain;
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 85px;
  padding-left: 85px;
  font-size: 1.4em;
  color: var(--main-color);
  background-color: var(--bg_search);
  border-radius: 5px 0 0 5px;
  border: 0;
  outline: 0;
}
.search-input::placeholder {
  color: color-mix(in srgb, var(--main-color) 50%, transparent);
}
.search-input:focus {
  outline: 2px var(--main-color) dashed;
}

.search-btn {
  width: 250px;
  height: 85px;
  color: var(--main-color);
  font-size: 1.4em;
  font-weight: 500;
  background-color: var(--main-color-2);
  border-radius: 0 5px 5px 0;
  border: 0;
  outline: 0;
}
.search-btn:hover {
  opacity: 0.9;
}
.search-btn:focus {
  outline: 2px var(--main-color) dashed !important;
  opacity: 0.9;
}
/*search bar ------ end*/

/*區域按鈕 ------ start*/
.invisible {
  visibility: hidden;
}

.areaBtnArea {
  display: flex;
  align-items: stretch;
  width: 100%;
  margin: 30px 0 40px;
}

/* 無障礙 label 不佔 flex 欄位，避免五個 h2 無法等分 */
.areaBtnArea > label.invisible {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.areaBtnArea > .areaDropdown {
  display: none;
}

.areaBtnArea > .areaBtnBrick {
  flex: 1 1 0%;
  width: 0;
  min-width: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.areaBtnBrick > a {
  display: flex;
  flex: 1;
  min-height: 0;
  padding: 10px;
  box-sizing: border-box;
  outline: none;
  text-decoration: none;
}

.areaBtnBrick:focus-within {
  outline: 2px var(--main-color) dashed;
}

.areaBtn {
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  height: 70px;
  margin: 0;
  color: white;
  font-size: var(--titleFontSize);
  font-weight: 600;
  line-height: 1.2;
  background-color: var(--main-color);
  border-radius: 5px;
  transition-duration: 0.2s;
}

.areaBtn:hover {
  background-color: var(--text_hover);
}

.areaBtn-active {
  color: var(--main-color);
  background-color: var(--text_hover);
}

.areaDropdown {
  display: none;
}
/*區域按鈕 ------ end*/

/*館所列表 ------ start*/
.listArea {
  min-height: 200px;
}

.museumBrick {
  width: calc(100% / 3);
  padding: 10px;
  display: inline-block;
  vertical-align: top;
}

.museumBrick:focus-within {
  outline: 2px var(--main-color) dashed;
}

.museumBrick:focus-within div {
  color: var(--main-color);
  visibility: visible;
}

.museumBrick:hover div.textBrick {
  color: var(--main-color);
}
.museumBrick:hover div.shadowBrick {
  opacity: 1;
}

.photoBrick,
.collectedMask {
  width: calc(100% - 11px);
  padding-top: 60%;
  border-radius: 5px;
  position: relative;
  z-index: 1;
}

.collectedMask {
  background-color: rgba(255, 255, 255, 0.65);
  color: var(--main-color-2-2);
  float: left;
  z-index: 2;
}

.collectedMask::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: currentColor;
  mask: url("../img/stamp_completed.svg") no-repeat center / 50%;
  -webkit-mask: url("../img/stamp_completed.svg") no-repeat center / 50%;
  pointer-events: none;
}

.shadowBrick {
  width: calc(100% - 11px);
  padding-top: 60%;
  margin-top: calc(-60% + 10px);
  margin-left: 12px;
  border-radius: 5px;
  background-color: var(--main-color-2);
  display: block;
  opacity: 0;
  transition-duration: 0.1s;
}

.textBrick {
  padding-bottom: 10px;
  font-size: 1.25em;
  font-weight: 600;
  color: rgba(0, 0, 0, 1);
  float: left;
  transition-duration: 0.1s;
}

.slideContainer {
  width: 200%;
  height: 100%;
  line-height: 100%;
  overflow: hidden;
}

.actImgLink,
.appImgLink {
  padding: 0;
  margin: 0;
  outline: none;
}

.actImgLink:focus img,
.appImgLink:focus img {
  outline: 2px rgba(255, 255, 255, 1) dashed;
}

.maskFadIn {
  display: block !important;
  animation: fadIn 0.5s ease;
}

.maskFadOut {
  animation: fadOut 0.5s ease;
  display: none !important;
}

.moveNext {
  background-position: -634px, 0;
}

.movePrev {
  margin-left: 0 !important;
}
/*館所列表 ------ end*/

.hideBtn {
  display: none !important;
}

.filterNoResult {
  font-size: 1.5em;
  color: rgba(153, 153, 153, 1);
  font-weight: 800;
  text-align: center;
}

.emergency-pop {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 300;
}
.emergency-pop a:first-child {
  outline: none;
}
.emergency-pop a:focus div {
  outline: 2px rgba(255, 255, 255, 1) dashed;
}
.emergency-board {
  width: 395px;
  overflow: hidden;
  border-radius: 10px;
  margin: 20px 0 40px;
}
.emergency-board .emergency-title {
  color: white;
  background-color: var(--main-color);
  font-size: 20px;
  font-weight: bold;
  padding: 10px 0;
  text-align: center;
}
.emergency-board .emergency-content {
  background-color: white;
  font-size: 16px;
  padding: 24px 36px;
  text-align: justify;
  white-space: pre-wrap;
}
.emergency-content .emergency-btn {
  display: block;
  width: 100%;
  color: white;
  background-color: var(--main-color);
  padding: 9px 0;
  margin: 20px 0 0;
  text-align: center;
  border-radius: 5px;
}

@media only screen and (min-width: 0px) and (max-width: 900px) {
  body {
    padding: none;
  }
  .mobile {
    display: block !important;
  }
  .pc {
    display: none !important;
  }
  .maskClose {
    top: -10px;
    right: -120px;
    width: 25px;
    height: 25px;
    /*margin: 28px 0px 20px calc(100vw - 53px);*/
  }
  .maskClose a:focus div {
    outline: none;
  }
  .maskCloseBtn {
    width: 25px;
    height: 25px;
    background-image: url("../img/closeMask.png");
    background-size: 20px;
    background-repeat: no-repeat;
    background-position: center;
    display: block;
  }
  .mainActivityContainer {
    height: 60vh;
    display: none;
  }
  .mainActivityBody {
    width: 280px;
    height: 60vh;
    padding: 0px;
    margin: 0px;
    overflow: hidden;
    display: block;
    float: left;
  }
  .mainActivityPrev,
  .mainActivityNext {
    width: calc((100vw - 280px) / 2);
    height: 60vh;
    padding: 0px;
    margin: 0px;
    line-height: 60vh;
    display: block;
    float: left;
  }
  .mainActivityPrev a:focus div,
  .mainActivityNext a:focus div {
    outline: none;
  }
  .prevActBtn,
  .prevAppBtn,
  .nextActBtn,
  .nextAppBtn {
    width: 24px;
    height: 24px;
    margin-left: auto;
    margin-right: auto;
    margin-top: calc((60vh - 24px) / 2);
    background-size: 16px;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 999em;
    display: block;
  }
  .actImg,
  .appImg {
    padding: 0;
    margin: 0;
  }
  .navDots {
    margin-top: 20px;
  }
  .mainArea {
    padding: 0 var(--content-gutter) !important;
  }

  .mainArea > .search-container,
  .mainArea > .areaBtnArea,
  .mainArea > .listArea {
    max-width: 100%;
  }

  .search-container {
    padding: 0 !important;
  }

  .search-input-wrap {
    min-width: 0;
  }

  .search-input-icon {
    left: 12px;
    width: 20px;
    height: 20px;
  }

  .search-input {
    height: 50px;
    padding-left: 46px;
    font-size: 1rem;
  }

  .search-btn {
    width: 60px;
    min-width: 60px;
    height: 50px;
    padding: 5px;
    font-size: 1rem;
  }
  .baseBoard {
    width: 100%;
  }
  /*上方大 banner ------ start*/
  .tb_web {
    display: none;
  }
  .tb_mobile {
    width: 100vw;
    height: calc(100vw / 375 * 506);
    display: block;
  }
  /*上方大 banner ------ end*/
  /*區域按鈕 ------ start*/
  .areaBtnArea {
    display: block !important;
    padding: 20px 0 !important;
    /* height: 70px !important; */
    margin: 0 !important;
  }
  .areaBtnArea > .areaBtnBrick {
    display: none;
  }
  .areaBtnArea > .areaDropdown {
    width: 100%;
    display: block;
  }
  .areaDropdown select {
    width: 100%;
    height: 50px;
    padding-left: 16px;
    appearance: none;
    -moz-appearance: none;
    -webkit-appearance: none;
    color: rgba(255, 255, 255, 1);
    font-weight: 600;
    border: 0;
    border-radius: 5px;
    background-color: var(--main-color);
    background-image: url("../img/dropdownArrow.png");
    background-repeat: no-repeat;
    background-position: calc(100% - 20px);
    display: block;
  }
  /*區域按鈕 ------ end*/
  .listArea {
    padding-top: 10px;
    padding-right: 5px;
    line-height: 100%;
    vertical-align: top;
  }
  .museumBrick {
    width: calc(100% / 2);
    clear: both;
    padding: 0 5px 0 0;
    display: inline-block;
  }
  .photoBrick,
  .collectedMask {
    padding-top: 80%;
  }
  .collectedMask::after {
    mask-size: 70%;
    -webkit-mask-size: 70%;
  }
  .textBrick {
    padding-bottom: 10px;
    height: auto;
    min-height: calc(100vw / 8);
    line-height: calc(100vw / 20);
    font-size: calc(100vw / 22);
    font-weight: 800;
    color: rgba(0, 0, 0, 1);
    float: left;
  }
  .emergency-board {
    width: 89.33vw;
    margin: 12px 0 25px;
  }
  .emergency-board .emergency-title {
    font-size: 18px;
    padding: 8px 0;
  }
  .emergency-board .emergency-content {
    font-size: 14px;
    padding: 20px 24px;
  }
}

/* 平板：維持 1224 上限，縮小搜尋列與按鈕區間距 */
@media only screen and (min-width: 901px) and (max-width: 1224px) {
  .search-container {
    padding-top: 48px;
    padding-bottom: 24px;
  }

  .search-input {
    height: 72px;
    font-size: 1.2em;
  }

  .search-btn {
    width: 200px;
    height: 72px;
    font-size: 1.2em;
  }

  .areaBtn {
    font-size: 1.2rem;
    height: calc(1.2rem * 3);
    line-height: calc(1.2rem * 3);
  }
}

/* 中小螢幕：搜尋列間距微調 */
@media only screen and (min-width: 901px) and (max-width: 1440px) {
  .search-container {
    padding-top: clamp(40px, 5vw, 65px);
    padding-bottom: clamp(20px, 2.5vw, 30px);
  }
}

@keyframes fadIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes fadOut {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes downSize {
  0% {
  }
  100% {
    width: 0;
  }
}

@keyframes nextMainAct {
  0% {
    margin-left: 0;
  }
  100% {
    margin-left: -100%;
  }
}

@keyframes prevMainAct {
  0% {
    margin-left: -100%;
  }
  100% {
    margin-left: 0;
  }
}

@keyframes moveLeft {
  0% {
    opacity: 1;
    margin-left: 0;
  }
  100% {
    opacity: 0;
    margin-left: -50%;
  }
}
