/* Desktop Logo Row - 减少上方空白 */
.logo-row {
  background: rgba(255, 255, 255, 0.95);
  padding: 32px 0 36px 0;
  width: 100%;
  order: 1;
  transition: padding 0.3s ease; /* 添加过渡动画 */
}

/* 收缩状态的logo行 */
.rd-navbar-wrap.compact .logo-row {
  padding: 15px 0 20px 0; /* 收缩后的padding */
}

/* 修改logo容器为左对齐 */
.logo-container {
  text-align: left;
}

.main-logo {
  height: 60px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  transition: height 0.3s ease; /* 添加过渡动画 */
}

/* 收缩状态的logo */
.rd-navbar-wrap.compact .main-logo {
  height: 45px; /* 收缩后的logo高度 */
}

/* Navigation Row */
.nav-row {
  background: rgba(255, 255, 255, 0.9);
  width: 100%;
  order: 2;
  transition: padding 0.3s ease; /* 添加过渡动画 */
}

/* 收缩状态的导航行 */
.rd-navbar-wrap.compact .nav-row {
  padding: 8px 0 15px 0; /* 收缩后的padding */
}

.rd-navbar-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rd-navbar-nav li a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  font-size: 20px;
  padding: 10px 15px;
  transition: all 0.3s ease;
}

/* 收缩状态的导航链接 */
.rd-navbar-wrap.compact .rd-navbar-nav li a {
  padding: 8px 12px; /* 收缩后的padding */
  font-size: 18px; /* 收缩后的字体大小 */
}

.rd-navbar-nav li a:hover,
.rd-navbar-nav li.active a {
  color: #28a745;
}

/* 修复导航栏固定定位 */
.rd-navbar-wrap {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease; /* 添加整体过渡动画 */
}

.rd-navbar {
  position: relative;
}

/* 为页面内容添加顶部边距，避免被固定导航栏遮挡 */
.page {
  padding-top: 200px;
  transition: padding-top 0.3s ease; /* 添加过渡动画 */
}

/* 收缩状态的页面顶部边距 */
.rd-navbar-wrap.compact ~ .page-content {
  padding-top: 140px; /* 收缩后的页面顶部边距 */
}

/* Mobile Header - 默认隐藏，只在移动端显示 */
.mobile-header {
  display: none !important;
}

/* Navbar Toggle - 默认隐藏 */
.rd-navbar-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}

.toggle-icon {
  display: block;
  width: 20px;
  height: 2px;
  background: #333;
  position: relative;
}

.toggle-icon::before,
.toggle-icon::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 2px;
  background: #333;
  transition: all 0.3s ease;
}

.toggle-icon::before {
  top: -6px;
}

.toggle-icon::after {
  top: 6px;
}

/* Mobile Logo - 默认隐藏 */
.mobile-logo-container {
  display: none;
}

.mobile-logo {
  height: 28px;
  width: auto;
  max-width: 320px;
  object-fit: contain;
  transition: height 0.3s ease;
}

/* 收缩状态的移动端logo */
.rd-navbar-wrap.compact .mobile-logo {
  height: 24px;
}

/* Download Button - 默认隐藏 */
.download-btn-container {
  display: none;
}

.download-btn {
  height: 38px;
  display: inline-block;
  padding: 6px 10px;
  background-color: #28a745;
  color: white;
  border-radius: 4px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  transition: background-color 0.3s ease;
  white-space: nowrap;
  min-width: 60px;
  text-align: center;
}

.download-btn:hover {
  background-color: #218838;
  color: white;
}

/* Responsive Design - 默认显示桌面版 */
.desktop-only {
  display: block !important;
}

.mobile-only {
  display: none !important;
}

