/* ==== COMPANY (/company/) ==== */

/* ページ別ヒーロー背景 */
.p-page-hero--company {
  background-image: url("../img/company/hero_pc.jpg");
}

@media (max-width: 767px) {
  .p-page-hero--company {
    background-image: url("../img/company/hero_sp.jpg");
  }
}

.p-company-info {
  /* background は l-hero-overlap::before が担当 */
  padding: 0 var(--gutter) var(--section-pad);
}

.p-company-info__card {
  /* c-card c-card--narrow で共通化 */
}

#history-heading {
  margin-bottom: 40px;
}

.p-company-info__dl {
  display: block;
  max-width: 500px;
  margin: 0 auto;
}

.p-company-info__row {
  display: flex;
  flex-direction: row;
  gap: 48px;
  padding: 15px 0;
  align-items: flex-start;
}

.p-company-info__row:last-child {
  border-bottom: 0;
}

.p-company-info__row dt {
  flex: 0 0 60px;
  font-size: 1.4rem;
  color: var(--c-text);
  text-align: justify;
  text-align-last: justify;
  line-height: 1.9;
}

.p-company-info__row dd {
  flex: 1;
  font-size: 1.4rem;
  line-height: 1.9;
}

.p-company-info__members {
  border-collapse: collapse;
}

.p-company-info__members td {
  /* 個別スタイルなし — 共通の td で対応 */
}

.p-company-info__members td:first-child {
  padding-right: 2em;
  white-space: nowrap;
}

@media (max-width: 767px) {
  #history-heading {
    margin-bottom: 20px;
  }
  .p-company-info__row {
    flex-direction: row;
    gap: 5%;
    padding: 16px 0;
    align-items: initial;
  }
  .p-company-info__row dt {
    flex: 0 0 4.5em;
  }
  .p-company-info__row dd {
    flex: initial;
  }
  .p-company-info__members td:first-child {
    padding-right: 1em;
  }
}

/* HISTORY */
.p-company-history {
  background-color: var(--c-bg-section);
  padding: 0 var(--gutter) var(--section-pad);
}

.p-company-history__inner {
  max-width: var(--content-inner-w);
  margin: 0 auto;
  text-align: center;
}

.p-company-history__lead {
  font-size: 2rem;
  line-height: calc(45/20);
  margin-bottom: 80px;
}

.p-company-history__timeline {
  position: relative;
  text-align: left;
  max-width: 610px;
  margin: 0 auto;
}

/* 縦線: 最後のアイテム以外に表示 */
.p-company-history__item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: calc(100px - 60px);
  top: 0;
  bottom: -48px;
  width: 2px;
  background-color: var(--c-primary);
  opacity: .4;
}

.p-company-history__item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 80px;
  margin-bottom: 48px;
  position: relative;
}

.p-company-history__item:last-child {
  margin-bottom: 0;
}

.p-company-history__year {
  font-family: var(--ff-serif-en);
  font-size: 2rem;
  line-height: 1;
  letter-spacing: .1em;
  color: #fff;
  background-color: var(--c-primary);
  text-align: center;
  padding: 6px 8px;
  height: fit-content;
  position: relative;
}

/* 年号の右に横向き破線 */
.p-company-history__year::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 110%;
  width: 55px;
  height: 0;
  border-top: 1px dashed var(--c-primary);
  opacity: .4;
}

.p-company-history__title {
  font-family: var(--ff-mincho);
  font-weight: 500;
  font-size: 2rem;
  line-height: 1.4;
  color: var(--c-primary);
  margin-bottom: 8px;
}

.p-company-history__body p {
  font-size: 1.4rem;
  line-height: 2;
  letter-spacing: 0.1em;
}

@media (max-width: 767px) {
  .p-company-history__lead {
    font-size: 1.4rem;
    margin-bottom: 48px;
  }
  .p-company-history__timeline {
    max-width: none;
    margin: 0;
  }
  .p-company-history__item:not(:last-child)::before {
    left: 32px;
    bottom: -32px;
  }
  .p-company-history__item {
    grid-template-columns: 64px 1fr;
    gap: 40px;
    margin-bottom: 32px;
  }
  .p-company-history__year {
    font-size: 1.2rem;
    padding: 4px 4px;
  }
  .p-company-history__year::after {
    left: 102%;
    width: 30px;
  }
  .p-company-history__title {
    font-size: 1.6rem;
  }
}
