* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #f5f5f5;
}

/* ============ Navbar ============ */
#navbar {
  position: relative;
  z-index: 1000;
}

/* ---- Hero 容器 ---- */
.navbar-container {
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  height: 300px;
  background-image: url('../images/header_bg.png');
  background-size: cover;
  background-position: center;
  background-blend-mode: overlay;
}

/* ============ Hero 区域 ============ */
.navbar-hero {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 20px;
}

.hero-main {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

.navbar-logo img {
  height: 200px;
  width: auto;
  display: block;
}

/* 搜索框+按钮靠右 */
.navbar-hero .navbar-search {
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
}

.navbar-hero .search-input-expand {
  width: 220px;
  padding: 10px 16px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s;
  color: #333;
  background: rgba(255, 255, 255, 0.9);
}

.navbar-hero .search-input-expand:focus {
  border-color: #1a73e8;
}

/* Hero 搜索按钮 */
.navbar-hero .search-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
  flex-shrink: 0;
}

.navbar-hero .search-btn:hover {
  background: rgba(26, 115, 232, 0.1);
}

.navbar-hero .search-btn::before {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  border: 2.5px solid #555;
  border-radius: 50%;
  transition: border-color 0.2s;
}

.navbar-hero .search-btn::after {
  content: '';
  position: absolute;
  bottom: 9px;
  right: 8px;
  width: 2.5px;
  height: 9px;
  background: #555;
  transform: rotate(-45deg);
  transition: background 0.2s;
}

.navbar-hero .search-btn:hover::before { border-color: #1a73e8; }
.navbar-hero .search-btn:hover::after { background: #1a73e8; }

/* slogan 预留区 — 靠右 */
.hero-slogan {
  text-align: right;
  min-height: 24px;
}

/* ============ Bar 区域（菜单行） ============ */
.navbar-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  position: relative;
}

/* 小 logo — 已删除，不再使用 */
.navbar-logo-sm {
  display: none;
}

/* 搜索图标按钮 — 已删除，不再使用 */
.search-btn-icon {
  display: none;
}

/* ============ 搜索弹出层 ============ */
.search-overlay {
  position: fixed;
  z-index: 1001;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(10px);
  padding: 80px 30px 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  display: none;
}

.search-overlay.open {
  display: block;
}

.search-overlay .search-input-expand {
  width: 100%;
  padding: 14px 20px;
  font-size: 18px;
  border: 2px solid #ddd;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s;
  color: #333;
  background: #fff;
}

.search-overlay .search-input-expand:focus {
  border-color: #1a73e8;
}

.search-overlay .search-submit {
  display: none;
}

/* ============ Hamburger ============ */
.navbar-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: 8px;
  flex-shrink: 0;
}

.navbar-toggle .bar {
  width: 25px;
  height: 3px;
  background: #333;
  margin: 4px 0;
  transition: all 0.3s ease;
}

.navbar-toggle:hover .bar {
  background: #1a73e8;
}

/* ============ Sections ============ */
section {
  padding: 60px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

#home {
  padding: 0;
  overflow: hidden;
  display: block;
}

#services {
  background: #fff;
}

#about {
  background: #f8f9fa;
}

#doctors {
  background: #fff;
}

#contact {
  background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
  color: #fff;
}

section h1 {
  font-size: 48px;
  margin-bottom: 20px;
}

section p {
  font-size: 18px;
  opacity: 0.8;
}

/* ============ Carousel ============ */
.carousel-wrapper {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
  border-radius: 0 0 10px 10px;
}

.carousel-track {
  display: flex;
  height: 100%;
}

.carousel-item {
  min-width: 100%;
  height: 100%;
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-caption {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  padding: 0 20px;
}

.carousel-icon {
  font-size: 40px;
  margin-bottom: 12px;
  line-height: 1;
}

.carousel-caption h2 {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 2px;
}

.carousel-caption p {
  font-size: 16px;
  opacity: 0.95;
}

/* ============ 箭头按钮 ============ */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(4px);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.4);
}

.carousel-prev {
  left: 12px;
}

.carousel-next {
  right: 12px;
}

.carousel-prev::after {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  border-left: 3px solid #fff;
  border-bottom: 3px solid #fff;
  transform: rotate(45deg);
  margin-left: 4px;
}

