/* --- CSSスタイル --- */
:root {
	--primary-color: #3498db;
	--secondary-color: #2ecc71;
	--background-color: #f4f7f9;
	--card-background: #ffffff;
	--text-color: #34495e;
	--light-text-color: #7f8c8d;
	--border-color: #dfe6e9;
}
* {
	box-sizing: border-box;
}
body {
	font-family: "Noto Sans JP", sans-serif;
	background-color: var(--background-color);
	display: flex;
	flex-direction: column; /* 要素を縦に並べる */
	justify-content: center;
	align-items: center;
	min-height: 100vh;
	margin: 0;
	padding: 20px;
	box-sizing: border-box;
	color: var(--text-color);
}

.logo {
	display: block;
	text-align: center;
	margin-bottom: 25px;
}

.logo-img {
	max-width: 250px;
	height: auto;
	transition: opacity 0.3s ease;
}

.logo-img:hover {
	opacity: 0.8;
}

.calculator-container {
	background-color: var(--card-background);
	padding: 30px 40px;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
	width: 100%;
	max-width: 500px;
	text-align: center;
	transition: transform 0.3s ease;
}

.calculator-container:hover {
	transform: translateY(-5px);
}

h1 {
	font-size: 1.7em;
	color: var(--text-color);
	margin-bottom: 10px;
}

.description {
	color: var(--light-text-color);
	margin-bottom: 35px;
	line-height: 1.6;
}

.input-group {
	margin-bottom: 25px;
	text-align: left;
}

label {
	display: block;
	margin-bottom: 8px;
	font-weight: 700;
}

select,
input[type="number"] {
	width: 100%;
	padding: 12px 15px;
	border: 1px solid var(--border-color);
	border-radius: 8px;
	font-size: 1em;
	box-sizing: border-box;
	background-color: #fdfdfd;
	transition: border-color 0.3s, box-shadow 0.3s;
}

select:focus,
input[type="number"]:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.calculate-button {
	width: 100%;
	padding: 15px;
	font-size: 1.1em;
	font-weight: 700;
	color: #fff;
	background-color: var(--primary-color);
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color 0.3s, transform 0.2s;
	margin-top: 10px;
	margin-bottom: 30px;
}

.calculate-button:hover {
	background-color: #2980b9;
	transform: translateY(-2px);
}

#result-area {
	background-color: #f8fbfd;
	border: 1px dashed var(--border-color);
	border-radius: 8px;
	padding: 25px;
	transition: all 0.3s ease;
	display: none; /* 初期状態は非表示 */
}

#result-area p:first-child {
	margin: 0 0 10px 0;
	font-weight: 700;
}

#result-area .cost {
	font-size: 2.6em;
	font-weight: 700;
	color: var(--primary-color);
	margin: 0;
	line-height: 1.2;
}

#result-area .cost .currency {
	font-size: 0.5em;
	font-weight: 400;
	margin-left: 5px;
}

#result-area .details {
	font-size: 0.8em;
	color: var(--light-text-color);
	margin: 10px 0 0 0;
	min-height: 1.2em;
	line-height: 1.5;
}

.additional-info {
	border-top: 1px solid var(--border-color);
	margin-top: 20px;
	padding-top: 20px;
	text-align: left;
	display: grid; /* Gridレイアウトに変更 */
	gap: 12px; /* カード間の余白 */
}

.additional-info p {
	color: var(--text-color);
	margin: 0;
	padding: 15px 15px 15px 50px; /* アイコン用のスペースを確保 */
	background-color: #fcfdfe;
	border: 1px solid var(--border-color);
	border-radius: 8px;
	font-weight: 400;
	line-height: 1.5;
	position: relative; /* アイコンの位置の基準 */
	transition: background-color 0.3s, border-color 0.3s;
}

.additional-info p::before {
	content: "";
	position: absolute;
	left: 15px;
	top: 50%;
	transform: translateY(-50%);
	width: 24px;
	height: 24px;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	transition: background-image 0.3s;
}

/* 各項目にアイコンを設定 */
#maintenance-schedule-info::before {
	background-image: url("./images/memo.svg");
}

#annual-usage-info::before {
	background-image: url("./images/time.svg");
}

#primary-maintenance-total-cost-info::before {
	background-image: url("./images/money.svg");
}

#primary-maintenance-lifespan-info::before {
	background-image: url("./images/calendar.svg");
}

/* ▼▼▼ メンテナンス情報がない場合のスタイル（追加） ▼▼▼ */
.additional-info p.has-no-info {
	background-color: #f8d7da;
	border-color: #f5c6cb;
}
.additional-info p.has-no-info::before {
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23721c24'%3e%3cpath d='M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z'/%3e%3c/svg%3e");
}
.additional-info p.has-no-info strong {
	color: #721c24;
}
.additional-info p.has-no-info span {
	font-weight: 400; /* 通常の太さに戻す */
	color: #721c24;
}
/* ▲▲▲ スタイル追加ここまで ▲▲▲ */

