/* Group single page (/group/{slug})
   -------------------------------------------------------------------------
   Layout, banner title and group-specific cards. Moved out of cards.css; the
   generic .card / .profile-card bases still live there. Enqueued after
   cards.css, so the re-ordered .profile-card and the .card-based group cards
   here layer on top. */

/* Group single layout.
   Mobile: a single flex column. The aside/main wrappers use display:contents so
   their cards flow directly into .group-layout, and `order` sets the required
   mobile sequence: banner, intro, events, leader/owner, membership fee,
   venues, members. (Equal `order` falls back to source order.)
   Desktop: the wrappers become real sidebar + main columns. */
.group-layout {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
}

.group-layout__aside,
.group-layout__main {
  display: contents;
}

.group-banner-card    { order: 1; }
.group-intro-card     { order: 2; }
.group-layout__members { order: 7; }
.group-detail-card,
.group-layout__aside .profile-card,
.group-fee-card       { order: 4; }
.group-venues-card    { order: 5; }
.group-layout__events { order: 3; }

@media (min-width: 62rem) {
  /* Same 1:2 split + column gap as the event single (event.css). */
  .group-layout {
    display: grid;
    grid-template-columns: var(--grid-narrow) var(--grid-wide);
    gap: var(--space-md-lg-d);
    align-items: start;
  }

  /* Wrappers become independent columns. The mobile `order`s still apply
     within each, so the aside runs type badge, leader/owner cards, events
     (shares their 4 and follows them in source order), membership fee,
     venues. */
  .group-layout__aside,
  .group-layout__main {
    display: flex;
    flex-direction: column;
    gap: var(--card-gap);
    min-width: 0;
  }

  .group-layout__events { order: 4; }
  .group-fee-card       { order: 5; }
}

/* Banner + detail cards (extend .card). */
.group-layout__main .group-banner-card {
  padding: 0;
  overflow: hidden;
}

.group-banner-card img {
  display: block;
  width: 100%;
  height: auto;
}

/* Video banner: fills the card at a fixed 16:9 (mirrors .video-text__media). */
.group-banner-video {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.group-banner-video iframe,
.group-banner-video object,
.group-banner-video embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.group-detail-card h1 {
  margin: 0;
}

.group-detail-location {
  font-weight: 700;
}

