/* 附近在装工地页面样式 */
.local-nearby-page {
    min-height: 100vh;
    background: var(--bg-light, #f9fafb);
    padding-top: 0;
    position: relative;
    z-index: 1;
}

/* Hero区域 */
.local-nearby-hero {
    padding: calc(var(--header-height, 64px) + 80px + 71px) 0 85px;
    margin-top: 0;
    background: linear-gradient(135deg, var(--primary-color, #F58C45) 0%, var(--primary-dark, #E07A35) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.local-nearby-hero .hero-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.local-nearby-hero .hero-left {
    flex: 1;
}

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

.local-nearby-hero .page-title {
    font-size: 48px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: white;
}

.local-nearby-hero .hero-desc {
    font-size: 18px;
    opacity: 0.95;
    margin: 0;
    line-height: 1.6;
}

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

.local-location-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 {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

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

/* 筛选区域 */
.local-nearby-filter {
    padding: 30px 0;
    background: white;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.filter-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.category-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.category-item {
    padding: 8px 20px;
    border-radius: var(--radius-full, 9999px);
    background: var(--bg-light, #f9fafb);
    color: var(--text-color, #1f2937);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.category-item:hover {
    background: var(--primary-light, #fef3e8);
    color: var(--primary-color, #F58C45);
}

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

.category-list {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* 内容区域 */
.local-nearby-content {
    padding: 40px 0 80px;
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    align-items: start;
}

/* 地图容器 */
.map-container {
    position: sticky;
    top: 100px;
    height: calc(100vh - 120px);
    min-height: 600px;
    border-radius: var(--radius-large, 12px);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nearby-map {
    width: 100%;
    height: 100%;
}

/* 列表容器 */
.list-container {
    background: white;
    border-radius: var(--radius-large, 12px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.list-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.list-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color, #1f2937);
    margin: 0;
}

.site-count {
    font-size: 14px;
    color: var(--text-secondary, #6b7280);
    background: var(--bg-light, #f9fafb);
    padding: 4px 12px;
    border-radius: var(--radius-full, 9999px);
}

.site-list {
    max-height: calc(100vh - 250px);
    overflow-y: auto;
}

.site-item {
    display: flex;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    cursor: pointer;
    transition: background 0.2s;
    text-decoration: none;
    color: inherit;
}

.site-item:hover {
    background: var(--bg-light, #f9fafb);
}

.site-item:last-child {
    border-bottom: none;
}

.site-image {
    width: 100px;
    height: 80px;
    flex-shrink: 0;
    border-radius: var(--radius-medium, 8px);
    overflow: hidden;
    margin-right: 16px;
}

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

.site-info {
    flex: 1;
    min-width: 0;
}

.site-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color, #1f2937);
    margin: 0 0 8px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-address {
    font-size: 14px;
    color: var(--text-secondary, #6b7280);
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.empty-state {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-secondary, #6b7280);
}

.load-more-btn {
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--border-color, #e5e7eb);
}

.load-more-btn button {
    padding: 10px 30px;
    background: var(--primary-color, #F58C45);
    color: white;
    border: none;
    border-radius: var(--radius-medium, 8px);
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.load-more-btn button:hover {
    background: var(--primary-dark, #E07A35);
}

/* 地图信息窗口样式 */
.map-info-window {
    padding: 10px;
    min-width: 200px;
}

.map-info-window h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--text-color, #1f2937);
}

.map-info-window p {
    font-size: 14px;
    color: var(--text-secondary, #6b7280);
    margin: 0 0 10px 0;
}

.map-info-window .view-details {
    display: inline-block;
    padding: 6px 16px;
    background: var(--primary-color, #F58C45);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-medium, 8px);
    font-size: 14px;
    transition: background 0.2s;
}

.map-info-window .view-details:hover {
    background: var(--primary-dark, #E07A35);
}

/* 工地详情弹窗样式 */
.site-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10002;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow-y: auto;
    padding: calc(var(--header-height, 64px) + 80px + 20px) 0 20px;
}

.site-detail-modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10003;
}

.modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius-large, 12px);
    max-width: 900px;
    margin: 0 auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    z-index: 10004;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.site-detail-modal.show .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 24px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10005;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.7);
    transform: scale(1.1);
}

.modal-body {
    padding: 0;
}

/* 轮播图 */
.site-banner {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    background: #f5f5f5;
}

.banner-swiper {
    position: relative;
    width: 100%;
    height: 100%;
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.banner-slide.active {
    opacity: 1;
    z-index: 1;
}

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

.banner-indicators {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

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

.indicator.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

/* 信息区域 */
.site-info {
    padding: 24px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.site-name {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color, #1f2937);
    margin: 0 0 16px 0;
    line-height: 1.4;
}

.site-company {
    margin-bottom: 16px;
}

.company-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.company-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-medium, 8px);
    object-fit: cover;
}

.company-name {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-color, #1f2937);
    cursor: pointer;
}

.company-name:hover {
    color: var(--primary-color, #F58C45);
}

.company-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary, #6b7280);
}

.company-phone .icon {
    width: 16px;
    height: 16px;
}

.site-address {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--text-secondary, #6b7280);
    line-height: 1.6;
}

.site-address .icon {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.address-text {
    flex: 1;
}

.site-date {
    display: inline-block;
    padding: 6px 12px;
    background: var(--bg-light, #f9fafb);
    border-radius: var(--radius-medium, 8px);
    font-size: 14px;
    color: var(--text-secondary, #6b7280);
}

/* 详情内容 */
.site-detail-content {
    padding: 24px;
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-color, #1f2937);
}

.site-detail-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-medium, 8px);
    margin: 16px 0;
}

.site-detail-content p {
    margin: 12px 0;
}

/* 底部按钮 */
.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-color, #e5e7eb);
    background: white;
    position: sticky;
    bottom: 0;
}

.book-view-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary-color, #F58C45);
    color: white;
    border: none;
    border-radius: var(--radius-medium, 8px);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.book-view-btn:hover {
    background: var(--primary-dark, #E07A35);
}

/* 预约观看弹窗样式（本地页与附近工地页共用） */
.appointment-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10006;
}

.appointment-modal.show {
    display: flex;
}

.appointment-modal .modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.appointment-modal .modal-content {
    position: relative;
    background: #fff;
    border-radius: var(--radius-large, 12px);
    box-shadow: var(--shadow-large, 0 20px 40px rgba(15,23,42,0.32));
    width: min(540px, 94vw);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.appointment-modal .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(15,23,42,0.04);
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
}

.appointment-modal .modal-body {
    padding: 24px 24px 8px;
}

.appointment-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.appointment-form .form-group {
    margin-bottom: 16px;
}

.appointment-form label {
    display: block;
    font-size: 14px;
    color: #555;
    margin-bottom: 6px;
}

.appointment-form input,
.appointment-form textarea {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border-color, #e5e7eb);
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.appointment-form input:focus,
.appointment-form textarea:focus {
    border-color: var(--primary-color, #F58C45);
    box-shadow: 0 0 0 1px rgba(245,140,69,0.18);
}

.appointment-modal .modal-footer {
    padding: 16px 24px 24px;
    border-top: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    justify-content: flex-end;
}

.appointment-modal .book-view-btn {
    width: 160px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
    
    .map-container {
        position: relative;
        top: 0;
        height: 500px;
        min-height: 500px;
    }
    
    .site-list {
        max-height: none;
    }
}

@media (max-width: 768px) {
    /* 1. 缩小 Hero 区域高度与内边距，适配手机 */
    .local-nearby-hero {
        padding: calc(var(--header-height, 64px) + 40px) 0 40px;
    }

    .local-nearby-hero .container {
        max-width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }

    .local-nearby-hero .hero-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    /* 2. 标题与描述文字缩小，与本地页保持一致风格 */
    .local-nearby-hero .page-title {
        font-size: 28px;
    }
    
    .local-nearby-hero .hero-desc {
        font-size: 14px;
        line-height: 1.6;
    }

    /* 3. 选择城市按钮缩小 */
    .local-hero-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .local-location-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .local-location-btn i {
        font-size: 12px;
    }
    
    .category-filter {
        gap: 8px;
    }
    
    .category-item {
        padding: 6px 16px;
        font-size: 13px;
    }
    
    /* 4. 让弹窗居中在页面中间 */
    .site-detail-modal {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 20px;
    }
    
    .site-detail-modal.show {
        display: flex;
    }
    
    .modal-content {
        margin: 0;
        max-width: 94vw;
        transform: none;
    }
    
    .site-detail-modal.show .modal-content {
        transform: none;
    }
    
    /* 4. 缩小关闭按钮 */
    .modal-close {
        width: 28px;
        height: 28px;
        font-size: 18px;
        top: 12px;
        right: 12px;
    }
    
    .site-banner {
        height: 300px;
    }
    
    .site-info {
        padding: 20px;
    }
    
    .site-name {
        font-size: 20px;
    }
    
    .site-detail-content {
        padding: 20px;
        font-size: 14px;
    }
}

