@charset "UTF-8";

/*
 * Goal: For custom styling on a special contribution page, it is recommended to use both of the following selectors:
 *
 * 1. `.civicrm-contribute-sp`
 *    Although this selector is more intuitive and concise, it has two drawbacks due to its reliance on JavaScript:
 *    a. There is a gap period before this class is added.
 *    b. The selector may fail if JavaScript does not function properly.
 *
 * 2. `body:has(script[data-contribution-page-type="special"])`
 *    This selector is purely CSS-based, thus it does not have the drawbacks of `.civicrm-contribute-sp`.
 *    The `:has()` pseudo-class is supported by modern browsers. For compatibility, check https://caniuse.com/css-has.
 *
 * The reason for recommending the use of both selectors is to enhance user experience on modern browsers.
 *
 * Usage Example:
 * Hiding the main menu in the header of a special contribution page.
 *
 * CSS Code:
 *
 * .civicrm-contribute-sp .header .main-menu,
 * body:has(script[data-contribution-page-type="special"]) .header .main-menu {
 *   display: none;
 * }
 *
 */
a, .nav-link, .nav-link { color: #222;}
a:hover, .active a, .nav-link:focus, .nav-link:hover { color: #FFA600;}
.btn-orange {
  background-color: #FFA600;
  border: 1px solid #FFA600;
  color: #fff;
}
#main > div {
  justify-content: center;
}

#content section { width: 100%;}
.container .block-inner.container {
  padding-right: 0;
  padding-left: 0;
}

#page #content {
  justify-content: center;
  display: flex;
}

#site-logo img {
  width: auto;
  height: 80px;
}
#site-name { display: none; }
  
.header {
  height: 100px;
  .navbar {
    padding-top: 0;
    padding-bottom: 0;
  }
}
  
/* 避免 button 垂直至中 */
.navbar > .container { align-items: baseline; }

header button.navbar-toggler {
  position: fixed;
  right: 1rem;
  z-index: 500;
  margin-top: 24px;
}
h2 { margin-top: 1rem; margin-bottom: 2rem;}

/* 首頁:最新消息 */
@media screen and (min-width:992px) {
  .front > .view-inner {
    display: flex;
    & >.view-content {
      width: 55%;
      margin-right: 4%;;
      & > .views-view-grid { padding: 0;}
    }
  }
}
.view-news.view-display-id-page_4, .view-news.view-display-id-page_5, .view-front.view-display-id-page_3 {
  .views-view-grid > div:not(:first-child) .news-row {
    padding-top: 1.5rem;
  }
}

.font-bold {
  font-weight: bolder;
  font-size: large;
}
.highlight-link a {
  color: #FFA600;
  margin-right: 5px;
  &:hover { text-decoration: underline; }
}

/* 關於我們 */
#block-bp10-guanyuwomen, #block-bp10-juankuanzhichi {
  width: 100vw;
  margin-right: calc(50% - 50vw);
  margin-left: calc(50% - 50vw);
  background-color: #eee;
  max-width: 100vw;
  padding: 2rem;
}

h2 {
  position: relative;
  text-align: center;
  &::after {
    content: " ";
    width: 50px;
    height: 2px;
    background-color: #FFA600;
    display: block;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 2px;
  }
}

article .node__content {
  display: flex;
  flex-direction: column;
  .field--name-field-featured-img {
    width: 100%;
    clear: both;
    display: block;
  }
  .field--name-body { margin: 2rem 1rem; }
}

#block-bp10-juankuanzhichi {
  background-image: linear-gradient( rgba(50, 50, 50, 0.45), rgba(100, 100, 100, 0.45) ),url(/sites/default/files/uploads/pexels-ahmed-akacha-3313934-6507744.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position-y: 50%;
  color: #fff;
  margin-bottom: -2rem;
  margin-top: 2rem;
}

.news-headline {
  .views-field-title {
    line-height: 40px;
    font-size: 24px;
    padding-top: 15px;
  }

  img { width: 100%; }
}

.news-row, .news-headline {
  .views-field-created { font-size: small;}
}

.news-headline > div:not(:last-child),
.news-row .views-field-fieldset > div > div:not(:last-child) {
  margin-bottom: 6px;
}

.view-id-news .news-row {
  .views-field-field-featured-img img { width: 100%; }
  .views-field-field-featured-img { width: 40%; }
  .views-field-nothing {
    padding-top: 5px;
    width: 60%;
    padding-left: 15px;
  }
}

@media screen and (min-width:768px) {
  .front .news-row {
    .views-field-field-featured-img {
      flex: 0 0 auto;
      margin-right: 20px;
      img { width: 200px; }
    }
  }
  
  #block-bp10-juankuanzhichi{
    height: 50vh;
  }
  #block-bp10-guanyuwomen, #block-bp10-juankuanzhichi {
    .block-content { padding-top: 1.5rem; }
    .block-inner { padding: 1rem 2rem; }
  }
}

@media screen and (max-width:767.5px){
  #block-bp10-guanyuwomen {
    margin-bottom: 1rem;
    .block-inner { padding: 1rem 0; }
    img { margin-top: 1.5rem; }
  }
  #block-bp10-juankuanzhichi {
    .block-inner { padding: 1rem; }
  }
}

.views-field-field-slide-img-pc, .views-field-field-slide-img-mobile {
  img { width: 100%; }
}

.carousel-desktop {
  .slick-track .slide {
    position: relative;
    .views-field-nothing {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
    }
  }
  .slick__arrow {
    .slick-prev { margin-left: 2rem; }
    .slick-next { margin-right: 2rem; }
  }
  .slick-dots {
    bottom: 0;
  }
}
.slick-dotted.slick-slider { margin-bottom: 0; }

