/* RPMX rc1.205 – approved service galleries and compact identity cards.
   Scoped extensions; the existing Home artefact, map, orders and ads remain. */
.rpmx-service-media-gallery{
 position:relative;display:block;width:100%;height:100%;
 min-width:0;min-height:0;overflow:hidden;background:#f5f1ec;
}
.rpmx-service-media-gallery__viewport{
 position:absolute;inset:0;overflow:hidden;
}
.rpmx-service-media-gallery__slide{
 width:100%;height:100%;position:absolute;inset:0;
}
.rpmx-service-media-gallery__slide[hidden]{display:none!important}
.rpmx-service-media-gallery__slide img{
 display:block!important;width:100%!important;height:100%!important;
 min-width:0!important;min-height:0!important;
 object-fit:cover!important;object-position:center!important;
 border:0!important;border-radius:0!important;padding:0!important;
}
.rpmx-service-media-gallery.is-logo{background:#fff}
.rpmx-service-media-gallery.is-logo .rpmx-service-media-gallery__slide img{
 object-fit:contain!important;object-position:center!important;
 padding:12px!important;box-sizing:border-box!important;
}
.rpmx-service-media-gallery__empty{
 display:grid;position:absolute;inset:0;place-items:center;
 background:linear-gradient(145deg,#f9f4ed,#edf1f5);
 color:#af9c8a;font-size:34px;
}
.rpmx-service-media-gallery__video{
 position:absolute;right:8px;top:8px;padding:5px 8px;
 border-radius:999px;background:rgba(21,32,48,.85);
 color:#fff;font-size:10px;font-weight:800;
}
.rpmx-service-media-gallery__controls{
 display:flex;align-items:center;justify-content:space-between;
 position:absolute;bottom:8px;left:8px;right:8px;z-index:6;
 gap:5px;pointer-events:none;
}
.rpmx-service-media-gallery__controls button{
 pointer-events:auto;display:grid;place-items:center;
 border:1px solid rgba(22,34,54,.1);
 border-radius:50%;padding:0;width:29px;height:29px;
 background:rgba(255,255,255,.94);color:#162236;
 box-shadow:0 3px 10px rgba(0,0,0,.1);
 font:750 21px/1 sans-serif;cursor:pointer;
}
.rpmx-service-media-gallery__controls button:disabled{opacity:.42;cursor:default}
.rpmx-service-media-gallery__controls button:focus-visible{outline:3px solid #277c99;outline-offset:1px}
.rpmx-service-media-gallery__controls [data-rpmx-service-counter]{
 display:inline-flex;align-items:center;min-height:24px;
 border-radius:999px;padding:4px 8px;
 background:rgba(22,34,54,.8);color:white;
 font:750 10px/1 system-ui,sans-serif;
}
/* Images occupy the same media viewport in Home, a listing, or services index. */
body.rpmx-front-page #rpmx-home-services .rpmx-service-card--unified{
 position:relative;
}
body.rpmx-front-page #rpmx-home-services .rpmx-service-card__media .rpmx-service-media-gallery{
 height:100%;min-height:100%;
}
body.rpmx-front-page #rpmx-home-services .rpmx-service-card__media::after{
 pointer-events:none!important;z-index:1;
}
body.rpmx-front-page #rpmx-home-services .rpmx-service-media-gallery{
 z-index:2;
}
body.rpmx-front-page #rpmx-home-services .rpmx-service-card__content strong a{
 color:#162236!important;text-decoration:none!important;
}
body.rpmx-front-page #rpmx-home-services .rpmx-service-card__content strong a:hover{text-decoration:underline!important}
body.rpmx-front-page #rpmx-home-services .rpmx-service-card__cta{
 text-decoration:none!important;text-align:center;
}
body.rpmx-front-page #rpmx-home-services .rpmx-home-services__tools{
 display:flex;gap:10px;align-items:center;flex-wrap:wrap;
}
body.rpmx-front-page #rpmx-home-services .rpmx-home-services__all{
 color:#b32e32;font-size:12px;font-weight:850;text-decoration:none;white-space:nowrap;
}
body.rpmx-front-page #rpmx-home-services .rpmx-home-services__all:hover{text-decoration:underline}
body.rpmx-front-page #rpmx-home-services .rpmx-home-services__arrows{display:flex;gap:7px}
body.rpmx-front-page #rpmx-home-services .rpmx-home-services__arrows button{
 display:grid;place-items:center;
 width:35px;height:35px;padding:0;border:1px solid #e5dfd7;
 border-radius:50%;background:#fff;color:#162236;
 font:800 22px/1 system-ui,sans-serif;cursor:pointer;
}
body.rpmx-front-page #rpmx-home-services .rpmx-home-services__arrows button:disabled{opacity:.35;cursor:default}
body.rpmx-front-page #rpmx-home-services .rpmx-home-services__arrows button:focus-visible{
 outline:2px solid #3281a5;outline-offset:2px;
}
/* Gallery in listing services inherits the exact same projection and controls. */
body.rpmx-listing-v2 .rpmx-services .rpmx-service-card--unified .rpmx-service-card__media{
 position:relative;aspect-ratio:16/9;min-height:130px;overflow:hidden;
}
body.rpmx-listing-v2 .rpmx-services .rpmx-service-card--unified .rpmx-service-media-gallery{
 height:100%;min-height:130px;position:absolute;inset:0;
}
/* Full directory uses identical gallery primitives, not unrelated fixed-height
   gradients with large empty space for missing photos. */