/* Mobile Styles - 只在768px以下生效 */
@media screen and (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }

  .mobile-only {
    display: block !important;
  }

  .mobile-header {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.95);
    width: 100%;
    min-height: 80px;
    box-sizing: border-box;
    position: relative;
    transition: all 0.3s ease;
  }

  /* 收缩状态的移动端导航栏 */
  .rd-navbar-wrap.compact .mobile-header {
    min-height: 60px;
    padding: 3px 10px;
  }

  .rd-navbar-toggle {
    display: flex !important;
    order: 1;
    flex: 0 0 40px;
  }

  .mobile-logo-container {
    display: flex !important;
    order: 2;
    flex: 2;
    justify-content: center;
    align-items: center;
    margin: 0 8px;
    min-width: 0;
  }

  .download-btn-container {
    display: block !important;
    order: 3;
    flex: 1;
    text-align: right;
  }

  .mobile-logo {
    height: 70px;
    width: auto;
    max-width: 300px;
    object-fit: contain;
  }

  /* 收缩状态的移动端logo */
  .rd-navbar-wrap.compact .mobile-logo {
    height: 50px;
    max-width: 250px;
  }

  .download-btn {
    display: inline-block;
    padding: 8px 12px;
    background-color: #28a745;
    color: white;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    white-space: nowrap;
    width: 100%;
    max-width: 80px;
    text-align: center;
    box-sizing: border-box;
  }

  .nav-row {
    display: none;
  }

  .rd-navbar-nav-wrap.active .nav-row {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
  }

  .rd-navbar-nav {
    flex-direction: column;
    gap: 0;
    background: white;
  }

  .rd-navbar-nav li {
    width: 100%;
    border-bottom: 1px solid #eee;
  }

  .rd-navbar-nav li a {
    display: block;
    padding: 15px 20px;
    text-align: center;
  }

  .rd-navbar-nav li:last-child {
    border-bottom: none;
  }

  .page {
    padding-top: 100px;
  }
}

/* 更小屏幕的优化 */
@media screen and (max-width: 480px) {
  .mobile-header {
    padding: 4px 8px;
    min-height: 70px;
  }

  .rd-navbar-wrap.compact .mobile-header {
    min-height: 55px;
    padding: 2px 6px;
  }

  .mobile-logo {
    height: 62px;
    max-width: 300px;
    margin-left: 40px;
  }

  .rd-navbar-wrap.compact .mobile-logo {
    height: 45px;
    max-width: 200px;
  }

  .download-btn {
    padding: 6px 10px;
    font-size: 12px;
    max-width: 70px;
  }

  .mobile-logo-container {
    margin: 0 6px;
  }

  .rd-navbar-toggle {
    width: 35px;
    height: 35px;
    padding: 6px;
  }

  .toggle-icon {
    width: 18px;
  }

  .toggle-icon::before,
  .toggle-icon::after {
    width: 18px;
  }

  .page {
    padding-top: 90px;
  }
}

/* 超小屏幕优化 */
@media screen and (max-width: 360px) {
  .mobile-header {
    min-height: 65px;
    padding: 3px 4px;
  }

  .rd-navbar-wrap.compact .mobile-header {
    min-height: 50px;
    padding: 2px 3px;
  }

  .mobile-logo {
    height: 58px;
    max-width: 200px;
  }

  .rd-navbar-wrap.compact .mobile-logo {
    height: 42px;
    max-width: 180px;
  }

  .download-btn {
    font-size: 11px;
    padding: 5px 8px;
    max-width: 60px;
  }

  .mobile-logo-container {
    margin: 0 4px;
  }

  .page {
    padding-top: 85px;
  }
}

/* Remove old logo styles that conflict */
.rd-navbar-brand {
  display: none !important;
}

.rd-navbar-panel {
  height: auto !important;
  min-height: auto !important;
}

/* 锚点定位偏移修正 */
section[id] {
  scroll-margin-top: 200px; /* 默认偏移 */
}

/* 收缩状态的锚点偏移 */
.rd-navbar-wrap.compact ~ * section[id] {
  scroll-margin-top: 140px; /* 收缩后的偏移 */
}

@media screen and (max-width: 768px) {
  section[id] {
    scroll-margin-top: 100px;
  }

  .rd-navbar-wrap.compact ~ * section[id] {
    scroll-margin-top: 80px;
  }
}

