/*** Index Rank ***/
.ranking-container {
  margin-top: 50px;
  flex-wrap: wrap;
}

.rank-card {
  width: auto;
  position: relative;
  margin-left: auto;
  margin-right: auto;
}

.rank-card img {
  aspect-ratio: 1 / 1; /* 強制圖片容器為 1:1，確保是正圓 */
  width: 100%;
  height: auto;
  border-radius: 50%;
  object-fit: cover;
}

.rank-1 {
  margin-bottom: 60px;
}

.rank-2 {
  margin-bottom: 30px;
}

.rank-3 {
  margin-bottom: 0px;
}

.rank-1 img{
  width: 240px;
  height: 240px;
}

.rank-2 img{
  width: 200px;
  height: 200px;
}

.rank-3 img{
  width: 160px;
  height: 160px;
}

.emotion-section {
  margin-top: 10px;
}


@media (max-width: 768px) {
  .ranking-container {
    flex-direction: column;
    align-items: center;
  }

  .rank-card {
    margin-bottom: 40px;
  }
}


.emotion-labels {
    
  max-width: 100%;  /* 撐滿父層 */
  width: 200px;     /* 預設寬度 */
  min-width: 160px; /* 最小寬度避免被壓縮太小 */
}

.emotion-labels div {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.rank-volume, 
.rank-percent {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr; /* 文字 / 分隔線 / 文字 / 分隔線 / 文字 */
  align-items: center;
  text-align: center;
  gap: 0.5rem; /* 分隔線和文字之間的距離 */
}

/* 讓分隔線不會被壓縮變形 */
.rank-separator {
  min-width: 1rem;
  text-align: center;
  color: #2e2e2c;
  font-weight: 300 !important;
  user-select: none;
}
  

/*** Index Rank ***/

.scroll-float {
    overflow: hidden;
    text-align: center;
}

.scroll-float-text {
    display: inline-block;
    /*font-size: clamp(1.6rem, 8vw, 10rem);*/
    /*font-size: calc(1.375rem + 1.5vw);*/
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 900;
    line-height: 1.2;
}

.scroll-float img {
    margin-top: 20px; /* 想要更大間距就加大這個數值 */
}

#line2.scroll-float-text {
    /*font-size: clamp(0.5rem, 6vw, 6rem);*/
    font-size: calc(1.375rem + 1.5vw)
}


@media(max-width: 576px) {/*手機版*/

    .scroll-float-text {
        font-size: 2rem
    }

}

.char {
    display: inline-block;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 6px;
    background: linear-gradient(to bottom, #B2C09D, #EABA82, #FFB5A2);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 3px;
}

.item {
    position: relative;
    width: 40%;
    padding: 20px 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 40px 0;
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

.item.visible {
    opacity: 1;
    transform: translateY(0);
}

.left  { left: -3%; }
.right { left: 55%; }

.about-h3 {
    margin: 0;
    font-size: 1.2em;
    color: #333;
}

.dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    border: 4px solid transparent;
    background-image: linear-gradient(white, white), linear-gradient(135deg, #B2C09D, #EABA82, #FFB5A2);
    background-origin: border-box;
    background-clip: content-box, border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.dot img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.about-p {
  margin: 8px 0 0;
  color: #555;
}

.about-cloud {
  width:80%;
}


@media (max-width: 576px) {
  .about-cloud {
    width:100% !important;
  }

}

@media (max-width: 576px) {
  .about-cloud {
    width:100% !important;
  }

}

/* 上浮動畫 */
@keyframes floatUp {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(-30px); }
  100% { transform: translateY(0px); }
}

/* 下浮動畫 */
@keyframes floatDown {
  0%   { transform: translateY(0px); }
  50%  { transform: translateY(30px); }
  100% { transform: translateY(0px); }
}

/* 左邊（先往上） */
.float-up {
  animation: floatUp 3s ease-in-out infinite alternate;
}

/* 右邊（先往下） */
.float-down {
  animation: floatDown 3.5s ease-in-out infinite alternate;
}




/*** About End ***/

.form-contant {
  color: #2e2e2c;
  font-size: 28px;
}

font {
  background: linear-gradient(
        30deg,
        #B2C09D 0%,
        #EABA82 54%,
        #FFB5A2 100%
      );
  background-clip: text;
  color: transparent
}

.lottie-wrapper {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh; /* 總是佔滿螢幕畫面 */
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
}
.lottie-section {
  height: 250vh; /* 撐出足夠滾動空間 */
  position: relative;
}

.lottie-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(
    30deg,
    #B2C09D 0%,
    #EABA82 54%,
    #FFB5A2 100%
  );
  z-index: 10;
}

#lottie {
  width: 100%;
  height: 100%;
}
h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #333;
}
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.custom-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 4px 2px 8px rgba(0, 0, 0, 0.5);
  transition: transform 0.2s;
}
.custom-card:hover {
  transform: translateY(-5px);
}
.tag {
  display: inline-block;
  background: #f7c59f;
  color: #fff;
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 20px;
  margin-bottom: 0.8rem;
  width: fit-content;
  box-shadow: 4px 2px 8px rgba(0, 0, 0, 0.5);
}
.future {
  background: #8ac6d1;
}
.custom-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  /*font-size: 1.2rem;*/
  font-size:clamp(1.2rem, 3vw, 1.5rem);
}
.custom-cardd p {
  /*font-size: 0.95rem;*/
  font-size:clamp(0.95rem, 3vw, 1.25rem);
  line-height: 1.5;
  color: #555;
}

