/* page-crm-home.scss */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;700&family=Noto+Serif+SC:wght@400;600;700&display=swap');

/* 主色调定义 */
:root {
  --primary-blue: #2F7DAD;  /* 天青瓷 */
  --primary-green: #5B8C5A; /* 香樟绿 */
  --primary-gold: #D4B16A; /* 庐金 */
  --secondary-gray: #6D6D6D; /* 婺源黛瓦灰 */
  --secondary-red: #C53D43;  /* 井冈山鹃红 */
  --secondary-white: #F0F0F0; /* 鄱阳湖银白 */
}

.crm-home {
  /* 全局样式 */
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Noto Sans SC", "阿里巴巴普惠体", sans-serif;
  }
  
  /* 智能Banner区域 */
  .banner {
    height: 500px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(to bottom, #f8f4e8, #e8e0d0);
    
    &-content {
      position: absolute;
      top: 50%;
      left: 10%;
      transform: translateY(-50%);
      z-index: 3;
      max-width: 40%;
    }
    
    &-title {
      font-family: "Noto Serif SC", serif;
      font-size: 3rem;
      color: #2F7DAD;
      margin-bottom: 1rem;
      margin-left: -110px;
      text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    }
    
    &-subtitle {
      font-size: 1.2rem;
      color: #6D6D6D;
      margin-bottom: 2rem;
      margin-left: -110px;
      margin-right: 150px;
      line-height: 1.8;
    }
    
    &-btn {
      display: inline-block;
      padding: 0.8rem 2rem;
      background-color: #D4B16A/*var(--primary-gold)*/;
      color: white;
      text-decoration: none;
      border-radius: 30px;
      font-weight: bold;
      transition: all 0.3s ease;
      box-shadow: 0 4px 8px rgba(0,0,0,0.1);
      
      &:hover {
        background-color: #c9a055;
        transform: translateY(-3px);
        box-shadow: 0 6px 12px rgba(0,0,0,0.15);
      }
    }
    
    &-bg {
      position: absolute;
      top: 0;
      right: 0;
      height: 100%;
      width: 60%;
      background: url('/assets/images/jiangxi-landscape.webp') center right no-repeat;
      background-size: contain;
      opacity: 0.9;
      
      &::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(circle at 70% 50%, transparent 30%, rgba(248,244,232,0.8));
      }
    }
  }
  
  /* 数智动态区 */
  .dynamic-section {
    padding: 4rem 10%;
    background-color: #f1f4f1db;
    position: relative;
  }
  
  .section-title {
    font-family: "Noto Serif SC", serif;
    font-size: 2.2rem;
    color: #2F7DAD;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    
    &::after {
      content: "";
      display: block;
      width: 80px;
      height: 3px;
      background: linear-gradient(to right, #2F7DAD, #5B8C5A);
      margin: 1rem auto 0;
    }
  }
  
  .dynamic-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
  
  .dynamic-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    
    &:hover {
      transform: translateY(-10px);
      box-shadow: 0 12px 24px rgba(0,0,0,0.12);
    }
  }
  
  .card-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    
    &::after {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.6));
    }
  }
  
  .card-content {
    padding: 1.5rem;
  }
  
  .card-title {
    font-size: 1.3rem;
    color: #2F7DAD;
    margin-bottom: 0.8rem;
  }
  
  .card-desc {
    color: #6D6D6D;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
  }
  
  .card-link {
    display: inline-block;
    color: #D4B16A;
    text-decoration: none;
    font-weight: bold;
    position: relative;
    
    &::after {
      content: "";
      position: absolute;
      bottom: -2px;
      left: 0;
      width: 100%;
      height: 1px;
      background-color: #D4B16A;
      transition: transform 0.3s ease;
      transform-origin: right;
      transform: scaleX(0);
    }
    
    &:hover::after {
      transform-origin: left;
      transform: scaleX(1);
    }
  }
  
  /* 共创展示区 */
  .co-creation-section {
    padding: 4rem 10%;
    background-color: rgba(199, 223, 174, 0.407);
    position: relative;
  }
  
  .co-creation-slider {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    padding: 1rem 0;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    
    &::-webkit-scrollbar {
      height: 6px;
    }
    
    &::-webkit-scrollbar-track {
      background: #f1f1f1;
    }
    
    &::-webkit-scrollbar-thumb {
      background: #D4B16A;
      border-radius: 3px;
    }
  }
  
  .co-creation-item {
    min-width: 300px;
    scroll-snap-align: start;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    
    &:hover {
      transform: translateY(-5px);
    }
  }
  
  .cc-img {
    height: 180px;
    background-size: cover;
    background-position: center;
  }
  
  .cc-content {
    padding: 1.5rem;
    
    p {
      color: #6D6D6D;
      font-size: 0.95rem;
      line-height: 1.6;
    }
  }
  
  .cc-title {
    font-size: 1.2rem;
    color: #5B8C5A;
    margin-bottom: 0.5rem;
  }
  
  .cc-author {
    color: #6D6D6D;
    font-size: 0.9rem;
    margin-bottom: 1rem;
  }
  
  /* 协会智能体 - 优化后的样式 */
