/* ============================================================
   EWA Components —— NAV / MENU / FOOTER / 按鈕
   桌機樣式為主；手機覆蓋集中在 responsive.css。
   ============================================================ */

/* ---------------- 按鈕：立即諮詢 ---------------- */
.ewa-consult {
  position: relative; display: inline-flex; align-items: center;
  height: 44px; padding: 0 32px; overflow: hidden;
  border: 1px solid var(--ewa-brass); color: var(--ewa-brass);
  font-family: var(--ewa-font-serif); font-size: 16px; letter-spacing: .12em;
  cursor: pointer; background: transparent; transition: color var(--ewa-t-base) ease;
}
.ewa-consult::before {
  content: ''; position: absolute; inset: 0; background: var(--ewa-brass);
  transform: translateX(-101%); transition: transform var(--ewa-t-base) var(--ewa-ease);
}
.ewa-consult span { position: relative; z-index: 1; }
.ewa-consult:hover { color: var(--ewa-cream); }
.ewa-consult:hover::before { transform: translateX(0); }

/* ---------------- NAV ---------------- */
.ewa-nav {
  position: fixed; top: 0; left: 0; right: 0; height: var(--ewa-nav-h); z-index: 400;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--ewa-gutter);
  background: var(--ewa-nav-bg);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--ewa-line);
  transition: background var(--ewa-t-slow) ease, border-color var(--ewa-t-slow) ease, backdrop-filter var(--ewa-t-slow) ease;
}
.ewa-nav.menu-open {
  background: rgba(255,255,255,0); backdrop-filter: blur(0); -webkit-backdrop-filter: blur(0);
  border-color: transparent;
}
.ewa-nav-logo { display: flex; align-items: center; gap: 12px; z-index: 402; transition: opacity var(--ewa-t-fast) ease; }
.ewa-nav.menu-open .ewa-nav-logo { opacity: 0; pointer-events: none; }
.ewa-logo-mark { height: 40px; width: auto; }
.ewa-logo-word { height: 52px; width: auto; }
.ewa-nav-div { display: inline-block; width: 1px; height: 30px; background: var(--ewa-line-2); }
.ewa-nav-name {
  font-family: var(--ewa-font-mincho); font-weight: 600; font-size: 28px;
  letter-spacing: .18em; color: var(--ewa-ink); padding-left: .22em;
}
.ewa-nav-right { display: flex; align-items: center; gap: 16px; z-index: 402; }

/* 漢堡鍵：兩條線 morph 成 X（CSS-only） */
.ewa-ham { position: relative; width: 48px; height: 48px; background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: flex-end; padding: 0; z-index: 402; }
.ewa-ham-box { position: relative; display: block; width: 36px; height: 20px; }
.ewa-bar { position: absolute; left: 0; height: 1px; background: var(--ewa-bar);
  transform-origin: center; transition: top var(--ewa-t-base) var(--ewa-ease), bottom var(--ewa-t-base) var(--ewa-ease), width var(--ewa-t-base) var(--ewa-ease), transform var(--ewa-t-base) var(--ewa-ease); }
.ewa-bar1 { top: 3px; width: 26px; }
.ewa-bar2 { bottom: 3px; width: 18px; }
.ewa-nav.menu-open .ewa-bar1 { top: 9.5px; transform: rotate(45deg); width: 26px; }
.ewa-nav.menu-open .ewa-bar2 { bottom: 9.5px; transform: rotate(-45deg); width: 26px; }

/* ---------------- 選單覆蓋層 ---------------- */
.ewa-overlay {
  position: fixed; inset: 0; z-index: 300;
  opacity: 0; visibility: hidden; transform: translateY(-2.5%); transform-origin: top center;
  pointer-events: none;
  transition: opacity var(--ewa-t-base) var(--ewa-ease), transform .7s var(--ewa-ease), visibility 0s .45s;
}
.ewa-overlay.is-open {
  opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto;
  transition: opacity var(--ewa-t-slow) var(--ewa-ease), transform .7s var(--ewa-ease), visibility 0s;
}

/* ===== 桌機版選單：左圖 + 右面板 ===== */
.ewa-menu-desk {
  position: absolute; inset: 0; background: var(--ewa-panel);
  display: grid; grid-template-columns: minmax(0,11fr) minmax(0,9fr); align-items: center; overflow: hidden;
}
.ewa-menu-hero { position: relative; height: 100%; overflow: hidden; }
.ewa-menu-hero-img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.ewa-menu-hero::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20,19,17,.5) 0%, rgba(20,19,17,.04) 40%, transparent 64%); }