.slick-dots li {
  button::before { color: #fff; }
  &.slick-active button::before { color: #ff6d2c; }
}

.carousel-mobile { display: none;}
@media screen and (max-width:767.5px) {
  .carousel-desktop { display: none;}
  .carousel-mobile {
    display: block;
    background-color: #026BB0;
  }
  .slick--view--carousel--block-2 {
    position: relative;
    .slick__arrow {
      position: absolute;
      top: 25%;
      transform: translateY(-25%);
    }
  }
}
.carousel-desktop, .carousel-mobile {
  color: #fff;
  font-weight: bold;
  width: 100vw;
  margin-right: calc(50% - 50vw);
  margin-left: calc(50% - 50vw);
  max-width: 100vw;
  .views-field-nothing {
    padding: 1rem 1.5rem;
  }
}

.field--name-field-featured-img img {
  width: 100%;
}

.view-crm-events {
  .views-view-grid > .row {
    row-gap: 2rem;
  }
  .views-field-event-type {
    margin: 1rem 0 0.5rem 0;
  }
  .views-field-title {
    font: normal normal bold 20px/26px Noto Sans TC;
  }
  .views-field-event-type span, .views-field-nothing span {
    border: 2px solid #0ED3CB;
  }
  .register-btn {
    margin-top: 1.75rem;
    a {
      border: 2px solid #0ED3CB;
      border-radius: 2px;
      display: inline-flex;
      min-width: 136px;
      min-height: 48px;
      align-items: center;
      justify-content: center;
    }
    a::after {
      content: '';
      display: inline-block;
      width: 27px;
      height: 8px;
      background: url(../images/Arrow2x.png);;
      background-size: contain;
      margin-left: 8px;
    }
  }
  .views-field-event-type span {
    padding: .1rem .25rem;
  }
}

.view-donation .views-field-background-URL {
  overflow: hidden;
  aspect-ratio: 16 / 9;
  img {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
}
.view-donation {
	.views-field-background-URL {
	  position: relative;
	  overflow: hidden;
	}

	.views-field-background-URL img {
	  object-fit: cover;
	  width: 100%;
	  height: 100%;
	  transition: filter 0.3s ease;
	}

	.donate-button {
	  position: absolute;
	  top: 50%;
	  left: 50%;
	  transform: translate(-50%, -50%);
	  opacity: 0;
	  transition: opacity 0.3s ease;
	}

	.donate-button a {
	  display: inline-block;
	  padding: 10px 20px;
	  background-color: #FFA600;
	  color: white;
	  text-decoration: none;
	  border-radius: 5px;
	}

	.views-field-background-URL:hover img {
	  filter: brightness(50%);
	}

	.views-field-background-URL:hover .donate-button {
	  opacity: 1;
	}
}



.view-donation .card-deck {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  row-gap: 1.5rem;
  .card { border: none; border-radius: unset;}
  .card-body {
    border: 1px solid rgba(0,0,0,.125);
    border-bottom-right-radius: 0.25rem;
    border-bottom-left-radius: 0.25rem;
    margin-top: -1px;
    .views-field-nothing {
      padding: 0 1rem 1rem;
      margin-bottom: 1rem;
      border-bottom: 1px solid rgba(0,0,0,.125);
      text-align: center;
    }
    /* .views-field-intro-text {
      padding: 0.5rem 1rem 0;
    } */
    .donate-percentage {
      color: #FFA600;
      border-right: 1px solid rgba(0,0,0,.125);
      border-left: 1px solid rgba(0,0,0,.125);
      display: flex;
      justify-content: center;
      align-items: center;
      &.h2 { margin-bottom: 0; }
    }
  }
}

.ckeditor-accordion-container > dl dt {
  & > a > .ckeditor-accordion-toggle {
    &::before {
      -webkit-transform: none;
      transform: none;
    }
    &::after {
      -webkit-transform: rotate(90deg);
      transform: rotate(90deg);
      right: 7px;
    }
    &::before, &::after { background: #FFA600; }
  }
  &.active > a > .ckeditor-accordion-toggle {
    &::before, &::after {
      -webkit-transform: none;
      transform: none;
    }
  }
}

.ckeditor-accordion-container > dl {
  border: 1px solid rgba(0,0,0,0.1);
  dt:not(:first-child) { border-top: 1px solid rgba(0,0,0,0.1); }
  dt.active, dt { 
    & > a, & > a:hover {
      color: #000;
      background-color: #fff;
    }
  }
  dd { padding: 0 1rem 1rem 50px; }
}
.ckeditor-accordion-container > dl dt > a,
.ckeditor-accordion-container > dl dt > a:not(.button){
  border-bottom: none;
}

#site-footer {
  background: #000;
  .block { border: none; }
  .site-footer__top .region, .social-links-wrapper {
    width: auto;
    margin-right: auto;
    margin-left: auto;
    float: none;
  }
}

#block-bp10-footermenu {
  a { color: #fff; }
  a:hover { color: #FFA600; }
  .navbar-nav {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
  }
}

#block-bp10-yeweishequnlianjie {
  img {
    width: 24px;
    height: auto;
    border: none;
  }
  .block-content {
    display: flex;
    justify-content: center;
    overflow: hidden;
  }
  .field--name-body {
    position: relative;
  }
}
.social-links-wrapper{
  display: flex;
  column-gap: 1rem;
  justify-content: center;
  &>div {
    flex: 0 0 auto;
  }

  &::before, &::after {
    content: "";
    border-bottom: 1px solid rgba(255,255,255,0.2);
    position: absolute;
    top: 50%;
    width: 1000px;
  }
  &::before { right: calc(100% + 1rem);}
  &::after { left: calc(100% + 1rem);}
}