/* =====================================================
   怡興租屋網 — 全站共用樣式
   ===================================================== */

/* Google Fonts 已在 HTML <head> 中引入 */

/* ---- 基礎重置 & 排版 ---- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    zoom: 1.15;
}

body {
    background-color: #FAF8F5;
    color: #292524;
    font-family: 'Noto Sans TC', sans-serif;
    line-height: 1.625;
    overflow-x: hidden;
    padding-top: 76px;
    /* 導覽列高度補償（會隨著 zoom 自動縮放） */
}

/* ---- 品牌色票變數 ---- */
:root {
    --brand-main: #5D7B5F;
    --brand-dark: #3D5A40;
    --brand-mid: #4C664E;
    --brand-light: #6c956c;
    --brand-star: #C4A882;
    --brand-lightBg: #EEF2EE;
    --brand-pageBg: #FAF8F5;
    --brand-footerBg: #F5F0EB;
}

/* =====================================================
   導覽列
   ===================================================== */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 50;
    background: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(231, 229, 228, 0.6);
    padding: 0.875rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #44403c;
}

@media (min-width: 768px) {
    .site-nav {
        padding-inline: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .site-nav {
        padding-inline: 2.5rem;
    }
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    cursor: pointer;
}

.nav-logo-icon {
    width: 2.25rem;
    height: 2.25rem;
    background: var(--brand-main);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .1);
    flex-shrink: 0;
}

.nav-logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--brand-dark);
}

/* 桌面版選單 */
.nav-desktop {
    display: none;
    align-items: center;
    gap: 0.375rem;
}

@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }
}

.nav-link,
.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s;
    text-decoration: none;
    border: none;
    cursor: pointer;
    background: transparent;
    color: #78716c;
}

.nav-btn:hover,
.nav-link:hover {
    background: var(--brand-lightBg);
    color: var(--brand-dark);
}

.nav-btn.active {
    background: var(--brand-main);
    color: #fff;
}

.nav-divider {
    height: 1rem;
    width: 1px;
    background: #d6d3d1;
    margin-inline: 0.375rem;
}

.nav-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    color: #fff;
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
    font-size: 1.25rem;
    text-decoration: none;
}

.nav-social:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

.nav-social.line {
    background: #06C755;
}

.nav-social.ig {
    background: linear-gradient(135deg, #f9ce34, #ee2a7b, #6228d7);
}

/* 漢堡按鈕 */
.nav-hamburger {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: #292524;
    font-size: 1.5rem;
}

@media (min-width: 768px) {
    .nav-hamburger {
        display: none;
    }
}

/* 手機版選單 */
.nav-mobile {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #fff;
    color: #292524;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    border-radius: 0 0 1rem 1rem;
    display: flex;
    flex-direction: column;
}

.nav-mobile.open {
    max-height: 500px;
    opacity: 1;
    padding-bottom: 0.5rem;
}

.nav-mobile-link,
.nav-mobile-btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid #f5f5f4;
    font-weight: 500;
    font-size: 0.95rem;
    color: #292524;
    background: transparent;
    border-left: none;
    border-right: none;
    border-top: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
}

.nav-mobile-link:hover,
.nav-mobile-btn:hover {
    background: #f5f5f4;
}

.nav-mobile-link.active,
.nav-mobile-btn.active {
    color: var(--brand-dark);
    background: #f5f5f4;
}

.nav-mobile-socials {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1rem;
    background: rgba(245, 245, 244, .5);
}

.nav-mobile-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    color: #fff;
    font-size: 1.25rem;
    text-decoration: none;
    transition: opacity 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

.nav-mobile-social:hover {
    opacity: 0.9;
}

.nav-mobile-social.line {
    background: #06C755;
}

.nav-mobile-social.ig {
    background: linear-gradient(135deg, #f9ce34, #ee2a7b, #6228d7);
}

/* =====================================================
   Footer
   ===================================================== */
.site-footer {
    width: 100%;
    background: var(--brand-footerBg);
    border-top: 1px solid rgba(214, 211, 208, .8);
    padding: 2rem 1rem;
    text-align: center;
    font-size: 0.75rem;
    color: #78716c;
    margin-top: 4rem;
    line-height: 1.8;
}

.site-footer .inner {
    max-width: 80rem;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.site-footer .row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.25rem 0.5rem;
}

.site-footer .sep {
    color: #d6d3d1;
    display: none;
}

@media (min-width: 768px) {
    .site-footer .sep {
        display: inline;
    }
}

.site-footer .builder {
    color: #a8a29e;
}

/* =====================================================
   共用工具類別
   ===================================================== */

/* 卡片陰影 */
.card {
    background: #fff;
    border-radius: 1rem;
    border: 1px solid rgba(231, 229, 228, .8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .015);
    transition: box-shadow 0.3s;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
}

/* 標籤 pill */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 500;
    border: 1px solid transparent;
}

.tag-green {
    background: var(--brand-main);
    color: #fff;
}

.tag-light {
    background: var(--brand-lightBg);
    color: var(--brand-dark);
    border-color: rgba(214, 211, 208, .5);
}

.tag-stone {
    background: #fafaf9;
    color: #78716c;
    border-color: rgba(231, 229, 228, .5);
}

.tag-amber {
    background: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}

.tag-blue {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

/* 按鈕 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.625rem 1.5rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--brand-main);
    color: #fff;
}

.btn-primary:hover {
    background: var(--brand-mid);
    box-shadow: 0 4px 12px rgba(93, 123, 95, .3);
}

.btn-secondary {
    background: #fff;
    color: #292524;
}

.btn-secondary:hover {
    background: #fafaf9;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
}

.btn-dark {
    background: var(--brand-dark);
    color: #fff;
}

.btn-dark:hover {
    background: #2C422E;
}

/* 返回連結 */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #a8a29e;
    text-decoration: none;
    transition: color 0.2s;
    margin-bottom: 2rem;
    cursor: pointer;
    background: transparent;
    border: none;
}

