body,
html {
  font-family: "Open Sans", sans-serif;
  text-rendering: optimizeLegibility !important;
  -webkit-font-smoothing: antialiased !important;
  color: #777;
  font-weight: 400;
  width: 100% !important;
  height: 100% !important;
}
h2,
h3,
h4 {
  font-family: "Raleway", sans-serif;
}
h2 {
  text-transform: uppercase;
  margin: 0 0 20px;
  font-weight: 800;
  font-size: 36px;
  color: #333;
}
h3 {
  font-size: 20px;
  font-weight: 600;
  color: #333;
}
h4 {
  font-size: 18px;
  color: #333;
  font-weight: 600;
}
h5 {
  text-transform: uppercase;
  font-weight: 700;
  line-height: 20px;
}
p {
  font-size: 15px;
}
p.intro {
  margin: 12px 0 0;
  line-height: 24px;
}
a {
  color: #608dfd;
  font-weight: 400;
}
a:hover,
a:focus {
  text-decoration: none;
  color: #608dfd;
}
ul,
ol {
  list-style: none;
}
ul,
ol {
  padding: 0;
  webkit-padding: 0;
  moz-padding: 0;
}
hr {
  height: 2px;
  width: 70px;
  text-align: center;
  position: relative;
  background: #1e7a46;
  margin-bottom: 20px;
  border: 0;
}
/* Navigation */
#menu {
  padding: 5px;
  transition: all 0.8s;
}
#menu.navbar-default {
  background-color: #e8e8e8;
  border-color: rgba(231, 231, 231, 0);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}
#menu a.navbar-brand {
  font-family: "Raleway", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
}
#menu.navbar-default .navbar-nav > li > a {
  font-family: "Lato", sans-serif;
  text-transform: uppercase;
  color: #555;
  font-size: 14px;
  font-weight: 400;
  padding: 6px 2px;
  border-radius: 0;
  margin: 6px 12px 0;
}
#menu.navbar-default .navbar-nav > li > a:after {
  display: block;
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 2px;
  background: linear-gradient(to right, #675d59 0%, #d3c1b2 100%);
  content: "";
  transition: width 0.2s;
}
#menu.navbar-default .navbar-nav > li > a:hover:after {
  width: 100%;
}
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
  background-color: transparent;
}
.navbar-default .navbar-nav > .active > a:after,
.navbar-default .navbar-nav > .active > a:hover:after,
.navbar-default .navbar-nav > .active > a:focus:after {
  display: block !important;
  position: absolute !important;
  left: 0 !important;
  bottom: -1px !important;
  width: 100% !important;
  height: 2px !important;
  background: linear-gradient(to right, #675d59 0%, #d3c1b2 100%) !important;
  content: "" !important;
  transition: width 0.2s !important;
}
.navbar-toggle {
  border-radius: 0;
}
.navbar-default .navbar-toggle:hover,
.navbar-default .navbar-toggle:focus {
  background-color: #fff;
  border-color: #51679f;
}
.navbar-default .navbar-toggle:hover > .icon-bar {
  background-color: #608dfd;
}
@media (max-width: 360px) {
  #menu a.navbar-brand {
    font-size: 16px;
  }
}


/*social-icons*/
.social-icons {
  display: flex;
  align-items: center;
  justify-content: flex-end; /* 讓按鈕靠最右 */
  position: absolute;
  right: 40px; /* 調整與右邊的間距 */
  top: 50%;
  transform: translateY(-50%); /* 垂直置中 */
}

.social-icons li {
  list-style: none;
  margin-left: 10px; /* 按鈕間距 */
}

.social-icons a img {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.social-icons a:hover img {
  transform: scale(1.1); /* 滑鼠懸停時放大 */
}

.social-icons-2 a:hover img {
  transform: scale(1.2); /* 滑鼠懸停時放大 */
}

.social-icons-2 .youtube-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  color: #ff0000;
  vertical-align: middle;
  transition: transform 0.3s ease;
}

.social-icons-2 .youtube-social-link:hover {
  color: #cc0000;
  transform: scale(1.2);
}

.social-icons-2 .youtube-social-link i {
  font-size: 44px;
  line-height: 1;
}
/*social-icons*/


