/* Full image frames on phones and tablets. This layer is injected last so
   retained page-specific crop/hover rules cannot hide equipment or people.
   Slideshow/controller state remains unchanged. */
@media (min-width: 1025px) {
  body.pev-refined .job-hero {
    margin-top: 112px;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
    justify-content: flex-end;
    padding: clamp(28px, 3vw, 56px) var(--page-gutter, 24px);
    background: linear-gradient(0deg, rgba(5,13,20,.90), rgba(5,13,20,.28) 26%, transparent 55%),
      url('assets/thumbnails/ev-conversion-workshop-v2-1280.webp') center / contain no-repeat;
  }
}
@media (max-width: 1024px) {
  body img, body video {
    max-width: 100%;
    object-fit: contain !important;
    object-position: center !important;
    transform: none !important;
    translate: none !important;
    scale: none !important;
  }
  body .hero-slideshow,
  body .hero-slideshow.is-animated,
  body .hero-video {
    animation: none !important;
    transform: none !important;
    will-change: auto;
  }

  /* The photo gets its own stable, uncropped plane above the reading panel.
     Child opacity transitions still crossfade without moving the frame. */
  body.pev-refined .hero:has(> .hero-slideshow),
  body.pev-refined .hei:has(> .hero-slideshow),
  body.pev-refined .hei:has(> .hero-video) {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 108px 0 28px;
    background: var(--bg, #0a0f14);
  }
  body.pev-refined :is(.hero, .hei) > .hero-slideshow {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
  body.pev-refined .hero-slideshow > img {
    width: 100%;
    height: 100%;
  }
  body.pev-refined .hei > .hero-video {
    position: relative;
    inset: auto;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
  body.pev-refined .hero:has(> .hero-slideshow) > .overlay { display: none !important; }
  body.pev-refined .hei:has(> .hero-slideshow)::after,
  body.pev-refined .hei:has(> .hero-video)::after {
    display: none !important;
  }
  body.original-home .hero:has(> .hero-slideshow) { padding-bottom: 86px; }
  body.original-home .hero > .hero-content {
    position: relative;
    inset: auto;
    transform: none;
    width: 100%;
    max-width: none;
    padding: 30px var(--page-gutter, 20px) 18px;
  }
  body.original-home .hero-scroll-cue { display: none; }
  body.pev-refined .hei:has(> .hero-slideshow):not(.solution-hero) > h1,
  body.pev-refined .hei:has(> .hero-slideshow):not(.solution-hero) > .divider-line,
  body.pev-refined .hei:has(> .hero-slideshow):not(.solution-hero) > .breadcrumb {
    margin-inline: var(--page-gutter, 20px);
  }
  body.pev-refined .hei:has(> .hero-slideshow):not(.solution-hero) > h1 {
    padding: 0;
    margin-top: 28px;
  }
  body.pev-refined .solution-hero:not(.capability-hero) > .solution-hero-copy {
    width: auto;
    max-width: none;
    padding: 30px var(--page-gutter, 20px) 8px;
  }

  /* Preserve the draft's real charging film and fallback poster as one plane. */
  body.pev-refined .hei[data-page-media] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: 'media' 'copy' 'controls';
    gap: 0;
    height: auto;
    min-height: 0;
    padding: 108px 0 24px;
  }
  body.pev-refined .hei[data-page-media] > :is(.pev-media-poster, .hero-video) {
    grid-area: media;
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    align-self: stretch;
  }
  body.pev-refined .hei[data-page-media] > .solution-hero-copy { grid-area: copy; }
  body.pev-refined .hei[data-page-media] > .pev-media-controls {
    grid-area: controls;
    position: static;
    justify-content: flex-end;
    margin: 0 var(--page-gutter, 20px);
  }

  /* Solution cards use a full photo followed by copy rather than a tall crop. */
  body.original-home .home-service:not(.capability-home) {
    min-height: 0;
    flex-direction: column;
    align-items: stretch;
  }
  body.original-home .home-service-image {
    position: static;
    inset: auto;
    z-index: auto;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
  body.original-home .home-service-shade { display: none !important; }
  body.original-home .home-service-content { max-width: none; padding: 28px 24px; }
  body.original-home .capability-home[data-capability-ready] .capability-home-surface {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
  }
  body.original-home .capability-home[data-capability-ready] .home-service-content {
    order: 1;
    padding: 28px 24px;
  }
  body.original-home .capability-home[data-capability-ready] .capability-media {
    order: 0;
    position: static;
    inset: auto;
    padding: 0;
    width: 100%;
  }
  body.original-home .capability-home[data-capability-ready] .capability-stage {
    position: static;
    inset: auto;
    display: grid;
  }
  body.original-home .capability-home[data-capability-ready] .capability-slide {
    position: relative;
    inset: auto;
    grid-area: 1 / 1;
  }
  body.original-home .capability-home[data-capability-ready] .capability-image {
    position: static;
    inset: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
  body.original-home .capability-home[data-capability-ready] .capability-caption {
    position: static;
    inset: auto;
    max-width: none;
    padding: 18px 24px;
    background: var(--card, #111e28);
  }
  body.original-home .capability-home[data-capability-ready] .capability-name {
    color: var(--accent-2, #67e8a6);
    font-size: 1.05rem;
    text-shadow: none;
  }
  body.original-home .capability-home[data-capability-ready] .capability-caption p {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    margin: 8px 0 0;
    clip-path: none;
    white-space: normal;
    overflow: visible;
  }
  body.original-home .capability-home[data-capability-ready] .capability-controls {
    position: static;
    inset: auto;
    padding: 14px 0 20px;
  }

  /* Catalogue, opportunity and application images retain their source ratio. */
  body .category-banner { height: auto; }
  body .category-banner > img { display: block; width: 100%; height: auto; }
  body .category-banner > .banner-overlay {
    position: static;
    inset: auto;
    background: var(--card, #131a22);
    padding: 24px;
  }
  body :is(.about-img, .full-bleed-img) { height: auto; }
  body :is(.about-img, .home-opportunity-visual, .full-bleed-img, .fleet-visual,
    .product-visual, .product-hero-image, .job-image-gallery, .content-with-image) img {
    height: auto;
    max-height: none;
  }
  body .product-visual:has(img) { height: auto; }
  body .product-visual img { display: block; width: 100%; }
  body img.product-hero-image { height: auto; max-height: none; }
  body .solution-related-card img { object-fit: contain !important; }
  body .job-image-gallery { display: block; }
  body .job-image-gallery .image-grid { grid-template-columns: minmax(0, 1fr); }
  body .job-image-gallery .image-grid img { width: 100%; height: auto; }
  body .solution-render { height: auto; }
  body .solution-render img { width: 100%; height: auto; max-height: none; }
  body .story-video :is(iframe, video) { max-width: 100%; }

  /* This retained job banner used a CSS cover image; give it a complete plane. */
  body.pev-refined .job-hero {
    display: block;
    height: auto;
    min-height: 0;
    padding: 108px 0 28px;
    background-image: none;
  }
  body.pev-refined .job-hero::before {
    content: '';
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: url('assets/thumbnails/ev-conversion-workshop-v2-1280.webp') center / contain no-repeat;
  }
  body.pev-refined .job-hero > :is(h1, .divider-line, .breadcrumb) { margin-inline: var(--page-gutter, 20px); }
  body.pev-refined .job-hero > h1 { margin-top: 28px; }
}
