/* ========== Trainer Section ========== */
.trainer-section {
  padding: 60px 20px 80px;
  /* background: #f5f6f8; */
}

.trainer-section--alt {
  background: #fff;
}

.trainer-section__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.trainer-section__heading {
  font-family: "Noto Serif JP", "Source Han Serif JP", serif;
  font-size: 24px;
  font-weight: 600;
  background: #f0f1f5;
  color: #1f2c4d;
  padding: 10px;
  margin: 0 0 32px;
  text-align: center;
  letter-spacing: 0.05em;
}

.trainer-section__note {
  text-align: center;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 13px;
  color: #5a6678;
  margin: 0;
}

/* ========== Trainer Profile ========== */
.trainer-profile {
  background: #fff;
  /* padding: 36px; */
  display: grid;
  grid-template-columns: 280px 1fr;
  column-gap: 40px;
  row-gap: 28px;
}

.trainer-profile__media {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.trainer-profile__photo img {
  display: block;
  width: 100%;
  height: auto;
}

.trainer-profile__sns {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 12px;
}

.trainer-profile__sns a {
  display: inline-flex;
  color: #1f2c4d;
  transition: opacity 0.2s;
}

.trainer-profile__sns a:hover {
  opacity: 0.7;
}

.trainer-profile__sns svg {
  display: block;
}

.trainer-profile__body {
  min-width: 0;
}

.trainer-profile__name {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: #1f2c4d;
  margin: 0 0 12px;
  letter-spacing: 0.05em;
}

.trainer-profile__titles {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 14px;
  line-height: 1.8;
  color: #343434;
}

.trainer-profile__bio {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 13px;
  line-height: 2;
  color: #2a2a2a;
  margin: 0 0 22px;
  padding-top: 22px;
  border-top: 1px solid #e0e3eb;
}

.trainer-profile__bio p {
  margin: 0 0 14px;
}

.trainer-profile__bio p:last-child {
  margin-bottom: 0;
}

.trainer-profile__tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.trainer-profile__tags li {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #ababab;
  /* background: #eef0f4; */
  border: 1px solid #cfcfcf;
  padding: 6px 10px;
  letter-spacing: 0.05em;
}

.trainer-profile__stats {
  grid-column: 1 / -1;
  list-style: none;
  margin: 8px 0 0;
  border-top: 1px solid #e0e3eb;
  border-bottom: 1px solid #e0e3eb;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  text-align: center;
}

.trainer-profile__stats li + li {
  border-left: 1px solid #e0e3eb;
}

.trainer-profile__stat-label {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: #136db6;
  margin: 25px 0 10px;
}

.trainer-profile__stat-value {
  font-family: "Roboto", sans-serif;
  font-size: 25px;
  font-weight: 500;
  color: #343434;
  margin: 0 0 25px;
  line-height: 1;
}

.trainer-profile__stat-value span {
  font-size: 22px;
  margin-left: 2px;
  font-weight: 700;
}

/* ========== Trainer Media (実績カード) ========== */
.trainer-media {
  grid-column: 1 / -1;
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.trainer-media__item {
  background: linear-gradient(to bottom, #ffffff, #e8e7e7);
  border: 1px solid #e0e3eb;
  border-radius: 10px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  text-align: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* リンクラッパ */
.trainer-media__inner {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: inherit;
  text-decoration: none;
}
a.trainer-media__inner:hover,
a.trainer-media__inner:focus { color: inherit; text-decoration: none; }
.trainer-media__item--linked:hover {
  transform: translateY(-3px);
  border-color: #b6bcc6;
  box-shadow: 0 10px 22px rgba(15, 24, 40, 0.08);
}

.trainer-media__image {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 230px;
}

.trainer-media__image img {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.trainer-media__title {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #343434;
  margin: 0 0 8px;
  line-height: 1.8;
}

.trainer-media__title span {
  color: #343434;
  margin-right: 2px;
}

.trainer-media__title em {
  color: #136db6;
  text-decoration: underline;
  font-style: normal;
  font-weight: 600;
}

.trainer-media__desc {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 14px;
  line-height: 1.8;
  color: #343434;
  margin: 0;
}

.trainer-profile__more {
  grid-column: 1 / -1;
  margin-top: 24px;
  text-align: center;
}

.trainer-profile__more-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 280px;
  padding: 16px 32px;
  background: #1f2c4d;
  color: #fff;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: opacity 0.2s;
}

.trainer-profile__more-btn:hover {
  opacity: 0.85;
}

/* ========== Trainer Staff (専門講師カード) ========== */
.trainer-staff {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.trainer-staff__item {
  display: flex;
  flex-direction: column;
}

.trainer-staff__item[hidden] {
  display: none;
}

.trainer-staff__more {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.trainer-staff__more[hidden] {
  display: none;
}

.trainer-staff__more-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  background: #fff;
  border: 1px solid #c8ccd2;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #15181c;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.trainer-staff__more-btn:hover {
  background: #f5f6f8;
  border-color: #15181c;
}

.trainer-staff__photo {
  background: #f0f1f5;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin-bottom: 16px;
}

.trainer-staff__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trainer-staff__name {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #1f2c4d;
  margin: 0 0 12px;
  letter-spacing: 0.05em;
}

.trainer-staff__desc {
  font-family: "Noto Sans JP", sans-serif;
  font-size: 14px;
  line-height: 1.9;
  color: #2a2a2a;
  margin: 0 0 20px;
}

.trainer-staff__toggle {
  appearance: none;
  background: none;
  border: 0;
  padding: 12px 0 0;
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Noto Sans JP", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #136db6;
  cursor: pointer;
  letter-spacing: 0.05em;
  transition: opacity 0.2s;
}

.trainer-staff__toggle:hover {
  opacity: 0.7;
}

.trainer-staff__toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 16px;
  line-height: 1;
  transition: transform 0.2s;
}

.trainer-staff__toggle[aria-expanded="true"] .trainer-staff__toggle-icon {
  transform: rotate(45deg);
}

/* ========== Trainer Modal (講師メッセージ) ========== */
.trainer-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.trainer-modal[hidden] {
  display: none;
}

.trainer-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.trainer-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 28, 0.78);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  cursor: pointer;
}

.trainer-modal__viewport {
  position: relative;
  width: 92%;
  max-width: 640px;
  z-index: 1;
  overflow: hidden;
}

.trainer-modal__track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.trainer-modal__card {
  position: relative;
  flex: 0 0 100%;
  background: linear-gradient(160deg, #1f2c4d 0%, #0f1a36 100%);
  color: #f0f1f5;
  padding: 56px 48px 56px;
  font-family: "Noto Serif JP", "Source Han Serif JP", serif;
  overflow: hidden;
}

.trainer-modal__card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #136db6, #4a8eda);
}

.trainer-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color 0.2s, transform 0.2s;
  z-index: 2;
}

.trainer-modal__close:hover {
  color: #fff;
  transform: rotate(90deg);
}

.trainer-modal__label {
  position: relative;
  z-index: 2;
  font-family: "Roboto", sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.4em;
  color: #4a8eda;
  margin: 0 0 12px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  text-transform: uppercase;
}

.trainer-modal__name {
  position: relative;
  z-index: 2;
  font-family: "Noto Serif JP", "Source Han Serif JP", serif;
  font-size: 28px;
  font-weight: 600;
  color: #fff;
  margin: 0 0 12px;
  letter-spacing: 0.06em;
}

.trainer-modal__desc {
  position: relative;
  z-index: 2;
  font-size: 14px;
  line-height: 2.1;
  letter-spacing: 0.03em;
  margin: 0 0 18px;
}

.trainer-modal__message {
  position: relative;
  z-index: 2;
  font-size: 14px;
  line-height: 2.1;
  letter-spacing: 0.03em;
  max-height: 56vh;
  overflow-y: auto;
}

.trainer-modal__message p {
  margin: 0 0 16px;
}

.trainer-modal__message p:last-child {
  margin-bottom: 0;
}

.trainer-modal__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 50%;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.trainer-modal__arrow:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.4);
}

