/* NoorVista R9.1 — final media visibility corrections for home hero and portfolio.
 * Unique filename intentionally bypasses immutable production asset caches.
 */

/* Portfolio cards: let the source image define the media height so no part of the
 * clinical image is cropped. The details affordance stays visible without hover.
 */
body[data-public-page="portfolio"] .nv-public-portfolio-image {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  padding: 12px !important;
  overflow: hidden !important;
  background: linear-gradient(180deg, #edf7fb 0%, #deeff7 100%) !important;
}

body[data-public-page="portfolio"] .nv-public-portfolio-image > button {
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  display: block !important;
  padding: 0 !important;
  overflow: hidden !important;
  border-radius: 18px !important;
  background: #eef6f9 !important;
}

body[data-public-page="portfolio"] .nv-public-portfolio-image > button::before,
body[data-public-page="portfolio"] .nv-public-portfolio-image > button::after {
  content: none !important;
  display: none !important;
}

body[data-public-page="portfolio"] .nv-public-portfolio-image img,
body[data-public-page="portfolio"] .nv-public-portfolio-card:hover .nv-public-portfolio-image img {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  max-height: none !important;
  display: block !important;
  object-fit: contain !important;
  object-position: center center !important;
  border-radius: 16px !important;
  clip-path: none !important;
  filter: none !important;
  transform: none !important;
}

body[data-public-page="portfolio"] .nv-public-portfolio-zoom,
body[data-public-page="portfolio"] .nv-public-portfolio-card:hover .nv-public-portfolio-zoom {
  right: 22px !important;
  left: 22px !important;
  bottom: 22px !important;
  width: auto !important;
  max-width: calc(100% - 44px) !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

/* Mobile home hero: the previous 16:9-height cap made portrait artwork look like
 * a narrow strip. Use a portrait-friendly stage while keeping contain semantics.
 */
@media (max-width: 760px) {
  html body.nv-home-page section.nv-home-slider,
  html body.nv-home-page .nv-home-slider[data-nv-home-slider],
  html body.nv-home-page .nv-home-slider {
    width: 100% !important;
    max-width: 100vw !important;
    height: min(78svh, 125vw) !important;
    min-height: 360px !important;
    max-height: 620px !important;
    aspect-ratio: auto !important;
    overflow: hidden !important;
    background: #0b3157 !important;
  }

  html body.nv-home-page .nv-home-slider__viewport,
  html body.nv-home-page .nv-home-slider__track,
  html body.nv-home-page .nv-home-slide,
  html body.nv-home-page .nv-home-slide__picture,
  html body.nv-home-page .nv-home-slide__picture.is-adaptive {
    height: 100% !important;
    min-height: 0 !important;
    max-height: 100% !important;
  }

  html body.nv-home-page .nv-home-slide__picture .nv-home-slide__image,
  html body.nv-home-page .nv-home-slide__picture.is-adaptive .nv-home-slide__image,
  html body.nv-home-page .nv-home-slide > .nv-home-slide__image {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: #0b3157 !important;
  }
}

@media (max-width: 620px) {
  body[data-public-page="portfolio"] .nv-public-portfolio-image {
    padding: 10px !important;
  }

  body[data-public-page="portfolio"] .nv-public-portfolio-image > button {
    border-radius: 16px !important;
  }

  body[data-public-page="portfolio"] .nv-public-portfolio-image img {
    border-radius: 14px !important;
  }

  body[data-public-page="portfolio"] .nv-public-portfolio-zoom {
    right: 18px !important;
    left: 18px !important;
    bottom: 18px !important;
    max-width: calc(100% - 36px) !important;
  }
}