/* 響應式調整寬度 */
@media (max-width: 768px) {
  .lottie-wrapper {
    padding: 0 1rem;
  }
}

/*** Spinner Start ***/
/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}
/*** Spinner End ***/

.fixed-buttons {
  position: fixed;
  right: 3vw;
  bottom: 3vh;
  display: flex;
  flex-direction: column;
  align-items: center; /* 垂直置中對齊 */
  gap: 1rem;           /* 按鈕之間間距 */
  z-index: 99;
}

.to-new-page {
  transition: 0.5s;
  z-index: 99;
  color: #FFFFFF;
  font-size: 1.3rem;
  width: 60px;   /* 統一寬高，保持圓形 */
  height: 60px;
  display: flex; /* 讓文字在圓裡置中 */
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  background: linear-gradient(
    30deg,
    #B2C09D 0%,
    #EABA82 54%,
    #FFB5A2 100%
  );
}

.back-to-top {
  width: 60px;   /* 與上面一致，保持對齊 */
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media(max-width: 576px) {

  .to-new-page {
    font-size: 1rem;
    width: 50px;
    height: 50px;
  }
  .back-to-top {
    width: 50px;
    height: 50px;
  }
}

/*** Button Start ***/
.btn {
    font-weight: 600;
    transition: .5s;
}

.btn-square {
    width: 32px;
    height: 32px;
}

.btn-sm-square {
    width: 34px;
    height: 34px;
}

.btn-md-square {
    width: 44px;
    height: 44px;
}

.btn-lg-square {
    /*width: 56px;
    height: 56px;*/
    width: 51px;
    height: 51px;
}

.btn-xl-square {
    /*width: 66px;
    height: 66px;*/
    width: 99px;
    height: 99px;
}

.btn-square,
.btn-sm-square,
.btn-md-square,
.btn-lg-square,
.btn-xl-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
}

.btn.btn-primary {
    color: var(--bs-white);
}

.btn.btn-primary:hover {
    background: var(--bs-secondary);
    border: 1px solid var(--bs-secondary);
}

.btn.btn-secondary {
    color: var(--bs-white);
   
}

.btn.btn-secondary:hover {
    background: var(--bs-primary);
    border: 1px solid var(--bs-primary);
}

@media (max-width: 992px) {
  .btn-xl-square {
    width: 66px;
    height: 66px;
  }

  .btn-lg-square {
    width: 34px;
    height: 34px;
   }

  .back-to-top {
    right: 45px;
} 

}
/*** Topbar Start ***/

/*** Navbar ***/
.navbar-light .navbar-nav .nav-link {
    position: relative;
    /*margin-right: 25px;*/
    margin-right: 100px;
    padding: 20px 0;
    /*color: var(--bs-white);*/
    color: #2e2e2c;
    /*font-size: 17px;*/
    font-size: 20px;
    font-weight: 400;
    outline: none;
    transition: .5s;
    white-space:nowrap;
}

.sticky-top.navbar-light .navbar-nav .nav-link {
    padding: 20px 0;

}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    /*color: var(--bs-primary);*/
    text-decoration: underline;
    color: #2e2e2c;
    font-weight:bold;

}

.navbar-light .navbar-brand img {
    max-height: 60px;
    transition: .5s;
}

.sticky-top.navbar-light .navbar-brand img {
    max-height: 45px;
}

.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 600;
    vertical-align: middle;
    margin-left: 8px;
}

.dropdown .dropdown-menu a:hover {
    background: var(--bs-primary);
    color: var(--bs-white);
}