.section-title {
  margin-bottom: 70px;
}
.section-title h2 {
  position: relative;
  margin-top: 10px;
  margin-bottom: 15px;
  padding-bottom: 15px;
}
.section-title h2::after {
  position: absolute;
  content: "";
  background: linear-gradient(to right, #675d59 0%, #d3c1b2 100%);
  height: 4px;
  width: 60px;
  bottom: 0;
  margin-left: -30px;
  left: 50%;
}
.section-title p {
  font-size: 18px;
}
.btn-custom {
  font-family: "Raleway", sans-serif;
  text-transform: uppercase;
  color: #5e5e5e;
  background-color: #707070;
  background-image: linear-gradient(to right, #d0d0d0 0%, #ffe9db 100%);
  padding: 14px 34px;
  letter-spacing: 1px;
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  border-radius: 25px;
  transition: all 0.5s linear;
  border: 0;
}
.btn-custom:hover,
.btn-custom:focus,
.btn-custom.focus,
.btn-custom:active,
.btn-custom.active {
  color: #fff;
  background-image: none;
  background-color: #939393;
}
.btn:active,
.btn.active {
  background-image: none;
  outline: 0;
  -webkit-box-shadow: none;
  box-shadow: none;
}
a:focus,
.btn:focus,
.btn:active:focus,
.btn.active:focus,
.btn.focus,
.btn:active.focus,
.btn.active.focus {
  outline: none;
  /*outline-offset: none;*/
}
/* Header Section */
.intro {
  width: 100%;
  display: table;
  padding: 0;
  /*background: url(../img/intro-bg.jpg) center center no-repeat;*/
  background-color: #e5e5e5;
  background-size: cover;
  background-position: center center; /* 讓圖片從中間對齊 */
  background-repeat: no-repeat;       /* 避免重複顯示 */
  animation: changeBackground 30s infinite; /*change background*/
  /*background: rgba(0, 0, 0, 0.2);*/
}
/*change background*/
@keyframes changeBackground {
  0%   { background-image: url(../img/intro/intro-bg1.jpg); }
  30%  { background-image: url(../img/intro/intro-bg1.jpg); }
  33%  { background-image: url(../img/intro/intro-bg2.jpg); }
  63%  { background-image: url(../img/intro/intro-bg2.jpg); }
  66%  { background-image: url(../img/intro/intro-bg3.jpg); }
  96%  { background-image: url(../img/intro/intro-bg3.jpg); }
  100% { background-image: url(../img/intro/intro-bg1.jpg); }
}

.intro .overlay {
  background: rgba(0, 0, 0, 0.2);
}
.intro h1 {
  font-family: "Raleway", sans-serif;
  color: #fff;
  font-size: 65px;
  font-weight: 900;
  margin-top: 0;
  margin-bottom: 10px;
  opacity: 0.8; /* 0 是完全透明，1 是不透明 */
  position: absolute;
  top: 30%;
  transform: translate(-50%, -50%);

}
.intro p {
  font-family: "Raleway", sans-serif;
  color: #fff;
  font-size: 40px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 10px;
  opacity: 0.8; /* 0 是完全透明，1 是不透明 */
  position: absolute;
  top: 55%;
  transform: translate(-50%, -50%);
}
/* 小於 992px（平板以下） */
@media (max-width: 992px) {
  .intro h1,
  .intro p {
    max-width: 90%;       /* 文字區域不超過螢幕 */
    white-space: normal;
    overflow-wrap: break-word;
    text-align: center;
  }
  .intro h1 {
    left: 20px;        /* 固定與左邊的距離 */
    transform: translateY(-50%);
    font-size: clamp(55px, 5vw, 65px);
  }
  .intro p {
    left: 20px;        /* 固定與左邊的距離 */
    transform: translateY(-50%);
    font-size: clamp(30px, 4vw, 40px);
  }
}
/* 手機 (螢幕寬度 <= 480px) */
@media (max-width: 480px) {
  .intro {
    position: relative;
  }

  .intro::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%; /* 黑底高度，可調整 */
    background: linear-gradient(to top, rgb(180, 163, 155), transparent);
    pointer-events: none; /* 不會擋住點擊 */
  }

  .intro h1,
  .intro p {
    white-space: nowrap;
    position: absolute;
    left: 50%;             /* 水平置中 */
    transform: translate(-50%, -50%);
    text-align: center;    /* 文字置中 */
    opacity: 0.9;          /* 變淡 */
    color: #fff;           /* 確保文字在黑底上更清楚 */
    z-index: 1;            /* 確保文字在漸層上方 */
  }

  .intro h1 {
    top: 80%;
    font-size: 38px;
  }

  .intro p {
    top: 93%;
    font-size: 28px;
  }
}


header .intro-text {
  padding-top: 350px;
  padding-bottom: 200px;
  text-align: center;
}
/* Features Section */
/*#features {*/
/*  background: #f6f6f6;*/
/*}*/
/*#features i.fa {*/
/*  font-size: 38px;*/
/*  margin-bottom: 20px;*/
/*  transition: all 0.5s;*/
/*  color: #fff;*/
/*  width: 100px;*/
/*  height: 100px;*/
/*  padding: 30px 0;*/
/*  border-radius: 50%;*/
/*  background: linear-gradient(to right, #6372ff 0%, #5ca9fb 100%);*/
/*  box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.05);*/
/*}*/
/* --- 覆蓋原本的背景色 --- */
/* --- 1. 大幅減少外層區塊的上下留白 --- */
/* --- 1. 恢復外層容器的正常間距 --- */
#features {
  background: #fcfcfc; /* 如果你不想要灰底，可以改成 background: #ffffff; */
  padding: 20px 0 20px 0; /* 恢復適當的上方留白，讓它跟上面的圖片有呼吸空間 */
}

