.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 文本截断样式 */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    line-height: 1.4;
    max-height: 2.8em; /* 2行的高度 */
}

.line-clamp-5 {
    display: -webkit-box !important;
    -webkit-line-clamp: 5 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    word-break: break-word;
    line-height: 1.4 !important;
    max-height: 7.5em !important; /* 5行的高度，调整更准确 */
    white-space: normal !important; /* 确保可以换行 */
}

/* 移动端菜单样式 */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 82, 204, 0.95);
    z-index: 50;
    padding: 2rem;
}

.mobile-menu.active {
    display: block;
}

body.overflow-hidden {
    overflow: hidden;
}

/* 区域楼宇静态样式 */

/* 载体卡片样式 - 设置固定宽度 */
.building-card {
    width: 280px;
    min-width: 280px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    overflow: hidden;
    flex-shrink: 0;
}

/* 载体标题样式 - 限制为两行显示 */
.building-title:hover {
    color: #0052D9; /* 鼠标悬停时标题变蓝 */
}

.building-title {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    word-break: break-word !important;
    line-height: 1.4 !important;
    max-height: 2.8em !important;
    white-space: normal !important;
    font-size: 1.125rem !important;
    font-weight: 500 !important;
    margin-bottom: 0.5rem !important;
}

.building-meta {
    font-size: 0.875rem; /* 调小字号 */
    color: #999; /* 浅灰色 */
}

        /* 街区动态静态样式 */

/* 服务卡片样式 */
.service-grid {
    display: flex;
    gap: 20px;
    height: 400px;
    overflow: hidden;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}

.service-card {
    display: flex;
    width: 180px;
    height: 400px;
    border-radius: 2px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.service-card:hover {
    width: 400px;
    z-index: 5;
}

.service-card.active {
    width: 400px;
    z-index: 5;
}

.service-card.active .card-details {
    width: 220px;
    padding: 20px 15px;
}

.service-grid:hover .service-card:not(:hover):not(.active) {
    width: 180px;
}

.service-grid:hover .service-card:not(:hover):not(.active) .card-details {
    width: 0;
    padding: 0;
}

.card-main {
    width: 180px;
    height: 400px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.service-card:hover .card-main {
    width: 180px;
}

.card-bg {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.service-card:hover .card-bg {
    transform: scale(1.05);
}

.card-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 30px 20px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.service-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}

.view-more-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.view-more-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.card-details {
    width: 0;
    overflow: hidden;
    background: white;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    padding: 0;
    height: 400px;
}

.service-card:hover .card-details {
    width: 220px;
    padding: 20px 15px;
}

.detail-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.detail-item {
    text-align: center;
    padding: 15px 8px;
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item:hover {
    background: #f5f5f5;
    color: #4d69f6;
}

.detail-text {
    font-size: 14px;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .service-grid {
        flex-direction: column;
        height: auto;
        gap: 15px;
    }
    
    .service-card {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    /* H5版本只显示第一个卡片 */
    .service-card:not(:first-child) {
        display: none;
    }
    
    /* 第一个卡片默认展开显示内容 */
    .service-card:first-child {
        width: 100%;
        max-width: 400px;
    }
    
    .service-card:first-child .card-main {
        width: 50%;
    }
    
    .service-card:first-child .card-details {
        width: 50%;
        padding: 10px;
    }
    
    .service-card:hover {
        width: 100%;
        max-width: 400px;
    }
    
    .card-main {
        width: 100%;
    }
    
    .service-card:hover .card-main {
        width: 50%;
    }
    
    .service-card:hover .card-details {
        width: 50%;
        padding: 10px;
    }
}



/* 移除按钮默认的focus和active样式 */
button:focus {
    outline: none;
    box-shadow: none;
}

button:active {
    background-color: transparent;
    transform: none;
}

/* 移除所有按钮的默认样式和背景 */
  .tab-button,
  .tab-button:hover,
  .tab-button:focus,
  .tab-button:active,
  .tab-button:visited {
      background-color: transparent !important;
      outline: none !important;
      box-shadow: none !important;
      border: none !important;
  }
  
  /* 默认和hover状态的文本颜色 */
    .tab-button {
        color: #4B5563; /* gray-600 */
    }
    
    .tab-button:hover {
        color: #111827; /* gray-900 */
    }
    
    /* 激活状态的文本颜色 */
    .tab-button.active {
        color: #111827 !important; /* gray-900 */
    }

.interactive-list-item {
    position: relative;
    cursor: pointer;
    display: inline-block;
}

.interactive-list-item .underline {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #0052FF; /* primary color */
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease-in-out;
}

.interactive-list-item:hover .underline {
    transform: scaleX(1);
}

  /* 非激活状态：默认隐藏下划线，hover时显示下划线 */
    .tab-button:not(.active) .tab-underline {
        transform: scaleX(0);
    }
    
    .tab-button:not(.active):hover .tab-underline {
        transform: scaleX(1);
    }
    
    /* 激活状态：始终显示下划线 */
    .tab-button.active .tab-underline {
        transform: scaleX(1) !important;
    }
    
/* 移动端服务卡片滑动样式 */
.service-cards-container {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.service-indicator {
    cursor: pointer;
    transition: all 0.3s ease;
}

.service-indicator.active {
    background-color: #3B82F6 !important;
}