/* ==========================================================
   麒麟港生活 - 公共样式（单独文件）
   包含：网站头部（顶部导航）+ 板块7（咨询表单）+ 最底部（页脚/版权条）
   由 style.css 抽出，便于统一维护。
   ========================================================== */


/* ==========================================================
   网站头部：顶部导航
   ========================================================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: var(--gold-light2);
  transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: 0 4px 16px rgba(0,0,0,.3); }
.header-inner { display: flex; align-items: center; height: 88px; }
.logo img { height: 56px; width: auto; }
.nav { margin-left: auto; }
.nav-list { display: flex; align-items: center; }
.nav-item { position: relative; }
.nav-item > a {
  display: block; padding: 30px 26px;
  color: var(--text2); font-size: 17px; letter-spacing: 1px;
  transition: color .25s;
}
/* 一级菜单文字：横线宽度与文字相同，仅当前页显示 */
.nav-item > a .nav-txt { position: relative; display: inline-block; }
.nav-item > a .nav-txt::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px;
  height: 2px; background: var(--gold-deep);
  opacity: 0; transition: opacity .25s;
}
/* 当前页（首页）默认金色 + 文字等宽金色小横线 */
.nav-item.active > a { color: var(--gold-deep); }
.nav-item.active > a .nav-txt::after { opacity: 1; }
.nav-item > a:hover { color: var(--gold-deep); }
.nav-item .arrow {
  display: inline-block; margin-left: 6px;
  width: 7px; height: 7px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-3px);
  transition: transform .3s;
}
.nav-item:hover .arrow { transform: rotate(225deg) translateY(-1px); }

