/* ==================================================================
 * フッター
 *
 * 記事本文（白地）から色を切り替えて「ページの終わり」を作り、
 * カテゴリー・タグ・本体サイトへの導線を全ページ共通で置く。
 * 色は Astra のグローバルパレット（#1a6c7a / #153243）から派生させている。
 * ============================================================== */

:root {
	--aiy-foot-bg: #0e2231;
	--aiy-foot-bottom-bg: #0a1a26;
	--aiy-foot-text: rgba(255, 255, 255, 0.72);
	--aiy-foot-muted: rgba(255, 255, 255, 0.55);
	--aiy-foot-strong: #ffffff;
	--aiy-foot-accent: #5ecfdf;
	--aiy-foot-line: rgba(255, 255, 255, 0.12);
}

/* ---------- CTA帯 ---------- */

.aiy-foot-cta {
	background: linear-gradient(118deg, #153243 0%, #1a6c7a 100%);
	color: #fff;
	/* 記事の余白がそのまま続くと帯に見えないため、上下を締める */
	padding: 3.4rem 1.5rem;
}

.aiy-foot-cta-inner {
	max-width: 1160px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2.5rem;
}

.aiy-foot-cta-title {
	margin: 0 0 0.6rem;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.5;
	color: #fff;
}

.aiy-foot-cta-lead {
	margin: 0;
	max-width: 40em;
	font-size: 0.94rem;
	line-height: 1.8;
	color: rgba(255, 255, 255, 0.82);
}

.aiy-foot-cta-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	flex-shrink: 0;
}

.aiy-foot-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.85rem 1.6rem;
	border-radius: 999px;
	font-size: 0.92rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.aiy-foot-btn-primary {
	background: #fff;
	color: #123542;
}

.aiy-foot-btn-ghost {
	background: transparent;
	color: #fff;
	box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.55);
}

.aiy-foot-btn:hover,
.aiy-foot-btn:focus {
	transform: translateY(-2px);
}

.aiy-foot-btn-primary:hover,
.aiy-foot-btn-primary:focus {
	background: #eafaff;
	color: #123542;
}

.aiy-foot-btn-ghost:hover,
.aiy-foot-btn-ghost:focus {
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
}

/* ---------- 4カラム本体 ---------- */

.aiy-foot {
	background: var(--aiy-foot-bg);
	color: var(--aiy-foot-text);
	padding: 3.6rem 1.5rem 2.8rem;
}

.aiy-foot-inner {
	max-width: 1160px;
	margin: 0 auto;
	display: grid;
	/* ブランド列だけ広く取る */
	grid-template-columns: 1.6fr 1fr 1.2fr 1fr;
	gap: 2.5rem 3rem;
}

.aiy-foot-logo {
	display: inline-block;
	margin-bottom: 1rem;
}

.aiy-foot-logo img {
	height: 36px;
	width: auto;
	display: block;
}

.aiy-foot-tagline {
	margin: 0 0 0.7rem;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--aiy-foot-strong);
	line-height: 1.6;
}

.aiy-foot-about {
	margin: 0;
	font-size: 0.82rem;
	line-height: 1.9;
	color: var(--aiy-foot-muted);
}

.aiy-foot-head {
	margin: 0 0 1.1rem;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	color: var(--aiy-foot-strong);
	text-transform: none;
}

.aiy-foot-head::after {
	content: "";
	display: block;
	width: 26px;
	height: 2px;
	margin-top: 0.55rem;
	background: var(--aiy-foot-accent);
}

.aiy-foot-links {
	margin: 0;
	padding: 0;
	list-style: none;
}

.aiy-foot-links li {
	margin: 0 0 0.65rem;
}

.aiy-foot-links a {
	display: inline-flex;
	align-items: baseline;
	gap: 0.4rem;
	font-size: 0.87rem;
	line-height: 1.6;
	color: var(--aiy-foot-text);
	text-decoration: none;
	transition: color 0.18s ease;
}

.aiy-foot-links a:hover,
.aiy-foot-links a:focus {
	color: var(--aiy-foot-accent);
}

.aiy-foot-count {
	font-size: 0.72rem;
	color: var(--aiy-foot-muted);
}

/* タグはピル表示。記事下のタグ（.aiy-tags）と同じ見た目の暗色版 */
.aiy-foot-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.aiy-foot-tags a {
	display: inline-block;
	padding: 0.32rem 0.72rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.07);
	box-shadow: inset 0 0 0 1px var(--aiy-foot-line);
	font-size: 0.76rem;
	line-height: 1.5;
	color: var(--aiy-foot-text);
	text-decoration: none;
	transition: background-color 0.18s ease, color 0.18s ease;
}

