@font-face {
  font-family: "Cases Sans SC";
  src: url("../fonts/cases-sans-sc.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* Engineering cases: the 1672px reference uses a 1470px content area. */
.engineering-cases,
.case-dialog {
  --case-blue: #0875ff;
  --case-ink: #102d52;
  --case-muted: #7a8ba7;
  box-sizing: border-box;
  color: var(--case-ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.engineering-cases *,
.case-dialog * {
  box-sizing: border-box;
}

.cases-page {
  margin: 0;
  background: #f7fbff;
}

.engineering-cases {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 24px 0 25px;
  background: radial-gradient(ellipse at 50% 45%, #edf5ff 0%, #f7fbff 62%, #fff 100%);
  scroll-margin-top: var(--header-height, 0px);
}

/* 底色与首页「产品中心」「关于我们」一致：纯黑 + 工程现场照片做背景（叠黑色蒙版压暗）。
   需 !important 盖过 style.css 中共享深色主题的
   .engineering-cases { background: var(--theme-dark) !important }。 */
.engineering-cases {
  background:
    linear-gradient(rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.86)),
    url("/assets/index/imga/inab_bg-2.jpg") center / cover no-repeat,
    #000 !important;
}

/* 首页「工程案例」标题加点橙色：标题里的强调词 + 标题下方短横线
   注意要 !important —— style.css 的共享深色主题已把 .cases-title span 设成浅灰、
   .cases-heading-line 设成灰色，权重相同不写 !important 盖不住。 */
.cases-home-section .cases-title span {
  color: var(--orange) !important;
}

.cases-home-section .cases-heading-line {
  background: var(--orange) !important;
}

.cases-watermark {
  position: absolute;
  z-index: -1;
  top: 15px;
  left: 50%;
  margin: 0;
  color: transparent;
  background: linear-gradient(#e8f1ff 20%, #f3f8ff 95%);
  background-clip: text;
  -webkit-background-clip: text;
  font-family: Arial, sans-serif;
  font-size: clamp(100px, 9vw, 150px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -8px;
  white-space: nowrap;
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
}

.cases-container {
  width: min(1470px, 88%);
  margin-inline: auto;
}

@media (min-width: 1351px) {
  .cases-container {
    width: min(1470px, 88vw);
    margin-left: calc((100vw - min(1470px, 88vw)) / 2 + 3px);
    margin-right: 0;
  }
}

.cases-heading {
  margin-bottom: 18px;
  text-align: center;
}

.cases-kicker {
  margin: 0;
  color: #284575;
  font-family: Arial, sans-serif;
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: 6px;
  text-indent: 6px;
}

.cases-title {
  margin: 8px 0 0;
  font-size: 56px;
  font-weight: 800;
  line-height: 70px;
  letter-spacing: 3px;
}

.cases-title span {
  color: var(--case-blue);
}

.cases-heading-line {
  display: block;
  width: 35px;
  height: 3px;
  margin: 5px auto 11px;
  background: var(--case-blue);
}

.cases-subtitle {
  margin: 0;
  color: #50648a;
  font-family: "Cases Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 18px;
  line-height: 27px;
  letter-spacing: 1px;
}

.cases-top {
  display: grid;
  grid-template-columns: minmax(0, 830fr) minmax(0, 614fr);
  gap: 24px;
}

.cases-side {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.cases-bottom {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.case-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 8px 28px rgb(91 143 212 / 5%);
  transition: box-shadow 200ms ease, transform 200ms ease;
}

.case-photo {
  position: relative;
  flex-shrink: 0;
  overflow: hidden;
  background: #dcecf9;
}

.case-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 350ms ease;
}

.case-featured .case-photo {
  aspect-ratio: 830 / 273;
}

.case-badge {
  position: absolute;
  top: 18px;
  left: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 15px;
  border-radius: 11px;
  color: #000000;
  background: #fff;
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
  white-space: nowrap;
  pointer-events: none;
}

.case-featured .case-badge {
  left: 24px;
}

.case-badge svg {
  width: 16px;
  height: 18px;
  flex: 0 0 auto;
  fill: var(--orange);
}

.case-content {
  padding: 13px 34px 14px;
}

.case-content h3 {
  margin: 0;
  color: #000000;
  font-size: 22px;
  font-weight: 800;
  line-height: 31px;
}

.case-title-link {
  color: inherit;
  text-decoration: none;
}

.case-title-link::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
}

.case-title-link:focus-visible {
  outline: none;
}

.case-title-link:focus-visible::after {
  border-radius: 12px;
  outline: 3px solid var(--case-blue);
  outline-offset: -3px;
}

.case-rule {
  display: block;
  width: 27px;
  height: 2px;
  margin: 5px 0 8px;
  background: var(--case-blue);
}

.case-content p {
  margin: 0;
  color: #000000;
  font-family: "Cases Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 26px;
  letter-spacing: 0.25px;
}

.case-featured .case-content {
  position: static;
  flex: 1;
  min-height: 101px;
  padding: 9px 80px 11px 26px;
}

.case-featured h3 {
  font-size: 26px;
  line-height: 36px;
  letter-spacing: 0.6px;
}

.case-featured .case-rule {
  margin: 7px 0 9px;
}

.case-featured p {
  font-size: 18px;
  letter-spacing: 0;
}

.case-arrow {
  position: absolute;
  right: 23px;
  bottom: 27px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--orange);
}

.case-arrow svg,
.cases-more svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.case-horizontal {
  display: grid;
  grid-template-columns: minmax(0, 340fr) minmax(0, 274fr);
}

.case-horizontal .case-photo {
  min-height: 174px;
}

.case-horizontal .case-content {
  align-self: center;
  padding: 20px 13px 20px 29px;
}

.case-horizontal .case-content p {
  font-size: 17px;
  letter-spacing: -0.5px;
}

.case-horizontal .case-rule {
  margin: 11px 0 16px;
}

.case-small .case-photo {
  aspect-ratio: 473 / 153;
}

.case-small .case-content {
  min-height: 116px;
  padding-top: 10px;
}

.cases-actions {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.cases-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 196px;
  min-height: 41px;
  padding: 8px 27px;
  border: 1px solid #9b9b9b !important;
  border-radius: 999px;
  color: #4f4f4f !important;
  background: #e8e8e8 !important;
  font: 600 15px/23px "Microsoft YaHei", "PingFang SC", sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: color 200ms ease, background 200ms ease;
}

.cases-more svg {
  width: 17px;
  height: 17px;
  stroke-width: 1.6;
}

.cases-more:focus-visible {
  outline: 3px solid #88baff;
  outline-offset: 4px;
}

@media (hover: hover) {
  .case-card:hover {
    box-shadow: 0 12px 30px rgb(40 102 185 / 14%);
    transform: translateY(-3px);
  }

  .case-card:hover .case-photo img {
    transform: scale(1.025);
  }

  .cases-more:hover {
    color: white !important;
    background: #9b9b9b !important;
  }
}

/* The dialog reuses the six supplied cases; no invented project data. */
html.case-dialog-open {
  overflow: hidden;
}

.case-dialog {
  width: min(920px, calc(100% - 32px));
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 18px;
  background: #f7fbff;
  box-shadow: 0 24px 90px rgb(6 31 67 / 25%);
}

.case-dialog::backdrop {
  background: rgb(10 29 56 / 55%);
  backdrop-filter: blur(5px);
}

.case-dialog-bar {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid #e2eaf4;
  background: #fff;
}

.case-dialog-bar h2 {
  margin: 0;
  font-size: 22px;
}

.case-dialog-close {
  display: grid;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--case-ink);
  background: #eff5fc;
  font: 30px/1 Arial, sans-serif;
  cursor: pointer;
}

.case-dialog-close:focus-visible,
.case-directory-item:focus-visible {
  outline: 3px solid var(--case-blue);
  outline-offset: 2px;
}

.case-dialog-body {
  padding: 24px;
}

.case-detail-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 50dvh;
  object-fit: contain;
  border-radius: 10px;
  background: #e6f0fb;
}

.case-detail-label {
  margin: 20px 0 8px;
  color: var(--case-blue);
  font-size: 14px;
  font-weight: 600;
}

.case-detail-description {
  margin: 0;
  font-family: "Cases Sans SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.9;
}

.case-directory {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.case-directory-item {
  overflow: hidden;
  padding: 0;
  border: 1px solid #e3edf8;
  border-radius: 12px;
  color: var(--case-ink);
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.case-directory-item img {
  display: block;
  width: 100%;
  aspect-ratio: 2.3;
  object-fit: cover;
}

.case-directory-item strong,
.case-directory-item span {
  display: block;
  margin: 12px 16px;
}

.case-directory-item span {
  color: var(--case-muted);
  font-size: 13px;
}

@media (min-width: 1800px) {
  .engineering-cases {
    padding-block: 44px;
  }
}

@media (min-width: 601px) and (max-width: 1450px) {
  .cases-home-section .cases-container {
    width: calc(100% - 100px);
    margin-left: 28px;
    margin-right: 72px;
  }
}

@media (min-width: 1451px) {
  .cases-home-section .cases-container {
    width: min(1600px, 90vw);
    margin-left: calc((100vw - min(1600px, 90vw)) / 2 + 3px);
    margin-right: 0;
  }
}

/* 首页工程案例卡片放大：仅调整尺寸与内边距，样式与配色保持不变 */
@media (min-width: 1121px) {
  /* 两侧留白与首页「产品中心」「关于我们」保持一致：
     同样的 max(3.5vw, 24px) 边距 + 1720px 宽度上限居中 */
  .cases-home-section .cases-container {
    width: min(1720px, calc(100% - 2 * max(3.5vw, 24px)));
    margin-left: auto;
    margin-right: auto;
  }

  .cases-home-section .cases-top,
  .cases-home-section .cases-side,
  .cases-home-section .cases-bottom {
    gap: 28px;
  }

  .cases-home-section .cases-bottom {
    margin-top: 28px;
  }

  .cases-home-section .case-content {
    padding: 17px 36px 19px;
  }

  .cases-home-section .case-content h3 {
    font-size: 23px;
    line-height: 33px;
  }

  .cases-home-section .case-content p {
    font-size: 18px;
    line-height: 28px;
  }

  .cases-home-section .case-badge {
    top: 20px;
    left: 20px;
    min-height: 38px;
    padding: 8px 17px;
    font-size: 17px;
    line-height: 22px;
  }

  .cases-home-section .case-featured .case-badge {
    left: 26px;
  }

  .cases-home-section .case-featured .case-content {
    min-height: 120px;
    padding: 14px 84px 16px 30px;
  }

  .cases-home-section .case-featured h3 {
    font-size: 28px;
    line-height: 39px;
  }

  .cases-home-section .case-featured p {
    font-size: 19px;
    line-height: 29px;
  }

  .cases-home-section .case-horizontal {
    grid-template-columns: minmax(0, 340fr) minmax(0, 274fr);
  }

  .cases-home-section .case-horizontal .case-photo {
    min-height: 196px;
  }

  .cases-home-section .case-horizontal .case-content {
    padding: 24px 16px 24px 32px;
  }

  .cases-home-section .case-horizontal .case-content p {
    font-size: 18px;
  }

  .cases-home-section .case-small .case-content {
    min-height: 132px;
    padding-top: 14px;
  }
}

@media (max-width: 1350px) {
  .cases-container {
    width: calc(100% - 80px);
  }

  .cases-top,
  .cases-side,
  .cases-bottom {
    gap: 20px;
  }

  .case-horizontal .case-content {
    padding: 18px;
  }

  .case-horizontal {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }

  .case-horizontal .case-photo {
    min-height: 145px;
  }

  .case-horizontal .case-content p {
    font-size: 14px;
    line-height: 22px;
    letter-spacing: 0;
  }

  .case-horizontal .case-content p br {
    display: none;
  }

  .case-content h3 {
    font-size: 18px;
    line-height: 1.5;
  }

  .case-featured h3 {
    font-size: 22px;
  }

  .case-content p {
    font-size: 14px;
  }

  .case-small .case-content {
    padding-inline: 22px;
  }

  .case-horizontal .case-rule {
    margin-block: 8px 12px;
  }
}

@media (max-width: 1100px) {
  .engineering-cases {
    padding-block: 36px;
  }

  .cases-container {
    width: calc(100% - 48px);
  }

  .cases-heading {
    margin-bottom: 26px;
  }

  .cases-top {
    grid-template-columns: 1fr;
  }

  .cases-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
  }

  .case-horizontal {
    display: flex;
  }

  .case-horizontal .case-photo {
    aspect-ratio: 340 / 175;
    min-height: 0;
  }

  .case-horizontal .case-content {
    align-self: stretch;
    padding: 18px 22px 20px;
  }

  .case-featured .case-content {
    padding-block: 16px;
  }

  .case-small .case-photo {
    aspect-ratio: 2;
  }

  .case-small .case-content {
    padding: 16px 18px 20px;
  }

  .case-content p br {
    display: none;
  }

  .case-badge {
    top: 14px;
    left: 14px;
    padding: 6px 12px;
    font-size: 14px;
  }

  .cases-bottom {
    margin-top: 20px;
  }

  .cases-actions {
    margin-top: 26px;
  }
}

@media (max-width: 600px) {
  .engineering-cases {
    padding: 29px 0 32px;
  }

  .cases-container {
    width: calc(100% - 32px);
  }

  .cases-watermark {
    top: 46px;
    font-size: 22vw;
    letter-spacing: -4px;
  }

  .cases-kicker {
    font-size: 11px;
    line-height: 18px;
    letter-spacing: 3.3px;
    text-indent: 3.3px;
  }

  .cases-title {
    margin-top: 7px;
    font-size: 38px;
    line-height: 50px;
    letter-spacing: 2px;
  }

  .cases-heading-line {
    width: 29px;
    height: 2px;
    margin: 7px auto 12px;
  }

  .cases-subtitle {
    max-width: 310px;
    margin-inline: auto;
    font-size: 13px;
    line-height: 23px;
    letter-spacing: 0.3px;
    text-wrap: balance;
  }

  .cases-heading {
    margin-bottom: 23px;
  }

  .cases-top,
  .cases-side,
  .cases-bottom {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .cases-bottom {
    margin-top: 18px;
  }

  .case-featured .case-photo,
  .case-horizontal .case-photo,
  .case-small .case-photo {
    aspect-ratio: 1.95;
  }

  .case-featured .case-photo img {
    object-position: 51% center;
  }

  .case-content,
  .case-featured .case-content,
  .case-horizontal .case-content,
  .case-small .case-content {
    min-height: 0;
    padding: 16px 20px 19px;
  }

  .case-content h3,
  .case-featured h3 {
    font-size: 19px;
    line-height: 29px;
    letter-spacing: 0;
  }

  .case-featured h3 {
    padding-right: 24px;
    font-size: 20px;
  }

  .case-content p,
  .case-horizontal .case-content p {
    font-size: 14px;
    line-height: 24px;
    letter-spacing: 0;
  }

  .case-rule,
  .case-featured .case-rule,
  .case-horizontal .case-rule {
    width: 26px;
    margin: 8px 0 10px;
  }

  .case-badge,
  .case-featured .case-badge {
    top: 14px;
    left: 14px;
    min-height: 32px;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 9px;
    font-size: 13px;
  }

  .case-arrow {
    right: 16px;
    bottom: 87px;
    width: 30px;
    height: 30px;
  }

  .case-arrow svg {
    width: 17px;
    height: 17px;
  }

  .cases-more {
    min-width: 196px;
    min-height: 44px;
  }

  .case-dialog-bar,
  .case-dialog-body {
    padding: 16px;
  }

  .case-dialog-bar h2 {
    font-size: 18px;
  }

  .case-directory {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .case-card,
  .case-photo img,
  .cases-more {
    transition: none;
  }
}
