/*
 * Team — HTML replica of the theme's Executive Team section.
 * All values are cloned from child-page/other/style.css (.member and
 * .member-modal blocks) so the output is pixel-identical to the original.
 */

.hibot-team {
  padding: 7rem 10.8rem 4rem;
}

/* Editors viewing the unpublished working copy get a visible marker. */
.hibot-team.is-preview {
  position: relative;
  outline: 2px dashed rgba(255, 82, 28, 0.6);
  outline-offset: -0.5rem;
}

.hibot-team.is-preview::after {
  content: "PREVIEW — unpublished state";
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #ff521c;
  color: #fff;
  font-size: 1.2rem;
  padding: 0.4rem 0.8rem;
  z-index: 5;
}

@media (max-width: 767px) {
  .hibot-team {
    padding: 4rem 2rem;
  }
}

.hibot-team h2 {
  border-left: 0.4rem solid #ff521c;
  color: white;
  font-weight: 400;
  font-size: 3rem;
  padding-left: 1.3rem;
  margin-bottom: 2rem;
}

@media (max-width: 767px) {
  .hibot-team h2 {
    font-size: 2rem;
    padding-left: 0.7rem;
  }
}

.hibot-team h3 {
  font-size: 2rem;
  font-weight: 400;
  margin-top: 2rem;
  margin-bottom: 2rem;
  color: white;
}

/* The original English section carries the theme's .en-sec class, whose
   ".en-sec *" rule sets Roboto Slab on every text (cards, headings, modal
   bios). Mirror it; the Japanese section inherits the global gothic font,
   as the original does. */
.hibot-team--en,
.hibot-team--en * {
  font-family: "Roboto Slab", sans-serif;
}

.hibot-team__grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hibot-team__card {
  width: 24%;
  margin-right: 1.33333%;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .hibot-team__card:nth-child(4n) {
    margin-right: 0;
  }
}

/* Text-only cards (members without a photo) — li.noimg in the original. */
.hibot-team__card.is-noimg {
  width: auto;
  margin-right: 4rem;
}

@media (max-width: 767px) {
  .hibot-team__card {
    width: 49%;
    margin-right: 2%;
  }

  .hibot-team__card:nth-child(2n) {
    margin-right: 0;
  }
}

.hibot-team__more {
  display: block;
  text-decoration: none;
  cursor: pointer;
}

/* Members without a bio are not clickable — a.deactive in the original. */
.hibot-team__more.is-static {
  pointer-events: none;
}

.hibot-team__img-wrapper {
  position: relative;
}

.hibot-team__thumb {
  width: 100%;
  height: 30rem;
  object-fit: cover;
  object-position: center top;
}

@media (max-width: 767px) {
  .hibot-team__thumb {
    height: 16rem;
  }
}

.hibot-team__plus {
  width: 4.7rem;
  position: absolute;
  right: 2rem;
  bottom: 2rem;
}

@media (max-width: 767px) {
  .hibot-team__plus {
    width: 3rem;
    right: 1rem;
    bottom: 1rem;
  }
}

.hibot-team__txt-wrapper {
  padding-top: 0.4rem;
}

.hibot-team__card p {
  color: white;
  line-height: normal;
  font-weight: 400;
  font-size: 1.3rem;
  margin: 0;
}

/* ---------------------------------------------------------------------------
 * Popup — clone of .member-modal #modal_area. Opened/closed by team.js via
 * the is-open (display) and is-visible (fade) classes.
 * ------------------------------------------------------------------------- */

.hibot-team__overlay {
  background-color: rgba(39, 58, 72, 0.7);
  width: 100%;
  height: 100%;
  position: fixed;
  z-index: 100;
  top: 0;
  left: 0;
  display: none;
  backdrop-filter: blur(1px);
  opacity: 0;
  transition: opacity 0.3s;
}

.hibot-team__overlay.is-open {
  display: block;
}

.hibot-team__overlay.is-visible {
  opacity: 1;
}

.hibot-team__modal {
  position: absolute;
  margin: 0 auto;
  display: none;
  z-index: 2;
  background-color: #37414f;
  top: 10rem;
  left: calc(50% - 38rem);
  width: 76rem;
  height: calc(100% - 20rem);
  overflow: auto;
  padding: 10rem 3.6rem 8.4rem 7.7rem;
  /* Long bios scroll without showing the system scrollbar (wheel, trackpad
     and touch still work) — improvement over the original's overflow:scroll. */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hibot-team__modal::-webkit-scrollbar {
  display: none;
}

.hibot-team__modal.is-open {
  display: block;
}

@media (max-width: 767px) {
  .hibot-team__modal {
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    width: 90%;
    height: auto;
    max-height: 90%;
    padding: 3rem 2rem;
  }
}

.hibot-team__close {
  width: 3.4rem;
  position: absolute;
  right: 4rem;
  top: 4rem;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.hibot-team__close img {
  width: 100%;
  display: block;
}

@media (max-width: 767px) {
  .hibot-team__close {
    width: 2.4rem;
    right: 0.2rem;
    top: 0.2rem;
  }
}

.hibot-team__modal-inner {
  display: flex;
}

@media (max-width: 767px) {
  .hibot-team__modal-inner {
    flex-direction: column;
  }
}

.hibot-team__modal-img {
  width: 45%;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .hibot-team__modal-img {
    width: 100%;
  }
}

.hibot-team__modal-img img {
  width: 100%;
  aspect-ratio: 289/371;
  object-fit: cover;
  object-position: top center;
}

.hibot-team__modal-txt {
  padding-left: 1.5rem;
}

@media (max-width: 767px) {
  .hibot-team__modal-txt {
    width: 100%;
    padding-left: 0;
    padding-top: 1rem;
  }
}

.hibot-team__ttl p {
  color: white;
  font-size: 1.3rem;
  font-weight: 400;
  line-height: normal;
  margin: 0;
}

.hibot-team__desc {
  font-size: 1.2rem;
  color: white;
  line-height: normal;
  margin: 0;
}