.news-card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

/* --- 2. 卡片樣式更新 (移除紅框、移除疊加) --- */
.news-horizontal-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px 30px; /* 因為卡片變寬了，把內部的左右留白加大，看起來更大氣 */
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05); /* 換成非常輕柔、高級的淡陰影 */

  /* 👑 把突兀的紅色拿掉，換成柔和的藍紫色 (類似你下方關於我們的底線顏色) */
  /* 如果你不想要任何顏色，可以把這行直接刪除，改成 border: 1px solid #eaeaea; */
  border-left: 6px solid #7c1b52;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-horizontal-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); /* hover 時的陰影也保持低調 */
}

@media (max-width: 767px) {
  .news-card-list {
    grid-template-columns: 1fr;
  }
}

/* About Section */
#about {
  padding: 100px 0;
}
#about h3 {
  font-size: 22px;
  margin: 0 0 20px;
}
#about h2 {
  position: relative;
  margin-bottom: 15px;
  padding-bottom: 15px;
}
#about h2::after {
  position: absolute;
  content: "";
  background: linear-gradient(to right, #675d59 0%, #d3c1b2 100%);
  height: 4px;
  width: 60px;
  bottom: 0;
  left: 0;
}
#about .about-text li {
  margin-bottom: 6px;
  margin-left: 6px;
  list-style: none;
  padding: 0;
}
#about .about-text li:before {
  content: "\f00c";
  font-family: "FontAwesome";
  color: #5ca9fb;
  font-size: 11px;
  font-weight: 300;
  padding-right: 8px;
}
#about img {
  width: 520px;
  margin-top: 10px;
  background: #fff;
  border-right: 0;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.06);
}
#about p {
  line-height: 24px;
  margin: 10px 0;
  /*background-color: #FDF7F2;*/
  color: #5C4B51;
  /*box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);*/

}
.video-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%; /* 撐滿整個 col */
  min-height: 300px; /* 適當設一個最小高度 */
}

.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/*@media (max-width: 767px) { !* 針對手機尺寸的媒體查詢 *!*/
/*  .video-container {*/
/*    margin-top: 30px; !* 在影片上方增加 20px 的空間 *!*/
/*  }*/
/*}*/
#about .row {
  display: flex;
  align-items: center;
}
@media (max-width: 767px) {
  #about .row {
    flex-wrap: wrap; /* 允許換行 */
  }
}


