/* ==========================================================================
   Meihou Theme — business.css (事業案内 / PC)
   Design width: 1280
   ========================================================================== */

/* sticky 追従のため、祖先の overflow:hidden を解除（common .l-main） */
.page-template-page-business .l-main {
  overflow: visible;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.p-business-hero {
  width: var(--width-page);
  max-width: 100%;
  margin: 0 auto;
  padding: 0 var(--side);
  box-sizing: border-box;
}

.p-business-hero .c-breadcrumb {
  margin: 0 0 98px;
  padding: 0;
}

.p-business-hero__title {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--color-blue-accent);
}

.p-business-hero__en {
  margin-top: 8px;
  font-size: 13px;
  color: var(--color-text-soft);
}

.p-business-hero__intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  margin-top: 100px;
}

.p-business-hero__catch {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-text);
}

.p-business-hero__lead {
  max-width: 420px;
  font-size: 14px;
  line-height: 2;
  color: var(--color-text);
}

.p-business-hero__media {
  margin-top: 40px;
  overflow: hidden;
  border-radius: 10px;
}

.p-business-hero__media img {
  display: block;
  width: 100%;
  height: 500px;
  object-fit: cover;
}

/* --------------------------------------------------------------------------
   Body layout (sidebar + content)
   -------------------------------------------------------------------------- */

.p-business-body {
  margin-top: 100px;
  padding: 90px 0 80px;
  background: var(--color-bg-soft);
}

.p-business-body__inner {
  display: grid;
  grid-template-columns: 200px minmax(0, 800px);
  gap: 80px;
  width: var(--width-page);
  max-width: 100%;
  margin: 0 auto;
  padding: 0 var(--side);
  box-sizing: border-box;
  /* stretch: 左カラムをセクション高までに伸ばし、sticky の追従域を確保 */
  align-items: stretch;
}

.p-business-main {
  min-width: 0;
  max-width: 100%;
}

.p-business-nav-col {
  min-width: 0;
  /* グリッド行の高さいっぱいにし、sticky の可動域を確保 */
  height: 100%;
}

.p-business-nav {
  position: sticky;
  top: 40px;
  z-index: 10;
}

.p-business-nav__title {
  margin-bottom: 24px;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text);
}

.p-business-nav__list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.p-business-nav__list a {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--color-text);
  padding-bottom: 8px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.p-business-nav__list a:hover {
  color: var(--color-blue-accent);
}

/* 閲覧中: 文言幅の紺色アンダーライン */
.p-business-nav__list a.is-active {
  border-bottom-color: var(--color-blue-accent);
}

.p-business-nav__num {
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Business sections
   -------------------------------------------------------------------------- */

.p-business-section {
  min-width: 0;
  max-width: 100%;
  padding-bottom: 100px;
  margin-bottom: 100px;
  border-bottom: 1px solid var(--color-line);
  box-sizing: border-box;
}

.p-business-section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.p-business-section__header {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 30px;
}

.p-business-section__num {
  flex-shrink: 0;
  font-family: var(--font-serif);
  font-size: 60px;
  font-weight: 600;
  line-height: 1;
  color: var(--color-text);
}

.p-business-section__titles {
  min-width: 0;
  flex: 1 1 auto;
  padding-top: 0;
}

.p-business-section__title {
  margin-bottom: 8px;
  font-size: 24px;
  font-weight: 700;
  color: var(--color-blue-accent);
  overflow-wrap: break-word;
}

.p-business-section__sub {
  font-size: 14px;
  color: var(--color-text);
  overflow-wrap: break-word;
}

.p-business-section__media {
  margin-bottom: 50px;
  max-width: 100%;
}

.p-business-section__media img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 400px;
  object-fit: cover;
}

.p-business-section__catch {
  margin-bottom: 24px;
  font-size: 24px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--color-navy);
  overflow-wrap: break-word;
}

.p-business-section__body {
  margin-bottom: 1.4em;
  font-size: 14px;
  line-height: 2;
  color: var(--color-text);
  overflow-wrap: break-word;
}

