/* ===========================
   Gosmooth - Home Page Styles
   Hero + Brand Logo Marquee
   =========================== */

/* --- Hero Section --- */
.home-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 720px;
  overflow-x: hidden;
  overflow-y: visible;
  background: #B8A88C; /* 深色底色作為加載前佔位 */
}

/* Fallback 靜態圖片，永遠存在（z-index: 0） */
.home-hero__fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.home-hero__fallback img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 桌面端視頻背景（z-index: 1），覆蓋在 fallback 上方 */
.home-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  object-fit: cover;
}

/* 輕微遮罩，讓文字清晰可讀但背景不會太暗 */
.home-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background-color: rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

/* --- Hero Content --- */
.home-hero__content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1200px;
  margin: 0;
  padding: clamp(80px, 12vh, 130px) 40px 0 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

/* --- Hero Eyebrow --- */
.home-hero__eyebrow {
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.15;
  margin: 0 0 6px;
  background-image: linear-gradient(180deg, #FFC127 0%, #DB7F21 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* --- Hero Title --- */
.home-hero__title {
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  font-size: 44px;
  font-style: italic;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.12;
  margin: 0;
  display: inline-block;
  overflow: visible;
  padding-right: 0.18em;
  background-image: linear-gradient(180deg, #FFC127 0%, #DB7F21 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

/* --- Hero Search Box (new3 深色圓角膠囊風格) --- */
.home-hero-search {
  width: min(600px, 100%);
  max-width: 600px;
  display: flex;
  align-items: center;
  background: rgba(38, 38, 38, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  margin-left: 0;
  margin-right: auto;
}

.home-hero-search input[type="search"] {
  flex: 1;
  min-width: 0;
  height: 42px;
  min-height: 42px;
  border: none;
  outline: none;
  background: transparent;
  color: #ffffff;
  padding: 0 18px;
  font-size: 15px;
  font-family: var(--font-sans);
}

.home-hero-search input[type="search"]::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.home-hero-search button[type="submit"] {
  flex: 0 0 auto;
  min-width: 88px;
  height: 42px;
  min-height: 42px;
  border: none;
  border-radius: 999px;
  background: #EEB21B;
  color: #111111;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s ease;
  padding: 0 22px;
}

.home-hero-search button[type="submit"]:hover {
  background: #d49a10;
}

/* ===========================
   Brand Logo Marquee
   =========================== */

.brand-logo-marquee {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 78px;
  z-index: 6;
  padding: 96px 0 10px 0;
  overflow-x: hidden;
  overflow-y: visible;
  /* 左右邊緣淡出效果 */
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    black 8%,
    black 92%,
    transparent 100%
  );
}

.brand-logo-marquee__track {
  position: relative;
  display: flex;
  gap: 18px;
  width: max-content;
  overflow: visible;
  z-index: 1;
  /* 從右到左輪播 */
  animation: brandLogoMarquee 32s linear infinite;
  will-change: transform;
}

@keyframes brandLogoMarquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* --- Brand Logo Card (接近正方形) --- */
.brand-logo-card {
  position: relative;
  overflow: visible;
  flex: 0 0 auto;
  width: 104px;
  height: 104px;
  border-radius: 8px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  border: 1px solid rgba(238, 178, 27, 0.18);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.brand-logo-card img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

/* --- Brand Logo Tooltip --- */
.brand-logo-card__tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 14px);
  transform: translateX(-50%) translateY(8px);
  min-width: 78px;
  min-height: 42px;
  padding: 8px 16px;
  border-radius: 6px;
  background: #ffffff !important;
  border: none !important;
  box-shadow:
    0 0 0 1px rgba(238, 178, 27, 0.38),
    0 8px 18px rgba(0, 0, 0, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 100;
  overflow: visible;
  background-image: none !important;
  color: inherit;
  -webkit-text-fill-color: initial;
}

.brand-logo-card__tooltip-text {
  display: inline-block;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  background-image: linear-gradient(180deg, #FFC127 0%, #DB7F21 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.brand-logo-card__tooltip::before {
  display: none !important;
  content: none !important;
}

.brand-logo-card__tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% - 1px);
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 8px 0 8px;
  border-color: #ffffff transparent transparent transparent;
  background: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  filter: none !important;
}

/* ===========================
   Desktop Hover Effects
   僅在支援 hover 的指針裝置啟用
   =========================== */
@media (hover: hover) and (pointer: fine) {
  .brand-logo-card {
    transform-origin: center bottom;
  }

  .brand-logo-card:hover {
    transform: scale(1.14);
    border-color: #EEB21B;
    box-shadow: 0 22px 38px rgba(0, 0, 0, 0.28);
    z-index: 50;
  }

  .brand-logo-card:hover .brand-logo-card__tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
  }

  /* 只 hover 到卡片時暫停輪播，空白區不停 */
  .brand-logo-marquee:hover .brand-logo-marquee__track {
    animation-play-state: running;
  }

  .brand-logo-marquee__track:has(.brand-logo-card:hover) {
    animation-play-state: paused;
  }
}

/* ===========================
   Responsive - Tablet (max-width: 1024px)
   =========================== */
@media (max-width: 1024px) {
  .home-hero {
    min-height: 640px;
  }

  .home-hero__content {
    padding: clamp(70px, 10vh, 110px) 32px 0 32px;
  }

  .home-hero__title {
    font-size: 40px;
  }
}

/* ===========================
   Responsive - Mobile (max-width: 768px)
   手機端：隱藏視頻，只顯示 08.webp，不作 hover 效果
   =========================== */
@media (max-width: 768px) {
  /* 手機端隱藏視頻 */
  .home-hero__video {
    display: none;
  }

  .home-hero {
    min-height: 560px;
  }

  .home-hero__content {
    padding: clamp(64px, 9vh, 100px) 20px 0 20px;
  }

  .home-hero__eyebrow {
    font-size: 16px;
    letter-spacing: 0.25em;
  }

  .home-hero__title {
    font-size: 32px;
    margin-bottom: 24px;
  }

  /* 搜尋框手機版全寬 */
  .home-hero-search {
    width: 100%;
    max-width: 100%;
    padding: 7px;
  }

  .home-hero-search input[type="search"] {
    height: 40px;
    min-height: 40px;
    padding: 0 14px;
    font-size: 14px;
  }

  .home-hero-search button[type="submit"] {
    min-width: 72px;
    height: 40px;
    min-height: 40px;
    font-size: 14px;
    padding: 0 16px;
  }

  /* Logo 卡片手機版縮小 */
  .brand-logo-card {
    width: 82px;
    height: 82px;
    padding: 10px;
  }

  /* 手機端隱藏 tooltip */
  .brand-logo-card__tooltip {
    display: none;
  }

  /* 手機端停用 hover 放大 */
  .brand-logo-card:hover {
    transform: none;
  }

  /* 手機端調整 marquee 位置 */
  .brand-logo-marquee {
    bottom: 24px;
    padding-top: 10px;
    overflow: hidden;
  }

  .brand-logo-marquee__track {
    gap: 14px;
  }
}

/* ===========================
   Home Page — Header Overlay (absolute over Hero)
   =========================== */

/* Desktop: Header sits on top of Hero background */
@media (min-width: 769px) {
  body.is-home-page .site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(58, 58, 58, 0.88);
    backdrop-filter: blur(6px);
  }

  /* Hero content pushed further down */
  .home-hero__content {
    padding: clamp(190px, 18vh, 230px) 30px 0;
    transform: none;
  }

  /* Search box closer to text */
  .home-hero-search {
    margin-top: 28px;
  }

  /* Brand logo marquee closer to reference design */
  .brand-logo-marquee {
    bottom: 54px;
  }
}

/* Mobile: keep Header sticky */
@media (max-width: 768px) {
  body.is-home-page .site-header {
    position: sticky;
    top: 0;
  }

  .home-hero__content {
    transform: none;
  }

  .home-hero__eyebrow {
    font-size: 24px;
  }

  .home-hero__title {
    font-size: 42px;
  }
}

/* ===========================
   Responsive - Small Mobile (max-width: 480px)
   =========================== */
@media (max-width: 480px) {
  .home-hero {
    min-height: 520px;
  }

  .home-hero__content {
    padding: clamp(52px, 8vh, 80px) 16px 0 16px;
  }

  .home-hero__title {
    font-size: 28px;
    margin-bottom: 20px;
  }

  .home-hero__eyebrow {
    font-size: 14px;
  }

  .brand-logo-card {
    width: 70px;
    height: 70px;
    padding: 8px;
  }

  .brand-logo-marquee {
    bottom: 20px;
    padding-top: 8px;
  }

  .brand-logo-marquee__track {
    gap: 12px;
  }
}

/* ===========================
   Home Stats Section (一、數據統計區)
   =========================== */

.home-stats {
  background: linear-gradient(180deg, rgba(42, 42, 42, 0.97) 0%, rgba(22, 22, 22, 0.99) 100%);
  border-top: 1px solid rgba(255, 193, 39, 0.72);
  border-bottom: 1px solid rgba(255, 193, 39, 0.72);
  padding: 40px 0 44px;
}

.home-stats__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

/* --- 每個數據項 --- */
.home-stat {
  text-align: center;
  padding: 12px 20px;
  border-right: 1px solid rgba(188, 188, 188, 0.3);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.home-stat:last-child {
  border-right: none;
}

/* --- 數據值容器（數字 + 後綴） --- */
.home-stat__value {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}

/* --- 數據數字 --- */
.home-stat__number,
.home-stat__suffix {
  color: #EEB21B;
  font-weight: 800;
}

.home-stat__number {
  font-family: var(--font-sans);
  font-size: 38px;
  line-height: 1;
}

/* --- 數據後綴 --- */
.home-stat__suffix {
  font-size: 1.52em;
  margin-left: 2px;
}

/* --- 數據標籤 --- */
.home-stat__label {
  font-size: 16px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.88);
  order: -1;
}

/* ===========================
   Home Feature Area (二+三 共用背景)
   =========================== */

.home-feature-area {
  position: relative;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.78)),
    url('/assets/images/Bg/Bg04.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 56px 0 64px;
}

