/* 移行時に追加した指定（現行サイトではテンプレート内の<style>や style 属性に書かれていたもの） */

/* footer.php 内の<style>：画面幅900px以上でフッターのロゴとメニューを横並びにする */
@media screen and (min-width: 900px) {
  footer .inner {
    height: 95px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-top: 50px;
  }
}
/* noteのロゴ */
footer .footerNote {
  margin-top: 20px;
  text-align: center;
}
footer .footerNote img {
  width: auto;
  height: 21px;
}
/* PHILOSOPHY（Value）の各項目の下余白 */
.allwrap .ab-philosophy .contentArea .item2 p.valueText {
  padding-bottom: 1.5rem;
}
/* BUSINESS：SOÉJU k のロゴ。余白を切った画像（logo-soejuK.png）を、SOÉJU のロゴと文字の大きさがそろう高さ（35px）で出す */
.business .area2 .textArea .text01 img.logoSoejuK {
  height: 35px;
  width: auto;
}
/* ニュース記事本文のルール（管理画面のプレビューも同じCSSを使う）
   - 文字の大きさはテーマのまま（14px）。行の高さはサイト共通（main.css の body p：2.5em＝35px）より詰めて 2em（28px）にする
   - 余白は 小16px／中32px／大64px の3種類を基本にする
   - WordPressでは空の段落で行間をあけていたが、ビルド時に取り除く（src/lib/tidy.mjs）ので、間隔はここで決める
   - 見出しは文字の大きさと太さだけで区別する（線や記号はつけない） */
.news.single .post-content {
  --space-s: 16px;
  --space-m: 32px;
  --space-l: 64px;
}
/* 段落・リスト：行の高さ28px、下に小（16px）。
   li はテーマの body p（main.css:33）が効かず16px・行間1.15になるので、p と同じ指定をする */
.news.single .post-content p,
.news.single .post-content li {
  font-size: 1.4rem;
  letter-spacing: 0.1em;
  line-height: 2em;
}
@media screen and (min-width: 1400px) {
  .news.single .post-content p,
  .news.single .post-content li { font-size: 1.6rem; }
}
.news.single .post-content p,
.news.single .post-content ul,
.news.single .post-content ol {
  margin: 0 0 var(--space-s);
}
/* タイトルと本文の間：テーマ（lower.css）の 95px（スマホ 65px）を 40px（スマホは下の指定で 24px）に詰める */
.news.single .newslist .post-title {
  margin-bottom: 40px;
}
/* 記事タイトルは全文出す（一覧用の3行で切る指定 main.css:838-841 が記事ページにも効いていたため） */
.news.single .newslist .post-title p {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}
/* 大見出し：18px（1.8rem）・太字、上に大、下に小 */
.news.single .post-content h2 {
  font-size: 1.8rem;
  font-weight: bold;
  line-height: 1.6;
  margin: var(--space-l) 0 var(--space-s);
}
/* 小見出し：16px（1.6rem）・太字、上に40px、下に12px（h4は移行記事の分。小見出しと同じ扱い） */
.news.single .post-content h3,
.news.single .post-content h4 {
  font-size: 1.6rem;
  font-weight: bold;
  line-height: 1.6;
  margin: 40px 0 12px;
}
/* スマホ：大きい順に タイトル18px → 大見出し16px → 小見出し15px → 本文14px。見出しの字間は少し詰める */
@media screen and (max-width: 899px) {
  .news.single .newslist .post-title {
    margin-bottom: 24px;
  }
  .news.single .newslist .post-title p {
    font-size: 1.8rem;
    font-weight: bold;
    line-height: 1.6;
    letter-spacing: .05em;
  }
  .news.single .post-content h2 {
    font-size: 1.6rem;
    letter-spacing: .05em;
    margin: 48px 0 12px;
  }
  .news.single .post-content h3,
  .news.single .post-content h4 {
    font-size: 1.5rem;
    letter-spacing: .05em;
    margin: 32px 0 8px;
  }
}
/* 画像：横幅いっぱい、上下に中 */
/* 縦長の画像は、画面の高さの82%（最大720px）までに縮めて中央に置く（PCで1画面に収まるように）。
   16:9までの横長の画像は、高さ800pxの画面ならこの上限にかからず横幅いっぱいのまま */
