@charset "utf-8";

// ==================== 变量 ====================
@primary:     #3285FF;
@primary-dk:  #3894FF;
@dark:        #000000;
@text:        #333333;
@text-light:  #666666;
@text-muted:  #999999;
@border:      #F4F4F4;
@bg-light:    #F5F5F5;
@white:       #FFFFFF;
@red:         #CC000C;
@font:        'Microsoft YaHei', 'microsoft yahei', sans-serif;

// ==================== Mixins ====================
.transition(@t: all, @d: 0.3s, @e: ease) {
  transition: @t @d @e;
}
.text-ellipsis() {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.flex-center() {
  display: flex;
  align-items: center;
  justify-content: center;
}

// ==================== Reset ====================
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: @font;
  font-size: 14px;
  color: @text;
  background: @white;
  -webkit-font-smoothing: antialiased;
  padding-top: 50px;
  padding-bottom: 70px;
  max-width: 480px;
  margin: 0 auto;
  box-shadow: 0 0 20px rgba(0,0,0,0.08);
  min-height: 100vh;
  position: relative;
}
a { text-decoration: none; color: inherit; .transition(); }
ul, li { list-style: none; }
img { max-width: 100%; display: block; }
input, textarea, button { font-family: @font; outline: none; border: none; }

// ==================== 容器 ====================
.m-container {
  max-width: 768px;
  margin: 0 auto;
  overflow: hidden;
}

// ==================== 顶部导航栏 ====================
.m-topbar {
  position: fixed; top: 0;
  z-index: 1000;
  background: @dark;
  height: 50px;
  width: 100%;
  max-width: 480px;
  left: 50%;
  transform: translateX(-50%);
  &-inner {
    max-width: 768px; margin: 0 auto;
    height: 100%; display: flex;
    align-items: center; padding: 0 15px;
  }
  &-menu {
    width: 30px; height: 20px;
    .flex-center(); flex-direction: column;
    justify-content: space-between;
    span {
      display: block; width: 22px; height: 2px;
      background: @white; border-radius: 2px;
    }
  }
  &-brand {
    flex: 1; display: flex; align-items: center;
    justify-content: center; margin-left: 10px;
    img{
      height: 46px;
    }
  }
  &-title {
    color: @white; font-size: 18px;
    margin-left: 10px;
    .text-ellipsis();
  }
}
.m-logo-icon { width: 30px; height: 30px; flex-shrink: 0; }

// ==================== 侧边抽屉菜单 ====================
.m-drawer-overlay {
  position: fixed; top: 0; bottom: 0;
  background: rgba(0,0,0,0.5); z-index: 1001;
  display: none;
  width: 100%;
  max-width: 480px;
  left: 50%;
  transform: translateX(-50%);
}
.m-drawer {
  position: fixed; top: 0; left: -260px; bottom: 0;
  width: 260px; background: @white;
  z-index: 1002; .transition(all, 0.3s);
  &.open { left: 0; }
  &-header {
    display: flex; align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid @border;
    font-size: 16px; font-weight: bold;
  }
  &-close { font-size: 24px; color: @text-muted; }
  &-nav {
    li a {
      display: block; padding: 16px 20px;
      font-size: 16px; color: @text;
      border-bottom: 1px solid @border;
      &:hover, &:active { background: @bg-light; color: @primary; }
    }
  }
}

// ==================== 底部导航栏 ====================
.m-bottombar {
  position: fixed; bottom: 0;
  z-index: 1000;
  background: @white;
  border-top: 1px solid @border;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 100%;
  max-width: 480px;
  left: 50%;
  transform: translateX(-50%);
  a{
    text-decoration: none;
  }
  &-item {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    flex: 1; height: 100%;
    color: @text-muted; font-size: 11px;
    i { font-size: 20px; margin-bottom: 2px; }
    &.active { color: @primary; }
  }
  &-phone {
    position: relative;
    i {
      width: 44px; height: 44px;
      .flex-center(); border-radius: 50%;
      background: @primary; color: @white;
      font-size: 20px;
      margin-bottom: 0;
      position: absolute;
      top: -18px;
      box-shadow: 0 2px 8px rgba(50,133,255,0.4);
    }
    span { /*display: none; */
      position: absolute;top: 30px;}
  }
}

// ==================== 页面标题 ====================
.m-page-title {
  text-align: center; padding: 20px 15px;
  font-size: 22px; font-weight: bold;
  color: @text;
  &::before, &::after {
    content: '—'; margin: 0 10px;
    color: @text-muted;
  }
}

