/* =========================================================
   Wells Realty | style.css（整理乾淨版｜已刪除重複/衝突）
   v=20260225-01
========================================================= */

:root{
  --header-h: 80px;
  --nav-top-pad-mobile: 40px; /* ✅ 手機側欄頂部間隙 */

  /* ✅ 收藏按鈕尺寸：桌機 */
  --bookmark-font-desktop: 12px;
  --bookmark-pad-y-desktop: 6px;
  --bookmark-pad-x-desktop: 10px;

  /* ✅ 收藏按鈕尺寸：手機 */
  --bookmark-font-mobile: 12px;
  --bookmark-pad-y-mobile: 6px;
  --bookmark-pad-x-mobile: 10px;

  /* reserve / guestbook */
  --guestbook-text-color: #facc15;

  --reserve-actions-gap-desktop: 85px;
  --reserve-actions-gap-mobile: 50px;
  --reserve-input-width: 200px;
  --reserve-align-width: min(280px, 80vw);
  --reserve-btn-width: 80px;
  --reserve-row-gap: 8px;

  /* promo */
  --promo-box-max-width: 420px;
  --promo-box-padding-y: 32px;
  --promo-box-padding-x: 52px;
  --promo-font-size-desktop: 34px;
  --promo-font-size-mobile: 24px;
  --promo-border-radius: 40px;

  /* ✅ 側欄選單（手機/響應式） */
  --nav-item-minw: 0em;               /* ✅ 視覺同寬 */
  --nav-short-letterspace: 2.00em;    /* ✅ 2字/3字拉寬 */
  --nav-item-pad-y: 6px;              /* ✅ 選單上下間隙 */
  --nav-item-pad-x: 10px;
  --nav-mobile-gap: 25px;             /* ✅ 手機側欄：每個選單項目的垂直間距 */

  /* ✅ 語系切換位置 */
  --lang-right-desktop: 26px;         /* 往左移：改小 */
  --lang-right-mobile: 20px;          /* 往左移：改小 */
}

html{ scroll-behavior: smooth; }

/* RESET */
*{ padding:0; margin:0; }
html, body{ margin:0 !important; padding:0; }

/* HEADER */
header{
  position: fixed;
  top:0; left:0; right:0;
  height: var(--header-h);
  background-color: rgba(10, 28, 26, 0.8);
  z-index: 1200;
}

