/* ========================================
   XY- NAMESPACE — 夏悅工程 專用樣式系統
   ======================================== */
:root {
  --xy-brand:        #AA7566;
  --xy-brand-light:  #FCCABC;
  --xy-brand-pale:   #FFF4F0;
  --xy-brand-pale2:  #FEF0EA;
  --xy-brand-mid:    #E8B4A4;
  --xy-brand-dark:   #7A4F42;
  --xy-brand-deep:   #4E2E24;
  --xy-accent:       #C89080;
  --xy-text:         #2C1A14;
  --xy-text-2:       #7A5C54;
  --xy-text-3:       #B89A93;
  --xy-border:       #EBCFC6;
  --xy-border-2:     #F5E0D8;
  --xy-bg:           #FFFAF9;
  --xy-bg-card:      #FFFFFF;
  --xy-bg-section:   #FDF6F3;
  --xy-shadow-sm:    0 2px 8px rgba(170,117,102,0.10);
  --xy-shadow-md:    0 6px 24px rgba(170,117,102,0.14);
  --xy-shadow-lg:    0 16px 48px rgba(170,117,102,0.16);
  --xy-radius-sm:    8px;
  --xy-radius-md:    14px;
  --xy-radius-lg:    22px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans TC', sans-serif;
  background: var(--xy-bg);
  color: var(--xy-text);
  line-height: 1.75;
  font-size: 15px;
}

/* ── 頂部導覽條 ── */
.xy-topbar {
  background: var(--xy-brand-deep);
  color: rgba(255,255,255,0.7);
  font-size: 12px;
  padding: 8px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.xy-topbar a { color: var(--xy-brand-light); text-decoration: none; }
.xy-topbar a:hover { text-decoration: underline; }



/* ── HERO BANNER ── */
.xy-hero {
  background: linear-gradient(135deg, var(--xy-brand-deep) 0%, #7A3E30 60%, var(--xy-brand) 100%);
  padding: 64px 24px 56px;
  position: relative;
  overflow: hidden;
}
.xy-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}
.xy-hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.xy-breadcrumb {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.xy-breadcrumb span { color: var(--xy-brand-light); }
.xy-hero h1 {
  font-family: 'Noto Serif TC', serif;
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 14px;
}
.xy-hero h1 em {
  font-style: normal;
  color: var(--xy-brand-light);
}
.xy-hero-desc {
  font-size: 15px;
  color: rgba(255,255,255,0.75);
  max-width: 600px;
  margin-bottom: 28px;
  line-height: 1.8;
}
.xy-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.xy-hero-tag {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 12px;
  padding: 5px 14px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}
.xy-hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.xy-btn-primary {
  background: var(--xy-brand-light);
  color: var(--xy-brand-deep);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 28px;
  border-radius: 40px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(252,202,188,0.4);
}
.xy-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(252,202,188,0.5);
}
.xy-btn-outline {
  background: transparent;
  color: #fff;
  font-size: 14px;
  padding: 12px 28px;
  border-radius: 40px;
  border: 1px solid rgba(255,255,255,0.35);
  text-decoration: none;
  transition: background 0.2s;
}
.xy-btn-outline:hover { background: rgba(255,255,255,0.1); }

/* ── SECTION WRAPPER ── */
.xy-section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 56px 24px;
}
.xy-section-title {
  font-family: 'Noto Serif TC', serif;
  font-size: clamp(20px, 2.5vw, 28px);
  font-weight: 700;
  color: var(--xy-brand-deep);
  margin-bottom: 10px;
}
.xy-section-sub {
  font-size: 14px;
  color: var(--xy-text-2);
  margin-bottom: 36px;
}
.xy-divider-line {
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--xy-brand), var(--xy-brand-light));
  border-radius: 2px;
  margin-bottom: 10px;
}

/* ── 總介紹：左圖右文 ── */
.xy-intro-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  background: var(--xy-bg-card);
  border: 1px solid var(--xy-border);
  border-radius: var(--xy-radius-lg);
  overflow: hidden;
  box-shadow: var(--xy-shadow-md);
}
.xy-intro-img {
  position: relative;
  height: 420px;
  overflow: hidden;
  background: linear-gradient(160deg, #D4A898 0%, var(--xy-brand) 50%, var(--xy-brand-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.xy-intro-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255,255,255,0.8);
}
.xy-intro-img-placeholder svg {
  opacity: 0.6;
}
.xy-intro-img-placeholder p {
  font-size: 13px;
  letter-spacing: 0.05em;
}
.xy-intro-img-badge {
  position: absolute;
  bottom: 18px;
  left: 18px;
  background: rgba(255,255,255,0.9);
  color: var(--xy-brand-deep);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  backdrop-filter: blur(6px);
}
.xy-intro-content {
  padding: 40px 40px 40px 0;
}
.xy-intro-eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--xy-brand);
  font-weight: 500;
  margin-bottom: 12px;
}
.xy-intro-content h2 {
  font-family: 'Noto Serif TC', serif;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 700;
  color: var(--xy-brand-deep);
  line-height: 1.4;
  margin-bottom: 16px;
}
.xy-intro-content p {
  font-size: 14px;
  color: var(--xy-text-2);
  line-height: 1.9;
  margin-bottom: 14px;
}
.xy-intro-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
.xy-intro-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--xy-text-2);
}
.xy-feature-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--xy-brand);
  flex-shrink: 0;
}

