/* ===========================================
   WORKS 作品案例列表頁
   =========================================== */
.works {
  min-height: 100vh;
  padding-top: 64px;
  background: var(--bg-gradient);
  font-family: "Space Grotesk", "Noto Sans TC", sans-serif;
  color: var(--text-primary);
}

/* 主區塊 */
.works .works-section {
  padding: clamp(2rem, 5vw, 4rem) 0 clamp(3rem, 6vw, 5rem);
}
.works .works-container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
}

/* 標題與說明：共用樣式見 common.css 的 .list-head / .list-title / .list-lead */


/* ── 卡片格 ── */
.works .works-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.6rem, 3.2vw, 2.6rem) clamp(1.4rem, 3vw, 2.4rem);
}
.works .works-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: rgba(74, 26, 120, 0.04);
  border: 1px solid rgba(74, 26, 120, 0.12);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.works .works-card.is-hidden {
  display: none;
}
/* 捲動進場動畫：卡片捲進視窗時淡入上移（參考 news.html fadeInUp）
   只有 JS 啟用（html.js-reveal，於 <head> 內即設定）時才預先隱藏，
   避免沒有 JS 時整片空白；backwards 讓延遲期間就維持隱藏，消除閃爍 */
@keyframes works-fade-up {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}
.js-reveal .works .works-card {
  opacity: 0;
}
.js-reveal .works .works-card.is-inview {
  opacity: 1;
  animation: works-fade-up 0.6s var(--ease-out-expo) backwards;
}
@media (prefers-reduced-motion: reduce) {
  .js-reveal .works .works-card { opacity: 1; }
  .js-reveal .works .works-card.is-inview { animation: none; }
}
.works .works-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: rgba(74, 26, 120, 0.06);
}
.works .works-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
@media(hover: hover) {
  .works .works-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    border-color: rgba(74, 26, 120, 0.25);
  }
}
.works .works-card-body {
  padding: clamp(0.9rem, 1.8vw, 1.3rem) clamp(1.1rem, 2vw, 1.5rem);
}
.works .works-card-title {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-weight: 700;
  color: var(--accent);
  line-height: 1.25;
}

/* 無圖時的品牌漸層海報 */
.works .works-poster {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 1.2em;
  text-align: center;
  color: #ffffff;
}
.works .works-poster .poster-en {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.4vw, 1.6rem);
  letter-spacing: 0.03em;
  line-height: 1.1;
}
.works .works-poster .poster-zh {
  font-size: clamp(0.85rem, 1.6vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.06em;
  opacity: 0.92;
}
.works .poster-1 { background: linear-gradient(150deg, #6B2BA8 0%, #4A1A78 100%); }
.works .poster-2 { background: linear-gradient(150deg, #4A1A78 0%, #2A1145 100%); }
.works .poster-3 { background: linear-gradient(150deg, #7A3DB8 0%, #46208a 100%); }
.works .poster-4 { background: linear-gradient(150deg, #8A4FC0 0%, #4A1A78 100%); }
.works .poster-5 { background: linear-gradient(150deg, #4A1A78 0%, #6B2BA8 55%, #F5B800 210%); }
.works .poster-6 { background: linear-gradient(150deg, #2A1145 0%, #6B2BA8 120%); }



/* ── 側邊聯絡我們按鈕 ── */
.side-contact {
  position: fixed;
  right: 0;
  top: 42%;
  z-index: 9989;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5em;
  padding: 1em 0.55em;
  color: #ffffff;
  text-decoration: none;
  background: var(--brand-purple);
  border-radius: 12px 0 0 12px;
  box-shadow: -4px 4px 14px rgba(74, 26, 120, 0.25);
  transition: background 0.2s, padding-right 0.2s;
}
.side-contact .side-contact-text {
  writing-mode: vertical-rl;
  letter-spacing: 0.18em;
  font-size: 0.85rem;
  font-weight: 500;
}
.side-contact svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #ffffff;
  stroke-width: 2;
  stroke-linejoin: round;
}
@media(hover: hover) {
  .side-contact:hover {
    background: var(--brand-purple-light);
    padding-right: 0.85em;
  }
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 768px) {
  .side-contact { padding: 0.8em 0.45em; }
  .side-contact .side-contact-text { font-size: 0.78rem; }
}
@media (max-width: 560px) {
  .works { padding-top: 56px; }
  .works .works-grid { grid-template-columns: 1fr; gap: 1.4rem; }
  .side-contact svg { display: none; }
}
