/* LiteCMS v2.59: project-gallery desktop width cap.
   Load after project-screen-gallery-v257.css and portfolio-toolbar-v258.css.
   This only changes standalone project hero geometry: no gallery JS, project
   media data, homepage wall or admin behavior is modified. */
@media (min-width: 761px) {
  .screen-gallery-project .screen-gallery-hero {
    width: 100% !important;
    max-width: 1280px !important;
    margin-inline: auto !important;
  }

  /* The story and metadata use a 1240px max content width with 5vw gutters.
     Reproduce that exact content width *inside* the centered 1280px hero,
     keeping the title aligned with Role / Dates and the case-study copy. */
  .screen-gallery-project .screen-gallery-identity {
    left: calc((100% - min(1240px, calc(100vw - 2 * clamp(20px, 5vw, 76px)))) / 2) !important;
    right: calc((100% - min(1240px, calc(100vw - 2 * clamp(20px, 5vw, 76px)))) / 2) !important;
  }

  /* Keep the gallery thumbnail rail aligned with the page's text as well. */
  .screen-gallery-project .media-thumbs {
    left: calc((100% - min(1240px, calc(100vw - 2 * clamp(20px, 5vw, 76px)))) / 2) !important;
    right: calc((100% - min(1240px, calc(100vw - 2 * clamp(20px, 5vw, 76px)))) / 2) !important;
  }
}

/* On mobile, retain the existing edge-to-edge hero and image handling. */
@media (max-width: 760px) {
  .screen-gallery-project .screen-gallery-hero {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
  }
}