.navbar .nav-item:hover .dropdown-menu {
    transform: rotateX(0deg);
    visibility: visible;
    background: var(--bs-light);
    transition: .5s;
    opacity: 1;
}

@media (max-width: 991.98px) {

    /*.sticky-top.navbar-light {
       /* position: relative;*/
       /* background: var(--bs-white);*/
     /*  position: sticky;  /* 保持黏在螢幕上方 */
      /* top: 0;            /* 黏住的位置 */
      /* z-index: 1020;     /* 確保在內容之上 */
     /*  background: #fbf8f2;
    }*/

    .navbar {
    position: fixed !important; /* 永遠固定在螢幕頂端 */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1050; /* 蓋住內容 */
    background: #fbf8f2 !important; /* 淺色背景 */
    }
    
    /* 避免內容被 navbar 擋住，補一個上方間距 */
    body {
       padding-top: 70px; /* 視你的 navbar 高度調整 */
    }


    .navbar.navbar-expand-lg .navbar-toggler {
        /*padding: 10px 20px;
        border: 1px solid var(--bs-primary);
        color: var(--bs-primary);*/
        padding: 10px 20px;
        border: none;
        background: 
        linear-gradient(#fbf8f2, #fbf8f2) padding-box, /* 內部背景色 */
        linear-gradient(30deg,#B2C09D 0%,#EABA82 54%,#FFB5A2 100%) border-box; /* 邊框漸層 */
        border-radius: 50px;
        border: 2px solid transparent; /* 透明邊框讓第二個背景顯示出來 */
        color: transparent;
    }


    .navbar-light .navbar-collapse {
        margin-top: 15px;
        border-top: 1px solid rgba(0, 0, 0, .08);
    }

    .navbar-light .navbar-nav .nav-link,
    .sticky-top.navbar-light .navbar-nav .nav-link {/*清單*/
        padding: 10px 0;
        margin-left: 0;
        color: var(--bs-dark);
    }

    .navbar-light .navbar-brand img {
        max-height: 45px;
    }
}

@media (min-width: 992px) {

    .navbar .nav-item .dropdown-menu {
        display: block;
        visibility: hidden;
        top: 100%;
        transform: rotateX(-75deg);
        transform-origin: 0% 0%;
        border: 0;
        border-radius: 10px;
        transition: .5s;
        opacity: 0;
    }

    /*預設*/
    .navbar-light {
        position: absolute;
        width: 100%;
        top: 0;
        left: 0;
        border-top: 0;
        border-right: 0;
        border-bottom: 1px solid;
        border-left: 0;
        /*border-style: dotted;*/
        border-style: none;
        z-index: 999;
        background: #fbf8f2;
    }
    
    /*變色*/
    .sticky-top.navbar-light {
        position: fixed;
        /*background: var(--bs-light);*/
        background: linear-gradient(
        30deg,
        #B2C09D 0%,
        #EABA82 54%,
        #FFB5A2 100%
      );
        border: none;
    }

    /* 滾過第一區塊後變色 */
    .navbar-light.scrolled {
        position: fixed;
        /*background: var(--bs-light);*/
        background: linear-gradient(
        30deg,
        #B2C09D 0%,
        #EABA82 54%,
        #FFB5A2 100%
      );
        border: none;
    }

    .navbar-light .navbar-nav .nav-item::before {/*menu*/
       /* position: absolute;
        content: "";
        width: 0;
        height: 2px;
        bottom: -1px;
        left: 50%;
        background: var(--bs-primary);
        transition: .5s;*/
    }

    .sticky-top.navbar-light .navbar-nav .nav-item::before {
        bottom: 0;
    }

    .navbar-light .navbar-nav .nav-item::after { /*menu*/
        /*content: "";
        position: absolute;
        bottom: 1px;
        left: 50%;
        transform: translateX(-50%);
        border: 10px solid;
        border-color: transparent transparent var(--bs-primary) transparent;
        opacity: 0;
        transition: 0.5s;*/
    }

    .navbar-light .navbar-nav .nav-item:hover::after,
    .navbar-light .navbar-nav .nav-item.active::after {
        bottom: 1px;
        opacity: 1;
    }

    .navbar-light .navbar-nav .nav-item:hover::before,
    .navbar-light .navbar-nav .nav-item.active::before {
        width: calc(100% - 2px);
        left: 1px;
    }

    .navbar-light .navbar-nav .nav-link.nav-contact::before {
        display: none;
    }
}
/*** Carousel Hero Header Start ***/
.carousel-header {
    position: relative;
    overflow: hidden;
}

.carousel-indicators {
    display: none;
}

.carousel .carousel-control-prev,
.carousel .carousel-control-next {
    width: 0;
}

.carousel .carousel-control-prev .carousel-control-prev-icon,
.carousel .carousel-control-next .carousel-control-next-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding: 25px 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-primary);
    transition: 0.5s;
}

