/* Refresh the remaining mesh page sections while keeping its approved blocks intact. */

/* 01: section introduction above the existing concept composition. */
body.mesh-edition .gw-page .gw-concept-head {
  position: relative;
  justify-items: start;
  gap: 17px;
  width: min(100%, 1180px);
  margin: 0 auto 36px;
  padding: 0 0 27px;
  border-bottom: 1px solid #ded8e7;
  text-align: left;
}

body.mesh-edition .gw-page .gw-concept-head > .cat-kicker {
  justify-content: flex-start;
}

body.mesh-edition .gw-page .gw-concept-head h2 {
  max-width: 16ch;
  margin: 0;
  font-size: clamp(38px, 4vw, 60px);
  line-height: 1.07;
}

/* 02: a light gallery contact sheet with captions outside the images. */
body.mesh-edition .gw-page .gw-gallery {
  padding-top: 70px;
  padding-bottom: 90px;
}

body.mesh-edition .gw-page .gw-gallery-intro {
  grid-template-columns: minmax(0, 1.3fr) minmax(240px, .7fr);
  align-items: end;
  gap: 48px;
  margin-bottom: 34px;
}

body.mesh-edition .gw-page .gw-gallery-intro h2 {
  margin-top: 17px;
  max-width: 18ch;
  font-size: clamp(36px, 3.5vw, 52px);
  line-height: 1.12;
}

body.mesh-edition .gw-page .gw-gallery-intro > p {
  max-width: 34ch;
  margin: 0 0 4px;
  padding: 7px 0 7px 20px;
  border-left: 2px solid #b57bbc;
  color: #5f5873;
  font-size: 15px;
  line-height: 1.7;
}

body.mesh-edition .gw-page .gw-gallery-mosaic {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: auto;
  align-items: stretch;
  gap: 16px;
  height: auto;
}

body.mesh-edition .gw-page .gw-gallery-frame,
body.mesh-edition .gw-page .gw-gallery-frame--main,
body.mesh-edition .gw-page .gw-gallery-frame--detail,
body.mesh-edition .gw-page .gw-gallery-frame--light {
  --frame-ink: #251d5c;
  grid-row: auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  padding: 8px;
  border: 1px solid #e5e0eb;
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(38, 28, 78, .06);
  color: #251d5c;
  transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}

body.mesh-edition .gw-page .gw-gallery-frame:hover {
  transform: translateY(-5px);
  border-color: #c9b8d6;
  box-shadow: 0 24px 48px rgba(38, 28, 78, .12);
}

body.mesh-edition .gw-page .gw-gallery-frame::before,
body.mesh-edition .gw-page .gw-gallery-frame::after {
  display: none;
}

body.mesh-edition .gw-page .gw-gallery-photo.cat-media {
  position: relative;
  z-index: auto;
  inset: auto;
  flex: none;
  width: 100%;
  height: clamp(270px, 28vw, 355px);
  overflow: hidden;
  border-radius: 15px;
  background: #eae7e5;
}

body.mesh-edition .gw-page .gw-gallery-photo.cat-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.mesh-edition .gw-page .gw-gallery-frame--main .gw-gallery-photo img {
  object-position: 50% 48%;
}

body.mesh-edition .gw-page .gw-gallery-number {
  z-index: 3;
  top: 24px;
  left: 24px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 50%;
  background: rgba(31, 24, 71, .72);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  text-shadow: none;
  backdrop-filter: blur(8px);
}

body.mesh-edition .gw-page .gw-gallery-frame figcaption {
  flex: 1;
  padding: 22px 18px 20px;
  border-top: 0;
}

body.mesh-edition .gw-page .gw-gallery-frame h3,
body.mesh-edition .gw-page .gw-gallery-frame--main h3 {
  margin: 0 0 7px;
  color: #251d5c;
  font-size: clamp(21px, 1.8vw, 25px);
  font-weight: 600;
  line-height: 1.2;
}

