/* 响应式适配样式 - 专门覆盖固定宽度样式 */
/* 不包含搜索相关样式，由search.css统一管理 */

/* 基础重置 - 覆盖所有固定宽度 */
@media (max-width: 1024px) {
    /* 容器宽度适配 */
    .w, #main, .headerMain {
      width: 95% !important;
      min-width: auto !important;
      max-width: none !important;
    }
    
    .loop {
      min-width: auto !important;
    }
    
    #footer, #header {
      min-width: auto !important;
    }
    
    /* 基础搜索框适配 - 不与search.css冲突 */
    .search, .search1 {
      width: 100% !important;
      margin: 0 !important;
    }
    
    .seaBox {
      width: 100% !important;
      position: static !important;
      margin-left: 0 !important;
    }
  }
  
  /* 平板设备适配 (769px-1024px) */
  @media (min-width: 769px) and (max-width: 1024px) {
    /* 展会卡片布局 */
    .cards-container {
      grid-template-columns: repeat(3, 1fr) !important;
      gap: 12px;
    }
    
    /* 列表项适配 */
    .item li {
      width: 31% !important;
      margin-left: 1.5% !important;
      margin-right: 1% !important;
    }
    
    .hotbox {
      width: 31% !important;
      margin-left: 1.5% !important;
      margin-right: 1% !important;
    }
    
    /* 搜索框输入适配 */
    .searchMid .searchTxt {
      width: calc(100% - 120px) !important;
    }
    
    .searchBtn {
      width: 100px !important;
    }
    
    /* 侧边栏适配 */
    .view .col {
      width: 100% !important;
      float: none !important;
    }
    
    .view .side {
      width: 100% !important;
      float: none !important;
      margin-top: 30px !important;
    }
  }
  
  /* 手机横屏适配 (577px-768px) */
  @media (min-width: 577px) and (max-width: 768px) {
    /* 展会卡片布局 */
    .cards-container {
      grid-template-columns: repeat(2, 1fr) !important;
      gap: 10px;
    }
    
    /* 列表项适配 */
    .item li {
      width: 48% !important;
      margin-left: 1% !important;
      margin-right: 1% !important;
    }
    
    .hotbox {
      width: 48% !important;
      margin-left: 1% !important;
      margin-right: 1% !important;
    }
    
    .hotbox-fast {
      margin-left: 1% !important;
    }
    
    /* 搜索框适配 */
    .searchMid .searchTxt {
      width: calc(100% - 100px) !important;
    }
    
    .searchBtn {
      width: 80px !important;
    }
    
    /* 特殊组件适配 */
    .sgpic li {
      width: 100% !important;
      height: 200px !important;
      padding: 0 0 5px 0 !important;
    }
    
    .topnav li {
      width: 96% !important;
      margin-left: 2% !important;
    }
  }
  
  /* 手机竖屏适配 (≤576px) */
  @media (max-width: 576px) {
    /* 容器适配 */
    .w, #main, .headerMain {
      width: 95% !important;
      padding: 0 10px !important;
    }
    
    /* 展会卡片单列 */
    .cards-container {
      grid-template-columns: 1fr !important;
      gap: 15px;
    }
    
    /* 单列布局 */
    .item li, .hotbox {
      width: 100% !important;
      margin-left: 0 !important;
      margin-right: 0 !important;
      margin-bottom: 15px;
    }
    
    .xlist li {
      width: 100% !important;
      margin-bottom: 20px;
    }
    
    /* 特殊组件适配 */
    .sgpic li {
      width: 100% !important;
      height: 200px !important;
      padding: 0 0 5px 0 !important;
    }
    
    .topnav li {
      width: 100% !important;
      margin-left: 0 !important;
    }
    
    /* 搜索框完全适配 */
    .searchMid .searchTxt {
      width: calc(100% - 70px) !important;
      height: 35px !important;
      line-height: 35px !important;
      font-size: 14px !important;
    }
    
    .searchBtn {
      width: 60px !important;
      height: 35px !important;
      font-size: 12px !important;
    }
    
    /* Header移动端适配 */
    .headerMain {
      padding: 15px 10px !important;
      height: auto !important;
      position: relative;
    }
    
    .logo {
      float: none !important;
      width: auto !important;
      height: 35px !important;
      margin: 8px 50px 8px 0 !important;
    }
    
    .logo a {
      height: 35px !important;
      width: auto !important;
      background-size: contain !important;
    }
    
    .tlogin {
      display: none !important;
    }
    
    .nav {
      display: none !important;
    }
  }
  
  /* ========== 移动端导航系统 ========== */
  
  .mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
  }
  
  .mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
  }
  
  .mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  
  .mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  .mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
  }
  
  .mobile-nav.active {
    display: block;
  }
  
  .mobile-nav-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
  }
  
  .mobile-nav-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 100%;
    background: white;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s ease;
  }
  
  .mobile-nav.active .mobile-nav-content {
    transform: translateX(0);
  }
  
  .mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
  }
  
  .mobile-nav-header h3 {
    margin: 0;
    color: #333;
    font-size: 18px;
  }
  
  .mobile-nav-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
  }
  
  .mobile-nav-list li {
    border-bottom: 1px solid #f0f0f0;
  }
  
  .mobile-nav-list li a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    transition: background 0.3s ease;
  }
  
  .mobile-nav-list li a:hover,
  .mobile-nav-list li.active a {
    background: #f8f9fa;
    color: var(--main-color);
  }
  
  /* ========== 移动端显示控制 ========== */
  
  /* 桌面端导航强制显示 - 覆盖所有隐藏规则 */
  @media (min-width: 769px) {
    .desktop-nav {
      display: block !important;
    }
    
    .nav.desktop-nav {
      display: block !important;
    }
    
    .nav {
      display: block !important;
    }
    
    .mobile-menu-toggle {
      display: none !important;
    }
  }
  
  /* 强制桌面导航可见 - 最高优先级 */
  .nav.desktop-nav {
    display: block !important;
  }
  
  .headerMain .nav.desktop-nav {
    display: block !important;
  }
  
  @media (max-width: 768px) {
    .mobile-menu-toggle {
      display: flex !important;
    }
    
    .desktop-nav {
      display: none !important;
    }
    
    .nav {
      display: none !important;
    }
    
    /* 确保手机端隐藏桌面导航栏 */
    .headerMain .nav.desktop-nav {
      display: none !important;
    }
    
    .mobile-nav {
      display: none !important;
    }
    
    .mobile-nav.active {
      display: block !important;
    }
  }
  
  /* ========== 字体响应式 ========== */
  
  @media (max-width: 768px) {
    body {
      font-size: 14px;
    }
    
    .expo-title {
      font-size: 13px;
    }
    
    .expo-date {
      font-size: 11px;
    }
    
    .attendees {
      font-size: 11px;
    }
    
    .register-btn {
      font-size: 11px;
      padding: 4px 12px;
    }
  }
  
  @media (max-width: 480px) {
    .expo-title {
      font-size: 12px;
    }
    
    .expo-card {
      border-radius: 8px;
    }
    
    .card-header {
      height: 100px;
    }
  }
  
  /* ========== 详情页面响应式适配 ========== */
  
  @media (max-width: 768px) {
    /* 活动详情页面适配 */
    .activity-info {
      flex-direction: column !important;
      text-align: center;
      gap: 20px !important;
      padding: 20px !important;
    }
    
    .activity-logo {
      width: 150px !important;
      height: 150px !important;
      margin: 0 auto !important;
    }
    
    .activity-details h1 {
      font-size: 20px !important;
      margin-bottom: 15px !important;
    }
    
    .activity-meta {
      grid-template-columns: 1fr !important;
      gap: 10px !important;
    }
    
    .activity-actions {
      flex-direction: column !important;
      gap: 10px !important;
    }
    
    .rating-card {
      min-width: auto !important;
      width: 100% !important;
      padding: 15px !important;
    }
    
    /* Tab导航适配 */
    .tab-nav {
      flex-direction: column !important;
      gap: 0 !important;
    }
    
    .tab-link {
      padding: 12px 20px !important;
      text-align: center !important;
      border-bottom: 1px solid #f0f0f0 !important;
      border-radius: 0 !important;
      font-size: 14px !important;
    }
    
    /* 侧边栏移动端优化 */
    .view .side {
      width: 100% !important;
      float: none !important;
      margin-top: 20px !important;
    }
    
    .view .col {
      width: 100% !important;
      float: none !important;
    }
    
    .sticky-sidebar {
      position: relative !important;
      top: auto !important;
      box-shadow: none !important;
      border-radius: 0 !important;
      background: transparent !important;
    }
    
    .register-actions {
      flex-direction: row !important;
      gap: 10px !important;
    }
    
    .register-btn-large,
    .material-btn-large,
    .supplement-btn {
      padding: 10px 8px !important;
      font-size: 11px !important;
    }
    
    /* 文章内容区域适配 */
    .vbox {
      padding: 15px 20px !important;
      margin-bottom: 20px !important;
    }
    
    #endtext {
      font-size: 14px !important;
      line-height: 28px !important;
    }
    
    .endtext img {
      max-width: 100% !important;
      height: auto !important;
    }
  }
  
  @media (max-width: 576px) {
    /* 超小屏幕特殊适配 */
    .activity-info {
      flex-direction: column !important;
      text-align: center;
      gap: 15px !important;
      padding: 15px !important;
    }
    
    .activity-logo {
      width: 120px !important;
      height: 120px !important;
    }
    
    .activity-details h1 {
      font-size: 18px !important;
    }
    
    .register-btn-large,
    .material-btn-large,
    .supplement-btn {
      padding: 8px 6px !important;
      font-size: 10px !important;
    }
    
    .vbox {
      padding: 10px 15px !important;
    }
  }
  
  /* ========== Footer 响应式样式 ========== */
  
  @media (max-width: 768px) {
    #footer {
      padding: 20px 15px !important;
      min-width: auto !important;
    }
    
    #footer p {
      font-size: 12px !important;
      line-height: 22px !important;
      margin: 8px 0;
    }
    
    #footer .eygy {
      margin: 2px !important;
      font-size: 12px;
    }
  }
  
  @media (max-width: 576px) {
    #footer {
      padding: 15px 10px !important;
    }
    
    #footer p {
      font-size: 11px !important;
      line-height: 20px !important;
    }
  } /* 响应式适配样式 - 专门覆盖固定宽度样式 */