/* Services Section */
#services {
  padding: 100px 0;
  background: linear-gradient(to right, #b6aca9 0%, #d9cec7 100%);
  color: #fff;
}
#services .service-desc {
  margin: 10px 10px 20px;
}
#services h2 {
  color: #fff;
}
#services .section-title h2::after {
  position: absolute;
  content: "";
  background: rgba(255, 255, 255, 0.3);
  height: 4px;
  width: 60px;
  bottom: 0;
  margin-left: -30px;
  left: 50%;
}
#services i.fa {
  font-size: 42px;
  width: 120px;
  height: 120px;
  padding: 40px 0;
  background: linear-gradient(to right, #6372ff 0%, #5ca9fb 100%);
  border-radius: 50%;
  color: #fff;
  box-shadow: 10px 10px 10px rgba(0, 0, 0, 0.05);
}
#services h3 {
  font-weight: 500;
  padding: 5px 0;
  color: #fff;
}
#services p {
  color: rgba(255, 255, 255, 0.75);
}
#services .service-desc {
  margin-bottom: 40px;
}
/* Portfolio Section */
#portfolio {
  padding: 100px 0;
}
.portfolio-item {
  margin: 1px -15px 0 -14px;
  padding: 0;
}
.portfolio-item .hover-bg {
  overflow: hidden;
  position: relative;
  margin: 0;
}
.hover-bg .hover-text {
  position: absolute;
  text-align: center;
  margin: 0 auto;
  color: #fff;
  background: linear-gradient(
    to right,
    rgba(99, 114, 255, 0.8) 0%,
    rgba(92, 169, 251, 0.8) 100%
  );
  padding: 30% 0 0;
  height: 100%;
  width: 100%;
  opacity: 0;
  transition: all 0.5s;
}
.hover-bg .hover-text > h4 {
  opacity: 0;
  color: #fff;
  -webkit-transform: translateY(100%);
  transform: translateY(100%);
  transition: all 0.3s;
  font-size: 18px;
  letter-spacing: 1px;
  font-weight: 500;
  text-transform: uppercase;
}
.hover-bg:hover .hover-text > h4 {
  opacity: 1;
  -webkit-backface-visibility: hidden;
  -webkit-transform: translateY(0);
  transform: translateY(0);
}
.hover-bg:hover .hover-text {
  opacity: 1;
}
/* Testimonials Section */
#testimonials {
  padding: 100px 0;
  background: #f6f6f6;
}
#testimonials i {
  color: #e6e6e6;
  font-size: 32px;
  margin-bottom: 20px;
}
.testimonial {
  position: relative;
  padding: 20px;
}
.testimonial-image {
  float: left;
  margin-right: 15px;
}
.testimonial-image,
.testimonial-image img {
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 50%;
}
.testimonial-content {
  position: relative;
  overflow: hidden;
}
.testimonial-content p {
  margin-bottom: 0;
  font-size: 14px;
  font-style: italic;
}
.testimonial-meta {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 600;
  color: #666;
}
/* Team Section */
#team {
  padding: 100px 0;
}
#team h4 {
  margin: 5px 0;
}
#team .team-img {
  width: 240px;
}
#team .thumbnail {
  background: transparent;
  border: 0;
}
#team .thumbnail .caption {
  padding: 10px 0 0;
  color: #888;
}
/* Contact Section */
#contact {
  padding: 100px 0 60px;
  background: linear-gradient(to right,  #b6aca9 0%, #d9cec7 100%);
  color: rgba(255, 255, 255, 0.75);
}
#contact .section-title {
  margin-bottom: 40px;
}
#contact .section-title p {
  font-size: 16px;
  color: #565656;

}


#contact h2 {
  color: #fff;
  margin-top: 10px;
  margin-bottom: 15px;
  padding-bottom: 15px;
}
#contact .section-title h2::after {
  position: absolute;
  content: "";
  background: rgba(255, 255, 255, 0.3);
  height: 4px;
  width: 60px;
  bottom: 0;
  left: 30px;
}
#contact h3 {
  color: #fff;
  margin-top: 80px;
  margin-bottom: 25px;
  padding-bottom: 20px;
  font-weight: 400;
}
#contact form {
  padding-top: 20px;
}
#contact .text-danger {
  color: #cc0033;
  text-align: left;
}
#contact .btn-custom {
  margin: 30px 0;
  background: transparent;
  border: 2px solid #fff;
}
#contact .btn-custom:hover {
  color: #1f386e;
  background: #fff;
}
label {
  font-size: 12px;
  font-weight: 400;
  font-family: "Open Sans", sans-serif;
  float: left;
}
#contact .form-control {
  display: block;
  width: 100%;
  padding: 6px 12px;
  font-size: 16px;
  line-height: 1.42857143;
  color: #444;
  background-color: #fff;
  background-image: none;
  border: 1px solid #ddd;
  border-radius: 0;
  -webkit-box-shadow: none;
  box-shadow: none;
  -webkit-transition: none;
  -o-transition: none;
  transition: none;
}
#contact .form-control:focus {
  border-color: #999;
  outline: 0;
  -webkit-box-shadow: transparent;
  box-shadow: transparent;
}
.form-control::-webkit-input-placeholder {
  color: #777;
}
.form-control:-moz-placeholder {
  color: #777;
}
.form-control::-moz-placeholder {
  color: #777;
}
.form-control:-ms-input-placeholder {
  color: #777;
}
#contact .contact-item {
  margin: 20px 0;
}
#contact .contact-item span {
  color: rgb(79, 79, 79);
  margin-bottom: 10px;
  display: block;
}
#contact .contact-item i.fa {
  margin-right: 10px;
}
#contact .social {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 50px;
  margin-top: 50px;
  text-align: center;
}
#contact .social ul li {
  display: inline-block;
  margin: 0 20px;
}
#contact .social i.fa {
  font-size: 22px;
  width: 48px;
  height: 48px;
  padding: 12px 0;
  border: 2px solid #fff;
  color: #fff;
  border-radius: 50%;
  transition: all 0.3s;
}
#contact .social i.fa:hover {
  color: #608dfd;
  background: #fff;
}
/* Footer Section*/
#footer {
  background: #f6f6f6;
  padding: 30px 0;
}
#footer p {
  color: #888;
  font-size: 14px;
}
#footer a {
  color: #608dfd;
}
#footer a:hover {
  border-bottom: 2px solid #608dfd;
}

