/* === 1. 全域設定 & 變數 === */
:root {
    --primary-color: #b08d55; /* 檜木金黃色 */
    --primary-dark: #8e6d3b;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-color: #f9f9f7; 
    --white: #ffffff;
    --font-serif: 'Noto Serif TC', serif;
    --font-sans: 'Noto Sans TC', sans-serif;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); background-color: var(--bg-color); color: var(--text-dark); line-height: 1.8; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; }
.container { width: 90%; max-width: 1200px; margin: 0 auto; }

.btn {
    display: inline-block; padding: 12px 32px;
    background-color: var(--primary-color); color: var(--white);
    border-radius: 2px; font-weight: 500; letter-spacing: 1px; transition: var(--transition);
}
.btn:hover { background-color: var(--primary-dark); transform: translateY(-2px); }

.section-title { font-family: var(--font-serif); font-size: 2rem; margin-bottom: 1rem; position: relative; display: inline-block; }
.text-center { text-align: center; }
.section-subtitle { color: var(--text-light); margin-bottom: 3rem; }
.section { padding: 5rem 0; }
.section-title.light { color: var(--white); }
.light-text { color: #888; }

/* === 2. 導覽列 === */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%; height: 70px;
    background: rgba(0, 0, 0, 0.35); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1); z-index: 1000;
    display: flex; align-items: center; transition: background 0.3s ease;
}
.nav-container { display: flex; justify-content: space-between; align-items: center; }

/* Logo */
.logo { display: flex; align-items: center; position: relative; text-decoration: none; padding-left: 18px; }
.logo::before {
    content: ''; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 24px; background-color: var(--primary-color);
    border-radius: 1px; box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}
.logo-text {
    font-family: var(--font-serif); font-weight: 700; font-size: 1.35rem; color: var(--white);
    letter-spacing: 2px; line-height: 1; transition: color 0.3s ease;
}
.logo:hover .logo-text { color: var(--primary-color); }

.nav-menu { display: flex; gap: 2rem; }
.nav-link { font-size: 1rem; font-weight: 500; position: relative; color: #cccccc; transition: var(--transition); }
.nav-link:hover, .nav-link.active-link { color: var(--white); }
.nav-link::after {
    content: ''; position: absolute; bottom: -5px; left: 0;
    width: 0; height: 2px; background: var(--primary-color); transition: var(--transition);
}
.nav-link:hover::after, .nav-link.active-link::after { width: 100%; }
.nav-toggle { display: none; font-size: 1.5rem; cursor: pointer; color: var(--white); }

/* === 3. Hero Section === */
.hero {
    position: relative; height: 100vh; min-height: 600px;
    background-color: #000000; color: var(--white);
    display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.hero-bg-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; background-color: #000; }
.blueprint-bg {
    width: 100%; height: 100%; object-fit: contain; object-position: center; 
    opacity: 0.5; transition: var(--transition);
}
.bg-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0.05) 0%, #000000 90%);
}
.hero-content { position: relative; z-index: 2; width: 100%; display: flex; justify-content: center; align-items: center; }

.hero-text-panel {
    text-align: center; width: auto; max-width: 900px; padding: 3rem 4rem;
    background: rgba(0, 0, 0, 0.05); border: 1px solid rgba(212, 175, 55, 0.3);
    backdrop-filter: blur(3px); animation: fadeInUp 1.5s ease-out; border-radius: 4px;
}
.hero-title {
    font-family: var(--font-serif); font-size: 3.8rem; line-height: 1.2;
    margin-bottom: 1.5rem; font-weight: 700; color: #ffffff;
    text-shadow: 0 4px 10px rgba(0,0,0,0.8); white-space: nowrap;
}
.hero-title .dot { color: var(--primary-color); margin: 0 10px; font-size: 0.8em; }
.hero-subtitle {
    font-size: 1.1rem; color: #eeeeee; margin-bottom: 2.5rem;
    line-height: 1.8; font-weight: 300; letter-spacing: 1px;
}
.hero-btns { margin-bottom: 0; }
.btn-outline-gold {
    display: inline-block; padding: 10px 35px;
    border: 1px solid var(--primary-color); color: var(--primary-color);
    letter-spacing: 2px; font-size: 0.9rem; transition: var(--transition); background: transparent;
}
.btn-outline-gold:hover {
    background: var(--primary-color); color: #000; box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}
.scroll-down {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); z-index: 3;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    font-size: 0.7rem; color: #888; letter-spacing: 2px; opacity: 0.7;
}
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* === 4. About Section === */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-img-box { position: relative; }
.feature-img { border-radius: 4px; box-shadow: 20px 20px 0 var(--primary-color); }

/* === 2.5 特殊物件輪播 (Masterpiece) === */
.masterpiece-section { background-color: #111; color: #fff; overflow: hidden; }
.spotlight-carousel-wrapper { position: relative; max-width: 1000px; margin: 0 auto; padding: 2rem 0; }
.spotlight-track-container { overflow: hidden; padding: 20px 0; }
.spotlight-track { display: flex; transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1); gap: 20px; }