.trainer-modal__arrow--prev {
  left: 24px;
}

.trainer-modal__arrow--next {
  right: 24px;
}

.trainer-modal__dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 8px;
}

.trainer-modal__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.trainer-modal__dot:hover {
  background: rgba(255, 255, 255, 0.55);
}

.trainer-modal__dot.is-active {
  background: #fff;
  transform: scale(1.2);
}

.trainer-modal-open {
  overflow: hidden;
}

@media screen and (max-width: 768px) {
  .trainer-modal__viewport {
    width: 88%;
    max-width: 420px;
  }

  .trainer-modal__card {
    padding: 44px 28px 44px;
  }

  .trainer-modal__name {
    font-size: 22px;
    margin-bottom: 20px;
  }

  .trainer-modal__message {
    font-size: 13px;
    line-height: 1.95;
    max-height: 50vh;
  }

  .trainer-modal__arrow {
    width: 40px;
    height: 40px;
  }

  .trainer-modal__arrow--prev {
    left: 8px;
  }

  .trainer-modal__arrow--next {
    right: 8px;
  }
}

@media screen and (max-width: 768px) {
  .trainer-section {
    padding: 40px 16px 56px;
  }

  .trainer-section__heading {
    font-size: 16px;
    padding: 12px 16px;
  }

  .trainer-profile {
    grid-template-columns: 1fr;
    /* padding: 20px; */
    column-gap: 0;
    row-gap: 0;
  }

  .trainer-profile__media {
    position: relative;
  }

  .trainer-profile__sns {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    justify-content: flex-end;
    padding-right: 12px;
    z-index: 2;
  }

  .trainer-profile__sns a {
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    border-radius: 50%;
    opacity: 0.8;
  }

  .trainer-profile__name {
    font-size: 20px;
    margin-top: 8px;
  }

  .trainer-profile__stats {
    /* grid-template-columns: repeat(2, 1fr); */
    /* gap: 16px; */
    margin-bottom: 20px;
  }

  .trainer-profile__stat-value {
    font-size: 21px;
  }

  .trainer-media {
    grid-template-columns: 1fr;
  }

  .trainer-staff {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
  }
}

@media screen and (max-width: 480px) {
  .trainer-staff {
    grid-template-columns: 1fr;
  }
}
