/***** popup's controler *****/

.overlay {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	transition: opacity 200ms;
	visibility: hidden;
	opacity: 0;
}
.overlay:target {
	visibility: visible;
	opacity: 1;
}
/***** popup's appearance *****/

/* Modal */
  /* 可根据需要添加自定义样式 */


.modal-content {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  width: 1024px;
  margin: 20px auto;
  padding: 0;
  background-color: #fff;
  line-height: 0;
}

.modal-content img {
    max-width: 100%;
    height: auto;
}

.modal-content .text {
    font-family: "Poppins","Noto Sans TC","微軟正黑體修正","Microsoft JhengHei","微軟正黑體",sans-serif;
    display: flex;
    padding: 20px;
    flex-direction: column;
    justify-content: center;
}

.modal-content h2 {
  font-size: 1.6rem;
  margin: 1rem 0;
  font-weight: 500;
  line-height: 1.3;
}

.modal-content p {
  font-size: 1.1rem;
  font-weight: 300;
  line-height: 1.8;
  letter-spacing: 1px;
}

.lity {
  background: rgba(200, 200, 200, 0.95)
}

.lity-content:after {
  box-shadow: none;
}

.lity-close, .lity-close:hover {
  color: #000;
  box-shadow: none;
  text-shadow: none;
}

@media screen and (max-width: 1080px) {
  .modal-content {
      width: 80%;
      grid-template-columns: 1fr;
      gap: 1vw;
  }
}

/* 在小屏幕下，修改为一列布局 */
@media screen and (max-width: 768px) {
    .modal-content {
        width: 80%;
        grid-template-columns: 1fr;
        gap: 1vw;
    }
    .modal-content .text{
      padding: 5vw;
    }
    .modal-content h2 {
      margin: 0 0 0.5rem;
      font-size: 1.2rem;
      line-height: 1.36;
    }
    .modal-content p {
      font-size: 1rem;
      line-height: 1.6;
    }
    .lity-active body {
      overflow: hidden;
  }
    .lity-inline .lity-content > * {
        max-height: none !important;
    }
    .lity-inline .lity-wrap {
        overflow: auto;
    }
    .lity-inline .lity-content {
        margin: 20px 0;
    }
}

.menu {
	right: 2.5rem;
	bottom: 10%;
	position: fixed;
	z-index: 29;
}
.menu__style {
	font-size: 1.2rem;
	padding: 1rem 1.5rem 1.5rem;
    background-color: #000;
    opacity: 0.7;
	background-size: 100% 100%;
    text-align: center;
	margin: 0;
}
.menu ul li {
    color: #fff;
    display: inline-block;

	padding: 1rem 0;
    width: 100%;
    letter-spacing: 1px;
	display: block;
}
.menu a{
	text-decoration: none;
}
.menu ul li:hover {
    font-weight: 0;
}
/* hide sidenav 黏人精*/

.menu > img {
	max-width: 250px;
	padding: 0;
}

#sidebar {
	transition: all 300ms linear;
}
#sidebar.active {
	right: -800px;
}
#sidebar .toggle-btn {
    position: fixed;
    right: 0;
    cursor: pointer;
    background-color: #000;
}

/* 收合導覽黏人精*/
#sidebar .toggle-btn span {
	font-size: 1.3rem;
	line-height: 1.4rem;
    display: block;
    width: 40px;
    color: #ffffff;
    padding: 12px 5px 15px 5px;
    text-align: center;
    cursor: pointer;
}

/* toTop */
.toTop-arrow {
	width: 50px;
    height: 50px;
    border: 0;
    border-radius: 50%;
    opacity: 0.9;
    background: #000;
    color: #ffffff;
    cursor: pointer;
    position: fixed;
    right: 10px;
    bottom: 10px;
    padding-top: 10px;
    z-index: 999;
}
.toTop-arrow::before, .toTop-arrow::after {
	width: 8px;
	height: 2px;
	border-radius: 5px;
	top: 12px;
	background: #ffffff;
	position: absolute;
	content: "";
}
.toTop-arrow::before {
	transform: rotate(-45deg) translate(0, -50%);
	left: 1.2rem;
}
.toTop-arrow::after {
	transform: rotate(45deg) translate(0, -50%);
	right: 1.2rem;
}
.toTop-arrow:focus {
	outline: none;
}

/* swiper */

:root{
  --swiper-navigation-size: 2.5rem;
  --swiper-theme-color: #fff;
}

/* timeline */

.timeline {
  position: relative;
  margin-bottom: 8rem;
}
.timeline::before {
  content: "";
  background: rgba(0, 0, 0, 0.2);
  width: 0.1px;
  height: 100%;
  position: absolute;
  top: 6rem;
  left: 50%;
  transform: translateX(-50%);
}
.timeline h1{
	width: 100%;
  margin: 0 0 ;
	display: flex;
	justify-content: center;
  text-align: center;
}
.timeline-item {
  width: 100%;
  margin-bottom: -10rem;
}
.timeline-item:nth-child(even) .timeline-content {
  float: right;
}
.timeline-item:nth-child(even) .timeline-content .date {
  right: auto;
  left: 0;
}
.timeline-item:nth-child(even) .timeline-content::before {
  content: "";
  position: absolute;
  border-style: solid;
  width: 0;
  height: 0;
  top: 31px;
  left: -15px;
  border-width: 10px 15px 10px 0;
  border-color: transparent #ddd transparent transparent;
}
.timeline-item:nth-child(even) .timeline-content::after {
  content: "";
  position: absolute;
  border-style: solid;
  width: 0;
  height: 0;
  top: 30px;
  left: -13px;
  border-width: 11px 16px 11px 0;
  border-color: transparent #fff transparent transparent;
}
.timeline-item::after {
  content: "";
  display: block;
  clear: both;
}