.news.single .post-content img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: min(82vh, 720px);
  margin: var(--space-m) auto;
}
/* 箇条書き：「・」つき、項目の間は詰める */
/* 一覧のカードを3列に並べる指定（lower.css:614-628 .news .newslist ul）が本文の箇条書きにも効くので打ち消す */
.news.single .post-content ul,
.news.single .post-content ol { display: block; gap: 0; }
.news.single .post-content ul::after,
.news.single .post-content ol::after { content: none; }
.news.single .post-content li { width: auto; }
.news.single .post-content ul { list-style: disc; padding-left: 1.5em; }
.news.single .post-content ol { list-style: decimal; padding-left: 1.5em; }
.news.single .post-content li { list-style: inherit; }
.news.single .post-content li p { margin: 0; }
.news.single .post-content strong,
.news.single .post-content b { font-weight: bold; }
/* リンク：下線つき（長いURLは折り返す） */
.news.single .post-content a { text-decoration: underline; word-break: break-all; }
/* 記事の最初と最後には余白を入れない */
.news.single .post-content > :first-child,
.news.single .post-content > p:first-child > img:first-child { margin-top: 0; }
.news.single .post-content > :last-child,
.news.single .post-content > p:last-child > img:last-child { margin-bottom: 0; }

/*-----------------------------------------------
  下層ページ（BUSINESS・NEWS・CONTACT・404）の上部余白
  13インチPC（画面の高さ 約700〜800px）で、最初の画面に本文が見えるように詰める
  テーマ（lower.css）の指定：見出しの上230px・下160px、年別メニューの下165px（スマホ 210px・150px・125px）
-----------------------------------------------*/
.leadContent .inner {
  padding: 14rem 1rem 6rem;
}
.subtrue .wrapper {
  padding-top: 6rem;
}
@media screen and (max-width: 899px) {
  .leadContent .inner {
    padding: 11rem 0 4rem;
  }
  .subtrue .wrapper {
    padding-top: 4rem;
  }
  /* 年別メニュー・BUSINESSのメニュー：縦1列（年別だと約440px）をやめ、横に詰めて折り返す */
  #subleadContent .submenu {
    display: flex;
    flex-wrap: wrap;
    gap: 0 2.4rem;
    padding: 1rem 0;
  }
}

/*-----------------------------------------------
  ニュース：上のカテゴリメニューと、下の「過去のニュース」（年ごとのリンク）
-----------------------------------------------*/
/* 今いるカテゴリは太字＋下線（他はテーマどおり） */
#subleadContent .submenu li a[aria-current="page"] {
  font-family: 'Jost-B', sans-serif;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}
