/* 主内容区 */
.main-content {
    display: flex;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 40px;
    align-items: flex-start;
}
/* 轮播图样式 */
.carousel {
    flex: 3;
    position: relative;
    max-width: 800px;
    height: 420px;
    overflow: hidden;
    border-radius: 15px;
}

.slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: white;
}
/* 新增翻页按钮样式 */
.carousel-button {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background: rgba(255, 255, 255, 0.8);
        border: none;
        padding: 15px;
        border-radius: 50%;
        cursor: pointer;
        opacity: 0;
        transition: opacity 0.3s;
        z-index: 3;
    }

    .carousel-button:hover {
        background: white;
    }

    .carousel-button.prev {
        left: 20px;
    }

    .carousel-button.next {
        right: 20px;
    }

    .carousel:hover .carousel-button {
        opacity: 1;
    }

    /* 翻页按钮图标 */
    .carousel-button::after {
        content: '';
        display: inline-block;
        width: 15px;
        height: 15px;
        border-top: 3px solid #333;
        border-right: 3px solid #333;
    }

    .carousel-button.prev::after {
        transform: rotate(-135deg);
        margin-left: 3px;
    }

    .carousel-button.next::after {
        transform: rotate(45deg);
        margin-right: 3px;
    }

/* 咨询卡片样式 */
.consult-card {
    flex: 1;
    background: white;
    padding: 0 1.5rem 1rem;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: fit-content;
    position: sticky;
    top: 20px;
}
.consult-card h3{
    font-weight: 600;
    font-size: 1.75rem;
}
.consult-card button{
    padding: 10px 10px;
background: #007bff;
color: white;
border-radius: 25px;
}

.card img {
    width: 60px;
    margin-bottom: 1rem;
}

.process {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid #eee;
        position: relative;
        display: flex;
        gap: 2rem;
        justify-content: center;
    }

    .process-item {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 80px;
        z-index: 2;
    }

    .process-item span {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        background: white;
        border: 2px solid #007bff;
        color: #007bff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        position: relative;
        z-index: 2;
    }

    .process-item::after {
        content: '···';
        position: absolute;
        top: 15px;
        right: -25px;
        color: #007bff;
        font-weight: bold;
        z-index: 1;
    }

    .process-item:last-child::after {
        display: none;
    }

/* 服务特点样式 */
.features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1.5rem 0;
    background: #FFFFFFFF;
    max-width: 1200px;
    margin: 0 auto;
}

.feature {
    text-align: center;
    flex: 1;
    max-width: 250px;
}
.feature h3{
  font-size: 1rem;
  font-weight: 600;
}
.feature-number {
    font-size: 0.9rem;
    color: #007bff;
    margin-bottom: 0.5rem;
}
/*平台律师推荐*/
.lawyer-recommendation {
        
    padding: 40px 0;
}

.lawyer-recommendation .section-title {
  text-align: center;
font-size: 1.8rem;
margin-bottom: 40px;
font-weight: 600;
color: #333333;
}

.lawyers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.lawyer-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 20px 0 0 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s;
}

.lawyer-card:hover {
    transform: translateY(-5px);
}

.lawyer-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #007bff;
    margin-bottom: 15px;
}

.lawyer-name {
    color: rgb(0, 0, 0);
    font-size: 1.2rem;
    margin-bottom: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.specialties {
      color: rgba(7, 7, 7, 0.6);
      font-size: 0.9rem;
      line-height: 1.6;
      min-height: 60px;
      margin-bottom: 20px;
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      justify-content: center;
  }

  .specialty-tag {
      background: #dee2e6;
      padding: 5px 12px;
      border-radius: 15px;
      font-size: 0.85rem;
      white-space: nowrap;
  }

.consult-button {
    display: inline-block;
    padding: 10px 25px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.lawyer-card:hover .consult-button {
    opacity: 1;
    transform: translateY(0);
}

.button-bg {
    position: absolute;
    bottom: -50px;
    left: -50px;
    right: -50px;
    top: -50px;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(0);
    transition: all 0.4s ease;
    border-radius: 50%;
    z-index: 1;
}

.lawyer-card:hover .button-bg {
    transform: scale(2);
}
/*最新法律知识*/
.legal-knowledge {
    background: #f8f9fa;
    padding: 50px 0;
}

.legal-knowledge .section-title {
    text-align: center;
    font-size: 1.8rem;
    color: #2a2a2a;
    margin-bottom: 40px;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
}

.legal-knowledge .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #007bff;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.article-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-5px);
}

.article-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 3px solid #007bff;
}

.article-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.article-title {
    font-size: 1.1rem;
    color: #2a2a2a;
    margin-bottom: 15px;
    line-height: 1.4;
    flex: 1;
}

.article-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;

    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
    margin-top: auto;
}

