body {
  font-weight: 400;
  font-family: TaipeisansTC, "Noto Sans", sans-serif;
}

@font-face {
  font-family: TaipeisansTC;
  src: url(/wp-content/fonts/TaipeiSansTCBeta-Regular.ttf);
  font-weight: 400;
}

@font-face {
  font-family: TaipeisansTC;
  src: url(/wp-content/fonts/TaipeiSansTCBeta-Light.ttf);
  font-weight: 300;
}

@font-face {
  font-family: TaipeisansTC;
  src: url(/wp-content/fonts/TaipeiSansTCBeta-Bold.ttf);
  font-weight: 700;
}

#et-main-area {
	position: relative;
	z-index: 1;
}

.et_pb_contact_form_container .et_pb_contact p input,
.et_pb_contact_form_container .et_pb_contact p textarea {
  color: #363636;
}

.et_pb_contact_form_container .et_pb_contact p input::placeholder,
.et_pb_contact_form_container .et_pb_contact p textarea::placeholder {
  color: #999;
}

/* set the row width for mobile. */
/* the original is 80% */
@media only screen and (max-width: 980px) {
  .et_pb_row {
    width: 100%;
  }

  .et_pb_text,
  .et_pb_button_module_wrapper,
  .et_pb_promo,
  .et_pb_blurb_container,
  .et_pb_contact_form_container,
  .et_pb_blurb {
/*     padding-left: 2%;
    padding-right: 2%; */
	padding-left: 3%;
    padding-right: 3%;
  }
}

/* set the top section padding for all pages to 0 by default */
.et-db #et-boc .et-l .et_pb_section_0_tb_body.et_pb_section {
/*   padding-top: 0px !important; */
}

/* hide the sidebar */
/* Take out the divider line between content and sidebar */
#main-content .container:before {
  background: none;
}

/* Hide Sidebar */
#sidebar {
  display: none;
}

/* Expand the content area to fullwidth */
@media (min-width: 981px) {
  #left-area {
    width: 100%;
    padding: 23px 0px 0px !important;
    float: none !important;
  }
}
/* hide the sidebar - end */

/* hide the stupid image overlay effect */
span.et_overlay {
  display: none;
}

.et_pb_text :is(h1, h2, h3, h4, h5, h6) {
	letter-spacing: 3px;
}

@media all and (max-width: 980px){
	.et_pb_text :is(h1, h2, h3, h4, h5, h6) {letter-spacing: 2px;}
}

/* Home - Latest news */
.news_layout .et_pb_post {
	margin-bottom: 2.25rem;
}

.news_layout .et_pb_post > * {
	margin: 0;
	padding: 0;
}

.news_layout .post-meta {
	text-align: right;
}

.news_layout .et_pb_post {
	display: grid;
	grid-template-columns: 1fr 8rem;
	grid-auto-rows: auto;
	grid-column-gap: 0.5rem;
	grid-row-gap: 0.25rem;
}

.news_layout .entry-title  { grid-area: 1 / 1 / 2 / 2; line-height: 1.5em; }
.news_layout .post-meta    { grid-area: 1 / 2 / 2 / 3; }
.news_layout .post-content { grid-area: 2 / 1 / 3 / 3; }

#others.news_layout .et_pb_post {
	margin-bottom: 0rem;
}

#others.news_layout .et_pb_post:last-child {
	padding-bottom: 0rem;
}

/* Home - Program */
.program .et_pb_column  {
	display: flex;
	flex-wrap: wrap;
	margin-bottom: 2rem!important;
	gap: 2rem;
}

.program .et_pb_blurb {
	padding: 0;
	flex: 1 1 30%;
}

@media all and (max-width: 980px){
	.program .et_pb_blurb {	flex: 1 1 100%;	}
}

.program .et_pb_main_blurb_image {
	margin: 0;
}

.program .et_pb_main_blurb_image img {
	display: block;
}

.program .et_pb_blurb_container {
	margin: 0;
	padding: 1rem;
}