.additional-info p strong {
	display: block; /* タイトルをブロック要素に */
	color: var(--light-text-color);
	font-size: 0.8em;
	font-weight: 700;
	margin-bottom: 4px;
}

.additional-info p span {
	font-weight: 700;
	font-size: 1.1em;
	color: var(--text-color);
}

/* メンテナンス内容のテキストの太さを通常に設定 */
#maintenance-schedule-info span {
	font-weight: 400;
	font-size: 1em;
}

/* --- Info Section (Accordion) --- */
.info-section {
	width: 100%;
	max-width: 500px;
	margin-top: 40px;
}
.accordion-item {
	background: var(--card-background);
	border: 1px solid var(--border-color);
	border-radius: 12px;
	margin-bottom: 10px;
	overflow: hidden;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}
.accordion-header {
	width: 100%;
	background: transparent;
	border: none;
	padding: 15px 20px;
	font-size: 1em;
	font-weight: 700;
	text-align: left;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	color: var(--text-color);
}
.accordion-header::after {
	content: "+";
	font-size: 20px;
	color: var(--primary-color);
	transition: transform 0.3s ease;
	font-weight: 400;
}
.accordion-header.active::after {
	transform: rotate(45deg);
}
.accordion-content {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease-out;
	padding: 0 20px;
	color: var(--light-text-color);
	line-height: 1.8;
	font-size: 0.9em;
}
.accordion-header.active + .accordion-content {
	padding-top: 5px;
	padding-bottom: 20px;
}
.accordion-content p,
.accordion-content ul {
	margin-top: 0;
	margin-bottom: 15px;
}
.accordion-content ul {
	padding-left: 20px;
}
.accordion-content li {
	margin-bottom: 8px;
}

/* --- 関連コンテンツ --- */
.related-content {
	width: 100%;
	max-width: 500px;
	margin-top: 40px;
	text-align: center;
}

.article-link {
	display: block;
	background-color: #eaf5fc;
	border: 1px solid var(--primary-color);
	border-radius: 10px;
	padding: 20px;
	margin-bottom: 30px;
	text-decoration: none;
	color: var(--text-color);
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
}

.article-link:hover {
	box-shadow: 0 5px 15px rgba(52, 152, 219, 0.2);
	transform: translateY(-3px);
}

.article-link-title {
	display: block;
	font-size: 0.8em;
	font-weight: 700;
	color: var(--primary-color);
	margin-bottom: 8px;
}

.article-link-text {
	display: block;
	font-size: 1.1em;
	font-weight: 700;
	line-height: 1.5;
}

.other-links h2 {
	font-size: 1.2em;
	margin-bottom: 15px;
	color: var(--text-color);
}

.other-links {
	display: grid;
	gap: 10px;
}

.tool-link {
	display: block;
	background-color: var(--card-background);
	padding: 15px;
	border-radius: 8px;
	border: 1px solid var(--border-color);
	text-decoration: none;
	font-weight: 700;
	color: var(--text-color);
	transition: all 0.3s ease;
}

.tool-link:hover {
	background-color: var(--primary-color);
	color: #fff;
	border-color: var(--primary-color);
	transform: translateY(-2px);
}

.tool-link.official-site {
	background-color: var(--text-color);
	color: #fff;
	border-color: var(--text-color);
}

.tool-link.official-site:hover {
	background-color: #5d6d7e;
	border-color: #5d6d7e;
}

/* --- フッター・お問い合わせ --- */
footer {
	width: 100%;
	max-width: 500px;
	margin-top: 40px;
	text-align: center;
}

.contact-section {
	padding: 20px;
	border-top: 1px solid var(--border-color);
}

.contact-section p {
	color: var(--light-text-color);
	font-size: 0.85em;
	line-height: 1.7;
	margin: 0 0 15px 0;
}

.contact-link {
	display: inline-block;
	background-color: #f0f3f4;
	color: var(--text-color);
	padding: 12px 25px;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 700;
	transition: all 0.3s ease;
}

.contact-link:hover {
	background-color: #e5e9ea;
	transform: translateY(-2px);
}

/* --- スマホ表示最適化 --- */
@media (max-width: 600px) {
	body {
		padding: 10px;
	}

	.calculator-container {
		padding: 25px 20px;
	}

	h1 {
		font-size: 1.4em;
	}

	#result-area .cost {
		font-size: 2em;
	}

	.additional-info p {
		padding: 12px 12px 12px 45px;
	}

	.additional-info p::before {
		left: 12px;
		width: 20px;
		height: 20px;
	}

	.additional-info p strong {
		font-size: 0.9em;
	}
	.additional-info p span {
		font-size: 1em;
	}

	#maintenance-schedule-info span {
		font-size: 0.9em;
	}

	.related-content {
		margin-top: 30px;
	}
	.article-link-text {
		font-size: 1em;
	}

	footer {
		margin-top: 30px;
	}
}
