/* ============================================================
 * team-accordion — frontend styles
 * Scope: .team-accordion (panel wrapper), .team-card (cards inside).
 * Reuses Flynt accordion-default Custom Element + theme defaults
 * for trigger / chevron / panel chrome (full-width light-blue bar
 * matching other accordions on the site, e.g. /de/abonnemente-2/).
 * Only the card grid + card typography inside the open panel are
 * styled here. Outer accordion sizing/chrome is theme-default.
 * ============================================================ */

/* Card grid inside the open panel */
.team-accordion .team-accordion__cards {
  box-sizing: border-box;
  display: grid;
  gap: 4rem 3rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  justify-content: start;
  list-style: none;
  margin: 60px auto;
  max-width: 1440px;
  padding: 0 30px;
}
@media (max-width: 959px) {
  .team-accordion .team-accordion__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3rem 2rem;
  }
}
@media (max-width: 599px) {
  .team-accordion .team-accordion__cards {
    grid-template-columns: 1fr;
    gap: 3rem 0;
  }
}

/* Card */
.team-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  max-width: 280px;
  padding: 0;
  width: 100%;
}
@media (max-width: 599px) {
  .team-card {
    margin: 0 auto;
    max-width: 320px;
  }
}

.team-card__image-wrap {
  background-color: #ebebeb;
  margin-bottom: 1.6rem;
  overflow: hidden;
  position: relative;
  width: 100%;
}
.team-card__image-wrap::before {
  content: '';
  display: block;
  padding-top: 100%;            /* aspect-ratio 1/1 fallback */
}
.team-card__image-wrap > img,
.team-card__image-wrap .team-card__image {
  height: 100%;
  left: 0;
  object-fit: cover;
  position: absolute;
  top: 0;
  width: 100%;
}

.team-card__body {
  display: flex;
  flex-direction: column;
}

/* Name — uses theme serif token (Scala) bold, matching the .accordion content "1. KONZERT | …" strong style elsewhere on the site (Scala 18px / 700). */
.team-card__name {
  color: var(--color-text, #000);
  font-family: var(--font-family-serif, "Scala", helvetica, arial, sans-serif);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 0.4rem;
}

/* Role — same serif token, regular weight, matching the body text rhythm of the site. */
.team-card__role {
  color: var(--color-text, #000);
  font-family: var(--font-family-serif, "Scala", helvetica, arial, sans-serif);
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1.4;
  margin: 0 0 1.6rem;
}

/* Contact lines (phone, email, detail link) — keep the Graphik sans-serif styling
   from before; this is a deliberate visual contrast with the serif name/role. */
.team-card__phone,
.team-card__email,
.team-card__detail {
  font-family: var(--font-family-serif, "Scala", helvetica, arial, sans-serif);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.5;
  margin: 0;
}

/* Same vertical rhythm before the detail link as before the phone (= 1.6rem). */
.team-card__detail {
  margin-top: 1.6rem;
}

.team-card__phone a,
.team-card__email a,
.team-card__detail a,
.team-card__detail-link {
  color: #000;
  text-decoration: none;
  word-break: break-all;        /* long emails wrap inside narrow card column */
}
.team-card__phone a:hover,
.team-card__email a:hover,
.team-card__detail a:hover,
.team-card__detail-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Uppercase trigger titles to match the visual pattern of other
   accordions on the site (e.g. abonnement panels). Term names stay
   mixed-case in the DB for editorial readability in the WP admin. */
.team-accordion .accordion-default__title {
  text-transform: uppercase;
}

/* When a trigger is rendered with aria-expanded="true" (i.e. the first panel
   when first_open=1), reveal its adjacent panel-content. The theme CSS sets
   .accordion-default__panel-content { display: none } as default and only
   flips it via jQuery slideDown() on click — which means a server-rendered
   open panel stays hidden until the user clicks. This rule fixes the
   initial-render state, scoped to .team-accordion so it only affects our
   accordion. */
.team-accordion .accordion-default__panel-trigger[aria-expanded='true'] + .accordion-default__panel-content {
  display: block;
}
