/* =========================================
   協作項目子頁面樣式 
   ========================================= */

.contact-collab .sub-hero {
  padding: 3rem 0 2.5rem;
  background: var(--bg-card);
  border-bottom: 2px solid var(--border-light);
  position: relative;
  overflow: hidden;
}

.contact-collab .sub-hero::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: var(--primary-light);
  border-radius: 50%;
  opacity: .10;
  transform: translate(30%, -30%);
  z-index: 0;
}

.contact-collab .contact-wrap {
  position: relative;
  z-index: 1;
}

/* breadcrumb */
.contact-collab .sub-breadcrumb {
  font-size: .9rem;
  color: var(--text-light);
  display: flex;
  gap: .5rem;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  background: var(--bg-alt);
  padding: .75rem 1rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--primary);
  width: fit-content;
}

.contact-collab .sub-breadcrumb a {
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: all var(--transition);
}

.contact-collab .sub-breadcrumb a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width var(--transition);
}

.contact-collab .sub-breadcrumb a:hover::after {
  width: 100%;
}

.contact-collab .sub-breadcrumb span[aria-hidden="true"] {
  color: var(--border-dark);
  font-weight: 700;
}

/* title/lead */
.contact-collab .sub-title {
  margin: 0 0 .75rem;
  font-size: clamp(2.25rem, 4.5vw, 3rem);
  line-height: 1.1;
  color: var(--text-dark);
  font-weight: 900;
  letter-spacing: -0.5px;
  position: relative;
  display: inline-block;
}

.contact-collab .sub-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 80px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

.contact-collab .sub-lead {
  margin: 1.5rem 0 0;
  color: var(--text);
  line-height: 1.7;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  max-width: 760px;
  font-weight: 500;
  padding: 1rem 0 0 1.5rem;
  border-left: 3px solid var(--border);
}

