@charset "utf-8";

/* 共通変数の定義 */
:root {
	--sec-border: #dcdfeb;
	--color: #19a79e;
	--tab: #19a79e;
}

/* 外枠デザイン */
.guide-map {
	padding-bottom: 0;
	background: #f5f5f5;
}

.guide-map__inner {
	margin: 40px auto 0;
	width: 100%;
	max-width: 1700px;
	box-sizing: border-box;
	padding: 0 16px;
	background: #f5f5f5;
}

/* MAP 全体構造 */
#tabpanel-map-ishigaki {
	margin: 0 auto;
	width: 100%;
	max-width: 1236px;
	box-sizing: border-box;
}

.guidemap__body {
	width: 100%;
	background: #bbe5ff;
	border-radius: 8px;
	overflow: hidden;
	box-sizing: border-box;
}

.guidemap__body-area {
	position: relative;
	width: 100%;
}

.guidemap__body-area-img {
	width: 100%;
	height: auto;
}

.guidemap__body-area-img img {
	width: 100%;
	height: auto;
	display: block;
}

/* ピン・ボタン設定 */
.guidemap__modal-bt {
	position: absolute;
	padding: 6px 20px 6px 8px;
	line-height: 1;
	color: #135482;
	font-size: 1.2rem;
	font-weight: bold;
	border-radius: 50vw;
	background: #fff;
	box-shadow: 2px 2px 0px 0px rgba(140, 180, 242, 0.4);
	white-space: nowrap;
	transition: background .2s ease-out;
	cursor: pointer;
	border: none;
}

.guidemap__modal-bt.-city { color: #b39050; }
.guidemap__modal-bt--ico {
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 1.6rem;
	line-height: 1;
}

/* ピン位置設定 */
.guidemap__modal-bt.-yaima { right: 34%; bottom: 61%; }
.guidemap__modal-bt.-limestonecave { right: 2%; top: 65%; }
.guidemap__modal-bt.-kabira { right: 22%; bottom: 73%; }
.guidemap__modal-bt.-iriomoteisland { left: 3%; top: 35%; }
.guidemap__modal-bt.-taketomiisland { left: 40%; top: 57%; }
.guidemap__modal-bt.-ishigakiisland { left: 64%; top: 6%; }
.guidemap__modal-bt.-yonaguniisland { left: 2%; bottom: 14%; }

/* スポットリスト設定 */
.guidemap__spotlist-item {
	position: absolute;
	display: inline-flex;
	align-items: flex-start;
	flex-wrap: wrap;
	color: #174873;
	line-height: 1.3;
	font-size: 1.2rem;
	font-weight: 500;
}

.guidemap__spotlist-item--air-line {
	display: inline-block;
	padding-left: 1em;
	font-weight: 500;
}

.guidemap__spotlist.-ishigaki .guidemap__spotlist-item:first-child { left: 80%; top: 41%; }
.guidemap__spotlist.-ishigaki .guidemap__spotlist-item:nth-child(2) { left: 83%; top: 32%; }
.guidemap__spotlist.-ishigaki .guidemap__spotlist-item:nth-child(3) { left: 7%; top: 61%; }
.guidemap__spotlist.-ishigaki .guidemap__spotlist-item:nth-child(4) { left: 41%; bottom: 51%; }
.guidemap__spotlist.-ishigaki .guidemap__spotlist-item:nth-child(5) { right: 35%; bottom: 49%; }
.guidemap__spotlist.-ishigaki .guidemap__spotlist-item:nth-child(6) { left: 49%; top: 69%; }
.guidemap__spotlist.-ishigaki .guidemap__spotlist-item:nth-child(7) { left: 26%; bottom: 69%; }
.guidemap__spotlist.-ishigaki .guidemap__spotlist-item:nth-child(8) { left: 25%; top: 91%; }
.guidemap__spotlist.-ishigaki .guidemap__spotlist-item:nth-child(9) { left: 20%; bottom: 91%; }

/* カセット表示・非表示の基本制御 */
.map-cassette__item[aria-hidden="true"] {
	display: none;
}

.map-cassette__item-wp {
	display: flex;
	flex-direction: column;
	padding-bottom: 16px;
	line-height: 1.5;
	border: solid 1px var(--sec-border);
	border-radius: 4px;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
	box-sizing: border-box;
}

.map-cassette__item-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: 16px 16px 0;
}

.map-cassette__item-body-main {
	flex: 1;
}

.map-cassette__item-ttl {
	font-size: 1.6rem;
	font-weight: bold;
}

.map-cassette__item-area {
	margin-top: 4px;
}

