/* ===== 西宁安合外科门诊部 - 全站统一样式 ===== */

:root {
  --c-primary: #0a3d5c;        /* 深海蓝 主色 */
  --c-primary-dark: #072a40;
  --c-primary-light: #14507a;
  --c-accent: #e8845e;          /* 柔和橙色 按钮 */
  --c-accent-dark: #d06d48;
  --c-gray-bg: #f5f7f9;         /* 浅灰背景 */
  --c-gray-line: #e3e8ec;       /* 分割线 */
  --c-text: #2b3a44;            /* 主文字 */
  --c-text-light: #6b7a84;      /* 次要文字 */
  --c-cream: #faf8f5;            /* 米白 */
  --c-white: #ffffff;
  --shadow-sm: 0 2px 8px rgba(7, 42, 64, 0.06);
  --shadow-md: 0 8px 28px rgba(7, 42, 64, 0.10);
  --shadow-lg: 0 18px 48px rgba(7, 42, 64, 0.14);
  --radius: 10px;
  --maxw: 1200px;
  --header-h: 76px;
  --transition: 0.35s cubic-bezier(0.25, 0.8, 0.35, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans CN", "Helvetica Neue", Arial, sans-serif;
  color: var(--c-text);
  background: var(--c-white);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  width: 92%;
  max-width: var(--maxw);
  margin: 0 auto;
}

/* ===== 顶部导航 ===== */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(10, 61, 92, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1000;
  box-shadow: 0 2px 18px rgba(7, 42, 64, 0.18);
}

.topbar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 4%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}

.brand-mark {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--c-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #fff; font-weight: 700;
  box-shadow: 0 4px 14px rgba(232, 132, 94, 0.4);
  flex-shrink: 0;
}

.brand-text { line-height: 1.2; }
.brand-title { font-size: 19px; font-weight: 700; letter-spacing: 1px; }
.brand-sub { font-size: 11px; opacity: 0.75; letter-spacing: 2px; }

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-menu a {
  color: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  padding: 10px 18px;
  border-radius: 6px;
  transition: var(--transition);
  position: relative;
}

.nav-menu a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.nav-menu a.active { color: #fff; }
.nav-menu a.active::after {
  content: "";
  position: absolute;
  left: 18px; right: 18px; bottom: 4px;
  height: 2px; background: var(--c-accent); border-radius: 2px;
}

.nav-cta {
  margin-left: 10px;
  background: var(--c-accent);
  color: #fff !important;
  padding: 10px 22px !important;
  border-radius: 30px;
  font-weight: 600;
}
.nav-cta:hover { background: var(--c-accent-dark) !important; }

/* 汉堡按钮 */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 8px;
}
.hamburger span {
  width: 26px; height: 2px; background: #fff; border-radius: 2px;
  transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== 通用区块 ===== */
section { padding: 80px 0; }
.section-head { text-align: center; margin-bottom: 54px; }
.eyebrow {
  display: inline-block;
  color: var(--c-accent);
  font-size: 13px; letter-spacing: 4px; font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-title {
  font-size: 34px; font-weight: 700; color: var(--c-primary-dark);
  letter-spacing: 1px;
}
.section-title b { color: var(--c-accent); }
.section-desc {
  color: var(--c-text-light);
  max-width: 640px; margin: 16px auto 0;
  font-size: 15px;
}
.divider {
  width: 56px; height: 3px; background: var(--c-accent);
  margin: 18px auto 0; border-radius: 3px;
}

.bg-gray { background: var(--c-gray-bg); }
.bg-cream { background: var(--c-cream); }

/* ===== 轮播 ===== */
.hero {
  margin-top: var(--header-h);
  position: relative;
  height: 580px;
  overflow: hidden;
  background: var(--c-primary-dark);
}
.slides { position: absolute; inset: 0; }
.slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
  background-size: cover; background-position: center;
}
.slide.active { opacity: 1; }
.slide::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(7,42,64,0.9) 0%, rgba(7,42,64,0.5) 40%, rgba(7,42,64,0.08) 100%);
}
.slide-content {
  position: relative; z-index: 2;
  height: 100%; display: flex; flex-direction: column; justify-content: flex-end;
  color: #fff;
  max-width: var(--maxw); margin: 0 auto; padding: 0 4% 56px;
}
.slide-eyebrow {
  color: var(--c-accent); font-size: 14px; letter-spacing: 4px;
  margin-bottom: 18px; font-weight: 600;
}
.slide-title {
  font-size: 48px; font-weight: 700; letter-spacing: 2px;
  margin-bottom: 18px; max-width: 620px; line-height: 1.3;
}
.slide-desc {
  font-size: 17px; opacity: 0.9; max-width: 540px; margin-bottom: 32px;
}
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }
.dots {
  position: absolute; bottom: 30px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 10px; z-index: 3;
}
.dots button {
  width: 12px; height: 12px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.4); cursor: pointer;
  transition: var(--transition);
}
.dots button.active { background: var(--c-accent); transform: scale(1.2); }

