/* ==========================================
   聯絡我專屬排版 - 智慧型自動重疊版 (contact.css)
   ========================================== */

/* 🌟 智慧型總容器：強制保持比例，並作為文字定位基準 */
.contact-hero-wrapper {
  width: 100%;
  position: relative;
  aspect-ratio: 32 / 9; /* 電腦版寬扁比例 */
  overflow: hidden;
  background-color: var(--bg-color); /* 為了羽化效果設定底色 */
}

/* 讓 Banner 填滿容器 */
.contact-hero-wrapper .banner {
  width: 100%;
  height: 100%;
  margin: 0;
}

.contact-hero-wrapper .banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* 圖片底部漸層淡出 */
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 70%, rgba(0,0,0,0) 100%);
}

/* 🌟 標題區塊絕對定位：永遠固定在容器底部 5% 處 */
.about-header-overlay {
  position: absolute;
  bottom: 5%; 
  left: 50%;
  transform: translateX(-50%); /* 置中對齊 */
  width: 100%;
  max-width: 960px;
  padding: 0 20px;
  text-align: center;
  z-index: 10;
}

/* 標題文字樣式 (純白 + 電影級深色陰影) */
.about-header-overlay .about-header h1,
.about-header-overlay .about-header h2,
.about-header-overlay .about-header p {
  color: #ffffff !important;
  text-shadow: 
    0 2px 10px rgba(0, 0, 0, 0.8),
    0 4px 25px rgba(0, 0, 0, 0.6);
  margin-left: 0;
  margin-right: 0;
  opacity: 0; /* 預設隱藏，交給動畫浮現 */
}

/* ==========================================
   聯絡資訊網格與名片卡設計
   ========================================== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 40px;
  padding-bottom: 40px;
}

.contact-card {
  background-color: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--c4-winter-mist);
  border-radius: 16px;
  padding: 25px 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 4px 15px rgba(137, 159, 175, 0.1);
  text-decoration: none;
  opacity: 0; /* 預設隱藏，交給動畫浮現 */
}

/* 懸浮發光效果 */
.contact-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(104, 170, 198, 0.25);
  border-color: var(--accent-color);
  background-color: #ffffff;
}

/* 左側圓形圖示框 */
.contact-icon {
  width: 55px;
  height: 55px;
  background-color: var(--c4-winter-mist);
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-shrink: 0;
  transition: all 0.4s ease;
}

.contact-card:hover .contact-icon {
  background-color: var(--accent-color);
  transform: scale(1.1) rotate(5deg);
}

/* 右側文字資訊 */
.contact-info h3 {
  margin: 0 0 5px 0;
  font-family: 'Cinzel', 'Noto Serif TC', serif;
  font-size: 1.3rem;
  color: var(--heading-color);
  letter-spacing: 1px;
}

.contact-info p {
  margin: 0;
  font-family: 'Noto Sans TC', sans-serif;
  color: var(--text-color);
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.contact-card:hover .contact-info p {
  color: var(--accent-color);
}

.cursor-copy {
  cursor: default; 
}

/* ==========================================
   🎬 聯絡頁專屬入場動畫
   ========================================== */
@keyframes cinematicBlurIn {
  0% { opacity: 0; filter: blur(12px); transform: translateY(15px); }
  100% { opacity: 1; filter: blur(0); transform: translateY(0); }
}

@keyframes cardEntranceUp {
  0% { opacity: 0; transform: translateY(30px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* 標題群組依序浮現 */
.about-header-overlay .about-header h1 {
  animation: cinematicBlurIn 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  animation-delay: 0.2s;
}
.about-header-overlay .about-header h2 {
  animation: cinematicBlurIn 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  animation-delay: 0.4s;
}
.about-header-overlay .about-header p {
  animation: cinematicBlurIn 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  animation-delay: 0.6s;
}

/* 名片卡片依序滑出 */
.contact-grid .contact-card:nth-child(1) {
  animation: cardEntranceUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  animation-delay: 0.9s;
}
.contact-grid .contact-card:nth-child(2) {
  animation: cardEntranceUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  animation-delay: 1.0s;
}
.contact-grid .contact-card:nth-child(3) {
  animation: cardEntranceUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  animation-delay: 1.1s;
}
.contact-grid .contact-card:nth-child(4) {
  animation: cardEntranceUp 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  animation-delay: 1.2s;
}

/* ==========================================
   🌟 手機版適應 (RWD) - 再也不需要調 margin 啦！
   ========================================== */
@media screen and (max-width: 768px) {
  /* 1. 只需要修改總容器的比例 */
  .contact-hero-wrapper {
    aspect-ratio: 4 / 3; 
  }

  /* 2. 縮小標題字體，維持精緻度 */
  .about-header-overlay .about-header h1 {
    font-size: 2.2rem; 
  }
  .about-header-overlay .about-header h2 {
    font-size: 1.3rem;
  }
  .about-header-overlay .about-header p {
    font-size: 0.9rem;
    letter-spacing: 1px;
  }
}