@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@100;400;500;700;900&display=swap");

:root {
  --primary-color: #6b9931; /* 區塊一的內文標題、按鈕色、彈窗header */
  --secondary-color: #65aa60; /* 區塊二三四的內文標題 */
  --main-font-color: #3b3c3c; /* 主要字體色 */
  --secondary-font-color: #3b6838; /* 區塊大標題 */
  --light-bg-color: #f4f4f4; /* 聯絡我們背景 */
  --border-color: #707070; /* more 的外框、input 外框 */

  --nav-bg-color: #c9df86; /* 導覽列背景色 */
  --nav-font-color: #59643c; /* 導覽列字體色 */
  --nav-hamburger-color: #969696; /* 漢堡顏色 */

  --swiper-btn-bg-color: #f2f2f2; /* 輪播上下頁按鈕背景色 */
  --modal-scrollbar-color: #d9d9d9; /* 彈窗 scrollbar 顏色 */
}

*,
*::before,
*::after {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  list-style: none;
  list-style-type: none;
  text-decoration: none;
}

body {
  color: var(--main-font-color);
  font-family: "Noto Sans TC", sans-serif !important;
  font-size: 1em;
  line-height: 1.5em;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 400;
  line-height: 1.2;
}

/* ======= Button ======= */
.btn {
  border-radius: 0;
}