/* ===== 按钮 ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 30px; border-radius: 30px;
  font-size: 15px; font-weight: 600;
  transition: var(--transition);
  border: none; cursor: pointer;
}
.btn-primary { background: var(--c-accent); color: #fff; }
.btn-primary:hover { background: var(--c-accent-dark); transform: translateY(-2px); box-shadow: 0 8px 22px rgba(232,132,94,0.4); }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.6); }
.btn-outline:hover { background: #fff; color: var(--c-primary-dark); }
.btn-dark { background: var(--c-primary); color: #fff; }
.btn-dark:hover { background: var(--c-primary-dark); transform: translateY(-2px); }

/* ===== 数据统计条 ===== */
.stat-bar {
  background: var(--c-primary);
  color: #fff;
}
.stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px; text-align: center;
}
.stat-num { font-size: 40px; font-weight: 700; color: #fff; }
.stat-num span { color: var(--c-accent); }
.stat-label { font-size: 14px; opacity: 0.85; margin-top: 6px; letter-spacing: 1px; }

/* ===== 诊疗项目卡片 ===== */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.dept-card {
  background: #fff; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex; flex-direction: column;
}
.dept-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.dept-card .img-wrap { height: 200px; overflow: hidden; }
.dept-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.dept-card:hover img { transform: scale(1.06); }
.dept-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.dept-body h3 { font-size: 19px; color: var(--c-primary-dark); margin-bottom: 10px; }
.dept-body p { color: var(--c-text-light); font-size: 14px; flex: 1; }
.dept-link {
  margin-top: 16px; color: var(--c-accent); font-weight: 600; font-size: 14px;
  display: inline-flex; align-items: center; gap: 6px;
}
.dept-link:hover { gap: 10px; }

/* ===== 优势板块 ===== */
.adv-block {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 50px; align-items: center;
}
.adv-block.reverse { direction: rtl; }
.adv-block.reverse > * { direction: ltr; }
.adv-text h3 { font-size: 28px; color: var(--c-primary-dark); margin-bottom: 16px; }
.adv-text p { color: var(--c-text-light); margin-bottom: 14px; }
.adv-list { margin-top: 22px; }
.adv-list li {
  display: flex; gap: 14px; margin-bottom: 16px; align-items: flex-start;
}
.adv-list .ico {
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(232,132,94,0.12); color: var(--c-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; flex-shrink: 0;
}
.adv-list h4 { font-size: 16px; color: var(--c-primary-dark); margin-bottom: 2px; }
.adv-list span { font-size: 14px; color: var(--c-text-light); }
.adv-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.adv-img img { width: 100%; height: 420px; object-fit: cover; }

/* 图标格子优势 */
.feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.feature-item {
  background: #fff; padding: 38px 30px; border-radius: var(--radius);
  text-align: center; box-shadow: var(--shadow-sm);
  transition: var(--transition); border-top: 4px solid transparent;
}
.feature-item:hover { border-top-color: var(--c-accent); transform: translateY(-6px); box-shadow: var(--shadow-md); }
.feature-ico {
  width: 66px; height: 66px; margin: 0 auto 20px;
  border-radius: 50%; background: var(--c-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: #fff;
}
.feature-item h3 { font-size: 19px; color: var(--c-primary-dark); margin-bottom: 10px; }
.feature-item p { color: var(--c-text-light); font-size: 14px; }

/* ===== 关于我们 ===== */
.about-grid {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 50px; align-items: center;
}
.about-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.about-img img { width: 100%; height: 460px; object-fit: cover; }
.about-text h2 { font-size: 30px; color: var(--c-primary-dark); margin-bottom: 18px; }
.about-text p { color: var(--c-text-light); margin-bottom: 14px; }
.about-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.about-tags span {
  background: var(--c-gray-bg); color: var(--c-primary-dark);
  padding: 8px 18px; border-radius: 30px; font-size: 13px; font-weight: 600;
}

/* ===== 联系咨询大图 CTA ===== */
.cta-band {
  position: relative;
  background: linear-gradient(120deg, var(--c-primary-dark), var(--c-primary));
  color: #fff; text-align: center;
}
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background: url('../images/image2.jpeg') center/cover;
  opacity: 0.18;
}
.cta-band .container { position: relative; z-index: 2; }
.cta-band h2 { font-size: 32px; margin-bottom: 12px; }
.cta-band p { opacity: 0.9; margin-bottom: 26px; }
.cta-phone { font-size: 40px; font-weight: 700; color: #fff; letter-spacing: 2px; }
.cta-phone span { color: var(--c-accent); }

/* ===== 联系我们页 ===== */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px;
}
.info-card {
  background: #fff; padding: 36px; border-radius: var(--radius);
  box-shadow: var(--shadow-sm); margin-bottom: 24px;
}
.info-card h3 { font-size: 20px; color: var(--c-primary-dark); margin-bottom: 18px; display: flex; align-items: center; gap: 10px; }
.info-item { display: flex; gap: 14px; margin-bottom: 18px; align-items: flex-start; }
.info-item .ico {
  width: 42px; height: 42px; border-radius: 8px; background: var(--c-primary);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.info-item h4 { font-size: 15px; color: var(--c-primary-dark); margin-bottom: 2px; }
.info-item p { color: var(--c-text-light); font-size: 14px; }
.map-box { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); min-height: 420px; }
.map-box img { width: 100%; height: 100%; object-fit: cover; }

/* 表单 */
.form-card { background: #fff; padding: 38px; border-radius: var(--radius); box-shadow: var(--shadow-md); }
.form-row { margin-bottom: 20px; }
.form-row label { display: block; font-size: 14px; color: var(--c-primary-dark); margin-bottom: 8px; font-weight: 600; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 12px 16px; border: 1.5px solid var(--c-gray-line);
  border-radius: 8px; font-size: 14px; font-family: inherit; color: var(--c-text);
  transition: var(--transition); background: var(--c-gray-bg);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--c-accent); background: #fff;
}
.form-row textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: 12px; color: var(--c-text-light); margin-top: 8px; }
.form-feedback { margin-top: 16px; padding: 14px 18px; border-radius: 8px; font-size: 14px; display: none; }
.form-feedback.show { display: block; background: rgba(232,132,94,0.12); color: var(--c-accent-dark); }

/* ===== 页脚 ===== */
.footer {
  background: var(--c-primary-dark); color: rgba(255,255,255,0.8);
  padding: 60px 0 0;
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px;
  padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .brand { margin-bottom: 16px; }
.footer-brand p { font-size: 14px; line-height: 1.8; opacity: 0.75; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 18px; }
.footer-col li { margin-bottom: 10px; font-size: 14px; }
.footer-col li a { transition: var(--transition); opacity: 0.75; }
.footer-col li a:hover { opacity: 1; color: var(--c-accent); padding-left: 4px; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; font-size: 14px; }
.footer-contact .ico { color: var(--c-accent); flex-shrink: 0; margin-top: 3px; }
.footer-bottom {
  text-align: center; padding: 22px 0; font-size: 13px; opacity: 0.6;
}

/* ===== 页面横幅 ===== */
.page-banner {
  margin-top: var(--header-h);
  height: 320px;
  background-size: cover; background-position: center;
  position: relative; display: flex; align-items: center; justify-content: center;
  text-align: center; color: #fff;
}
.page-banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(7,42,64,0.85), rgba(7,42,64,0.55));
}
.page-banner .container { position: relative; z-index: 2; }
.page-banner h1 { font-size: 40px; font-weight: 700; letter-spacing: 2px; }
.page-banner p { opacity: 0.9; margin-top: 10px; letter-spacing: 1px; }
.breadcrumb { font-size: 13px; opacity: 0.7; margin-top: 16px; }
.breadcrumb a:hover { color: var(--c-accent); }

