/* Responsive case/text page. */
.text-hero img {
  object-fit: cover;
}

.text-page .text-section-header,
.text-page .cases {
  box-sizing: border-box;
  width: min(1150px, calc(100% - 48px));
}

.text-page .text-section-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  height: auto;
  min-height: 65px;
  padding-left: 0;
}

.text-page .text-section-header > img,
.text-page .text-section-header > font,
.text-page .text-section-header > span {
  float: none;
}

.text-page .text-section-header > span {
  width: auto;
  margin-right: 30px;
}

.text-page .casetop {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  flex: 1;
  float: none;
  width: auto;
  min-width: 560px;
  height: 65px;
  margin-left: auto;
}

.text-page .caseitem {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  float: none;
  width: auto;
  height: 65px;
}

.text-page .caseitem span {
  box-sizing: border-box;
  float: none;
  width: auto;
  min-width: 100px;
  margin: 0;
  padding: 8px 6px 6px;
  line-height: 20px;
}

.text-page .caseitem span font {
  display: block;
}

.text-page .cases {
  height: auto;
  min-height: 620px;
}

.text-page .casesbg1 {
  right: 48px;
  left: 0;
  width: auto;
  max-width: 1000px;
}

.text-page .casemain {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 28px;
  box-sizing: border-box;
  float: none;
  width: calc(100% - 88px);
  max-width: 1020px;
  height: auto;
  min-height: 520px;
  padding: 30px;
}

.text-page .caseleft {
  float: none;
  width: 100%;
  margin: 0;
}

.text-page .caselefttitle {
  box-sizing: border-box;
  float: none;
  width: 100%;
  height: auto;
  min-height: 80px;
  margin: 20px 0 0;
  font-weight: 500;
  line-height: 1.45;
}

.text-page .titleborder {
  float: none;
  display: block;
  margin: 12px 0 18px;
}

.text-page .caseleftcontent {
  float: none;
  width: 100%;
  height: auto;
  max-height: 310px;
  margin: 0;
  overflow: auto;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.text-page .caseleftcontent p {
  margin: 0 0 1em;
}

.text-page .caseleftcontent img,
.text-page .caseleftcontent video,
.text-page .caseleftcontent iframe {
  max-width: 100% !important;
  height: auto !important;
}

.text-page .caseright {
  float: none;
  width: 100%;
  height: 440px;
  margin: 0;
  overflow: hidden;
}

.text-page .caseright img {
  float: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.text-page .page {
  position: static;
  float: none;
  width: 100%;
  height: auto;
  margin: 18px 0 0;
}

.text-page .page ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  float: none;
  width: 100%;
  height: auto;
}

.text-page .page ul li {
  float: none;
  width: auto;
  height: auto;
  margin: 4px;
}

.text-page .page ul li a {
  display: flex;
  align-items: center;
  justify-content: center;
  float: none;
  box-sizing: border-box;
  width: 38px;
  height: 38px;
  border: 1px solid #444;
  border-radius: 5px;
  background: #111;
}

@media (max-width: 1024px) {
  .text-page .text-section-header > span {
    margin-right: 0;
  }

  .text-page .casetop {
    flex-basis: 100%;
    min-width: 0;
    margin-top: 20px;
  }

  .text-page .cases {
    margin-top: 130px;
  }

  .text-page .casemain {
    grid-template-columns: minmax(210px, 0.75fr) minmax(0, 1.6fr);
    width: calc(100% - 40px);
  }
}

@media (max-width: 767px) {
  .text-hero {
    position: relative;
    top: auto;
    z-index: 0;
    float: none;
    height: 220px;
  }

  .text-hero img {
    float: none;
    height: 220px;
  }

  .text-page {
    float: none;
    margin-top: 0;
    padding: 30px 0 88px;
  }

  .text-page .text-section-header,
  .text-page .cases {
    width: 100%;
  }

  .text-page .text-section-header {
    padding: 0 14px;
  }

  .text-page .text-section-header > img {
    width: 42px;
    height: auto;
  }

  .text-page .text-section-header > font {
    display: none;
  }

  .text-page .text-section-header > span {
    margin: 0 0 0 12px;
    font-size: 25px;
  }

  .text-page .casetop {
    display: flex;
    flex-basis: auto;
    width: calc(100% + 28px);
    height: auto;
    margin: 24px -14px 0;
    padding: 0 14px 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  .text-page .casetop::-webkit-scrollbar {
    display: none;
  }

  .text-page .caseitem {
    flex: 0 0 auto;
    min-width: 126px;
    height: 56px;
    scroll-snap-align: start;
  }

  .text-page .caseitem span {
    min-width: 108px;
    font-size: 14px;
  }

  .text-page .cases {
    min-height: 0;
    margin-top: 48px;
    padding: 0 14px;
  }

  .text-page .casesbg1 {
    display: none;
  }

  .text-page .casemain {
    position: relative;
    top: auto;
    left: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    min-height: 0;
    padding: 0;
    border: 1px solid #292929;
    border-radius: 12px;
    background: #111;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    overflow: hidden;
  }

  .text-page .caseright {
    order: 1;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .text-page .caseleft {
    order: 2;
    box-sizing: border-box;
    padding: 22px 18px 24px;
  }

  .text-page .caselefttitle {
    min-height: 0;
    margin: 0;
    font-size: 22px;
  }

  .text-page .titleborder {
    margin: 14px 0 18px;
  }

  .text-page .caseleftcontent {
    max-height: none;
    overflow: visible;
    font-size: 15px;
    line-height: 1.8;
  }

  .text-page .page {
    margin-top: 22px;
  }

  .text-page .page ul {
    margin: 0;
  }
}
