@charset "UTF-8";

:root {
  --gold: #b68a3c;
  --gold-dark: #8a6423;
  --ink: #2b2620;
  --cream: #faf7f1;
  --line: #e7ded0;
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  /* 現代化跨平台無襯線黑體字型鏈，完美兼顧 iOS、Android、Mac 與 Windows */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang TC", "Apple LiGothic Medium", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.9;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: 1px;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250,247,241,0.96);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: 1140px;
  margin: 0 auto;
}

.logo {
  --logo-text-size: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  height: calc(var(--logo-text-size) * 1.5);
  width: calc(var(--logo-text-size) * 1.5);
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* 文字 LOGO 降級樣式：優雅的粗體與黃金主題色，確保在沒有 Logo 圖片時依舊大方好看 */
.logo-text {
  font-size: var(--logo-text-size);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1.5px;
  display: inline-block;
  white-space: nowrap;
  font-family: inherit;
  text-transform: uppercase;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 32px;
}

nav a {
  font-size: 15px;
  letter-spacing: 2px;
  position: relative;
  padding: 6px 0;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width .3s;
}

nav a:hover::after {
  width: 100%;
}

/* 漢堡按鈕容器 (桌面版隱藏，直向彈性排列) */
.menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}

.menu-btn span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--ink);
}

/* Hero */
.hero {
  position: relative;
  height: 50vh;
  min-height: 480px;
  overflow: hidden;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 15, 10, .15), rgba(20, 15, 10, .55));
  display: flex;
  align-items: flex-end;
}

.hero-caption {
  color: #fff;
  padding: 60px 24px;
  width: 100%;
}

.hero-caption .eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--gold);
  border-top: 1px solid var(--gold);
  padding-top: 10px;
  margin-bottom: 14px;
}

.hero-caption h1 {
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 500;
}

/* 首頁膠囊型圓弧自訂按鈕 */
.hero-btn {
  display: inline-block;
  margin-top: 24px;
  padding: 12px 40px;
  background-color: var(--gold);
  color: #fff !important;
  border-radius: 50px; /* 膠囊圓弧 */
  font-size: 15px;
  letter-spacing: 2px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid var(--gold);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

/* 自訂按鈕懸停（Hover）：改為白框白字與柔和白光發光 */
.hero-btn:hover {
  background-color: rgba(255, 255, 255, 0.08); /* 微微白色半透明底色 */
  color: #fff !important;                       /* 純白文字 */
  border-color: #fff !important;                 /* 純白邊框 */
  transform: translateY(-2px);                   /* 微幅懸浮 */
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.18); /* 柔和白色陰影 */
}

section {
  padding: 0px 0;
  scroll-margin-top: 90px; /* 讓平滑捲動停下時，區塊標題不會被固定在頂部的選單列擋住 */
}

.section-title {
  text-align: center;
  margin-bottom: 56px;
}

.section-title span {
  display: block;
  font-size: 13px;
  letter-spacing: 5px;
  color: var(--gold);
  margin-bottom: 10px;
}

.section-title h2 {
  font-size: 30px;
}

.section-title h2::after {
  content: "";
  display: block;
  width: 48px;
  height: 2px;
  background: var(--gold);
  margin: 18px auto 0;
}

/* News */
.news {
  padding: 50px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.news-card {
  background: #fff;
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform .3s, box-shadow .3s;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  color: inherit;
}

.news-card img {
  height: 200px;
  object-fit: cover;
  width: 100%;
}

.news-body {
  padding: 24px;
}

.news-body time {
  font-size: 13px;
  color: var(--gold-dark);
  letter-spacing: 1px;
}

.news-body h3 {
  font-size: 18px;
  margin: 10px 0 12px;
  line-height: 1.5;
}

.news-body p {
  font-size: 14px;
  color: #666;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.more-link {
  display: block;
  width: fit-content;
  margin: 56px auto 0;
  border: 1px solid var(--gold);
  padding: 12px 60px;
  font-size: 14px;
  letter-spacing: 3px;
  transition: .3s;
  text-align: center;
  box-sizing: border-box;
}

.more-link:hover {
  background: var(--gold);
  color: #fff;
}

/* About */
.about {
  background: #fff;
  padding: 50px;
}

.about-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 60px;
  align-items: flex-start;
}

.about-logo {
  text-align: center;
}

.about-logo img {
  margin: 0 auto;
  width: 100%;
  max-width: 300px;    /* 最大寬度限制 300px */
  height: 300px;       /* 限制高度 300px */
  object-fit: contain; /* 確保不同比例的商標圖不變形 */
}

