/*
Theme Name: ファンオート
Theme URI: http://funauto.net/
Author: 有限会社ファンオート
Description: 有限会社ファンオート（横手市十文字）の公式サイト。旧Joomlaサイトの構成を引き継いだテーマです。
Version: 1.0.0
Requires at least: 6.0
Text Domain: funauto
*/

:root {
	--blue: #47b6e3;
	--blue-deep: #5dbfe6;
	--ink: #444;
	--nav: #2b2b2b;
	--footer: #222327;
	--container: 960px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	color: var(--ink);
	background: #fff;
	font-family: "Helvetica Neue", Helvetica, Arial, "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
	font-size: 14px;
	line-height: 1.7;
}

img { max-width: 100%; height: auto; border: 0; }

a { color: var(--blue); }

a:hover { color: #1f98c9; }

p { margin: 0.6em 0; }

.container {
	width: var(--container);
	max-width: 100%;
	margin: 0 auto;
}

.skip-link {
	position: absolute;
	left: -999px;
	top: 0;
	background: #000;
	color: #fff;
	padding: 8px 12px;
	z-index: 100;
}

.skip-link:focus { left: 8px; top: 8px; }

/* Header */
.site-header {
	background: #fff;
	border-top: 5px solid var(--blue);
	box-shadow: 0 0 7px rgba(0, 0, 0, 0.45);
	position: relative;
	z-index: 30;
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 108px;
	padding: 18px 0 10px;
}

.site-logo img {
	display: block;
	width: 320px;
	height: auto;
}

.header-phone {
	display: block;
	line-height: 0;
}

.header-phone img {
	display: block;
	width: 362px;
	height: auto;
}

/* Navigation */
.site-nav {
	background: #2a2a2a url("assets/images/global/menu_bg.gif") repeat-x left top;
	border-top: 2px solid #000;
	border-bottom: 2px solid #000;
}

.nav-bar {
	display: flex;
	align-items: center;
	min-height: 52px;
}

.nav-toggle {
	display: none;
	margin: 8px 0;
	background: transparent;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 4px;
	padding: 8px 14px;
	font-size: 16px;
	cursor: pointer;
}

.nav-list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 6px 0;
}

.nav-list a {
	display: block;
	width: 120px;
	text-align: center;
	color: #fff;
	text-decoration: none;
	font-size: 20px;
	line-height: 1.3;
	padding: 6px 4px;
	border-radius: 5px;
}

.nav-list a:hover,
.nav-list a:focus {
	background: #cceaea;
	color: #333;
}

.nav-list .current-menu-item > a,
.nav-list .current_page_item > a {
	background: #444;
	color: #fff;
}

/* Hero: 元画像は 960x360。本文カラムと同じ幅に収める */
.hero {
	position: relative;
	width: var(--container);
	max-width: 100%;
	margin: 0 auto;
	height: auto;
	aspect-ratio: 960 / 360;
	background: #0e2a33;
	overflow: hidden;
}

.slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.8s ease;
	z-index: 0;
}

.slide.is-active { opacity: 1; z-index: 1; }

.slide img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
	max-width: none;
}

.slide-caption {
	position: absolute;
	left: 18px;
	right: 70px;
	bottom: 16px;
	margin: 0;
	padding: 10px 14px;
	border-radius: 5px;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 13px;
	line-height: 1.55;
}

.hero-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.88);
	color: #222;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.hero-btn:hover { background: #fff; }

.hero-prev { left: 10px; }

.hero-next { right: 10px; }

/* Home blocks */
.home-top,
.home-main {
	padding-top: 22px;
}

.layout-top,
.layout-main {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 230px;
	gap: 22px;
	align-items: start;
}

.tab-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tab-nav button {
	appearance: none;
	background: #f3f3f3;
	border: 1px solid #cfcecd;
	border-bottom: 0;
	color: #333;
	padding: 9px 16px;
	font-size: 14px;
	cursor: pointer;
	font-family: inherit;
}

.tab-nav button.is-active {
	background: #fff;
	color: var(--blue);
	font-weight: bold;
}

.tab-panel {
	display: none;
	border: 1px solid #e4e4e4;
	background: #fff;
	padding: 16px 12px 8px;
	min-height: 230px;
}

.tab-panel.is-active { display: block; }

.service-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}

.service-card { text-align: center; }

.service-card h3 {
	margin: 10px 0 0;
	font-size: 16px;
	font-weight: bold;
	color: #333;
}

