/* 自定义样式 - Bootstrap 4.6兼容 */
:root {
  --theme-red: #D2232A;
  --theme-green: #266C57;
  --light-green: #B2D1C8;
  --light-gray: #f5f5f5;
  --text-dark: #333;
  --text-medium: #494949;
  --text-light: #999;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.6;
}

.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1;
}

.hidden {
  display: none !important;
}

.bg-theme {
  background: var(--theme-red);
}

.color-theme {
  color: var(--theme-red);
}

/* ===== 导航栏样式 ===== */
.navbar-custom {
  background-color: var(--theme-red) !important;
  padding: 0 1rem;
}

.navbar-brand {
  margin-right: 100px;
  padding: 15px 0;
}

.navbar-brand img {
  height: 30px;
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5);
  padding: 4px 8px;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.5)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-nav .nav-item {
  position: relative;
  margin: 0 10px;
}

.navbar-nav .nav-link {
  color: #fff;
  font-weight: 500;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

/* 选中状态 */
.navbar-nav .nav-item.active .nav-link {
  background-color: white !important;
  color: var(--theme-red) !important;
}

.navbar-nav .nav-item.active .nav-link::before {
  content: '';
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  width: 20px;
  height: 3px;
  margin: 0 auto;
  background-color: var(--theme-red);
}

/* 下拉菜单 */
.navbar-nav .nav-item .dropdown-menu {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  min-width: 120px;
  border-radius: 0 0 8px 8px;
  margin-top: 0;
  padding: 10px 0;
  background-color: rgba(54, 54, 54, 0.8) !important;
  text-align: center;
  display: none;
  border: none;
  z-index: 1000;
}

.navbar-nav .nav-item .dropdown-item {
  color: white !important;
  padding: 0.5rem 1rem;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  text-decoration: none;
}

.navbar-nav .nav-item .dropdown-item:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* 悬停显示下拉菜单 */
.navbar-nav .nav-item:hover .dropdown-menu,
.navbar-nav .nav-item .dropdown-menu:hover,
.navbar-nav .nav-item .dropdown-menu.show {
  display: block !important;
}

/* ===== 横幅区域 ===== */
.banner-section {
  text-align: center;
}

.banner-section img {
  width: 100%;
}

.second-banner {
  padding: 1.2rem;
}

/* ===== 二级导航区域 ===== */
.nav-section {
  box-shadow: 0 10px 10px #e9e9e9;
  position: relative;
  padding: 0;
}

.home-icon {
  text-align: center;
}

.home-icon a {
  display: block;
  width: 70px;
  height: 80px;
  margin: 0 auto;
  line-height: 80px;
  background: var(--light-gray);
  transition: background 0.3s ease;
}

.home-icon a:hover {
  background: #eee;
}

.home-icon img {
  height: 36px;
}

.about-nav {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  height: 80px;
}

.about-nav-item {
  height: 80px;
  line-height: 80px;
  padding: 0 0.8rem;
  cursor: pointer;
  border-bottom: 4px solid transparent;
  transition: all 0.3s ease;
  font-weight: 500;
  color: var(--text-medium);
  margin-right: 50px;
}

.about-nav-item:last-child {
  margin-right: 0;
}

.about-nav-item a {
  color: var(--text-medium);
  text-decoration: none;
}

.about-nav-item:hover {
  color: var(--text-dark);
  font-weight: 600;
  border-bottom-color: var(--theme-green);
}

.about-nav-item:hover a {
  color: var(--text-dark);
}

.about-nav-item.active {
  border-bottom-color: var(--theme-green);
  color: var(--text-dark);
  font-weight: 600;
}

/* ===== 内容区域 ===== */
.content-section {
  background: var(--light-gray);
  padding: 70px 0;
}

.bg1 {
  height: 4px;
  background: var(--light-green);
}

.bg2 {
  height: 4px;
  background: var(--theme-green);
}

.about-content {
  padding: 4rem;
  background: white;
  min-height: 240px;
}

.content-item {
  display: none;
}

.content-item.active {
  display: block;
}

.content-title {
  font-size: 1.4rem;
  color: var(--theme-green);
  margin-bottom: 1.5rem;
}

.content-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-dark);
}

.content-text p {
  margin-bottom: 1rem;
}

/* ===== 页脚样式 ===== */
.footer-section {
  background-color: #fff;
  padding-top: 4rem !important;
}

.bg-spec .footer-section {
  background: var(--light-gray);
}

.footer-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: #313131;
}

