/* Additions for pages rendered by the content manager (cms/). Loaded after styles.css. */

/* Hero cards: room for up to four rostered colleagues around the featured still. */
.hero-colleague:nth-child(2):not(:last-child) { top:auto; bottom:85px; transform:rotate(3deg); }
.hero-colleague:nth-child(3) { left:auto; right:-7%; top:28%; bottom:auto; transform:rotate(4deg); }
.hero-colleague:nth-child(4) { left:auto; right:-4%; top:auto; bottom:20px; transform:rotate(-3deg); }
.hero-colleague:nth-child(n+3):hover { transform:translateY(-6px) rotate(0deg); }
@media (max-width: 520px) {
  .hero-colleague:nth-child(3) { right:-3%; }
  .hero-colleague:nth-child(4) { right:-1%; bottom:10px; }
}

/* Featured staff without a video: still image behind the hero. */
.hero-bg img { width:100%; height:100%; object-fit:cover; object-position:center 30%; filter:saturate(1.1); }

/* Opening hours may list several lines. */
.hours span + span { margin-top:2px; }

.cms-bio { max-width:46ch; color:var(--cream); }
.cms-empty-team { padding:40px 0; }
.cms-price-call { font-size:clamp(1.8rem, 3.5vw, 2.6rem) !important; }
.profile-photo > img { display:block; width:100%; height:100%; object-fit:cover; object-position:top center; }
.profile-photos .gallery-grid { margin-top:24px; }
@media (max-width: 760px) {
  .profile-photos .gallery-grid { grid-template-columns:1fr 1fr; grid-auto-rows:220px; }
  .profile-photos .gallery-button { grid-column:span 1 !important; grid-row:span 1 !important; }
}

.cms-preview-banner { position:sticky; z-index:130; top:0; padding:10px 16px; color:#050505; background:var(--gold); font-weight:600; text-align:center; }

/* ---------- 9:16 media frames: every photo and video on the site is portrait 9:16 ---------- */
.featured-still { aspect-ratio: 9 / 16; }
.staff-card__image { aspect-ratio: 9 / 16; }
.video-gallery video { aspect-ratio: 9 / 16; max-height: 760px; object-fit: cover; }
.video-gallery { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.video-gallery:has(> :only-child) { grid-template-columns: minmax(0, 420px); }
.profile-video { aspect-ratio: 9 / 16; object-fit: cover; }
.profile-photos .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); grid-auto-rows: auto; }
.profile-photos .gallery-button { aspect-ratio: 9 / 16; grid-column: auto !important; grid-row: auto !important; }
@media (max-width: 760px) {
  .profile-photos .gallery-grid { grid-template-columns: 1fr 1fr; }
}