.map-cassette__item-area span {
	display: inline-block;
	padding: 6px 8px;
	line-height: 1;
	font-size: 1.2rem;
	border-radius: 50vw;
	background: #f5f5f5;
}

.map-cassette__item-txt {
	margin-top: 8px;
}

.map-cassette__item-image {
	order: -2;
	position: relative;
	overflow: hidden;
	padding-top: calc(375 / 500 * 100%);
}

.map-cassette__item-image img {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.map-cassette__item-bt {
	margin: 12px 16px 0;
	max-width: 500px;
}

/* ★ボタンのレイアウト調整（文字とアイコンの重ね合わせを解消） */
.map-cassette__item-bt-link {
	position: relative;
	display: flex;
	justify-content: flex-start;
	align-items: center;
	padding: 8px 30px 8px 12px; 
	min-height: 42px;
	line-height: 1.3;
	color: #fff !important;
	font-size: 1.5rem;
	font-weight: bold;
	background: var(--color);
	border-radius: 4px;
	transition: opacity .2s ease-out;
	text-decoration: none;
	box-sizing: border-box;
}

/* 左側アイコン（自然な並びにするためインライン化） */
.map-cassette__item-bt-link--ico {
	position: static;
	transform: none;
	font-size: 2.2rem;
	margin-right: 8px;
	line-height: 1;
	flex-shrink: 0;
}

/* 右側矢印アイコン */
.map-cassette__item-bt-link--arrow {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 2.2rem;
	line-height: 1;
}

.map-cassette__item-txtlink {
	margin: 12px 16px 0;
	text-align: right;
}

.map-cassette__item-txtlink--txt {
	display: inline-flex;
	align-items: center;
	color: var(--color) !important;
	font-weight: bold;
	text-decoration: none;
}

.map-cassette__item-txtlink--arrow {
	font-size: 1.8rem;
	line-height: 1;
	margin-left: 2px;
}

/* スマホ表示（960px未満）のモーダル設定 */
@media screen and (max-width: 959px) {
	.guide-map__inner { padding: 20px 12px; }

	.guidemap__body-cassette.modal {
		position: fixed;
		top: 0;
		left: 0;
		width: 100vw;
		height: 100vh;
		z-index: 99999;
		background: rgba(0, 0, 0, 0.6);
		margin: 0;
		padding: 12px;
		box-sizing: border-box;
	}

	.guidemap__body-cassette.modal .modal-block {
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		width: 90%;
		max-width: 480px;
		height: auto;
		min-height: 200px;
		max-height: 85vh;
		overflow-y: auto;
		overflow-x: hidden;
		scrollbar-gutter: stable;
		background: #fff;
		border-radius: 8px;
		padding: 0;
	}
	.guidemap__body-cassette.modal .modal-block::-webkit-scrollbar {
		width: 4px;
	}
	.guidemap__body-cassette.modal .modal-block::-webkit-scrollbar-thumb {
		background: #c1dcd5;
		border-radius: 4px;
	}

	.modal-header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 0 4px 8px;
		color: #fff;
	}

	.modal-header__close {
		position: fixed !important;
		top: 12px !important;
		right: 20px !important;
		z-index: 100000 !important;
		background: none !important;
		border: none !important;
		color: #fff !important;
		font-size: 3.6rem !important;
		font-weight: 300 !important;
		line-height: 1 !important;
		padding: 4px !important;
		cursor: pointer !important;
		outline: none !important;
	}

	.guidemap__body-cassette.modal .modal-content {
		display: block;
		height: auto;
		min-height: inherit;
		padding: 10px;
		background: #fff;
		position: static;
		transform: none;
		overflow: visible;
		border: solid 5px #d2e4df;
		border-radius: 4px;
	}
	
	.guidemap__body-cassette.modal .map-cassette__item-bt-link {
		position: relative !important;
		display: flex !important;
		justify-content: center !important;
		align-items: center !important;
		padding: 10px 30px 10px 48px !important;
		font-size: 1.4rem !important;
		min-height: 42px !important;
	}

	.guidemap__body-cassette.modal .map-cassette__item-bt-link--ico,
	.guidemap__body-cassette.modal i.cassette__item-bt-link--ico {
		position: absolute !important;
		left: 14px !important;
		top: 50% !important;
		transform: translateY(-50%) !important;
		font-size: 2.0rem !important;
		margin: 0 !important;
	}

	.guidemap__body-cassette.modal .map-cassette__item-bt-link--arrow,
	.guidemap__body-cassette.modal i.cassette__item-bt-link--arrow {
		position: absolute !important;
		right: 12px !important;
		top: 50% !important;
		transform: translateY(-50%) !important;
		font-size: 1.8rem !important;
		margin: 0 !important;
	}

	.guidemap__body-cassette.modal .map-cassette__item[aria-hidden="false"] {
		display: block !important;
		height: auto !important;
		visibility: visible !important;
		opacity: 1 !important;
	}

	.guidemap__body-cassette.modal .map-cassette__item[aria-hidden="true"] {
		display: none !important;
	}
}