/* ── 服務項目 GRID ── */
.xy-services-bg {
  background: var(--xy-bg-section);
  border-top: 1px solid var(--xy-border-2);
  border-bottom: 1px solid var(--xy-border-2);
}
.xy-service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 18px;
}
.xy-service-card {
  background: var(--xy-bg-card);
  border: 1px solid var(--xy-border);
  border-radius: var(--xy-radius-md);
  padding: 24px 20px 22px;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
  cursor: default;
  position: relative;
  overflow: hidden;
}
.xy-service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--xy-brand), var(--xy-brand-light));
  opacity: 0;
  transition: opacity 0.2s;
}
.xy-service-card:hover {
  box-shadow: var(--xy-shadow-md);
  transform: translateY(-3px);
  border-color: var(--xy-brand-mid);
}
.xy-service-card:hover::before { opacity: 1; }
.xy-service-icon {
  width: 44px;
  height: 44px;
  background: var(--xy-brand-pale);
  border-radius: var(--xy-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 22px;
}
.xy-service-card h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--xy-brand-deep);
  margin-bottom: 8px;
  font-family: 'Noto Serif TC', serif;
}
.xy-service-card p {
  font-size: 12.5px;
  color: var(--xy-text-2);
  line-height: 1.7;
}

/* ── 施工作品展示區 ── */
.xy-works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
@media (max-width: 600px) {
  .xy-works-grid { grid-template-columns: 1fr; }
}
.xy-work-card {
  border-radius: var(--xy-radius-md);
  overflow: hidden;
  box-shadow: var(--xy-shadow-sm);
  border: 1px solid var(--xy-border);
  transition: box-shadow 0.2s, transform 0.2s;
}
.xy-work-card:hover {
  box-shadow: var(--xy-shadow-md);
  transform: translateY(-3px);
}
.xy-work-img {
  height: 220px;
  position: relative;
  overflow: hidden;
}
.xy-work-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}
.xy-work-card:hover .xy-work-img img { transform: scale(1.04); }
.xy-work-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.8);
}
.xy-work-body {
  background: #fff;
  padding: 18px 20px;
}
.xy-work-body h3 {
  font-family: 'Noto Serif TC', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--xy-brand-deep);
  margin-bottom: 6px;
}
.xy-work-body p {
  font-size: 13px;
  color: var(--xy-text-2);
  line-height: 1.7;
}
.xy-work-tag {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  background: var(--xy-brand-pale);
  color: var(--xy-brand);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
}

/* ── 特色說明條 ── */
.xy-trust-strip {
  background: var(--xy-brand-deep);
  padding: 36px 24px;
}
.xy-trust-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.xy-trust-item {
  color: rgba(255,255,255,0.9);
}
.xy-trust-num {
  font-family: 'Noto Serif TC', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--xy-brand-light);
  display: block;
  line-height: 1.2;
  margin-bottom: 4px;
}
.xy-trust-label {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
}

/* ── CTA 區塊 ── */
.xy-cta-block {
  background: linear-gradient(135deg, var(--xy-brand-pale) 0%, #FAE8E0 100%);
  border: 1px solid var(--xy-border);
  border-radius: var(--xy-radius-lg);
  padding: 48px 40px;
  text-align: center;
}
.xy-cta-block h2 {
  font-family: 'Noto Serif TC', serif;
  font-size: clamp(18px, 2.5vw, 26px);
  font-weight: 700;
  color: var(--xy-brand-deep);
  margin-bottom: 10px;
}
.xy-cta-block p {
  font-size: 14px;
  color: var(--xy-text-2);
  margin-bottom: 26px;
}
.xy-cta-info {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.xy-cta-info-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--xy-brand-dark);
  font-weight: 500;
}
.xy-cta-btns {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}


/* ── 無圖時佔位符 ── */
.xy-placeholder-img {
  background: linear-gradient(135deg, var(--xy-brand) 0%, var(--xy-brand-deep) 100%);
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  letter-spacing: 0.05em;
  height: 100%;
  width: 100%;
}

/* ── RWD ── */
@media (max-width: 900px) {
  .xy-intro-block {
    grid-template-columns: 1fr;
  }
  .xy-intro-img { height: 260px; }
  .xy-intro-content { padding: 28px 24px 28px; }
  .xy-trust-inner { grid-template-columns: repeat(2, 1fr); }
  .xy-service-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}
@media (max-width: 640px) {
  .xy-nav-links { display: none; }
  .xy-trust-inner { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .xy-cta-block { padding: 32px 20px; }
  .xy-hero { padding: 44px 20px 40px; }
}
@media (max-width: 400px) {
  .xy-trust-inner { grid-template-columns: 1fr 1fr; }
}

/* ── 新增的 ── */

/* 修改左右兩欄布局，實現垂直置中 */
.xy-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: center;  /* 改為 center，讓圖片與文字區域垂直置中 */
  justify-content: center; /* 水平置中整個內容 */
}

/* 圖片區塊自身也置中 */
.xy-intro-img {
  flex: 1.2;
  min-width: 260px;
  position: relative;
  border-radius: 32px;
  overflow: hidden;
  background: #f8f4f0;
  display: flex;           /* 新增 flex */
  justify-content: center; /* 圖片內容水平置中 */
  align-items: center;     /* 圖片內容垂直置中 */
}

/* 圖片本身也置中顯示 */
.xy-intro-img img {
  width: 100%;
  height: auto;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
  margin: 0 auto;          /* 確保圖片置中 */
}