.carousel .carousel-control-prev .carousel-control-prev-icon {
    left: 0;
    border-left: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 50px;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 50px;

}

.carousel .carousel-control-next .carousel-control-next-icon {
    right: 0;
    border-right: 0;
    border-top-left-radius: 50px;
    border-top-right-radius: 0;
    border-bottom-left-radius: 50px;
    border-bottom-right-radius: 0;
}

.carousel .carousel-control-prev .carousel-control-prev-icon:hover,
.carousel .carousel-control-next .carousel-control-next-icon:hover {
    background: var(--bs-secondary);
}

.carousel .carousel-inner .carousel-item {
    position: relative;
}

.carousel .carousel-inner .carousel-item .carousel-caption-1  {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    padding-top: 100px;
    display: flex;
    align-items: center;
    justify-content: end;
    background: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, 0.5));
    background-size: cover;
}

.carousel-caption-1-content {
    text-align: end;
    padding-right: 100px;
}

.carousel-caption-1-content .carousel-caption-1-content-btn {
    display: flex;
    justify-content: end;
}

.carousel .carousel-inner .carousel-item .carousel-caption-2  {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    padding-top: 100px;
    display: flex;
    align-items: center;
    text-align: center;
    background: linear-gradient(rgba(0, 0, 0, .5), rgba(0, 0, 0, 0.5));
    background-size: cover;
}

.carousel-caption-2-content {
    text-align: start;
    padding-left: 100px;
}

.carousel-caption-2-content .carousel-caption-2-content-btn {
    display: flex;
    justify-content: start;
}


@media (max-width: 992px) {
    .carousel .carousel-inner .carousel-item {
        height: 700px;
        margin-top: -100px;
    }

    .carousel .carousel-inner .carousel-item img {
        height: 700px;
        object-fit: cover;
    }


    .carousel .carousel-inner .carousel-item .carousel-caption-1 {
        max-width: 100% !important;
        justify-content: center;
    }

    .carousel-caption-1-content {
        padding: 0 20px !important;
        text-align: center !important;
    }

    .carousel-caption-1-content .carousel-caption-1-content-btn {
        justify-content: center;
    }


    .carousel .carousel-inner .carousel-item .carousel-caption-2 {
        max-width: 100% !important;
        justify-content: center;
    }

    .carousel-caption-2-content {
        padding: 0 20px !important;
        text-align: center !important;
    }

    .carousel-caption-2-content .carousel-caption-2-content-btn {
        justify-content: center;
    }



    .carousel .carousel-control-prev .carousel-control-prev-icon,
    .carousel .carousel-control-next .carousel-control-next-icon {
        display: none;
    }
}

.modal .modal-header {
    height: 100px;
}

#searchModal .modal-content {
    background: rgba(255, 255, 255, .6);
}
/*** Carousel Hero Header End ***/

/*** Single Page Hero Header Start ***/
.bg-breadcrumb {
    position: relative;
    overflow: hidden;
    background: linear-gradient(rgba(0, 20, 66, 0.7), rgba(0, 20, 66, 0.7)), url(../img/breadcrumb.jpg);
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
    padding: 120px 0 60px 0;
    transition: 0.5s;
}

.bg-breadcrumb .breadcrumb {
    position: relative;
}

.bg-breadcrumb .breadcrumb .breadcrumb-item a {
    color: var(--bs-white);
}

@media (max-width: 992px) {
    .bg-breadcrumb {
        padding: 60px 0 60px 0;
    }
}
/*** Single Page Hero Header End ***/


/*** Features Start ***/
.feature .feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: var(--bs-white);
    border-radius: 10px;
    transition: 0.5s;
}

.feature .feature-item:hover {
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
}

.feature .feature-item .feature-icon {
    width: 100px;
    height: 100px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-primary);


}

.feature .feature-item .feature-icon i {
    transition: 0.5s;
}

.feature .feature-item:hover .feature-icon i {
    transform: rotate(360deg);
}

.feature .feature-item a.btn {
    transition: 0.5s;
}

.feature .feature-item:hover a.btn:hover {
    color: var(--bs-primary) !important;
}
/*** Features End ***/

/*** About Start ***/
.about .about-img {
    position: relative;
    padding-bottom: 30px;
    margin-top: 30px; 
    margin-left: 30px;
}

