/*
 * 事業部ページ (template-business.php) とサービス詳細 (template-service-detail.php) 用 CSS。pages.css の後に読み込む。
 *
 * Figma: andfactoryHPデザイン_2026 > サービス/事業詳細 (5263-74735) / サービス/サービス詳細 (6169-36825)
 * 本文の HTML は inc/business.php の af2026_business_*_html() が組み立てる。
 */

/* ------------------------------------------------------------------
 * 段落・図 (共通)
 * ---------------------------------------------------------------- */
.biz-text {
	display: flex;
	flex-direction: column;
	gap: 16px;
	font-size: var(--af-fs-16);
	font-weight: 500;
	line-height: var(--af-lh-28);
	color: var(--af-fg);
}

.biz-text p {
	margin: 0;
}

.biz-figure {
	margin: 0;
}

.biz-figure img {
	display: block;
	width: 100%;
	height: auto;
}

/* ------------------------------------------------------------------
 * 事業ビジョン・事業説明
 * ---------------------------------------------------------------- */
.biz-vision__body,
.biz-about__body {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

/* 冒頭の段落は Figma では 1 つの文章 (段落の間を空けない) */
.biz-about__intro {
	gap: 0;
}

.biz-blocks {
	display: flex;
	flex-direction: column;
	gap: var(--af-content-gap);
}

/* 番号付きの節 (01 / 02 …) */
.biz-sec {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.biz-sec__head {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0;
	font-size: var(--af-fs-26);
	font-weight: 700;
	line-height: var(--af-lh-36);
	color: var(--af-fg);
}

.biz-sec__no {
	flex: none;
	padding: 4px 12px;
	border-radius: 8px;
	background: var(--af-bg-accent-emphasis);
	color: #fff;
	font-size: 18px;
	font-weight: 700;
	line-height: 24px;
}

.biz-sec__title {
	min-width: 0;
}

.biz-sec__body {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

/* 左に図、右に文章 (マンガ事業の 02) */
.biz-side {
	display: flex;
	align-items: center;
	gap: 32px;
}

.biz-side__figure {
	flex: none;
	width: min(440px, 40%);
	margin: 0;
}

.biz-side__figure img {
	display: block;
	width: 100%;
	height: auto;
}

.biz-side__text {
	flex: 1 1 0;
	min-width: 0;
}

/* 「当社の強み」などの青い枠 */
.biz-panel {
	display: flex;
	flex-direction: column;
	gap: 32px;
	padding: 40px var(--af-gutter) 48px;
	border-radius: 16px;
	background: var(--af-bg-accent);
}

.biz-panel__title {
	margin: 0;
	font-size: var(--af-fs-26);
	font-weight: 700;
	line-height: var(--af-lh-36);
	color: var(--af-fg-accent);
}

.biz-panel__items {
	display: flex;
	flex-direction: column;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.biz-panel__item {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 32px 24px;
	border-radius: 16px;
	background: #fff;
}

.biz-panel__item-title {
	margin: 0;
	font-size: 21px;
	font-weight: 700;
	line-height: 28px;
	color: var(--af-fg-accent);
}

.biz-panel__item-text {
	margin: 0;
	font-size: var(--af-fs-16);
	font-weight: 500;
	line-height: var(--af-lh-28);
	color: var(--af-fg);
}

/* 子会社の紹介 (ローカライズ事業のサウスワークス) */
.biz-company {
	display: flex;
	gap: 24px;
	padding: 32px;
	border-radius: 8px;
	background: var(--af-bg-inset);
}

.biz-company__figure {
	flex: none;
	width: min(496px, 45%);
	margin: 0;
}

.biz-company__figure img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.biz-company__body {
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 16px;
}

.biz-company__text {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.biz-company__title {
	margin: 0;
	font-size: var(--af-fs-26);
	font-weight: 700;
	line-height: var(--af-lh-36);
	color: var(--af-fg);
}

.biz-company__desc {
	margin: 0;
	font-size: var(--af-fs-16);
	font-weight: 500;
	line-height: var(--af-lh-28);
	color: var(--af-fg);
}

/* ------------------------------------------------------------------
 * リンクの枠 (サービス詳細の「公式サイト」「公式アプリ」、子会社の「公式サイト」)
 * ---------------------------------------------------------------- */
.biz-links {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.biz-link {
	flex: 1 1 0;
	min-width: min(100%, 320px);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	padding: 24px 32px 32px;
	border-radius: 8px;
	background: var(--af-bg-inset);
}

/* 子会社の紹介の中では枠を付けない (紹介自体が灰色の枠) */
.biz-links--plain .biz-link {
	padding: 0;
	background: none;
}

.biz-link__label {
	margin: 0;
	font-size: var(--af-fs-16);
	font-weight: 500;
	line-height: var(--af-lh-28);
	color: var(--af-fg-sub);
}

.biz-link__url {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	max-width: 100%;
	font-size: var(--af-fs-16);
	font-weight: 700;
	line-height: var(--af-lh-16);
	color: var(--af-fg);
	text-decoration: none;
}

.biz-link__text {
	min-width: 0;
	text-decoration: underline;
	text-underline-offset: 2px;
	overflow-wrap: anywhere;
}

.biz-link__url:hover .biz-link__text {
	text-decoration: none;
}

.biz-link__icon {
	flex: none;
	width: 16px;
	height: 16px;
}

/* ストアの公式バッジ。PC は高さ 64px (幅 174px・216px)。枠が狭いときは横に並べたまま比率を保って縮める (SP の Figma は 57px) */
.biz-link__stores {
	display: grid;
	grid-template-columns: 174fr 216fr;
	gap: 16px;
	width: 100%;
	max-width: 406px;
}

.biz-link__store {
	display: block;
	border-radius: 4px;
	transition: opacity 0.2s;
}

.biz-link__store:hover {
	opacity: 0.8;
}

.biz-link__store img {
	display: block;
	width: 100%;
	height: auto;
}

/* ------------------------------------------------------------------
 * サービス一覧 (Figma: CardBuisiness)
 * ---------------------------------------------------------------- */
.biz-services {
	padding: 144px var(--af-gutter);
	background: linear-gradient(0deg, #ffffff 0%, #007bbb 79.327%);
}

.biz-services__inner {
	max-width: var(--af-content-max);
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: var(--af-content-gap);
}

.biz-services__title {
	color: #fff;
}

/* 同じ段のカードは高さを揃え、右下のボタンの位置を揃える */
.biz-cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 48px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.biz-card {
	display: flex;
}

.biz-card__link {
	position: relative;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding: var(--af-gutter) var(--af-gutter) 120px;
	border-radius: 16px;
	background: #fff;
	color: var(--af-fg);
	text-decoration: none;
}

.biz-card__link:focus-visible {
	outline: 3px solid var(--af-fg-accent);
	outline-offset: 4px;
}

.biz-card__image {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 8px;
	background: var(--af-bg-inset);
}

.biz-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s;
}

.biz-card__link:hover .biz-card__image img {
	transform: scale(1.03);
}

.biz-card__text {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.biz-card__title {
	margin: 0;
	font-size: var(--af-fs-26);
	font-weight: 700;
	line-height: var(--af-lh-36);
	word-break: break-word;
}

.biz-card__link:hover .biz-card__title {
	color: var(--af-fg-accent);
}

.biz-card__desc {
	margin: 0;
	font-size: var(--af-fs-16);
	font-weight: 500;
	line-height: var(--af-lh-28);
}

/* 右下の矢印 (詳細ページ) / 外部リンクのアイコン (ライツ事業: サービスのサイトへ直接) */
.biz-card__button {
	position: absolute;
	right: 0;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	border-radius: 16px 0 16px 0;
	background: var(--af-bg-accent);
}

.biz-card__button img {
	width: 34px;
	height: 34px;
}

/* ------------------------------------------------------------------
 * サービス詳細
 * ---------------------------------------------------------------- */
.svc-detail__inner,
.svc-detail__body {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

/* パターン B・C は段落の間を 32px 空ける。A は Figma で 1 つの文章 (段落の間を空けない) */
.svc-detail .biz-text {
	gap: 32px;
}

.svc-detail--a .biz-text {
	gap: 0;
}

/* パターン C の太字のリード */
.svc-lead,
.svc-heading {
	margin: 0;
	font-size: var(--af-fs-26);
	font-weight: 700;
	line-height: var(--af-lh-36);
	color: var(--af-fg);
}

/* パターン B の【】付きの項目 */
.svc-points {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--af-fs-16);
	font-weight: 500;
	line-height: var(--af-lh-28);
	color: var(--af-fg);
}

.svc-point__title,
.svc-point__text {
	margin: 0;
}

/* ------------------------------------------------------------------
 * <= 768px: SP
 * ---------------------------------------------------------------- */
@media (max-width: 768px) {
	/* 番号の下に節の名前 */
	.biz-sec__head {
		flex-wrap: wrap;
		gap: 8px 4px;
	}

	.biz-sec__no {
		font-size: 16px;
		line-height: 20px;
	}

	.biz-sec__title {
		flex-basis: 100%;
	}

	.biz-side {
		flex-direction: column;
		align-items: stretch;
	}

	.biz-side__figure {
		width: 100%;
	}

	.biz-panel__item-title {
		font-size: 18px;
		line-height: 24px;
	}

	.biz-company {
		flex-direction: column;
		padding: 24px;
	}

	.biz-company__figure {
		width: 100%;
	}

	.biz-links {
		flex-direction: column;
		gap: 16px;
	}

	.biz-link {
		min-width: 0;
	}

	.biz-link__stores {
		max-width: 366px;
	}

	.biz-services {
		padding: 72px var(--af-gutter);
	}

	.biz-cards {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (prefers-reduced-motion: reduce) {
	.biz-card__image img,
	.biz-link__store {
		transition: none;
	}
}
