/* ============================================================
   PROFILE MEMBER DETAIL — profile-member.css
   ============================================================ */

/* ------------------------------------------------------------
   Member Detail Section
   ------------------------------------------------------------ */
.member-detail-section {
  position: relative;
  z-index: 1;
}

.member-detail {
  display: flex;
  gap: 52px;
  align-items: flex-start;
}

.member-detail-photo {
  flex: 0 0 340px;
  width: 340px;
}

.member-detail-photo img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* ------------------------------------------------------------
   v8.4.18: メンバー詳細 写真ギャラリー (最大5枚)
   .member-detail-photo-main は <img> を重ねて active のみ表示
   .member-detail-thumbs はサムネイル列、クリックで切り替え
   ------------------------------------------------------------ */
.member-detail-photo-main {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 4px;
  background: #fafafa;
}
.member-detail-main-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.member-detail-main-img.is-active {
  opacity: 1;
  pointer-events: auto;
  position: relative;       /* 1枚目を高さの基準にする */
}
.member-detail-photo:not(.has-thumbs) .member-detail-photo-main {
  aspect-ratio: auto;       /* 1枚だけの時は元のアスペクトに */
}
.member-detail-photo:not(.has-thumbs) .member-detail-main-img {
  position: static;
  height: auto;
  object-fit: initial;
}

.member-detail-thumbs {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.member-detail-thumbs li {
  margin: 0;
  flex: 0 0 auto;
  width: calc((100% - 24px) / 5);  /* 5列、間隔6×4 = 24 */
  max-width: 64px;
}
.member-detail-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 4px;
  background: none;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}
.member-detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}
.member-detail-thumb:hover {
  border-color: #f9a8c5;
}
.member-detail-thumb.is-active {
  border-color: #fe67a2;
}
.member-detail-thumb.is-active img {
  opacity: 1;
}

.member-detail-info {
  flex: 1;
  min-width: 0;
  padding-top: 12px;
}

/* ------------------------------------------------------------
   Member Name
   ------------------------------------------------------------ */
.member-detail-name {
  margin-bottom: 32px;
  padding-bottom: 20px;
}

.member-detail-name-kanji {
  font-size: 2.2rem;
  font-weight: 500;
  color: var(--text-dark);
  letter-spacing: 0.1em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.member-detail-name-ruby {
  font-size: 0.88rem;
  color: var(--text-gray);
  letter-spacing: 0.06em;
}

/* ------------------------------------------------------------
   Profile Table
   ------------------------------------------------------------ */
.member-profile-table {
  width: 100%;
}

.member-profile-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 11px 0;
}

.member-profile-row dt {
  flex: 0 0 100px;
  font-size: 0.8rem;
  color: #999293;
  letter-spacing: 0.04em;
  line-height: 1.65;
}

.member-profile-row dd {
  flex: 1;
  min-width: 0;
  font-size: 0.88rem;
  color: var(--text-dark);
  line-height: 1.65;
}

/* ------------------------------------------------------------
   Other Member Section
   ------------------------------------------------------------ */
.other-member-title {
  font-family: 'minion-variable-concept', 'Minion Variable Concept', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #8E7173;
  text-align: center;
  letter-spacing: 0.08em;
  margin-bottom: 40px;
  border-top: 1px solid #f0dcea;
  padding-top: 120px;
}

/* ------------------------------------------------------------
   Responsive — PC (≥768px)
   ------------------------------------------------------------ */
@media (min-width: 768px) {
  .page-hero {
    overflow: visible;
    background: none;
  }

  .page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 500px;
    background-image: url('../img/bg_pc.webp');
    background-size: 1400px 500px;
    background-repeat: repeat-x;
    background-position: top center;
    z-index: 0;
  }

  .member-detail {
    gap: 60px;
  }

  .member-detail-photo {
    flex: 0 0 360px;
    width: 360px;
  }

  .member-detail-name-kanji {
    font-size: 2.4rem;
  }

  .other-member-title {
    font-size: 1.8rem;
    margin-bottom: 48px;
  }
}

/* ------------------------------------------------------------
   Responsive — SP (≤767px)
   ------------------------------------------------------------ */
@media (max-width: 767px) {
  .member-detail {
    flex-direction: column;
    align-items: center;
    gap: 28px;
  }

  .member-detail-photo {
    flex: none;
    width: 220px;
    max-width: 65%;
  }

  .member-detail-info {
    width: 100%;
    padding-top: 0;
  }

  .member-detail-name {
    margin-bottom: 24px;
    padding-bottom: 16px;
    text-align: center;
  }

  .member-detail-name-kanji {
    font-size: 1.7rem;
  }

  .member-detail-name-ruby {
    font-size: 0.82rem;
  }

  .member-profile-row {
    padding: 9px 0;
    gap: 12px;
  }

  .member-profile-row dt {
    flex: 0 0 88px;
    font-size: 0.76rem;
  }

  .member-profile-row dd {
    font-size: 0.82rem;
  }

  .other-member-title {
    padding-top: 48px;
    margin-bottom: 28px;
  }
}
