﻿/* ============================================================
   layout.css — 全站共用 header / footer 样式
   所有页面均需引入此文件
   ============================================================ */

/* 顶部整体区域 */
.site-header {
  position: relative;
  z-index: 10;
  background: #fff;
}

/* logo 与搜索框所在白色区域 */
.header-main {
  height: 110px;
  background: #fff;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 110px;
}

/* logo 区域 */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  display: block;
  width: 750px;
  height: 110px;
  object-fit: contain;
}

/* logo 图标：无原始图片时用 CSS 模拟蓝色医院标识 */
.logo-icon {
  position: relative;
  display: block;
  width: 42px;
  height: 42px;
  transform: rotate(-35deg);
}

.logo-icon::before,
.logo-icon::after,
.logo-icon i::before,
.logo-icon i::after {
  position: absolute;
  content: "";
  border: 5px solid #1669bd;
  border-radius: 18px;
}

.logo-icon::before {
  top: 2px;
  left: 9px;
  width: 20px;
  height: 14px;
}

.logo-icon::after {
  right: 2px;
  top: 9px;
  width: 14px;
  height: 20px;
}

.logo-icon i::before {
  right: 9px;
  bottom: 2px;
  width: 20px;
  height: 14px;
}

.logo-icon i::after {
  left: 2px;
  bottom: 9px;
  width: 14px;
  height: 20px;
}

.logo-text strong {
  display: block;
  color: #1268be;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 1px;
}

.logo-text em {
  display: block;
  margin-top: 3px;
  color: #1268be;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: .6px;
}

/* 搜索框区域 */
.search-box {
  display: flex;
  align-items: center;
  width: 416px;
  height: 45px;
  overflow: hidden;
  border: 1px solid #8eaadc;
  border-radius: 23px;
  background: #fff;
}

.search-icon {
  position: relative;
  width: 40px;
  height: 100%;
  flex: none;
}

.search-icon::before {
  position: absolute;
  left: 18px;
  top: 13px;
  width: 12px;
  height: 12px;
  content: "";
  border: 2px solid #9aa3ad;
  border-radius: 50%;
}

.search-icon::after {
  position: absolute;
  left: 31px;
  top: 27px;
  width: 9px;
  height: 2px;
  content: "";
  background: #9aa3ad;
  transform: rotate(45deg);
  transform-origin: left center;
}

.search-box input[type="text"] {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  color: #666;
  font-size: 15px;
}

.search-box input[type="hidden"] {
  display: none;
}

.search-box input[type="text"]::placeholder {
  color: #a5a5a5;
}

.search-box button,
.search-box input[type="submit"] {
  flex: none;
  width: 78px;
  height: 37px;
  margin-right: 4px;
  padding: 0;
  border: 0;
  border-radius: 0 19px 19px 0;
  color: #fff;
  font-size: 16px;
  line-height: 37px;
  text-align: center;
  background: var(--primary-blue);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.search-box button:hover,
.search-box input[type="submit"]:hover {
  background: #003f86;
}

/* 移动端菜单按钮，PC 默认隐藏 */
.menu-btn {
  display: none;
  border: 0;
  color: var(--primary-blue);
  font-size: 28px;
  background: transparent;
  cursor: pointer;
}

/* 蓝色主导航栏 */
.main-nav {
  height: 60px;
  background: var(--primary-blue);
  position: relative;
  z-index: 20;
}

.nav-inner {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  width: 1500px;
  max-width: calc(100% - 40px);
  height: 60px;
}

.nav-inner > a,
.nav-item > a {
  display: flex;
  height: 60px;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
}

.nav-inner > a.active,
.nav-inner > a:hover,
.nav-item:hover > a {
  color: var(--primary-blue);
  background: #fff;
}

.nav-item {
  position: relative;
}

.nav-dropdown {
  position: absolute;
  top: 60px;
  left: 50%;
  z-index: 30;
  display: none;
  box-sizing: border-box;
  width: max-content;
  min-width: 100%;
  max-width: 200px;
  padding: 14px 0 16px;
  background: rgba(27, 89, 160, .82);
  transform: translateX(-50%);
}

.nav-dropdown::before {
  position: absolute;
  top: -10px;
  left: 50%;
  width: 0;
  height: 0;
  content: "";
  border-right: 10px solid transparent;
  border-bottom: 10px solid rgba(27, 89, 160, .82);
  border-left: 10px solid transparent;
  transform: translateX(-50%);
}

.nav-item:hover .nav-dropdown {
  display: block;
}

/* 右侧栏目下拉避免超出视口 */
.nav-item:nth-last-child(-n + 2) .nav-dropdown {
  left: auto;
  right: 0;
  transform: none;
}

.nav-item:nth-last-child(-n + 2) .nav-dropdown::before {
  left: auto;
  right: 28px;
  transform: none;
}

.nav-dropdown a {
  display: flex;
  height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  color: #fff;
  font-size: 16px;
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
}

.nav-dropdown a:hover,
.nav-dropdown a.current {
  color: #fff;
  background: rgba(255, 255, 255, .12);
}

/* ============================================================
   Footer
   ============================================================ */

/* ============================================================
   footer — 三栏：Logo / 联系我们 / 关注我们
   ============================================================ */

.site-footer {
  position: relative;
  margin-top: 100px;
  background: #f5f7fa;
}

/* 顶部弧形拼接：向上拱起与上方内容衔接 */
.footer-curve {
  position: absolute;
  left: 0;
  right: 0;
  top: -70px;
  height: 71px;
  overflow: hidden;
  pointer-events: none;
  line-height: 0;
}

.footer-curve svg {
  display: block;
  width: 100%;
  height: 100%;
}

.footer-curve path {
  fill: #f5f7fa;
}

.footer-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr;
  gap: 48px;
  align-items: start;
  padding: 40px 0 56px;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}