.btn-primary {
  color: #fff;
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  padding: 5px 35px;
  min-width: 140px;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.disabled,
.btn-primary:disabled {
  color: #fff;
  background-color: #588127;
  border-color: #588127;
  outline: none;
}

.btn-primary:focus {
  box-shadow: 0 0 0 0.25rem #58812755;
}

.btn-outline-secondary {
  padding: 1px 5px;
  color: #000;
  background-color: transparent;
  border-color: var(--border-color);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active,
.btn-outline-secondary.disabled,
.btn-outline-secondary:disabled {
  color: var(--border-color);
  background-color: transparent;
  border-color: var(--border-color);
  outline: none;
}

.btn-outline-secondary:focus {
  box-shadow: 0 0 0 0.25rem #70707099;
}

.btn-outline-primary {
  padding: 5px 35px;
  min-width: 140px;
  color: var(--primary-color);
  background-color: transparent;
  border-color: var(--primary-color);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary.disabled,
.btn-outline-primary:disabled {
  color: #588127;
  background-color: transparent;
  border-color: #588127;
  outline: none;
}

.btn-outline-primary:focus {
  box-shadow: 0 0 0 0.25rem #58812755;
}
/* ======= Button ======= */

/* ======= Modal ======= */
.modal-dialog {
  max-width: 700px;
}

.modal-header {
  background-color: var(--primary-color);
  color: #fff;
  border-radius: 0;
  border: none;
  padding: 15px 30px;
}

.modal-header button {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 30px;
}

.modal-body {
  height: 500px;
  padding: 2rem 5rem;
}

.modal-body p {
  margin-top: 20px;
}

.modal-content {
  border: 0;
  border-radius: 0;
}

.modal:not(#VideoModal) .modal-body img {
  width: 100%;
  max-width: 450px;
}

.modal-body video {
  width: 100%;
}

.modal-footer {
  padding: 0.75rem 3.5rem 0.75rem 2rem;
}

.modal-dialog ::-webkit-scrollbar {
  width: 10px;
}

.modal-dialog ::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.modal-dialog ::-webkit-scrollbar-thumb {
  background: #d1d5d5;
  border-radius: 5px;
}

@media (max-width: 767.97px) {
  .modal-body {
    padding: 2rem;
  }
}
/* ======= Modal ======= */

.form-group label {
  font-weight: bold;
  margin-bottom: 10px;
}

.form-control {
  border-radius: 0;
  border-color: #70707077;
  resize: none;
}

.form-control:focus {
  border-color: #70707077;
  outline: 0;
  box-shadow: 0 0 0 0.25rem #70707022;
}

/* ======= Header ======= */
header {
  position: relative;
  height: 100vh;
  max-height: -webkit-fill-available;
  display: flex;
  flex-direction: column;
}

.header .search {
  position: absolute;
  top: 30px;
  right: 20px;
}

.header .search input {
  font-family: inherit;
  color: inherit;
  border-radius: 50px;
  border: 1px solid #70707099;
  padding: 5px 60px 5px 15px;
}

.header .search input:focus-visible {
  outline: none;
}

.header .search > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  position: absolute;
  top: 5px;
  right: 15px;
}

.header .search .search-btn {
  cursor: pointer;
}

.header .search img {
  width: 22px;
  transform: translateY(-2px);
}

.header .search .divider {
  height: 25px;
  width: 1px;
  background-color: #70707099;
}

.banner {
  order: 1;
  width: 100%;
  height: auto;
  flex: auto;
  background-image: none;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: scroll;
  opacity: 0;
  transition: 0.5s all linear;
}

.banner.show {
  opacity: 1;
  background-image: url("../images/banner.jpg");
}

.navbar {
  background-color: #fff;
  order: 2;
  padding: 0 10px;
  z-index: 999;
}

.navbar.fixed {
  position: fixed;
  top: 0;
  width: 100%;
}

.navbar ul {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin: 15px 0;
  padding: 0;
  gap: 30px;
}

.navbar.fixed ul {
  margin: 10px 0;
}

.navbar ul li a {
  background-color: var(--nav-bg-color);
  color: var(--nav-font-color);
  transition: 0.2s all linear;
  width: 120px;
  text-align: center;
  padding: 12px 15px;
  letter-spacing: 1px;
  font-weight: bold;
  font-size: 1.05rem;
  border-radius: 10px;
}

.navbar ul li:first-child a span {
  display: inline-block;
  letter-spacing: 8px;
  margin-right: -8px;
}

.navbar ul li a.active,
.navbar ul li a:hover {
  background-color: var(--primary-color) !important;
  color: #fff  !important;
}

.navbar ul li a:focus {
  color: #fff;
}

@media (max-width: 990.9px) {
  .banner {
    background-position-x: -160px;
  }
}

@media (max-width: 767.9px) {
  .banner {
    height: 100vh;
    background-position-y: 10px;
    background-position-x: center;
    order: 2;
  }

  .banner.show {
    background-image: url("../images/banner_m.jpg");
  }

  .navbar ul {
    gap: 6px;
    margin: 10px 0;
  }

  .navbar ul li a {
    width: 100px;
    padding: 7px 8px;
    font-size: 1rem;
  }

  .mobile-logo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
  }

  .mobile-logo img.logo-img {
    width: 200px;
  }

  .mobile-logo img.search-img {
    width: 38px;
    cursor: pointer;
  }

  .header .search {
    top: 25px;
    right: 15px;
  }

  /* .navbar {
    order: 1;
    padding: 0;
    background-color: transparent;
  }

  .navbar-mobile.scrolled {
    position: fixed;
    right: 0;
    left: 0;
    top: 0;
    margin-top: -130px;
    background: #fff !important;
    -webkit-box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
    box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1);
  }

  .navbar-mobile.scrolled.sleep {
    -webkit-transition: 0.3s all ease-out;
    -o-transition: 0.3s all ease-out;
    transition: 0.3s all ease-out;
  }

  .navbar-mobile.scrolled.awake {
    margin-top: 0px;
    -webkit-transition: 0.3s all ease-out;
    -o-transition: 0.3s all ease-out;
    transition: 0.3s all ease-out;
  }

  .navbar.navbar-mobile .logo {
    padding: 15px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .navbar .logo img {
    width: 48%;
  }

  .navbar.navbar-mobile.scrolled .logo img {
    width: 40%;
  }

  .navbar .mobile-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
  }

  .navbar .mobile-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #969696;
  }

  .navbar ul.mobile {
    flex-direction: column;
    padding: 0;
    display: none;
  }

  .navbar ul.mobile li,
  .navbar ul.mobile li a {
    width: 100%;
  } */
}

@media (max-width: 578px) {
  .mobile-logo img.logo-img {
    width: 150px;
  }

  .header .search {
    top: 17px;
    right: 10px;
  }

  .header .search input {
    max-width: 185px;
    padding: 5px 45px 5px 10px;
  }

  .header .search > div {
    right: 12px;
    gap: 5px;
  }
}

/* ======= Header ======= */

/* ======= Section ======= */
section {
  padding: 65px 0 50px;
}

section .container {
  max-width: 1100px;
  padding: 0 50px 0;
}

section .content {
  position: relative;
}

section .title {
  display: flex;
  align-items: center;
  gap: 10px;
}

section .title img {
  width: 50px;
}

section .title h4 {
  color: var(--secondary-font-color);
  font-weight: bold;
  margin: 0;
}

@media (max-width: 767.9px) {
  section {
    position: relative;
    padding: 100px 0 0;
  }

  section .container {
    padding: 0 40px 0;
  }

  section .title {
    justify-content: center;
  }

  section .title img {
    width: 42px;
  }
}
/* ======= Section ======= */

/* ======= Swiper ======= */
.swiper-container {
  overflow: hidden;
}

.swiper-slide {
  cursor: pointer;
}

.swiper-button-next,
.swiper-button-prev {
  background-color: var(--swiper-btn-bg-color);
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.swiper-button-next:after,
.swiper-button-prev:after {
  content: "";
}

.swiper-button-next img,
.swiper-button-prev img {
  width: 12px;
}

.swiper-button-next {
  right: -100px;
}

.swiper-button-prev {
  left: -100px;
}

@media (max-width: 1199.9px) {
  .swiper-button-next {
    right: -50px;
  }
  .swiper-button-prev {
    left: -50px;
  }
}

@media (max-width: 767.9px) {
  .swiper-button-next,
  .swiper-button-prev {
    width: 30px;
    height: 30px;
  }
  .swiper-button-next img,
  .swiper-button-prev img {
    width: 10px;
  }
  .swiper-button-next {
    right: -40px;
  }
  .swiper-button-prev {
    left: -40px;
  }
}
/* ======= Swiper ======= */

/* ======= 活動宣傳 ======= */
.event-swiper {
  height: 500px;
}

section.event .swiper-slide {
  display: flex;
  align-items: center;
  gap: 30px;
}

section.event .swiper-slide img {
  width: 300px;
  border-radius: 15px;
}

section.event .swiper-slide .content .sub-title {
  color: var(--primary-color);
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.content-container {
  line-height: 1.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}
/*
section.event p {
  line-height: 1.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}
*/
#EventModal .modal-footer {
  justify-content: space-between;
}

@media (max-width: 767.9px) {
  .event-swiper {
    height: 1000px;
  }

  section.event .swiper-slide {
    flex-direction: column;
  }

  section.event .swiper-slide .content .sub-title {
    text-align: center;
  }

  section.event .swiper-slide img {
    width: 400px;
  }
  /*
  section.event p {
    -webkit-line-clamp: 3;
  }
  */
  .content-container {
    -webkit-line-clamp: 3;
  }

  section.event .apply-btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 576.9px) {
  .event-swiper {
    height: 900px;
  }

  section.event .swiper-slide img {
    width: 100%;
    max-width: 350px;
  }

  section.event .swiper-slide {
    gap: 20px;
  }
}
/* ======= 活動宣傳 ======= */

/* ======= 影音專區 ======= */
.first-section {
  position: relative;
  padding-bottom: 120px;
}

.first-section > img {
  width: 100%;
  height: auto;
  position: absolute;
  bottom: 0;
}

@media (max-width: 1699px) {
  .first-section {
    padding-bottom: 90px;
  }
}

section.video video {
  width: 100%;
  height: auto;
  object-fit: cover;
  aspect-ratio: 16/9;
  transition: opacity 0.5s ease-in-out;
}

section.video .swiper-slide .content {
  background-color: #fff;
  padding: 15px;
}

section.video .swiper-slide .content .sub-title {
  color: var(--secondary-color);
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 8px;
}

section.video p {
  line-height: 1.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
/* ======= 影音專區 ======= */

/* ======= 亮點專欄 ======= */
section.highlights {
  background-image: url("../images/bg2.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.highlights-swiper {
  width: 100%;
  height: 650px;
  margin-left: auto;
  margin-right: auto;
} 

section.highlights .swiper-slide {
  display: flex;
  gap: 20px;
}

section.highlights .swiper-slide img {
  width: 300px;
  height: auto;
  object-fit: cover;
  aspect-ratio: 9/6;
}

section.highlights .swiper-slide .content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

section.highlights .swiper-slide .content .sub-title {
  color: var(--secondary-color);
  font-weight: bold;
  font-size: 1.1rem;
}

section.highlights p {
  line-height: 1.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  max-width: 400px;
}

@media (max-width: 1199.9px) {
  .highlights-swiper {
    height: 560px;
  }

  section.highlights .swiper-slide img {
    width: 260px;
  }
  section.highlights .swiper-slide {
    gap: 15px;
  }
}

@media (max-width: 990.9px) {
  .highlights-swiper {
    height: 300px;
  }
  section.highlights .swiper-slide img {
    width: 220px;
  }
  section.highlights p {
    -webkit-line-clamp: 3;
  }
}

@media (max-width: 767.9px) {
  .highlights-swiper {
    height: 400px;
  }

  section.highlights .swiper-slide {
    flex-direction: column;
    align-items: center;
  }

  section.highlights .swiper-slide .content .sub-title {
    text-align: center;
  }

  section.highlights .swiper-slide img {
    width: 400px;
  }

  section.highlights p {
    -webkit-line-clamp: 3;
  }

  section.highlights .apply-btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 576.9px) {
  section.highlights .swiper-slide .content {
    gap: 10px;
  }
  section.highlights .swiper-slide img {
    width: 100%;
    max-width: 350px;
  }

  section.highlights .swiper-slide {
    gap: 20px;
    flex-direction: column;
  }
}

/* ======= 亮點專欄 ======= */

/* ======= 成果擴散 ======= */
section.achievements {
  background-image: url("../images/bg3.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  padding: 105px 0 50px;
}

.achievements-swiper, .event1-swiper ,.event2-swiper{
  width: 100%;
  height: 750px;
  margin-left: auto;
  margin-right: auto;
}

.achievements .swiper-slide, .event .swiper-slide {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.achievements .swiper-slide img, .event .swiper-slide img {
  width: 220px;
  border-radius: 50%;
}

.achievements .swiper-slide .sub-title, .event .swiper-slide .sub-title {
  color: var(--secondary-color);
  font-weight: bold;
  font-size: 1.1rem;
}
/*
.achievements .swiper-slide p, .event .swiper-slide p {
  max-width: 220px;
  line-height: 1.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}
*/
@media (max-width: 767.9px) {
  .achievements-swiper, .event1-swiper, .event2-swiper {
    height: 400px;
  }
}
/* ======= 成果擴散 ======= */

/* ======= 聯絡我們 ======= */
section.contact {
  padding: 65px 0 100px;
}

section.contact .container {
  padding: 0 25px 0;
}

section.contact .feedback-form {
  background-color: var(--light-bg-color);
  padding: 50px 50px 65px;
  border-radius: 10px;
}

@media (max-width: 767.9px) {
  section.contact {
    padding: 100px 0 100px;
  }
  section.contact .feedback-form {
    background-color: var(--light-bg-color);
    padding: 30px 30px 40px;
    border-radius: 10px;
  }
}
/* ======= 聯絡我們 ======= */

/* ======= Footer ======= */
footer {
  background-color: #a18b74;
  color: #fff;
}

footer a {
  color: #fff;
  text-decoration: none;
}

footer a:focus,
footer a:hover {
  color: #fffa;
}

footer .top {
  padding: 30px 15px;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

footer .top > div:first-child {
  display: flex;
  gap: 50px;
  width: 100%;
}

footer .top > div:first-child .logo img {
  width: 75px;
}

footer .top > div:first-child .links {
  display: flex;
  align-items: end;
  justify-content: space-between;
  width: 100%;
}

footer .top > div:first-child .links a {
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  line-height: 30px;
}

footer .top > div:first-child .links img {
  width: 30px;
}

footer .top .section-links,
footer .top .section-links > div {
  display: flex;
  gap: 15px;
}

footer .divider {
  width: 100%;
  height: 1px;
  background-color: #fff;
}

footer .bottom {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 20px;
}

footer .bottom div {
  letter-spacing: 1px;
}

@media (max-width: 1100.9px) {
  footer .top > div:first-child .links {
    flex-direction: column;
    align-items: start;
    gap: 15px;
  }
}

@media (max-width: 991.9px) {
  footer .top {
    flex-direction: column;
    align-items: center;
    gap: 40px;
  }
  footer .top > div:first-child {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
  footer .top > div:first-child .logo img {
    width: 60px;
  }
  footer .top > div:first-child .links {
    align-items: center;
    text-align: center;
  }
  footer .top > div:first-child .links img {
    width: 25px;
  }
  footer .bottom {
    flex-direction: column;
    gap: 10px;
  }
}
@media (max-width: 767.9px) {
  footer .top .section-links {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }
  /*
  footer .top .section-links > div {
    gap: 40px;
  }
  */
  footer .top .section-links > div div {
    width: 100px;
    text-align: center;
  }
}
@media (max-width: 576.9px) {
  footer .top .section-links > div {
    /*gap: 30px;*/
  }
  footer .top .section-links > div div {
    width: 61px;
  }
}
/* ======= Footer ======= */

#Search header {
  height: auto;
}

#Search .navbar {
  padding: 0;
}

#Search .navbar ul {
  margin: 0;
  padding: 8px 15px;
  background-color: var(--nav-bg-color);
}

#Search .navbar ul li a {
  background-color: #e3eacf;
}

#Search .navbar ul li a.active,
#Search .navbar ul li a:hover {
  background-color: var(--primary-color);
  color: #fff;
}

#Search section {
  padding: 40px 0 50px;
}

#Search header .top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 50px;
}

#Search .top .search {
  position: relative;
  top: auto;
  right: auto;
}