.service-card p {
	margin: 0 0 8px;
	color: #777;
	font-size: 12px;
}

.service-visual {
	position: relative;
	display: block;
	color: #fff;
	text-decoration: none;
}

.service-visual img {
	display: block;
	width: 100%;
	height: 147px;
	object-fit: cover;
	max-width: none;
}

.service-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	background: var(--blue-deep);
	color: #fff;
	text-align: left;
	font-size: 12px;
	line-height: 1.35;
	padding: 6px 22px 6px 8px;
}

.service-plus {
	position: absolute;
	right: 3px;
	bottom: 3px;
	width: 16px;
	height: 16px;
	background: #3aa9d6;
	color: #fff;
	font-size: 14px;
	line-height: 16px;
	text-align: center;
	font-weight: bold;
}

.info-row {
	display: flex;
	gap: 16px;
	align-items: flex-start;
}

.info-row > a {
	flex: 0 0 220px;
	width: 220px;
	line-height: 0;
}

.info-row img {
	display: block;
	width: 220px;
	max-width: none;
	height: 151px;
	object-fit: cover;
	flex: none;
}

.info-row h3 {
	margin: 0 0 8px;
	font-size: 18px;
}

.side-box {
	background: #fff;
	border: 1px solid #e5e5e5;
	margin-bottom: 16px;
}

.side-title {
	margin: 0;
	padding: 8px 12px 8px 34px;
	color: #fff;
	font-size: 18px;
	font-weight: normal;
	font-family: Oxygen, "Helvetica Neue", sans-serif;
	background: linear-gradient(#8fd4f2, #5dbfe6);
	position: relative;
}

.side-title::before {
	content: "";
	position: absolute;
	left: 8px;
	top: 50%;
	width: 18px;
	height: 18px;
	margin-top: -9px;
	background: #3aaad4;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
}

.side-title::after {
	content: "";
	position: absolute;
	left: 13px;
	top: 50%;
	margin-top: -3px;
	border: 4px solid transparent;
	border-left-color: #fff;
}

.side-body { padding: 10px; }

.side-body img { display: block; width: 100%; height: auto; }

.facebook-note {
	display: block;
	margin-top: 8px;
	color: #333;
	text-decoration: none;
	font-size: 13px;
	line-height: 1.5;
}

.facebook-note:hover { color: var(--blue); }

.readon {
	display: inline-block;
	margin-top: 8px;
	padding: 4px 12px;
	border: 1px solid rgba(0, 0, 0, 0.2);
	border-radius: 2px;
	background: #f4f4f4;
	color: #333;
	text-decoration: none;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.readon:hover {
	background: var(--blue-deep);
	color: #fff;
}

.line-add img { width: auto; height: 36px; }

.guide-link {
	display: block;
	margin: 0 0 4px;
}

.guide-link img {
	width: 100%;
	height: auto;
}

.guide-copy {
	margin: 0 0 12px;
	font-size: 13px;
	line-height: 1.55;
}

.news-title {
	margin: 8px 0 18px;
	text-align: center;
	font-size: 28px;
	font-weight: normal;
	color: #6d6d6d;
	font-family: Oxygen, "Helvetica Neue", Arial, sans-serif;
}

.news-lead {
	margin: 0 0 18px;
	padding: 8px 4px 16px;
	border-bottom: 1px solid #eee;
}

.feature-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 22px;
}

.feature-card h2 {
	margin: 10px 0;
	text-align: center;
	font-size: 20px;
	font-weight: normal;
	color: #333;
	font-family: Oxygen, "Helvetica Neue", Arial, sans-serif;
}

.feature-card img {
	display: block;
	width: 100%;
	height: 180px;
	object-fit: cover;
}

/* Inner pages */
.page-main { padding: 28px 0 40px; }

.entry-content h2 {
	margin: 1.4em 0 0.6em;
	padding-bottom: 0.35em;
	border-bottom: 3px solid var(--blue);
	font-family: Oxygen, "Helvetica Neue", Arial, sans-serif;
	font-size: 26px;
	font-weight: normal;
	color: #333;
	line-height: 1.4;
}

.entry-content h2:first-child { margin-top: 0; }

.table-scroll {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 1em 0;
}

.entry-content table {
	border-collapse: separate;
	border-spacing: 1px;
	background: #c0c0c0;
	width: 100%;
}

.entry-content th,
.entry-content td {
	padding: 6px 8px;
	vertical-align: middle;
	line-height: 1.45;
}

.entry-content th:not([bgcolor]),
.entry-content td:not([bgcolor]) {
	background: #fff;
}

.entry-content iframe {
	width: 100%;
	max-width: 100%;
	height: 420px;
	border: 0;
}

.entry-content ul.actions { display: none; }

/* Footer */
.site-footer {
	background: var(--footer);
	color: #cfd0d2;
	padding: 34px 0 20px;
	margin-top: 28px;
	box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.8);
}

