/* =========================================================
   トップページ（front-page.php）
   Studio の実測（調査/styles/tree_top_pc.txt・tree_top_sp.txt）どおり
   画面幅の切り替え：1140 / 840 / 540px（Studio と同じ）
   ========================================================= */

/* ---------- 共通：見出し・本文・ボタン ---------- */
.pg-top .mm-main { display: flex; flex-direction: column; align-items: center; }
.pg-top .mm-main > * { flex: none; }
.top-ttl { display: flex; flex-direction: column; align-items: flex-start; }
.top-ttl__ja { color: #333; font-family: var(--gin); font-weight: var(--w-l); font-size: 20px; line-height: 1.4; letter-spacing: .05em; }
.top-ttl__en { color: #333; font-family: var(--gin); font-weight: var(--w-m); font-size: 40px; line-height: 1.4; letter-spacing: .25em; }
.top-txt { color: #333; font-weight: var(--w-l); font-size: 18px; line-height: 1.4; letter-spacing: .1em; }

.top-btn { display: inline-flex; flex: none; justify-content: center; align-items: center; gap: 16px; max-width: 100%; padding: 8px 24px; border: 1px solid #000; color: #333; transition: box-shadow .3s, translate .3s; }
.top-btn__txt { white-space: nowrap; font-weight: var(--w-l); font-size: 20px; line-height: 1.4; letter-spacing: .05em; }
.top-btn__icon { width: 24px; font-size: 24px; color: #333; }
@media (hover: hover) { .top-btn:hover { box-shadow: 4px 6px 6px rgba(0, 0, 0, .2); translate: 0 -4px; } }

/* ---------- ヒーロー（PC は画面の高さ・上の帯の下に重なる。写真は上合わせ） ---------- */
.top-hero { position: relative; width: 100%; height: 100vh; overflow: hidden; }
.top-hero__item { position: absolute; inset: 0; visibility: hidden; }
.top-hero__item.is-on { visibility: visible; }
.top-hero__item img { width: 100%; height: auto; }

/* ---------- 車検サービス開始のバナー ---------- */
.top-shaken { display: flex; width: 1080px; max-width: 100%; padding: 80px 48px; }
.top-shaken__link { display: flex; width: 100%; }
.top-shaken__img { width: 100%; height: auto; border-radius: 2px; }
@media (hover: hover) {
	.top-shaken__link:hover { background: rgba(0, 0, 0, .4); filter: grayscale(56%); transition: background .3s ease-in-out, filter .3s ease-in-out; }
	.top-shaken__img:hover { background: #000; filter: brightness(131%); transition: filter .3s ease-in-out; }
}

/* ---------- CONCEPT（文が左・写真が右） ---------- */
.top-concept { display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 24px; width: 1080px; max-width: 100%; padding: 0 48px 20px; }
.top-concept__img { flex: none; width: calc(40% - 14.4px); height: 250px; }
.top-concept__img img { width: 100%; height: 100%; object-fit: contain; border-radius: 2px; }
.top-concept__txt { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; width: calc(55% - 10.8px); }

/* ---------- REPAIR POLICY（写真が左・文が右） ---------- */
.top-policy { display: flex; justify-content: space-between; align-items: center; gap: 24px; width: 1080px; max-width: 100%; padding: 80px 48px 0; }
.top-policy__img { flex: none; width: calc(37% - 15.12px); }
.top-policy__img img { width: 100%; height: auto; border-radius: 2px; }
.top-policy__txt { flex: none; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-end; gap: 24px; width: calc(55% - 10.8px); }
.top-policy__inner { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; width: 100%; }

/* ---------- ACHIEVEMENTS（見出しとボタンだけ） ---------- */
.top-achieve { display: flex; flex-direction: column; align-items: center; width: 100%; padding: 100px 0 0; }
.top-achieve__inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; width: 1080px; max-width: 100%; padding: 0 48px; }

/* ---------- 写真が半分の段（BODY SHOP・FACULTY・COMPANY INFO） ---------- */
.top-half { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.top-half--bodyshop { padding: 80px 0 0; }
.top-half--faculty { flex-direction: row-reverse; padding: 0 0 80px; }
.top-half--company { padding: 80px 0; }
.top-half__img { flex: none; width: 50%; }
.top-half__img img { width: 100%; height: auto; }
.top-half__txt { flex: none; display: flex; flex-direction: row-reverse; justify-content: center; align-items: center; width: 50%; }
.top-half__inner { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; width: 80%; }
.top-half__btn { display: flex; flex-direction: column; justify-content: center; align-items: flex-end; width: 100%; }
.top-half--faculty .top-half__btn { align-items: center; }

/* ---------- 写真の帯（UPDATE・COLUMN） ---------- */
.top-bg { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; width: 100%; height: 360px; overflow: hidden; }
.top-bg__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.top-bg--update .top-bg__img { filter: brightness(58%); }
.top-bg__inner { position: relative; isolation: isolate; display: flex; justify-content: space-between; align-items: flex-end; width: 1080px; max-width: 100%; padding: 0 48px; }
.top-bg__head { display: flex; flex-direction: column; align-items: flex-start; }
.top-bg .top-ttl__ja, .top-bg .top-ttl__en { color: #fff; }
.top-bg .top-ttl__en { font-weight: var(--w-l); }
.top-bg__sub { margin-top: 8px; padding-bottom: 2px; border-bottom: 1px solid #a6a6a6; color: #fff; font-weight: var(--w-l); font-size: 20px; line-height: 1.4; letter-spacing: .05em; }
.top-btn--glass { align-items: flex-end; margin-top: 16px; background: rgba(255, 255, 255, .8); mix-blend-mode: darken; }

/* ---------- 記事カード（写真の帯の下に72px重なる） ---------- */
.top-cards { position: relative; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 48px 30px; width: 1080px; max-width: 100%; margin: -72px 0 80px; padding: 0 48px; }
.top-cards--column { justify-content: center; margin-bottom: 0; }
.top-cards--empty { height: 72px; }
.top-card { flex: none; width: calc(33% - 20.1px); }
.top-card__link { display: flex; flex-direction: column; align-items: center; padding: 20px 32px; background: #f9f9f9; transition: opacity .3s, translate .3s; }
@media (hover: hover) { .top-card__link:hover { opacity: .5; translate: 0 -4px; } }
.top-card__img { display: block; width: 100%; overflow: hidden; border-radius: 4px; }
.top-card__img img { width: 100%; height: auto; }
.top-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; width: 100%; padding: 16px; color: #000; }
.top-card__title { width: 100%; font-weight: var(--w-b); font-size: 13px; line-height: 1.5; letter-spacing: .1em; }
.top-card__desc { width: 100%; font-weight: var(--w-l); font-size: 11px; line-height: 1.5; letter-spacing: .1em; }

/* ---------- NEWS（写真の上に白い幕） ---------- */
.top-news { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; width: 100%; height: 360px; margin-top: 80px; overflow: hidden; }
.top-news__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.top-news__veil { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; width: 100%; height: 100%; padding: 64px 0; background: rgba(255, 255, 255, .9); }
.top-news__inner { display: flex; justify-content: space-between; align-items: flex-start; width: 1080px; max-width: 100%; padding: 0 48px; }
.top-news__head { display: flex; flex-direction: column; align-items: flex-start; }
.top-news .top-ttl__ja, .top-news .top-ttl__en { color: #000; }
.top-news .top-bg__sub { color: #000; }
.top-news__side { display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-end; align-self: stretch; }
.top-news__list { display: flex; flex-direction: column; align-items: center; gap: 16px; }
.top-news__list li { display: flex; }
.top-news__item { display: flex; align-items: center; gap: 24px; width: 350px; max-width: 100%; padding: 0 0 4px; border-bottom: 1px solid #a6a6a6; }
.top-news__date, .top-news__title { color: #333; font-weight: var(--w-l); font-size: 18px; line-height: 1.4; letter-spacing: .1em; transition: color .3s; }
.top-news__date { flex: none; white-space: nowrap; }
.top-news__title { flex: 1; }
@media (hover: hover) { .top-news__item:hover .top-news__date, .top-news__item:hover .top-news__title { color: #a6a6a6; } }
.top-btn--news { margin-top: 16px; }

/* =========================================================
   1140px 以下：ヒーローは帯の下から・カードは2列
   ========================================================= */
@media (max-width: 1140px) {
	.top-hero { height: 500px; margin-top: 70px; }
	.top-half--bodyshop { padding: 80px 0 10px; }
	.top-card { width: calc(50% - 15px); }
}

/* =========================================================
   840px 以下：縦に積む
   ========================================================= */
@media (max-width: 840px) {
	.top-hero { height: 400px; }
	.top-ttl__ja { font-size: 18px; }
	.top-ttl__en { font-size: 32px; }
	.top-txt { font-size: 16px; }
	.top-btn__txt { font-size: 18px; }
	.top-btn__icon { width: 22px; font-size: 22px; }

	.top-shaken { flex-direction: column; width: 100%; padding: 10px 32px 20px; }

	.top-concept { flex-direction: column; width: 100%; padding: 10px 32px 20px; }
	.top-concept__img { width: 100%; }
	.top-concept__img img { object-fit: cover; }
	.top-concept__txt { width: 100%; padding: 20px 0; }

	.top-policy { flex-direction: column; width: 100%; padding: 80px 32px 0; }
	.top-policy__img { position: relative; z-index: 1; width: 100%; }
	.top-policy__img img { height: 250px; object-fit: cover; }
	.top-policy__txt { width: 100%; }
	.top-policy__inner { padding: 20px 0; }

	.top-achieve { padding: 80px 0 0; }
	.top-achieve__inner { flex-direction: column; align-items: flex-start; gap: 16px; width: 100%; padding: 20px 32px; }

	.top-half, .top-half--faculty { flex-direction: column; }
	.top-half--bodyshop { padding: 80px 32px 40px; }
	.top-half--faculty { padding: 0 32px 80px; }
	.top-half--company { justify-content: flex-end; padding: 80px 32px; }
	.top-half__img, .top-half__txt { width: 100%; }
	.top-half__txt { flex-direction: column; }
	.top-half__inner { width: 100%; padding: 20px 0; }
	.top-half--faculty .top-half__btn { align-items: flex-end; }

	.top-bg__inner { padding: 0 32px; }
	.top-bg__head { flex: 1; }
	.top-bg__sub { font-size: 18px; }

	.top-cards { gap: 24px 16px; width: 80%; padding: 0; }
	.top-card { width: 100%; }
	.top-card__link { justify-content: space-between; }
	.top-card__body { flex: 1; }

	.top-news { height: auto; }
	.top-news__veil { height: auto; }
	.top-news__inner { flex-direction: column; justify-content: space-between; align-items: flex-start; width: 100%; padding: 0 32px; }
	.top-news__side { width: 100%; margin-top: 16px; }
	.top-news__list { width: 100%; }
	.top-news__list li { width: 100%; }
	.top-news__item { width: 100%; }
	.top-news__date, .top-news__title { font-size: 16px; }
}

/* =========================================================
   540px 以下：スマホ
   ========================================================= */
@media (max-width: 540px) {
	.top-hero { height: 246px; }
	.top-ttl__ja { font-size: 16px; }
	.top-ttl__en { font-size: 28px; }
	.top-txt { font-size: 14px; }
	.top-btn__txt { font-size: 16px; }
	.top-btn__icon { width: 20px; font-size: 20px; }
	.top-btn--s .top-btn__txt { font-size: 14px; }
	.top-policy .top-btn, .top-achieve .top-btn { gap: 10px; }

	.top-shaken { padding: 0 16px 20px; }
	.top-concept { gap: 0; padding: 10px 16px 0; }
	.top-policy { padding: 64px 16px 0; }
	.top-achieve { padding: 64px 0 0; }
	.top-achieve__inner { padding: 20px 16px; }

	.top-half--bodyshop { flex-direction: column-reverse; padding: 50px 16px 0; }
	.top-half--faculty { flex-direction: column-reverse; padding: 30px 16px 64px; }
	.top-half--company { padding: 64px 16px 40px; }

	.top-bg { justify-content: center; align-items: flex-start; }
	.top-bg__inner { flex-direction: column; justify-content: center; align-items: flex-start; padding: 0 16px; }
	.top-bg__sub { font-size: 16px; }

	.top-cards { flex-direction: column; flex-wrap: nowrap; gap: 40px 16px; width: 90%; }
	.top-card__link { padding: 20px 16px; }

	.top-news__inner { padding: 0 16px; }
	.top-news__date, .top-news__title { font-size: 14px; }
}

/* 320px 以下（Studio の @mini） */
@media (max-width: 320px) {
	.top-btn--glass .top-btn__txt, .top-btn--news .top-btn__txt, .top-half--company .top-btn__txt { font-size: 14px; }
	.top-cards { gap: 20px 16px; }
	.top-news { margin-top: 30px; }
}

/* 長いボタン（認定機器・工具・設備・メンテナンス情報）：PC の狭い幅では折り返す・スマホは1行に収める */
@media (max-width: 1140px) and (min-width: 841px) {
	.top-btn--wide .top-btn__txt { white-space: normal; }
}
@media (max-width: 540px) {
	.top-btn--wide { width: 100%; padding: 8px 16px; }
}