@media (max-width: 768px) {
  #about img {
    margin: 50px 0;
  }
}



/* 服務項目 */
.service-card {
  text-align: center;
  margin-bottom: 20px;
}

.image-container {
  position: relative;
  display: inline-block;
  overflow: hidden;
  border-radius: 10px;
}

.service-image {
  width: 100%;
  height: auto;
  border-radius: 10px;
  transition: transform 0.3s ease-in-out;
}

/* 服務名稱 (標題) */
.overlay-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #ffffff;
  font-size: 20px;
  font-weight: bold;
  background: rgba(103, 93, 89, 0.8);
  white-space: nowrap;
  padding: 10px 20px;
  border-radius: 7px;
  transition: top 0.3s ease-in-out;
}

/* 服務描述 (滑鼠移入時顯示) */
.description {
  position: absolute;
  bottom: -50px; /* 初始位置：隱藏在圖片下方 */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 16px;
  background: rgba(103, 93, 89, 0.8);
  padding: 10px;
  border-radius: 7px;
  width: 80%;
  opacity: 0; /* 預設隱藏 */
  transition: opacity 0.3s ease-in-out;
  display: flex;
  flex-direction: column; /* 垂直排列 */
  align-items: center;   /* 垂直置中 */
  justify-content: center; /* 水平置中 */
  text-align: center;
}
/* Learn More 連結 */
.learn-more {
  margin-top: 10px; /* 與文字間距 */
  padding: 6px 10px;
  background-color: #ffffff;
  color: #675d59;
  font-weight: 400;
  border-radius: 5px;
  text-decoration: none;
  transition: all 0.3s ease-in-out;
}

/* 滑鼠懸停時的動畫 */
.image-container:hover .overlay-text {
  opacity: 0; /* 預設隱藏 */
}

.image-container:hover .description {
  opacity: 1; /* 顯示描述 */
}





/* styles.css */
/*contact*/
/* 成功訊息樣式 */
.custom-alert-success {
  background-color: #4CAF50;
  color: white;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 5px;
  font-size: 16px;
  text-align: center;
  animation: fadeIn 1s;
}

.custom-alert-success a {
  color: white;
  text-decoration: none;
}

/* 錯誤訊息樣式 */
.custom-alert-error {
  background-color: #f44336;
  color: white;
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 5px;
  font-size: 16px;
  text-align: center;
  animation: fadeIn 1s;
}

.custom-alert-error a {
  color: white;
  text-decoration: none;
}

/* 提示訊息顯示的過渡動畫 */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/*youtube*/
.grid-video {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.grid-video iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
}

/*lottery*/
.lottery-bg {
  max-width: 90vw;      /* 最大寬度不超過 90% 視窗 */
  width: 100%;          /* 預設占滿可用寬度 */
  height: 60vh; /* 高度你可依需要調整 */
  margin: 0 auto;

  background:
          linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.6)),
          url('/img/lottery-bg.png') center center no-repeat;
  background-size: cover;
  position: relative; /* 讓裡面的內容可以絕對定位 */

  display: flex;
  flex-direction: column;
  justify-content: center; /* 垂直置中 */
  align-items: center;     /* 水平置中 */

  padding: 20px;
  text-align: center;
  border-radius: 16px; /* 可選：讓邊緣圓滑 */
  box-sizing: border-box;  /* 🔑 確保 padding 不會撐爆寬度 */
}