.about .about-img::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 10px;
    top: -30px;
    right: 0;
    border-radius: 10px;
    background: var(--bs-secondary);

}

.about .about-img::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 100%;
    left: -30px;
    bottom: 30px;
    border-radius: 10px;
    background: var(--bs-secondary);
}

.about .about-img .about-exp {
    position: absolute;
    top: 0;
    left: 0;
    padding: 25px;
    font-size: 30px;
    font-weight: bold;
    background: var(--bs-secondary);
    color: var(--bs-white);
    border: 1px solid var(--bs-secondary);
    margin-top: -30px;
    margin-left: -30px;
    border-radius: 10px;
}
/*** About End ***/

/*** Service Start ***/
.service-item {
    position: relative;
    box-shadow: 0 0 45px rgba(0, 0, 0, .08);
}

.service-item::after {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    left: 0;
    bottom: 0;
    border-radius: 10px;
    background: var(--bs-primary);
    transition: 0.5s;
    z-index: 1;
}

.service-item:hover::after {
    width: 100%;
    height: 100%;
}

.service-item:hover .service-content,
.service-item:hover .service-btn {
    position: relative;
    z-index: 2;
}

.service-item .service-content a,
.service-item .service-content p {
    transition: 0.5s;
}

.service-item:hover .service-content a:hover {
    color: var(--bs-secondary);
}

.service-item:hover .service-content p {
    color: var(--bs-white);
} 

.service-item .service-btn {
    width: 80px;
    height: 80px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-primary);
    transition: 0.5s;
}

.service-item .service-btn i {
    transition: 0.5s;
}

.service-item:hover .service-btn {
    background: var(--bs-white);
}

.service-item:hover .service-btn i {
    transform: rotate(360deg);
    color: var(--bs-primary) !important;
}
/*** Service End ***/


/*** Counter Start ***/
.counter {
    position: relative;
    overflow: hidden;
    /*background: linear-gradient(rgba(25, 64, 154, 0.9), rgba(25, 64, 154, 1)), url(../img/fact-bg.jpg);*/
    background-position: center top;
    background-repeat: no-repeat;
    background-size: cover;
}