/* ===========================
   Home Service Icons (二、服務 icon 區)
   =========================== */

.home-service-icons {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 48px;
}

.home-service-icons__inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* --- 每個 Service Icon Card --- */
.service-icon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 16px 22px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.service-icon-card:hover {
  border-color: rgba(238, 178, 27, 0.65);
  transform: translateY(-4px);
  background: rgba(0, 0, 0, 0.28);
}

.service-icon-card img {
  width: 70px;
  height: 70px;
  object-fit: contain;
  filter: brightness(1.05);
}

.service-icon-card h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--color-white);
  margin: 0;
}

/* ===========================
   Home Flip Cards (三、翻轉卡片)
   =========================== */

.home-flip-cards {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 20px;
}

.home-flip-cards__inner {
  perspective: 1400px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  max-width: 1320px;
  margin: 0 auto;
}

/* --- Flip Card Container --- */
.flip-card {
  perspective: 1400px;
  min-height: 230px;
  height: 230px;
  border-radius: 22px;
}

.flip-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 230px;
  height: 230px;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}

/* Desktop: hover 翻轉 + 立體深度 */
@media (hover: hover) and (pointer: fine) {
  .flip-card:hover .flip-card__inner {
    transform: rotateY(180deg) translateZ(8px);
  }

  .flip-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.28);
  }
}