/* 桌機版左側作品輪播 */
.ewa-mc { background: #26241f; }
.ewa-mc-imgs { position: absolute; inset: 0; }
.ewa-mc-slide { position: absolute; inset: 0; background-size: cover; background-position: center; transition: opacity 1.1s ease; }
.ewa-mc-caps { position: absolute; left: clamp(28px,3vw,52px); bottom: clamp(64px,9vh,104px); z-index: 2; }
.ewa-mc-cap { position: absolute; left: 0; bottom: 0; white-space: nowrap; transition: opacity .8s ease; }
.ewa-mc-cap-en { display: block; font-family: 'Jost', sans-serif; font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: rgba(190,163,129,.9); margin-bottom: 8px; }
.ewa-mc-cap-zh { display: block; font-family: 'Noto Serif TC', serif; font-weight: 300; font-size: clamp(20px,1.8vw,26px); letter-spacing: .1em; color: #f3f1ec; }
.ewa-mc-dots { position: absolute; left: clamp(28px,3vw,52px); bottom: clamp(34px,5vh,52px); z-index: 2; display: flex; gap: 8px; }
.ewa-mc-dot { width: 8px; height: 8px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); background: transparent; padding: 0; cursor: pointer; transition: background .3s ease, border-color .3s ease; }
.ewa-mc-dot.is-on { background: #bea381; border-color: #bea381; }

.ewa-menu-panel { position: relative; height: 100%; overflow-y: auto;
  display: flex; flex-direction: column; justify-content: center; gap: clamp(16px,2.4vh,28px);
  padding: clamp(48px,8vh,88px) clamp(24px,3.2vw,52px); background: var(--ewa-panel); }
.ewa-menu-brand { display: flex; align-items: center; gap: 16px; }
.ewa-logo-word-lg { height: 62px; width: auto; }
.ewa-menu-brand-txt { display: flex; flex-direction: column; gap: 6px; }
.ewa-menu-brand-zh { font-family: var(--ewa-font-mincho); font-weight: 600; font-size: 28px; letter-spacing: .12em; color: var(--ewa-ink); }
.ewa-menu-brand-en { font-family: var(--ewa-font-display); font-size: 14px; letter-spacing: .3em; text-transform: uppercase; color: var(--ewa-ink-2); }
.ewa-menu-tag { font-family: var(--ewa-font-serif); font-size: 16px; line-height: 2; letter-spacing: .12em; color: var(--ewa-ink); }

.ewa-menu-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 clamp(8px,1vw,16px); }
.ewa-mi { display: flex; flex-direction: column; gap: 5px; padding: clamp(10px,1.3vh,16px) 0; }
.ewa-mi-zh { font-family: var(--ewa-font-serif); font-size: clamp(15px,1.2vw,19px); letter-spacing: .06em; color: var(--ewa-ink); transition: color var(--ewa-t-fast) ease; }
.ewa-mi-en { font-family: var(--ewa-font-label); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--ewa-brass); opacity: .75; transition: opacity var(--ewa-t-fast) ease; }
.ewa-mi:hover .ewa-mi-zh { color: var(--ewa-gold-deep); }
.ewa-mi:hover .ewa-mi-en { opacity: 1; }
.ewa-mi.is-accent .ewa-mi-zh { color: #4d2912; }
.ewa-mi.is-accent:hover .ewa-mi-zh { color: var(--ewa-gold-light); }

.ewa-menu-foot { border-top: 1px solid var(--ewa-line); padding-top: clamp(14px,1.8vh,22px);
  display: flex; flex-direction: column; gap: clamp(12px,1.6vh,18px); }

/* 社群圓鈕（NAV 選單 + FOOTER 共用） */
.ewa-soc-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ewa-soc { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border: 1px solid var(--ewa-line-2); border-radius: 50%; transition: border-color var(--ewa-t-base) ease, background var(--ewa-t-base) ease; }
.ewa-soc:hover { border-color: var(--ewa-gold); background: rgba(190,163,129,.08); }
.ewa-soc svg { width: 24px; height: 24px; }

/* 聯絡資訊 */
.ewa-ct { display: flex; flex-direction: column; gap: 8px; }
.ewa-ct-row { display: flex; align-items: baseline; gap: 12px; }
.ewa-ct-k { flex-shrink: 0; width: 84px; font-family: var(--ewa-font-serif); font-size: 15px; letter-spacing: .08em; color: var(--ewa-brass); }
.ewa-ct-v { font-size: 15px; letter-spacing: .04em; color: var(--ewa-ink); }

/* ===== 手機版選單：編號目錄（桌機隱藏） ===== */
.ewa-menu-mob { display: none; position: absolute; inset: 0; background: var(--ewa-panel);
  flex-direction: column; overflow-y: auto; }
.ewa-mm-hero { position: relative; height: 148px; flex-shrink: 0; overflow: hidden; background: #26241f; }
.ewa-mm-hero-img { position: absolute; inset: 0; background-size: cover; background-position: center 60%; }
.ewa-mm-hero::after { content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(20,19,17,.28) 0%, rgba(20,19,17,.05) 38%, rgba(246,244,240,.82) 86%, var(--ewa-panel) 100%); }
.ewa-mm-hero-logo { position: absolute; left: clamp(28px,7vw,44px); bottom: 14px; display: flex; align-items: center; gap: 11px; z-index: 2; }
.ewa-mm-hero-logo img { height: 40px; width: auto; }
.ewa-mm-hero-name { font-family: var(--ewa-font-mincho); font-weight: 600; font-size: 15px; letter-spacing: .12em; color: var(--ewa-ink); }
.ewa-mm-nav { display: flex; flex-direction: column; padding: clamp(8px,1.6vh,18px) clamp(28px,7vw,44px) 0; }
.ewa-mm-row { display: flex; align-items: center; gap: 18px; padding: 15px 0; border-bottom: 1px solid rgba(28,27,25,.09); }
.ewa-mm-no { font-family: var(--ewa-font-display); font-size: 12px; letter-spacing: .06em; color: rgba(154,130,84,.6); width: 20px; flex-shrink: 0; }
.ewa-mm-txt { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.ewa-mm-zh { font-weight: 300; font-size: clamp(22px,6.4vw,27px); line-height: 1.08; letter-spacing: .04em; color: var(--ewa-ink); }
.ewa-mm-en { font-family: var(--ewa-font-label); font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--ewa-gold-deep); }
.ewa-mm-arrow { font-size: 20px; line-height: 1; color: rgba(190,163,129,.65); flex-shrink: 0; }
.ewa-mm-row.is-accent .ewa-mm-zh { color: #4d2912; }
.ewa-mm-foot { padding: clamp(20px,4vh,32px) clamp(28px,7vw,44px); }

/* ---------------- FOOTER（深色，忠實復刻）---------------- */
.ewa-footer { background: #3a352f; color: #f0e6d3; margin-top: 0; position: relative; overflow: hidden; }
@media (max-width: 768px) {
  .ewa-footer .ewa-foot-cols { grid-template-columns: 1fr !important; }
  /* 手機版：品牌區塊與地址/服務/選單區塊改直向堆疊，避免共擠一行被壓成窄欄 */
  .ewa-footer .ewa-foot-row { flex-direction: column !important; align-items: stretch !important; }
  .ewa-footer .ewa-foot-brand { width: 100% !important; }
  .ewa-footer .ewa-foot-cols { width: 100% !important; }
  /* 桌機地址強制單行（nowrap）；手機欄寬有限則還原自動換行，避免溢出畫面 */
  #ewa-footer [style*="nowrap"] { white-space: normal !important; }
}
.ewa-foot-inner { display: grid; grid-template-columns: 1.2fr 2fr; gap: clamp(28px,5vw,64px);
  padding-top: clamp(40px,6vw,72px); padding-bottom: clamp(28px,4vw,44px); }
.ewa-foot-logo { height: 48px; width: auto; margin-bottom: 16px; }
.ewa-foot-tag { font-family: var(--ewa-font-serif); font-size: 15px; line-height: 2; letter-spacing: .1em; color: var(--ewa-ink-2); margin-bottom: 20px; }
.ewa-foot-cols { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(20px,4vw,48px); }
.ewa-foot-col h4 { font-family: var(--ewa-font-serif); font-size: 13px; letter-spacing: .16em; color: var(--ewa-gold-deep); margin-bottom: 14px; }
.ewa-foot-col a { display: block; font-size: 15px; letter-spacing: .06em; color: var(--ewa-ink); padding: 5px 0; transition: color var(--ewa-t-fast) ease; }
.ewa-foot-col a:hover { color: var(--ewa-gold-deep); }
.ewa-foot-col p { font-size: 14px; line-height: 1.8; letter-spacing: .04em; color: var(--ewa-ink-2); margin-bottom: 12px; }
.ewa-foot-col b { color: var(--ewa-brass); font-weight: 600; }
.ewa-foot-copy { border-top: 1px solid var(--ewa-line); padding: 20px var(--ewa-gutter);
  text-align: center; font-size: 12px; letter-spacing: .08em; color: var(--ewa-ink-2); }