.counter .counter-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.counter .counter-item .counter-item-icon {
    width: 100px;
    height: 100px;
    border-radius: 50px;
    background: var(--bs-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
/*** Counter End ***/


/*** Products Start ***/
.product .product-item {
    border: 1px solid rgba(196, 211, 211, 0.9);
    border-radius: 10px;
}

.video-wrapper {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.video-wrapper video {
  width: 100%;
  height: auto; /* 保持比例 */
  display: block;
}

.next-section {
   margin-top: -70px; /* 拉上來 30px，可依需求調整 */
}

@media (min-width: 992px){
  .video-wrapper video {
   padding-top: 70px;
   }
}

/*** Products End ***/

/*** Blog Start ***/
.blog .blog-item {
    border-radius: 10px;
    background: var(--bs-light);
    transition: 0.5s;
}

.blog .blog-item:hover {
    box-shadow: 0 0 45px rgba(0, 0, 0, 0.2);
}

.blog .blog-item .blog-img {
    position: relative;
    overflow: hidden;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.blog .blog-item .blog-img::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    transition: 0.5s;
    z-index: 1;
}

.blog .blog-item .blog-img img {
    transition: 0.5s;
}

.blog .blog-item:hover .blog-img img {
    transform: scale(1.2);
}

.blog .blog-item:hover .blog-img::after {
    background: rgba(0, 209, 249, 0.2);
}

.blog .blog-item .blog-date {
    position: absolute;
    top: 25px;
    left: 25px;
    border-radius: 10px;
    background: var(--bs-primary);
    color: var(--bs-white);
    z-index: 2;
}

.blog .blog-item .blog-content a {
    transition: 0.5s;
}

.blog .blog-item:hover .blog-content a:hover {
    color: var(--bs-primary) !important;
}
/*** Blog End ***/

/*** Team Start ***/
.team .team-item {
    position: relative;
    overflow: hidden;
    /*background: var(--bs-white);*/
    background: rgba(255, 255, 255, 0.5);
    /*border: 1px solid var(--bs-secondary);*/
    border: 1px solid rgba(255, 255, 255);
    border-radius: 10px;
    box-shadow: 4px 2px 8px rgba(0, 0, 0, 0.5);
}

.team .team-item .team-inner {
    transition: 0.5s;
}
.team .team-item:hover .team-inner {
    box-shadow: 0 0 45px rgba(0, 0, 0, 0.2);
}

.team .team-item .team-inner .team-img {
    position: relative;
    z-index: 2;
}

.team .team-item .team-inner .team-img::after {
    content: "";
    width: 100%;
    height: 0;
    position: absolute;
    top: 0;
    left: 0;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    background: rgba(0, 209, 249, 0.2);
    transition: 0.5s;
    z-index: 3;
}

.team .team-item:hover .team-inner .team-img::after {
    height: 100%;
}

.team .team-item .team-inner .team-img .team-share {
    position: absolute;
    left: 10px;
    bottom: 10px;
    transition: 0.5s;
    z-index: 2;
}

.team .team-item:hover .team-inner .team-img .team-share {
    opacity: 0;
}

.team .team-item .team-inner .team-img .team-icon {
    position: absolute;
    bottom: 0;
    left: -100%;
    border-bottom-left-radius: 0 !important; 
    border-top-left-radius: 0 !important;
    display: inline-flex;
    background: var(--bs-primary);
    transition: 0.5s;
    z-index: 4;
}

.team .team-item:hover .team-inner .team-img .team-icon { 
    left: -25px; 
}
/*** Team End ***/


/*** testimonial Start ***/
.testimonial .owl-nav .owl-prev {
    position: absolute;
    top: -58px;
    right: 0;
    background: var(--bs-primary);
    color: var(--bs-white);
    padding: 5px 30px;
    border-radius: 30px;
    transition: 0.5s;
}

.testimonial .owl-nav .owl-prev:hover {
    background: var(--bs-secondary);
    color: var(--bs-white);
}

.testimonial .owl-nav .owl-next {
    position: absolute;
    top: -58px;
    right: 88px;
    background: var(--bs-primary);
    color: var(--bs-white);
    padding: 5px 30px;
    border-radius: 30px;
    transition: 0.5s;
}

.testimonial .owl-nav .owl-next:hover {
    background: var(--bs-secondary);
    color: var(--bs-white);
}

.testimonial-carousel .owl-dots {
    display: flex;
    justify-content: center;
    margin-left: 20px;
    margin-top: 20px;
}

.testimonial-carousel .owl-dots .owl-dot {
    width: 20px;
    height: 20px;
    border-radius: 20px;
    margin-right: 15px;
    border: 1px solid var(--bs-secondary);
    background: var(--bs-primary);
    transition: 0.5s;
}

.testimonial-carousel .owl-dots .owl-dot.active {
    width: 20px;
    height: 20px;
    border-radius: 20px;
    border: 1px solid var(--bs-primary);
    background: var(--bs-secondary) !important;
    transition: 0.5s;
}

.testimonial-carousel .owl-dots .owl-dot span {
    position: relative;
    margin-top: 50%;
    margin-left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.testimonial-carousel .owl-dots .owl-dot span::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 8px;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--bs-white);
}

@media (max-width: 992px) {
    .owl-carousel.testimonial-carousel {
        padding-top: 30px;
    }

    .testimonial .owl-nav .owl-prev,
    .testimonial .owl-nav .owl-next {
        top: -30px;
    }
}
/*** testimonial End ***/

/*** Footer Start ***/
.footer {
    background: var(--bs-dark);
}

.footer .footer-item a {
    line-height: 35px;
    color: var(--bs-body);
    transition: 0.5s;
}

.footer .footer-item p {
    line-height: 35px;
}

.footer .footer-item a:hover {
    letter-spacing: 1px;
    color: var(--bs-primary);
}

.footer .footer-item .footer-btn a,
.footer .footer-item .footer-btn a i {
    transition: 0.5s;
}

.footer .footer-item .footer-btn a:hover {
    background: var(--bs-white);
}

.footer .footer-item .footer-btn a:hover i {
    color: var(--bs-primary) !important;
}
/*** Footer End ***/

/*** copyright Start ***/
.copyright {
    /*border-top: 1px solid rgba(255, 255, 255, 0.08);*/
    border-top: 1px solid #2E2E2C;
    /*background: var(--bs-dark);*/
    background: #fbf8f2;
}
/*** copyright end ***/

/***Rank***/

/*.btn-rank-u,
.btn-rank {
  width: 100%;
  max-width: 320px;
  padding: 12px 16px;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
  min-height: 44px;
  transition: all 0.3s ease;
  position: relative;

}*/

.btn-rank-u,
.btn-rank {
  display: inline-flex;     /* 用 flex 讓 icon + 文字排版 */
  align-items: center;
  justify-content: center;

  font-size: clamp(1.125rem, 2vw, 1.25rem);         /* 字體大小 */
  line-height: 1.4;         /* 行高，避免文字卡住 */
  padding: 25px 14px;        /* 控制按鈕大小：上下 = 文字高度 buffer，左右 = 呼吸空間 */
  
  border-radius: 40px;      /* 圓角 */
  white-space: nowrap;      /* 避免換行 */
  
  transition: all 0.3s ease;
  position: relative;
  border: none;
}

/* 圖示跟文字間距 */
.btn-rank-u img,
.btn-rank img {
  height: 16px;
  width: 16px;
  margin-right: 6px;
}

@media (max-width: 768px) {
  .btn-rank-u,
  .btn-rank {
    font-size: 0.75rem;      /* 手機字體小一點 */
    padding: 5px 10px;    /* 高度也跟著縮小 */
  }
  .btn-rank-div{
    margin-top: 1rem !important;
  }
}

/*選中的按鈕：漸層背景，白色文字 */
.btn-rank-u {
  background: linear-gradient(30deg, #B2C09D, #EABA82, #FFB5A2);
  color: #fff;
  z-index: 1;
  border: none;
}

/*未選中的按鈕：白底 + 文字漸層 + 邊框漸層 */
.btn-rank {
  background-color: #fff;
  color: transparent;
  background-image: linear-gradient(30deg, #B2C09D, #EABA82, #FFB5A2);
  background-clip: text;
  -webkit-background-clip: text;
  border: none;
  z-index: 1;
}

/*外框邊界：漸層邊框效果不影響內容區 */
.btn-rank::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50px;
  padding: 2px;
  background: linear-gradient(30deg, #B2C09D, #EABA82, #FFB5A2);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  z-index: -1;
}

/*圖示樣式保留 */
.btn-rank img,
.btn-rank-u img {
  height: 24px;
  width: 24px;
  object-fit: contain;
}


/* 區塊共同樣式 */
.rank-header, .rank-search, .rank {
  width: 100%;
  max-width: 100%;
  /*border-radius: 20px;*/
  margin-bottom: 20px;
}

.time-rank div {
  cursor: pointer;
}

/*.time-rank {
  display: flex;
  justify-content: center; 讓整體在中間 
  align-items: center;
  gap: 0.8rem;  控制文字與分隔線間距 
  font-size: 1.3rem;
  color: #999;
  flex-wrap: wrap;
  border: 2px solid red;
}*/

.time-rank {
  display: flex;
  justify-content: flex-end;  /* 預設靠右 */
  align-items: center;
  gap: 0.8rem;
  /*font-size: 1.3rem;*/
  font-size:clamp(1.1875rem, 2vw, 1.3rem);
  color: #999;
}

.time-item {
  cursor: pointer;
}

.separator {
  user-select: none;
  color: #999;
}

/* 被選中效果 */
.time-select.active {
  background: linear-gradient(
    30deg, 
    #B2C09D, 
    #EABA82, 
    #FFB5A2
 );
  background-clip: text;
  color: transparent;
}

/* 搜尋區塊容器 */
.rank-search {
  width: 100%;
}

.search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(30deg, #B2C09D, #EABA82, #FFB5A2); /* 外框漸層 */
  border: none;
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
  padding: 0 20px;
  height: 60px;
}

.search-icon i {
  font-size: 1.4rem;
}

.search-input {
  background: #fbf8f2;
}

/* 讓 input 聚焦時不破壞外框 */
.search-input:focus {
  box-shadow: none;
  outline: none;
}

.search-bar {
  display: flex;
  width: 100%;
  border-radius: 12px;
  padding: 1px; /* 控制漸層邊框寬度 */
  background: linear-gradient(30deg, #B2C09D, #EABA82, #FFB5A2); /* 外框漸層 */
}

/* 區塊 C 的預設背景 */
.rank {
  min-height: 300px;
  border-radius: 20px;
}
.rank span {
 color: #999;
 font-size: 20px;
}

.rank-header .rounded {

  box-shadow: 4px 2px 3px rgba(0, 0, 0, 0.5);
}

.rank-header span {
  color: #999;
  font-size: clamp(1rem, 3vw, 1.25rem);
}

.date-text {
  white-space: nowrap; /* 預設桌機一行 */
}

@media (max-width: 576px) {
  .date-text {
    white-space: normal; /* 手機版允許換行 */
    display: block;
    text-align: center;
  }

  .date-range {
    display: block; /* 手機版日期獨立一行 */
    margin-top: 0.25rem;
  }

}

.rank-item-title {
 color: #999;
 font-size:clamp(0.9375rem, 3vw, 1.5rem);
 font-weight: 500;
}

.rank-title {
 color: #2e2e2c;
 /*font-size: 1.5rem;*/
 font-size:clamp(0.9375rem, 3vw, 1.5rem);
 font-weight: 500;
 white-space:nowrap;
}

.rank-channel-title {

 color: #999;
 font-size:clamp(2rem, 3vw, 2.5rem);
 font-weight: 500;
}

.rank-item-number {
  color: #2e2e2c;
  font-size: 2.5rem;
  font-weight: bold; 
}
.rank-item-count {
  font-size: 2.5rem;
  font-weight: bold;
  background: linear-gradient(
        30deg,
        #B2C09D 0%,
        #EABA82 54%,
        #FFB5A2 100%
      );
  background-clip: text;
  color: transparent
}
 hr {
  background: linear-gradient(
        30deg,
        #B2C09D 0%,
        #EABA82 54%,
        #FFB5A2 100%
      );
  height: 5px;
  border: 0;
 }


.rank-title {
  color: #2e2e2c;
  font-size: clamp(0.9375rem, 3vw, 1.5rem);
  font-weight: 500;
  white-space: nowrap;
}

.rank-img {
 max-width: 100% !important;
}

.rank-icon {
  max-width: 12% !important;
}

.btn-page {
  background:#FFB5A2;
  color: white;
}

.btn-page-default {
  background: white;
  color: #2e2e2c;
}

.pagination {
  display: flex;
  flex-wrap: wrap;   /* 手機時自動換行 */
  justify-content: flex-end !important;  /* 改成靠左對齊 */
  padding-left: 0;
  list-style: none;
  gap: 8px;
}

.pagination button {
  flex: 0 0 auto !important;   /*不要自動伸展 */
}

.btn-page,
.btn-page-default {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  border: 1px #BEBEBE solid;
  box-shadow: 4px 2px 3px rgba(0, 0, 0, 0.5);

  min-width: 2rem;
  height: 2rem;
  font-size:clamp(0.75rem, 3vw, 0.875rem);
}

@media (max-width: 900px) {

.pagination {
  justify-content: flex-start !important;  /* 改成靠左對齊 */
}


}

  .rank_number{

    background: linear-gradient(
    30deg, 
    #B2C09D, 
    #EABA82, 
    #FFB5A2
   ) !important;
    background-clip: text !important;
    color: transparent !important;
  }

.character-row {
  background: white;
  border-radius: 5px;
}

/* 統一圖表區塊樣式 */
.chart-box {
  background: white;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  min-height: 500px; /* 高度統一，避免掉下去 */
}

.channel_item:hover {
  background-color: #f0f0f0 !important;
}


.character-card:hover {
  background-color: #f0f0f0 !important;
}

/*
/* 過小裝置（小於 400px）
@media (max-width: 399px) {
  .search-bar { font-size: 0.9rem; }
}
*/


/* === A區：三日榜改為小螢幕置底置中 === */
@media (max-width: 768px) {
  .time-rank {
    position: static !important; /* 解除絕對定位 */
    /*margin-top: 1rem;*/
    justify-content: center !important;

  }

  .rank-header .d-flex.flex-md-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

 .feature .container {
    max-width: 100% !important; /* 直接滿版 */
    padding-left: 0.5rem;  /* 視覺上保留一點空間 */
    padding-right: 0.5rem;
  }


}

@media (max-width: 768px) {
  .rank-header .d-flex {
    flex-direction: row !important;
    justify-content: center !important;
  }
  .rank-header .btn {
    flex: 1; /* 讓兩顆按鈕平均分配寬度 */
    text-align: center;
  }

}

@media (max-width: 992px) {
  .time-rank {
    /*position: absolute;
    bottom: 1rem;
    right: 1rem;
    justify-content: flex-end;
    width: auto;*/
    /*text-align: justfy*/
  }

  .breadcrumb{
    margin: 1rem !important;
  }


}

@media (max-width: 576px) {

  .rank-icon {
    max-width: 30% !important;
  }

  .rank-img {
    max-width: 120% !important;
  }
  

}

/***Hero***/

.content {
  height: auto;          /* 自動撐高 */
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem 0;       /* 上下留白 */
}

.hero-title{
 color:#ffffff !important;
 font-weight: bold;
 font-size:clamp(2rem, 5vw, 4rem);
 font-weight:bold;
 line-height: 1.2
}

@media (max-width: 992px) {
  .content {
    padding: 0rem 0;   /* 平板：上下再縮一點 */
  }
}

/***Hero***/