/* Mobile: focus-within 或點擊翻轉 */
@media (hover: none), (pointer: coarse) {
  .flip-card.flip-card--active .flip-card__inner {
    transform: rotateY(180deg);
  }
}

/* --- Flip Card Faces --- */
.flip-card__face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform-style: preserve-3d;
  border-radius: inherit;
  overflow: hidden;
}

/* --- Front Face --- */
.flip-card__front {
  transform: rotateY(0deg) translateZ(1px);
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.12)),
    var(--card-bg);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  border-radius: 12px;
}

/* --- 正面深色內容面板 --- */
.flip-card__front-panel {
  width: 98%;
  min-height: 120px;
  background: rgba(8, 8, 8, 0.68);
  border-radius: 6px;
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #ffffff;
  text-align: left;
}

.flip-card__front-panel h3 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.35;
  color: #ffffff;
}

.flip-card__front-panel p {
  margin: 0;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.92);
}

/* --- Back Face --- */
.flip-card__back {
  transform: rotateY(180deg) translateZ(1px);
  background: linear-gradient(135deg, rgba(238, 178, 27, 0.92), rgba(120, 72, 10, 0.86));
  color: #ffffff;
  border-radius: 12px;
  padding: 32px 32px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  overflow: hidden;
}

.flip-card__back h3 {
  width: 100%;
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.35;
  color: #ffffff;
  text-align: center;
}