/* ===== 诊疗详情块 ===== */
.dept-detail {
  display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center;
  margin-bottom: 70px;
}
.dept-detail:nth-child(even) .dept-detail-img { order: 2; }
.dept-detail-img { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.dept-detail-img img { width: 100%; height: 340px; object-fit: cover; }
.dept-detail-text h3 { font-size: 26px; color: var(--c-primary-dark); margin-bottom: 16px; }
.dept-detail-text .sub { color: var(--c-accent); font-size: 13px; letter-spacing: 2px; margin-bottom: 8px; font-weight: 600; }
.dept-detail-text p { color: var(--c-text-light); margin-bottom: 14px; }
.dept-detail-text ul.check-list li {
  padding-left: 28px; position: relative; margin-bottom: 10px; color: var(--c-text); font-size: 14px;
}
.dept-detail-text ul.check-list li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--c-accent); font-weight: 700;
}

/* 价格公示表 */
.price-table {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.price-row {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr;
  padding: 18px 24px; border-bottom: 1px solid var(--c-gray-line); align-items: center;
}
.price-row.head { background: var(--c-primary); color: #fff; font-weight: 600; font-size: 14px; }
.price-row:last-child { border-bottom: none; }
.price-row .price { color: var(--c-accent); font-weight: 700; font-size: 17px; }
.price-row .note { color: var(--c-text-light); font-size: 13px; }

/* ===== 滚动显现动画 ===== */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== 回到顶部 ===== */
.back-top {
  position: fixed; right: 24px; bottom: 24px;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--c-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; cursor: pointer; border: none;
  opacity: 0; pointer-events: none; transition: var(--transition);
  z-index: 900; box-shadow: var(--shadow-md);
}
.back-top.show { opacity: 1; pointer-events: auto; }
.back-top:hover { background: var(--c-accent); transform: translateY(-4px); }

/* ===== 浮动电话 ===== */
.float-call {
  position: fixed; right: 24px; bottom: 84px;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--c-accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; text-decoration: none;
  z-index: 900; box-shadow: 0 8px 22px rgba(232,132,94,0.5);
  transition: var(--transition);
}
.float-call:hover { transform: scale(1.08); }

/* ===== 响应式 ===== */
@media (max-width: 992px) {
  .grid-3, .grid-4, .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
  .adv-block, .about-grid, .contact-grid, .dept-detail { grid-template-columns: 1fr; }
  .adv-block.reverse { direction: ltr; }
  .dept-detail:nth-child(even) .dept-detail-img { order: 0; }
  .adv-img img, .about-img img { height: 320px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .slide-title { font-size: 38px; }
  .section-title { font-size: 28px; }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }
  .nav-menu {
    position: fixed; top: var(--header-h); right: 0;
    width: 75%; max-width: 320px; height: calc(100vh - var(--header-h));
    background: var(--c-primary-dark);
    flex-direction: column; align-items: stretch;
    padding: 20px; gap: 6px;
    transform: translateX(100%); transition: transform 0.4s ease;
    box-shadow: -8px 0 30px rgba(0,0,0,0.3);
  }
  .nav-menu.open { transform: translateX(0); }
  .nav-menu a { padding: 14px 18px; font-size: 16px; border-radius: 8px; }
  .nav-menu a.active::after { display: none; }
  .nav-menu a.active { background: rgba(232,132,94,0.2); }
  .nav-cta { margin: 8px 0 0; text-align: center; }
  .hamburger { display: flex; }
  .brand-title { font-size: 16px; }
  .brand-sub { font-size: 10px; }
  .brand-mark { width: 38px; height: 38px; font-size: 18px; }

  section { padding: 56px 0; }
  .hero { height: 480px; }
  .slide-title { font-size: 30px; }
  .slide-desc { font-size: 15px; }
  .page-banner { height: 240px; }
  .page-banner h1 { font-size: 28px; }
  .grid-3, .grid-4, .feature-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 30px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .cta-phone { font-size: 30px; }
  .cta-band h2 { font-size: 24px; }
  .section-title { font-size: 24px; }
  .container { width: 94%; }
  .form-card, .info-card { padding: 26px 20px; }
}

@media (max-width: 480px) {
  .slide-title { font-size: 24px; }
  .hero-btns { flex-direction: column; }
  .btn { width: 100%; justify-content: center; }
  .stat-num { font-size: 32px; }
}

/* ===== 图标占位块(替代无法加载的在线图) ===== */
.dept-ico-block { height:200px; background:linear-gradient(135deg,var(--c-primary),var(--c-primary-light)); display:flex;align-items:center;justify-content:center; }
.dept-ico-block span { font-size:56px; color:rgba(255,255,255,0.92); font-weight:300; }
.dept-ico-block svg { width:58px; height:58px; }
.detail-ico-inner svg { width:90px; height:90px; }
.detail-ico-inner { width:100%; height:340px; background:linear-gradient(135deg,var(--c-primary),var(--c-primary-light)); display:flex;align-items:center;justify-content:center; }
.detail-ico-inner span { font-size:88px; color:rgba(255,255,255,0.92); font-weight:300; }