/* Home - Events */

.events_layout .et_pb_post {
	margin-bottom: 1.5rem;
	background: white;
	display: flex;
	flex-wrap: wrap;
}

.events_layout .et_pb_post > * {
	margin: 0;
	padding: 0;
	flex: 1 1 100%;
}

@media all and (min-width: 786px){
	.events_layout .et_pb_ajax_pagination_container {
		display: flex;
		flex-wrap: wrap;
		gap: 2rem;
		justify-content: space-between;
		align-items: center;
	}
	
	.events_layout .et_pb_ajax_pagination_container > div {
		flex: 1 1 100%;
	}
	
	.events_layout .et_pb_post {
		flex: 1 1 25%;
	}
}

.events_layout .et_pb_post :where(.entry-title , .post-meta, .post-content) {
	padding-left: 1.25rem;
	padding-right: 1.25rem;
}

.events_layout .entry-title {
	padding-top: 1.25rem;
	padding-bottom: 0.25rem;
	line-height: 1.25em;
	max-height: 48px;
	overflow: hidden;
}

.events_layout .post-content {
	min-height: 6rem;
	max-height: 6rem;
	overflow: hidden;
}

.events_layout .entry-featured-image-url img {
	overflow: hidden;
	object-fit: cover!important;
	aspect-ratio: 5 / 3;
}

.events_layout .post-meta {
	padding-bottom: 1.25rem!important;
	order: 2;
}

/* sponsor */
.sponsor {
	display: flex;
	gap: 3rem;
}

.sponsor .et_pb_main_blurb_image {
	margin-bottom: 1rem;
}

.sponsor .et_pb_blurb {
	flex: 1 1 15%;
}

@media all and (max-width: 980px) {
	.sponsor {
		flex-wrap: wrap;
		justify-content: center;
	}
	.sponsor .et_pb_blurb {
		flex: 0 0 calc((100% - 3rem) / 2);
	}
}

/* wpcf7 */
@media all and (min-width: 981px) {
  .wpcf7-form{
/*     margin-top: 5rem; */
  }
}

.wpcf7-list-item {
	margin: 0 1em 0 0!important;
}

.wpcf7-form label, .wpcf7-form p.radio {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
  color: #333;
}

.wpcf7-form input[type="number"] {
    border: 1px solid #bbb;
	color: #4e4e4e;
}

.wpcf7-form .wpcf7-select {
	width: 100%;
	padding: 0.5rem 0.25rem;
}

.wpcf7-form .wpcf7-select option {
	padding: 0!important;
}

.wpcf7-form p , .wpcf7-form .wpcf7-list-item label {
	margin: 0;
	padding: 0;
}

.wpcf7-form span {
  flex: 1 0 3rem;
}

.wpcf7-form .wpcf7-radio span {
  flex: auto;
}

.wpcf7-form .wpcf7-radio input[type="radio"] {
  width: 13px;
}

.wpcf7-form .wpcf7-form-control-wrap {
  flex: 1 1 75%;
  font-size: 1rem;
}

.wpcf7-form input {
  width: 100%;
  padding: 0.5rem;
  font-size: 0.9rem;
}

.wpcf7-form .wpcf7-not-valid-tip {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translate(-1px,-50%);
  font-size: 0.8rem;
  padding: 0 0.5rem;
  background: white;
}

.wpcf7-form .wpcf7-submit {
  border: 0;
  background: #E60012;
  color: white;
  border-radius: 0.5rem;
  display: inline-block;
  width: auto;
  float: right;
  padding: 0.6rem 1.2rem;
}

/* Post */
.breadcrumb-container a {
  padding: 0!important;
}

@media all and (max-width: 980px){
	#floatbar {
		display: none;
	}
}

#floatbar {
/* 	position: sticky;
	top: 10rem; */
}

#floatbar .et_pb_code_inner {
	display: flex;
	justify-content: space-between;
}

#floatbar .et_pb_code_inner div a {
	color: #E60012;
	padding: 0.5rem;
	background: #E6001210;
}

