@charset "UTF-8";

/* //////////////////////////////////////////////////////////// */
/* article */
/* //////////////////////////////////////////////////////////// */
#contents a:has([href]):not([href^="/"]):not([href^="."]):not([href^="https://www.pref.nagasaki.jp"]):not([href^="#"]) {
	&::after {
		content: "";
		width: 1.2em;
		height: 1.2em;
		margin-left: .3em;
		display: inline-block;
		vertical-align: text-top;
		background-color: var(--link-color);
		mask-image: url(../img/icon_link.svg);
		mask-size: 100% 100%;
	}
	&[href^="tel:"]::after {
		mask-image: url(../img/icon_tel.svg);
	}

	h3 &::after {
		transform: translate(0, -50%) rotate(0deg);
	}
}

/* パンくずから固定ページを削除 */
#bredcrumble .page:has(a[href="/pages/"]) {
	display: none;
}

/* 新着情報が無かった場合の処理 */
#contents-news h2 + .btn-box {
	&::before {
		content: "新着情報はありません。";
		width: 100%;
		margin-bottom: 1.4em;
		display: block;
		text-align: center;
	}

	& a {
		display: none;
	}
}

/* 相談窓口テーブル調整 */
#bredcrumble:has(a[href$="/sodan/"]) ~ article #contents-body table td {
	&:nth-child(1),
	&:nth-child(2) {
		width: 25%;
	}
	&:nth-child(3),
	&:nth-child(4) {
		width: 15%;
	}
	
	& [data-column-name="電話番号"] {
		white-space: nowrap;
		display: inline-block;
	}
}

#contents-news > .container > div:not(:last-child) {
	display: none;
}
#press-header {
	width: 100%;
	height: calc(100vw * 17 / 72);
	background-color: #EEE;
	background-image: url(../img/press-header-sp.jpg);
	background-size: contain;
	background-position: center;
	background-repeat: no-repeat;
}
#press-search {
	margin-bottom: 1.6em;
	display: flex;

	& input[type="text"] {
		color: var(--font-color);
		background-color: var(--htitle);
		border-radius: 5px 0 0 5px;
	}
	& input[type="submit"] {
		width: 120px;
		font-size: 1em;
		background-color: var(--accent-color);
		background-color: rgb(from var(--accent-color) r g b / 0.8);
		border: none;
		border-radius: 0 5px 5px 0;
	}
}
#press-header ~ #contents-body,
#contents #contents-body .news-index {
	& .news-list {
		margin-bottom: 0;

		& li {
			padding: 1em 0 0;
			border-top: 1px dashed var(--border-color2);
			border-bottom: none;

			& div {
				& a {
					display: block;
				}
				& span {
					display: block;
					opacity: .5;
				}
			}
		}
	}
}
#contents #contents-body .news-index {
	& .news-list {
		& li {
			padding: 0 0 1em;
			border-top: none;
			border-bottom: 1px dashed var(--border-color2);
		}
	}
}

iframe[src^="https://www.google.com/maps/"] {
	width: 100%;
}

/* 新着情報一覧 */
#contents #contents-body .news-index .news-list small {
	display: none;
}

#contents .category-nodes .not-news-list,
#contents #contents-news .not-news-list {
	text-align: center;
}
#contents .category-nodes .not-news-list + .btn-box,
#contents #contents-news .not-news-list + .btn-box,
#contents .category-nodes .news-list:not(:has(.hide)) + .btn-box,
#contents #contents-news .news-list:not(:has(.hide)) + .btn-box {
	display: none;
}

#contents #contents-news .news-list li.hide,
#contents #contents-body .news-list li.hide {
	max-height: 0;
	margin-bottom: 0;
	padding-bottom: 0;
	overflow: hidden;
	border-bottom-color: transparent;
	transition: .3s;

	&.show {
		max-height: 5em;
		margin-bottom: 1em;
		padding-bottom: 1em;
		border-bottom-color: var(--border-color2);
	}
}

#contents #contents-body .news-list:last-child li:last-child {
	margin-bottom: -1.1em;
	border-bottom: none;
}

/* 知事の活動記録のページリストを非表示 */
body:has(#bredcrumble a[href$="/johohashin/gyoji/"]) {
	& #contents #contents-body .menu-list {
		display: none;
	}
}

/* カテゴリー第3階層の新着情報と掲載元を削除 */
body:has(#bredcrumble a[href$="/bunrui/"]):has(#bredcrumble meta[content="5"]) {
	&:not(:has(#bredcrumble meta[content="6"])) {
		& article #contents-news {
			padding: 0;
		}
		& article #contents-news > .container,
		& aside {
			display: none;
		}
	}
}

