/* ==========================================================================
   月極駐車場のトリセツ テーマ main.css
   - カラーは :root に CSS 変数で定義 → 管理画面から上書き可
   ========================================================================== */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: "Zen Kaku Gothic New", "Noto Sans JP", -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
	color: var(--c-text, #0f172a);
	background: #fff;
	line-height: 1.8;
	font-size: 16px;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary, #2563eb); text-decoration: none; transition: color .2s; }
a:hover { opacity: .8; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4, h5, h6 {
	font-family: "Noto Sans JP", "Zen Kaku Gothic New", sans-serif;
	font-weight: 900;
	line-height: 1.4;
	letter-spacing: .02em;
}

/* ---------- Layout Container ---------- */
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.container-wide { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
	background: #fff;
	border-bottom: 1px solid #e5e7eb;
	position: sticky;
	top: 0;
	z-index: 100;
}
.site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	max-width: 1200px;
	margin: 0 auto;
}
.site-branding .site-title {
	font-size: 22px;
	font-weight: 900;
	margin: 0;
	letter-spacing: .02em;
}
.site-branding .site-title a { color: var(--c-text); }
.site-branding .site-description {
	font-size: 12px;
	color: var(--c-muted);
	margin: 2px 0 0;
}
.site-branding img { max-height: 48px; width: auto; }

.main-nav ul {
	list-style: none;
	display: flex;
	gap: 30px;
	margin: 0;
	padding: 0;
}
.main-nav a {
	color: var(--c-text);
	font-size: 15px;
	font-weight: 500;
	padding: 8px 0;
	position: relative;
}
.main-nav a::after {
	content: '';
	position: absolute;
	bottom: 0; left: 50%;
	width: 0; height: 2px;
	background: var(--c-primary);
	transition: all .25s;
	transform: translateX(-50%);
}
.main-nav a:hover::after { width: 100%; }
.header-search { background: none; border: none; padding: 8px; color: var(--c-text); }

.mobile-toggle { display: none; background: none; border: none; font-size: 26px; }

/* ---------- Hero ---------- */
.hero {
	padding: 50px 20px 60px;
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	align-items: center;
}
.hero-lead {
	color: var(--c-primary);
	font-size: 14px;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 18px;
}
.hero-lead::before, .hero-lead::after {
	content: ''; width: 18px; height: 1px; background: var(--c-primary);
}
.hero h1 {
	font-size: 42px;
	font-weight: 900;
	line-height: 1.3;
	margin: 0 0 24px;
	letter-spacing: .01em;
}
.hero h1 .accent-primary { color: var(--c-primary); }
.hero h1 .accent-underline {
	color: var(--c-primary);
	background-image: linear-gradient(transparent 70%, rgba(37, 99, 235, .2) 70%);
}

.hero-features {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
	margin: 28px 0;
}
.hero-feature {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 18px 12px;
	text-align: center;
	box-shadow: 0 1px 2px rgba(0,0,0,.04);
	transition: transform .2s, box-shadow .2s;
}
.hero-feature:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,.08); }
.hero-feature-icon {
	width: 44px; height: 44px; margin: 0 auto 10px;
	display: flex; align-items: center; justify-content: center;
	color: var(--c-primary);
}
.hero-feature-title { font-weight: 700; font-size: 14px; margin: 0 0 4px; }
.hero-feature-desc { font-size: 11px; color: var(--c-muted); margin: 0; line-height: 1.5; }

.hero-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	background: var(--c-accent, #f97316);
	color: #fff;
	padding: 18px 36px;
	border-radius: 60px;
	font-weight: 700;
	font-size: 18px;
	box-shadow: 0 8px 20px rgba(249, 115, 22, .35);
	transition: all .25s;
	width: 100%;
	max-width: 520px;
}
.hero-cta:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 26px rgba(249, 115, 22, .45);
	opacity: 1;
	color: #fff;
}
.hero-cta-tag {
	background: rgba(255,255,255,.2);
	padding: 4px 12px;
	border-radius: 30px;
	font-size: 13px;
	font-weight: 700;
}
.hero-cta-arrow { font-size: 20px; margin-left: auto; }