.article-vives {
    font-size: 0.85rem;
    color: #999;
}

.read-more {
    font-size: 0.85rem;
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s;
}

.read-more:hover {
    color: #0056b3;
}
.category-section {
    padding: 40px 0;
    background: #f8f9fa;
}

.category-section .section-title {
    text-align: center;
    font-size: 1.8rem;
    color: #2a2a2a;
    margin-bottom: 40px;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
}

.category-section .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #007bff;
}
.category-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.category-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr)); /* 关键修改：确保三列等宽 */
      gap: 30px;
      width: 100%; /* 确保容器宽度占满 */
  }

  .category-block {
      background: white;
      border-radius: 15px;
      padding: 20px;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
      min-height: 300px; /* 统一最小高度 */
      display: flex;
      flex-direction: column;
  }

.category-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2a2a2a;
    padding-bottom: 15px;
    margin-bottom: 20px;
    border-bottom: 2px solid #007bff;
    display: inline-block;
}
  .knowledge-item.active {
      background: #f8f9fa;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  }
 
.knowledge-item {
      margin-bottom: 5px;
      padding: 5px;
      border-radius: 10px;
      transition: all 0.3s;
      cursor: pointer;
      position: relative;
      overflow: hidden;
      background: white;
  }

  .knowledge-item.active {
      background: #f8f9fa;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  }


  .item-meta {
      display: none;
      color: #666;
      font-size: 0.9rem;
      line-height: 1.5;
      margin-top: 10px;
      transition: all 0.3s;
  }

  /* 默认展开第一个条目 */
  .knowledge-item:first-child {
      padding: 20px;
      margin: -20px -20px 15px;
      border-radius: 10px 10px 0 0;
  }

  .knowledge-item:first-child .item-meta {
      display: block;
  }
.item-title {
    font-weight: bold;
    margin-bottom: 8px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.item-title a{
  color: #2a2a2a;
}


.item-date {
    color: #999;
    font-size: 0.85rem;
    margin-top: 5px;
}
.item-description{
overflow: hidden;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.zixun-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
    display: flex;
    gap: 30px;
}

/* 左侧最新法律咨询 */
.consultation-section {
    flex: 3;
    background: white;  /* 添加板块背景色 */
    padding: 20px;     /* 新增内边距 */
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.consultation-section h4, .hot-issues h4{
    margin-bottom: 20px; color: #222; border-left: 4px solid #1a73e8; padding-left: 10px;font-size: 20px;    font-weight: 600;
}

.consultation-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    padding: 20px;
    transition: transform 0.2s;
}

.consultation-card:hover {
    transform: translateY(-2px);
}

.consultation-card .card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 0.5rem 1rem;
border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.category-tag {
    background: #f0f0f0;
    color: #333;
    font-size: 0.875em;
    padding: 4px 12px;
    border-radius: 12px;
    margin-right: 10px;
}

.time-stamp {
    color: #666;
    font-size: 0.875em;
    margin-left: auto;
}

.consultation-title {
    color: #000;
    font-size: 1.125em;
    line-height: 1.4;
    margin-bottom: 10px;
    cursor: pointer;
    transition: color 0.2s;
}

.consultation-title:hover {
    color: #1557b0;
}
/* 统一标题样式 */
.zixun-container .section-title {
    font-size: 20px;
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 4px solid;
    line-height: 1;
}

/* 左侧标题特殊样式 */
.consultation-section .section-title {
    color: #1a73e8;
    border-color: #1a73e8;
}



/* 右侧热门关注 */
.hot-issues {
    flex: 2;
    background: white;  /* 添加板块背景色 */
    padding: 20px;     /* 新增内边距 */
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.hot-issues .section-title {
    color: #ff9800;
    border-color: #ff9800;
}
.issue-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.2s;
}

.issue-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.issue-icon {
    width: 20px;
    height: 20px;
    background: #ff9800;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    position: relative;
}

.issue-icon::after {
    content: "?";
    color: white;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
}

.issue-text {
    color: #333;
    line-height: 1.5;
}

/* 响应式设计 */
@media (max-width: 960px) {
    .carousel {
    position: relative;
width: 100%;
max-width: 100%;
height: 100%;
margin: 0 auto;
overflow: hidden;
aspect-ratio: 16 / 9; /* 保持16:9比例（可根据实际需求调整） */
background: #f0f0f0;
}
}
@media (max-width: 768px) {
    .zixun-container {
        flex-direction: column;
    }
    
    .consultation-section,
    .hot-issues {
        flex: none;
        width: 100%;
    }
    .category-grid{
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    

}
@media (max-width: 640px) {
    
    .category-grid{
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }
}
  /* 超小屏幕优化 */
  @media (max-width: 480px) {
    
    .category-grid{
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }
    .carousel-button {
      display: none; /* 隐藏按钮防止误触 */
    }
  }