/* PC表示（960px以上）のレイアウト設定 */
@media print, screen and (min-width: 960px) {
	.guide-map__inner { padding: 40px 24px; }

	.guidemap__body {
		display: flex;
		align-items: flex-start;
		justify-content: space-between;
		padding: 10px;
	}

	.guidemap__body-area {
		flex: 1 1 0%;
		min-width: 0;
		margin-right: 30px;
	}

	.guidemap__body-cassette {
		display: block;
		visibility: visible;
		opacity: 1;
		flex: 0 0 380px;
		width: 380px;
		min-height: 100px;
		height: auto;
		margin: 22px 22px 0 0;
		padding: 0;
	}
	
	.modal-header__close {
		display: none !important;
	}

	.guidemap__body-cassette .modal-block {
		display: block;
		position: static;
		transform: none;
		width: 100%;
		max-width: 100%;
		height: auto;
		background: transparent;
		border-radius: 0;
		padding: 0;
		margin: 0;
		box-shadow: none;
	}

	.guidemap__body-cassette .modal-content {
		margin: 0;
		padding: 0;
		width: 100%;
		max-width: 100%;
		height: inherit;
		overflow: hidden;
		background: none;
		display: block;
		max-height: none;
		overflow: visible;
		position: static;
		transform: none;
	}

	.map-cassette__item[aria-hidden="false"] {
		display: block;
		height: auto;
		visibility: visible;
		opacity: 1;
	}

	.guidemap__modal-bt {
		display: block;
		padding: 8px 40px 8px 16px;
		font-size: 1.8rem;
		box-shadow: 4px 4px 0px 0px rgba(140, 180, 242, 0.4);
	}

	.guidemap__modal-bt:not(.is-active):hover { 
		background: #dcdfeb; 
	}
	.guidemap__modal-bt.-city:not(.is-active):hover { 
		background: #f3f1ed; 
	}
	.guidemap__modal-bt--ico { 
		right: 12px; font-size: 2.5rem; 
	}
	.guidemap__modal-bt.is-active { 
		color: #fff; background: #135482; 
	}
	.guidemap__modal-bt.-city.is-active { 
		color: #fff; background: #b39050; 
	}

	.guidemap__spotlist-item--air-line { 
		display: inline; padding-left: 0; 
	}
	.guidemap__spotlist-item {
		position: absolute;
		color: #174873;
		font-size: 1.8rem;
		font-weight: 500;
	}

	.map-cassette__item-wp { 
		width: 100%;
		padding-bottom: 20px;
		border: solid 3px #d3d3d3;
		border-radius: 4px; 
	}
	.map-cassette__item-body { 
		padding: 16px 20px 0; 
	}
	.map-cassette__item-ttl { 
		font-size: 1.8rem; 
	}
	.map-cassette__item-bt { 
		margin: 12px 16px 0; 
	}
	.map-cassette__item-bt-link { 
		position: relative;
		display: flex;
		justify-content: center;
		align-items: center;
		padding: 10px 32px 10px 44px;
		min-height: 44px;
		line-height: 1.3;
		color: #fff;
		font-size: 1.5rem;
		font-weight: bold;
		background: var(--color);
		border-radius: 4px;
		transition: opacity .2s ease-out;
		text-decoration: none;
		box-sizing: border-box; 
	}
	.map-cassette__item-bt-link--ico { 
		position: absolute;
		left: 12px;
		top: 50%;
		transform: translateY(-50%);
		font-size: 2.2rem;
		line-height: 1;
		margin: 0;
		width: auto;
		height: auto;
		pointer-events: none; 
	}
	.map-cassette__item-bt-link--arrow { 
		position: absolute;
		right: 10px;
		top: 50%;
		transform: translateY(-50%);
		font-size: 2.0rem;
		line-height: 1;
		margin: 0;
		pointer-events: none;
	}
	.map-cassette__item-txtlink { 
		margin: 12px 16px 0; 
	}
	.map-cassette__item-txtlink--arrow { 
		font-size: 1.8rem; 
		line-height: 1; 
	}
	.map-cassette__item-bt-link:hover,
	.map-cassette__item-txtlink:hover { 
		opacity: .7; 
	}
}