/* 下線を「>」には付けない */
#subleadContent .submenu li a::before {
  display: inline-block;
}
/* 過去のニュース：ページ送りの下に、細い線で区切って1行 */
.newsArchive {
  margin-top: 64px;
  padding-top: 32px;
  border-top: solid 1px #c2c2c2;
  text-align: center;
  font-family: 'Jost-M', sans-serif;
  font-weight: 500;
}
.newsArchive-title {
  font-size: 1.2rem;
  letter-spacing: .15em;
  line-height: 1;
  color: #8e8e8e;
  margin-bottom: 16px;
}
.newsArchive ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 28px;
}
.newsArchive li a {
  font-size: 1.45rem;
  letter-spacing: .085em;
  color: #1e1e1e;
  text-decoration: none;
  transition: color .3s ease;
}
.newsArchive li a:hover { color: #8e8e8e; }
.newsArchive li a[aria-current="page"] {
  font-family: 'Jost-B', sans-serif;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}
@media screen and (max-width: 899px) {
  .newsArchive {
    margin-top: 48px;
    padding-top: 24px;
  }
  .newsArchive ul { gap: 8px 20px; }
}

/*-----------------------------------------------
  ニュースの日付：テーマの 10px（スマホの一覧 8px）は小さすぎるので大きくする
  一覧（NEWS・カテゴリ・年別・HOMEのNEWS）：12px（スマホ 11px）　記事ページ：13px（スマホ 12px）
-----------------------------------------------*/
.newslist .post-date {
  font-size: 1.2rem;
  letter-spacing: .05em;
}
.news.single .newslist .post-date {
  font-size: 1.3rem;
}
@media screen and (max-width: 899px) {
  .newslist .post-date,
  .news.listContent .newslist .post-date {
    font-size: 1.1rem;
  }
  .news.single .newslist .post-date {
    font-size: 1.2rem;
  }
  /* スマホの一覧のカテゴリのラベル：テーマの 8px → 日付と同じ 11px。幅は文字に合わせる */
  .news.listContent .newslist .post-cat {
    font-size: 1.1rem;
    line-height: 1.8rem;
    width: auto;
    min-width: 6.2rem;
    padding: 0 .6rem;
  }
}

/*-----------------------------------------------
  スマホ表示の切り替え幅：599px → 899px にそろえた（メニューは元から 899px）
  テーマの CSS（main / lower / top / home-about）と js/main.js の 599/600px を 899/900px に書き換えている
  ただし HOME の MESSAGE は今までどおり 600px から見出しと写真を横並びにする（home-about.css の2か所は 599/600px のまま）
-----------------------------------------------*/
@media screen and (min-width: 600px) and (max-width: 899px) {
  /* MESSAGE の英字見出しは PC と同じ大きさのまま（他の章の見出しは 899px までスマホの 25px） */
  .allwrap .ab-message .titleArea .title01 {
    font-size: 3.2rem;
    line-height: 3.2rem;
    letter-spacing: .2em;
  }
}
/* MESSAGE の見出し：「育むために」の途中で改行しない（「ため／に」と1文字だけ落ちるのを防ぐ） */
.allwrap .ab-message .titleArea .text01 .keep {
  display: inline-block;
}

/*-----------------------------------------------
  HOME：ORGANIZATION（組織図）
  旧ABOUTは画像だったが、文字をくっきりさせ部署名を変えやすくするためHTMLで組む（index.astro の #organization）
  PC：ツリー表示。狭いPC幅（900〜1240px未満）は図だけ横にスクロール
  スマホ：縦に積む（部署ごとに黒帯＋配下のチームを2列）
-----------------------------------------------*/
.allwrap .ab-organization {
  padding: 10rem 0 12rem;
  --org-ink: #231815;
  --org-line: #b5b5b5;
  --org-gap: 3.4rem;
}
.allwrap .ab-organization .titleArea {
  margin-bottom: 5.5rem;
}
.ab-organization .orgScroll {
  overflow-x: auto;
  padding: 0 2rem;
}
.ab-organization .orgChart {
  min-width: 120rem; /* 文字の大きさ（rem）に合わせて広げる */
  max-width: 124rem;
  margin: 0 auto;
}
.ab-organization ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.ab-organization li {
  position: relative;
}
body .ab-organization .orgBox {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  min-height: 7.4rem;
  margin: 0;
  padding: .6rem 0;
  border: 1px solid var(--org-ink);
  background: #fff;
  color: var(--org-ink);
  font-size: 1.15rem;
  line-height: 1.6;
  letter-spacing: 0;
  text-align: center;
}
.ab-organization .orgBox small {
  font-size: 1rem;
}
body .ab-organization .orgDark {
  min-height: 7rem;
  background: var(--org-ink);
  color: #fff;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: .02em;
}
.ab-organization .orgTop {
  display: flex;
  justify-content: center;
}
.ab-organization .orgTop .orgBox {
  width: 22%;
  min-height: 6.4rem;
}

@media screen and (min-width: 900px) {
  .ab-organization .orgTop .orgBox { font-size: 1.5rem; }
  /* 線は「上へ伸びる縦線（::before）」と「兄弟をつなぐ横線（::after）」で描く */
  .ab-organization .orgDepts,
  .ab-organization .orgTeams {
    display: flex;
    position: relative;
    margin-top: var(--org-gap);
  }
  .ab-organization .orgTeams {
    margin: var(--org-gap) -.3rem 0;
  }
  .ab-organization .orgDepts::before,
  .ab-organization .orgTeams::before {
    content: '';
    position: absolute;
    left: 50%;
    top: calc(var(--org-gap) * -1);
    height: var(--org-gap);
    border-left: 1px solid var(--org-line);
  }
  .ab-organization .orgDepts > li {
    flex: var(--span, 1) 1 0;
    min-width: 0;
  }
  .ab-organization .orgTeams > li {
    flex: 1 1 0;
    min-width: 0;
  }
  .ab-organization .orgDepts > li,
  .ab-organization .orgTeams > li {
    padding: var(--org-gap) .3rem 0;
  }
  .ab-organization .orgDepts > li::before,
  .ab-organization .orgTeams > li::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    height: var(--org-gap);
    border-left: 1px solid var(--org-line);
  }
  .ab-organization .orgDepts > li::after,
  .ab-organization .orgTeams > li::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    border-top: 1px solid var(--org-line);
  }
  .ab-organization .orgDepts > li:first-child::after,
  .ab-organization .orgTeams > li:first-child::after {
    left: 50%;
  }
  .ab-organization .orgDepts > li:last-child::after,
  .ab-organization .orgTeams > li:last-child::after {
    right: 50%;
  }
  /* 横線は上の縦線と重ねてつなげる */
  .ab-organization .orgDepts::before { height: calc(var(--org-gap) + 1px); }
}

