/**
 * 全站 lh 外殼：header / footer（法務頁、子頁共用）
 */
.lh-skip {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.lh-skip:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.5rem 1rem;
  background: var(--rgf-white);
  z-index: 9999;
}

.lh-container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

.lh-header {
  position: sticky;
  top: 0;
  z-index: 100;
  isolation: isolate;
  background: var(--rgf-cream);
  border-bottom: 1px solid var(--rgf-border);
  box-shadow: 0 1px 0 var(--rgf-shadow);
}

.lh-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}

.lh-logo img {
  max-height: 58px;
  width: auto;
  display: block;
}

.lh-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.lh-nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--rgf-navy);
  border-radius: 1px;
}

.lh-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.lh-nav__link {
  color: var(--rgf-navy);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.lh-nav__link:hover,
.lh-nav__link.is-active {
  color: var(--rgf-gold-deep);
}

.lh-footer {
  background-color: var(--rgf-navy-footer, #1e333d) !important;
  color: rgba(255, 255, 255, 0.88);
  padding: 2.25rem 0 2rem;
  font-size: 0.9rem;
  line-height: 1.65;
}

.lh-footer a {
  color: #fff;
  text-decoration: none;
}

.lh-footer a:hover {
  color: var(--rgf-gold-soft);
}

.lh-footer > .lh-container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

/* 上排：左公司／右聯絡 */
.lh-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem 3rem;
  align-items: start;
  width: 100%;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.lh-footer__col p {
  margin: 0 0 0.35rem;
}

.lh-footer__col--company {
  text-align: left;
}

.lh-footer__col--contact {
  text-align: right;
}

.lh-footer__company {
  font-weight: 600;
  color: #fff;
}

.lh-footer__meta {
  color: rgba(255, 255, 255, 0.82);
}

.lh-footer__copy {
  margin: 0.45rem 0 0;
  font-size: inherit;
  color: rgba(255, 255, 255, 0.82);
}

/* 下排：置中 icon + 法律連結 */
.lh-footer__bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding-top: 1.35rem;
}

.lh-footer__social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.25rem;
}

.lh-footer__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.lh-footer__icon:hover {
  background: rgba(255, 255, 255, 0.16);
  color: var(--rgf-gold-soft);
  transform: translateY(-1px);
}

.lh-footer__icon i {
  font-size: 1.65rem;
  line-height: 1;
}

.lh-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0;
  width: 100%;
  text-align: center;
}

.lh-footer__legal a {
  font-size: 0.9rem;
  opacity: 0.92;
}

.lh-footer__legal-sep {
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0.35rem;
  user-select: none;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 900px) {
  .lh-header__inner {
    position: relative;
  }

  .lh-nav-toggle {
    display: flex;
    flex-shrink: 0;
  }

  .lh-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 101;
    display: none;
    background: var(--rgf-cream);
    border-bottom: 1px solid var(--rgf-border);
    padding: 1rem;
    box-shadow: 0 8px 24px var(--rgf-shadow);
  }

  .lh-nav.is-open {
    display: block;
  }

  .lh-nav__list {
    flex-direction: column;
    gap: 0.75rem;
  }
}

@media (max-width: 640px) {
  .lh-footer__top {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .lh-footer__col--contact {
    text-align: left;
  }
}

/* 全站 LINE@ 懸浮按鈕 */
.lh-line-fab {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right, 0px));
  bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 999px;
  background: #06c755;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(6, 199, 85, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lh-line-fab:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(6, 199, 85, 0.42);
}

.lh-line-fab:focus-visible {
  outline: 2px solid var(--rgf-gold-deep, #ce592f);
  outline-offset: 3px;
}

.lh-line-fab i {
  font-size: 1.85rem;
  line-height: 1;
}