@media screen and (max-width: 480px) {
  section[id] {
    scroll-margin-top: 90px;
  }

  .rd-navbar-wrap.compact ~ * section[id] {
    scroll-margin-top: 70px;
  }
}

@media screen and (max-width: 360px) {
  section[id] {
    scroll-margin-top: 85px;
  }

  .rd-navbar-wrap.compact ~ * section[id] {
    scroll-margin-top: 65px;
  }
}

/* 轮播图容器样式 - 使用更具体的选择器 */
.person-carousel-container {
  width: 100%;
  position: relative;
  height: 315px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* 小图区域样式 - 使用更具体的选择器 */
.person-carousel-thumbs {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 70px;
  height: auto;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
}

/* 单个缩略图样式 - 使用更具体的选择器 */
.person-carousel-thumbs .thumb {
  width: 70px;
  height: 70px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.8;
  transition: all 0.3s ease;
  border: none;
  margin-bottom: 5px;
  position: relative;
}

.person-carousel-thumbs .thumb:hover {
  opacity: 1;
}

.person-carousel-thumbs .thumb.active {
  opacity: 1;
  border: 2px solid #fff;
  box-shadow: 0 0 0 3px #e83e8c;
}

.person-carousel-thumbs .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 大图区域样式 */
.carousel-slides {
  width: 100%;
  height: 100%;
  position: relative;
}

/* 单个幻灯片样式 - 修改过渡时间 */
.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

/* 活动幻灯片样式 */
.carousel-slide.active {
  opacity: 1;
  z-index: 1;
}

/* 主图片样式 */
.main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 35% center;
}

/* 响应式调整 - 修改这部分以确保在手机上缩略图保持在侧面 */
@media screen and (max-width: 768px) {
  .person-carousel-container {
    height: 250px;
  }

  .person-carousel-thumbs {
    flex-direction: column;
    width: 50px;
    height: auto;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
  }

  .person-carousel-thumbs .thumb {
    width: 50px;
    height: 50px;
    margin-bottom: 5px;
    margin-right: 0;
  }
}

@media screen and (max-width: 480px) {
  .person-carousel-container {
    height: 200px;
  }

  .person-carousel-thumbs .thumb {
    width: 40px;
    height: 40px;
    margin-bottom: 3px;
  }

  .person-carousel-thumbs {
    width: 40px;
    left: 5px;
  }
}

/* 包裹咨询表单的容器 */
.consultation-container {
  width: 100%;
  padding: 20px 520px;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

/* 标题样式 */
h1 {
  margin-bottom: 20px;
  font-size: 24px;
  color: #333;
}

/* 每个表单项的样式 */
.form-item {
  margin-bottom: 15px;
  text-align: left;
}

/* 标签样式 */
.form-item label {
  display: block;
  font-size: 16px;
  margin-bottom: 5px;
  color: #555;
}

/* select 样式 */
select {
  width: 100%;
  padding: 8px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

/* 按钮样式 */
.submit-btn {
  width: 36%;
  height: 60px;
  padding: 10px;
  font-size: 15px;
  background-color: #42b773;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.submit-btn:hover {
  background-color: #45a049;
}

/* 弹窗的样式 */
.modal {
  display: none;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
}

/* 弹窗内容样式 */
.modal-content {
  background-color: #fff;
  margin: 15% auto;
  padding: 40px;
  border: 1px solid #888;
  width: 80%;
  max-width: 500px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  text-align: center;
  letter-spacing: 1px;
  position: relative;
  font-size: 16px;
}

/* 关闭按钮 */
.close {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
}

/* 核心业务图标样式 */
.service-icon {
  width: 70px;
  height: 70px;
  margin-bottom: 15px;
}

.rd-navbar-outer {
  width: 100%;
}

.rd-navbar-inner {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
}

/* 滚动时导航栏效果 */
.rd-navbar-wrap.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

/* 确保导航栏始终可见 */
.rd-navbar-wrap {
  transition: all 0.3s ease;
}