body.mesh-edition .gw-page .gw-gallery-frame figcaption > span {
  color: #706980;
  font-size: 13px;
  line-height: 1.55;
  opacity: 1;
}

body.mesh-edition .gw-page .gw-gallery-footer {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid #e1dce8;
}

body.mesh-edition .gw-page .gw-gallery-footer .cat-link {
  padding: 10px 0;
  font-weight: 700;
}

/* 03: alternating, full-width engineering stories above the approved diagram. */
body.mesh-edition .gw-page #engineering .gw-eng-heading {
  grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
  align-items: center;
  gap: 8%;
  margin-bottom: 40px;
}

body.mesh-edition .gw-page #engineering .gw-eng-heading h2 {
  margin-top: 19px;
  font-size: clamp(38px, 3.7vw, 54px);
  line-height: 1.1;
}

body.mesh-edition .gw-page #engineering .gw-eng-heading > p {
  max-width: 46ch;
  margin: 0;
  padding-left: 23px;
  border-left: 2px solid #b57bbc;
  color: #605a73;
  font-size: 15px;
  line-height: 1.75;
}

body.mesh-edition .gw-page #engineering .gw-eng-photos {
  grid-template-columns: 1fr;
  gap: 18px;
}

body.mesh-edition .gw-page #engineering .gw-eng-photo {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid #e4dfea;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(37, 29, 92, .045);
}

body.mesh-edition .gw-page #engineering .gw-eng-photo .cat-media {
  order: 0;
  height: 315px;
  min-width: 0;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background: #ece9e3;
}

body.mesh-edition .gw-page #engineering .gw-eng-photo figcaption {
  order: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 4vw, 54px);
  background: #f4f1f8;
}

body.mesh-edition .gw-page #engineering .gw-eng-photo-pump .cat-media {
  order: 1;
  background: #f4f1f8;
}

body.mesh-edition .gw-page #engineering .gw-eng-photo-pump figcaption {
  order: 0;
  background: #f0f3f5;
}

body.mesh-edition .gw-page #engineering .gw-eng-photo h3 {
  max-width: 20ch;
  margin: 0 0 18px;
  color: #251d5c;
  font-size: clamp(25px, 2.25vw, 32px);
  line-height: 1.16;
}

body.mesh-edition .gw-page #engineering .gw-eng-photo p {
  max-width: 48ch;
  margin: 0;
  color: #625b73;
  font-size: 14px;
  line-height: 1.75;
}

body.mesh-edition .gw-page #engineering .gw-eng-reference-note {
  margin: 20px 0 40px;
  padding-left: 14px;
  border-left: 2px solid #c2afce;
  color: #716981;
  font-size: 12px;
}

/* Related solutions are outside the numbered 04–06 sections. */
body.mesh-edition .gw-page .cat-related {
  padding-top: 62px;
  padding-bottom: 74px;
  border-top: 1px solid #e5e0e9;
}

body.mesh-edition .gw-page .cat-related-head {
  align-items: end;
  margin-bottom: 27px;
}

body.mesh-edition .gw-page .cat-related-head h2 {
  margin: 14px 0 0;
  font-size: clamp(32px, 3vw, 43px);
}

body.mesh-edition .gw-page .cat-related-grid {
  gap: 14px;
}