/* 不包含搜索相关样式，由search.css统一管理 */

/* 基础重置 - 覆盖所有固定宽度 */
@media (max-width: 1024px) {
  /* 容器宽度适配 */
  .w, #main, .headerMain {
    width: 95% !important;
    min-width: auto !important;
    max-width: none !important;
  }
  
  .loop {
    min-width: auto !important;
  }
  
  #footer, #header {
    min-width: auto !important;
  }
  
  /* 基础搜索框适配 - 不与search.css冲突 */
  .search, .search1 {
    width: 100% !important;
    margin: 0 !important;
  }
  
  .seaBox {
    width: 100% !important;
    position: static !important;
    margin-left: 0 !important;
  }
}

/* 平板设备适配 (769px-1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  /* 展会卡片布局 */
  .cards-container {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px;
  }
  
  /* 列表项适配 */
  .item li {
    width: 31% !important;
    margin-left: 1.5% !important;
    margin-right: 1% !important;
  }
  
  .hotbox {
    width: 31% !important;
    margin-left: 1.5% !important;
    margin-right: 1% !important;
  }
  
  /* 搜索框输入适配 */
  .searchMid .searchTxt {
    width: calc(100% - 120px) !important;
  }
  
  .searchBtn {
    width: 100px !important;
  }
  
  /* 侧边栏适配 */
  .view .col {
    width: 100% !important;
    float: none !important;
  }
  
  .view .side {
    width: 100% !important;
    float: none !important;
    margin-top: 30px !important;
  }
}