/* 關於我們區塊：無 Logo 上傳時的降級盾牌文字標章樣式 */
.about-logo-text {
  font-size: 26px;
  font-weight: 700;
  color: var(--gold);
  border: 3px solid var(--gold);
  padding: 24px 16px;
  display: inline-block;
  letter-spacing: 2px;
  text-align: center;
  background: #fff;
  margin: 0 auto;
  max-width: 220px;
  word-break: break-all;
  box-shadow: 0 6px 16px rgba(0,0,0,0.02);
}

.about-text h3 {
  font-size: 20px;
  color: var(--gold-dark);
  margin: 28px 0 12px;
}

.about-text h3:first-child {
  margin-top: 0;
}

.about-text p {
  font-size: 15px;
  color: #444;
  margin-bottom: 14px;
}

.about-text ul, .about-text ol {
  margin-left: 20px;
  margin-bottom: 14px;
}

.about-text li {
  font-size: 15px;
  color: #444;
}

.about-text a {
  color: var(--gold);
  text-decoration: underline;
}

.about-text a:hover {
  color: var(--gold-dark);
}

/* Services (電腦桌機版預設：雙欄排列，100x100 圓形框縮圖) */
.service {
  padding: 50px;
}

.service-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 36px;
}

.service-item {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  text-align: left;
}

.service-thumb {
  width: 100px;
  height: 100px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 3px solid var(--gold);
  overflow: hidden;
}

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

.service-item h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.service-item p {
  font-size: 14px;
  color: #555;
  line-height: 1.7;
}

.read-more {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--gold-dark);
  border-bottom: 1px solid var(--gold-dark);
}

/* Team */
.team {
  background: #fff;
  padding: 50px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.team-card {
  text-align: center;
}

.team-card img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 16px;
  filter: grayscale(15%);
}

.team-card h3 {
  font-size: 17px;
  margin-bottom: 8px;
}

.team-card p {
  font-size: 13px;
  color: #666;
}

/* Testimonials - 改為彈性置中排列 */
.testi {
  padding: 50px;
}

.testi-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}

.testi-card {
  background: #fff;
  padding: 30px 22px;
  border-top: 3px solid var(--gold);
  text-align: center;
  flex: 1 1 calc(25% - 28px);
  max-width: calc(25% - 21px);
  min-width: 240px;
  box-sizing: border-box;
}

.testi-card img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 16px;
}

.testi-card h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

.testi-card p {
  font-size: 13px;
  color: #666;
}

/* Contact */
.contact {
  background: linear-gradient(180deg, #fff, var(--cream));
  padding: 50px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
}

.contact-info h3 {
  font-size: 20px;
  margin-bottom: 16px;
  color: var(--gold-dark);
}

.contact-info p {
  font-size: 14px;
  margin-bottom: 20px;
  color: #444;
}

.contact-info .detail {
  font-size: 15px;
  margin-bottom: 8px;
  word-break: break-all; /* 防止長 Email 或電話在手機端擠壓排版並超出版面 */
}

.contact-map {
  margin-top: 24px;
  border: 1px solid var(--line);
  overflow: hidden;
}

/* 「加入我的手機聯絡人」按鈕:只在手機瀏覽時顯示,位於 Google 地圖上方 */
.vcard-inline-btn {
  display: none;
  width: 100%;
  margin-top: 20px;
  padding: 14px;
  background: var(--gold);
  color: #fff;
  border: none;
  font-size: 15px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background .3s ease;
}
.vcard-inline-btn:hover {
  background: var(--gold-dark);
}
@media (max-width: 900px) {
  .vcard-inline-btn { display: block; }
}

/* 確保嵌入的 Google 地圖 iframe 能滿版且在手機上不會溢出 */
.contact-map iframe {
  width: 100% !important;
  max-width: 100%;
}

form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

form input, form textarea {
  border: 1px solid var(--line);
  background: #fff;
  padding: 14px 16px;
  font-size: 14px;
  font-family: inherit;
}

form textarea {
  min-height: 220px;
  resize: vertical;
}

form button {
  background: var(--gold);
  color: #fff;
  border: none;
  padding: 14px;
  font-size: 15px;
  letter-spacing: 3px;
  cursor: pointer;
  transition: .3s;
}

form button:hover {
  background: var(--gold-dark);
}

/* Footer */
footer {
  background: var(--ink);
  color: #cfc7ba;
  padding: 50px 0 30px;
  text-align: center;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 24px;
}

.social-icons a {
  width: 40px;
  height: 40px;
  border: 1px solid #6c6355;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px; 
}

.social-icons a:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

footer .copy {
  font-size: 12px;
  letter-spacing: 1px;
  color: #8d8474;
}

footer .copy a {
  color: #b6a888;
  margin-left: 10px;
}

.back-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  background: var(--gold);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
  z-index: 200;
}

