/* 本地页面样式 - 与网站整体风格一致 */
.local-page {
    min-height: 100vh;
    background: var(--bg-color, #f7f7f7);
    padding-top: var(--header-height, 80px);
    position: relative;
    z-index: 1;
    overflow-x: hidden;
    width: 100%;
}

/* Hero区域 - 与price.html等页面保持一致 */
.local-hero {
    padding: 100px 0 80px;
    background: linear-gradient(135deg, var(--primary-color, #F58C45) 0%, var(--primary-dark, #E07A35) 100%);
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
}

.local-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="10" cy="60" r="0.5" fill="rgba(255,255,255,0.05)"/><circle cx="90" cy="40" r="0.5" fill="rgba(255,255,255,0.05)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.local-hero .container {
    position: relative;
    z-index: 2;
    width: 100%;
}

.local-hero .hero-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    min-height: 300px;
}

.local-hero .hero-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.local-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 20px 0;
    color: white;
}

.local-hero .hero-desc {
    font-size: 18px;
    line-height: 1.6;
    opacity: 0.95;
    margin: 0;
    color: rgba(255, 255, 255, 0.95);
}

.local-hero .hero-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: flex-end;
}

.local-hero-actions {
    display: flex;
    gap: 16px;
    align-items: center;
}

.local-location-btn,
.local-search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-large, 12px);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.local-location-btn:hover,
.local-search-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.local-location-btn i,
.local-search-btn i {
    font-size: 16px;
}

.local-city-display {
    font-size: 32px;
    font-weight: 600;
    color: white;
    text-align: right;
}

