/* MediLinkX TOPページ（カードメニュー＋お知らせ一覧）
 * セレクタは .mk-home 起点で二重に指定し、SWELL本体CSS（.post_content a / p 等）より
 * 詳細度を高くして上書きされないようにしている。
 */

.mk-home {
	max-width: 860px;
	margin: 0 auto;
}

/* ===================== カードメニュー ===================== */

.mk-home .mk-home-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 14px;
	margin: 0 0 40px;
}

/* SWELLの本文リンク装飾（下線・色・ホバー）を打ち消す */
.mk-home .mk-home-card,
.mk-home .mk-home-card:hover,
.mk-home .mk-home-card:visited {
	text-decoration: none;
	color: #2f3d3a;
}

.mk-home .mk-home-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 24px 16px 20px;
	background: #fff;
	border: 1px solid #dfe8e5;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.mk-home .mk-home-card:hover {
	border-color: #5bc8ac;
	box-shadow: 0 4px 12px rgba(91, 200, 172, 0.25);
	transform: translateY(-2px);
}

.mk-home .mk-home-card-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: #e6f7f2;
	color: #38a68a;
}

.mk-home .mk-home-card-icon svg {
	width: 27px;
	height: 27px;
}

.mk-home .mk-home-card-title {
	font-weight: 700;
	font-size: 1em;
	line-height: 1.4;
	text-align: center;
}

.mk-home .mk-home-card-desc {
	font-size: 0.8em;
	color: #6f7f7a;
	text-align: center;
	line-height: 1.6;
}

/* ===================== お知らせ見出し ===================== */

/* SWELLの h2 装飾（濃色バナー背景・白文字・ボーダー・疑似要素）を打ち消し、
 * 他ページの見出しと揃うシンプルなスタイルに上書きする */
.mk-home h2.mk-home-heading {
	background: none;
	background-color: transparent;
	background-image: none;
	border: none;
	border-bottom: 2px solid #5bc8ac;
	border-radius: 0;
	box-shadow: none;
	padding: 0 0 10px;
	margin: 0 0 18px;
	color: #2f3d3a;
	font-size: 1.25em;
	font-weight: 700;
	line-height: 1.4;
	letter-spacing: 0.02em;
	text-align: left;
}

.mk-home h2.mk-home-heading::before,
.mk-home h2.mk-home-heading::after {
	content: none;
}

/* ===================== お知らせ一覧 ===================== */

.mk-home .mk-home-empty {
	color: #777;
	padding: 24px 8px;
	margin: 0;
	text-align: center;
	background: #f7faf9;
	border-radius: 8px;
}

.mk-home .mk-home-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.mk-home .mk-home-item {
	border: 1px solid #dfe8e5;
	border-left: 5px solid #b7c4c0;
	border-radius: 8px;
	background: #fff;
	margin: 0;
	overflow: hidden;
}

