/* Full-photo cards: the photo fills the whole card and the title and text sit
   over a soft navy shade at the bottom. Turn on with
   <div class="svc-grid svc-grid--photo"> around the usual photo cards
   (.svc-card with .cc-img-wrap > .cc-img, a .card-hit link and .card-more).
   Load after components.css. */

.svc-grid--photo > .svc-card:has(.cc-img){
  position:relative;isolation:isolate;overflow:hidden;
  aspect-ratio:3/4;padding:1.75rem 1.6rem 1.75rem;
  justify-content:flex-end;align-items:flex-start;text-align:left;gap:.45rem;
  background:var(--ink,#233B55);color:#fff;border:0}
/* No edge on photo cards, at rest or on hover: the photo runs to the corners. */
.svc-grid--photo > .svc-card:has(.cc-img):has(.card-hit:hover),.svc-grid--photo > .svc-card:has(.cc-img):has(.card-hit:active){box-shadow:0 22px 44px rgba(35,59,85,.16)}

/* The photo fills the card, behind the text */
.svc-grid--photo .cc-img-wrap{position:absolute;inset:0;z-index:-1;margin:0;border-radius:0;width:auto;background:var(--ink,#233B55)}
.svc-grid--photo .cc-img{width:100%;height:100%;aspect-ratio:auto;object-fit:cover;object-position:50% 30%}
/* Shade so white text reads on any photo */
.svc-grid--photo .cc-img-wrap::after{content:"";position:absolute;inset:0;
  background:linear-gradient(to top,rgba(20,32,48,.88) 0%,rgba(20,32,48,.6) 32%,rgba(20,32,48,.12) 62%,rgba(20,32,48,0) 80%);
  transition:opacity .4s ease}

/* Text over the photo */
.svc-grid--photo .svc-card-name{color:#fff;font-size:1.6rem;line-height:1.15;padding:0;text-shadow:0 1px 12px rgba(0,0,0,.18)}
.svc-grid--photo .svc-card:has(.card-more) .svc-card-name{padding:0}
.svc-grid--photo .svc-card-desc{flex:none;color:rgba(255,255,255,.9);font-size:.88rem;line-height:1.6;max-width:none}

/* Arrow: top-right corner of the card, on a white disc */
.svc-grid--photo > .svc-card:has(.cc-img) .card-more{top:1rem;right:1rem;transform:none;background:rgba(255,255,255,.88);color:var(--ink,#233B55);opacity:.9}

/* Hover: photo zooms a little and the shade lifts slightly */
@media(hover:hover){
  .svc-grid--photo > .svc-card:has(.card-hit:hover) .cc-img-wrap::after{opacity:.85}
  .svc-grid--photo > .svc-card:has(.card-hit:hover) .cc-img{transform:scale(1.05)}
}

/* Tablets: two across, a little shorter */
@media(max-width:1100px){.svc-grid--photo > .svc-card:has(.cc-img){aspect-ratio:4/5}}
/* Phones: one across, landscape so a few fit on screen */
@media(max-width:600px){
  .svc-grid--photo > .svc-card:has(.cc-img){aspect-ratio:4/3;padding:1.25rem 1.25rem 1.35rem}
  .svc-grid--photo .svc-card-name{font-size:1.4rem}
  .svc-grid--photo > .svc-card:has(.cc-img) .card-more{top:.85rem;right:.85rem}
}
