/* 解决Vue插值闪烁 - 修正选择器错误 */
[v-cloak] {
  display: none;
}

* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  font-family: 'Microsoft YaHei', 'PingFang SC', Helvetica, Arial, sans-serif;
  line-height: 1.6;
}

/* ========== 导航栏样式 ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(160, 50, 45, 0.96);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: background 0.4s ease, box-shadow 0.4s ease;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
}

/* 首页导航栏初始透明，使用 fixed 定位 */
.navbar.home-transparent {
  position: fixed;
  background: transparent;
  box-shadow: none;
}

/* 首页导航栏滚动后显示背景 */
.navbar.home-transparent.scrolled {
  background: rgba(160, 50, 45, 0.96) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* 其他页面使用 sticky 定位，始终保持背景颜色 */
.navbar.nav-sticky {
  position: sticky;
  background: rgba(160, 50, 45, 0.96);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-img {
  height: 55px;
  width: auto;
  transition: transform 0.3s;
}

.logo-img:hover {
  transform: rotate(-5deg) scale(1.05);
}

.logo-name-img {
  /* height: 32px; */
  height: 50px;
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 14px;
  transition: all 0.3s ease;
  flex-wrap: nowrap;
  justify-content: flex-end;
  flex-shrink: 0;
}

.nav-item {
  position: relative;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  padding: 6px 4px;
  white-space: nowrap;
  transition: color 0.3s, transform 0.2s;
}

.nav-item:hover {
  color: #ffe5b4;
  transform: translateY(-1px);
}

.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(255, 250, 245, 0.98);
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  min-width: 140px;
  display: none;
  flex-direction: column;
  padding: 4px 0;
  z-index: 1001;
  animation: fadeInUp 0.25s ease;
}

.nav-item:hover .submenu {
  display: flex;
}

.submenu a {
  color: #4a3020;
  padding: 8px 14px;
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}

.submenu a:hover {
  background: #f5e1d3;
  color: #a0322d;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 26px;
  cursor: pointer;
  transition: transform 0.3s;
  flex-shrink: 0;
  margin-left: 10px;
}

.menu-toggle:hover {
  transform: rotate(90deg);
}

@media (max-width: 1400px) {
  .logo-name-img {
    height: 28px;
  }
}

@media (max-width: 1200px) {
  .navbar {
    padding: 8px 14px;
  }

  .navbar.home-transparent {
    background: transparent;
  }

  .navbar.home-transparent.scrolled {
    background: rgba(160, 50, 45, 0.96);
  }

  .logo-img {
    height: 32px;
  }

  .logo-name-img {
    height: 21px;
    /* height: 26px; */
    /* height: 40px; */
  }

  .logo-area {
    gap: 6px;
  }

  .nav-menu {
    display: flex;
    position: fixed;
    top: 56px;
    left: 0;
    width: 100%;
    background: #faf7f2;
    flex-direction: column;
    padding: 0;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 12px 12px;
    z-index: 999;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
  }

  .nav-menu.active {
    max-height: 600px;
    opacity: 1;
    padding: 12px 0;
  }

  .nav-item {
    color: #3e2c20;
    padding: 13px 22px;
    border-bottom: 1px solid #e8ddd0;
    font-size: 16px;
    width: 100%;
  }

  .nav-item:hover {
    color: #a0322d;
    background: #f5ede3;
  }

  .submenu {
    position: static;
    background: transparent;
    box-shadow: none;
    display: none;
    padding-left: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-item.active .submenu {
    display: flex;
    max-height: 300px;
  }

  .menu-toggle {
    display: block;
  }
}

/* ========== 侧边栏样式 ========== */
.sidebar {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 5px;
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}

.sidebar.visible {
  opacity: 1;
  visibility: visible;
}

.sidebar-toggle {
  display: none;
  background: #a0322d;
  color: white;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50% 0 0 50%;
  font-size: 16px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}

.sidebar-toggle:hover {
  background: #c5924a;
}

.sidebar-buttons {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sidebar-btn {
  background: #b55a3a;
  color: white;
  border: none;
  padding: 9px 14px;
  border-radius: 5px 0 0 5px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.3s, transform 0.2s;
  text-align: center;
}

.sidebar-btn:hover {
  background: #c5924a;
  transform: translateX(-2px);
}

@media (max-width: 480px) {
  .sidebar-toggle {
    display: flex;
  }

  .sidebar-buttons {
    display: none;
  }

  .sidebar.expanded .sidebar-buttons {
    display: flex;
    animation: fadeInRight 0.3s ease;
  }

  .sidebar-btn {
    padding: 7px 10px;
    font-size: 12px;
  }
}

/* ========== 底部栏样式 ========== */
.footer-new {
  background: #2e1f15;
  color: #d4b896;
  padding: 40px 20px 20px;
  font-size: 14px;
}

.footer-grid {
  max-width: 1260px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding-bottom: 25px;
  border-bottom: 1px solid rgba(212, 184, 150, 0.2);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 25px;
    text-align: center;
  }
}

.footer-col h4 {
  color: #c5924a;
  font-size: 18px;
  margin-bottom: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: #c5924a;
}

@media (max-width: 768px) {
  .footer-col h4::after {
    left: 50%;
    transform: translateX(-50%);
  }
}

.footer-col p {
  color: #cfb595;
  line-height: 2.2;
  font-size: 14px;
}

.footer-col .footer-phone {
  font-size: 22px;
  font-weight: 700;
  color: #c5924a;
  letter-spacing: 1px;
  margin: 8px 0;
}

.footer-col a {
  color: #cfb595;
  text-decoration: none;
  line-height: 2.2;
  font-size: 14px;
  transition: color 0.3s, padding-left 0.3s;
  display: inline-block;
  cursor: pointer;
}

.footer-col a:hover {
  color: #c5924a;
  padding-left: 5px;
}

.footer-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-links-col {
  flex: 1;
  min-width: 80px;
}

.footer-bottom {
  max-width: 1260px;
  margin: 20px auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #b8957a;
  gap: 10px;
}

.footer-bottom a {
  color: #cfb595;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-bottom a:hover {
  color: #c5924a;
}

.footer-bottom img {
  height: 16px;
  vertical-align: middle;
  margin-right: 4px;
}

@media (max-width: 480px) {
  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .footer-links-row {
    flex-direction: column;
    gap: 0;
  }
}

/* ========== 弹窗样式 ========== */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  max-width: 480px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  animation: scaleIn 0.3s ease;
}

.form-input {
  width: 100%;
  padding: 7px;
  margin: 5px 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: border-color 0.3s;
}

.form-input:focus {
  border-color: #a0322d;
  outline: none;
}

.btn-submit {
  background: #a0322d;
  color: white;
  border: none;
  padding: 8px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 10px;
  transition: background 0.3s;
}

.btn-submit:hover {
  background: #8b2a25;
}

.download-list {
  list-style: none;
  padding: 0;
}

.download-list li {
  padding: 10px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  transition: background 0.2s;
}

.download-list li:hover {
  background: #faf0e6;
}

/* ========== 动画关键帧 ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes verticalScrollSlow {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-50%);
  }
}

@keyframes infiniteScrollLeft {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}