.contact-collab .sub-actions {
  margin-top: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

/* main section: 保留漸層，但拿掉動畫（更穩、更像顧問頁） */
.contact-collab .sub-section {
  padding: 2.5rem 0 4rem;
  background:
    linear-gradient(135deg,
      var(--bg) 0%,
      var(--bg) 50%,
      var(--bg-alt) 50%,
      var(--bg-alt) 100%);
}

/* h2 card */
.contact-collab .h2 {
  margin: 2.5rem 0 1.5rem;
  font-size: 1.6rem;
  color: var(--text-dark);
  font-weight: 900;
  position: relative;
  padding: 1rem 0 1rem 1.5rem;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.contact-collab .h2::before {
  content: '';
  width: 8px;
  height: 24px;
  background: var(--primary);
  border-radius: 4px;
  flex-shrink: 0;
}

/* panel */
.contact-collab .panel {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.contact-collab .panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: var(--primary);
}

.contact-collab .panel strong {
  color: var(--text-dark);
  font-weight: 800;
  background: linear-gradient(transparent 60%, var(--primary-light) 60%);
  padding: 0 .25rem;
}

/* services grid */
.contact-collab .cards-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.contact-collab .mini {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  transition: all var(--transition-slow);
  height: 100%;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.contact-collab .mini::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}

.contact-collab .mini:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.contact-collab .mini:hover::before {
  transform: scaleX(1);
}

.contact-collab .mini h3 {
  margin: 0 0 1.25rem;
  font-size: 1.25rem;
  color: var(--text-dark);
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.contact-collab .mini h3::before {
  content: '▸';
  color: var(--primary);
  font-size: 1.2em;
}

.contact-collab .mini ul {
  margin: 0;
  padding-left: 0;
}

.contact-collab .mini li {
  margin: .75rem 0;
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.6;
  color: var(--text);
}

.contact-collab .mini li::before {
  content: '—';
  color: var(--primary);
  position: absolute;
  left: 0;
  font-weight: 700;
}

/* rules */
.contact-collab .rules {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 2.5rem;
  counter-reset: rule-counter;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.contact-collab .rules li {
  margin: 1rem 0;
  padding: 0.75rem 1rem 0.75rem 3.75rem;
  position: relative;
  counter-increment: rule-counter;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--primary);
}

.contact-collab .rules li::before {
  content: counter(rule-counter);
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary);
  font-weight: 900;
  font-size: 1.1rem;
  width: 28px;
  height: 28px;
  background: var(--bg-card);
  border: 2px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* pricing layout */
.contact-collab .pricing {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 2fr);
  gap: 2rem;
  align-items: start;
  margin-bottom: 2.5rem;
}

@media (max-width: 960px) {
  .contact-collab .pricing {
    grid-template-columns: 1fr;
  }
}

/* price box */
.contact-collab .price-box {
  background: var(--bg-card);
  border: 3px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 2rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.contact-collab .price-tag {
  display: inline-flex;
  padding: .5rem 1.25rem;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 800;
  font-size: .9rem;
  margin-bottom: 1.25rem;
  border: 2px solid var(--primary);
}

.contact-collab .price-num {
  margin-top: .75rem;
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1;
  color: #1e40af;
  display: inline-flex;
  align-items: baseline;
  gap: .25rem;
}

.contact-collab .price-num::before {
  content: 'NT$';
  font-size: 1.05rem;
  color: var(--text-light);
  font-weight: 700;
  margin-right: .25rem;
  position: relative;
  top: .55rem;
}

.contact-collab .price-suffix {
  font-size: 1.05rem;
  font-weight: 900;
  color: #dc2626;
  position: relative;
  top: -0.25rem;
}

.contact-collab .price-note {
  margin-top: 1rem;
  color: var(--text);
  line-height: 1.6;
  font-size: 1rem;
  padding: .75rem;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}

/* how */
.contact-collab .how {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  color: var(--text);
  line-height: 1.7;
  box-shadow: var(--shadow);
}

.contact-collab .how h3 {
  margin: 0 0 1.5rem;
  font-size: 1.3rem;
  color: var(--text-dark);
  font-weight: 900;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.contact-collab .how h3::before {
  content: '⟳';
  color: var(--primary);
  font-size: 1.2em;
}

/* ✅ 修正：counter 初始化 */
.contact-collab .how ol {
  margin: 0;
  padding-left: 0;
  display: grid;
  gap: 1.25rem;
  counter-reset: step-counter;
}

.contact-collab .how li {
  margin: 0;
  padding: 1rem 1rem 1rem 4.5rem;
  position: relative;
  counter-increment: step-counter;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}

.contact-collab .how li::before {
  content: counter(step-counter);
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-dark);
  font-weight: 900;
  font-size: 1.1rem;
  width: 32px;
  height: 32px;
  background: var(--primary-light);
  border: 2px solid var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-collab .how code {
  background: var(--bg-card);
  padding: .25rem .5rem;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .85em;
  color: var(--primary-dark);
  border: 1px solid var(--border);
}

/* portfolio */
.contact-collab .portfolio {
  margin-top: 2.5rem;
}

.contact-collab .muted {
  color: var(--text-light);
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 1.25rem;
  padding: 1rem 1.5rem;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border-left: 4px solid var(--border);
}

/* ✅ 作品集輪播：補齊 hz-carousel/hz-track/hz-card */
.contact-collab .hz-carousel {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  padding: .25rem .25rem 1rem;
  border-radius: var(--radius-md);
}

.contact-collab .hz-carousel::-webkit-scrollbar {
  height: 10px;
}

.contact-collab .hz-carousel::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}

.contact-collab .hz-track {
  display: flex;
  gap: 16px;
  padding: .25rem 0;
}

.contact-collab .hz-card {
  scroll-snap-align: start;
  width: 260px;
  flex: 0 0 260px;

  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 18px;
  padding: 1.1rem;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.contact-collab .hz-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.contact-collab .hz-card-title {
  font-weight: 900;
  color: var(--text-dark);
  font-size: 1.1rem;
  line-height: 1.35;
  margin-bottom: .5rem;
}

.contact-collab .hz-card-desc {
  color: var(--text);
  line-height: 1.7;
  font-size: .95rem;
}

.contact-collab .hz-card-meta {
  margin-top: .9rem;
  padding-top: .9rem;
  border-top: 1px solid var(--border-light);
  color: var(--text-light);
  font-size: .85rem;
}

/* empty state */
.contact-collab .portfolio-empty {
  background: var(--bg-card);
  border: 3px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  margin: 1.25rem 0;
}

/* CTA row */
.contact-collab .cs-cases-mini {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 8px 16px;
  border-radius: 999px;
  /* 膠囊型 */
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 700;
  color: var(--text-dark);

  transition: all .25s ease;
}

.contact-collab .cs-cases-mini:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  transform: translateX(3px);
}

.contact-collab .cta-row {
  margin-top: 3rem;
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  justify-content: center;
  padding-top: 2.25rem;
  border-top: 3px solid var(--border);
  position: relative;
}

.contact-collab .cta-row::before {
  content: '✦';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg);
  color: var(--primary);
  font-size: 1.5rem;
  padding: 0 1rem;
}

.contact-collab .cs-cases-cta {
  margin-top: 1.5rem;
  display: flex;
  justify-content: flex-end;
}


.contact-collab .cs-cases-btn {
  width: 100%;
  max-width: 520px;
  text-decoration: none;
  color: var(--text-dark);
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.2rem;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 6px;
  align-items: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  position: relative;
  overflow: hidden;
}

.contact-collab .cs-cases-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(10, 102, 194, .08) 45%, transparent 100%);
  transform: translateX(-70%);
  transition: transform .45s ease;
}

.contact-collab .cs-cases-btn:hover {
  transform: translateY(-3px);
  border-color: var(--primary-light);
  box-shadow: var(--shadow-lg);
}

.contact-collab .cs-cases-btn:hover::before {
  transform: translateX(0%);
}

.contact-collab .cs-cases-btn-text {
  grid-column: 1;
  grid-row: 1;
  font-weight: 900;
  font-size: 1.05rem;
  letter-spacing: -0.2px;
}

.contact-collab .cs-cases-btn-sub {
  grid-column: 1;
  grid-row: 2;
  font-size: .92rem;
  color: var(--text-light);
  line-height: 1.6;
}

.contact-collab .cs-cases-btn-icon {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border: 2px solid var(--primary);
  color: var(--primary-dark);
  font-weight: 900;
}

@media (max-width: 575px) {
  .contact-collab .cs-cases-cta {
    justify-content: center;
  }
}

@media (max-width: 575px) {
  .contact-collab .cs-cases-btn {
    padding: 1rem;
    grid-template-columns: 1fr auto;
  }

  .contact-collab .cs-cases-btn-sub {
    font-size: .9rem;
  }
}

.contact-collab .hz-track:has(.hz-card:only-child) {
  justify-content: center;
}

/* 保險：如果瀏覽器不支援 :has */
.contact-collab .hz-track {
  justify-content: flex-start;
}

.contact-collab .hz-track.hz-single {
  justify-content: center;
}