/* Real Estate page (realestate.html) - Flat Design */

.realestate-page {
    --realestate-accent: #1A365D;
    /* Deep Navy */
    --realestate-accent-dark: #102A43;
    --realestate-accent-soft: rgba(26, 54, 93, 0.1);
    --realestate-accent-strong: rgba(26, 54, 93, 0.9);
    --realestate-secondary: #4A5568;
    --realestate-gradient: var(--realestate-accent);
    --realestate-gradient-warm: #FFFFFF;
    --realestate-glass: #ffffff;
    --realestate-glass-border: var(--realestate-border);
    --realestate-shadow-soft: none;
    --realestate-shadow-hover: none;

    --realestate-text: #2D3748;
    --realestate-muted: #718096;
    --realestate-border: #E2E8F0;
    --realestate-bg: #FFFFFF;
    --realestate-bg-warm: #FFFFFF;

    --realestate-radius: 12px;
    --realestate-radius-lg: 16px;
    --realestate-shadow: none;

    background: var(--realestate-bg);
}

.realestate-page main {
    position: relative;
    /* Keep overflow visible so sticky section nav can attach to the viewport */
}

/* Clean white background - removed decorative gradients for minimal style */
/* .realestate-page main::before and ::after removed for clean design */

/* Section styles - solid white background */
.realestate-intro,
.sub-section {
    position: relative;
    background-color: #ffffff !important;
}

/* Split hero layout */
.realestate-hero {
    position: relative;
    min-height: 750px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.6) 0%, transparent 100%);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    overflow: hidden;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    color: var(--realestate-text);
}

.realestate-hero::before {
    content: none;
}

.realestate-hero-media {
    position: absolute;
    top: 0px;
    right: 0;
    z-index: 0;
    width: 83vw !important;
    height: 100% !important;
    background-size: cover;
    background-position: center;
    border-radius: 0;
    box-shadow: none;
    opacity: 0.85;
    transition: opacity 0.4s ease;
    will-change: transform;
    mask-image: linear-gradient(to left, black 70%, transparent 100%), linear-gradient(to bottom, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, black 70%, transparent 100%), linear-gradient(to bottom, black 85%, transparent 100%);
    mask-composite: intersect;
    -webkit-mask-composite: source-in;
}

.realestate-hero:hover .realestate-hero-media {
    opacity: 0.95;
}

.realestate-hero .container {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    width: min(560px, 92%);
    margin-left: clamp(16px, 6vw, 80px);
    margin-right: auto;
}

.realestate-hero-eyebrow {
    font-size: 1.2rem;
    letter-spacing: 0.2rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    /* 移除左边距以对齐下方内容 */
    color: var(--realestate-secondary);
    text-transform: uppercase;
}