/* LOGO（H1）*/
h1{
  color: white;
  position: absolute;
  left: 120px;
  top: 0;
  height: var(--header-h);
  line-height: var(--header-h);

  background-image: url("../phto/W11.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;

  width: 130px;
  text-indent: -9999px;
}

/* 桌機：主選單（不變） */
header nav > ul{
  position: absolute;
  right: 75px; /* ✅ Kill time 更靠近收藏：改小 */
  top: 0;
  line-height: var(--header-h);
}
header nav > ul > li{ display: inline; margin-right: 2vw; }
header nav > ul > li:last-child{ margin-right: 0; }
header nav a{ color: #fff; text-decoration: none; }
header nav a:hover{ text-decoration: underline; }

/* Kill time（桌機/手機通用字體設定） */
.kill-time{
  font-family: "Lobster", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  text-transform: none;
}

/* 漢堡按鈕（桌機預設隱藏） */
.menu{ display: none; }

/* HERO */
.news{
  background-color: antiquewhite;
  color: white;
  height: 95vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: var(--header-h);
  position: relative;
  overflow: hidden;
}
.news .hero-bg{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: translateZ(0);
}
.news .hero-content{
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.news h2{ font-size: 80px; margin-top: 10px; }
.news p{ color: #FEF7E6; font-size: 18px; margin: 25px 0; }
.news a{
  color: #fff;
  text-decoration: none;
  border: 1px solid #ACACAC;
  padding: 10px 20px;
  border-radius: 5px;
}
.news a:hover{ text-decoration: underline; }

/* 精選物件 */
.slogan{
  background-color: #485652;
  color: #fff;
  height: 120px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  line-height: 1.8em;
}
section{ background-color: #4ec5b7; }

.product{
  display: flex;
  background-color: #ede9db;
  justify-content: space-between;
  align-items: center;
  padding: 100px 180px 80px;
}
.product div{ width: 300px; text-align: center; }
.product img{ width: 100%; border-radius: 10px; }
.product h3{ font-size: 20px; margin: 20px 0; }
.product p{ font-size: 14px; line-height: 1.6em; }

/* Newsletter / reserve */
.newsletter{
  background-color: #485652;
  color: #fff;
  padding: 60px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.newsletter form input,
.newsletter form button{
  background-color: transparent;
  color: #fff;
  border: 1px solid #949d9a;
  padding: 10px;
  border-radius: 5px;
}
.newsletter form input{ margin-right: 15px; }
.newsletter form button{ width: 80px; cursor: pointer; }

.newsletter .email-link{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: underline;
  color: inherit;
}
.newsletter .icon-mail{ width: 22px; height: 22px; }

#reserve .guestbook-btn{ color: var(--guestbook-text-color) !important; }

#reserve .reserve-block{
  width: min(420px, 92vw);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#reserve .email-actions{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--reserve-actions-gap-desktop);
}
@media (max-width: 768px){
  #reserve .email-actions{ gap: var(--reserve-actions-gap-mobile); }
}

#reserve .email-actions .email-link,
#reserve .email-actions .guestbook-btn{ margin: 0 !important; }

#reserve .guestbook-btn{
  background-color: transparent;
  border: 1px solid #949d9a;
  border-radius: 5px;
  padding: 8px 12px;
  cursor: pointer;
  line-height: 1;
  height: 36px;
  width: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#reserve #newsletter-form label,
#reserve #form-phone label{
  width: var(--reserve-align-width);
  margin: 0 auto 0;
  text-align: left;
  display: block;
}

#reserve #newsletter-form,
#reserve #form-phone{ width: 100%; }

#reserve .reserve-row{
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: var(--reserve-row-gap);
  margin-top: 4px;
  flex-wrap: nowrap;
}
#reserve .reserve-row input{ margin-right: 0 !important; }

#reserve .reserve-row button{
  width: var(--reserve-btn-width);
  flex: 0 0 var(--reserve-btn-width);
  white-space: nowrap;
  height: 44px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

#reserve .reserve-row input[type="email"],
#reserve .reserve-row input[type="tel"]{
  height: 44px;
  box-sizing: border-box;
  min-width: 0;
  width: min(
    var(--reserve-input-width),
    calc(100% - var(--reserve-btn-width) - var(--reserve-row-gap))
  );
  flex: 0 1 auto;
}

/* msg */
.msg{ margin-top: 6px; font-size: 14px; }
.msg.ok{ color: #86efac; }
.msg.err{ color: #fca5a5; }

/* Footer */
footer{
  background-color: #000;
  color: #B7B7B7;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
}

/* 收藏鍵 */
.bookmark-btn{
  background: transparent !important;
  color: #ffffff !important;
  border: 1px solid rgba(255,255,255,.9) !important;
  border-radius: 999px;

  padding: var(--bookmark-pad-y-desktop) var(--bookmark-pad-x-desktop);
  font-size: var(--bookmark-font-desktop);

  font-weight: 800;
  letter-spacing: .06em;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.1;
}
.bookmark-btn:hover{ background: rgba(255,255,255,.10) !important; }

/* 桌機：Header 右側收藏 */
.bookmark-btn--header{
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1250;
}

/* =========================================================
   漢堡選單（手機版）
========================================================= */
@media (max-width: 768px){

  /* 桌機橫向 ul 隱藏 */
  header nav > ul{ display: none; }

  /* ✅ 讓手機側欄每個 li 變成一行，margin-top 才會生效 */
  header nav > ul > li{
    display: block;
    margin-right: 0;
  }

  /* ✅ 手機 / 響應式：以「建地」為基準，其餘選單往下拉開 */
  header nav > ul > li + li{
    margin-top: var(--nav-mobile-gap); /* ✅改這裡 */
  }

  /* LOGO 置中 */
  header h1{
    left: 50%;
    transform: translateX(-50%);
  }

  /* 漢堡按鈕顯示 */
  .menu{
    display: block;
    background-color: transparent;
    color: #fff;
    font-size: 35px;
    position: absolute;
    top: 15px;
    left: 20px;
    border: none;
    cursor: pointer;
  }

  /* 側欄 nav */
  header nav{
    position: fixed;
    left: 0;
    top: 0;
    width: 180px;
    height: 100vh;
    background-color: rgba(10, 28, 26, 0.97);
    padding-top: var(--nav-top-pad-mobile); /* ✅改這裡 */
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;

    display: flex;
    flex-direction: column;
  }

  header nav > ul{
    display: block !important;
    position: static;
    margin: 0;
    padding: 0 16px;
    line-height: 1.6;

    flex: 1 1 auto;
    min-height: 0;
  }

  /* ✅ 側欄選單：同寬/整齊（只影響手機） */
  header nav a.nav-item{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--nav-item-minw);
    text-align: center;

    padding: var(--nav-item-pad-y) var(--nav-item-pad-x);
    border-radius: 8px;
    color: #fff;
    text-decoration: none;

    font-variant-east-asian: proportional-width;
  }

  header nav a.nav-item:hover{
    background: rgba(255,255,255,0.1);
    text-decoration: none;
  }

  /* ✅ 短字（建地/農地/廠房）視覺拉寬 */
  header nav a.nav-item.nav-short{
    letter-spacing: var(--nav-short-letterspace);
  }

  /* 側欄打開 */
  body.nav-open header nav{ transform: translateX(0); }
  body.nav-open{ overflow: hidden; }

  /* 遮罩 */
  .backdrop{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 900;
  }
  body.nav-open .backdrop{
    opacity: 1;
    pointer-events: auto;
  }

  .product{
    flex-direction: column;
    padding: 60px 0;
  }
  .product div{ width: 80%; margin-bottom: 30px; }

  /* ✅ 手機：整塊 HERO 內容往下推（避開名片/右上浮動按鈕） */
  .news .hero-content{
    padding-top: 100px; /* ✅想更下：170~190；想更上：130~140 */
    box-sizing: border-box;
  }

  /* ✅ 手機：主標題（只留一份，避免重複衝突） */
 /* html[lang="zh-Hant-TW"]*/
   .news h2{
    font-size: 44px;
    line-height: 1.15;
    margin: 0 auto;

    /* ✅避開右上浮動按鈕區 */
    padding-right: 80px;
    padding-left: 12px;

    box-sizing: border-box;
    text-align: center;
    white-space: normal;
    word-break: keep-all;
    max-width: 100%;
  }

  /* ✅ 手機收藏按鈕尺寸 */
  .bookmark-btn{
    padding: var(--bookmark-pad-y-mobile) var(--bookmark-pad-x-mobile);
    font-size: var(--bookmark-font-mobile);
  }

  /* ✅ 手機：桌機右上收藏鍵隱藏 */
  #bookmarkBtn{ display:none; }

  /* ✅ 側欄底部收藏：固定貼近側欄底部 */
  .nav-bookmark-item{
    margin-top: auto;
    padding: 10px 0 16px;
    text-align: left;
  }

  .bookmark-btn--nav{
    width: fit-content;
    max-width: 100%;
    display: inline-flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
  }
}

/* 桌機：側欄不鎖定捲動 + 隱藏側欄收藏 */
@media (min-width: 769px){
  body.nav-open{ overflow: visible !important; }
  .backdrop{ display: none !important; }
  header nav .nav-bookmark-item{ display: none !important; }
}

/* =========================================================
   浮動按鈕（房地合一稅 / 免費諮詢）
========================================================= */
.fhet-float-link{
  position: fixed;
  right: 16px;
  top: 88px;
  z-index: 9010;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 130px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(15,23,42,.96);
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 6px 14px rgba(15,23,42,.55);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: none;
  white-space: nowrap;
}
.fhet-float-link:hover{ background: rgba(15,23,42,1); text-decoration: none; }

.consult-float-link{
  position: fixed;
  right: 16px;
  top: 136px;
  z-index: 9010;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 130px;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(15,23,42,.96);
  color: #facc15;
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 6px 14px rgba(15,23,42,.55);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .08em;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
.consult-float-link.is-hidden{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
}
.consult-float-link:hover{ background: rgba(15,23,42,1); color: #fde047; text-decoration: none; }

.consult-float-link.blink3{ animation: consultTextBlinkStrong 1s steps(1, end) 3; }
@keyframes consultTextBlinkStrong{
  0%{ color: #fde047; }
  50%{ color: #713f12; }
  100%{ color: #fde047; }
}
@media (prefers-reduced-motion: reduce){
  .consult-float-link.blink3{ animation: none; }
}

@media (max-width: 768px){
  .fhet-float-link{ top: 86px; right: 12px; padding: 8px 20px; font-size: 17px; }
  .consult-float-link{ top: 136px; right: 12px; padding: 8px 20px; font-size: 17px; }
}

/* Promo overlay */
.promo-overlay{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  background: rgba(0,0,0,0.0);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .35s ease, visibility .35s ease;
}
.promo-overlay.show{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.promo-box{
  max-width: var(--promo-box-max-width);
  padding: var(--promo-box-padding-y) var(--promo-box-padding-x);
  border-radius: var(--promo-border-radius);
  background: #ffffff;
  color: #000000;
  text-align: center;
  font-family: "Microsoft JhengHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  font-size: var(--promo-font-size-desktop);
  line-height: 1.6;
  box-shadow: 0 18px 45px rgba(15,23,42,.35);
}
.promo-box span{ display: block; transition: color .2s ease, text-shadow .2s ease; }
.promo-box span.flash{
  color: #dc2626;
  text-shadow: 0 0 6px rgba(248,113,113,0.95), 0 0 14px rgba(248,113,113,0.9), 0 0 26px rgba(220,38,38,0.85);
}
@media (max-width: 768px){
  .promo-box{
    font-size: var(--promo-font-size-mobile);
    max-width: 80vw;
    padding: 24px 28px;
  }
}

/* Footer 電話 / 免費諮詢 */
.footer-consult{
  color: #ffffff;
  font-weight: 800;
}
.footer-consult.blink3{
  animation: consultTextBlinkStrong 1s steps(1, end) 3;
}
@media (prefers-reduced-motion: reduce){
  .footer-consult.blink3{ animation: none; }
}

.tel-link{
  color:#ffffff;
  font-weight: 800;
  text-decoration:none;
  white-space:nowrap;
  transition: color .2s ease;
}
.tel-link:hover{ color:#e5e7eb; text-decoration:none; }
.tel-link.is-yellow{ color:#facc15; }
.tel-link.is-yellow:hover{ color:#fde047; }
.tel-icon{ width:1em; height:1em; display:inline-block; vertical-align:-0.12em; margin-right:6px; }

/* 回頂部 / 登出 */
#to-top.to-top, #site-exit.site-exit{
  position: fixed;
  bottom: 20px;
  z-index: 9000;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(15,23,42,.96);
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 6px 14px rgba(15,23,42,.55);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
#to-top.to-top{ left: 16px; }
#site-exit.site-exit{ right: 16px; }
#to-top.to-top:hover, #site-exit.site-exit:hover{ background: rgba(15,23,42,1); text-decoration: none; }
#to-top.to-top.show, #site-exit.site-exit.show{
  opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
}
@media (max-width: 768px){
  #to-top.to-top, #site-exit.site-exit{
    bottom: 64px;
    padding: 10px 16px;
    font-size: 12px;
  }
  #to-top.to-top{ left: 12px; }
  #site-exit.site-exit{ right: 12px; }
}

/* ✅ 漢堡選單打開時：強制隱藏「回頂部 / 登出」 */
body.nav-open #to-top.to-top,
body.nav-open #site-exit.site-exit{
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translateY(8px) !important;
}

/* Modal（留言板） */
.modal[hidden]{ display:none; }
.modal{ position: fixed; inset: 0; z-index: 10050; }
.modal-backdrop{ position:absolute; inset:0; background: rgba(0,0,0,.55); }
.modal-panel{
  position: relative;
  width: min(520px, 92vw);
  margin: 16vh auto 0;
  background: rgba(72, 86, 82, 0.96);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(0,0,0,.45);
  overflow: hidden;
}
.modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 16px;
  background: rgba(255,255,255,.10);
}
.modal-header h3{ margin:0; font-size:18px; }
.modal-x{ background: transparent; color:#fff; border:0; font-size:18px; cursor:pointer; }
.modal-body{ padding: 14px 16px 10px; }
.modal-label{ display:block; margin-bottom:8px; opacity:.92; }
#guestbook-text{
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.12);
  color: #ffffff;
  padding: 10px 12px;
  resize: none;
  outline: none;
  font-family: "Microsoft JhengHei", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
.modal-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-top:8px;
  font-size:13px;
  opacity:.9;
  gap:10px;
}
.modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding: 12px 16px 16px;
}
.modal-btn{
  background: rgba(255,255,255,.08);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  min-width: 84px;
  height: 40px;
}
.modal-btn.primary{
  background: rgba(250, 204, 21, 0.12);
  border-color: rgba(250,204,21,.70);
  font-weight: 800;
}

/* ================================
   Language Switch (中文｜EN)
================================ */
.lang-switch{
  position: fixed;
  right: var(--lang-right-desktop);
  top: 186px;
  z-index: 9010;
  color: #ffffff;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: .06em;
  text-shadow: 0 2px 8px rgba(0,0,0,.35);
  user-select: none;
}

/* ✅ 語系選單：滑到 reserve 區塊時隱藏（跟免費咨詢一致） */
.lang-switch.is-hidden{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}

.lang-switch .lang-link{
  color: #ffffff;
  text-decoration: none;
}
.lang-switch .lang-link:hover{
  text-decoration: underline;
}
.lang-switch .lang-sep{
  margin: 0 8px;
  opacity: .95;
}

/* 目前語言高亮（自動判斷 html lang） */
html[lang="zh-Hant-TW"] .lang-switch .lang-zh{ color: #facc15; }
html[lang="en"]         .lang-switch .lang-en{ color: #facc15; }

/* 手機位置微調（跟你的浮動按鈕一致） */
@media (max-width: 768px){
  .lang-switch{
    right: var(--lang-right-mobile);
    top: 190px;
    font-size: 16px;
  }
}

/* =========================================================
   ✅ 繁/簡切換按鈕：保留「白字顯示」版本（已刪除前面小方塊版本）
========================================================= */
.lang-switch #zh-toggle{
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
  margin-right: 10px;
  cursor: pointer;

  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  text-shadow: 0 2px 8px rgba(0,0,0,.35);

  font-size: 16px !important;
  line-height: 1 !important;
  letter-spacing: .06em !important;

  width: auto !important;
  height: auto !important;
  text-indent: 0 !important;
  overflow: visible !important;
  white-space: nowrap !important;
}

.lang-switch #zh-toggle::before,
.lang-switch #zh-toggle::after{
  display: none !important;
  content: "" !important;
}

.lang-switch #zh-toggle:hover{
  text-decoration: underline;
}
.lang-switch #zh-toggle:focus-visible{
  outline: 2px solid rgba(255,255,255,.85);
  outline-offset: 2px;
}