/* --- 背面底部操作區 --- */
.flip-card__back-actions {
  margin-top: 28px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 22px;
}

/* --- 黑色裝飾條（純裝飾，在最下方，不可點擊） --- */
.flip-card__back-bar {
  width: 78%;
  height: 18px;
  border-radius: 999px;
  background: #050505;
  display: block;
  pointer-events: none;
}

/* --- 立即查看按鈕（金色膠囊，在文字與裝飾條之間） --- */
.flip-card__back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  height: 44px;
  padding: 0 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f6c54a, #d79a12);
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.flip-card__back-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.26);
  background: linear-gradient(135deg, #ffe08a, #e8a818);
}

/* ===========================
   Desktop Service Icon Card (圖四：icon 左、文字右)
   =========================== */
@media (min-width: 769px) {
  .home-service-icons__inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px 28px;
  }

  .service-icon-card {
    min-height: 116px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    padding: 18px 24px;
    text-align: left;
  }

  .service-icon-card img {
    width: 82px;
    height: 82px;
    flex: 0 0 82px;
    object-fit: contain;
    background: #ffffff;
    padding: 14px;
    border-radius: 3px;
  }

  .service-icon-card h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
  }
}

/* ===========================
   Responsive - Tablet & Mobile (max-width: 768px)
   =========================== */
@media (max-width: 768px) {
  .home-stats {
    padding: 32px 0 36px;
  }

  .home-stats__inner {
    grid-template-columns: repeat(2, 1fr);
    row-gap: 28px;
    column-gap: 0;
  }

  .home-stat {
    padding: 8px 12px;
  }

  .home-stat:nth-child(2) {
    border-right: none;
  }

  .home-stat__number {
    font-size: 30px;
  }

  .home-stat__label {
    font-size: 14px;
  }

  /* Service Icons */
  .home-service-icons {
    padding: 0 20px 36px;
  }

  .home-service-icons__inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }

  .service-icon-card {
    padding: 22px 12px 18px;
  }

  .service-icon-card img {
    width: 58px;
    height: 58px;
  }

  .service-icon-card h3 {
    font-size: 15px;
  }

  /* Flip Cards */
  .home-flip-cards__inner {
    grid-template-columns: 1fr;
    gap: 22px;
    max-width: 400px;
    margin: 0 auto;
  }

  .flip-card {
    height: 220px;
    min-height: 220px;
  }

  .flip-card__inner {
    height: 220px;
    min-height: 220px;
  }

  .flip-card__front-panel {
    width: 90%;
    padding: 20px;
  }

  .flip-card__front-panel h3,
  .flip-card__back h3 {
    font-size: 20px;
  }

  .flip-card__front-panel p {
    font-size: 15px;
  }

  .flip-card__back {
    padding: 26px 26px 22px;
  }
}

/* ===========================
   Responsive - Small Mobile (max-width: 480px)
   Stats single column
   =========================== */
@media (max-width: 480px) {
  .home-stats__inner {
    grid-template-columns: 1fr 1fr;
    row-gap: 24px;
  }

  .home-stat {
    border-right: none;
    padding: 6px 8px;
  }

  .home-stat:nth-child(odd) {
    border-right: 1px solid rgba(188, 188, 188, 0.2);
  }

  .home-stat__number {
    font-size: 26px;
  }

  .home-stat__label {
    font-size: 13px;
  }

  /* Service Icons */
  .home-service-icons__inner {
    gap: 10px;
  }

  .service-icon-card {
    padding: 18px 8px 14px;
    border-width: 1.5px;
  }

  .service-icon-card img {
    width: 48px;
    height: 48px;
  }

  .service-icon-card h3 {
    font-size: 14px;
  }

  /* Flip Cards */
  .flip-card {
    height: 200px;
    min-height: 200px;
  }

  .flip-card__inner {
    height: 200px;
    min-height: 200px;
  }

  .flip-card__front-panel {
    width: 92%;
    padding: 16px 18px;
  }

  .flip-card__front-panel h3,
  .flip-card__back h3 {
    font-size: 18px;
  }

  .flip-card__front-panel p {
    font-size: 14px;
  }

  .flip-card__back {
    padding: 22px 22px 18px;
  }
}