/* Hero Image 側 */
.hero-visual {
	position: relative;
	border-radius: 18px;
	overflow: hidden;
	aspect-ratio: 16 / 11;
	background: linear-gradient(135deg, #bae6fd 0%, #e0f2fe 100%);
}
.hero-visual img { width: 100%; height: 100%; object-fit: cover; }
.hero-speech-bubble {
	position: absolute;
	background: #fff;
	border-radius: 16px;
	padding: 10px 16px;
	font-size: 13px;
	font-weight: 500;
	box-shadow: 0 8px 20px rgba(0,0,0,.12);
	color: var(--c-text);
	max-width: 200px;
}
.hero-speech-bubble::after {
	content: '';
	position: absolute;
	left: 20px; bottom: -8px;
	border: 8px solid transparent;
	border-top-color: #fff;
}
.hero-speech-bubble:nth-of-type(1) { top: 14%; right: 10%; }
.hero-speech-bubble:nth-of-type(2) { top: 38%; right: 6%; }
.hero-speech-bubble:nth-of-type(3) { top: 62%; right: 12%; }

/* ---------- Ranking Section ---------- */
.ranking-section {
	background: #eff6ff;
	padding: 60px 20px;
}
.section-heading {
	text-align: center;
	font-size: 26px;
	font-weight: 900;
	margin: 0 0 40px;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 20px;
}
.section-heading::before, .section-heading::after {
	content: '';
	width: 30px; height: 2px;
	background: var(--c-primary);
	transform: rotate(60deg);
	display: inline-block;
}
.section-heading::after { transform: rotate(-60deg); }

.ranking-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	max-width: 1100px;
	margin: 0 auto;
}
.rank-card {
	background: #fff;
	border-radius: 12px;
	padding: 32px 24px 24px;
	position: relative;
	border: 2px solid transparent;
	transition: transform .25s, border-color .25s, box-shadow .25s;
}
.rank-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 14px 30px rgba(0,0,0,.1);
}
.rank-card.rank-1 { border-color: #fbbf24; background: #fffbeb; }
.rank-card.rank-2 { border-color: #cbd5e1; }
.rank-card.rank-3 { border-color: #f97316; }

.rank-badge {
	position: absolute;
	top: -4px; left: 20px;
	background: var(--c-primary);
	color: #fff;
	font-weight: 900;
	padding: 14px 12px 8px;
	text-align: center;
	font-size: 12px;
	border-radius: 0 0 6px 6px;
	line-height: 1.1;
}
.rank-badge::after {
	content: '';
	position: absolute;
	left: 0; bottom: -10px;
	border-left: 20px solid var(--c-primary);
	border-right: 20px solid var(--c-primary);
	border-bottom: 10px solid transparent;
}
.rank-1 .rank-badge { background: #f59e0b; }
.rank-1 .rank-badge::after { border-left-color: #f59e0b; border-right-color: #f59e0b; }
.rank-3 .rank-badge { background: #f97316; }
.rank-3 .rank-badge::after { border-left-color: #f97316; border-right-color: #f97316; }

.rank-badge strong { font-size: 18px; display: block; margin-top: 2px; }

.rank-logo {
	min-height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 16px 0 20px;
}
.rank-logo img { max-height: 40px; width: auto; }
.rank-features {
	list-style: none;
	padding: 0;
	margin: 0 0 20px;
}
.rank-features li {
	padding: 8px 0 8px 28px;
	position: relative;
	font-size: 14px;
	border-bottom: 1px solid #f3f4f6;
}
.rank-features li:last-child { border-bottom: 0; }
.rank-features li::before {
	content: '';
	position: absolute;
	left: 0; top: 50%;
	width: 20px; height: 20px;
	background: var(--c-primary);
	border-radius: 50%;
	transform: translateY(-50%);
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'><path d='M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/></svg>");
	background-size: 14px;
	background-repeat: no-repeat;
	background-position: center;
}
.rank-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	border-top: 1px solid #e5e7eb;
	margin-top: 10px;
	font-size: 13px;
}
.rank-meta-label { color: var(--c-muted); }

.rank-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--c-primary);
	color: #fff;
	padding: 14px 18px;
	border-radius: 8px;
	font-weight: 700;
	margin-top: 16px;
	transition: all .2s;
}
.rank-cta:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,.15); opacity: 1; }
.rank-1 .rank-cta { background: var(--c-accent); }

.ranking-notice {
	text-align: center;
	color: var(--c-muted);
	font-size: 12px;
	margin-top: 28px;
}

/* ---------- Benefits Section ---------- */
.benefits-section { padding: 60px 20px; }
.benefits-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	max-width: 1100px;
	margin: 0 auto;
}
.benefit-card {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 28px 20px;
	text-align: center;
	transition: transform .25s, box-shadow .25s;
}
.benefit-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,0,0,.08); }
.benefit-icon {
	width: 56px; height: 56px;
	margin: 0 auto 16px;
	display: flex; align-items: center; justify-content: center;
	color: var(--c-primary);
}
.benefit-icon svg { width: 100%; height: 100%; }
.benefit-title { font-size: 15px; font-weight: 700; margin: 0 0 10px; padding: 8px 0; border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; }
.benefit-desc { font-size: 13px; color: var(--c-muted); margin: 0; line-height: 1.6; }