.footer-divider {
  width: 18px;
  height: 3px;
  background-color: var(--theme-red);
  margin-bottom: 1rem;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-list li {
  margin-bottom: 0.5rem;
}

.footer-list a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-list a:hover {
  color: var(--text-dark);
}

.footer-dark {
  height: 100px;
  background: var(--theme-red);
}

/* ===== 响应式设计 ===== */

/* 平板设备 (768px - 991px) */
@media (max-width: 991px) {

  /* 主导航 */
  .navbar-nav .nav-link {
    height: auto;
    padding: 12px 20px !important;
  }

  .navbar-nav .nav-item .dropdown-menu {
    position: static;
    transform: none;
    width: 100%;
    background-color: rgba(54, 54, 54, 0.95) !important;
  }

  /* 二级导航 */
  .nav-section {
    padding: 10px 0;
  }

  .nav-section .container {
    padding: 0 15px;
  }

  .nav-section .row {
    flex-direction: row;
    align-items: center;
    margin: 0;
  }

  .home-icon {
    display: none;
  }

  .about-nav {
    height: auto;
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 10px 0;
    margin: 0 -15px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .about-nav::-webkit-scrollbar {
    display: none;
  }

  .about-nav-item {
    height: auto;
    line-height: normal;
    padding: 8px 16px;
    margin-right: 8px;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
    border-radius: 6px;
  }

  .about-nav-item:last-child {
    margin-right: 15px;
  }

  .about-nav-item:first-child {
    margin-left: 15px;
  }

  .about-nav-item a {
    font-size: 0.9rem;
  }

  .about-nav-item:hover {
    background-color: rgba(38, 108, 87, 0.05);
    border-bottom-color: rgba(38, 108, 87, 0.3);
  }

  .about-nav-item.active {
    background-color: rgba(38, 108, 87, 0.1);
    border-bottom-color: var(--theme-green);
    color: var(--theme-green);
  }

  .about-nav-item.active a {
    color: var(--theme-green);
  }

  /* 内容区域 */
  .content-section {
    padding: 30px 0;
  }

  .about-content {
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  }

  .content-title {
    font-size: 1.4rem;
  }

  .content-text {
    font-size: 0.95rem;
    line-height: 1.7;
  }

  .bg1,
  .bg2 {
    height: 3px;
  }
}

/* 手机设备 (576px - 767px) */
@media (max-width: 768px) {
  .footer-section {
    padding-top: 4rem !important;
  }
  .footer-section .row>div {
    margin-bottom: 2rem;
  }

  .footer-section .row .col-md-1:last-child,
  .footer-section .row .col-md-1:nth-last-child(2) {
    display: none;
  }

  .footer-section .row .col-md-2:last-child,
  .footer-section .row .col-md-2:nth-last-child(2) {
    margin-bottom: 0;
  }

  .footer-title {
    font-size: 1rem;
  }

  .footer-list a {
    font-size: 0.85rem;
  }

  .nav-section {
    padding: 8px 0;
  }

  .about-nav-item {
    padding: 6px 12px;
    margin-right: 6px;
  }

  .about-nav-item:last-child {
    margin-right: 10px;
  }

  .about-nav-item:first-child {
    margin-left: 10px;
  }

  .content-section {
    padding: 20px 0;
  }

  .about-content {
    padding: 1.2rem;
  }

  .content-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
  }

  .content-text {
    font-size: 0.9rem;
    line-height: 1.6;
  }
}

/* 小手机设备 (400px - 575px) */
@media (max-width: 576px) {
  .navbar-brand {
    margin-right: 0;
  }

  .navbar-brand img {
    height: 25px;
  }

  .about-nav-item {
    padding: 5px 10px;
    margin-right: 4px;
  }

  .about-nav-item a {
    font-size: 0.85rem;
  }
}

/* 超小手机设备 (< 400px) */
@media (max-width: 400px) {
  .footer-section {
    padding-top: 2rem !important;
  }
  .home-icon a {
    width: 40px;
    height: 40px;
    line-height: 40px;
  }

  .home-icon img {
    height: 20px;
  }

  .about-nav-item a {
    font-size: 0.8rem;
  }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
  .about-nav-item:active {
    background-color: rgba(38, 108, 87, 0.15);
    transform: scale(0.98);
    transition: all 0.1s ease;
  }
}

/* 高分辨率屏幕优化 */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
  .footer-section {
    padding-top: 4rem !important;
  }
}

/* 打印样式 */
@media print {

  .nav-section,
  .footer-dark {
    display: none;
  }

  .about-content {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}