/* --- [修正] 輪播卡片樣式修正 --- */
.spotlight-card {
    width: 500px;        /* 設定固定基礎寬度 */
    max-width: 60vw;     /* 限制最大寬度為視窗的 60% */
    flex: 0 0 auto;      /* 固定寬度，不讓 Flexbox 壓縮 */
    position: relative;
    transition: all 0.5s ease; 
    transform: scale(0.9); 
    opacity: 0.4; 
    filter: grayscale(80%);
}

.spotlight-card .card-image {
    width: 100%; 
    aspect-ratio: 3/4; /* 保持直式比例 */
    border-radius: 4px; overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    /* border: 1px solid rgba(255, 255, 255, 0.1); */
    
    background-color: transparent; /* [修改] 改成透明 */
}

.spotlight-card img { 
    width: 100%; height: 100%; 
    object-fit: contain; /* [修改2] 改為 contain，保證圖片"完整顯示"不裁切 */
}
.card-info {
    position: absolute; bottom: -60px; left: 0; width: 100%; text-align: center;
    opacity: 0; transition: all 0.5s ease;
}
.card-info h3 { font-family: var(--font-serif); font-size: 1.2rem; color: var(--primary-color); margin-bottom: 5px; }
.card-info p { font-size: 0.85rem; color: #999; letter-spacing: 1px; }

.spotlight-card.active { transform: scale(1.1); opacity: 1; filter: grayscale(0%); z-index: 2; }
.spotlight-card.active .card-image { box-shadow: 0 15px 40px rgba(0,0,0,0.8); }
.spotlight-card.active .card-info { bottom: -80px; opacity: 1; }

.spotlight-btn {
    position: absolute; top: 40%; transform: translateY(-50%);
    background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.2);
    color: #fff; width: 45px; height: 45px; border-radius: 50%; cursor: pointer; z-index: 3;
    transition: var(--transition);
}
.spotlight-btn:hover { background: var(--primary-color); border-color: var(--primary-color); color: #000; }
.spotlight-btn.prev { left: -20px; }
.spotlight-btn.next { right: -20px; }

.spotlight-progress { width: 60%; height: 2px; background: rgba(255,255,255,0.1); margin: 100px auto 0 auto; border-radius: 2px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary-color); width: 25%; transition: width 0.3s ease, transform 0.3s ease; }

