html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  font-family: "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.8;
  color: #333;
}

/* ===== Breadcrumb ===== */
.site-breadcrumb .breadcrumb {
  --bs-breadcrumb-divider: ">";
  --bs-breadcrumb-divider-color: #707070;
  --bs-breadcrumb-item-active-color: #707070;
}

.site-breadcrumb .breadcrumb-item+.breadcrumb-item {
  margin-left: 0;
}

.site-breadcrumb .breadcrumb-item,
.site-breadcrumb .breadcrumb-item.active,
.site-breadcrumb .breadcrumb-item+.breadcrumb-item::before,
.site-breadcrumb .breadcrumb-item a,
.site-breadcrumb .breadcrumb-item a:hover,
.site-breadcrumb .breadcrumb-item a:focus,
.site-breadcrumb .breadcrumb-item a:visited {
  color: #707070;
  text-decoration: none;
}

/* 目前頁面麵包屑：手機填滿剩餘空間，桌機限制最大寬度 */
.site-breadcrumb .breadcrumb-item.active {
  flex: 1 1 0%;
  min-width: 0;
}

@media (min-width: 768px) {
  .site-breadcrumb .breadcrumb-item.active {
    flex: 0 1 auto;
    max-width: 45vw;
  }
}

/* ===== Brand Bar ===== */
.site-brand-bar {
  background: none;
  clip-path: none;
  padding: 0;
  position: relative;
  z-index: 2;
}

@media (min-width: 768px) {
  .site-brand-bar {
    background: #e60012;
    padding: 0;
    clip-path: polygon(0 0,
        100% 0,
        100% 7px,
        74% 7px,
        72% 100%,
        28% 100%,
        26% 7px,
        0 7px);
  }
}


.site-brand-inner,
.site-brand-logo-wrapper {

  display: flex;

  /* align-items: center; */
  justify-content: center;
}

.site-brand-inner {
  /* 手機版預設垂直疊加 */
  flex-direction: column;
}

.site-brand-logo-wrapper {
  background: #E60012;
  padding: 0.5rem 1rem;
  width: 100%;
  position: relative;
}

.site-brand-toggler {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  align-items: center;
  padding: 0.15rem 0;
}

.site-brand-text-wrapper {
  background: #E60012;
  /* 手機版: 短端在下方的梯形倒角 */
  clip-path: polygon(0 0, 100% 0, 85% 100%, 15% 100%);
  padding: 0 0 0.75rem;
  width: 75%;
}

.site-brand-logo {
  height: 32px;
  width: auto;
}

@media (min-width: 768px) {
  .site-brand-logo {
    height: 40px;
  }

  .site-brand-inner {
    /* 桌機版恢復併排對齊，並賦予內部空間 */
    flex-direction: row;
    padding: 5px 0;
    gap: 0.5rem;
  }

  .site-brand-logo-wrapper,
  .site-brand-text-wrapper {
    /* 桌機版是由最外層 .site-brand-bar 控制背景，這裡移除各自的背景以防重疊 */
    background: transparent;
    clip-path: none;
    padding: 0;
    width: auto;
  }
}

.site-brand-divider {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  display: none;
}

@media (min-width: 768px) {
  .site-brand-divider {
    display: inline;
  }
}

.site-brand-text,
.site-footer-link {
  text-decoration: none;
}

.site-brand-text {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.site-brand-text:hover {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
}

@media (max-width: 575.98px) {
  .site-brand-text {
    font-size: 0.95rem;
  }
}

@media (max-width: 767.98px) {
  .site-brand-bar.nav-is-open .site-brand-text-wrapper {
    display: none;
  }
}

/* ===== Main Nav ===== */
.site-nav-main {
  background-color: #FFF6FC;
  position: relative;
  z-index: 1;
  box-shadow: inset 0px 1px 2px 0px #ffe0e0, 0px 0.25px 0px 0px #ccc;
}

.site-nav-list {
  width: auto;
  max-width: 100%;
  flex: 0 0 auto;
  align-items: stretch;
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
}

.site-nav-link {
  font-size: 1rem;
  font-weight: 700;
  color: #333 !important;
  padding: 0.65rem 0.75rem !important;
  white-space: nowrap;
}

.site-nav-link__icon {
  display: none;
}

.site-nav-link__text {
  display: inline;
}

.site-nav-link:hover,
.site-nav-link:focus {
  color: #c0392b !important;
}

@media (max-width: 767.98px) {

  .site-nav-main,
  .site-nav-main .navbar-collapse {
    background-color: #fff;
  }

  .site-nav-list {
    width: 100%;
    flex: 1 1 auto;
    gap: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .site-nav-list>.nav-item {
    width: 100%;
    border-bottom: 1px solid #eaeaea;
  }

  .site-nav-link {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    min-height: 4.5rem;
    padding: 0.95rem 0.25rem !important;
    font-size: 1rem;
    white-space: normal;
  }

  .site-nav-link__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 2.75rem;
    color: #22252b;
    background-color: #f7f7f7;
    border-radius: 4px;
  }

  .site-nav-link__icon wa-icon,
  .site-nav-link__icon .site-nav-link__wa-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.55rem;
    height: 1.55rem;
    line-height: 1;
    font-size: 1.55rem;
    color: currentColor;
  }

  .site-nav-link__text {
    display: block;
    flex: 1 1 auto;
    line-height: 1.35;
  }
}

/* ===== Footer ===== */
.site-footer {
  background: #232d46;
  color: #cdd5e0;
  font-size: 0.875rem;
}

.site-footer-brand-img {
  width: auto;
  margin-right: 0.4rem;
  vertical-align: middle;
}

.site-footer-brand-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.site-footer-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.site-footer-badge-link {
  display: inline-flex;
  align-items: center;
}

.site-footer-badge-img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
}

.site-footer-badge-img--globaltrust {
  max-height: 45px;
}

.site-footer-badge-img--bsi {
  max-height: 41px;
}

.site-footer-addr {
  font-style: normal;
  line-height: 1.7;
}

.site-footer-link {
  color: #cdd5e0;
}

.site-footer-link:hover {
  text-decoration: underline;
}

.site-footer-bottom {
  color: #7a8898;
  border-color: #2d3e55 !important;
}

.site-footer-body {
  color: #cdd5e0;
}

@media (min-width: 768px) {
  .site-footer-brand-row {
    flex-direction: row;
    align-items: center;
  }

  .site-footer-badges {
    margin-left: auto;
    justify-content: flex-end;
  }
}

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 9999px;
  background: #2563eb;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.3);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease, background-color 0.2s ease;
}

.back-to-top:hover {
  background: #1d4ed8;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:focus-visible {
  outline: 3px solid rgba(147, 197, 253, 0.9);
  outline-offset: 3px;
}

a[href^="tel"] {
  color: inherit;
  text-decoration: none;
}

@media (min-width: 768px) and (max-width: 1090px) {
  .site-brand-inner {
    gap: clamp(0.2rem, 0.5vw, 0.5rem);
  }

  .site-brand-divider {
    font-size: clamp(1rem, 1.2vw, 1.5rem);
  }

  .site-brand-logo-wrapper .site-brand-logo {
    width: clamp(168px, calc(168px + (100vw - 768px) * 0.35), 280px);
    height: auto;
  }

  .site-brand-text-wrapper .site-brand-logo {
    width: clamp(91px, calc(91px + (100vw - 768px) * 0.19), 152px);
    height: auto;
  }
}