.realestate-hero-title {
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-size: clamp(3.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    font-weight: 900;
    margin: 0 0 15px 0;
    /* 移除左边距以对齐下方内容 */
    color: var(--realestate-text);
}

.realestate-hero-lead {
    font-size: 1.1rem;
    font-weight: 500;
    color: #6b7280;
    margin: 0 0 15px 0;
    /* 移除左边距以对齐下方内容 */
}

/* 默认隐藏滚动指示器（仅手机端显示） */
.realestate-scroll-indicator {
    display: none;
}

@media (max-width: 900px) {
    .realestate-hero {
        min-height: 520px;
        flex-direction: row;
        align-items: flex-end;

        /* [用户设置] 这里的数值越大，文字离底部越高 */
        padding-bottom: 60px !important;

        /* 允许文字溢出到图片下方 */
        overflow: visible !important;

        /* [用户设置] hero下方空白区域 - 调整数值控制空白大小 */
        /* 让首屏只显示hero，后面的内容需要向下滚动才能看到 */
        margin-bottom: 250px !important;
    }

    .realestate-hero-media {
        position: absolute;
        top: 0;
        right: 0;

        /* [用户设置] 手机端图片尺寸 */
        width: 70vw !important;
        height: 100% !important;

        border-radius: 0;
    }

    .realestate-hero .container {
        /* [位置精调] 改用绝对定位 */
        position: absolute !important;
        width: 100% !important;

        /* [位置控制 - 左右] */
        left: 0px !important;
        padding-left: 10px !important;

        /* [位置控制 - 上下] */
        /* 文字顶部与图片底部对齐 - 调整数值可微调位置 */
        /* 数值越大，文字越靠近底部 */
        top: 480px !important;
        bottom: auto !important;

        /* [用户设置] 手机端文字区域宽度 */
        max-width: 80% !important;
        z-index: 5;

        /* flexbox调整 */
        justify-content: flex-start !important;
        align-items: flex-start !important;
    }

    .realestate-hero-eyebrow,
    .realestate-hero-title,
    .realestate-hero-lead {
        color: inherit;
        text-shadow: none;
    }

    .realestate-hero-title {
        color: #383838;

        /* [用户设置] 手机端标题字号 */
        font-size: 2.4rem;
    }

    .realestate-hero-eyebrow {
        color: #4b5563;
        font-size: 1.2rem;
    }

    .realestate-hero-lead {
        color: #6b7280;
        font-size: 1rem;
    }

    /* 手机端滚动指示器样式 */
    .realestate-scroll-indicator {
        position: absolute;
        right: 30px;
        bottom: -180px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        z-index: 10;
    }

    .realestate-scroll-text {
        writing-mode: vertical-rl;
        text-orientation: mixed;
        font-size: 0.85rem;
        font-weight: 500;
        letter-spacing: 0.15em;
        color: #6b7280;
    }

    .realestate-scroll-line {
        width: 1px;
        height: 60px;
        background: linear-gradient(to bottom, #6b7280 0%, transparent 100%);
        animation: realestateScrollLineAnim 1.5s ease-in-out infinite;
    }

    @keyframes realestateScrollLineAnim {

        0%,
        100% {
            opacity: 0.4;
            transform: scaleY(0.8);
        }

        50% {
            opacity: 1;
            transform: scaleY(1);
        }
    }
}

/* Intro Section matching the nursing layout */
.realestate-intro {
    padding: 80px 0;
}

.realestate-intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: flex-start;
    /* 与 hero container 使用相同的左边距对齐 */
    max-width: none;
    margin-left: clamp(16px, 6vw, 80px);
    margin-right: auto;
    padding-right: clamp(16px, 6vw, 80px);
}

.realestate-intro-text {
    padding-top: 100px;
}

.realestate-intro-media {
    border-radius: var(--realestate-radius);
    overflow: hidden;
    box-shadow: var(--realestate-shadow);
    background: #eee;
    margin-top: 210px;
}

.realestate-intro-media img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.realestate-section-title {
    font-size: 2rem;
    margin-bottom: 34px;
    padding-left: 18px;
    border-left: 4px solid var(--realestate-accent);
    line-height: 1.25;
}

/* Reusing grid styles */
.points-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.point-card {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-top: 4px solid var(--realestate-accent);
}

/* ========================================
   不動産ページ専用カラーオーバーライド
   ======================================== */

/* 数字圓圈 - 黑灰色 */
.subpage .point-number {
    background: var(--realestate-accent);
    color: #fff;
}

/* 卡片标题颜色 */
.subpage .point-title {
    color: var(--realestate-accent);
}

/* sub-section标题 - 左边框和文字颜色 */
.subpage .sub-section-title {
    color: var(--realestate-accent);
    border-left-color: var(--realestate-accent);
}

/* 服务列表勾选图标 - 黑灰色 */
.subpage .service-list li::before {
    color: var(--realestate-accent);
}

/* 表单聚焦边框 */
.subpage .form-control:focus {
    border-color: var(--realestate-accent);
    box-shadow: 0 0 0 3px var(--realestate-accent-soft);
}

/* 按钮样式覆盖 */
.subpage .btn-primary {
    background: var(--realestate-accent);
    border-color: var(--realestate-accent);
}

.subpage .btn-primary:hover {
    background: var(--realestate-accent-dark);
    border-color: var(--realestate-accent-dark);
}

@media (max-width: 900px) {
    .realestate-intro-grid {
        grid-template-columns: 1fr;
    }

    .realestate-intro-media {
        margin-top: 24px;
    }

    .realestate-intro-text {
        padding-top: 0;
    }

    .points-grid {
        grid-template-columns: 1fr;
    }
}

/* CTA Section */
.realestate-cta {
    padding: 100px 0;
    background: #F8F9FA;
    border-top: 1px solid var(--realestate-border);
    position: relative;
    z-index: 2;
}

.realestate-cta-inner {
    background: transparent;
    border-radius: 0;
    padding: 10px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--realestate-text);
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.realestate-cta-inner::before {
    content: none;
}

.realestate-cta-text {
    max-width: 60%;
}

.realestate-cta-title {
    font-size: 2.5rem;
    font-family: 'Zen Kaku Gothic New', sans-serif;
    font-weight: 800;
    margin-bottom: 16px;
    color: var(--realestate-text);
    border-left: none;
}

.realestate-cta-lead {
    font-size: 1.15rem;
    color: var(--realestate-muted);
    opacity: 1;
    margin: 0;
    line-height: 1.6;
}

.realestate-cta-actions {
    flex-shrink: 0;
}

.realestate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 48px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.15rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    cursor: pointer;
}