/* --------------------------------------------------------------------------
   対応内容
   XAML: label 12/#053795 @ x385 / chips 160×46 white @ x463 gap10
         label〜chip 左端 = 78 / 1行目チップ中央付近にラベル
   -------------------------------------------------------------------------- */

.p-business-section__tags {
  display: flex;
  align-items: flex-start;
  gap: 78px;
  margin-top: 50px;
  max-width: 100%;
  min-width: 0;
}

.p-business-section__tags-label {
  flex-shrink: 0;
  /* チップ高46・ラベル12 → 1行目の上下中央 */
  width: 4em;
  padding-top: 17px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: var(--color-blue-accent);
  white-space: nowrap;
}

.p-business-section__tag-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 160px));
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.p-business-section__tag-list li {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  max-width: 160px;
  min-height: 46px;
  height: 46px;
  padding: 0 12px;
  border: none;
  border-radius: 10px;
  background: var(--color-white);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  color: var(--color-text);
  white-space: nowrap;
}

.p-business-section__flows {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 65px;
  min-width: 0;
  max-width: 100%;
}

/* --------------------------------------------------------------------------
   Support message（締め）
   上罫線 = 右コンテンツ幅（800）のみ。ナビ列にはかからない
   -------------------------------------------------------------------------- */

.p-business-support {
  position: relative;
  width: var(--width-page);
  max-width: 100%;
  margin: 84px auto 0;
  padding: 120px var(--side) 100px;
  box-sizing: border-box;
  text-align: center;
}

.p-business-support::before {
  content: "";
  position: absolute;
  top: 0;
  /* side + nav200 + gap80 → メインカラム左端 / 幅は右端まで流体 */
  left: calc(var(--side) + 200px + 80px);
  right: var(--side);
  max-width: 800px;
  border-top: 1px solid var(--color-line);
}

.p-business-support__eyebrow {
  margin-bottom: 20px;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-navy);
}

.p-business-support__catch {
  margin-bottom: 24px;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.6;
  color: var(--color-text);
}

.p-business-support__body {
  margin: 0;
  font-size: 14px;
  line-height: 2;
  color: var(--color-text);
}

.p-business {
  margin-top: 0;
}

.c-about {
  margin-top: 2px;
}

/* --------------------------------------------------------------------------
   Flow diagrams（委託管理 / サブリース）
   -------------------------------------------------------------------------- */

.c-flow {
  max-width: 100%;
  padding: 45px 50px 50px;
  box-sizing: border-box;
  background: var(--color-white);
}

.c-flow__title {
  margin-bottom: 20px;
  font-size: 24px;
  font-weight: 700;
  color: var(--color-navy);
}

.c-flow__lead {
  margin-bottom: 50px;
  font-size: 14px;
  line-height: 2;
  color: var(--color-text);
}

.c-flow__diagram {
  max-width: 694px;
  margin: 0 auto;
}