/* 分类选择区域 */
.local-category-section {
    background: var(--bg-white, #ffffff);
    padding: 24px 0;
    position: sticky;
    top: var(--header-height, 80px);
    z-index: 97;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.local-category-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 20px;
}

.local-category-container::-webkit-scrollbar {
    display: none;
}

.local-category-item {
    padding: 0 20px;
    height: 48px;
    border-radius: var(--radius-medium, 8px);
    border: 1px solid var(--border-color, #d1d5db);
    text-align: center;
    line-height: 48px;
    color: var(--text-color, #1f2937);
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.local-category-item:hover {
    border-color: var(--primary-color, #F58C45);
    color: var(--primary-color, #F58C45);
}

.local-category-item.active {
    background-color: var(--primary-color, #F58C45);
    border-color: var(--primary-color, #F58C45);
    color: white;
}

.local-category-list {
    display: flex;
    gap: 16px;
}

/* 内容区域 - 统一section样式 */
.local-content-section {
    padding: 60px 0;
    background: var(--bg-white, #ffffff);
}

.local-content-section:nth-child(even) {
    background: var(--bg-color, #f7f7f7);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color, #1f2937);
    margin: 0;
}

.section-more {
    color: var(--text-secondary, #6b7280);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.section-more:hover {
    color: var(--primary-color, #F58C45);
}

.section-more::after {
    content: '→';
    font-size: 18px;
}

/* 附近工地滚动区域 */
.local-near-scroll,
.local-activity-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
}

.local-near-scroll::-webkit-scrollbar,
.local-activity-scroll::-webkit-scrollbar {
    height: 6px;
}

.local-near-scroll::-webkit-scrollbar-track,
.local-activity-scroll::-webkit-scrollbar-track {
    background: var(--bg-color, #f1f1f1);
    border-radius: 3px;
}

.local-near-scroll::-webkit-scrollbar-thumb,
.local-activity-scroll::-webkit-scrollbar-thumb {
    background: var(--text-secondary, #888);
    border-radius: 3px;
}

.local-near-scroll::-webkit-scrollbar-thumb:hover,
.local-activity-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--text-color, #555);
}

.local-near-list,
.local-activity-list {
    display: flex;
    gap: 20px;
    padding-bottom: 10px;
}

/* 附近工地项目 */
.local-near-item {
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
    flex-shrink: 0;
    width: 218px;
}

.local-near-item:hover {
    transform: translateY(-4px);
}

.local-near-item img {
    width: 100%;
    height: 218px;
    object-fit: cover;
    border-radius: var(--radius-large, 12px);
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
}

.local-near-item:hover img {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.local-near-item-title {
    color: var(--text-color, #1f2937);
    font-weight: 500;
    font-size: 16px;
    margin-top: 12px;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 活动项目 */
.local-activity-item {
    width: 400px;
    height: 250px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s;
    flex-shrink: 0;
    border-radius: var(--radius-large, 12px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: var(--bg-white, #ffffff);
    text-decoration: none;
    color: inherit;
}

.local-activity-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.local-activity-image-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.local-activity-item img {
    height: 100%;
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.local-activity-page {
    padding: 80px 0;
}

.local-activity-page .activity-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.local-activity-page .activity-header h1 {
    margin: 0;
    font-size: 32px;
    color: var(--text-color, #1f2937);
}

.activity-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.activity-toolbar .btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 999px;
    background: var(--bg-white, #fff);
    border: 1px solid rgba(0,0,0,0.08);
    color: var(--text-color, #1f2937);
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.activity-toolbar .btn-back:hover {
    background: var(--primary-light, rgba(255,87,51,0.08));
    color: var(--primary-color, #ff5733);
    border-color: var(--primary-color, #ff5733);
}

.local-activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.local-activity-grid .local-activity-item {
    width: 100%;
    height: 220px;
}

.activity-loading,
.activity-empty {
    text-align: center;
    color: var(--text-secondary, #6b7280);
    padding: 40px 0;
    font-size: 16px;
}

.activity-loading {
    display: none;
}

.activity-empty {
    display: none;
}

/* 空状态 */
.local-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary, #6b7280);
}

.local-empty p {
    margin: 0;
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .local-hero .hero-row {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .local-hero .hero-right {
        align-items: flex-start;
    }
    
    .local-city-display {
        text-align: left;
    }
}

@media (max-width: 768px) {
    /* 防止整个页面水平滚动 */
    html, body {
        overflow-x: hidden;
        max-width: 100%;
    }
    
    .local-page {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    .local-hero {
        padding: 60px 0 40px;
        min-height: 300px;
        overflow-x: hidden;
    }
    
    .local-hero .container {
        max-width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .local-hero .hero-row {
        gap: 20px;
        min-height: auto;
    }
    
    .local-title {
        font-size: 28px;
        word-wrap: break-word;
    }
    
    .local-hero .hero-desc {
        font-size: 14px;
        word-wrap: break-word;
    }
    
    /* 1. 优化位置布局：缩小选择城市按钮和城市名称 */
    .local-hero .hero-right {
        align-items: flex-start;
        gap: 12px;
        width: 100%;
        max-width: 100%;
    }
    
    .local-hero-actions {
        flex-direction: row;
        width: 100%;
        max-width: 100%;
        gap: 10px;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .local-location-btn {
        padding: 6px 12px;
        font-size: 12px;
        white-space: nowrap;
        width: auto;
        max-width: 100%;
    }
    
    .local-location-btn i {
        font-size: 12px;
    }
    
    .local-search-btn {
        padding: 6px 12px;
        font-size: 12px;
        width: auto;
        max-width: 100%;
    }
    
    /* 隐藏选择地址下面的地址显示 */
    .local-city-display {
        display: none !important;
    }
    
    .local-content-section {
        padding: 40px 0;
        overflow-x: hidden;
    }
    
    .local-content-section .container {
        max-width: 100%;
    }
    
    /* 2&3. 统一标题和更多按钮水平线，缩小字体 */
    .section-header {
        align-items: center;
        margin-bottom: 20px;
    }
    
    .section-title {
        font-size: 18px;
    }
    
    .section-more {
        font-size: 13px;
    }
    
    /* 防止横向滚动容器导致整页横向滚动 */
    .local-near-scroll,
    .local-activity-scroll {
        margin: 0 -16px;
        padding: 0 16px;
        overflow-x: auto;
        overflow-y: hidden;
    }
    
    .local-near-item {
        width: 160px;
    }
    
    .local-near-item img {
        height: 160px;
    }
    
    .local-activity-item {
        width: 300px;
        height: 200px;
    }
    
    .local-category-section {
        padding: 16px 0;
        overflow-x: hidden;
    }
    
    .local-category-container {
        padding: 0 16px;
    }
    
    .local-category-item {
        height: 40px;
        line-height: 40px;
        padding: 0 16px;
        font-size: 13px;
    }
}


/* 2026-09-20 活动卡片补标题(和 App 的活动卡一致:图 + 标题) */
.local-activity-title {
    padding: 10px 12px 0;
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.local-activity-summary {
    padding: 4px 12px 12px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