.realestate-btn-primary {
    background: #fff;
    color: var(--realestate-accent);
}

.realestate-btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    background: #f8fafc;
}

/* Mobile Quick Bar */
.realestate-mobile-quickbar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 10px;
    display: none;
    gap: 10px;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(17, 24, 39, 0.08);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 999;
}

.realestate-mobile-quickbar-item {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 800;
    color: var(--realestate-text);
    border: 1px solid var(--realestate-border);
    background: #fff;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.realestate-mobile-quickbar-item.is-primary {
    background: var(--realestate-accent);
    color: #fff;
    border-color: var(--realestate-accent);
}

.realestate-mobile-quickbar-item:active {
    opacity: 0.8;
    transform: scale(0.98);
}

@media (max-width: 900px) {
    .realestate-cta-inner {
        flex-direction: column;
        text-align: center;
        padding: 40px 24px;
        gap: 32px;
    }

    .realestate-cta-text {
        max-width: 100%;
    }

    .realestate-cta-title {
        font-size: 2rem;
    }

    .realestate-mobile-quickbar {
        display: flex;
    }
}

/* ========================================
   Page Section Navigation
   ======================================== */
.realestate-section-nav {
    background: #ffffff;
    border-top: 1px solid var(--realestate-border);
    border-bottom: 1px solid var(--realestate-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.realestate-nav-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    padding: 18px 0;
}

.realestate-nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 12px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
    color: var(--realestate-text);
    border: 1px solid var(--realestate-border);
    background: #fff;
    transition: all 0.2s ease;
    text-align: center;
    min-height: 50px;
    line-height: 1.2;
}

.realestate-nav-item:hover {
    border-color: var(--realestate-accent);
    background: var(--realestate-accent-soft);
    transform: translateY(-2px);
}

.realestate-nav-item.is-highlight {
    border-color: var(--realestate-accent);
    background: var(--realestate-accent-soft);
}

/* ========================================
   Enhanced Service List as Cards
   ======================================== */
.realestate-page .service-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.realestate-page .service-list li {
    background: #ffffff;
    border: 1px solid var(--realestate-border);
    border-radius: 16px;
    padding: 20px 24px;
    padding-left: 48px;
    position: relative;
    font-weight: 600;
    color: var(--realestate-text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.5;
}

.realestate-page .service-list li::before {
    content: '✓';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: var(--realestate-accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.realestate-page .service-list li:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--realestate-border);
}

/* ========================================
   Enhanced Point Cards
   ======================================== */
.realestate-page .point-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.realestate-page .point-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--realestate-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.realestate-page .point-card:hover {
    transform: none;
    box-shadow: none;
}

.realestate-page .point-card:hover::after {
    opacity: 0;
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 900px) {
    .realestate-nav-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .realestate-nav-item {
        padding: 10px 8px;
        font-size: 0.9rem;
        min-height: 44px;
    }

    .realestate-page .service-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .realestate-page .service-list {
        grid-template-columns: 1fr;
    }
}