.c-flow__diagram img {
  display: block;
  width: 100%;
  height: auto;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* tablet: --width-page が 100% になる帯（〜1279）で固定 200+800 が溢れないよう流体化 */
@media (max-width: 1279px) {
  .p-business-body__inner {
    grid-template-columns: minmax(140px, 180px) minmax(0, 1fr);
    gap: 48px;
  }

  .p-business-section__tags {
    gap: 40px;
  }

  .p-business-section__tag-list {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .p-business-section__tag-list li {
    max-width: none;
  }

  .c-flow {
    padding: 40px 36px 44px;
  }

  .p-business-support::before {
    left: calc(var(--side) + 180px + 48px);
    right: var(--side);
    max-width: none;
  }
}

@media (max-width: 1024px) {
  .p-business-hero .c-breadcrumb {
    margin-bottom: 48px;
  }

  .p-business-hero__title {
    font-size: 28px;
  }

  .p-business-hero__intro {
    flex-direction: column;
    gap: 24px;
    margin-top: 56px;
  }

  .p-business-hero__catch {
    font-size: 26px;
  }

  .p-business-hero__catch br,
  .p-business-hero__lead br {
    display: none;
  }

  .p-business-hero__lead {
    max-width: none;
  }

  .p-business-hero__media {
    margin-top: 32px;
  }

  .p-business-hero__media img {
    height: auto;
    min-height: 240px;
    max-height: 400px;
  }

  .p-business-body {
    margin-top: 64px;
    padding: 64px 0 56px;
    overflow-x: clip;
  }

  .p-business-body__inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }

  .p-business-nav-col {
    height: auto;
    min-width: 0;
  }

  .p-business-nav {
    position: static;
    margin: 0 calc(-1 * var(--side));
    padding: 0 var(--side) 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .p-business-nav::-webkit-scrollbar {
    display: none;
  }

  .p-business-nav__title {
    margin-bottom: 16px;
    font-size: 18px;
  }

  .p-business-nav__list {
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 24px;
    width: max-content;
    min-width: 100%;
    padding-bottom: 8px;
  }

  .p-business-nav__list a {
    flex-shrink: 0;
    font-size: 16px;
    white-space: nowrap;
  }

  .p-business-section {
    /* SP sticky header 分をアンカースクロール位置から差し引く */
    scroll-margin-top: calc(var(--header-h) + 30px);
    padding-bottom: 64px;
    margin-bottom: 64px;
  }

  .p-business-section__header {
    gap: 14px;
  }

  .p-business-section__num {
    font-size: 48px;
  }

  .p-business-section__title {
    font-size: 22px;
  }

  .p-business-section__media img {
    height: auto;
    aspect-ratio: 16 / 10;
    max-height: 360px;
  }

  .p-business-section__catch {
    font-size: 20px;
  }

  .p-business-section__body br {
    display: none;
  }

  .p-business-section__tags {
    flex-direction: column;
    gap: 16px;
    margin-top: 40px;
  }

  .p-business-section__tags-label {
    width: auto;
    padding-top: 0;
  }

  .p-business-section__tag-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .p-business-section__tag-list li {
    width: 100%;
    max-width: none;
    min-width: 0;
    height: auto;
    min-height: 46px;
    padding: 10px 12px;
    white-space: normal;
  }

  .p-business-section__flows {
    margin-top: 48px;
  }

  .c-flow {
    padding: 32px 24px 36px;
  }

  .c-flow__title {
    font-size: 20px;
  }

  .c-flow__lead {
    margin-bottom: 32px;
  }

  .c-flow__diagram {
    max-width: 100%;
  }

  .p-business-support {
    margin-top: 56px;
    padding: 80px var(--side) 64px;
  }

  .p-business-support::before {
    left: var(--side);
    right: var(--side);
    max-width: none;
  }

  .p-business-support__catch {
    font-size: 24px;
  }

  .p-business-support__body br {
    display: none;
  }
}

@media (max-width: 767px) {
  .p-business-hero .c-breadcrumb {
    margin-bottom: 32px;
  }

  .p-business-hero__title {
    font-size: 24px;
  }

  .p-business-hero__intro {
    margin-top: 40px;
  }

  .p-business-hero__catch {
    font-size: 22px;
  }

  .p-business-hero__media img {
    min-height: 200px;
    max-height: 280px;
  }

  .p-business-body {
    margin-top: 48px;
    padding: 48px 0 40px;
  }

  .p-business-body__inner {
    gap: 32px;
  }

  .p-business-nav__list {
    gap: 20px;
  }

  .p-business-nav__list a {
    font-size: 14px;
  }

  .p-business-section {
    padding-bottom: 48px;
    margin-bottom: 48px;
  }

  .p-business-section__header {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px;
  }

  .p-business-section__num {
    font-size: 40px;
  }

  .p-business-section__title {
    font-size: 20px;
  }

  .p-business-section__catch {
    font-size: 18px;
  }

  .p-business-section__tag-list {
    grid-template-columns: 1fr;
  }

  .p-business-section__tag-list li {
    padding: 12px 16px;
  }

  .c-flow {
    padding: 24px 16px 28px;
  }

  .c-flow__title {
    font-size: 18px;
  }

  .p-business-support {
    padding: 64px var(--side) 48px;
  }

  .p-business-support__eyebrow {
    font-size: 16px;
  }

  .p-business-support__catch {
    font-size: 20px;
  }
}