/* ===========================
   Unified Section Heading System
   首頁通用標題樣式（四、關於金順 + 五、核心業務 共用）
   =========================== */

.home-section-heading {
  margin-bottom: 32px;
}

.home-section-heading__eyebrow {
  display: block;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 8px;
}

.home-section-heading__title {
  font-family: var(--font-serif);
  font-size: 35px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--color-dark);
  margin: 0 0 4px;
}

.home-section-heading__subtitle {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--color-dark);
  margin: 0;
}

@media (max-width: 768px) {
  .home-section-heading__title {
    font-size: 42px;
  }

  .home-section-heading__subtitle {
    font-size: 34px;
  }
}

/* ===========================
   Home About Section (四、關於金順)
   =========================== */

.home-about {
  padding: 80px 0;
  background: var(--color-white);
}

.home-about__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

/* --- 左側文字區 --- */
.home-about__text {
  max-width: 560px;
}

.home-about__body {
  font-size: 15px;
  color: var(--color-text-muted);
  line-height: 1.85;
  margin-bottom: 14px;
}

.home-about__body:last-of-type {
  margin-bottom: 0;
}

/* --- 瞭解詳情按鈕 --- */
.home-about__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding: 14px 36px;
  background: linear-gradient(180deg, var(--color-gold-light) 0%, var(--color-gold) 100%);
  color: var(--color-dark);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 700;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.25s ease;
}

.home-about__cta:hover {
  background: linear-gradient(180deg, var(--color-gold) 0%, var(--color-gold-dark) 100%);
  box-shadow: 0 4px 16px rgba(238, 178, 27, 0.4);
  transform: translateY(-1px);
}

/* --- 右側圖片區 --- */
.home-about__gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 220px 220px;
  gap: 10px;
}

.home-about__gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.home-about__gallery-img:first-child {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
}

/* ===========================
   Home Core Services Section (五、核心業務)
   =========================== */

.home-core-services {
  padding: 80px 0;
  background: var(--color-bg-light);
}

.home-core-services__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
}

/* --- 三張卡片容器 --- */
.home-core-services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

/* --- 核心業務卡片 --- */
.home-service-card {
  background: var(--color-white);
  border-radius: 8px;
  padding: 32px 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
  border-left: 4px solid var(--color-gold);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.home-service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
}

.home-service-card__num {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-gold);
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.home-service-card__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-dark);
  margin: 0 0 12px;
}

.home-service-card__desc {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.75;
  margin: 0;
}

/* --- 底部分類按鈕區 --- */
.home-core-services__categories {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-start;
}

.home-cat-tag {
  display: inline-block;
  padding: 6px 18px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid rgba(108, 108, 108, 0.67);
  border-radius: 3px;
  color: var(--color-text-muted);
  transition: all 0.25s ease;
  text-decoration: none;
}

.home-cat-tag:hover {
  background: var(--color-gold);
  border-color: var(--color-gold);
  color: var(--color-dark);
}

/* ===========================
   IntersectionObserver 進場動畫（輕量）
   =========================== */

.home-animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.home-animate-in.home-animate-in--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   Responsive - About & Core Services (max-width: 1024px)
   =========================== */
@media (max-width: 1024px) {
  .home-about__inner {
    gap: 48px;
    padding: 0 32px;
  }

  .home-about__gallery {
    grid-template-rows: 180px 180px;
  }

  .home-core-services__inner {
    padding: 0 32px;
  }
}

/* ===========================
   Responsive - About & Core Services (max-width: 768px)
   =========================== */
@media (max-width: 768px) {
  /* 關於金順 - 手機版：文字在上，圖片在下 */
  .home-about {
    padding: 56px 0;
  }

  .home-about__inner {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 0 20px;
  }

  .home-about__text {
    max-width: 100%;
  }

  .home-about__gallery {
    grid-template-rows: 200px 200px;
  }

  /* 核心業務 - 手機版 */
  .home-core-services {
    padding: 56px 0;
  }

  .home-core-services__inner {
    padding: 0 20px;
  }

  .home-core-services__grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .home-core-services__categories {
    justify-content: flex-start;
  }
}

/* ===========================
   Responsive - About & Core Services (max-width: 480px)
   =========================== */
@media (max-width: 480px) {
  .home-about__gallery {
    grid-template-rows: 160px 160px;
    gap: 8px;
  }

  .home-about__body {
    font-size: 14px;
  }

  .home-service-card {
    padding: 24px 18px;
  }
}