.footer-logo img {
  display: block;
  width: auto;
  max-width: 360px;
  height: auto;
  max-height: 85px;
  object-fit: contain;
}

.footer-col-title {
  margin: 0 0 28px;
  color: var(--primary-blue);
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 1px;
}

.footer-contact-list p {
  margin: 0 0 14px;
  color: #555;
  font-size: 15px;
  line-height: 1.7;
}

.footer-contact-list p:last-child {
  margin-bottom: 0;
}

.footer-qrs {
  display: flex;
  gap: 28px;
}

.footer-qr-item {
  text-align: center;
}

.qr-box {
  display: block;
  width: 100px;
  height: 100px;
  padding: 6px;
  background: #fff;
  border: 0;
  border-radius: 6px;
  box-shadow: 0 2px 10px rgba(0, 54, 112, .08);
  object-fit: cover;
}

.footer-qr-item p {
  margin: 12px 0 0;
  color: #777;
  font-size: 13px;
  line-height: 1.3;
}

.footer-copy {
  padding: 22px 0 28px;
  text-align: center;
  border-top: 1px solid #e6ebf0;
}

.footer-copy p {
  margin: 0 0 6px;
  color: #999;
  font-size: 13px;
  line-height: 1.6;
}

.footer-copy p:last-child {
  margin-bottom: 0;
}

.footer-copy a {
  color: #999;
}

.footer-copy a:hover {
  color: var(--primary-blue);
}

/* ============================================================
   响应式 — footer
   ============================================================ */
@media (max-width: 1100px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
    gap: 40px 32px;
    padding: 56px 0 40px;
  }

  .footer-logo {
    grid-column: 1 / -1;
  }
}

@media (max-width: 700px) {
  .site-footer {
    margin-top: 72px;
  }

  .footer-curve {
    top: -48px;
    height: 49px;
  }

  .footer-main {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 24px 0 32px;
  }

  .footer-logo {
    grid-column: auto;
  }

  .footer-logo img {
    max-width: 280px;
    max-height: 56px;
  }

  .footer-qrs {
    gap: 16px;
  }

  .qr-box {
    width: 88px;
    height: 88px;
  }
}

/* ============================================================
   右侧快捷联系浮层
   ============================================================ */

.site-float-contact {
  position: fixed;
  right: 34px;
  bottom: 112px;
  z-index: 9000;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

.site-float-contact__panel {
  position: absolute;
  right: 88px;
  width: 178px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(12px);
  transition: opacity 0.18s ease, visibility 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

.site-float-contact__panel--phone {
  top: 10px;
}

.site-float-contact__panel--qr {
  top: 66px;
}

.site-float-contact:has(.site-float-contact__item:nth-child(1):hover) .site-float-contact__panel--phone,
.site-float-contact:has(.site-float-contact__item:nth-child(1):focus-within) .site-float-contact__panel--phone,
.site-float-contact.is-phone-open .site-float-contact__panel--phone,
.site-float-contact:has(.site-float-contact__item:nth-child(2):hover) .site-float-contact__panel--qr,
.site-float-contact:has(.site-float-contact__item:nth-child(2):focus-within) .site-float-contact__panel--qr,
.site-float-contact.is-qr-open .site-float-contact__panel--qr {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

.site-float-contact__phone {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 5px;
  background: #00499a;
  color: #fff;
  font-size: 17px;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 73, 154, 0.18);
}

.site-float-contact__phone::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 8px solid #00499a;
  transform: translateY(-50%);
}

.site-float-contact__phone:hover {
  text-decoration: none;
}

.site-float-contact__qr {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto;
  padding: 9px;
  border: 1px solid #e5e8ed;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(30, 45, 70, 0.12);
}

.site-float-contact__qr::after {
  content: "";
  position: absolute;
  right: -8px;
  top: 50%;
  width: 0;
  height: 0;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  border-left: 8px solid #fff;
  transform: translateY(-50%);
}

.site-float-contact__qr img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site-float-contact__actions {
  display: grid;
  gap: 7px;
}

.site-float-contact__actions a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: 78px;
  border: 1px solid #edf0f3;
  border-radius: 8px;
  background: #fff;
  color: #00499a;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(30, 45, 70, 0.12);
  transition: color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.site-float-contact__actions a:hover,
.site-float-contact__actions a:focus-visible {
  color: #12c8c8;
  border-color: rgba(0, 73, 154, 0.22);
  box-shadow: 0 8px 22px rgba(30, 45, 70, 0.18);
  text-decoration: none;
  transform: translateX(-2px);
  outline: none;
}

.site-float-contact__actions img {
  width: 28px;
  height: 28px;
  margin-bottom: 7px;
  object-fit: contain;
}

.site-float-contact__actions span {
  display: block;
}