.carousel-next::after {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  border-right: 3px solid #fff;
  border-top: 3px solid #fff;
  transform: rotate(45deg);
  margin-right: 4px;
}

/* ============ 指示点 ============ */
.carousel-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
  padding: 10px 16px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
}

.carousel-dot {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: all 0.3s ease;
  overflow: hidden;
}

.carousel-dot:hover {
  transform: scale(1.5);
  background: rgba(255, 255, 255, 0.7);
}

/* 激活的指示器 → 椭圆 + 进度条 */
.carousel-dot.active {
  width: 32px;
  height: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.3);
  transform: none;
}

.dot-progress {
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background: #fff;
  width: 0%;
}

.dot-progress.animate {
  animation: dotProgressAnim 3.5s linear forwards;
}

@keyframes dotProgressAnim {
  from { width: 0%; }
  to   { width: 100%; }
}

/* ============ Footer ============ */
#site-footer {
  background: #1a2332;
  color: #b0bec5;
  padding: 30px 20px 20px;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  gap: 40px;
}

.footer-left {
  flex: 1;
}

.footer-contact p {
  font-size: 13px;
  line-height: 1.8;
  color: #90a4ae;
}

.footer-contact a {
  color: #64b5f6;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-contact a:hover {
  color: #90caf9;
  text-decoration: underline;
}

.footer-copyright {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-copyright p {
  font-size: 12px;
  color: #546e7a;
}

.footer-right {
  flex-shrink: 0;
  display: flex;
  gap: 48px;
}

.footer-links-group h3 {
  color: #cfd8dc;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
  padding-left: 2px;
}

.footer-select {
  appearance: none;
  -webkit-appearance: none;
  width: 200px;
  padding: 10px 36px 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2390a4ae' d='M6 8L0 0h12z'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  color: #cfd8dc;
  font-size: 14px;
  cursor: pointer;
  outline: none;
  transition: border-color 0.3s;
}

.footer-select:hover,
.footer-select:focus {
  border-color: #64b5f6;
}

.footer-select option {
  background: #1a2332;
  color: #cfd8dc;
}

/* ============ 友情链接滚动栏目 ============ */
.friend-links-section {
  max-width: 95%;
  margin: 0 auto;
  padding: 0 20px 50px;
  overflow: hidden;
}

.friend-links-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
}

.friend-links-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #333;
  margin: 0;
}

.friend-links-track {
  width: 100%;
  overflow: hidden;
}

.friend-links-inner {
  display: flex;
  gap: 16px;
  animation: friendScroll 30s linear infinite;
  width: fit-content;
}

.friend-link-item {
  flex-shrink: 0;
  width: 225px;
  height: 100px;
  border-radius: 8px;
  opacity: 0.85;
  transition: opacity 0.3s;
}

.friend-link-item:hover {
  opacity: 1;
}

@keyframes friendScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
  /* 移动端搜索弹出层 */
  .search-overlay {
    padding: 70px 16px 16px;
  }

  .search-overlay .search-input-expand {
    font-size: 16px;
    padding: 12px 16px;
  }

  .navbar-toggle {
    display: flex;
  }

  .navbar-container {
    height: 70px;
    flex-direction: row;
    align-items: center;
    padding: 0 10px;
  }

  .navbar-hero {
    display: none !important;
  }

  .navbar-bar {
    flex: 1;
    justify-content: flex-start;
    padding: 0;
    gap: 0;
  }

  main {
    padding-top: 70px;
  }

  .carousel-caption h2 {
    font-size: 22px;
  }

  .carousel-icon {
    font-size: 32px;
  }

  .carousel-caption p {
    font-size: 14px;
  }

  .carousel-btn {
    width: 34px;
    height: 34px;
  }

  .carousel-wrapper {
    height: 200px;
  }

  .friend-link-item {
    width: 150px;
    height: 66px;
  }

  .friend-links-section {
    padding: 0 12px 30px;
  }

  .carousel-prev {
    left: 8px;
  }

  .carousel-next {
    right: 8px;
  }

  /* 页脚响应式 */
  .footer-container {
    flex-direction: column;
    gap: 40px;
  }

  .footer-right {
    flex-wrap: wrap;
    gap: 32px;
  }

  .footer-select {
    width: 100%;
    min-width: 0;
  }
}