.aiy-foot-tags a::before {
	content: "#";
	opacity: 0.55;
	margin-right: 0.12em;
}

.aiy-foot-tags a:hover,
.aiy-foot-tags a:focus {
	background: rgba(94, 207, 223, 0.16);
	color: var(--aiy-foot-accent);
}

/* ---------- Astra 標準フッターを下部バーとして流用 ---------- */

.site-footer {
	background: var(--aiy-foot-bottom-bg) !important;
	border-top: 1px solid var(--aiy-foot-line);
}

.site-footer .site-primary-footer-wrap {
	/* Astra は grid + 中央寄せで、中身の幅までしか広がらない */
	display: block !important;
	background: transparent !important;
	padding: 0.9rem 1.5rem !important;
}

/* Astra の内側ラッパーは flex で、中身の幅までしか広がらない */
.site-footer .ast-builder-grid-row-container-inner {
	display: block;
	max-width: 1160px;
	margin: 0 auto;
}

/* 3等分グリッドのままだと中央の空カラムが幅を食うので、両端揃えにする */
.site-footer .site-primary-footer-inner-wrap {
	width: 100%;
	display: flex !important;
	grid-template-columns: none !important;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
}

/* 中身の無いウィジェット領域（Astra の予備カラム） */
.site-footer .site-footer-primary-section-2 {
	display: none;
}

.site-footer .footer-widget-area {
	margin: 0;
}

.site-footer .ast-nav-menu {
	gap: 0.25rem 1.4rem;
}

.site-footer .ast-nav-menu .menu-link {
	padding: 0.25rem 0 !important;
	font-size: 0.82rem;
	color: var(--aiy-foot-muted) !important;
	transition: color 0.18s ease;
}

.site-footer .ast-nav-menu .menu-link:hover,
.site-footer .ast-nav-menu .menu-link:focus,
.site-footer .ast-nav-menu .current-menu-item > .menu-link {
	color: var(--aiy-foot-accent) !important;
}

/* 右下に固定される「上部へ戻る」と重ならないよう逃がす */
.site-footer .site-footer-primary-section-3 {
	padding-right: 3.4rem;
}

.site-footer .ast-footer-copyright p {
	margin: 0;
	font-size: 0.78rem;
	color: var(--aiy-foot-muted);
}

/* ---------- ページ上部へ戻る ---------- */

/*
 * Astra は ::before にアイコンフォントの字を置くが、そのフォントが
 * 読み込まれず豆腐（□）になる。擬似要素を消して矢印を背景画像で描く。
 * display は Astra の JS が表示/非表示を切り替えるので触らない。
 */
#ast-scroll-top::before,
#ast-scroll-top::after {
	content: none !important;
}

#ast-scroll-top {
	/* Astra は下向きアイコンを180度回して使う。背景画像まで反転するので戻す */
	transform: none !important;
	border-radius: 999px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 15l-6-6-6 6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 15px 15px;
}

/* ---------- レスポンシブ ---------- */

@media (max-width: 1024px) {
	.aiy-foot-inner {
		grid-template-columns: 1fr 1fr;
		gap: 2.4rem;
	}

	.aiy-foot-brand {
		grid-column: 1 / -1;
	}
}

@media (max-width: 921px) {
	.aiy-foot-cta-inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 1.6rem;
	}

	.aiy-foot-cta-actions {
		width: 100%;
	}

	.aiy-foot-btn {
		flex: 1 1 auto;
	}
}

@media (max-width: 600px) {
	.aiy-foot-cta {
		padding: 2.6rem 1.25rem;
	}

	.aiy-foot-cta-title {
		font-size: 1.22rem;
	}

	.aiy-foot {
		padding: 2.8rem 1.25rem 2.2rem;
	}

	.aiy-foot-inner {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	/* 下部バーは縦積みの中央寄せに戻す（Astra のモバイル既定に合わせる） */
	.site-footer .site-primary-footer-inner-wrap {
		justify-content: center;
		text-align: center;
	}

	/* 幅を指定しないと flex 行の中で最小幅まで縮み、ナビが4行に折れる */
	.site-footer .site-footer-section {
		width: 100%;
	}

	/* Astra はモバイルで1カラムの grid にする（＝1項目1行）。横並びに戻す */
	.site-footer .site-footer-primary-section-3 {
		padding-right: 0;
	}

	.site-footer .ast-nav-menu {
		display: flex !important;
		flex-wrap: wrap;
		justify-content: center;
		gap: 0.2rem 1.1rem;
	}

	.site-footer .ast-nav-menu > li {
		width: auto;
		flex: 0 0 auto;
		border: 0;
	}
}