@media screen and (max-width: 899px) {
  .allwrap .ab-organization {
    padding: 10rem 0 10.5rem;
  }
  .allwrap .ab-organization .titleArea {
    margin-bottom: 4rem;
  }
  .ab-organization .orgScroll {
    overflow: visible;
    padding: 0;
    width: 80%;
    margin: 0 auto;
  }
  .ab-organization .orgChart {
    min-width: 0;
  }
  .ab-organization .orgBr {
    display: none;
  }
  .ab-organization .orgTop .orgBox {
    width: 100%;
    min-height: 5.2rem;
  }
  body .ab-organization .orgDark {
    min-height: 4.8rem;
    font-size: 1.3rem;
  }
  body .ab-organization .orgBox {
    min-height: 5.4rem;
    font-size: 1.2rem;
  }
  /* 左の縦線（幹）から各部署へ横線を出す */
  .ab-organization .orgDepts {
    margin-left: 1.2rem;
    padding: 2rem 0 0 1.6rem;
    border-left: 1px solid var(--org-line);
  }
  .ab-organization .orgDepts > li + li {
    margin-top: 2rem;
  }
  .ab-organization .orgDepts > li::before {
    content: '';
    position: absolute;
    left: -1.6rem;
    top: 2.4rem;
    width: 1.6rem;
    border-top: 1px solid var(--org-line);
  }
  /* 最後の部署より下の幹は消す */
  .ab-organization .orgDepts > li:last-child::after {
    content: '';
    position: absolute;
    left: calc(-1.6rem - 1px);
    top: calc(2.4rem + 1px);
    bottom: 0;
    width: 1px;
    background: #fff;
  }
  .ab-organization .orgTeams {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
    margin-top: .6rem;
  }
  /* チームが1つだけの部署は横いっぱいにする（「財務/経理/…」が途中で折り返さないように） */
  .ab-organization .orgTeams > li:only-child {
    grid-column: 1 / -1;
  }
}

/* BUSINESS：SERVICE&BRANDS の見出しの下のリード文 */
.business .area2 .titleArea .leadText {
  margin-top: 4rem;
}

/* BUSINESS：ブランド写真の枠を4枚とも横3:2にそろえる（はみ出した部分は中央を基準に切る） */
.business .area2 .imageArea .image1 img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
}
