/* =====================================================
   响应式导航栏样式 - 适配PC端和手机端
   文件名: css/responsive-nav.css
   ===================================================== */

/* 基础导航容器 */
.nav-container {
  width: 100%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: relative;
  z-index: 1000;
  height: 70px;
}

.nav-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

/* Logo样式 */
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: auto;
}

.nav-logo img {
  max-height: 50px;
  width: auto;
}

.nav-logo-text {
  font-size: 18px;
  font-weight: 700;
  color: #333;
  margin-left: 10px;
  white-space: nowrap;
}

/* PC端导航菜单 */
.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 5px;
}

.nav-menu li {
  position: relative;
}

.nav-menu li a {
  display: block;
  padding: 10px 15px;
  color: #333;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
  border-radius: 4px;
}

.nav-menu li a:hover {
  color: #27ae60;
  background: rgba(39, 174, 96, 0.1);
}

.nav-menu li.active a {
  color: #fff;
  background: #27ae60;
}

.nav-menu li.active a:hover {
  background: #219a52;
}

/* 手机端菜单按钮 */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: background 0.3s ease;
}

.nav-toggle:hover {
  background: rgba(0,0,0,0.05);
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: #333;
  margin: 3px 0;
  transition: all 0.3s ease;
  border-radius: 2px;
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* 遮罩层 */
.nav-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-overlay.active {
  display: block;
  opacity: 1;
}

/* =====================================================
   响应式样式 - 平板端 (768px - 1024px)
   ===================================================== */
@media (max-width: 1024px) {
  .nav-menu li a {
    padding: 10px 12px;
    font-size: 14px;
  }
  
  .nav-logo-text {
    font-size: 16px;
  }
}

/* =====================================================
   响应式样式 - 手机端 (小于768px)
   ===================================================== */
@media (max-width: 767px) {
  .nav-wrapper {
    height: 60px;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background: #fff;
    flex-direction: column;
    padding: 20px 0;
    gap: 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  }
  
  .nav-menu.active {
    transform: translateX(0);
  }
  
  .nav-menu li {
    width: 100%;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .nav-menu li:last-child {
    border-bottom: none;
  }
  
  .nav-menu li a {
    padding: 15px 20px;
    font-size: 16px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .nav-menu li a:hover {
    background: #f8f8f8;
  }
  
  .nav-menu li.active a {
    background: #27ae60;
    color: #fff;
  }
  
  .nav-logo-text {
    font-size: 14px;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* =====================================================
   响应式样式 - 小屏手机 (小于480px)
   ===================================================== */
@media (max-width: 479px) {
  .nav-wrapper {
    padding: 0 10px;
    height: 55px;
  }
  
  .nav-menu {
    top: 55px;
    height: calc(100vh - 55px);
  }
  
  .nav-menu li a {
    padding: 12px 15px;
    font-size: 15px;
  }
  
  .nav-logo img {
    max-height: 40px;
  }
  
  .nav-logo-text {
    font-size: 13px;
    max-width: 120px;
  }
}

/* =====================================================
   深色主题导航栏
   ===================================================== */
.nav-container.dark {
  background: #1a1a1a;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.nav-container.dark .nav-logo-text {
  color: #fff;
}

.nav-container.dark .nav-menu li a {
  color: #ccc;
}

.nav-container.dark .nav-menu li a:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.nav-container.dark .nav-menu li.active a {
  color: #fff;
  background: #27ae60;
}

.nav-container.dark .nav-toggle span {
  background: #fff;
}

@media (max-width: 767px) {
  .nav-container.dark .nav-menu {
    background: #1a1a1a;
  }
  
  .nav-container.dark .nav-menu li {
    border-bottom-color: #333;
  }
  
  .nav-container.dark .nav-menu li a:hover {
    background: rgba(255,255,255,0.05);
  }
}

/* =====================================================
   透明主题导航栏 (用于首页轮播图上方)
   ===================================================== */
.nav-container.transparent {
  background: transparent;
  box-shadow: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.nav-container.transparent .nav-logo-text {
  color: #333;
}

.nav-container.transparent .nav-menu li a {
  color: #333;
}

.nav-container.transparent .nav-menu li a:hover {
  color: #27ae60;
  background: rgba(39, 174, 96, 0.1);
}

.nav-container.transparent .nav-menu li.active a {
  color: #fff;
  background: #27ae60;
}

.nav-container.transparent .nav-toggle span {
  background: #333;
}

.nav-container.transparent.scrolled {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: fixed;
}

.nav-container.transparent.scrolled .nav-logo-text {
  color: #333;
}

.nav-container.transparent.scrolled .nav-menu li a {
  color: #333;
}

.nav-container.transparent.scrolled .nav-menu li a:hover {
  color: #27ae60;
  background: rgba(39, 174, 96, 0.1);
}

.nav-container.transparent.scrolled .nav-toggle span {
  background: #333;
}

@media (max-width: 767px) {
  .nav-container.transparent {
    position: relative;
    background: #1a1a1a;
  }
  
  .nav-container.transparent .nav-menu {
    background: #1a1a1a;
  }
  
  .nav-container.transparent.scrolled {
    position: relative;
  }
}

/* =====================================================
   动画效果
   ===================================================== */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-menu.active {
  animation: fadeInDown 0.3s ease;
}

/* =====================================================
   滚动条样式 (移动端菜单)
   ===================================================== */
.nav-menu::-webkit-scrollbar {
  width: 6px;
}

.nav-menu::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.nav-menu::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.nav-menu::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* =====================================================
   联系页面样式
   ===================================================== */

/* 联系信息卡片 */
.contact-info-cards {
  margin: 20px 0;
}

.contact-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 25px 20px;
  text-align: center;
  margin-bottom: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.contact-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  border-color: #27ae60;
}

.contact-card .contact-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
}

.contact-card .contact-icon i {
  font-size: 24px;
  color: #fff;
}

.contact-card h5 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.contact-card p {
  font-size: 14px;
  color: #666;
  margin-bottom: 5px;
}

.contact-card .small-text {
  font-size: 12px;
  color: #999;
}

/* 业务咨询Widget */
.widget-service-consult .service-list {
  padding: 15px 0;
}

.service-item {
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.service-item:last-child {
  border-bottom: none;
}

.service-item h6 {
  margin: 0 0 5px;
}

.service-item h6 a {
  color: #27ae60;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.service-item h6 a:hover {
  color: #219a52;
}

.service-item p {
  margin: 0;
  font-size: 13px;
  color: #888;
}

/* 工作时间Widget */
.working-hours-list {
  padding: 15px 0;
}

.hours-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
}

.hours-item:last-child {
  border-bottom: none;
}

.hours-item .day {
  color: #666;
}

.hours-item .time {
  color: #333;
  font-weight: 500;
}

.hours-item.holiday .day,
.hours-item.holiday .time {
  color: #e74c3c;
}

/* 快速联系Widget */
.quick-contact-links {
  padding: 15px 0;
}

.contact-link {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  margin-bottom: 10px;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-link i {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  font-size: 16px;
  color: #fff;
}

.contact-link span {
  font-size: 14px;
  font-weight: 500;
}

.contact-link.phone {
  background: rgba(39, 174, 96, 0.1);
}

.contact-link.phone i {
  background: #27ae60;
}

.contact-link.phone span {
  color: #27ae60;
}

.contact-link.phone:hover {
  background: rgba(39, 174, 96, 0.2);
}

.contact-link.email {
  background: rgba(52, 152, 219, 0.1);
}

.contact-link.email i {
  background: #3498db;
}

.contact-link.email span {
  color: #3498db;
}

.contact-link.email:hover {
  background: rgba(52, 152, 219, 0.2);
}

.contact-link.wechat {
  background: rgba(7, 193, 96, 0.1);
}

.contact-link.wechat i {
  background: #07c160;
}

.contact-link.wechat span {
  color: #07c160;
}

.contact-link.wechat:hover {
  background: rgba(7, 193, 96, 0.2);
}

.contact-link.qq {
  background: rgba(18, 183, 245, 0.1);
}

.contact-link.qq i {
  background: #12b7f5;
}

.contact-link.qq span {
  color: #12b7f5;
}

.contact-link.qq:hover {
  background: rgba(18, 183, 245, 0.2);
}

/* 联系表单优化 */
.contact-form .form-control {
  border-radius: 4px;
  border: 1px solid #ddd;
  padding: 10px 15px;
  font-size: 14px;
  transition: border-color 0.3s ease;
}

.contact-form .form-control:focus {
  border-color: #27ae60;
  box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.1);
}

.contact-form label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
}

.contact-form .btn-primary {
  background: linear-gradient(135deg, #27ae60, #2ecc71);
  border: none;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.contact-form .btn-primary:hover {
  background: linear-gradient(135deg, #219a52, #27ae60);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

/* 响应式 - 联系页面 */
@media (max-width: 767px) {
  .contact-card {
    padding: 20px 15px;
  }
  
  .contact-card .contact-icon {
    width: 50px;
    height: 50px;
  }
  
  .contact-card .contact-icon i {
    font-size: 20px;
  }
  
  .contact-card h5 {
    font-size: 14px;
  }
  
  .contact-card p {
    font-size: 13px;
  }
  
  .contact-form .btn-primary {
    width: 100%;
    margin-bottom: 10px;
  }
  
  .contact-form .pull-right {
    float: none !important;
    text-align: center;
  }
}

/* =====================================================
   兼容原有header样式
   ===================================================== */
header.row.transparent.black.header1 {
  position: relative !important;
}

@media (min-width: 768px) {
  header.row.transparent.black.header1 .top-header {
    display: none;
  }
}

@media (max-width: 767px) {
  header.row.transparent.black.header1 .menu-section {
    display: none !important;
  }
}