/* === 5. Gallery (雙欄) === */
.gallery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
a.gallery-item { display: block; color: inherit; }
.gallery-item { cursor: pointer; overflow: hidden; border-radius: 8px; position: relative; }
.gallery-thumb { width: 100%; height: 400px; position: relative; background-color: #111; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.5s ease; }

.card-badge {
    position: absolute; top: 15px; left: 15px; padding: 5px 12px;
    font-size: 0.75rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
    z-index: 2; border-radius: 2px; box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}
.card-badge.restoration { background-color: var(--primary-color); color: #fff; }
.card-badge.shop { background-color: #ff6600; color: #fff; }

.gallery-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4); color: #fff;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    opacity: 0; transition: opacity 0.3s ease;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-item:hover img { transform: scale(1.05); }
.static-overlay { background: rgba(0, 0, 0, 0.6) !important; opacity: 1 !important; }
.overlay-content { text-align: center; transform: translateY(20px); transition: transform 0.4s ease; }
.gallery-item:hover .overlay-content { transform: translateY(0); }
.overlay-content i { font-size: 2rem; margin-bottom: 10px; color: var(--primary-color); }
.overlay-content h3 { font-family: var(--font-serif); font-size: 1.4rem; color: #fff; margin-bottom: 5px; }
.action-text { font-size: 0.9rem; color: #ccc; border-bottom: 1px solid var(--primary-color); display: inline-block; }

/* === 6. Services === */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.service-card {
    background: #fff; padding: 2rem; border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: var(--transition); text-align: center;
}
.service-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.icon-box { font-size: 2.5rem; color: var(--primary-color); margin-bottom: 1rem; }

/* === 7. Contact === */
.contact-section { background-color: #222; color: #ddd; padding-bottom: 0; }
.grid-2-contact { display: grid; grid-template-columns: 1fr 1fr; }
.contact-info { padding: 4rem 2rem 4rem 0; }
.contact-list li { display: flex; gap: 15px; margin-bottom: 2rem; }
.contact-list i { color: var(--primary-color); font-size: 1.2rem; margin-top: 5px; }

/* 匯款資訊 */
.bank-accordion {
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px; margin-top: 2rem; overflow: hidden; transition: var(--transition);
}
.bank-header {
    padding: 1rem 1.5rem; display: flex; justify-content: space-between; align-items: center;
    cursor: pointer; background: rgba(0, 0, 0, 0.2); transition: background 0.3s ease;
}
.bank-header:hover { background: rgba(0, 0, 0, 0.4); }
.bank-header h4 { margin: 0; font-size: 1.1rem; font-weight: 500; color: #ddd; display: flex; align-items: center; gap: 10px; }
.bank-header h4 i { color: var(--primary-color); }
.toggle-icon { color: #888; transition: transform 0.3s ease; }
.bank-accordion.active .toggle-icon { transform: rotate(180deg); color: var(--primary-color); }
.bank-content {
    max-height: 0; opacity: 0; overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.4s ease; background: rgba(0, 0, 0, 0.1);
}
.bank-accordion.active .bank-content { max-height: 250px; opacity: 1; }
.bank-details { padding: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.05); }
.bank-row {
    display: flex; justify-content: space-between; margin-bottom: 0.8rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1); padding-bottom: 5px;
}
.bank-row:last-child { border-bottom: none; }
.bank-row .label { color: #888; font-size: 0.9rem; }
.bank-row .value { color: #fff; font-weight: 500; letter-spacing: 1px; }
.bank-row .value.highlight { color: var(--primary-color); }
.bank-note { font-size: 0.8rem; color: #666; text-align: center; margin-top: 10px; font-style: italic; }

.social-links { margin-top: 2rem; display: flex; gap: 15px; }
.social-links a {
    width: 40px; height: 40px; background: #333; display: flex; justify-content: center; align-items: center;
    border-radius: 50%; transition: var(--transition);
}
.social-links a:hover { background: var(--primary-color); color: #fff; }
.map-box { height: 100%; min-height: 400px; }
.map-box iframe { width: 100%; height: 100%; border: 0; filter: grayscale(100%) invert(90%); }

/* === 8. Footer & Modal === */
.footer { background: #111; color: #666; text-align: center; padding: 2rem 0; font-size: 0.9rem; }
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 2000; display: none; justify-content: center; align-items: center; }
.modal.active { display: flex; }
.modal-backdrop { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.85); }
.modal-content { position: relative; background: #fff; width: 90%; max-width: 1000px; max-height: 90vh; border-radius: 8px; overflow-y: auto; z-index: 2001; animation: zoomIn 0.3s ease; }
@keyframes zoomIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-close { position: absolute; top: 15px; right: 15px; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #333; z-index: 10; }
.grid-2-modal { display: grid; grid-template-columns: 1.5fr 1fr; }
.modal-gallery { background: #f0f0f0; padding: 2rem; display: flex; flex-direction: column; align-items: center; }
.main-img-container { width: 100%; height: 400px; display: flex; align-items: center; justify-content: center; }
.main-img-container img { max-width: 100%; max-height: 100%; object-fit: contain; }
.thumb-list { display: flex; gap: 10px; margin-top: 1rem; overflow-x: auto; width: 100%; padding-bottom: 5px; }
.thumb-list img { width: 60px; height: 60px; object-fit: cover; cursor: pointer; opacity: 0.6; border: 2px solid transparent; }
.thumb-list img.active { opacity: 1; border-color: var(--primary-color); }
.modal-text { padding: 3rem 2rem; }
.modal-text h3 { font-family: var(--font-serif); font-size: 1.8rem; color: var(--primary-dark); margin-bottom: 1.5rem; }

/* === RWD === */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed; top: 70px; right: -100%; width: 100%; height: calc(100vh - 70px);
        background: #1a1a1a; flex-direction: column; padding: 2rem; transition: 0.3s; box-shadow: none; align-items: center;
    }
    .nav-menu.show { right: 0; }
    .nav-toggle { display: block; }
    .blueprint-bg { 
        object-position: center center; /* 改回置中 */
        object-fit: cover; /* [關鍵] 改成 cover，讓直式圖片填滿整個手機螢幕 */
        opacity: 0.7; 
    }
    .hero { align-items: flex-end; }
    .hero-content { align-items: flex-end; padding-bottom: 80px; }
    .hero-text-panel {
        width: 100%; max-width: 100%; padding: 3rem 1.5rem 0 1.5rem;
        background: linear-gradient(to top, #000000 50%, transparent 100%); border: none; backdrop-filter: none;
    }
    .hero-title { font-size: 2.2rem; margin-bottom: 1rem; white-space: normal; }
    .hero-subtitle { font-size: 0.95rem; margin-bottom: 1.5rem; }
    
    /* --- [修正] 手機版卡片修正 --- */
    .spotlight-card { 
        width: 85vw; /* 手機版寬度佔 85% */
        max-width: none; 
    }
    
    .spotlight-btn { display: none; }
    .spotlight-progress { margin-top: 90px; }
    .grid-2, .grid-2-contact, .grid-2-modal { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr; gap: 20px; }
    .gallery-thumb { height: 300px; }
    .about-img-box { margin-bottom: 2rem; }
    .contact-info { padding: 2rem; }
    .modal-gallery { height: auto; padding: 1rem; }
    .main-img-container { height: 250px; }
}