.back-link:hover {
    color: #44403c;
}

.back-link i {
    transition: transform 0.2s;
}

.back-link:hover i {
    transform: translateX(-2px);
}

/* 頁面標題區 */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1,
.page-header h2 {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
    color: #292524;
    letter-spacing: 0.04em;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 0.8125rem;
    color: #a8a29e;
}

/* 格線 */
.section {
    padding: 2rem 2rem;
}

@media (min-width: 768px) {
    .section {
        padding-inline: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .section {
        padding-inline: 2.5rem;
    }
}

.container {
    max-width: 80rem;
    margin-inline: auto;
}

.container-md {
    max-width: 56rem;
    margin-inline: auto;
}

.container-lg {
    max-width: 64rem;
    margin-inline: auto;
}

/* 篩選下拉選單 */
.filter-select {
    width: 100%;
    background: var(--brand-pageBg);
    border: 1px solid #e7e5e4;
    border-radius: 0.75rem;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #44403c;
    appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.filter-select:focus {
    border-color: var(--brand-main);
}

.filter-wrap {
    position: relative;
}

.filter-wrap i {
    position: absolute;
    right: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    color: #a8a29e;
    pointer-events: none;
}

/* 評分星星 */
.stars {
    color: var(--brand-star);
    display: flex;
    gap: 0.125rem;
    font-size: 0.875rem;
}

/* 相簿縮圖 */
.thumb-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.thumb-item {
    height: 3.5rem;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    background: #f5f5f4;
    transition: border-color 0.2s;
}

@media (min-width: 768px) {
    .thumb-item {
        height: 4rem;
    }
}

.thumb-item.active {
    border-color: var(--brand-main);
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 規格表格 */
.spec-table {
    border-top: 1px solid #f5f5f4;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    padding: 0.625rem 0;
    border-bottom: 1px solid rgba(245, 245, 244, .7);
    font-size: 0.8125rem;
    color: #57534e;
}

.spec-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    color: #a8a29e;
}

.spec-value {
    font-weight: 500;
    color: #292524;
}

/* 房源卡片特色標籤 */
.room-tag {
    background: #fafaf9;
    color: #a8a29e;
    font-size: 0.625rem;
    border-radius: 0.25rem;
    padding: 0.125rem 0.625rem;
    border: 1px solid rgba(231, 229, 228, .5);
}

@media (min-width: 768px) {
    .room-tag {
        font-size: 0.75rem;
    }
}

/* 動畫 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease both;
}

/* 評價頭像 */
.avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: var(--brand-dark);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* 房源標籤（圓角）*/
.room-type-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    border-radius: 9999px;
    padding: 0.125rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 500;
    color: #fff;
    background: var(--brand-main);
}

.room-price-badge {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, .6);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    letter-spacing: 0.05em;
}

/* 「為什麼選擇怡興」 icon 圓圈 */
.feature-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    background: var(--brand-lightBg);
    color: var(--brand-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

/* =====================================================
   首頁專用樣式
   ===================================================== */

/* Hero 區 */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 580px;
    display: flex;
    align-items: center;
}

.hero-overlay {
    background: linear-gradient(105deg, rgba(0, 0, 0, 0.62) 0%, rgba(0, 0, 0, 0.28) 60%, rgba(61, 90, 64, 0.4) 100%);
}

.hero-stat-box {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 0.75rem 1.25rem;
    text-align: center;
}

/* 最新消息 — 橫向條列 */
.news-strip {
    border-radius: 1rem;
    border: 1px solid rgba(231, 229, 228, 0.8);
    background: #fff;
    padding: 1.25rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: box-shadow 0.25s, transform 0.25s;
}

.news-strip:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
    transform: translateX(4px);
}

.news-date-col {
    flex-shrink: 0;
    width: 3.5rem;
    text-align: center;
}

/* 租房指南 — 步驟時間軸 */
.guide-step {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.guide-step-number {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--brand-dark);
    color: #fff;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    position: relative;
    z-index: 1;
}

.guide-step-connector {
    position: absolute;
    top: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: calc(100% + 1.25rem);
    background: linear-gradient(to bottom, var(--brand-main), transparent);
}

/* 為什麼選擇怡興 — 卡片樣式 */
.why-card-green {
    background: var(--brand-light);
    border-radius: 1rem;
    padding: 1.5rem;
}

.why-card-white {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .015);
    border-left: 4px solid var(--brand-light);
}

.why-feature-icon {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--brand-lightBg);
    color: var(--brand-dark);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.why-feature-icon-light {
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.25rem;
}

/* CTA — 全寬漸層 */
.cta-section {
    background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-main) 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 40rem;
    height: 40rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 9999px;
}

.cta-section::after {
    content: '';
    position: absolute;
    bottom: -50%;
    left: -10%;
    width: 30rem;
    height: 30rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 9999px;
}

/* CTA按鈕樣式 */
.btn-white {
    background: #fff;
    color: var(--brand-dark);
    font-weight: 700;
    padding: 0.75rem 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.btn-white:hover {
    background: #fafaf9;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.btn-outline-white {
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 0.75rem 2rem;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

/* 區塊分隔器 */
.section-divider {
    width: 3rem;
    height: 3px;
    background: var(--brand-main);
    border-radius: 9999px;
    margin-bottom: 0.75rem;
}