/* ---------- Bottom CTA Banner ---------- */
.bottom-cta {
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: 16px;
	padding: 36px;
	max-width: 1100px;
	margin: 20px auto 60px;
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 30px;
	align-items: center;
}
.bottom-cta-text h2 {
	font-size: 22px;
	margin: 0 0 10px;
}
.bottom-cta-text p { margin: 0 0 20px; color: var(--c-muted); }
.bottom-cta-button {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	background: var(--c-accent);
	color: #fff;
	padding: 16px 32px;
	border-radius: 50px;
	font-weight: 700;
	font-size: 17px;
	box-shadow: 0 6px 16px rgba(249, 115, 22, .3);
	transition: all .2s;
	min-width: 400px;
}
.bottom-cta-button:hover {
	transform: translateY(-2px); color: #fff; opacity: 1;
	box-shadow: 0 10px 22px rgba(249, 115, 22, .4);
}

/* ---------- Article / Single ---------- */
.single-wrap {
	display: grid;
	grid-template-columns: 1fr 300px;
	gap: 40px;
	max-width: 1100px;
	margin: 40px auto;
	padding: 0 20px;
}
.article-main {
	background: #fff;
	padding: 36px 40px;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.article-title { font-size: 28px; line-height: 1.5; margin: 0 0 20px; }
.article-meta { display: flex; gap: 16px; color: var(--c-muted); font-size: 13px; margin-bottom: 24px; }
.article-thumb { margin: 0 0 30px; border-radius: 10px; overflow: hidden; }
.article-content { font-size: 16px; line-height: 1.95; }
.article-content h2 {
	font-size: 22px;
	padding: 14px 20px;
	background: var(--c-secondary);
	border-left: 6px solid var(--c-primary);
	margin: 40px 0 20px;
	border-radius: 4px;
}
.article-content h3 {
	font-size: 18px;
	padding: 10px 0 10px 18px;
	border-left: 4px solid var(--c-primary);
	margin: 30px 0 16px;
}
.article-content p { margin: 0 0 20px; }
.article-content a { color: var(--c-primary); text-decoration: underline; text-underline-offset: 3px; }
.article-content ul, .article-content ol { padding-left: 24px; margin: 0 0 20px; }
.article-content li { margin-bottom: 6px; }
.article-content blockquote {
	background: #f9fafb;
	border-left: 4px solid var(--c-muted);
	padding: 16px 20px;
	margin: 20px 0;
	color: #374151;
}
.article-content img { border-radius: 8px; margin: 20px 0; }

/* Table of Contents */
.toc {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	padding: 20px 24px;
	border-radius: 10px;
	margin: 24px 0 32px;
}
.toc-title { font-weight: 700; margin: 0 0 10px; font-size: 15px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 4px 0; font-size: 14px; }
.toc a { color: var(--c-text); }
.toc a:hover { color: var(--c-primary); }

/* CTA box (記事内自動挿入用) */
.tsukigime-cta-box {
	background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
	border: 1px solid #fcd34d;
	border-radius: 12px;
	padding: 24px;
	margin: 30px 0;
	text-align: center;
}
.tsukigime-cta-box h4 {
	font-size: 16px;
	margin: 0 0 10px;
	color: var(--c-text);
}
.tsukigime-cta-box p { font-size: 14px; color: var(--c-muted); margin: 0 0 16px; }
.tsukigime-cta-box a.cta-btn {
	display: inline-block;
	background: var(--c-accent);
	color: #fff;
	padding: 12px 32px;
	border-radius: 40px;
	font-weight: 700;
	box-shadow: 0 4px 12px rgba(249, 115, 22, .3);
}
.tsukigime-cta-box a.cta-btn:hover { transform: translateY(-2px); color: #fff; opacity: 1; }

/* 記事内広告バナー */
.tsukigime-ad-inline {
	margin: 30px 0;
	text-align: center;
	padding: 14px;
	background: #fafafa;
	border-radius: 8px;
}
.tsukigime-ad-inline::before {
	content: 'PR';
	display: inline-block;
	background: var(--c-muted);
	color: #fff;
	padding: 2px 8px;
	font-size: 10px;
	border-radius: 3px;
	margin-bottom: 8px;
}

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.widget {
	background: #fff;
	padding: 20px;
	border-radius: 10px;
	box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.widget-title {
	font-size: 15px;
	margin: 0 0 14px;
	padding: 0 0 10px;
	border-bottom: 2px solid var(--c-primary);
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid #f3f4f6; font-size: 14px; }
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--c-text); }
.widget a:hover { color: var(--c-primary); }

/* ---------- Archive / Card List ---------- */
.archive-header { text-align: center; margin: 40px 0; padding: 0 20px; }
.archive-title { font-size: 28px; margin: 0; }
.archive-desc { color: var(--c-muted); margin-top: 10px; }

.post-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	max-width: 1100px;
	margin: 0 auto 60px;
	padding: 0 20px;
}
.post-card {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	transition: transform .25s, box-shadow .25s;
	display: flex;
	flex-direction: column;
	box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.post-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,0,0,.1); }