/* 分類 > 県政情報 > 広報 > 情報発信 > 知事の活動記録の新着情報を削除 */
#body--bunrui-kenseijoho-koho-johohashin-gyoji-index {
	& #contents {
		& #contents-news {
			
			& .container {
				display: none;
			}
		}
		& #contents-body {
			margin-top: -40px;
		}
	}
}

/* //////////////////////////////////////////////////////////// */
/* aside */
/* //////////////////////////////////////////////////////////// */
aside {
	margin: 60px auto -20px;
	padding: 20px;
	position: relative;
	color: var(--white);
	z-index: 1;

	&:has(dl dt a:empty) {
		display: none;
	}


	& section {

		& h2 {
			margin-bottom: 20px;
			display: flex;
			justify-content: center;
			align-items: center;

			&::before,
			&::after {
				content: "";
				width: 3em;
				height: 1px;
				margin: 0 5px;
				display: inline-block;
				background-color: var(--white);
			}
		}

		& dl {
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;

			& dt {
				margin-bottom: 1em;
				text-align: center;

				& .btn {
					display: inline-block;
				}
			}

			& dd {
				margin-bottom: 1em;

				& > p,
				& > div {
					min-height: 1.4em;
					margin-bottom: .7em;
					padding-left: 8em;
					position: relative;
					line-height: 1.4;

					& span {
						width: 7.5em;
						position: absolute;
						left: 0;
						text-align: right;
					}
				}
			}

			& a {
				color: var(--white) !important;
			}
		}

		&.press-release {
			& > div {
				margin-bottom: 20px;
				padding: 20px;
				display: none;
				border: 1px solid var(--white);
				border-radius: 10px;

				&:has(div > div:not(:empty)) {
					display: flex;
					justify-content: space-evenly;
                    align-items: flex-start;
					gap: 20px;
					line-height: 1.4;

					& > *:nth-child(2),
					& > *:nth-child(3) {
						flex-shrink: 0;
					}
				}
			}
		}

		& .btn {
			display: block;
			text-align: center;
			color: var(--white) !important;
			border-color: var(--white);
		}
	}
}












/* /////////////////////////////////////////////////////////////////////////////////////// */
/* PC *//* /////////////////////////////////////////////////////////////////////////////////////// */
@media screen and (min-width: 1100px) {
	/* パンくず調整 */
	#bredcrumble {
		& .page:has([href="/.s1/preview/pages/"]) {
			display: none;
		}
	}

	#contents {
		#press-header {
			height: 160px;
			background-image: url(../img/press-header-pc.jpg);
		}

		& .news-list {
			margin-bottom: 30px;

			& > li {
				display: flex;
				align-items: center;

				&::before {
					content: "";
					width: 0;
					height: 0;
					margin-right: 5px;
					display: inline-block;
					border: 5px solid transparent;
					border-left: 8px solid var(--main-color);
				}

				& time {
					width: 8.5em;
					flex-shrink: 0;
				}

				& span {
					flex-grow: 2;
				}
			}
		}
	}

	#contents #contents-body .news-index .news-list small {
		display: inline-block;
		opacity: .5;
	}
	
	/* 知事の活動記録の新着情報を非表示 */
	#body--bunrui-kenseijoho-koho-johohashin-gyoji-index {
		& #contents {
			& #contents-news {
				height: 400px;
			}
			
			& #contents-body {
				margin-top: -500px;
			}
		}
	}
	
	/* コンテンツ情報のタイトル差し替え */
	#body--doc-index {
		& #contents-title h1:first-child,
		& #bredcrumble .page:last-child span:first-child {
			display: none;
		}
	}
	
	aside {
		margin-top: 0;

		& section {
			width: 770px;
			margin: 0px auto 70px;

			& h2 {
				margin-bottom: 15px;
				display: block;
				text-align: center;

				&::before,
				&::after {
					content: none;
				}
			}

			& dl {
				margin-bottom: 0;
				position: relative;
				border: 1px solid var(--white);
				border-radius: 10px;

				& dt {
					margin: 0;
					position: absolute;
					left: 20px;
					bottom: 100%;
					border-radius: 4px 4px 0 0;
					transform: translate(0, 50%);
					background-color: var(--main-color);
					background-image: url(../img/bg.png);
					background-position: bottom;

					& .btn {
						padding: 0 .5em;
						border: none;
					}
					& a.btn {
						text-decoration: underline;
					}
				}

				& dd {
					width: 100%;
					padding: 30px 20px calc(30px + 3em);
					display: flex;
					justify-content: space-evenly;
					align-items: flex-start;

					padding-bottom: 0;

					& > p,
					& > div {
						padding: 0;
						
						& span {
							width: auto;
							display: block;
							position: static;
							text-align: left;
						}
					}
				}
			}

			& > .btn {
				width: 24em;
				margin: calc(-32px - 3em) 0 0 auto;
				margin-top: 20px;
			}
		}
	}
}