/* 重置和變數 */
* { 
    box-sizing: border-box; 
    margin: 0;
    padding: 0;
}

:root {
    --c-grey-dark: #231f20;
    --c-primary: #85754e;
    --c-bg: #d5cbb9;
    --c-white: #fff;
    --f-sans-en: 'Jost', 'Helvetica', sans-serif;
    --f-sans-tc: 'Jost', 'Noto Sans HK', 'Microsoft JhengHei', 'Helvetica', sans-serif;
    --f-sans-sc: 'Jost', 'Noto Sans SC', 'Microsoft YaHei', 'Helvetica', sans-serif;
    --c-brown: #665643;
    --c-grey-light: #a9a9aa;
    --c-grey-ultra-light: #f2f2f2;
    --c-yellow: #ddceb2;
    --c-black: #000;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: var(--f-sans-tc);
    background-color: var(--c-bg);
    line-height: 1.5;
    color: var(--c-grey-dark);
    overflow-x: hidden;
}

/* 頭部導航 */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: var(--c-white);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    transition: all 0.4s ease-out;
    text-transform: uppercase;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    height: 70px;
    padding: 0 20px;
}

.logo {
    flex-shrink: 0;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--c-primary);
    white-space: nowrap;
}

/* 漢堡選單按鈕 */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 1001;
    position: relative;
}

.hamburger-menu span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--c-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* 電腦版導航 */
.main-nav {
    display: flex;
    align-items: stretch;
    flex: 1;
}

.sales-nav, .section-nav {
    display: flex;
    align-items: stretch;
}

.sales-nav {
    flex: 2;
}

.section-nav {
    flex: 1;
}

.sales-nav > ul,
.section-nav > ul {
    display: flex;
    align-items: stretch;
    width: 100%;
    list-style: none;
}

.sales-nav > ul > li,
.section-nav > ul > li {
    display: table;
    height: 100%;
}

.sales-nav > ul > li > a,
.section-nav > ul > li > a {
    display: table-cell;
    width: 100%;
    height: 100%;
    vertical-align: middle;
    font-size: 0.75em;
    padding: 1em 0.8em;
    text-align: center;
    white-space: nowrap;
    text-decoration: none;
    color: var(--c-grey-dark);
    transition: all 0.2s ease-out;
    border: none;
}

.sales-nav > ul > li > a:hover,
.section-nav > ul > li > a:hover {
    background-color: var(--c-grey-dark);
    color: var(--c-white);
}

/* 手機版選單 - 重新整理 */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--c-white); /* 純白色背景 */
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    z-index: 1002;
    transition: right 0.3s ease;
    padding: 80px 0 20px;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu ul li {
    margin: 0;
    border-bottom: 1px solid var(--c-grey-ultra-light); /* 淺灰色分隔線 */
}

.mobile-menu ul li:last-child {
    border-bottom: none;
}

.mobile-menu ul li a {
    display: block;
    padding: 16px 25px;
    color: var(--c-grey-dark); /* 深灰色文字 */
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    background: var(--c-white); /* 純白色背景 */
    font-weight: normal; /* 確保所有文字都是正常粗細 */
}

/* 移除頭4個選項的粗體和特殊樣式 */
.mobile-menu ul li:nth-child(-n+4) a {
    /* 移除 font-weight: 600 */
    font-weight: normal;
    background: var(--c-white);
    border-left: none;
}

.mobile-menu ul li:nth-child(n+5) a {
    font-size: 0.85rem;
    padding-left: 25px; /* 取消縮進 */
    background: var(--c-white);
}

/* 統一的懸停效果 */
.mobile-menu ul li a:hover {
    background-color: var(--c-primary); /* 主色懸停 */
    color: var(--c-white);
}

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

.menu-overlay.active {
    display: block;
}

/* 主內容區域 */
main {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
}

/* 第1頁：影片頁面 */
.hero-video {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.video-overlay {
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 2;
}

.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--c-white);
}

.scroll-indicator span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    opacity: 0.9;
    font-weight: 300;
}

.arrow {
    width: 1px;
    height: 40px;
    background: var(--c-white);
    position: relative;
    animation: bounce 2s infinite;
}

.arrow::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: -4px;
    width: 8px;
    height: 8px;
    border-right: 1px solid var(--c-white);
    border-bottom: 1px solid var(--c-white);
    transform: rotate(45deg);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

