/* Case list — short gradient banner */
.nybanner.wp-case-banner,
.nybanner.has-bg.wp-case-banner {
  height: 150px !important;
  margin-top: 0;
  position: relative;
  overflow: hidden;
  background-image: none !important;
  background: linear-gradient(135deg, #599aff 0%, #F6821F 45%, #ff3200 100%) !important;
}

.nybanner.wp-case-banner .ny-title {
  position: relative;
  z-index: 2;
}

.nybanner.wp-case-banner .ny-title h1 {
  font-size: 28px;
  margin: 0;
  padding: 0;
  color: #fff !important;
}

.nybanner.wp-case-banner .ny-title p {
  display: none;
}

@media screen and (max-width: 768px) {
  .nybanner.wp-case-banner,
  .nybanner.has-bg.wp-case-banner {
    height: 150px !important;
    margin-top: 0 !important;
  }
  .nybanner.wp-case-banner .ny-title h1 {
    font-size: 22px;
  }
}

/* —— Case list page shell: keep light, not dark —— */
.news-warp {
  background-color: #ffffff !important;
  overflow: visible !important;
}

.news-warp .news-screen {
  padding: 28px 0 18px;
  display: flex !important;
  justify-content: center !important;
  float: none !important;
}

.news-warp .news-screen .screenleft,
.news-warp .news-screen .case-tabs {
  float: none !important;
  width: auto !important;
  max-width: 100%;
  position: relative;
}

.news-warp .news-screen .case-tabs ul {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 6px;
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 0;
  list-style: none;
}

.news-warp .news-screen .case-tabs ul li {
  background: transparent !important;
  margin: 0 !important;
  height: auto !important;
  line-height: 1.2 !important;
  float: none !important;
  position: relative;
  z-index: 1;
}

.news-warp .news-screen .case-tabs ul li a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  font-size: 20px !important;
  line-height: 1.3 !important;
  color: #5b6472 !important;
  border: 0 !important;
  border-radius: 999px;
  background: transparent !important;
  position: relative;
  z-index: 2;
  transition: color 0.35s ease;
  text-decoration: none;
}

.news-warp .news-screen .case-tabs ul li.on a,
.news-warp .news-screen .case-tabs ul li.is-pill-target a,
.news-warp .news-screen .case-tabs ul li:hover a {
  color: #14161c !important;
  background: transparent !important;
  border-bottom: 0 !important;
}

/* sliding pill */
.news-warp .news-screen .case-tabs-pill {
  position: absolute;
  top: 0;
  left: 0;
  height: 40px;
  border-radius: 999px;
  background: #e8eaee; /* tech gray */
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transform: translate3d(0, 0, 0);
  transition:
    transform 0.55s cubic-bezier(0.34, 1.45, 0.64, 1),
    width 0.55s cubic-bezier(0.34, 1.45, 0.64, 1),
    height 0.55s cubic-bezier(0.34, 1.45, 0.64, 1),
    opacity 0.25s ease;
  will-change: transform, width, height;
}

.news-warp .news-screen .case-tabs-pill.is-ready {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .news-warp .news-screen .case-tabs-pill {
    transition: none !important;
  }
}

/* —— Portfolio-like cards (ref: shishangjue list-portfolio) —— */
.news-warp .index-case {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 20px 2.5% 56px;
  box-sizing: border-box;
  overflow: visible;
}

.news-warp .index-case ul {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 28px 22px !important;
  float: none !important;
  width: 100% !important;
  padding: 12px 0 20px !important;
  margin: 0 !important;
}

.news-warp .index-case ul::before,
.news-warp .index-case ul::after {
  content: none !important;
  display: none !important;
}

.news-warp .index-case ul li,
.news-warp .index-case ul li:nth-of-type(4n),
.news-warp .index-case ul li:nth-of-type(3n),
.news-warp .index-case ul li:nth-of-type(2n),
.news-warp .index-case ul li.mr0 {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  box-sizing: border-box;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: visible;
  position: relative;
  z-index: 1;
  box-shadow: none;
  transform: none !important;
}

/* 圆角 + hover 缩放只作用在图片容器，标题区不参与 */
.news-warp .index-case ul li .pic {
  display: block !important;
  width: 100% !important;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #eceae6 !important;
  background-image: none !important;
  position: relative;
  z-index: 1;
  border-radius: 30px !important;
  transform: scale(1) translateZ(0);
  transform-origin: center center;
  transition:
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  box-shadow: 0 1px 0 rgba(20, 22, 28, 0.03);
}

.news-warp .index-case ul li:hover .pic {
  z-index: 2;
  transform: scale(1.035) translateZ(0);
  box-shadow:
    0 22px 48px rgba(20, 22, 28, 0.12),
    0 4px 12px rgba(20, 22, 28, 0.04);
}

.news-warp .index-case ul li .pic a {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  border-radius: inherit;
  overflow: hidden;
}