#floatbar .et_pb_code_inner div:last-child a {
	color: #FFF;
	padding: 0.75rem 1rem;
	background: #E60012;
	border-radius: 0.5rem;
	text-decoration: none;
	font-size: 1.1rem;
}

/* Gear */
.navbar .et_pb_text_inner {
	display: flex;
	gap: 2rem;
	justify-content: center;
}

/* wp-pagenavi */
.wp-pagenavi{
	display: flex;
	justify-content: center;
}

.wp-pagnavi .first {
	float: left;
}

.wp-pagnavi .last {
	float: right;
}

/* Divider */
@media all and (max-width: 980px) {
	.et_pb_bottom_divider .et_pb_bottom_inside_divider {
		margin-bottom: -1px;
	}

	.et_pb_top_divider .et_pb_bottom_inside_divider {
		margin-top: -1px;
	}
}
	
/* board */
.board a {
	display: inline-block;
	padding: 0.5rem 1rem;
	background: red;
	color: white;
	border-radius: 0.5rem;
	margin: 1rem 0;
/* 	text-decoration: underline; */
}

.see-more {
  display: inline-block;
  padding: 0.5rem;
  background: #E6001210;
}

.wp-pagenavi > * {
	margin-left: 0.5rem;
	min-width: 1.75rem;
	line-height: 1.75rem;
	text-align: center;
	border: 1px solid transparent;
	border-radius: 2rem;
}

.wp-pagenavi .current {
	border: 1px solid #0560AD;
}

.wp-pagenavi > a:hover {
	border: 1px solid #0560AD;
}

.wp-pagenavi > a[aria-label="Last Page"]{
	padding: 0 1rem;
}

/* Post - table */
@media all and (max-width: 980px){
  .ranking.et_pb_text .et_pb_text_inner table {
    width: 100%;
    height: 100%;
  } 

  .ranking.et_pb_text tbody {
    display: block;
  }

  .ranking.et_pb_text tbody tr {
    display: grid;
    grid-template-columns: 10ch 1fr;
    grid-auto-rows: auto;
    width: 100%;
    text-align: left;
    margin-bottom: 1rem;
  }

  .ranking.et_pb_text tbody td {
    text-align: left!important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
  }

  .ranking.et_pb_text tbody tr:first-child {
    display: none!important;
  }

  .ranking.et_pb_text tbody tr td:first-child {
    grid-area: 1 / 1 / 4 / 2; 
    width: 8ch!important;
  }

  .ranking.et_pb_text tbody tr td:nth-child(2) {
    grid-area: 1 / 2 / 2 / 3;
  }

  .ranking.et_pb_text tbody tr td:nth-child(3) {
    grid-area: 2 / 2 / 3 / 3;
  }

  .ranking.et_pb_text tbody tr td:nth-child(4) {
    grid-area: 3 / 2 / 4 / 3;
  }

  .ranking.et_pb_text tbody tr td:before {
    display: inline-block;
    margin-right: 0.5rem;
  }
  
  .ranking.et_pb_text tbody tr td:after {
    display: inline-block;
    order: -1;
  }

  .ranking.et_pb_text tbody tr td:nth-child(2):before {
    content: "冠軍：";
    display: inline-block;
  }

  .ranking.et_pb_text tbody tr td:nth-child(3):before {
    content: "亞軍：";
    display: inline-block;
  }

  .ranking.et_pb_text tbody tr td:nth-child(4):before {
    content: "季軍：";
    display: inline-block;
  }
  
  .ranking.et_pb_text tbody tr td:nth-child(2):after {
    content: url(/wp-content/uploads/2024/03/1f947.png);
  }

  .ranking.et_pb_text tbody tr td:nth-child(3):after {
    content: url(/wp-content/uploads/2024/03/1f948.png);
  }

  .ranking.et_pb_text tbody tr td:nth-child(4):after {
    content: url(/wp-content/uploads/2024/03/1f949.png);
  }
}