/* Project archive and detail layout copied from the customer-owned English site. */
.wx-cases-main {
  --ref-blue-200: #93c5fd;
  --ref-blue-400: #3b82f6;
  --ref-blue-500: #0b72c9;
  --ref-blue-600: #075ea8;
  --ref-blue-900: #0f2742;
  --ref-gray-50: #f7f9fc;
  --ref-gray-100: #eef2f6;
  --ref-gray-200: #dfe5ec;
  --ref-gray-300: #c5ced8;
  --ref-gray-500: #697586;
  --ref-gray-600: #526071;
  --ref-gray-700: #334155;
  --ref-gray-800: #1f2937;
  --ref-body: Arial, sans-serif;
  --ref-display: Arial, sans-serif;
}

.wx-case-banner {
  position: relative;
  min-height: 280px;
  height: min(500px, calc(100vw * 500 / 1920 + 100px));
  overflow: hidden;
  color: #fff;
}

.wx-case-banner__media,
.wx-case-banner__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.wx-case-banner__media { object-fit: cover; object-position: center; }
.wx-case-banner__shade { background: rgba(0, 0, 0, 0.7); }

.wx-case-banner__inner {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 80px;
}

.wx-case-banner__content {
  width: min(100%, 650px);
  margin-inline: auto;
  color: #fff;
  text-align: center;
}

.wx-case-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  margin: 0 0 1rem;
  color: var(--ref-blue-500);
  font-family: var(--ref-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.2;
  text-transform: uppercase;
}

.wx-case-label::before {
  width: 24px;
  height: 2px;
  content: "";
  background: currentColor;
}

.wx-case-banner .wx-case-label { color: #fff; }

.wx-case-banner h1 {
  margin: 0 0 1rem;
  color: #fff;
  font-family: var(--ref-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.wx-case-banner h1 strong { color: var(--ref-blue-400); font-weight: inherit; }

.wx-case-banner__intro {
  max-width: 480px;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.05rem;
  line-height: 1.6;
}

.wx-case-breadcrumb {
  color: var(--ref-gray-600);
  background: var(--ref-gray-50);
  border-bottom: 1px solid var(--ref-gray-200);
}

.wx-case-breadcrumb nav {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow: hidden;
  font-size: 0.86rem;
  white-space: nowrap;
}

.wx-case-breadcrumb a { color: var(--ref-gray-700); font-weight: 600; }
.wx-case-breadcrumb a:hover { color: var(--ref-blue-500); }
.wx-case-breadcrumb span:last-child { min-width: 0; overflow: hidden; color: var(--ref-blue-500); font-weight: 600; text-overflow: ellipsis; }

.wx-case-list-section {
  padding-block: 5rem;
  background: #fff;
}

.wx-case-section-heading {
  margin-bottom: 3rem;
  text-align: center;
}

.wx-case-section-heading h2 {
  margin: 0;
  color: var(--ref-blue-900);
  font-family: var(--ref-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.wx-case-section-heading h2 strong { color: var(--ref-blue-500); font-weight: inherit; }

.wx-case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.wx-case-card { min-width: 0; }

.wx-case-card > a {
  position: relative;
  aspect-ratio: 4 / 3;
  display: block;
  overflow: hidden;
  color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
  isolation: isolate;
}

.wx-case-card__media,
.wx-case-card__shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.wx-case-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.165, 0.84, 0.44, 1);
}

.wx-case-card__shade {
  z-index: 1;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.05) 100%);
  transition: background 300ms ease;
}

.wx-case-card__content {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  gap: 0.5rem;
  padding: 2rem 1.5rem;
}

.wx-case-card__content strong {
  max-width: calc(100% - 48px);
  color: #fff;
  font-family: var(--ref-display);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
}

.wx-case-card__content small {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.78rem;
}

.wx-case-card__content small svg { width: 12px; height: 12px; }

.wx-case-card__arrow {
  position: absolute;
  z-index: 3;
  right: 1.5rem;
  bottom: 2rem;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--ref-blue-500);
  background: #fff;
  border-radius: 50%;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 300ms ease, transform 300ms ease;
}

.wx-case-card__arrow svg { width: 16px; height: 16px; }
.wx-case-card:hover .wx-case-card__media img { transform: scale(1.08); }
.wx-case-card:hover .wx-case-card__shade { background: linear-gradient(0deg, rgba(0, 80, 158, 0.75) 0%, rgba(0, 0, 0, 0.35) 60%, rgba(0, 0, 0, 0.1) 100%); }
.wx-case-card:hover .wx-case-card__arrow { opacity: 1; transform: translateY(0); }

