/* NangKwak Stage 38 (working): photo framing controls, no image assets altered.
   Film/still portrait photo cards were historically center-cropped across landscape slots.
   Keep faces and upper-body expressions inside the image instead of losing them. */
a.nm-card.nm-card-below > img[data-photo-framing="portrait"],
.nm-gallerygrid a.nm-card > img[data-photo-framing="portrait"],
.nm-editorial-card-media > img[data-photo-framing="portrait"],
.nm-evidence-hero-visual > img[data-photo-framing="portrait"] {
    object-position:center 7% !important;
}
@media (min-width:931px) {
  body.nm-page-way main>.nm-subhero,
  body.nm-page-journal main>.nm-subhero,
  body.nm-page-practice main>.nm-subhero {
    height:clamp(360px,27vw,410px) !important;
  }
  body.nm-page-way main>.nm-subhero .nm-hero-img,
  body.nm-page-journal main>.nm-subhero .nm-hero-img,
  body.nm-page-practice main>.nm-subhero .nm-hero-img {
    object-position:center 2% !important;
  }
}
a.nm-card.nm-card-below > img[src$="batch_02-sunlit-ivory-flower-arrangement.webp"],
a.nm-card.nm-card-below > img[src$="batch_08-sunlit-tea-atelier-portrait.webp"] {
   object-position:center 10% !important;
}

/* Narrow-screen 404 resilience: long Thai, Vietnamese and Lao headings must not
   disappear above the photographic hero crop. Keep the original photo untouched. */
@media (max-width: 460px) {
  body.nm-page-notfound main > .nm-subhero.nm-hero-wide {
    height: auto !important;
    min-height: 510px;
  }
  body.nm-page-notfound main > .nm-subhero.nm-hero-wide .nm-hero-content {
    height: auto;
    min-height: 510px;
    padding-top: 44px;
    padding-bottom: 44px;
  }
  body.nm-page-notfound main > .nm-subhero.nm-hero-wide h1 {
    font-size: clamp(2.35rem, 10vw, 3.2rem);
    line-height: 1.12;
  }
}

/* Accessible text scaling: keep hero headings and descriptions fully visible
   when readers enlarge text. The established photographic framing is preserved;
   only the banner's vertical space can grow if content needs it. */
@media (max-width:930px) {
  body.nm-ref-page:not(.nm-page-notfound):not(.nm-page-editorial) main > .nm-subhero:not(.nm-hero-wide) {
    height:auto !important;
    min-height:clamp(305px,27vw,470px) !important;
  }
  body.nm-ref-page:not(.nm-page-notfound):not(.nm-page-editorial) main > .nm-subhero:not(.nm-hero-wide) .nm-hero-content {
    height:auto !important;
    min-height:clamp(305px,27vw,470px) !important;
    padding-top:42px;
    padding-bottom:42px;
  }
  body.nm-page-notfound main > .nm-subhero.nm-hero-wide {
    height:auto !important;
    min-height:min(72vh,730px) !important;
  }
  body.nm-page-notfound main > .nm-subhero.nm-hero-wide .nm-hero-content {
    height:auto !important;
    min-height:min(72vh,730px) !important;
    padding-top:44px;
    padding-bottom:44px;
  }
}
@media (max-width:460px) {
  body.nm-page-notfound main > .nm-subhero.nm-hero-wide,
  body.nm-page-notfound main > .nm-subhero.nm-hero-wide .nm-hero-content {
    min-height:510px !important;
  }
}

/* Flexible larger-type headings on tablet/desktop. Keep native hero heights for
   ordinary-size text while preventing Thai and Lao copy from being cut off. */
@media (min-width:931px) {
  body.nm-page-practice main > .nm-subhero {
    height:auto !important;
    min-height:clamp(360px,27vw,410px) !important;
  }
  body.nm-page-practice main > .nm-subhero .nm-hero-content {
    height:auto !important;
    min-height:clamp(360px,27vw,410px) !important;
  }
  body.nm-page-notfound main > .nm-subhero.nm-hero-wide {
    height:auto !important;
    min-height:min(72vh,730px) !important;
  }
  body.nm-page-notfound main > .nm-subhero.nm-hero-wide .nm-hero-content {
    height:auto !important;
    min-height:min(72vh,730px) !important;
  }
}
@media (min-width:931px) and (max-width:1320px) {
  html[lang="lo"] .nm-homehero {
    height:auto !important;
    min-height:clamp(455px,43vw,670px) !important;
  }
  html[lang="lo"] .nm-homehero > img {
    position:absolute;
    inset:0;
  }
  html[lang="lo"] .nm-homehero .nm-homecopy {
    position:relative !important;
    min-height:clamp(455px,43vw,670px) !important;
    padding-top:24px;
    padding-bottom:24px;
  }
}

/* Prevent enlarged accessibility text from escaping its hero without moving approved images at normal text size. */
.nm-homehero{height:auto!important;min-height:clamp(455px,43vw,670px)!important}
.nm-homehero>img{position:absolute!important;inset:0!important;height:100%!important}
.nm-homecopy{position:relative!important;inset:auto!important;min-height:clamp(455px,43vw,670px)!important}
.nm-hero-content h1,.nm-homecopy h1{max-width:100%;overflow-wrap:anywhere}
@media(max-width:930px){.nm-homehero,.nm-homecopy{min-height:555px!important}}
@media(max-width:600px){.nm-homehero,.nm-homecopy{min-height:clamp(635px,182vw,815px)!important}}