// ==================== 首页 - 主营业务网格 ====================
.m-service-grid {
  background: linear-gradient(180deg, #E8F4FF 0%, #D6ECFF 50%, #C4E4FF 100%);
  padding: 0px;
  margin: 0 auto;
}

// ==================== 数据统计 ====================
.m-stats {
  padding: 30px 15px;
  .title{
    text-align: center;
    h2{
      font-size: 36px;
      color: #222222;
      font-weight: 700;
    }
    p{
      font-size: 18px;
    }
  }
  .stat-row {
    display: flex; justify-content: space-around;
    text-align: center;
    .stat {
      flex: 1;
      .num {
        font-size: 28px; font-weight: bold;
        color: #cc000c;
        span { font-size: 16px;
          color: #666666;}
      }
      .label {
        font-size: 12px; color: @text-muted;
        margin-top: 5px;
      }
    }
  }
}

// ==================== 成功案例 ====================
.m-cases {
  padding: 30px 15px;
  .m-section-title {
    text-align: center; font-size: 32px;
    font-weight: bold; color: @dark;
    margin-bottom: 8px;
  }
  .m-section-subtitle {
    text-align: center; font-size: 14px;
    color: @text-light; margin-bottom: 25px;
  }
  .case-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    .case-card {
      background: @white;
      border: 1px solid #eee;
      border-radius: 4px;
      overflow: hidden;
      .thumb {
        width: 100%; height: 120px;
        background: #f0f0f0; overflow: hidden;
        img { width: 100%; height: 100%; object-fit: cover; }
      }
      .name {
        padding: 10px 8px;
        font-size: 14px; font-weight: bold;
        text-align: center; color: @text;
      }
    }
  }
}

// ==================== 合作企业 ====================
.m-partners {
  padding: 30px 15px;
  .m-section-title {
    text-align: center; font-size: 24px;
    font-weight: bold; color: @dark;
    margin-bottom: 8px;
  }
  .m-section-subtitle {
    text-align: center; font-size: 13px;
    color: @text-muted; margin-bottom: 20px;
  }
  .partner-list {
    display: flex;
    flex-wrap: wrap;
    .partner-logo {
      width: calc(~"50% - 8px");
      background: @white;
      border: 1px solid #eee;
      border-radius: 4px;
      display: flex;
      flex-direction: column;
      margin-right: 16px;
      margin-bottom: 20px;
      &:nth-child(2n){
        margin-right: 0;
      }
      p{
        line-height: 2.4em;
      }
      .flex-center();
      img { max-width: 80px;
        margin-top: 16px;}
    }
  }
}

// ==================== 在线留言 ====================
.m-form-section {
  padding: 30px 15px;
  .m-section-title {
    text-align: center; font-size: 24px;
    font-weight: bold; color: @dark;
    margin-bottom: 25px;
  }
  .m-form {
    .form-group {
      margin-bottom: 15px;
      input, textarea {
        width: 100%; padding: 12px 15px;
        border: 1px solid #ddd; border-radius: 4px;
        font-size: 14px; background: @white;
        &::placeholder { color: #bbb; }
        &:focus { border-color: @primary; }
      }
      textarea { height: 100px; resize: none; }
      .captcha-row {
        display: flex; gap: 10px;
        input { flex: 1; }
        .captcha-img {
          width: 100px; height: 44px;
          flex-shrink: 0;
          img { width: 100%; height: 100%; }
        }
      }
      .required::before {
        content: '*'; color: @red;
        margin-right: 4px;
      }
    }
    .btn-submit {
      width: 100%; padding: 14px;
      background: @dark; color: @white;
      font-size: 16px; border-radius: 4px;
      text-align: center; cursor: pointer;
      .transition();
      &:hover { background: #333; }
    }
  }
}

// ==================== 联系信息 ====================
.m-contact-info {
  padding: 30px 15px;
  .company-name {
    font-size: 22px; font-weight: bold;
    color: @dark; margin-bottom: 20px;
  }
  .info-list {
    .info-item {
      display: flex; align-items: center;
      padding: 12px 0;
      i {
        width: 30px; font-size: 24px;
        color: @primary; margin-right: 10px;
        text-align: center;
      }
      .label {
        font-size: 14px; color: @text-light;
        margin-right: 5px;
      }
      .value {
        font-size: 14px; color: @text;
        a { color: @text; &:hover { color: @primary; } }
        &.phone-highlight {
          font-size: 22px; color: @red;
          font-weight: bold;
        }
      }
    }
  }
}

// ==================== 地图 ====================
.m-map {
  width: 100%; height: 250px;
  iframe { width: 100%; height: 100%; border: 0; }
}

// ==================== 版权区 ====================
.m-copyright {
  background: @bg-light;
  padding: 20px 15px;
  text-align: center;
  p {
    font-size: 12px; color: @text-muted;
    line-height: 22px;
    a { color: @text-muted; &:hover { color: @primary; } }
  }
}

// ==================== 案例页 ====================
.m-case-page {
  padding: 0 15px 30px;
  .case-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    .case-card {
      background: @white;
      border: 1px solid #eee;
      border-radius: 4px;
      overflow: hidden;
      .thumb {
        width: 100%; height: 140px;
        background: #f0f0f0; overflow: hidden;
        img { width: 100%; height: 100%; object-fit: cover; }
      }
      .name {
        padding: 12px 8px;
        font-size: 14px; font-weight: bold;
        text-align: center; color: @text;
      }
    }
  }
}

// ==================== 服务页 ====================
.m-service-page {
  padding: 0 15px 30px;
  .service-grid-dark {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    .service-card {
      background: linear-gradient(135deg, #4a4a4a, #2a2a2a);
      border-radius: 6px;
      padding: 20px 10px;
      text-align: center;
      .icon {
        font-size: 32px; color: @white;
        margin-bottom: 8px;
      }
      .name {
        font-size: 13px; color: @white;
        font-weight: 500;
      }
    }
  }
}

// ==================== 文章详情页（服务/新闻） ====================
.m-article {
  padding: 15px;
  .article-header {
    .title {
      font-size: 22px; font-weight: bold;
      color: @dark; line-height: 1.4;
      margin-bottom: 10px;
    }
    .meta {
      font-size: 13px; color: @text-muted;
      margin-bottom: 5px;
      span { margin-right: 15px; }
    }
    .category {
      display: inline-block;
      font-size: 13px; color: @text-muted;
      padding: 2px 10px;
      border: 1px solid #ddd;
      border-radius: 3px;
      margin-bottom: 20px;
    }
  }
  .article-content {
    font-size: 15px; line-height: 1.6;
    color: @text;
    p { margin-bottom: 5px; text-indent: 2em; }
    h2, h3 {
      font-size: 18px; font-weight: bold;
      color: @dark; margin: 20px 0 10px;
      text-indent: 0;
    }
    img {
      max-width: 100%; margin: 15px auto;
      border-radius: 4px;
      height: auto!important;
    }
    ul, ol {
      padding-left: 20px; margin-bottom: 15px;
      li { margin-bottom: 5px; }
    }
  }
  .article-share {
    text-align: center; padding: 30px 0;
    a {
      display: inline-block;
      width: 40px; height: 40px;
      .flex-center(); border-radius: 50%;
      background: @bg-light;
      i { font-size: 18px; color: @text-muted; }
    }
  }
}

// 详情页顶部导航
.m-article-topbar {
  position: fixed; top: 0;
  z-index: 1000;
  background: @white;
  height: 50px;
  border-bottom: 1px solid @border;
  width: 100%;
  max-width: 480px;
  left: 50%;
  transform: translateX(-50%);
  &-inner {
    max-width: 768px; margin: 0 auto;
    height: 100%; display: flex;
    align-items: center; justify-content: space-between;
    padding: 0 15px;
  }
  .back-btn, .home-btn {
    width: 36px; height: 36px;
    .flex-center();
    i { font-size: 20px; color: @text; }
  }
}

// ==================== 新闻列表 ====================
.m-news-list {
  padding: 0 15px 30px;
  .news-item {
    display: flex; align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid @border;
    .dot {
      width: 6px; height: 6px;
      border-radius: 50%;
      background: @text;
      margin-top: 8px; margin-right: 12px;
      flex-shrink: 0;
    }
    .news-title {
      flex: 1; font-size: 15px;
      color: @text; line-height: 1.5;
    }
    .arrow {
      color: @text-muted; font-size: 16px;
      margin-left: 10px; margin-top: 4px;
    }
  }
}

// ==================== 分页 ====================
.m-pagination {
  display: flex; align-items: center;
  justify-content: center;
  padding: 20px 0;
  .page-info {
    font-size: 14px; color: @text-light;
    margin: 0 15px;
  }
  .page-btn {
    width: 32px; height: 32px;
    .flex-center(); border-radius: 4px;
    border: 1px solid #ddd;
    color: @text; font-size: 14px;
    cursor: pointer; .transition();
    &:hover { border-color: @primary; color: @primary; }
    &.active { background: @primary; color: @white; border-color: @primary; }
  }
}

// ==================== 通用区块标题 ====================
.m-section-title {
  text-align: center; font-size: 32px;
  font-weight: bold; color: @dark;
  margin-bottom: 8px;
}
.m-section-subtitle {
  text-align: center; font-size: 14px;
  color: @text-light; margin-bottom: 25px;
}
