/* The same photo row on landing pages, vehicle pages and in the photo library. */
main :is(.gallery-grid[data-photo-pairs], .fleet-photo-pair, #media-gallery, .large-photos) {
 display:grid!important;
 grid-template-columns:repeat(2,minmax(0,1fr))!important;
 gap:clamp(8px,1.5vw,20px);
}
main .gallery-grid[data-photo-pairs] > :is(.gallery-item,.gallery-tile) {
 grid-area:auto!important;
 min-width:0;
 transform:none!important;
}
main .gallery-grid[data-photo-pairs] .gallery-item {
 width:100%;height:auto!important;min-height:0!important;aspect-ratio:4/3!important;
}
main .gallery-grid[data-photo-pairs] img,main #media-gallery .gallery-item img,main .large-photos img {
 width:100%;height:100%;object-fit:contain!important;
}
/* An unpaired original, including after filtering, gets a complete centered row. */
main :is(.gallery-grid,.fleet-photo-pair,#media-gallery,.large-photos)
 > :nth-child(odd of :not([hidden])):nth-last-child(1 of :not([hidden])) {
 grid-column:1 / -1!important;
 justify-self:center;
 width:100%;
}
main .gallery-grid[data-photo-pairs] > .gallery-item:nth-child(odd of :not([hidden])):nth-last-child(1 of :not([hidden])) {
 aspect-ratio:auto!important;
 height:clamp(220px,54vw,650px)!important;
}
main .image-text:has(> .block-copy:empty),main .image-text:has(> .block-copy:has(> .prose:only-child:empty)) {
 grid-template-columns:minmax(0,1fr);
}

/* A video and its caption form one tile, including when the player opens. */
main .video-grid {
 display:grid;
 grid-template-columns:repeat(2,minmax(0,1fr))!important;
 gap:clamp(8px,2vw,28px);
 margin-inline:auto;
}
main .video-grid > :is(.video-feature,.video-card),
.homepage main .video-grid > .video-feature:first-child {
 grid-column:auto!important;
 display:flex;
 flex-direction:column;
 min-width:0;
 width:100%;
}
main .video-grid > :last-child:nth-child(odd),
.homepage main .video-grid > .video-feature:only-child {
 grid-column:1 / -1!important;
}
main .video-grid .youtube-block,
.homepage main .video-grid > .video-feature:first-child .youtube-block {
 aspect-ratio:16 / 9;
 height:auto;
 min-height:0;
 width:100%;
}
main .video-grid .youtube-load img {object-fit:contain}
@media(max-width:700px){
 main .video-grid .video-feature-caption {padding:12px}
 main .video-grid .video-feature-caption h3 {font-size:clamp(16px,4vw,22px);overflow-wrap:anywhere}
 main .video-grid .video-play-label {display:none}
 main .video-grid .play-icon {width:42px;height:42px;font-size:18px}
}