body.mesh-edition .gw-page .cat-related-grid a {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 205px;
  padding: 27px 26px;
  border: 1px solid #e4ddea;
  border-radius: 18px;
  background: linear-gradient(145deg, #fff, #f8f5fa);
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}

body.mesh-edition .gw-page .cat-related-grid a:hover {
  transform: translateY(-4px);
  border-color: #c7b2d1;
  box-shadow: 0 16px 35px rgba(40, 28, 80, .09);
}

body.mesh-edition .gw-page .cat-related-grid small {
  color: #8b5a9b;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.mesh-edition .gw-page .cat-related-grid h3 {
  margin: 22px 0 12px;
  font-size: clamp(21px, 2vw, 27px);
  line-height: 1.2;
}

body.mesh-edition .gw-page .cat-related-grid h3 span {
  color: #985d9e;
}

body.mesh-edition .gw-page .cat-related-grid p {
  margin: auto 0 0;
  color: #6f677e;
  font-size: 13px;
  line-height: 1.6;
}

body.mesh-edition .gw-page .cat-related .gw-actions {
  margin-top: 25px;
  gap: 18px 27px;
}

@media (max-width: 900px) {
  body.mesh-edition .gw-page .gw-gallery-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.mesh-edition .gw-page .gw-gallery-frame--light {
    grid-column: 1 / -1;
  }

  body.mesh-edition .gw-page .gw-gallery-frame--light .gw-gallery-photo.cat-media {
    height: 300px;
  }
}

@media (max-width: 780px) {
  body.mesh-edition .gw-page .gw-gallery {
    padding-top: 50px;
    padding-bottom: 62px;
  }

  body.mesh-edition .gw-page .gw-gallery-intro,
  body.mesh-edition .gw-page #engineering .gw-eng-heading {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  body.mesh-edition .gw-page #engineering .gw-eng-photo {
    grid-template-columns: 1fr;
  }

  body.mesh-edition .gw-page #engineering .gw-eng-photo .cat-media,
  body.mesh-edition .gw-page #engineering .gw-eng-photo-pump .cat-media {
    order: 0;
    height: auto;
    aspect-ratio: 1.6;
  }

  body.mesh-edition .gw-page #engineering .gw-eng-photo figcaption,
  body.mesh-edition .gw-page #engineering .gw-eng-photo-pump figcaption {
    order: 1;
    padding: 28px;
  }
}

@media (max-width: 620px) {
  body.mesh-edition .gw-page .gw-concept-head {
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 21px;
  }

  body.mesh-edition .gw-page .gw-concept-head h2 {
    font-size: clamp(34px, 9.5vw, 42px);
  }

  body.mesh-edition .gw-page .gw-gallery-intro {
    gap: 18px;
    margin-bottom: 25px;
  }

  body.mesh-edition .gw-page .gw-gallery-intro h2 {
    font-size: clamp(32px, 9vw, 42px);
  }

  body.mesh-edition .gw-page .gw-gallery-mosaic {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  body.mesh-edition .gw-page .gw-gallery-frame--light {
    grid-column: auto;
  }

  body.mesh-edition .gw-page .gw-gallery-photo.cat-media,
  body.mesh-edition .gw-page .gw-gallery-frame--light .gw-gallery-photo.cat-media {
    height: auto;
    aspect-ratio: 1.25;
  }

  body.mesh-edition .gw-page .gw-gallery-frame figcaption {
    padding: 19px 16px 20px;
  }

  body.mesh-edition .gw-page .gw-gallery-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  body.mesh-edition .gw-page #engineering .gw-eng-heading h2 {
    font-size: 36px;
  }

  body.mesh-edition .gw-page #engineering .gw-eng-heading > p {
    padding-left: 17px;
    font-size: 14px;
  }

  body.mesh-edition .gw-page #engineering .gw-eng-photo {
    border-radius: 18px;
  }

  body.mesh-edition .gw-page #engineering .gw-eng-photo figcaption,
  body.mesh-edition .gw-page #engineering .gw-eng-photo-pump figcaption {
    padding: 25px 22px;
  }

  body.mesh-edition .gw-page #engineering .gw-eng-photo h3 {
    margin-bottom: 11px;
    font-size: 23px;
  }

  body.mesh-edition .gw-page .cat-related {
    padding-top: 48px;
    padding-bottom: 52px;
  }

  body.mesh-edition .gw-page .cat-related-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  body.mesh-edition .gw-page .cat-related-grid a {
    min-height: 0;
    padding: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.mesh-edition .gw-page .gw-gallery-frame {
    transition: none;
  }

  body.mesh-edition .gw-page .cat-related-grid a {
    transition: none;
  }
}