body.rpmx-services-public .rpmx-services-feed{
 columns:auto!important;display:grid!important;
 grid-template-columns:repeat(auto-fill,minmax(min(250px,100%),1fr));
 gap:16px;align-items:stretch;
}
body.rpmx-services-public .rpmx-services-feed .rpmx-service-pin--unified{
 display:flex;flex-direction:column;min-width:0;overflow:hidden;
 margin:0!important;padding:0;border:1px solid #e5dfd7!important;
 border-radius:18px!important;background:#fff!important;
 box-shadow:0 6px 18px rgba(22,34,54,.045)!important;
}
body.rpmx-services-public .rpmx-service-pin--unified .rpmx-service-pin__visual{
 position:relative!important;display:block!important;
 width:100%;aspect-ratio:4/3!important;
 min-height:0!important;height:auto!important;
 border-radius:0!important;padding:0!important;
 background:#f6f2ed!important;overflow:hidden;
}
body.rpmx-services-public .rpmx-service-pin--unified .rpmx-service-media-gallery{
 position:absolute;inset:0;height:100%;
}
body.rpmx-services-public .rpmx-service-pin--unified .rpmx-service-pin__body{
 display:flex;flex-direction:column;gap:7px;
 padding:13px 14px 14px!important;flex:1;
}
body.rpmx-services-public .rpmx-service-pin--unified .rpmx-service-card__top{
 display:flex;justify-content:space-between;align-items:center;gap:10px;
 font-size:10px;color:#697588;
}
body.rpmx-services-public .rpmx-service-pin--unified .rpmx-service-card__top .rpmx-eyebrow{
 font-size:10px;color:#b32e32;margin:0;line-height:1.2;
}
body.rpmx-services-public .rpmx-service-pin--unified h2{
 font-size:16px!important;line-height:1.2!important;
 letter-spacing:-.02em;margin:0!important;
}
body.rpmx-services-public .rpmx-service-pin--unified h2 a{color:#162236;text-decoration:none}
body.rpmx-services-public .rpmx-service-pin--unified h2 a:hover{text-decoration:underline}
body.rpmx-services-public .rpmx-service-pin--unified .rpmx-service-provider{margin:0;color:#647184}
body.rpmx-services-public .rpmx-service-pin--unified .rpmx-service-card__meta{
 display:flex;align-items:center;justify-content:space-between;
 gap:8px;margin:auto 0 0;padding:10px 0 0;border-top:1px solid #f0eeeb;
}
body.rpmx-services-public .rpmx-service-pin--unified .rpmx-service-card__meta strong{color:#a62d32;font-size:13px}
body.rpmx-services-public .rpmx-service-pin--unified .rpmx-service-card__meta a{color:#162236;font-weight:800;text-decoration:none}
body.rpmx-services-public .rpmx-service-pin--unified .rpmx-service-card__meta a:hover{text-decoration:underline}
/* Home curated restaurant cards: if the featured image is literally the logo,
   don't display it twice or magnify a wordmark into an empty photograph.
   Photographic covers keep their own crop and thumbnail. */
body.rpmx-front-page .rpmx-home-section--intent-rail .rpmx-card.is-logo-first .rpmx-card__media{
 height:76px!important;min-height:76px!important;max-height:76px!important;
 background:#fff!important;
 display:flex!important;align-items:center!important;justify-content:flex-start!important;
 padding:4px 9px!important;box-sizing:border-box!important;
}
body.rpmx-front-page .rpmx-home-section--intent-rail .rpmx-card.is-logo-first .rpmx-card__media img{
 width:min(100%,92px)!important;height:62px!important;
 min-height:0!important;max-height:62px!important;object-fit:contain!important;
 object-position:center!important;border-radius:9px!important;
}
body.rpmx-front-page .rpmx-home-section--intent-rail .rpmx-card.is-logo-first .rpmx-card__flag{
 top:8px!important;left:auto!important;right:8px!important;
 max-width:60%;padding:5px 8px!important;
 min-height:20px!important;font-size:.59rem!important;box-shadow:none!important;
}
body.rpmx-front-page .rpmx-home-section--intent-rail .rpmx-card.is-logo-first .rpmx-card__logo-wrap{
 display:none!important;
}
body.rpmx-front-page .rpmx-home-section--intent-rail .rpmx-card.is-logo-first .rpmx-card__header{
 padding-left:0!important;min-height:0!important;margin-bottom:7px!important;
}
body.rpmx-front-page .rpmx-home-section--intent-rail .rpmx-card.is-logo-first .rpmx-card__body--compact{
 padding:11px 12px 12px!important;
}
body.rpmx-front-page .rpmx-home-section--intent-rail .rpmx-card.is-photo-first .rpmx-card__media{
 height:99px!important;min-height:99px!important;max-height:99px!important;
}
body.rpmx-front-page .rpmx-home-section--intent-rail .rpmx-card.is-photo-first .rpmx-card__logo-wrap{
 top:70px!important;
}
@media(max-width:767px){
 body.rpmx-front-page #rpmx-home-services .rpmx-section-heading--split{
  align-items:flex-start;gap:10px;flex-direction:column;
 }
 body.rpmx-front-page #rpmx-home-services .rpmx-home-services__tools{
  width:100%;justify-content:space-between;
 }
 body.rpmx-front-page .rpmx-home-section--intent-rail .rpmx-card.is-logo-first .rpmx-card__media{
  height:72px!important;min-height:72px!important;max-height:72px!important;
 }
 body.rpmx-front-page .rpmx-home-section--intent-rail .rpmx-card.is-logo-first .rpmx-card__media img{
  height:58px!important;max-height:58px!important;
 }
 body.rpmx-services-public .rpmx-services-feed{
  grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;
 }
 body.rpmx-services-public .rpmx-service-pin--unified .rpmx-service-pin__body{padding:10px 10px 12px!important}
 body.rpmx-services-public .rpmx-service-pin--unified h2{font-size:14px!important}
 body.rpmx-services-public .rpmx-service-pin--unified .rpmx-service-media-gallery__controls button{width:25px;height:25px}
 body.rpmx-services-public .rpmx-service-pin--unified .rpmx-service-media-gallery__controls span{font-size:9px}
}
@media(max-width:359px){
 body.rpmx-services-public .rpmx-services-feed{grid-template-columns:1fr}
}