/* 手机横屏适配 (577px-768px) */
@media (min-width: 577px) and (max-width: 768px) {
  /* 展会卡片布局 */
  .cards-container {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }
  
  /* 列表项适配 */
  .item li {
    width: 48% !important;
    margin-left: 1% !important;
    margin-right: 1% !important;
  }
  
  .hotbox {
    width: 48% !important;
    margin-left: 1% !important;
    margin-right: 1% !important;
  }
  
  .hotbox-fast {
    margin-left: 1% !important;
  }
  
  /* 搜索框适配 */
  .searchMid .searchTxt {
    width: calc(100% - 100px) !important;
  }
  
  .searchBtn {
    width: 80px !important;
  }
  
  /* 特殊组件适配 */
  .sgpic li {
    width: 100% !important;
    height: 200px !important;
    padding: 0 0 5px 0 !important;
  }
  
  .topnav li {
    width: 96% !important;
    margin-left: 2% !important;
  }
}

/* 手机竖屏适配 (≤576px) */
@media (max-width: 576px) {
  /* 容器适配 */
  .w, #main, .headerMain {
    width: 95% !important;
    padding: 0 10px !important;
  }
  
  /* 展会卡片单列 */
  .cards-container {
    grid-template-columns: 1fr !important;
    gap: 15px;
  }
  
  /* 单列布局 */
  .item li, .hotbox {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 15px;
  }
  
  .xlist li {
    width: 100% !important;
    margin-bottom: 20px;
  }
  
  /* 特殊组件适配 */
  .sgpic li {
    width: 100% !important;
    height: 200px !important;
    padding: 0 0 5px 0 !important;
  }
  
  .topnav li {
    width: 100% !important;
    margin-left: 0 !important;
  }
  
  /* 搜索框完全适配 */
  .searchMid .searchTxt {
    width: calc(100% - 70px) !important;
    height: 35px !important;
    line-height: 35px !important;
    font-size: 14px !important;
  }
  
  .searchBtn {
    width: 60px !important;
    height: 35px !important;
    font-size: 12px !important;
  }
  
  /* Header移动端适配 */
  .headerMain {
    padding: 15px 10px !important;
    height: auto !important;
    position: relative;
  }
  
  .logo {
    float: none !important;
    width: auto !important;
    height: 35px !important;
    margin: 8px 50px 8px 0 !important;
  }
  
  .logo a {
    height: 35px !important;
    width: auto !important;
    background-size: contain !important;
  }
  
  .tlogin {
    display: none !important;
  }
  
  .nav {
    display: none !important;
  }
}

