/* ===== COMPANY PAGE ===== */

/* page-hero keywords（repair.cssと同パターン） */
.page-hero__keywords {
  position: absolute;
  left: min(calc(max(24px, (100vw - 1144px) / 2) + 965px), calc(100vw - 80px));
  top: calc(140px + env(safe-area-inset-top) + 56px + 30px);
  z-index: 1;
  opacity: 0;
  transition: opacity .6s ease .8s;
}
.page-hero.is-loaded .page-hero__keywords {
  opacity: 1;
}
.page-hero__keywords a {
  font-family: 'M PLUS 1p', sans-serif;
  font-weight: 500;
  font-size: 18px;
  letter-spacing: .1em;
  color: var(--orange);
  line-height: 1.7;
  text-align: left;
  display: block;
  white-space: nowrap;
  text-decoration: none;
  transition: opacity .2s;
}
.page-hero__keywords a:hover { opacity: .7; }

/* page-hero intro heading（repair.cssと同パターン） */
.page-hero__intro .page-hero__intro-heading {
  font-family: 'M PLUS 2', sans-serif;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.6;
  color: #000;
  margin-bottom: 24px;
}

/* ===== コンテンツ共通ラッパー ===== */
.company-content {
  background: var(--bg);
  padding-bottom: 0;
}

/* ===== セクションタイトル（style.css の .section-title を流用） ===== */
.company-block .section-title,
.store-block .section-title {
  margin-bottom: 48px;
  width: 100%;
}
.company-block__inner .section-title__line,
.store-block__inner .section-title__line {
  width: 100%;
}

/* ===== 企業情報ブロック ===== */
.company-block {
  padding: 80px 0 80px;
}
.company-block__inner {
  padding: 0 max(40px, calc((100% - 1300px) / 2));
}

/* 写真 + テーブル横並び */
.company-info {
  display: flex;
  gap: 36px;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .65s ease .1s, transform .65s ease .1s;
}
.company-info.is-inview {
  opacity: 1;
  transform: translateY(0);
}
.company-info__photo {
  flex-shrink: 0;
  width: 470px;
  height: 351px;
  overflow: hidden;
}
.company-info__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.company-info__table-wrap {
  flex: 1;
  min-width: 0;
}

/* ===== 共通テーブル（企業情報・店舗情報） ===== */
.company-table {
  width: 100%;
  border-collapse: collapse;
}
.company-table tr {
  border-bottom: 1px solid var(--orange);
}
.company-table tr:first-child {
  border-top: 1px solid var(--orange);
}
.company-table th,
.company-table td {
  font-family: 'Noto Sans JP', sans-serif;
  padding: 10px 8px;
  line-height: 1.7;
  text-align: left;
  vertical-align: middle;
}
.company-table th {
  font-weight: 700;
  font-size: 18px;
  color: #000;
  white-space: nowrap;
  width: 190px;
  padding-right: 16px;
}
.company-table td {
  font-weight: 500;
  font-size: 17px;
  color: #000;
}

/* ===== 沿革ブロック ===== */
.history-block {
  position: relative;
  padding-top: 58px;
}
.history-block .services__title-bar {
  min-width: 220px;
  text-align: center;
}

/* オレンジ背景エリア */
.history-block__inner {
  background: var(--orange);
  padding: 60px max(40px, calc((100% - 1300px) / 2));
}

/* 白丸角カード */
.history-card {
  background: var(--white);
  border-radius: 40px;
  padding: 48px 48px;
  width: 1077px;
  max-width: calc(100% - 48px);
  margin: 0 auto;
}

/* タイムライン */
.history-timeline {
  display: flex;
  flex-direction: column;
  position: relative;
}

.history-row {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 18px 0;
  position: relative;
}

.history-row__year {
  font-family: 'M PLUS 2', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #000;
  white-space: nowrap;
  width: 110px;
  flex-shrink: 0;
  text-align: center;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .4s ease, transform .4s ease;
}
.history-row__year.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.history-row__dot {
  width: 14px;
  height: 14px;
  background: var(--orange);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .35s ease, transform .35s ease;
}
.history-row__dot.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.history-row__text {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  font-size: 16px;
  color: #000;
  line-height: 1.6;
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .4s ease, transform .4s ease;
}
.history-row__text.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* 縦線（JSで位置・高さをセット） */
.history-timeline__vline {
  position: absolute;
  left: 0; /* JSで上書き */
  top: 0;  /* JSで上書き */
  width: 2px;
  height: 0;
  background: var(--orange);
  z-index: 1;
  transform-origin: top center;
  transform: scaleY(0);
  transition: transform 0.75s cubic-bezier(.4,0,.2,1);
}
.history-timeline__vline.is-animated {
  transform: scaleY(1);
}

/* ===== 店舗情報ブロック ===== */
.store-block {
  padding: 80px 0;
}
.store-block__inner {
  padding: 0 max(40px, calc((100% - 1300px) / 2));
  margin-bottom: 48px;
}

