/* ==========================================================================
   People Grid
   ========================================================================== */

/* Outer container — flex column with vertical rhythm between rows */
.jhchoi-people-grid {
  display: flex;
  flex-direction: column;
  gap: var(--global-padding);
}

/* ---- Featured row (first 2 people, always linked) ---- */

.jhchoi-people-grid__featured-row {
  display: grid;
  gap: var(--global-padding);
  grid-template-columns: 1fr 1fr;
}

/* ---- Subsequent people (flat responsive grid) ---- */

.jhchoi-people-grid__body {
  display: grid;
  gap: var(--global-padding);
  grid-template-columns: repeat(4, 1fr);
}

/* Hidden data store — panels live here until JS moves them into the modal */
.jhchoi-people-panels {
  display: none;
}

/* ---- Modal overlay ---- */

.jhchoi-people-modal {
  display: none;
  inset: 0;
  position: fixed;
  z-index: 9999;
}

.jhchoi-people-modal[aria-hidden="false"] {
  display: block;
}

.jhchoi-people-modal__backdrop {
  background: rgba(0, 0, 0, 0.6);
  inset: 0;
  position: absolute;
}

.jhchoi-people-modal__content {
  background: #FFFFFF;
  left: 50%;
  max-height: 90vh;
  overflow-y: auto;
  padding: var(--global-padding);
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
}

body.jhchoi-modal-open {
  overflow: hidden;
}

/* ---- Person card ---- */

.jhchoi-person {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  display: block;
  padding: 0;
  text-align: center;
  text-decoration: none;
  width: 100%;
}

.jhchoi-person--expandable {
  cursor: pointer;
}

.jhchoi-person__image {
  margin-bottom: 1rem;
  overflow: hidden;
  width: 100%;
}

.jhchoi-person__image img {
  display: block;
  height: auto;
  width: 100%;
}

.jhchoi-person__no-image {
  background: #e0e0e0;
  padding-bottom: 100%;
  width: 100%;
}

.jhchoi-person__name {
  color: #000000;
  font-size: var(--text-body-m);
  font-weight: 600;
  padding: 0 0 0.25rem;
}

.jhchoi-person__title,
.jhchoi-inline__title {
  color: #707070;
  font-size: var(--text-body-m);
}

/* ---- Modal panel content ---- */

.jhchoi-people-inline {
  display: none;
}

.jhchoi-people-modal__content .jhchoi-people-inline.is-active {
  display: grid;
  gap: 2rem 5rem;
  grid-template-areas: "image info";
  grid-template-columns: 1fr 3fr;
}

.jhchoi-inline__close {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  letter-spacing: 0.1em;
  padding: 0;
  position: absolute;
  right: 2rem;
  text-transform: uppercase;
  top: 2rem;
}

.jhchoi-inline__image {
  grid-area: image;
}

.jhchoi-inline__image img {
  display: block;
  height: auto;
  width: 100%;
}

.jhchoi-inline__info {
  grid-area: info;
}

.jhchoi-inline__name {
  color: #000000;
  font-size: var(--text-1);
  padding: 0 0 0.5rem;
}

.jhchoi-inline__excerpt {
  margin: 2rem 0 0;
  font-size: var(--text-body-m);
  line-height: 1.4;
}

.jhchoi-inline__excerpt p {
  margin: 0 0 0.75rem;
}

.jhchoi-inline__excerpt p:last-child {
  margin-bottom: 0;
}

/* ==========================================================================
   Tablet  (≤ 980px)
   ========================================================================== */

@media (max-width: 980px) {
  .jhchoi-people-grid__body {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==========================================================================
   Mobile  (≤ 767px)
   ========================================================================== */

@media (max-width: 767px) {
  .jhchoi-people-grid__featured-row {
    grid-template-columns: 1fr;
  }

  .jhchoi-people-grid__body {
    grid-template-columns: repeat(2, 1fr);
  }

  .jhchoi-people-modal__content .jhchoi-people-inline.is-active {
    grid-template-areas: "info";
    grid-template-columns: 1fr;
  }

  .jhchoi-people-modal__content .jhchoi-inline__image {
    display: none;
  }
}

/* ==========================================================================
   VB canvas preview overrides
   ========================================================================== */

.jhchoi-people-grid__vb-preview {
  display: flex;
  flex-direction: column;
  gap: var(--global-padding);
}

.jhchoi-people-grid__featured-row--vb {
  display: grid;
  gap: var(--global-padding);
  grid-template-columns: 1fr 1fr;
}

.jhchoi-people-grid__row--vb {
  display: grid;
  gap: var(--global-padding);
  grid-template-columns: repeat(4, 1fr);
}