/* 第2頁：關於區域 */
.about-section {
    min-height: 100vh;
    padding: 6rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-brown) 100%);
    color: var(--c-white);
}

.about-container {
    max-width: 1200px;
    width: 100%;
    text-align: center;
}

.about-header h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 2rem;
    font-weight: 300;
    line-height: 1.2;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}

.about-description {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    margin-bottom: 4rem;
    line-height: 1.6;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 4rem 0;
}

.feature-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 3rem 2rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--c-white);
}

.feature-card p {
    font-size: 1rem;
    line-height: 1.5;
    opacity: 0.9;
    margin: 0;
}

.about-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3rem;
}

/* 按鈕樣式 */
.btn {
    padding: 1.2rem 2.5rem;
    border: 2px solid var(--c-white);
    color: var(--c-white);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.btn.primary {
    background-color: var(--c-primary);
    border-color: var(--c-primary);
}

.btn.secondary {
    background: transparent;
    border: 2px solid var(--c-white);
}

.btn:hover {
    background-color: var(--c-white);
    color: var(--c-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* 第3頁：Bohemian Collection */
.bohemian-collection {
    min-height: 100vh;
    padding: 6rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--c-white);
}

.collection-container {
    max-width: 1600px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 6rem;
}

.collection-content {
    flex: 1;
    max-width: 500px;
}

.collection-content h2 {
    font-family: var(--f-sans-en);
    font-size: clamp(2.5rem, 4vw, 4rem);
    color: var(--c-primary);
    margin-bottom: 1.5rem;
    font-weight: 300;
    line-height: 1.1;
}

.collection-content h3 {
    font-size: 1.3rem;
    color: var(--c-primary);
    margin-bottom: 2.5rem;
    letter-spacing: 0.3em;
    font-weight: 400;
    text-transform: uppercase;
}

.collection-content .desc {
    margin: 2.5rem 0;
    line-height: 1.8;
    font-size: 1.2rem;
    color: var(--c-grey-dark);
}

.collection-cta {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
}

.collection-cta .btn {
    padding: 1.2rem 2.5rem;
    border: 2px solid var(--c-primary);
    color: var(--c-primary);
    background: transparent;
    font-size: 1rem;
}

.collection-cta .btn:hover {
    background-color: var(--c-primary);
    color: var(--c-white);
}

/* 圖片網格 */
.collection-grid {
    flex: 1.5;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    max-width: 800px;
}

.grid-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    transition: all 0.4s ease;
    aspect-ratio: 4/3;
    background: var(--c-grey-ultra-light);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.grid-image {
    width: 80%;
    height: 80%;
    object-fit: contain;
    display: block;
    transition: transform 0.4s ease;
}

.grid-item:hover .grid-image {
    transform: scale(1.08);
}

.grid-item:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.2);
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.95));
    color: white;
    padding: 2rem 1.5rem;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.grid-item:hover .overlay {
    transform: translateY(0);
}

.overlay h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--c-white);
    font-weight: 600;
}

.overlay p {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

/* 第4頁：聯絡我們 */
.contact {
    min-height: 80vh;
    padding: 6rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--c-grey-ultra-light);
    text-align: center;
}

.contact-container {
    max-width: 800px;
    width: 100%;
}

.contact h2 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    color: var(--c-primary);
    margin-bottom: 2rem;
    font-weight: 300;
}

.contact > p {
    font-size: 1.2rem;
    color: var(--c-grey-dark);
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.contact .btn {
    padding: 1.2rem 3rem;
    font-size: 1rem;
    margin-top: 1rem;
}

.contact .cta {
    margin-top: 3rem;
    display: flex;
    justify-content: center;
}

/* 頁尾 */
footer {
    background-color: var(--c-grey-dark);
    color: var(--c-white);
    padding: 4rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--c-white);
    margin-bottom: 2rem;
    letter-spacing: 2px;
}

.footer-disclaimer {
    font-size: 0.8rem;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto 2rem;
    opacity: 0.7;
}

footer p {
    font-size: 0.8rem;
    opacity: 0.6;
}

/* WhatsApp 浮動按鈕 */
#whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.whatsapp-float-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    border: 3px solid white;
}

.whatsapp-float-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
    background: #128C7E;
}

.whatsapp-icon {
    width: 32px;
    height: 32px;
    filter: brightness(0) invert(1);
}