.ai-section {
  padding: 5rem 10%;
  // background: linear-gradient(135deg, #2F7DAD, #1a5c87); /* 直接使用颜色值代替darken函数 */
  background: linear-gradient(to right, #2F7DAD, #5B8C5A);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;

  &::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/assets/images/water-ink-pattern.webp') center/cover no-repeat;
    opacity: 0.05;
    z-index: 0;
  }

  .ai-container {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
  }

  .ai-title {
    font-family: "Noto Serif SC", serif;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #D4B16A;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
  }

  .ai-desc {
    margin: 0 auto 3rem;
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 700px;
    color: rgba(255,255,255,0.9);
  }

  .banner-btn {
    margin-bottom: 3rem;
    background-color: #D4B16A;
    border: none;
    font-size: 1rem;
    padding: 0.8rem 2.5rem;
    transition: all 0.3s ease;

    &:hover {
      background-color: #c9a055; /* 直接使用darken后的颜色值 */
      transform: translateY(-3px);
      box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }
  }

  .ai-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 2rem;

    @media (max-width: 768px) {
      grid-template-columns: 1fr;
    }
  }

  .ai-feature {
    background-color: rgba(255,255,255,0.1);
    padding: 2rem 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;

    &::after {
      content: "";
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 3px;
      background: linear-gradient(to right, #D4B16A, #5B8C5A); /* 直接使用颜色值 */
      transform: scaleX(0);
      transform-origin: left;
      transition: transform 0.3s ease;
    }

    &:hover {
      background-color: rgba(255,255,255,0.15);
      transform: translateY(-8px);
      box-shadow: 0 10px 25px rgba(0,0,0,0.15);

      &::after {
        transform: scaleX(1);
      }
    }
  }

  .ai-icon {
    font-size: 2.8rem;
    margin-bottom: 1.2rem;
    color: #D4B16A;
    display: inline-block;
    transition: transform 0.3s ease;
  }

  .ai-feature:hover .ai-icon {
    transform: scale(1.1);
  }

  .ai-feature-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: white;
  }

  .ai-feature p {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    line-height: 1.7;
  }
}
  
  /* 页脚样式 */
  .footer {
    background-color: #2a2a2a;
    color: #fff;
    padding: 3rem 10% 1rem;
    
    &-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 2rem;
      margin-bottom: 2rem;
    }
    
    &-col {
      h3 {
        font-family: "Noto Serif SC", serif;
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
        color: #D4B16A;
      }
    }
    
    &-links {
      list-style: none;
      
      li {
        margin-bottom: 0.8rem;
        
        a {
          color: #ddd;
          text-decoration: none;
          transition: color 0.3s ease;
          
          &:hover {
            color: #D4B16A;
          }
        }
      }
    }
    
    &-bottom {
      border-top: 1px solid rgba(255,255,255,0.1);
      padding-top: 1.5rem;
      text-align: center;
      font-size: 0.9rem;
      color: #aaa;
    }
  }
  
  /* 响应式设计 */
  @media (max-width: 1024px) {
    .dynamic-grid {
      grid-template-columns: repeat(2, 1fr);
    }
    
    .ai-features {
      grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }
  
  @media (max-width: 768px) {
    .banner {
      height: auto;
      padding: 3rem 1rem;
      
      &-content {
        position: static;
        transform: none;
        max-width: 100%;
        text-align: center;
      }
      
      &-bg {
        position: relative;
        width: 100%;
        height: 300px;
        margin-top: 2rem;
      }
    }
    
    .dynamic-grid {
      grid-template-columns: 1fr;
    }
    
    .ai-features {
      grid-template-columns: 1fr;
    }
    
    .footer-grid {
      grid-template-columns: 1fr;
    }
  }
}