/* ---------- 基础 ---------- */
:root {
    --header-h: 84px; /* 初始高度 */
    --header-h-sm: 56px; /* 收缩后高度 */
    --pad-x: 40px;
    --pad-x-sm: 24px;
    --bg: #f4f1ed;
    --bg-scrolled: rgba(244,241,237,.95);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Georgia', serif;
    background-color: var(--bg);
    color: #222;
}

/* ---------- 顶部导航（固定+收缩） ---------- */
.top-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    z-index: 1000;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 var(--pad-x);
    background: var(--bg);
    border-bottom: 1px solid rgba(0,0,0,.06);
    backdrop-filter: blur(6px);
    transition: height .25s ease, padding .25s ease, background-color .25s ease, box-shadow .25s ease;
}

.header-spacer {
    height: var(--header-h);
    transition: height .25s ease;
}

.logo {
    flex-shrink: 0;
    display: flex;
    align-items: center; /* 垂直居中 */
    text-decoration: none; /* 确保点击区域没有下划线 */
    color: inherit; /* 保持颜色继承，兼容有文字时 */
}

    .logo img {
        height: 48px; /* 控制 logo 高度 */
        width: auto;
        display: block;
        transition: height .25s ease, transform .25s ease, opacity .25s ease; /* 滚动时缩小效果 */
    }

.top-nav nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

    .top-nav nav a {
        text-decoration: none;
        color: #000;
        font-size: 1rem;
        padding: 10px 12px;
        border-radius: 8px;
        transition: opacity .2s ease, padding .25s ease, font-size .25s ease;
    }

        .top-nav nav a:hover {
            opacity: .85;
        }

.book-now {
    background: #000;
    color: #fff !important;
    border-radius: 24px;
    white-space: nowrap;
    padding: 10px 20px;
    min-width: 88px;
    text-align: center;
    transition: padding .25s ease, border-radius .25s ease, opacity .2s ease;
}

    .book-now:hover {
        background: #333;
    }

/* —— 收缩状态 —— */
body.scrolled .top-nav {
    height: var(--header-h-sm);
    padding: 0 var(--pad-x-sm);
    background-color: var(--bg-scrolled);
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

body.scrolled .header-spacer {
    height: var(--header-h-sm);
}

body.scrolled .logo img {
    height: 36px;
}

body.scrolled .top-nav nav a {
    padding: 6px 8px;
    font-size: .95rem;
    opacity: .95;
}

body.scrolled .book-now {
    padding: 8px 16px;
    border-radius: 18px;
}
.logo:hover img {
    transform: scale(1.05);
    opacity: 0.9;
}

/* ---------- 横幅 ---------- */
.hero {
    position: relative; /* 让视频和遮罩能绝对定位 */
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden; /* 避免视频溢出 */
}

/* 背景视频 */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* 视频自适应填充 */
    z-index: -1; /* 最底层 */
}

.hero-fallback {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(28, 68, 99, 0.85), rgba(0, 0, 0, 0.65));
    z-index: -1;
}

    .hero-fallback.is-hidden {
        display: none;
    }

/* 遮罩层 */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4); /* 半透明黑色 */
    z-index: 0; /* 在视频上，文字下 */
}

/* 横幅文字 */
.hero-text {
    position: relative;
    z-index: 1; /* 保证在遮罩层之上 */
}

    .hero-text h1 {
        color: #fff;
        font-size: 2.8em;
        line-height: 1.4;
        text-shadow: 1px 1px 4px rgba(0,0,0,.5);
    }

/* ---------- Audience ---------- */
.audience {
    padding: 60px 20px;
    text-align: center;
    background: #fff;
}

    .audience h2 {
        font-size: 2em;
        margin-bottom: 30px;
    }

.audience-grid {
    display: grid;
    place-items: center;
    gap: 20px;
    justify-content: center;
    place-items: center;
}

.audience-item {
    width: 700px;
    height: 400px;
    background-color: #f4f1ed;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    box-shadow: 0 4px 10px rgba(0,0,0,.05);
    transition: transform .2s ease, box-shadow .2s ease;
    background-size: cover;
    background-position: center;
    color: #fff; /* 链接文字保持白色 */
    text-shadow: 0 0 10px rgba(0,0,0,.6);
    text-decoration: none; /* 去掉下划线 */
}

    .audience-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0,0,0,.1);
    }

.residential {
    background-image: url('/static/images/residential.jpg');
    color: #fff;
}

.office {
    background-image: url('/static/images/office.png');
    color: #fff;
}


/* 响应式列数 */
@media (min-width:1400px) {
    .audience-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        max-width: calc(700px * 2 + 20px);
        margin: 0 auto;
    }
}

@media (max-width:1399px) {
    .audience-grid {
        grid-template-columns: minmax(0, 1fr);
        max-width: 700px;
        margin: 0 auto;
    }
}

/* ---------- Services ---------- */
.services ul {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.services li {
    padding: 10px 0;
    font-size: 1.1em;
}

/* ---------- 社交媒体宣传板块 ---------- */
.social-promo {
    padding: 80px 20px;
    text-align: center;
    background: #fff;
}

    .social-promo h2 {
        font-size: 2.2em;
        margin-bottom: 15px;
    }

    .social-promo p {
        font-size: 1.2em;
        margin-bottom: 30px;
        color: #555;
    }

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1em;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 50px;
    color: #fff;
    transition: transform .25s ease, opacity .25s ease;
}

    .social-btn img {
        width: 24px;
        height: 24px;
        filter: invert(100%); /* 保证图标在有色背景上变白 */
    }

    .social-btn.instagram {
        background: #E1306C;
    }

    .social-btn.yelp {
        background: #d32323;
    }

    .social-btn:hover {
        transform: scale(1.05);
        opacity: 0.85;
    }

/* ---------- 页脚 ---------- */
footer {
    background: #333;
    color: #fff;
    text-align: center;
    padding: 20px;
}

/* 减少动画偏好（可选无障碍） */
@media (prefers-reduced-motion: reduce) {
    .top-nav, .header-spacer, .logo, .top-nav nav a, .book-now {
        transition: none !important;
    }
}

body.scrolled .top-nav nav a:not(.book-now) {
    display: none;
}

.social-links {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 20px;
}

    .social-links a img {
        width: 28px;
        height: 28px;
        filter: invert(100%); /* 白色图标，适合深色背景 */
        transition: transform 0.25s ease, opacity 0.25s ease;
    }

        .social-links a img:hover {
            transform: scale(1.2);
            opacity: 0.8;
        }