.wx-case-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.wx-case-page-button {
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding-inline: 0.65rem;
  color: var(--ref-gray-600);
  background: #fff;
  border: 1px solid var(--ref-gray-200);
  border-radius: 4px;
  font-family: var(--ref-display);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}

.wx-case-page-button svg { width: 12px; height: 12px; }
.wx-case-page-button--wide { min-width: 82px; }
.wx-case-page-button:hover { color: var(--ref-blue-500); background: #eef4ff; border-color: var(--ref-blue-500); }
.wx-case-page-button.is-current { color: #fff; background: var(--ref-blue-500); border-color: var(--ref-blue-500); box-shadow: 0 4px 12px rgba(0, 80, 158, 0.25); }
.wx-case-page-button.is-disabled { color: var(--ref-gray-300); pointer-events: none; }

/* Project detail */
.wx-case-detail-hero {
  position: relative;
  overflow: hidden;
  padding-block: 10rem 5rem;
  background: #fff;
  border-bottom: 1px solid var(--ref-gray-200);
}

.wx-case-detail-hero__backdrop {
  position: absolute;
  z-index: 0;
  inset: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.85)), url("../images/wanxin-cases/archive-banner.webp") center / cover no-repeat;
}

.wx-case-detail-hero__layout {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 3rem;
  min-width: 0;
}