.news-warp .index-case ul li .pic a img,
.news-warp .index-case ul li .pic img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transform: scale(1);
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.news-warp .index-case ul li:hover .pic a img,
.news-warp .index-case ul li:hover .pic img {
  transform: scale(1.06);
}

/* Title under image — clean caption */
.news-warp .index-case ul li > a {
  display: block;
  position: relative;
  z-index: 3;
  background: transparent !important;
  text-decoration: none;
  color: inherit;
}

.news-warp .index-case ul li .h2,
.news-warp .index-case ul li h2.h2 {
  margin: 0 !important;
  padding: 16px 12px 8px !important;
  min-height: 0 !important;
  text-align: center !important;
  overflow: visible !important;
  white-space: normal !important;
  text-overflow: unset !important;
  background: transparent !important;
  position: relative;
}

.news-warp .index-case ul li .h2:before,
.news-warp .index-case ul li .h2:after,
.news-warp .index-case ul li .h2 i,
.news-warp .index-case ul li:hover .h2:before,
.news-warp .index-case ul li:hover .h2:after,
.news-warp .index-case ul li:hover .h2 i {
  content: none !important;
  display: none !important;
  transform: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

.news-warp .index-case ul li .h2 span {
  display: -webkit-box !important;
  font-size: 18px !important;
  line-height: 1.45 !important;
  font-weight: 500 !important;
  color: #14161c !important;
  text-align: center !important;
  white-space: normal !important;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  transition: color 0.45s ease;
  opacity: 1 !important;
  visibility: visible !important;
}

.news-warp .index-case ul li:hover .h2 span {
  display: -webkit-box !important;
  color: #e51d21 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.news-warp .pglist {
  margin-top: 12px;
  margin-bottom: 20px;
}

@media screen and (max-width: 900px) {
  .news-warp .index-case ul {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 20px 14px !important;
  }
}

@media screen and (max-width: 560px) {
  .news-warp .index-case ul {
    grid-template-columns: 1fr !important;
  }
  .news-warp .index-case ul li:hover .pic {
    transform: scale(1.02);
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-warp .index-case ul li .pic,
  .news-warp .index-case ul li .pic img {
    transition: none !important;
  }
  .news-warp .index-case ul li:hover .pic,
  .news-warp .index-case ul li:hover .pic img {
    transform: none !important;
  }
}

/* Case detail banner overlay */
.nybanner.nybanner1.has-bg.wp-case-detail-banner {
  background:
    linear-gradient(135deg, rgb(56 84 251 / 44%) 0%, rgb(29 29 29 / 71%) 45%, rgb(255 99 0 / 64%) 100%),
    var(--ny-bg) center center / cover no-repeat !important;
}

/* Case detail: H1 centered on top banner */
.nybanner.nybanner1.wp-case-detail-banner .ny-title {
  z-index: 6;
  padding: 0 24px;
  box-sizing: border-box;
}

.nybanner.nybanner1.wp-case-detail-banner .ny-title h1 {
  margin: 0;
  padding: 0;
  color: #fff !important;
  font-size: 60px !important;
  line-height: 1.25 !important;
  font-weight: 500 !important;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}

.nybanner.nybanner1.wp-case-detail-banner .ny-title h5,
.nybanner.nybanner1.wp-case-detail-banner .ny-title p {
  display: none !important;
}

/* Case detail article vertical margin */
.wp-case-detail article.news-details,
.wp-case-detail .news-warp .news-details {
  margin-top: 50px !important;
  margin-bottom: 50px !important;
}

.news-warp .news-details > time.date {
  display: block;
  margin: 0 0 24px;
  font-size: 14px;
  color: #999;
}

@media screen and (max-width: 768px) {
  .nybanner.nybanner1.wp-case-detail-banner {
    height: 320px !important;
  }
  .nybanner.nybanner1.wp-case-detail-banner .ny-title h1 {
    font-size: 28px !important;
  }
}


/* —— Homepage case cards: same language as /anli/, 4 per row —— */
body .section02.section-fullbleed {
  background-color: #efefef !important; /* keep original gray */
}

body .section02.section-fullbleed .index-case {
  overflow: visible !important;
  width: 100% !important;
  /* match .section-fullbleed .accordion-container side inset */
  padding-left: 12px !important;
  padding-right: 12px !important;
  box-sizing: border-box !important;
}

body .section02.section-fullbleed .index-case ul {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 28px 20px !important;
  float: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 8px 0 20px !important;
  box-sizing: border-box !important;
}

body .section02.section-fullbleed .index-case ul::before,
body .section02.section-fullbleed .index-case ul::after {
  content: none !important;
  display: none !important;
}

body .section02.section-fullbleed .index-case ul li,
body .section02.section-fullbleed .index-case ul li:nth-of-type(4n),
body .section02.section-fullbleed .index-case ul li.mr0 {
  float: none !important;
  width: auto !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: visible !important;
  box-shadow: none !important;
  transform: none !important;
}

body .section02.section-fullbleed .index-case ul li > a {
  display: block;
  background: transparent !important;
  color: inherit;
  text-decoration: none;
}

body .section02.section-fullbleed .index-case ul li .pic {
  display: block !important;
  width: 100% !important;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
  z-index: 1;
  border-radius: 30px !important;
  background: #eceae6 !important;
  background-image: none !important;
  transform: scale(1) translateZ(0);
  transform-origin: center center;
  transition:
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

body .section02.section-fullbleed .index-case ul li:hover .pic {
  z-index: 2;
  transform: scale(1.035) translateZ(0);
  box-shadow:
    0 22px 48px rgba(20, 22, 28, 0.12),
    0 4px 12px rgba(20, 22, 28, 0.04);
}

body .section02.section-fullbleed .index-case ul li .pic img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

body .section02.section-fullbleed .index-case ul li:hover .pic img {
  transform: scale(1.06);
}

body .section02.section-fullbleed .index-case ul li .h2,
body .section02.section-fullbleed .index-case ul li h3.h2 {
  margin: 0 !important;
  padding: 16px 8px 4px !important;
  min-height: 0 !important;
  text-align: center !important;
  background: transparent !important;
  white-space: normal !important;
  overflow: visible !important;
  position: relative;
  z-index: 3;
}

body .section02.section-fullbleed .index-case ul li .h2:before,
body .section02.section-fullbleed .index-case ul li .h2:after,
body .section02.section-fullbleed .index-case ul li .h2 i,
body .section02.section-fullbleed .index-case ul li:hover .h2:before,
body .section02.section-fullbleed .index-case ul li:hover .h2:after,
body .section02.section-fullbleed .index-case ul li:hover .h2 i {
  content: none !important;
  display: none !important;
}

body .section02.section-fullbleed .index-case ul li .h2 span {
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 18px !important;
  line-height: 1.45 !important;
  font-weight: 500 !important;
  color: #14161c !important;
  text-align: center !important;
  opacity: 1 !important;
  visibility: visible !important;
  transition: color 0.45s ease;
}

body .section02.section-fullbleed .index-case ul li:hover .h2 span {
  color: #e51d21 !important;
  display: -webkit-box !important;
  opacity: 1 !important;
  visibility: visible !important;
}

@media screen and (max-width: 1100px) {
  body .section02.section-fullbleed .index-case ul {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media screen and (max-width: 768px) {
  body .section02.section-fullbleed .index-case {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}

@media screen and (max-width: 560px) {
  body .section02.section-fullbleed .index-case ul {
    grid-template-columns: 1fr !important;
  }
  body .section02.section-fullbleed .index-case ul li:hover .pic {
    transform: scale(1.02);
  }
}

@media (prefers-reduced-motion: reduce) {
  body .section02.section-fullbleed .index-case ul li .pic,
  body .section02.section-fullbleed .index-case ul li .pic img {
    transition: none !important;
  }
  body .section02.section-fullbleed .index-case ul li:hover .pic,
  body .section02.section-fullbleed .index-case ul li:hover .pic img {
    transform: none !important;
  }
}

/* ---------- Mobile case tabs: horizontal scroll pills ----------
   PC flex-wrap chip row unchanged. Mobile: one-row swipeable tabs.
   Beat legacy style.css @640 .screenleft ul li { width:49.5% }.
--------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .news-warp .news-screen {
    padding: 14px 0 10px !important;
    display: block !important;
    justify-content: flex-start !important;
  }

  .news-warp .news-screen .screenleft,
  .news-warp .news-screen .case-tabs {
    float: none !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }

  .news-warp .news-screen .case-tabs::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  .news-warp .news-screen .case-tabs ul,
  .news-warp .news-screen .screenleft ul {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    align-items: center !important;
    float: none !important;
    width: max-content !important;
    max-width: none !important;
    min-width: 100% !important;
    gap: 6px !important;
    padding: 2px 16px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .news-warp .news-screen .case-tabs ul li,
  .news-warp .news-screen .screenleft ul li,
  .news-warp .news-screen .screenleft ul li:nth-of-type(2n) {
    display: block !important;
    float: none !important;
    width: auto !important;
    max-width: none !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
    height: auto !important;
    line-height: 1.2 !important;
    background: transparent !important;
    text-align: center !important;
  }

  .news-warp .news-screen .case-tabs ul li a,
  .news-warp .news-screen .screenleft ul li a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px 14px !important;
    font-size: 13px !important;
    line-height: 1.25 !important;
    white-space: nowrap !important;
    border-radius: 999px !important;
  }

  /* overflow-x breaks absolute pill math — use static active chip */
  .news-warp .news-screen .case-tabs-pill {
    display: none !important;
  }
  .news-warp .news-screen .case-tabs ul li.on a,
  .news-warp .news-screen .case-tabs ul li.is-pill-target a,
  .news-warp .news-screen .screenleft ul li.on a {
    background: #e8eaee !important;
    color: #14161c !important;
  }
}
