/* ==========================================================================
   事業内容 (page-service) — 
   ========================================================================== */

.service {
  max-width: var(--canvas-width);
  margin-inline: auto;
  background: var(--color-bg-surface);
  box-shadow: 0 0 0 100vmax var(--color-bg-surface);
  clip-path: inset(0 -100vmax);
  padding: var(--space-16);
}

.service__inner {
  max-width: 1280px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-16);
}

/* 見出し「手掛けている事業」 */
.service__heading {
  margin: 0;
  padding-inline: var(--space-6);
  font-family: var(--font-heading);
  font-weight: var(--fw-heading-light);
  font-size: var(--fs-headline-md);
  line-height: 2.2;
  letter-spacing: 0.13em;
  color: var(--color-text-default);
}

/* ロゴカード + 本文の行 */
.service__row {
  display: flex;
  gap: var(--space-8);
  align-items: center;
  justify-content: center;
}

/* 左: ロゴを収めた白カード */
.service__visual {
  flex: 0 0 581px;
  max-width: 581px;
  background: var(--color-bg-surface);
  border-radius: var(--radius-sm);
  padding: 62px var(--space-16);
}

.service__logo {
  display: block;
  width: 100%;
  height: auto;
}

/* 右: 本文ブロック */
.service__body {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  justify-content: center;
}

.service__title {
  margin: 0;
  font-family: var(--font-base);
  font-weight: var(--fw-heading);
  font-size: 20px;
  line-height: 2.2;
  letter-spacing: 0.06em;
  color: var(--color-text-default);
}

.service__desc {
  margin: var(--space-3) 0 0;
  font-family: var(--font-base);
  font-weight: var(--fw-heading);
  font-size: var(--fs-body-md);
  line-height: 28px;
  letter-spacing: 0.125em;
  color: var(--color-text-subtle);
}

.service__link {
  margin: var(--space-2) 0 0;
  padding-right: var(--space-8);
  text-align: right;
}

.service__link a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-base);
  font-weight: var(--fw-heading);
  font-size: var(--fs-body-md);
  line-height: 20px;
  letter-spacing: 0.125em;
  color: var(--color-text-brand);
  text-decoration: underline;
}

.service__link-icon {
  flex: 0 0 auto;
}

@media (max-width: 768px) {

  /* Figma [Mobile] ServiceSection 2874:20684 — px20 py40, inner gap24, w335 */
  .service {
    padding: var(--space-8) var(--space-5);
  }

  .service__inner {
    gap: var(--space-6);
  }

  /* 見出し「手掛けている事業」: 16px / 2.2 / 0.06em / left */
  .service__heading {
    padding-inline: 0;
    font-size: var(--fs-body-md);
    line-height: 2.2;
    letter-spacing: 0.06em;
  }

  /* ロゴカード(上) → 本文(下) の縦積み, gap24 */
  .service__row {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-6);
  }

  /* 左→上: フラットなロゴカード(高さ141px, shadow無し) */
  .service__visual {
    flex-basis: auto;
    width: 100%;
    max-width: none;
    height: 141px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 var(--space-5);
    box-shadow: none;
  }

  .service__logo {
    width: auto;
    max-width: 296px;
    height: auto;
  }

  /* 右→下: 本文ブロック, text-block と link の間 gap32 */
  .service__body {
    flex: 1 1 auto;
    gap: var(--space-8);
    justify-content: flex-start;
  }

  /* タイトル: 16px / 1.8 / 0.06em */
  .service__title {
    font-size: var(--fs-body-md);
    line-height: 1.8;
    letter-spacing: 0.06em;
  }

  /* 本文: 14px / 24px / 2px, タイトルとの間隔 12px */
  .service__desc {
    margin-top: var(--space-3);
    font-size: var(--fs-body-sm);
    line-height: 24px;
    letter-spacing: 2px;
  }

  /* リンク: 右寄せ, 12px / 2px, 上余白8px */
  .service__link {
    margin-top: 0;
    padding-top: var(--space-2);
    padding-right: 0;
  }

  .service__link a {
    font-size: var(--fs-label-md);
    line-height: 16px;
    letter-spacing: 2px;
  }
}

/* --- 主語は建設業界 への誘導(弊社の特色ページ .philosophy-cta と同一) ----- */
.service-cta {
  display: flex;
  flex-direction: column;
  padding-top: var(--space-16);
  background: var(--color-bg-surface);
  box-shadow: 0 0 0 100vmax var(--color-bg-surface);
  clip-path: inset(0 -100vmax);
  overflow: hidden;
}

.service-cta__img {
  width: 100%;
  height: 740px;
  margin-top: 1em;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.service-cta__box {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 190px;
  padding: var(--space-8) var(--space-8) var(--space-8) 0;
  text-align: right;
  /* 見出し「主語は建設業界」+ ボタンをクリック領域に。文字幅に切り詰めて右寄せ。 */
  align-self: flex-end;
  text-decoration: none;
  color: inherit;
}

/* ホバーで薄くせず濃く保つ(グローバル a:hover{opacity:.7} を打ち消し) */
.service-cta__box:hover {
  opacity: 1;
}

.service-cta__heading {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: var(--fw-heading-light);
  font-size: 28px;
  line-height: 2.2;
  letter-spacing: 0.06em;
  color: var(--color-text-default);
}

.service-cta__button {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  color: var(--color-text-brand);
  /* 矢印付き遷移リンクは緑で統一 */
  letter-spacing: var(--tracking-wide);
}

@media (max-width: 768px) {
  .service-cta {
    gap: 0;
    padding: 0;
  }

  .service-cta__img {
    height: 186px;
  }

  .service-cta__box {
    width: 100%;
    flex-direction: row;
    align-items: stretch;
    padding-left: 0;
  }

  .service-cta__heading {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8) var(--space-5);
    text-align: center;
    font-size: 12px;
  }

  .service-cta__button {
    flex: 1 1 0;
    min-width: 0;
    padding: var(--space-5) var(--space-3);
    font-size: 12px;
  }
}