/* ========== 移动端导航系统 ========== */

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 24px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1002;
  position: absolute;
  top: 50%;
  right: 15px;
  transform: translateY(-50%);
}

.mobile-menu-toggle span {
  width: 100%;
  height: 3px;
  background: #333;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
}

.mobile-nav.active {
  display: block;
}

.mobile-nav-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
}

.mobile-nav-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: white;
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.mobile-nav.active .mobile-nav-content {
  transform: translateX(0);
}

.mobile-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-header h3 {
  margin: 0;
  color: #333;
  font-size: 18px;
}

.mobile-nav-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-list li {
  border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-list li a {
  display: block;
  padding: 15px 20px;
  color: #333;
  text-decoration: none;
  font-size: 16px;
  transition: background 0.3s ease;
}

.mobile-nav-list li a:hover,
.mobile-nav-list li.active a {
  background: #f8f9fa;
  color: var(--main-color);
}

/* ========== 移动端显示控制 ========== */

/* 桌面端导航强制显示 - 覆盖所有隐藏规则 */
@media (min-width: 769px) {
  .desktop-nav {
    display: block !important;
  }
  
  .nav.desktop-nav {
    display: block !important;
  }
  
  .nav {
    display: block !important;
  }
  
  .mobile-menu-toggle {
    display: none !important;
  }
}

/* 强制桌面导航可见 - 最高优先级 */
.nav.desktop-nav {
  display: block !important;
}

.headerMain .nav.desktop-nav {
  display: block !important;
}

@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex !important;
  }
  
  .desktop-nav {
    display: none !important;
  }
  
  .nav {
    display: none !important;
  }
  
  /* 确保手机端隐藏桌面导航栏 */
  .headerMain .nav.desktop-nav {
    display: none !important;
  }
  
  .mobile-nav {
    display: none !important;
  }
  
  .mobile-nav.active {
    display: block !important;
  }
}