/* 二级下拉菜单 */
.sub-menu {
  position: absolute; top: 100%; left: 50%;
  min-width: 160px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(17,36,67,.18);
  border-top: 3px solid var(--gold);
  transform: translateX(-50%) translateY(12px);
  opacity: 0; visibility: hidden;
  transition: all .3s ease;
}
.nav-item:hover .sub-menu {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.sub-menu li a {
  display: block; padding: 12px 26px;
  text-align: center; font-size: 15px; color: var(--navy);
  transition: all .25s;
}
.sub-menu li a:hover { background: var(--navy); color: #fff; }

.btn-consult {
  margin-left: 30px;
  padding: 6px 15px;
  background: linear-gradient(180deg,#CFB791 , #F1E6CD, #D8C19A);
  color: var(--navy); font-size: 16px; 
  border-radius: 4px; white-space: nowrap;
  transition: opacity .25s, transform .25s;
}
.btn-consult:hover { opacity: .9; transform: translateY(-2px); }

/* 繁体/简体切换（无边框下拉） */
.lang-switch { position: relative; }
.btn-lang {
  margin-left: 14px;
  padding: 6px 8px;
  font-family: var(--cn-font);
  font-size: 13px; letter-spacing: 1px; line-height: 1;
  color: var(--text2);
  background: transparent;
  border: none;
  border-radius: 4px;
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  transition: color .25s;
}
.btn-lang:hover { color: var(--gold); }
.btn-lang .flag { font-size: 16px; line-height: 1; }
.btn-lang .caret {
  width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid currentColor; opacity: .75; margin-left: 1px;
}
.lang-menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 124px; margin: 0; padding: 6px;
  list-style: none;
  background: #fff; border-radius: 8px;
  box-shadow: 0 12px 30px rgba(17,36,67,.22);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
  z-index: 1100;
}
.lang-switch.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu li {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; font-size: 14px; color: var(--navy);
  border-radius: 6px; cursor: pointer;
  transition: background .2s;
}
.lang-menu li:hover { background: #f3f1ea; }
.lang-menu li.active { color: var(--gold-deep); font-weight: 600; }
.lang-menu .flag { font-size: 17px; line-height: 1; }

/* 移动端汉堡按钮 */
.nav-toggle { display: none; width: 34px; height: 28px; position: relative; margin-left: 16px; }
.nav-toggle span {
  position: absolute; left: 0; width: 100%; height: 2px;
  background: var(--gold); border-radius: 2px; transition: all .3s;
}
.nav-toggle span:nth-child(1) { top: 0; }
.nav-toggle span:nth-child(2) { top: 12px; }
.nav-toggle span:nth-child(3) { top: 24px; }
.nav-toggle.open span:nth-child(1) { top: 12px; transform: rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { top: 12px; transform: rotate(-45deg); }


/* ==========================================================
   板块7：咨询表单 + 页脚
   ========================================================== */
.contact-top { background: var(--gold-light2); padding: 80px 0 120px; }
.contact-top .section-title { font-family: var(--cn-font); font-size: 34px; }
.contact-bottom {
  background: #d1b994 url("../images/bg2.png") no-repeat bottom center / 100% auto;
  /* 底部 bg2 比例 454/1925≈23.6%，用同比例 padding 预留出图片条，使页脚位于图片上方、图片始终底部对齐且随屏宽等比缩放 */
  padding: 0 0 1.6%;
  position: relative;
  /* 关键：建立 BFC，防止卡片的负 margin 与父级 margin 塌陷（否则整个藏青背景会被一起上移，卡片看起来贴在交界处而非搭在白色背景上） */
  display: flow-root;
}
/* 表单卡片上移，骑跨浅色与深色交界（标题下方留白，不遮挡标题） */
.contact-card {
  width: 90%; max-width: 1160px; margin: -140px auto 0;
  background: #fff; border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.18);
  padding: 50px 56px 46px;
  position: relative; z-index: 3;
}
.form-row { display: flex; gap: 44px; }
.form-group { flex: 1; margin-bottom: 26px; }
.form-group label { display: block; font-size: 17px; font-weight: 700; color: var(--text2); margin-bottom: 12px; }
.form-group input[type="text"],
.form-group input[type="tel"] {
  width: 100%; height: 54px; padding: 0 18px;
  border: 1px solid #d9d9d9; border-radius: 8px;
  font-size: 15px; color: var(--text); outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.form-group input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(198,171,116,.18); }
.form-group input::placeholder { color: #b9bcc2; }

.check-row { display: flex; gap: 18px; flex-wrap: wrap; padding-left: 30px; }
.check-item { position: relative; cursor: pointer; }
.check-item input { position: absolute; opacity: 0; }
.check-item span {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 30px;
  border: 1px solid #d9d9d9; border-radius: 8px;
  font-size: 16px; color: var(--text2); background: #fff;
  transition: all .25s;
}
.check-item span::before {
  content: ""; width: 18px; height: 18px;
  border: 1.5px solid #c4c7cd; border-radius: 4px; background: #fff;
  transition: all .2s;
}
.check-item input:checked + span {
  background: var(--gold-light2); border-color: var(--gold); color: var(--gold); font-weight: 600;
}
.check-item input:checked + span::before {
  background: var(--gold); border-color: var(--gold);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  background-size: 12px; background-position: center; background-repeat: no-repeat;
}

.btn-submit {
  display: block; width: 100%; height: 58px;
  background: linear-gradient(90deg, #cfb791, #efe3c9, #cfb791);
  border-radius: 8px;
  color: var(--text2); font-size: 18px; font-weight: 700; letter-spacing: 4px;
  transition: filter .25s, transform .15s;
}
.btn-submit i { font-style: normal; letter-spacing: 0; display: inline-block; transition: transform .3s ease; }
.btn-submit:hover { filter: brightness(1.05); }
.btn-submit:hover i { transform: translateX(6px); }
.btn-submit:active { transform: scale(.995); }
.form-tip { margin-top: 14px; font-size: 14px; color: #c0392b; text-align: center; min-height: 20px; }
.form-tip.ok { color: #2e7d32; }

/* 页脚信息 */
.footer-info {
  display: flex; justify-content: space-between; align-items: flex-end;
  width: 90%; max-width: 1160px; margin: 46px auto 0;
  color: var(--text2); position: relative; z-index: 2;
}
.fi-hotline { font-size: 16px; }
.fi-hotline span { font-size: 20px; font-weight: 700; color: var(--text2);  }
.fi-addr { margin-top: 13px; --addr-indent: 84px; }
.fi-addr li { font-size: 13px; color: var(--text2); line-height: 2.1; }
.fi-addr li:first-child { color: var(--text2); }
/* “联系地址”标签固定宽度，其余地址左缩进与其文字对齐（用同一变量，避免 16px 标签与 13px 列表的 em 解析不一致导致错位）；字号与“咨询热线”标签一致（16px） */
.fi-addr .al { display: inline-block; width: var(--addr-indent); font-size: 16px; }
.fi-addr li:not(:first-child) { padding-left: var(--addr-indent); }
.fi-right { display: flex; gap: 26px; }
.qr-item { text-align: center; }
.qr-box {
  width: 128px; height: 128px; background: #e4e4e6; border-radius: 4px;
  margin-bottom: 8px;
}
.qr-item span { font-size: 13px; color:var(--text2); }

/* ---------- 版权 ---------- */
.copyright { background: #343434; padding: 10px 6px; }
.copyright p { text-align: center; color: #fff; font-size: 14px; letter-spacing: 1px; }


/* ==========================================================
   响应式：头部 / 板块7 / 页脚（与 style.css 的通用响应式分离维护）
   ========================================================== */
@media (max-width: 1200px) {
  .nav-item > a { padding: 30px 16px; font-size: 16px; }
}

@media (max-width: 992px) {
  /* 移动端导航（默认完全隐藏，防止溢出） */
  .nav-toggle { display: block; }
  .nav {
    position: fixed; top: 88px; left: 0; right: 0; bottom: 0;
    background: var(--gold);
    margin: 0; padding: 10px 6% 30px;
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .35s ease, visibility .35s;
  }
  .nav.open { transform: translateX(0); visibility: visible; }
  .nav-list { flex-direction: column; align-items: stretch; }
  .nav-item > a { padding: 16px 4px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 16px; }
  .sub-menu {
    position: static; min-width: 0;
    background: rgba(255,255,255,.06); border-top: none;
    box-shadow: none;
    transform: none; opacity: 1; visibility: hidden; display: none;
    transition: none;
  }
  /* sub-open 必须严格高于 :hover（两者特异性同为 0,3,0），否则触屏点击后「粘滞 :hover」会压过 sub-open 导致二级菜单无法展开 */
  .nav-item.has-sub.sub-open .sub-menu { opacity: 1; visibility: visible; display: block; transform: none; }
  /* 触屏修正：屏蔽桌面 :hover 展开规则，防止 translateX(-50%) 把二级菜单移出视野（点击空白、移开才显示的 bug） */
  .nav-item:hover .sub-menu {
    opacity: 1; visibility: hidden; display: none; transform: none;
  }
  .sub-menu li a { color: rgba(255,255,255,.8); text-align: left; padding: 12px 30px; }
  .sub-menu li a:hover { background: rgba(255,255,255,.08); color: #fff; }
  .btn-consult { margin: 0 0 0 auto; display: inline-block; }
}

@media (max-width: 640px) {
  .header-inner { height: 68px; }
  .nav { top: 68px; }
  .logo img { height: 42px; }
  .btn-consult { padding: 9px 18px; font-size: 14px; }
  .btn-lang { margin-left: 10px; padding: 5px 6px; font-size: 12px; }
  .lang-menu { min-width: 108px; }

  .contact-top { padding: 56px 0 0; }
  .contact-top .section-title { font-size: 40px; }
  .contact-card { margin-top: -70px; padding: 30px 22px; }
  .form-row { flex-direction: column; gap: 0; }
  .check-row { padding-left: 0; }
  .check-item span { padding: 10px 18px; font-size: 14px; }
  .footer-info { flex-direction: column; align-items: flex-start; gap: 28px; }
  .fi-addr li { font-size: 12px; }
  .fi-addr .al { font-size: 16px; }   /* 与“咨询热线”标签同字号 */
}

/* ======================= 微信二维码弹窗（通用） ======================= */
.wx-qr-pop {
  position: absolute;
  z-index: 9999;
  display: none;
  width: 184px;
  padding: 16px 16px 13px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(17,36,67,.22);
  text-align: center;
  animation: wxPop .18s ease;
}
@keyframes wxPop {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.wx-qr-pop .wx-qr-img {
  display: block;
  width: 150px; height: 150px;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 6px;
}
.wx-qr-pop .wx-qr-tip {
  display: block;
  margin-top: 11px;
  font-family: var(--cn-font);
  font-size: 13px; letter-spacing: .5px;
  color: var(--navy);
}
.wx-qr-pop .wx-qr-arrow {
  position: absolute; top: -7px; left: 50%;
  width: 14px; height: 14px;
  background: #fff;
  transform: translateX(-50%) rotate(45deg);
  border-radius: 3px 0 0 0;
  box-shadow: -3px -3px 6px rgba(17,36,67,.06);
}


/* ===== 返回頂部按鈕（首頁右下角，滾動超過一屏後顯示） ===== */
.back-top {
  position: fixed; right: 30px; bottom: 36px; z-index: 900;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--gold); color: #16294b;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: opacity .35s, visibility .35s, transform .35s, background .25s;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { background: var(--gold-light); }
.back-top svg { width: 20px; height: 20px; }

@media (max-width: 640px) {
  .back-top { right: 16px; bottom: 22px; width: 46px; height: 46px; }
  .back-top svg { width: 18px; height: 18px; }
}


