/* ========== 锚点滚动偏移 ========== */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}
section, [id] {
    scroll-margin-top: 80px;
}

/* ========== 基础动画 ========== */
.animate-float {
    animation: float 3s ease-in-out infinite;
}
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-20px); }
}

/* ========== 移动端菜单 ========== */
.mobile-sidebar {
    transition: transform 0.3s ease;
    transform: translateX(100%);
}
.mobile-sidebar.active {
    transform: translateX(0);
}

/* ========== 文字样式 ========== */
.en-sub {
    letter-spacing: 2px;
    font-size: 0.9rem;
}

/* ========== 在租面积网格 ========== */
.grid-areas {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1024px) {
    .grid-areas {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 640px) {
    .grid-areas {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

/* ========== 图片基础比例（被卡片内覆盖） ========== */
.aspect-areas {
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

/* ========== 电话按钮仅手机显示 ========== */
.fixed-phone-btn {
    display: block;
}
@media (min-width: 768px) {
    .fixed-phone-btn {
        display: none;
    }
}

/* ========== 图片底色 ========== */
img {
    background-color: #f3f4f6;
}


/* ============================================
   在租面积卡片样式
   ============================================ */

/* 卡片整体 */
.area-card {
    border: 1px solid #eaeaea;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.area-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

/* 图片区域：PC 紧凑比例 */
.area-card .aspect-areas {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
}
.area-card .aspect-areas img {
    transition: transform 0.5s ease;
}
.area-card:hover .aspect-areas img {
    transform: scale(1.06);
}

/* 图片底部渐变遮罩 */
.img-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.25) 0%, transparent 40%);
    pointer-events: none;
}

/* 可租标签（左上角） */
.badge-avail {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #22c55e;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 999px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(34,197,94,0.35);
    z-index: 2;
}

/* 楼层标签（右上角） */
.badge-floor {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(4px);
    color: #1e293b;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    z-index: 2;
}

/* 卡片内容区 */
.card-body {
    padding: 0.65rem 0.75rem 0.6rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* 标题 */
.card-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.35;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 价格高亮条 */
.card-highlight {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0.6rem;
    background: linear-gradient(135deg, #fef2f2 0%, #fff7ed 100%);
    border-radius: 6px;
    margin-bottom: 0.5rem;
}
.highlight-price {
    display: flex;
    align-items: baseline;
}
.price-num {
    font-size: 1.15rem;
    font-weight: 800;
    color: #dc2626;
    line-height: 1;
}
.price-unit {
    font-size: 0.6rem;
    color: #9ca3af;
    margin-left: 2px;
}
.highlight-area {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1e40af;
}

/* 标签组 */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 0.5rem;
}
.tag-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.6rem;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
}
.tag-item i {
    font-size: 0.55rem;
    color: #94a3b8;
}

/* 底部操作栏 */
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.5rem;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}
.footer-note {
    font-size: 0.62rem;
    color: #94a3b8;
}
.footer-note i {
    margin-right: 2px;
    color: #22c55e;
    font-size: 0.58rem;
}
.footer-btn {
    font-size: 0.65rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    padding: 3px 12px;
    border-radius: 999px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 4px rgba(37,99,235,0.25);
}
.footer-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(37,99,235,0.35);
}


/* ============================================
   手机端：卡片适当放大，更好触摸
   ============================================ */
@media (max-width: 640px) {

    /* 图片比例在手机上稍高一点 */
    .area-card .aspect-areas {
        aspect-ratio: 4 / 3;
    }

    .card-body {
        padding: 0.75rem;
    }

    .card-title {
        font-size: 0.82rem;
        margin-bottom: 0.6rem;
    }

    .card-highlight {
        padding: 0.5rem 0.6rem;
        margin-bottom: 0.55rem;
    }

    .price-num {
        font-size: 1.2rem;
    }

    .price-unit {
        font-size: 0.65rem;
    }

    .highlight-area {
        font-size: 0.9rem;
    }

    .card-tags {
        gap: 5px;
        margin-bottom: 0.55rem;
    }

    .tag-item {
        font-size: 0.65rem;
        padding: 3px 8px;
    }

    .badge-avail {
        font-size: 0.7rem;
        padding: 3px 11px;
        top: 10px;
        left: 10px;
    }

    .badge-floor {
        font-size: 0.7rem;
        padding: 3px 9px;
        top: 10px;
        right: 10px;
    }

    .footer-btn {
        font-size: 0.7rem;
        padding: 4px 14px;
    }

    .footer-note {
        font-size: 0.68rem;
    }
}

/* 实景仅供参考标签（图片右下角） */
.badge-ref {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.55rem;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 2;
    pointer-events: none;
}

@media (max-width: 640px) {
    .badge-ref {
        font-size: 0.6rem;
        padding: 2px 7px;
        bottom: 10px;
        right: 10px;
    }
}