#Search .logo-img {
  width: 300px;
}

#Search section h6 {
  text-align: center;
  font-size: 1.5rem;
  letter-spacing: 1px;
}

#Search .search-item {
  margin-bottom: 15px;
  border-bottom: 1px solid #dbd7d7;
  padding-bottom: 15px;
  cursor: pointer;
}

#Search .search-item .type {
  margin-bottom: 10px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
}

#Search .search-item .img {
  width: 170px;
  min-width: 170px;
}

#Search .search-item .img img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: fill;
}

#Search .search-item .title {
  font-size: 1.1rem;
  color: var(--secondary-font-color);
  font-weight: 600;
  margin-bottom: 5px;
}

#Search .search-item p.content {
  line-height: 1.8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  margin: 0;
}

@media (max-width: 767.9px) {
  #Search header .top {
    padding: 10px;
  }
  #Search .logo-img {
    width: 200px;
  }
  #Search .search-item .img {
    width: 120px;
    min-width: 120px;
  }
  #Search .search-item p.content {
    line-height: 1.5rem;
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 576.9px) {
  #Search .logo-img {
    width: 150px;
  }
  #Search .search-item .img {
    min-width: 100px;
  }
}



footer .top {
    max-width: 1200px;
}
@media (max-width: 1129px) {
    footer .top > div:first-child .links {
        flex-direction: column;
        gap: 15px;
    }
}        
@media screen and (max-width:1100px){
    footer .top > div:first-child {
        width: fit-content;
        margin: auto;
    }
}    
@media (max-width: 991.9px) {
    footer .top {
        padding:30px 15px;
    }
}    
@media (max-width: 767.9px) {
    .banner {
        height:auto;
    }

    footer .top .section-links > div div {
        width: 80px;
        text-align: center;
    }
}    