.wx-case-detail-hero__info { flex: 1 1 auto; min-width: 0; color: #fff; }

.wx-case-detail-hero__category {
  width: max-content;
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.2rem 0.7rem;
  color: #fff;
  background: var(--ref-blue-500);
  border-radius: 4px;
  font-family: var(--ref-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

.wx-case-detail-hero h1 {
  margin: 0 0 1.25rem;
  color: #fff;
  font-family: var(--ref-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
  overflow-wrap: anywhere;
  text-transform: uppercase;
}

.wx-case-detail-hero__intro {
  margin: 0 0 1.5rem;
  color: #fff;
  font-size: 1rem;
  line-height: 1.7;
}

.wx-case-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
  margin-bottom: 2rem;
}

.wx-case-detail-meta > div {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.wx-case-detail-meta > div > svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 2px;
  color: var(--ref-blue-200);
}

.wx-case-detail-meta span { display: grid; gap: 2px; }
.wx-case-detail-meta small { color: rgba(255, 255, 255, 0.45); font-size: 0.68rem; letter-spacing: 0.05em; line-height: 1.25; text-transform: uppercase; }
.wx-case-detail-meta strong { color: rgba(255, 255, 255, 0.85); font-size: 0.82rem; font-weight: 600; line-height: 1.4; }

.wx-case-inquiry { max-width: 100%; }

.wx-case-detail-hero__image {
  flex: 0 0 550px;
  width: 550px;
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  background: var(--ref-gray-800);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.wx-case-detail-hero__image img { width: 100%; height: 100%; object-fit: cover; }

.wx-case-detail-section {
  padding-block: 4rem;
  background: var(--ref-gray-50);
}

.wx-case-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 3rem;
  align-items: stretch;
  min-width: 0;
}

.wx-case-detail-content {
  min-width: 0;
  padding: 3rem 2.5rem;
  overflow-wrap: break-word;
  color: var(--ref-gray-600);
  background: #fff;
  border: 1px solid var(--ref-gray-200);
  border-radius: 8px;
}

.wx-case-copy-block { margin: 0 0 1.25rem; }
.wx-case-copy-block:last-child { margin-bottom: 0; }

.wx-case-copy-block h2 {
  margin: 0 0 1.35rem;
  padding: 0.25rem 0.6rem;
  color: var(--ref-gray-800);
  background: #f9f9f9;
  border-bottom: 3px double #abb8c3;
  border-radius: 8px;
  font-family: var(--ref-body);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
  text-transform: none;
}

.wx-case-copy-block__body { color: var(--ref-gray-600); font-size: 0.93rem; line-height: 1.85; }
.wx-case-copy-block__body p { margin: 0 0 1rem; }
.wx-case-copy-block__body p:last-child { margin-bottom: 0; }
.wx-case-copy-block__body strong { color: var(--ref-gray-800); }
.wx-case-copy-block__body ul,
.wx-case-copy-block__body ol { margin: 0 0 1rem; padding-left: 1.35rem; }

.wx-case-copy-block figure {
  margin: 1.25rem 0;
  overflow: hidden;
}

.wx-case-copy-block figure img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
}

.wx-case-detail-sidebar { min-width: 0; }

.wx-case-detail-sidebar__inner {
  position: sticky;
  top: 100px;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid var(--ref-gray-200);
  border-radius: 8px;
}

.wx-case-detail-sidebar h2 {
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  color: var(--ref-gray-500);
  border-bottom: 1px solid var(--ref-gray-100);
  font-family: var(--ref-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.25;
  text-transform: uppercase;
}

.wx-case-recommend-list { display: grid; gap: 0.1rem; }

.wx-case-recommend-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 6px;
  transition: background 180ms ease;
}

.wx-case-recommend-card:hover { background: var(--ref-gray-50); }

.wx-case-recommend-card > span {
  flex: 0 0 72px;
  width: 72px;
  height: 54px;
  overflow: hidden;
  border-radius: 4px;
}

.wx-case-recommend-card img { width: 100%; height: 100%; object-fit: cover; }

.wx-case-recommend-card strong {
  min-width: 0;
  display: -webkit-box;
  overflow: hidden;
  color: var(--ref-gray-700);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.wx-case-recommend-card:hover strong { color: var(--ref-blue-600); }

.wx-cases-js [data-case-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 550ms ease, transform 550ms ease;
}

.wx-cases-js [data-case-reveal].is-visible { opacity: 1; transform: none; }

@media (max-width: 1024px) {
  .wx-case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wx-case-detail-hero__layout { flex-direction: column; align-items: stretch; gap: 2rem; }
  .wx-case-detail-hero__image { flex: 0 0 auto; width: 100%; }
  .wx-case-detail-layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .wx-case-detail-sidebar__inner { position: static; }
}

@media (max-width: 768px) {
  .wx-case-banner { height: 280px; min-height: 260px; }
  .wx-case-detail-hero { padding-block: 7rem 3rem; }
  .wx-case-detail-hero h1 { font-size: 1.4rem; }
  .wx-case-detail-hero__intro { font-size: 0.85rem; }
  .wx-case-detail-meta { gap: 0.75rem 1.25rem; }
  .wx-case-detail-hero__image { aspect-ratio: 16 / 9; }
  .wx-case-detail-content { padding: 1.5rem 1.25rem; }
  .wx-case-copy-block h2 { font-size: 1.15rem; }
}

@media (max-width: 640px) {
  .wx-case-banner { height: auto; min-height: 0; padding: 150px 0 50px; }
  .wx-case-banner__inner { padding-top: 0; }
  .wx-case-banner__content { padding-inline: 5vw; }
  .wx-case-banner__intro { font-size: 1rem; }
  .wx-case-breadcrumb nav { min-height: 56px; font-size: 0.76rem; }
  .wx-case-list-section { padding-block: 3rem; }
  .wx-case-section-heading { margin-bottom: 2rem; }
  .wx-case-grid { grid-template-columns: minmax(0, 1fr); }
  .wx-case-card__content { padding: 1.5rem 1.25rem; }
  .wx-case-card__content strong { font-size: 1.05rem; }
  .wx-case-pagination { gap: 0.25rem; margin-top: 2rem; }
  .wx-case-page-button { min-width: 34px; height: 34px; padding-inline: 0.45rem; font-size: 0.72rem; }
  .wx-case-page-button--wide { min-width: 72px; }
  .wx-case-detail-hero { padding: 9rem 0 3rem; }
  .wx-case-detail-hero h1 { font-size: 1.2rem; }
  .wx-case-detail-hero__intro { font-size: 0.8rem; }
  .wx-case-detail-meta { flex-direction: column; gap: 0.75rem; }
  .wx-case-inquiry { width: 100%; }
  .wx-case-detail-section { padding-block: 2.5rem; }
  .wx-case-detail-content { padding: 1.25rem 1rem; }
  .wx-case-copy-block h2 { font-size: 1.05rem; }
  .wx-case-copy-block__body { font-size: 0.85rem; }
  .wx-case-detail-sidebar h2 { display: none; }
  .wx-case-detail-sidebar__inner { padding: 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .wx-cases-js [data-case-reveal] { opacity: 1; transform: none; transition: none; }
  .wx-case-card__media img,
  .wx-case-card__arrow { transition: none; }
}