.post-card-thumb { aspect-ratio: 16 / 10; overflow: hidden; background: #f1f5f9; }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-card-thumb img { transform: scale(1.05); }
.post-card-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.post-card-title { font-size: 16px; font-weight: 700; line-height: 1.5; margin: 0 0 10px; }
.post-card-title a { color: var(--c-text); }
.post-card-meta { display: flex; gap: 12px; font-size: 12px; color: var(--c-muted); margin-top: auto; padding-top: 10px; }
.post-card-cat {
	display: inline-block;
	background: var(--c-secondary);
	color: var(--c-primary);
	padding: 2px 10px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 700;
	margin-bottom: 8px;
	align-self: flex-start;
}

/* ---------- Pagination ---------- */
.pagination { text-align: center; margin: 40px 0; display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.pagination a, .pagination span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px; height: 40px;
	padding: 0 12px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	color: var(--c-text);
}
.pagination .current { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.pagination a:hover { border-color: var(--c-primary); color: var(--c-primary); }

/* ---------- Footer ---------- */
.site-footer {
	background: #1e293b;
	color: #cbd5e1;
	padding: 50px 20px 20px;
	margin-top: 80px;
}
.site-footer-inner {
	max-width: 1100px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: 1.2fr 1fr 1fr 1fr;
	gap: 40px;
}
.site-footer h4 { color: #fff; margin: 0 0 14px; font-size: 15px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 6px 0; font-size: 14px; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.site-footer .site-description { font-size: 13px; margin-top: 10px; opacity: .8; }
.copyright { text-align: center; padding-top: 30px; margin-top: 30px; border-top: 1px solid #334155; font-size: 13px; }

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
	max-width: 1100px;
	margin: 20px auto 0;
	padding: 0 20px;
	font-size: 12px;
	color: var(--c-muted);
}
.breadcrumbs a { color: var(--c-muted); }
.breadcrumbs a:hover { color: var(--c-primary); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.hero { grid-template-columns: 1fr; padding: 30px 20px 40px; }
	.hero h1 { font-size: 30px; }
	.ranking-grid { grid-template-columns: 1fr; }
	.benefits-grid { grid-template-columns: repeat(2, 1fr); }
	.single-wrap { grid-template-columns: 1fr; }
	.article-main { padding: 24px 20px; }
	.post-grid { grid-template-columns: 1fr 1fr; }
	.main-nav {
		display: none;
		position: absolute; top: 100%; left: 0; right: 0;
		background: #fff;
		box-shadow: 0 6px 14px rgba(0,0,0,.1);
	}
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; gap: 0; padding: 10px 20px; }
	.main-nav li { border-bottom: 1px solid #f3f4f6; }
	.main-nav a { display: block; padding: 14px 0; }
	.mobile-toggle { display: block; }
	.bottom-cta { grid-template-columns: 1fr; text-align: center; padding: 28px 20px; }
	.bottom-cta-button { min-width: 0; width: 100%; }
	.site-footer-inner { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 560px) {
	.hero h1 { font-size: 24px; }
	.hero-cta { font-size: 15px; padding: 14px 20px; }
	.benefits-grid { grid-template-columns: 1fr; }
	.post-grid { grid-template-columns: 1fr; }
	.section-heading { font-size: 20px; }
	.article-title { font-size: 22px; }
	.site-footer-inner { grid-template-columns: 1fr; }
}

/* ---------- Click Tracker Utility ---------- */
[data-aff] { cursor: pointer; }

/* ---------- 自動内部リンク ---------- */
.tsukigime-autolink {
	color: var(--c-primary, #2563eb);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-thickness: 1px;
	text-decoration-style: dotted;
	transition: color .2s;
}
.tsukigime-autolink:hover {
	text-decoration-style: solid;
	opacity: .85;
}