/* 免責聲明彈出視窗 - 保持不變 */
.disclaimer-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    pointer-events: auto !important;
}

.disclaimer-modal.active {
    display: flex !important;
}

.disclaimer-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.disclaimer-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0,0,0,0.8);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,0.5);
    transition: all 0.3s ease;
}

.disclaimer-close:hover {
    background: rgba(255,0,0,0.8);
    transform: scale(1.1);
}

.disclaimer-body {
    padding: 3rem;
    line-height: 1.6;
}

.disclaimer-body p {
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 0.95rem;
}

.footnote {
    font-size: 0.8rem;
    color: var(--c-grey-light);
    font-style: italic;
    margin-top: 1.5rem;
}

/* 手機版免責聲明調整 */
@media (max-width: 768px) {
    .disclaimer-content {
        max-height: 85vh;
        margin: 10px;
    }
    
    .disclaimer-body {
        padding: 2rem 1.5rem;
    }
    
    .disclaimer-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
}

/* 強制隱藏所有外部導航垃圾 */
#residential-menu,
#property-menu,
#residential,
.toggle-input,
.toggle,
.arrow,
.pmenu,
[class*="residential"],
[class*="property"][class*="menu"],
#page-header > div:not(.logo):not(.hamburger-menu),
#residential-toggle,
#property-toggle {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

/* 手機版響應式設計 */
@media (max-width: 768px) {
    .header-container {
        padding: 0 15px;
    }
    
    /* 隱藏電腦導航，顯示漢堡選單 */
    .main-nav {
        display: none !important;
    }
    
    .hamburger-menu {
        display: flex !important;
    }
    
    /* 調整佈局 */
    .hero-video,
    .about-section,
    .bohemian-collection,
    .contact {
        padding: 4rem 1.5rem;
    }
    
    .collection-container {
        flex-direction: column;
        text-align: center;
        gap: 3rem;
    }
    
    /* 🔥 修復圖片網格置中問題 */
    .collection-grid {
        grid-template-columns: 1fr;
        max-width: 500px;
        margin: 0 auto; /* 添加這行確保置中 */
        justify-items: center; /* 添加這行讓網格項目置中 */
    }
    
    /* 確保圖片本身也置中 */
    .grid-item {
        width: 100%;
        max-width: 400px; /* 限制最大寬度 */
        margin: 0 auto; /* 置中 */
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .about-cta,
    .cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* 手機版免責聲明調整 */
    .disclaimer-content {
        width: 95%;
        max-height: 85vh;
        margin: 10px;
    }
    
    .disclaimer-body {
        padding: 2rem 1.5rem;
    }
    
    .disclaimer-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
}

/* 電腦版專用 */
@media (min-width: 769px) {
    .hamburger-menu,
    .mobile-menu,
    .menu-overlay {
        display: none;
    }
    
    .main-nav {
        display: flex;
    }
    
    #whatsapp-float {
        bottom: 40px;
        right: 40px;
    }
}

/* 滾動鎖定修復 */
body.disclaimer-active {
    overflow: hidden !important;
}

/* 確保外部頁面內容正常顯示 */
#page-content,
#page-footer,
#property-disclaimer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 左上角音樂控制 - 只在第一頁顯示 */
.music-control-top {
    position: absolute; /* 改為 absolute，相對於第一頁 */
    top: 5px;
    left: 20px;
    z-index: 9998;
}

/* 當不在第一頁時隱藏 */
body:not(.on-home-page) .music-control-top {
    display: none;
}

.music-toggle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    color: var(--c-black); /* 改為黑色 */
    border: 2px solid rgba(0, 0, 0, 0.448); /* 淡黑色圈 */
    cursor: pointer;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.music-toggle-btn:hover {
    transform: scale(1.1);
    background: rgba(0,0,0,0.1);
}

/* 喇叭關閉狀態 - 灰色喇叭 + 紅色斜號 */
.music-toggle-btn.muted::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 3px;
    background: #ff4444;
    transform: translate(-50%, -50%) rotate(45deg);
    border-radius: 2px;
}

/* 手機版調整 */
@media (max-width: 768px) {
    .music-control-top {
        top: 5px;
        left: 15px;
    }
    
    .music-toggle-btn {
        width: 35px;
        height: 35px;
        font-size: 1.1rem;
    }
    
    .music-toggle-btn.muted::after {
        width: 20px;
        height: 2px;
    }
}