/* ===========================
   Home Advantages Section (六、我們的四大保障)
   =========================== */

.home-advantages {
  background: #ffffff;
  padding: 90px 0;
}

.home-advantages__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
}

.home-advantages__grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}

.advantage-card {
  min-height: 230px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
  text-align: center;
  padding: 32px 16px;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.advantage-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.10);
}

.advantage-card img {
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.advantage-card h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #17202a;
}

/* ===========================
   Responsive - Advantages (max-width: 768px)
   =========================== */
@media (max-width: 768px) {
  .home-advantages {
    padding: 56px 0;
  }

  .home-advantages__inner {
    padding: 0 20px;
  }

  .home-advantages__grid {
    margin-top: 36px;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .advantage-card {
    min-height: 150px;
    gap: 18px;
    padding: 22px 12px;
  }

  .advantage-card img {
    width: 54px;
    height: 54px;
  }

  .advantage-card h3 {
    font-size: 16px;
  }
}

/* ===========================
   Responsive - Advantages (max-width: 480px)
   =========================== */
@media (max-width: 480px) {
  .home-advantages__grid {
    gap: 12px;
  }

  .advantage-card {
    min-height: 130px;
    padding: 18px 10px;
    gap: 14px;
  }

  .advantage-card img {
    width: 46px;
    height: 46px;
  }

  .advantage-card h3 {
    font-size: 14px;
  }
}

/* ===========================
   Mobile Heading Size Override
   手機版標題調小，保持高級感
   =========================== */
@media (max-width: 768px) {
  .home-section-heading__eyebrow {
    font-size: 12px;
    letter-spacing: 0.26em;
  }

  .home-section-heading__title {
    font-size: 30px;
    line-height: 1.2;
  }

  .home-section-heading__subtitle {
    font-size: 26px;
    line-height: 1.25;
  }
}

/* ===========================
   Heading Gradient & Bold Override
   標題漸變色 + 加粗（僅 title 和 subtitle）
   =========================== */
.home-section-heading__title,
.home-section-heading__subtitle {
  background-image: linear-gradient(180deg, #FFC127 0%, #DB7F21 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.home-section-heading__title {
  font-weight: 800;
}

.home-section-heading__subtitle {
  font-weight: 700;
}

/* ===========================
   Subtitle Color Override
   英文副標題改為深色，不使用漸變色
   =========================== */
.home-section-heading__subtitle {
  background-image: none !important;
  color: #2A2A2A !important;
  -webkit-text-fill-color: #2A2A2A !important;
}

/* ===========================
   Text Size & Weight Adjustments
   三處文字微調
   =========================== */

/* 一、關於金順正文 */
.home-about__body {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.9;
}

/* 二、核心業務卡片描述 */
.home-service-card__desc {
  font-size: 16.5px;
  font-weight: 500;
  line-height: 1.85;
}

/* 三、四大保障卡片標題 */
.advantage-card h3 {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.35;
}

/* ===========================
   Mobile: 保持舒適大小
   =========================== */
@media (max-width: 768px) {
  .home-about__body {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.85;
  }

  .home-service-card__desc {
    font-size: 15.5px;
    font-weight: 500;
    line-height: 1.8;
  }

  .advantage-card h3 {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
  }
}

/* ===========================
   Icon Area Text Size Adjustment
   icon 區文字微調
   =========================== */
.service-icon-card h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
}

@media (max-width: 768px) {
  .service-icon-card h3 {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
  }
}

/* ===========================
   Font-Family System
   全站字體統一：serif 用於標題，sans 用於其他
   =========================== */

/* Hero 首屏 — Noto Serif TC */
.home-hero__eyebrow,
.home-hero__title {
  font-family: "Noto Serif TC", serif;
}

/* 三個 section 標題區 — Noto Serif TC */
.home-section-heading,
.home-section-heading__eyebrow,
.home-section-heading__title,
.home-section-heading__subtitle {
  font-family: "Noto Serif TC", serif;
}

/* ===========================
   Eyebrow Font-Family Override
   ABOUT / CORE SERVICES / CORE ADVANTAGES → Noto Sans TC
   =========================== */
.home-section-heading__eyebrow {
  font-family: "Noto Sans TC", sans-serif;
}