/* Responsive */
@media (max-width: 900px) {

/* 手機版關於我們 Logo 滿版寬度設定 */
  .about-logo img {
    max-width: 100% !important; 
    width: 100% !important;
    height: auto !important;     /* 高度改為自適應比例，避免圖片寬度拉大時高度扁平變形 */
  }

  /* 縮減手機版的區塊內距，左右留白 20px 以騰出更多內容空間，防止元素溢出 */
  .news, .about, .service, .team, .testi, .contact {
    padding: 40px 20px;
  }

  nav ul {
    position: fixed;
    top: 84px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 20px 24px;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    transform: translateY(-150%);
    transition: .3s;
  }
  nav ul.open {
    transform: translateY(0);
  }
  .menu-btn {
    display: flex;
  }

  /* 將最新消息、優秀團隊及服務項目統一為標準的手機雙欄網格 (已將 .testi-grid 移出以套用彈性排版) */
  .news-grid, .team-grid, .service-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid {
    grid-template-columns: 1fr;
  }
  
  /* 手機版服務項目樣式微調（強制縮圖不擠壓、變成與團隊成員卡片一樣寬大的圓角圖，並垂直排版） */
  .service-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }
  
  .service-thumb {
    width: 100% !important; /* 寬度撐滿網格欄位 */
    height: auto !important;
    aspect-ratio: 1/1;       /* 強制 1:1 正方形比例 */
    border-radius: 6px !important; /* 改為與團隊照片相同的 6px 圓角 */
    border: none !important;       /* 移除圓形金框，貼齊團隊卡片質感 */
    margin: 0 auto;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 560px) {
  /* 在窄屏手機（例如直向拿手機時），最新消息維持單欄摺疊並置中 */
  .news-grid {
    grid-template-columns: 1fr;
  }

  /* 服務項目、優秀團隊:預設在窄屏手機摺疊為單欄,後台可選擇改為雙欄 (.mobile-cols-2) */
  .service-list, .team-grid {
    grid-template-columns: 1fr;
  }
  .service-list.mobile-cols-2, .team-grid.mobile-cols-2 {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 16px;
  }
  .service-list.mobile-cols-2 .service-item {
    gap: 10px;
  }

  /* 客戶推薦:預設在窄屏手機每列顯示一張,後台可選擇改為雙欄 (.mobile-cols-2) */
  .testi-card {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .testi-grid.mobile-cols-2 .testi-card {
    flex: 1 1 calc(50% - 14px);
    max-width: calc(50% - 7px);
    min-width: 0;
    padding: 20px 14px;
  }

  .about-logo-text {
    max-width: 100%;
  }
}
/* Quill 富文本編輯器內容於前台的對應樣式 (顏色為 inline style 不需額外處理,這裡補上文字大小 class) */
.ql-size-small { font-size: 0.75em; }
.ql-size-large { font-size: 1.5em; }
.ql-size-huge { font-size: 2.5em; }
.rich-content p, .about-text p { margin-bottom: 10px; }

/* 回到頂部按鈕：固定在畫面右下角，滾動一段距離後才淡入顯示 */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--gold);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease, visibility .3s ease, background .3s ease;
  z-index: 999;
}
.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.back-to-top:hover {
  background: var(--gold-dark);
}
@media (max-width: 560px) {
  .back-to-top { right: 16px; bottom: 16px; width: 42px; height: 42px; font-size: 18px; }
}

/* 加我 LINE 浮動按鈕：固定在畫面右下角，疊在回到頂部按鈕正上方 */
.line-float-btn {
  position: fixed;
  right: 24px;
  bottom: 82px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #06C755;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(0,0,0,.2);
  z-index: 999;
  transition: transform .3s ease, background .3s ease;
}
.line-float-btn:hover {
  background: #05a648;
  transform: scale(1.08);
}
@media (max-width: 560px) {
  .line-float-btn { right: 16px; bottom: 70px; width: 42px; height: 42px; font-size: 19px; }
}

/* 加入我的聯絡人 (vCard) 浮動按鈕:只在手機瀏覽時顯示,固定在畫面右下角、LINE 按鈕的下方 */
.vcard-float-btn {
  display: none;
  position: fixed;
  right: 24px;
  bottom: 82px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: var(--gold);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0,0,0,.2);
  z-index: 999;
  transition: transform .3s ease, background .3s ease;
}
.vcard-float-btn:hover {
  background: var(--gold-dark);
  transform: scale(1.08);
}
@media (max-width: 900px) {
  /* 只在手機瀏覽寬度(含平板直向)時顯示此按鈕,並把 LINE 按鈕往上推,讓出下方位置 */
  .vcard-float-btn { display: flex; }
  .line-float-btn { bottom: 140px; }
}
@media (max-width: 560px) {
  .vcard-float-btn { right: 16px; bottom: 70px; width: 42px; height: 42px; font-size: 18px; }
  .line-float-btn { bottom: 124px; }
}