.timeline-content {
  border: 1px solid #ddd;
  position: relative;
  width: 45%;
  border-radius: 4px;
  background: #fff;
  line-height: 0;
}
.timeline-content::before {
  content: "";
  position: absolute;
  border-style: solid;
  width: 0;
  height: 0px;
  top: 31px;
  right: -15px;
  border-width: 10px 0 10px 15px;
  border-color: transparent transparent transparent #ddd;
}
.timeline-content::after {
  content: "";
  position: absolute;
  border-style: solid;
  width: 0;
  height: 0px;
  top: 30px;
  right: -13px;
  border-width: 11px 0 11px 16px;
  border-color: transparent transparent transparent #fff;
}

.timeline-img {
  width: 11px;
  height: 11px;
  background: #333;
  border-radius: 50%;
  position: absolute;
  left: 50%;
  margin-top: 34px;
  margin-left: -10px;
  border: 5px solid #f7f7f7;
  box-sizing: content-box;
}

.timeline-card {
  padding: 0;
}

.timeline-card p {
  font-size: 1.2rem;
  letter-spacing: 1.2px;
  line-height: 1.8;
  padding: 0 30px 30px;
}

.timeline-header h2 {
	font-weight: 500;
  font-size: 1.65rem;
  line-height: 1.5;
  padding: 30px 30px 0 30px;
  margin: 0;
}

.timeline .date {
  font-size: 1rem;
  font-weight: 300;
  display: inline-block;
  color: #aaa;
  letter-spacing: 0.5px;
  padding: 20px 30px 20px;
}

/* swiper style */

.swiper-pagination-bullet {
  background-color: #fff; /* dots 非活動狀態下的顏色 */
}

.swiper-pagination-bullet-active {
  background-color: #fff; /* dots 活動狀態下的顏色 */
}

/* odometer 取消逗點 */
.odometer-formatting-mark {
  display: none;
}

@media screen and (max-width: 1024px) {
  .timeline::before {
    width: 1px;
  }
  .timeline-content{
		width: 46%;
	}
}

@media (max-width:768px) {
	.modal-content{
		width: 90%;
	}
	.menu {
		max-width: 100%;
		bottom: 0%;
		right: 0;
	}
	.menu > img {
		max-width: 23%;
		padding: 0;
		opacity: 0.9;
	}
	.menu__style {
		padding: 2% 4% 2% 1%;
	}
	.menu ul li {
		padding: 2px 8px;
		font-size: 0.95em;
		line-height: 2.1em;
		width: auto;
		display: inline-block;
	}
	.menu ul li:hover {
		color: #8f0e0a;
	}
	#sidebar .toggle-btn{
		bottom: 0px;
	}
	.toTop-arrow{
		bottom: 5vh;
	}
  .timeline::before {
    width: 1px;
    left: 6vw;
  }
  .timeline .timeline-img {
    left: 6vw;
  }
  .timeline .timeline-content {
    max-width: 100%;
    width: auto;
    margin-left: 8vw;
  }
  .timeline .timeline-item:nth-child(even) .timeline-content {
    float: none;
  }
  .timeline .timeline-item:nth-child(even) .timeline-content::before {
    content: "";
    position: absolute;
    border-style: solid;
    width: 0;
    height: 0;
    top: 31px;
    left: -15px;
    border-width: 10px 15px 10px 0;
    border-color: transparent #ddd transparent transparent;
  }
  .timeline .timeline-item:nth-child(even) .timeline-content::after {
    content: "";
    position: absolute;
    border-style: solid;
    width: 0;
    height: 0;
    top: 30px;
    left: -13px;
    border-width: 11px 16px 11px 0;
    border-color: transparent #fff transparent transparent;
  }
  .timeline .timeline-item:nth-child(odd) .timeline-content::before {
    content: "";
    position: absolute;
    border-style: solid;
    width: 0;
    height: 0;
    top: 31px;
    left: -15px;
    border-width: 10px 15px 10px 0;
    border-color: transparent #ddd transparent transparent;
  }
  .timeline .timeline-item:nth-child(odd) .timeline-content::after {
    content: "";
    position: absolute;
    border-style: solid;
    width: 0;
    height: 0;
    top: 30px;
    left: -13px;
    border-width: 11px 16px 11px 0;
    border-color: transparent #fff transparent transparent;
  }
  .timeline-item {
    margin-bottom: 1.5rem;
  }
  .timeline-card p {
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    line-height: 1.6;
    padding: 0 20px 20px;
  }
  .timeline-header h2 {
    font-size: 1rem;
    letter-spacing: 0.5px;
    padding: 20px 20px 0;
  }
  .timeline .date {
    padding: 8px 0 12px 20px;
    line-height: 1.2rem;
  }
}

@media (max-width:510px) {
	.menu>img {
		max-width: 30%;
		padding: 0;
	}
	.menu__style {
		padding: 10px;
	}
	.menu ul li {
		font-size: 0.9em;
		line-height: 2.1em;
	}
}