.footer-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 28px;
}

.site-footer h2 {
	margin: 0 0 12px;
	padding-bottom: 6px;
	border-bottom: 2px solid var(--blue);
	color: #fff;
	font-size: 22px;
	font-weight: normal;
	font-family: Oxygen, "Helvetica Neue", Arial, sans-serif;
}

.site-footer p { margin: 0.35em 0; }

.site-footer a { color: #9ad8ef; text-decoration: none; }

.site-footer a:hover { text-decoration: underline; }

.footer-place {
	display: flex;
	gap: 8px;
	align-items: flex-start;
	margin-bottom: 8px;
}

.footer-place img { width: 18px; height: auto; margin-top: 4px; flex: none; }

.tel-lg {
	font-size: 22px;
	color: #fff;
}

.copyright {
	background: #1b1c20;
	color: #bdbdbd;
	padding: 12px 0;
	font-size: 13px;
}

.copyright-inner {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 12px;
}

.copyright-logo { justify-self: end; }

.copyright-logo img { width: 120px; height: auto; display: block; }

.totop {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: #fff;
	text-decoration: none;
	letter-spacing: 0.08em;
}

.totop-arrow {
	display: inline-block;
	width: 0;
	height: 0;
	border-left: 6px solid transparent;
	border-right: 6px solid transparent;
	border-bottom: 8px solid var(--blue);
}

@media (max-width: 980px) {
	.container { width: auto; padding-left: 14px; padding-right: 14px; }

	.header-inner {
		flex-direction: column;
		align-items: flex-start;
		min-height: 0;
		padding: 14px 0 10px;
	}

	.site-logo img,
	.header-phone img { width: min(100%, 360px); }

	.hero {
		width: auto;
		margin-left: 14px;
		margin-right: 14px;
	}

	.layout-top,
	.layout-main,
	.feature-grid,
	.footer-grid { grid-template-columns: 1fr; }

	.service-grid { grid-template-columns: 1fr 1fr; }

	.copyright-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }

	.copyright-logo { justify-self: center; }
}

@media (max-width: 720px) {
	.nav-toggle { display: inline-block; }

	.nav-list {
		display: none;
		flex-direction: column;
		align-items: stretch;
		width: 100%;
		padding-bottom: 10px;
	}

	.nav-list.is-open { display: flex; }

	.nav-list a {
		width: auto;
		text-align: left;
		font-size: 18px;
		padding: 10px 8px;
	}

	.nav-bar { flex-wrap: wrap; }

	.hero {
		height: auto;
		aspect-ratio: auto;
		width: auto;
		margin-left: 0;
		margin-right: 0;
	}

	.slide {
		position: relative;
		display: none;
		opacity: 1;
	}

	.slide.is-active { display: block; }

	.slide img {
		height: auto;
		object-fit: contain;
	}

	.slide-caption {
		position: static;
		left: auto;
		right: auto;
		bottom: auto;
		border-radius: 0;
		font-size: 13px;
	}

	.hero-btn { top: 28%; }

	.service-grid,
	.info-row { grid-template-columns: 1fr; display: grid; }

	.info-row { display: block; }

	.info-row > a {
		display: block;
		width: 100%;
		flex: none;
	}

	.info-row img {
		width: 100%;
		max-width: 100%;
		height: auto;
		max-height: 220px;
		margin-bottom: 10px;
	}

	.tab-nav {
		flex-wrap: nowrap;
		overflow-x: auto;
	}

	.tab-nav button {
		flex: 0 0 auto;
		padding: 10px 12px;
		font-size: 14px;
	}

	.news-title { font-size: 22px; }

	.feature-card img { height: auto; max-height: 220px; }

	.entry-content h2 { font-size: 22px; }

	.tel-lg { font-size: 20px; }

	.hero-btn { width: 32px; height: 32px; font-size: 18px; }
}