/* ========== 字体响应式 ========== */

@media (max-width: 768px) {
  body {
    font-size: 14px;
  }
  
  .expo-title {
    font-size: 13px;
  }
  
  .expo-date {
    font-size: 11px;
  }
  
  .attendees {
    font-size: 11px;
  }
  
  .register-btn {
    font-size: 11px;
    padding: 4px 12px;
  }
}

@media (max-width: 480px) {
  .expo-title {
    font-size: 12px;
  }
  
  .expo-card {
    border-radius: 8px;
  }
  
  .card-header {
    height: 100px;
  }
}

/* ========== 详情页面响应式适配 ========== */

@media (max-width: 768px) {
  /* 活动详情页面适配 */
  .activity-info {
    flex-direction: column !important;
    text-align: center;
    gap: 20px !important;
    padding: 20px !important;
  }
  
  .activity-logo {
    width: 150px !important;
    height: 150px !important;
    margin: 0 auto !important;
  }
  
  .activity-details h1 {
    font-size: 20px !important;
    margin-bottom: 15px !important;
  }
  
  .activity-meta {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
  
  .activity-actions {
    flex-direction: column !important;
    gap: 10px !important;
  }
  
  .rating-card {
    min-width: auto !important;
    width: 100% !important;
    padding: 15px !important;
  }
  
  /* Tab导航适配 */
  .tab-nav {
    flex-direction: column !important;
    gap: 0 !important;
  }
  
  .tab-link {
    padding: 12px 20px !important;
    text-align: center !important;
    border-bottom: 1px solid #f0f0f0 !important;
    border-radius: 0 !important;
    font-size: 14px !important;
  }
  
  /* 侧边栏移动端优化 */
  .view .side {
    width: 100% !important;
    float: none !important;
    margin-top: 20px !important;
  }
  
  .view .col {
    width: 100% !important;
    float: none !important;
  }
  
  .sticky-sidebar {
    position: relative !important;
    top: auto !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    background: transparent !important;
  }
  
  .register-actions {
    flex-direction: row !important;
    gap: 10px !important;
  }
  
  .register-btn-large,
  .material-btn-large,
  .supplement-btn {
    padding: 10px 8px !important;
    font-size: 11px !important;
  }
  
  /* 文章内容区域适配 */
  .vbox {
    padding: 15px 20px !important;
    margin-bottom: 20px !important;
  }
  
  #endtext {
    font-size: 14px !important;
    line-height: 28px !important;
  }
  
  .endtext img {
    max-width: 100% !important;
    height: auto !important;
  }
}

@media (max-width: 576px) {
  /* 超小屏幕特殊适配 */
  .activity-info {
    flex-direction: column !important;
    text-align: center;
    gap: 15px !important;
    padding: 15px !important;
  }
  
  .activity-logo {
    width: 120px !important;
    height: 120px !important;
  }
  
  .activity-details h1 {
    font-size: 18px !important;
  }
  
  .register-btn-large,
  .material-btn-large,
  .supplement-btn {
    padding: 8px 6px !important;
    font-size: 10px !important;
  }
  
  .vbox {
    padding: 10px 15px !important;
  }
}

/* ========== Footer 响应式样式 ========== */

@media (max-width: 768px) {
  #footer {
    padding: 20px 15px !important;
    min-width: auto !important;
  }
  
  #footer p {
    font-size: 12px !important;
    line-height: 22px !important;
    margin: 8px 0;
  }
  
  #footer .eygy {
    margin: 2px !important;
    font-size: 12px;
  }
}

@media (max-width: 576px) {
  #footer {
    padding: 15px 10px !important;
  }
  
  #footer p {
    font-size: 11px !important;
    line-height: 20px !important;
  }
} 