.mk-home .mk-home-item.mk-home-type-release     { border-left-color: #5bc8ac; }
.mk-home .mk-home-item.mk-home-type-maintenance { border-left-color: #f0a832; }
.mk-home .mk-home-item.mk-home-type-info        { border-left-color: #8fa8b8; }
.mk-home .mk-home-item.is-important             { border-left-color: #e0564a; background: #fffaf9; }

.mk-home .mk-home-summary {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	padding: 12px 14px;
	margin: 0;
	cursor: pointer;
	line-height: 1.5;
	/* テーマ側の details/summary 装飾（マーカー等）を打ち消す */
	list-style: none;
	background: none;
	border: none;
}

.mk-home .mk-home-summary::-webkit-details-marker { display: none; }
.mk-home .mk-home-summary::marker { content: ""; }

.mk-home .mk-home-summary::before { content: none; }

.mk-home .mk-home-summary::after {
	content: "▾";
	margin-left: auto;
	color: #9ab0aa;
	font-size: 0.85em;
	transition: transform 0.15s ease;
}

.mk-home .mk-home-item[open] > .mk-home-summary::after {
	transform: rotate(180deg);
}

.mk-home .mk-home-badge {
	flex-shrink: 0;
	font-size: 0.72em;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: #fff;
	padding: 2px 9px;
	border-radius: 999px;
	background: #8fa8b8;
	white-space: nowrap;
}

.mk-home .mk-home-type-release     .mk-home-badge { background: #5bc8ac; }
.mk-home .mk-home-type-maintenance .mk-home-badge { background: #f0a832; }

.mk-home .mk-home-badge.mk-home-badge-imp { background: #e0564a; }

.mk-home .mk-home-date {
	flex-shrink: 0;
	font-size: 0.82em;
	color: #7c8a86;
	font-variant-numeric: tabular-nums;
}

.mk-home .mk-home-title {
	font-weight: 600;
	color: #2f3d3a;
}

.mk-home .mk-home-body {
	padding: 4px 16px 14px;
	border-top: 1px dashed #e4ecea;
	color: #40504c;
	font-size: 0.95em;
	line-height: 1.8;
}

.mk-home .mk-home-body p {
	margin: 0.6em 0;
}

/* ===================== お問い合わせ（右下ボタン＋モーダル） ===================== */

.mk-contact-fab {
	position: fixed;
	right: 20px;
	bottom: 20px;
	/* SWELLの固定ヘッダー(z-index:~9999)や管理バー(99999)より手前に出す */
	z-index: 99998;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	border: none;
	border-radius: 999px;
	background: #5bc8ac;
	color: #fff;
	font-size: 0.95em;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(91, 200, 172, 0.45);
	transition: background 0.15s ease, transform 0.15s ease;
}

.mk-contact-fab:hover {
	background: #46b89b;
	transform: translateY(-2px);
	color: #fff;
}

.mk-contact-fab svg {
	width: 20px;
	height: 20px;
}

.mk-contact-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(30, 45, 42, 0.55);
}

.mk-contact-overlay[hidden] { display: none; }

body.mk-contact-lock { overflow: hidden; }

.mk-contact-modal {
	position: relative;
	width: min(560px, 100%);
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	background: #fff;
	border-radius: 12px;
	border-top: 5px solid #5bc8ac;
	padding: 28px 26px 26px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.mk-contact-close {
	position: absolute;
	top: 10px;
	right: 12px;
	border: none;
	background: none;
	font-size: 26px;
	line-height: 1;
	color: #9ab0aa;
	cursor: pointer;
	padding: 4px 8px;
}

.mk-contact-close:hover { color: #5f736e; }

/* SWELLのh3装飾を打ち消してモーダル内見出しをシンプルに */
.mk-contact-modal h3.mk-contact-title {
	background: none;
	border: none;
	border-radius: 0;
	box-shadow: none;
	padding: 0 0 12px;
	margin: 0 0 14px;
	border-bottom: 2px solid #5bc8ac;
	color: #2f3d3a;
	font-size: 1.1em;
	font-weight: 700;
}

.mk-contact-modal h3.mk-contact-title::before,
.mk-contact-modal h3.mk-contact-title::after { content: none; }

.mk-contact-modal .mk-contact-label {
	display: block;
	margin: 0 0 14px;
	font-size: 0.88em;
	font-weight: 600;
	color: #40504c;
}

.mk-contact-modal .mk-contact-req {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 8px;
	border-radius: 999px;
	background: #5bc8ac;
	color: #fff;
	font-size: 0.75em;
	font-weight: 700;
	vertical-align: 1px;
}

.mk-contact-modal .mk-contact-label select,
.mk-contact-modal .mk-contact-label input,
.mk-contact-modal .mk-contact-label textarea {
	display: block;
	width: 100%;
	margin-top: 6px;
	padding: 9px 12px;
	border: 1px solid #cfdcd8;
	border-radius: 8px;
	background: #fff;
	font-size: 0.95rem;
	font-weight: 400;
	line-height: 1.6;
	box-sizing: border-box;
}

.mk-contact-modal .mk-contact-label select:focus,
.mk-contact-modal .mk-contact-label input:focus,
.mk-contact-modal .mk-contact-label textarea:focus {
	outline: none;
	border-color: #5bc8ac;
	box-shadow: 0 0 0 3px rgba(91, 200, 172, 0.2);
}

/* ハニーポット（スパム対策の不可視フィールド） */
.mk-contact-modal .mk-contact-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.mk-contact-modal .mk-contact-note {
	margin: 0 0 14px;
	font-size: 0.8em;
	color: #7c8a86;
}

.mk-contact-modal .mk-contact-error {
	margin: 0 0 12px;
	padding: 9px 12px;
	border-radius: 8px;
	background: #fdecea;
	border: 1px solid #f3b6b0;
	color: #b3382e;
	font-size: 0.88em;
}

.mk-contact-modal .mk-contact-submit {
	display: block;
	width: 100%;
	padding: 12px;
	border: none;
	border-radius: 8px;
	background: #5bc8ac;
	color: #fff;
	font-size: 1em;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s ease;
}

.mk-contact-modal .mk-contact-submit:hover:not(:disabled) { background: #46b89b; }
.mk-contact-modal .mk-contact-submit:disabled { background: #a8ddd0; cursor: default; }

.mk-contact-done { text-align: center; padding: 12px 0 4px; }

.mk-contact-done .mk-contact-done-icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 12px;
	border-radius: 50%;
	background: #e6f7f2;
	color: #38a68a;
	font-size: 28px;
	font-weight: 700;
	line-height: 56px;
}

.mk-contact-done p { margin: 0 0 16px; color: #40504c; line-height: 1.8; }

@media (max-width: 600px) {
	.mk-home .mk-home-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 32px; }
	.mk-home .mk-home-card { padding: 18px 10px 14px; }
	.mk-home .mk-home-summary { padding: 10px 12px; }
	.mk-home .mk-home-title { width: 100%; order: 10; }
	.mk-contact-fab { right: 14px; bottom: 14px; padding: 11px 16px; }
	.mk-contact-modal { padding: 22px 18px 20px; }
}