/* 白カード全体 */
.store-white-card + .store-white-card {
  margin-top: 48px;
}
.store-white-card {
  background: var(--white);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 64px), calc(100% - 44px) 100%, 0 100%);
  padding: 60px 56px 36px;
  width: 1144px;
  max-width: calc(100% - 48px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 36px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .65s ease .1s, transform .65s ease .1s;
}
.store-white-card.is-inview {
  opacity: 1;
  transform: translateY(0);
}

/* 店舗情報（写真＋テーブル） */
.store-info {
  display: flex;
  gap: 36px;
  align-items: flex-start;
}
.store-info__photo {
  flex-shrink: 0;
  width: 470px;
  height: 351px;
  overflow: hidden;
}
.store-info__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.store-info__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.store-info__name {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  font-size: 38px;
  color: #000;
  line-height: 1.3;
}
.store-info__name-line {
  height: 2px;
  background: var(--orange);
  margin: 6px 0 8px;
}
.store-info__address-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}
.store-info__address,
.store-info__tel {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 500;
  font-size: 17px;
  color: #000;
  line-height: 1.7;
}
.store-table tr {
  border-bottom: none;
}
.store-table th,
.store-table td {
  font-size: 16px;
}

/* ===== スタッフ紹介 ===== */
.staff-section__title {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
}
.staff-section__label {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: var(--orange);
  white-space: nowrap;
}
.staff-section__line {
  flex: 1;
  height: 2px;
  background: var(--orange);
}

/* スタッフグリッド（2列×2行） */
.staff-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px 56px;
}
.staff-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}
.staff-card__photo {
  flex-shrink: 0;
  width: 200px;
  height: 210px;
  background: #d9d9d9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.staff-card__photo span {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 16px;
  color: #fff;
  letter-spacing: .4em;
}
.staff-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 0;
}
.staff-card__name {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: #000;
  line-height: 1.6;
}
.staff-card__text {
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 400;
  font-size: 16px;
  color: #000;
  line-height: 1.9;
}

/* ===== 1100px以下 ===== */
@media (max-width: 1100px) {
  .company-block { padding-top: 30px; }
  .page-hero__keywords { display: none; }
  .company-info__photo,
  .store-info__photo { width: 42%; height: auto; aspect-ratio: 4/3; }
  .section-title__text { font-size: 36px; }
  .history-row__text { font-size: 19px; }
  .history-card { padding: 36px 36px; }
}

/* ===== 900px以下 ===== */
@media (max-width: 900px) {
  .page-hero__keywords { display: none; }

  .company-block { padding: 30px 0 30px; }
  .company-block__inner,
  .store-block__inner { padding: 0 24px; gap: 40px; }
  .store-block { padding: 60px 0 30px; }

  .section-title { margin-bottom: 36px; }
  .section-title__text { font-size: 28px; letter-spacing: .15em; }

  .company-info,
  .store-info { flex-direction: column; gap: 10px; }
  .company-info__table-wrap,
  .store-info__body { width: 100%; }
  .company-info__photo,
  .store-info__photo { width: 100%; height: 240px; aspect-ratio: unset; }

  .company-table th { font-size: 16px; width: 130px; }
  .company-table td { font-size: 14px; text-align: right; }
  .store-table th { font-size: 16px; }
  .store-table td { font-size: 14px; text-align: right; }

  .history-block__inner { padding: 40px 0 60px; margin-top: -20px; }
  .history-card { width: calc(100% - 32px); padding: 24px 16px; border-radius: 30px; }
  .history-row { gap: 20px; padding: 14px 0; }
  .history-row__year { font-size: 16px; width: 80px; }
  .history-row__text { font-size: 14px; }

  .store-white-card { padding: 36px 28px; gap: 48px; }
  .store-info__name { font-size: 28px; }

  .staff-grid { grid-template-columns: 1fr; gap: 32px; }
  .staff-card__photo { width: 160px; height: 170px; }
  .staff-card__name { font-size: 16px; }
  .staff-card__text { font-size: 14px; }
}

/* ===== 500px以下 ===== */
@media (max-width: 500px) {
  .section-title__text { font-size: 24px; }
  .company-table tr { display: flex; flex-direction: column; }
  .company-table th { width: 100%; padding-right: 8px; padding-bottom: 4px; font-size: 15px; }
  .company-table td { text-align: left; font-size: 14px; padding-top: 0; }
  .history-row { flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 0 14px 30px; position: relative; }
  .history-row__dot { position: absolute; left: 0; top: 20px; }
  .history-row__year { width: auto; text-align: left; font-size: 14px; }
  .history-row__text { font-size: 13px; }
  .staff-card { flex-direction: column; }
  .staff-card__photo { width: 100%; height: 200px; }
  .store-white-card { padding: 36px 16px; max-width: calc(100% - 24px); }
}
