/*
Theme Name: NMA
Theme URI: 
Author: LANCARD.COM inc.
Author URI: 
Description: 長崎県医師会用テーマ
Requires at least: 6.8
Tested up to: 6.8
Requires PHP: 5.7
Version: 1.0.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: twentytwentyfive
Text Domain: nma
Tags: 
*/

@keyframes scroll-hint {line-height:
	0% {
		text-shadow: 0 0 0 #FFFF;
	}
	100% {
		text-shadow: 24px 0 0 #FFF0;
	}
}

body {
	--main-color: #0043AF;
	--main-sub-color: #5380c7;
	--font-color: #000;
	--border-color: #AAA;
	--wp--style--root--padding-right : 20px;
	--wp--style--root--padding-left: 20px;

	margin: 0;
	font-size: 16px;
}

* {
	box-sizing: border-box;
}
.wp-site-blocks *:focus {
	outline: none;
}
header {
	min-height: 80px;

	body.home & {
		min-height: 0;
	}

	& .wp-block-group-is-layout-constrained {
		padding: 0;
		position: static;
	}
	
	& #header_container {
		
		& .wp-block-navigation__responsive-container-open {
			display: none;
		}
		
		& .wp-block-navigation__responsive-container {
			display: block;
			
			& > div {
				display: block;
				
				& .wp-block-navigation__responsive-container-close {
					display: none;
				}
				
				& ul.wp-block-navigation__container {
					padding: 2px;
					flex-wrap: nowrap;
					gap: 0;
					background-color: #FFF;
					
					& > .wp-block-navigation-item {
						width: 25%;
						display: flex;
						flex-direction: column;
						justify-content: center;
						align-items: center;
						font-weight: 700;
						background-image: linear-gradient(#FFF 50%, #F5F5F5 50%);
						
						&::after {
							content: "";
							width: 1px;
							height: 80px;
							display: block;
							position: absolute;
							top: calc(50% - 40px);
							left: 0;
							background-color: rgb(from var(--font-color) r g b / .25);
						}

						& .wp-block-navigation-item__content {
							width: 100%;
							height: 100%;
							padding: 10px;
							display: flex;
							flex-direction: column;
							justify-content: center;
							align-items: center;

							&::before {
								content: "";
								width: 36px;
								height: 36px;
								margin-bottom: 7px;
								background-position: center;
								background-repeat: no-repeat;
								background-size: contain;
							}
						}
						&:nth-child(1) .wp-block-navigation-item__content::before { background-image: url(img/icon_home.svg); }
						&:nth-child(2) .wp-block-navigation-item__content::before { background-image: url(img/icon_citizen.svg); }
						&:nth-child(3) .wp-block-navigation-item__content::before { background-image: url(img/icon_doctor.svg); }
						&:nth-child(4) .wp-block-navigation-item__content::before { background-image: url(img/icon_lock.svg); }
						
						& .wp-block-navigation__submenu-icon {
							display: none;
						}
						
						& .wp-block-navigation__submenu-container {
							width: 100vw;
							height: auto;
							padding: 20px;
							position: absolute;
							top: auto;
							bottom: 100%;
							left: 0;
							right: 0;
							overflow: auto;
							visibility: visible;
							opacity: 1;
							border: none;
							background-color: transparent;
							transform: translate(0, 100%);
							z-index: -1;
							transition: .3s;
							
							.open & {
								transform: translate(0, 0);
							}

							& .wp-block-navigation-item__content {
								width: auto;
								height: auto;
								padding: 0;
								display: inline;
								color: #FFF;

								&::before {
									content: "◯";
									margin-right: .5em;
									display: inline-block;
									width: auto;
									height: auto;
									margin-bottom: 0;
									background-image: none !important;
								}

								& strong {
									color: #000;
								}
							}
						}

						&:nth-child(4) .wp-block-navigation__submenu-container {
							& .wp-block-navigation-item {
								margin: 0;
							}

							& .wp-block-navigation-item__content {
								width: 100%;
								height: 100%;
								padding: 0.5em;
								display: flex;
								flex-direction: row;
								justify-content: center;
								align-items: center;
								color: #000;
								text-align: center;
								background-color: #CCEFFF;
								border-radius: 3px;
								box-sizing: border-box;

								&::before {
									content: none;
									display: none;
								}

								& .wp-block-navigation-item__label {
									line-height: 1.5;

									& strong {
										display: block;
										font-size: 1em;
										line-height: 1.3;
									}
								}
							}
						}
					}
				}
			}
		}
	}
	
	& #header_container + .wp-block-site-title {
		background-color: #FFF;
		
		& a {
			width: 264px;
			height: 60px;
			display: block;
			overflow: hidden;
			white-space: nowrap;
			text-indent: 110%;
			background-image: url(img/logo.png);
			background-position: center;
			background-size: contain;
			background-repeat: no-repeat;
		}
	}
	
	& nav + .is-layout-flex {
		padding: 40px;
		align-items: stretch;
		z-index: 1;
		
		& p {
			width: 140px;
			display: flex;
			justify-content: center;
			align-items: center;
			flex-shrink: 0;
			font-weight: 700;
			background-color: rgb(from var(--font-color) r g b / .3);
			border-radius: 100em;
			box-shadow: inset 1px 2px 1px rgba(0,0,0,.10), inset 0 -0.5px 0 rgba(0,0,0,.10);
			
			a {
				color: #FFF;
				text-decoration: none;
				text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
				
				&::before {
					content: "";
					width: 2em;
					height: 2em;
					display: inline-block;
					background-image: url(img/icon_map.svg);
					background-size: contain;
					background-repeat: no-repeat;
					background-position: center;
					filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
					vertical-align: -0.6em;
				}                                                                                                                       
			}    
		}
		
		& .wp-block-search__inside-wrapper {
			padding: 0;
			position: relative;
			background-color: transparent;
			border: none;
			
			& input {
				height: 42px;
			}
			
			& .wp-block-search__button.has-icon {
				width: 42px;
				height: 42px;
				padding: 0;
				display: flex;
				justify-content: center;
				align-items: center;
				position: absolute;
				top: 0;
				right: 0;
				background-color: transparent;
				
				& svg {
					width: 34px;
					height: 34px;
					fill: var(--font-color);
					transform: scaleX(-1);
				}
			}
		}
	}
}

.wp-block-gallery.has-nested-images {
	width: 100%;
	height: calc(100vmin * 2 / 3);
	position: relative;
	
	& > figure.wp-block-image {
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		overflow: hidden;
		
		& img {
			object-fit: cover;
		}
	}
}
.wp-block-gallery.has-nested-images + main strong {
	margin-bottom: var(--wp--style--root--padding-left);
	font-size: 1.1em;
}
.wp-block-table {
	margin-top: 1rem !important;
	overflow-x: auto;
	display: block;
}

.wp-block-table table {
	min-width: 100%;
	width: max-content;
}

figure.wp-block-image:not(.home .size-large) img{
	margin-top: 2rem;
}

.small-img img{
	min-width: 100% !important;
	height: auto !important;
}

.access td:first-child{
	position: relative;
	text-align: center;
}

.access img{
	min-width: 20px !important;
	height: auto !important;
}
.wp-block-columns.history-row {
	border-bottom: 1px #CCC solid;
	padding-bottom: 2rem;
}

.wp-block-columns.history-row strong:before{
	content: none;
}

.history-row:has(+ h2),
.wp-block-columns.history-row:last-of-type {
	border-bottom:none !important;
}





main {
	margin-top: 0 !important;

	& > div {
		padding-top: 0 !important;

		& h1 {
			max-width: none;
			height: 200px;
			display: flex;
			justify-content: center;
			align-items: center;
			position: relative;
			color:  #FFF;
			z-index: 2;
			font-size: 32px;
		}
		& .wp-block-post-featured-image {
			width: 100%;
			max-width: none;
			height: 200px;
			margin: 0;
			position: absolute;
			top: 0;
			left: 0;
			z-index: 1;

			&::before {
				content: "";
				width: 100%;
				height: 100%;
				display: block;
				position: absolute;
				background-color: #0008;
				mix-blend-mode: multiply;
			}
		}
	}
	
	& .entry-content {
		width: 1060px;
		margin: 0 auto !important;

		& h1 {
			font-size: 32px;
		}
		& h2 {
			padding: .5em 1em;
			font-size: 28px;
			background-image: linear-gradient(#FFF, #EEE);
			border: 1px solid #0003;
			border-top: 6px solid #0043AF;
		}
		& *:not(h1) + h2 {
			margin-top: 4rem;
		}
		& h3 {
			padding: .65em 1em;
			position: relative;
			line-height: 1.4;
			color: #FFF;
			font-size: 24px;
			background-color: #5380c7;
			border-radius: 12px;
			
			&::after {
				content: "";
				width: 0;
				height: 0;
				display: block;
				position: absolute;
				top: 100%;
				left: 50px;
				border: 12px solid transparent;
				border-top: 12px solid #5380c7;
			}
		}
		& h3 ~ *:not(h1, h2, h3, .wp-block-ishikai-excel-table, hr) {
			max-width: var(--wp--style--global--content-size);
   		 	margin-left: auto !important;
   			margin-right: auto !important;
			text-indent: 0rem !important;
		}
		& *:not(h2) + h3 {
			margin-top: 3rem;
		}
		& h4 {
			margin-top: 2rem;
			margin-bottom: 1rem;
			font-size: 21px;

			& span {
				display: inline;
				background-image: linear-gradient(transparent 60%, #FCE 0);
				text-indent: 0rem;
				padding: .5em 1em;
				font-size: 18px;
				display: inline-block;
				background-color: aliceblue;
				background-image: none;
				border: 1px solid #0043AF;
				border-radius: 6px;
			}
		}
		& * + h4 {
			margin-top: 2rem;
		}
		& h5 {
			font-size: 18px;
			font-weight: bold;
			color: #5380c7;
		}
		& h6 {
			font-size: 18px;
			font-weight: bold;
		}
		& * + h5,
		& * + h6 {
			margin-top: 2.5rem;
		}

		& code {
			background-color: #fafafa;
			padding: 2px 6px;
			border-radius: 3px;
			font-family: monospace;
			font-size: 1em;
		}

		& .wp-block-code code {
			display: block;
			background-color: #fafafa;
			padding: 1em;
			border-radius: 4px;

			& strong {
				font-weight: 700;

				&::before {
					content: none !important;
					display: none !important;
				}
			}
		}

		& code strong {
			font-weight: 700;

			&::before {
				content: none !important;
				display: none !important;
			}
		}

		& figure {
			margin: 0 0 1em;
			
			&.alignright {
				margin-left: 1em;
				float: right;
			}
		}
		
		& ol,
		& ul {
			padding-left: calc(1.5em - 10px);
		}

		& li {
			margin-bottom: 1.5em;
		}
		
		& ol + .table-wrapper,
		& ul + .table-wrapper {
			margin-top: -1rem;
		}
		& .table-wrapper {
			margin: 0 0 1em;
			overflow-x: auto;
			position: relative;

			&::before,
			&::after {
				width: 80px;
				padding-top: 20px;
				display: block;
				position: absolute;
				top: 0;
				bottom: 0;
				right: 0;
				color: #FFF;
				text-align: center;
				pointer-events: none;
				opacity: 0;
				transition: 1s;
			}
			&::before {
				content: "scroll";
				padding-top: 54px;
				font-weight: 700;
				background-color: #0004;
			}
			&::after {
				content: "＞";
				font-size: 30px;
				transform: scaleX(.6);
				animation: scroll-hint 2s infinite ease;
			}
			&.hint {
				&::before,
				&::after {
					opacity: 1;
				}
			}
			
			& table {
				margin: 0;
			}
			
			& table {
				margin: 0;
				border-collapse: collapse;
				border: 1px solid var(--border-color);

				& th,
				& td {
					padding: .5em;
					border: 1px solid var(--border-color);
				}
				& th {
					color: #FFF;
					border-color: #FFF6;
					background-color: var(--main-color);
				}

				& .sub {
					color: #FFF;
					border-color: #FFF6;
					background-color: var(--main-sub-color);
				}
			}
		}
	}

	/* テーブルのtheadボーダーを削除 */
	.wp-block-table thead {
		border-bottom: none !important;
	}

	& p > strong {
		display: inline-block;
		position: relative;
		font-weight: 700;
		
		&::before {
				content: "";
			width: 100%;
			height: .8em;
			display: block;
			position: absolute;
			bottom: -.2em;
			left: 0;
			background-color: #FFCCCD;
			mix-blend-mode: multiply;
			pointer-events: none;
			transform: skew(-20deg);
			}
	}
	
	& h2 {
		padding: 10px;
		line-height: 1;
		font-size: 1.4em;
		font-weight: 700;
		background-color: var(--main-color);

		body.home & {
			color: #FFF;
			text-align: center;
		}
	}
	
	& a:where(:not(.wp-element-button)) {
		color: var(--main-color);
	}
	
	& .wp-block-latest-posts__list {
		margin-block-start: 0;
		
		& li {
			border-bottom: 1px dashed #D9D9D9;
			& a {
				padding-top: 0;
				padding-bottom: 0.5rem;
				line-height: 1;
			}

			& time {
				padding-top: 0.2em;
				padding-bottom: 0;
			}
		}
	}
	
	& .wp-block-buttons {
		margin-block-start: 30px;
		margin-block-end: 30px;
		text-align: center;
		justify-content: center;

		& .wp-block-button {
			width: 100%;

			& .wp-block-button__link {
				width: auto;
				min-width: 70%;
				padding: 1em 3em;
				position: relative;
				line-height: 1;
				color: var(--font-color);
				background-color: transparent;
				border: 2px solid var(--font-color);
				border-radius: 0;

				&::after {
						content: "";
					width: 1.4em;
					height: 1.4em;
					display: block;
					position: absolute;
					top: 50%;
					right: 15px;
					background-image: url(img/icon_arrow.svg);
					background-size: contain;
					background-repeat: no-repeat;
					transform : translate(0, -50%);
				}
			}
		}
	}
	
	& .wp-block-group-is-layout-flex {
		padding: 0;
		flex-wrap: nowrap;
		gap: 10px;
		
		& > * {
			flex-shrink: 1;
		}
	}
}

footer {
	padding-bottom: 144px;
	color: #FFF;
	background-color: var(--font-color);
	margin-top: 5rem;

	/* フッター内のリンクを白色に統一 */
	& a {
		color: #FFF !important;
	}

	& > div > div > .is-layout-flex {
		flex-direction: column;
		gap: 20px;
		
		& > div:first-child {
			width: 100%;
			padding-right: 160px;
			position: relative;
			
			&::after {
				content: "";
				width: 139px;
				height: 200px;
				position: absolute;
				top: -60px;
				right: 0;
				background-image: url(img/chara.png);
				background-size: contain;
				background-repeat: no-repeat;
			}
			
			& h2 {
				font-size: 1em;
			}
			& p {
				margin-block-start: 1rem;
			}
			
			& ul {
				margin-block-start: 0;
				padding-left: 0;
				list-style: none;
				
				& li::before {
					content: "";
					width: 1em;
					height: 1em;
					margin-right: .2em;
					display: inline-block;
					background-image: url(img/icon_tel.svg);
					background-size: cover;
					background-repeat: no-repeat;
					background-position: center;
				}
				& li:nth-of-type(2)::before {
					background-image: url(img/icon_fax.svg);
				}
				& li:nth-of-type(3)::before {
					background-image: url(img/icon_mail.svg);
				}
			}
		}
		& > div:first-child + p {
			font-size: 2.5vmin !important;
		}
	}
}


/*////////////////////////////////////////////////////////////*/
/*  モバイル  */
/*////////////////////////////////////////////////////////////*/
@media screen and (max-width: 1199px) {
	/* グローバルパディングは維持 */
	.has-global-padding {
		padding-right: 0.8rem;
		padding-left: 0.8rem;
	}

	/* h1を含むグループはpaddingを0に */
	.has-global-padding:has(> h1.wp-block-post-title) {
		padding-right: 0 !important;
		padding-left: 0 !important;
	}

	/* h1タイトル自体に内部余白 */
	h1.wp-block-post-title {
		padding: 1em 0.8rem !important;
		margin: 0 !important;
	}

	/* タブレット・スマホ版: 見出しと段落に適切な余白 */
	.entry-content.has-global-padding h2,
	.entry-content.has-global-padding h3,
	.entry-content.has-global-padding h4,
	.entry-content.has-global-padding h5,
	.entry-content.has-global-padding h6,
	.entry-content.has-global-padding p {
		padding-left: 0.8rem !important;
		padding-right: 0.8rem !important;
	}

	/* リストはインデント付き */
	.entry-content.has-global-padding ul,
	.entry-content.has-global-padding ol {
		padding-left: 2rem !important;
		padding-right: 1rem !important;
	}

	/* 地図などのiframeをレスポンシブ対応 */
	iframe {
		max-width: 100% !important;
	}

	header {
		position: relative;
		z-index: 999;
		
		& #header_container {
			display: flex;
			flex-direction: column-reverse;
			position: fixed;
			bottom: 0;
			left: 0;
			right: 0;
			
			& > nav {
				z-index: 2;
			}
			
			& .wp-block-navigation__responsive-container {
				width: 100%;
				display: block;
				position: static;
				
				& > div {
					
					& ul.wp-block-navigation__container {
						
						& > .wp-block-navigation-item {
							height: 88px;
							position: relative;
							font-size: clamp(12px, 3vmin, 15px);
							
							&::after {
								height: 60px;
								top: calc(50% - 30px);
							}
							&:first-child::after {
								content: none;
							}
							
							&::before {
								content: "";
								width: 36px;
								height: 36px;
								margin-bottom: 7px;
							}
							
							& .wp-block-navigation__submenu-container {
								width: 100vw;
								height: auto;
								padding: 20px;
								position: fixed;
								top: auto;
								bottom: 92px;
								left: 0;
								right: 0;
								background-color: transparent;
								transform: translate(0, 100%);
								z-index: -1;
								
								.open & {
									transform: translate(0, 0);
									z-index: 10;
								}
								
								& a {
									color: #FFF;
									
									&::before {
										content: "◯";
										margin-right: .5em;
										display: inline-block;
									}
								}
							}
						}
					}
				}
			}
		}
		
		& #header_container + .wp-block-site-title {
			width: 100%;
			padding: 10px 0;
			position: absolute;
			top: 0;
			left: 0;
			
			& a {
				width: 264px;
				height: 60px;
				margin: 0 auto;
				background-image: url(img/logo_sp.png);
			}
		}
		
		& nav + .is-layout-flex {
			padding: 5px 20px;
			align-items: center;
			justify-content: center;
			position: fixed;
			bottom: 92px;
			left: 0;
			right: 0;
			color: #FFF;
			background-color: rgb(from var(--font-color) r g b / .75);
			border-bottom: 0 solid var(--main-color);
			box-shadow: 0 1px 0 0 #FFF4 inset;
			z-index: 1;
			transition: .3s;
			
			& p {
				max-width: 95px;
				width: 30%;
				height: 42px;
				display: flex;
				justify-content: center;
				align-items: center;
				flex-shrink: 0;
				font-weight: 700;
				background-color: var(--font-color);
				border-radius: 100em;
				
				a {
					color: #FFF;
					text-decoration: none;
					font-size: 0.8rem;
					
					&::before {
						content: "";
						display: inline-block;
						
					}
				}
			}
			
			& .wp-block-search__inside-wrapper {
				padding: 0;
				position: relative;
				background-color: transparent;
				border: none;
				
				& input {
					height: 42px;
					max-width: 260px;
				}
				
				& .wp-block-search__button.has-icon {
					width: 42px;
					height: 42px;
					padding: 0;
					display: flex;
					justify-content: center;
					align-items: center;
					position: absolute;
					top: 0;
					right: 0;
					background-color: transparent;
					
					& svg {
						width: 34px;
						height: 34px;
						fill: var(--font-color);
						transform: scaleX(-1);
					}
				}
			}
		}
	}

	main {
		& > div {
			& h1,
			& .wp-block-post-featured-image {
				height: 250px;
			}
		}
		& .entry-content {
			width: 100% !important;
		}

		body.home & {
			.wp-block-buttons + .wp-block-group {
				display: flex;
				flex-wrap: wrap;
				justify-content: center;
				gap: 20px;

				& > * {
					/* スマホ: 1列表示 */
					width: 100%;
					max-width: 400px;
					text-align: center;
					margin: 0 auto;

					& img {
						width: 100%;
						height: auto;
						margin: 0 auto;
					}
				}
			}
		}
	}
}




/*////////////////////////////////////////////////////////////*/
/*  タブレット  */
/*////////////////////////////////////////////////////////////*/
@media screen and (min-width: 600px) {
	body.home main .wp-block-buttons + .wp-block-group {
		& > * {
			/* タブレット: 2列表示 */
			width: calc(50% - 10px);
			max-width: none;
			text-align: center;
			margin: 0 auto;

			& img {
				margin: 0 auto;
			}
		}
	}
}


/*////////////////////////////////////////////////////////////*/
/*  PC  */
/*////////////////////////////////////////////////////////////*/
@media screen and (min-width: 1200px) {
	:root {
		--wp--style--global--content-size: 1060px;
	}
	
	.has-global-padding {
		padding-right: 0;
		padding-left: 0;
	}

	/* PC版: 見出しと段落に余白を設定 */
	.entry-content.has-global-padding h2,
	.entry-content.has-global-padding h3,
	.entry-content.has-global-padding h4,
	.entry-content.has-global-padding h5,
	.entry-content.has-global-padding h6,
	.entry-content.has-global-padding p {
		padding-left: 1rem !important;
		padding-right: 1rem !important;
	}

	/* リストはインデント付き */
	.entry-content.has-global-padding ul,
	.entry-content.has-global-padding ol {
		padding-left: 3rem !important;
		padding-right: 1rem !important;
	}

	#wpadminbar ~ .wp-site-blocks header {
		& > div > .wp-block-group-is-layout-constrained {
			& > .wp-block-group-is-layout-flex {
				align-items: flex-start;

				body:not(.home) & {
					max-width: none;
					align-items: center;
					background-color: var(--main-color);
				}
			}
		}
	}
	.wp-site-blocks header {
		& > div > .wp-block-group-is-layout-constrained {
			& > .wp-block-group-is-layout-flex {
				align-items: flex-start;

				body:not(.home) & {
					max-width: none;
					align-items: center;
					background-color: var(--main-color);
				}
			}
		}
	}
	header {
		& > div > .wp-block-group-is-layout-constrained {
			& > .wp-block-group-is-layout-flex {
				padding: 0 !important;
				flex-direction: row-reverse;
				align-items: flex-start;
				position: relative;
				top: 0;
				left: 0;
				right: 0;
				z-index: 4;

				body.home & {
					position: absolute;
				}
			}
		}
		
		& #header_container {
			& nav {
				position: static;
			}
			& .wp-block-navigation__responsive-container {
				position: static;
				
				& > div > div {
					position: static;
					
					& ul.wp-block-navigation__container {
						width: 669px;
						position: absolute;
						top: 0px;
						left: 260px;
						border-radius: 0 0 8px 0;
						box-shadow: 0 4px 4px 0 #0004;
						z-index: 2;
						
						body:not(.home) & {
							padding: 0;
							box-shadow: none;
						}
						
						& > .wp-block-navigation-item {
							width:  auto;
							height: 110px;
							font-size: 14px;
							flex-grow: 1.9;
							background-color: transparent;

							body:not(.home) & {
								background-image: none;
							}
							
							&:not(:last-child) {
								flex-grow: 1;
								
								& .wp-block-navigation__submenu-container {
									width: 685px;
									padding: 15px;
									display: grid;
									grid-template-columns: auto auto;
									position: absolute;
									left: -1px;
									right: auto;
									opacity: 0;
									pointer-events: none;
									
									.open & {
										opacity: 1;
										pointer-events: all;
									}
								}
							}
							&:last-child {
								padding-right: calc(11em + 15px);
								position: relative;
								
								& ul {
									width: 11em;
									min-width: auto;
									height: auto;
									padding: 0;
									display: block;
									position: absolute;
									top: 15px;
									right: 15px;
									left: auto;
									bottom: 15px;
									transform: translate(0, 0);
									z-index: 2;

									& li {
										height: 100%;
										margin: 0;

										/* PCでは会員専用ページ(2つ目)を非表示（親クリックで会員ページへ遷移するため） */
										&:last-child {
											display: none;
										}

										& a {
											width: 100%;
											height: 100%;
											padding: 0;
											display: flex;
											justify-content: center;
											align-items: center;
											flex-grow: 3;
											color: var(--font-color);
											text-align: center;
											background-color: #CCEFFF;
											border-radius: 3px;

											&::before {
												content: none;
											}

											& strong {
												display: block;
												font-size: 1.15em;
											}
										}
									}
								}
							}
							
							&::before {
								width: 44px;
								height: 44px;
							}
						}
					}

					/*---------- home ----------*/
					body.home & {

						& ul.wp-block-navigation__container {
							width: 1060px;
							top: calc(100vmin * 2 / 3);
							left: 50%;
							border-radius: 8px;
							box-shadow: 0 4px 4px 0 #0004;
							transform: translate(-50%, -50%);
							z-index: 2;

							& > .wp-block-navigation-item {
								width: 200px;
								height: 116px;
								font-size: 1em;

								&:first-child::after {
									content: none;
								}
								
								& .wp-block-navigation__submenu-container {
									width: 860px;
									padding: 0 0 20px;
									display: grid;
									grid-template-columns: auto auto;
									position: absolute;
									left: -1px;
									right: auto;
								}
								&:nth-of-type(3) .wp-block-navigation__submenu-container {
									left: -201px;
								}

								&:last-child {
									width: auto;
									padding-right: 12em;
									flex-grow: 9;
									position: relative;
									
									& ul {
										width: 230px;
										height: auto;
										padding: 0;
										display: block;
										position: absolute;
										top: 18px;
										right: 18px;
										left: auto;
										bottom: 18px;
										transform: translate(0, 0);
										z-index: 2;
										
										& li {
											height: 100%;
											justify-content: center;
											align-items: center;
											
											& a {
												
												&::before {
													content: none;
												}
												
												& strong {
													display: block;
													font-size: 1.2em;
												}
											}
										}
									}
								}
							
								&::before {
									width: 54px;
									height: 54px;
								}
							}
						}
					}
				}
			}
		}
		
		& #header_container + .wp-block-site-title {
			height: 110px;
			margin-bottom: -10px;
			display: flex;
			justify-content: center;
			align-items: center;
			position: relative;
			background-color: #FFF;

			body.home & {
				height: auto;
				margin-bottom: 0;
				padding: 30px 53px;
				border-radius: 0 0 8px 8px;
				box-shadow: 0 3px 5px 0 #0005, 0 5px 12px 0 #0003;
				
				& a {
					width: 108px;
					height: 286px;
					background-image: url(img/logo_top.png);
				}
			}
		}
		
		& nav + .is-layout-flex {
			border-bottom: none;

			body:not(.home) & {
				padding: 0 15px;
				flex-direction: column;
				justify-content: space-around;
				align-items: stretch;
				gap: 10px;

				& P,
				& .wp-block-search__inside-wrapper {
					width: 100%;
					height: 42px;
				}
				& P {
					height: 32px;
				}
			}
		}
	}
	
	body:not(.wp-singular) .wp-block-gallery.has-nested-images {
		margin-top: 0;
		margin-bottom: 100px;

		&::after {
			content: "";
			width: 100%;
			height: 0%;
			display: block;
			position: absolute;
			bottom: 0;
			left: 0;
			background-color: rgb(from var(--main-color) r g b / .85);
			transition: .3s;
			z-index: 2;
		}
	}
	body:not(.wp-singular) header:has(.open) ~ .wp-block-gallery.has-nested-images::after {
		height: 100%;
	}
	
	main {
		width: 100%;
		margin: 0 auto !important;
		padding: 0 !important;
		
		& > div {
			width: 100%;
			margin: 0 !important;
			padding: 0 !important;

			td {
				word-break: auto-phrase;
				background-color: #F6F6F6;
			}
		}
		
		body.home & {
			
			p:first-child {
				text-align: center;
			}
			
			p:first-child + h2,
			p:first-child + h2 + ul {
				width: 640px;
				margin-top: 20px;
			}
			p:first-child + h2 + ul li {
				display: flex;
				justify-content: flex-start;
				align-items: flex-start;
				flex-direction: row-reverse;
				border: none;

				& a {
					padding: 0;
					flex-grow: 9;
					line-height: 2.2;
					white-space: nowrap;
					overflow: hidden;
					text-overflow: ellipsis;
				}

				& time {
					min-width: 120px;
					display: block;
					line-height: 2.2;
					font-size: 1em;
					white-space: nowrap;
					color: #666;
				}
			}
			.wp-block-buttons {
				width: 360px;
				margin: 0 auto;
				gap: 20px;
				justify-content: center;

				& .wp-block-button {
					text-align: center;

					& .wp-block-button__link {
						width: 100%;
						margin: 30px auto 60px;
					}
				}
			}
			.wp-block-buttons + .wp-block-group {
				display: flex;
				flex-wrap: wrap;
				justify-content: center;
				gap: 20px;

				& > * {
					/* PC: 4列表示 */
					width: calc(25% - 15px);
					max-width: none;
					text-align: center;
					margin: 0 auto;

					& img {
						margin: 0 auto;
					}
				}
			}
		}
	}

	footer {
		padding: 0;
		
		& > div {
			padding: 30px !important;
			
			& > div > .is-layout-flex {
				flex-direction: row;
				align-items: flex-end;
				
				& > div:first-child {
					padding: 0 0 0 150px;
					
					&::after {
						top: auto;
						bottom: 0;
						left: 0;
						right: auto;
					}
					
					& br {
						display: none;
					}
					
					& ul {
						padding-top: .5em;
						display: flex;
						gap: 0 30px;
					}
				}
				& > div:first-child + p {
					white-space: nowrap;
					font-size: .85em !important;
				}
			}
		}
	}

	/* 個別投稿ページ（.wp-singular）：PCサイズのみサブメニューを下方向に開く */
	.wp-singular {
		header .wp-block-navigation-item:not(:nth-child(4)) .wp-block-navigation__submenu-container {
			top: 100% !important;
			bottom: auto !important;
			background-color: rgb(from var(--main-color) r g b / .85) !important;
			max-height: 0 !important;
			overflow: hidden !important;
			transform: none !important;
			transition: max-height 0.3s ease !important;
			z-index: 10 !important;
		}

		header .wp-block-navigation-item:not(:nth-child(4)).open .wp-block-navigation__submenu-container,
		.open header .wp-block-navigation-item:not(:nth-child(4)) .wp-block-navigation__submenu-container {
			max-height: 1000px !important;
			transform: none !important;
		}

		/* サブメニュー内のリンクの文字サイズと行間 */
		header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
			font-size: 1rem !important;
			line-height: 3rem !important;
		}

		/* ナビゲーションアイテムの背景色継承を無効化 */
		header .wp-block-navigation__submenu-container .wp-block-navigation-item {
			background-color: transparent !important;
		}
	}
}




/*////////////////////////////////////////////////////////////*/
/*  PC（大）  */
/*////////////////////////////////////////////////////////////*/
@media screen and (min-width: 1340px) {
	.has-global-padding {
		padding-right: 0;
		padding-left: 0;
	}

	/* PC版: entry-content内の見出しとリストは余白なし（.entry-contentの横幅制限で中央揃え） */
	/* 見出しとリストは本来のマージンを維持 */

	header {
		& nav + .is-layout-flex {
			body:not(.home) & {
				padding: 29px 15px;
				flex-direction: row;
				align-items: stretch;
				gap: 20px;

				& p {
					width: 140px;
					height: 42px;
				}

				& .wp-block-search__inside-wrapper {
					width: 220px;
				}
			}
		}
	}
}
/* 固定ページ・投稿ページ：アイキャッチ画像の高さ制限 */
.wp-block-post-featured-image {
	max-height: 300px;
	overflow: hidden;
}

.wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* 固定ページ・投稿ページ：アイキャッチ画像がない場合のタイトル背景 */
main:not(:has(.wp-block-post-featured-image)) .wp-block-group:has(h1.wp-block-post-title) {
	margin-left: 0 !important;
	margin-right: 0 !important;
	max-width: 100% !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	margin-bottom: 0 !important;
}

main:not(:has(.wp-block-post-featured-image)) h1.wp-block-post-title {
	background-color: #000;
	margin: 0 auto !important;
	margin-bottom: 80px !important;
	min-width: 100%;
	padding: 2em 1em;
	text-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 200px;
}

/* モバイル・タブレット：アイキャッチ画像がない場合のh1 */
@media screen and (max-width: 1199px) {
	main:not(:has(.wp-block-post-featured-image)) h1.wp-block-post-title {
		padding: 2em 1.5rem !important;
		text-align: center !important;
		min-height: 150px !important;
		display: flex !important;
		align-items: center !important;
		justify-content: center !important;
		font-size: 1.75rem !important;
		white-space: normal !important;
		line-height: 1.4 !important;
	}
}

/* 全てのh1タイトルのマージン */
h1.wp-block-post-title {
	margin-top: 0;
	margin-bottom: 80px !important;
}

/* ========================================
   NEWS一覧のレイアウト調整（トップページ・NEWSページ）
   ======================================== */
/* デフォルト（モバイル・タブレット）: 縦並び、日付を上に配置 */
body.home .wp-block-latest-posts__list li,
body.page .wp-block-latest-posts__list li,
body.page .wp-block-post-template li {
	display: flex !important;
	flex-direction: column !important;
	margin: 0.5rem 0 0 0;
}

body.home .wp-block-latest-posts__post-date,
body.page .wp-block-latest-posts__post-date,
body.page .wp-block-post-date {
	order: -1 !important;
	white-space: nowrap !important;
	font-size: 0.875rem !important;
	color: #666 !important;
	margin-bottom: 0.25em !important;
	width: 110px;
	line-height: 2;
}

body.home .wp-block-latest-posts__post-title,
body.page .wp-block-latest-posts__post-title,
body.page .wp-block-post-title {
	white-space: nowrap !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	display: block !important;
	line-height: 2;
	padding-bottom: 0 !important;
	order: 1 !important;
}

body.page .wp-block-post-title a {
	display: block !important;
	white-space: nowrap !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
}

@media screen and (min-width: 1200px) {
	header {
		& #header_container {
			& .wp-block-navigation__responsive-container {
				& > div > div {
					& ul.wp-block-navigation__container {
						& > .wp-block-navigation-item {
							font-size: 14px;

							& .wp-block-navigation-item__content {
								padding: 8px;

								&::before {
									width: 48px;
									height: 48px;
								}
							}

							&:last-child {
								padding-right: calc(11em + 15px);
								position: relative;

								& ul {
									width: 11em;
									min-width: auto;
									height: auto;
									padding: 0;
									display: block;
									position: absolute;
									top: 15px;
									right: 15px;
									left: auto;
									bottom: 15px;
									transform: translate(0, 0);
									z-index: 2;

									& li {
										height: 100%;

										& a.wp-block-navigation-item__content {
											width: 100% !important;
											height: 100% !important;
											padding: 0.5em !important;
											display: flex !important;
											flex-direction: row !important;
											justify-content: center !important;
											align-items: center !important;
											color: var(--font-color) !important;
											text-align: center !important;
											background-color: #CCEFFF !important;
											border-radius: 3px !important;
											box-sizing: border-box !important;

											&::before {
												content: none !important;
												display: none !important;
											}

											& .wp-block-navigation-item__label {
												line-height: 1.5;

												& strong {
													display: block;
													font-size: 1.15em;
													line-height: 1.3;
												}
											}
										}
									}
								}
							}
						}
					}

					body.home & {
						& ul.wp-block-navigation__container {
							& > .wp-block-navigation-item {
								font-size: 1em;

								& .wp-block-navigation-item__content {
									&::before {
										width: 52px;
										height: 42px;
									}
								}

								&:last-child {
									width: auto;
									padding-right: 12em;
									flex-grow: 9;
									position: relative;

									& ul {
										width: 230px;
										height: auto;
										padding: 0;
										display: block;
										position: absolute;
										top: 18px;
										right: 18px;
										left: auto;
										bottom: 18px;
										transform: translate(0, 0);
										z-index: 2;

										& li {
											height: 100%;

											& a.wp-block-navigation-item__content {
												width: 100% !important;
												height: 100% !important;
												padding: 1em !important;
												display: flex !important;
												flex-direction: row !important;
												justify-content: center !important;
												align-items: center !important;
												color: var(--font-color) !important;
												text-align: center !important;
												background-color: #CCEFFF !important;
												border-radius: 3px !important;
												box-sizing: border-box !important;

												&::before {
													content: none !important;
													display: none !important;
												}

												& .wp-block-navigation-item__label {
													line-height: 1.5;

													& strong {
														display: block;
														font-size: 1.2em;
														line-height: 1.3;
													}
												}
											}
										}
									}
								}
							}
						}
					}
				}
			}
		}
	}

	/* NEWS一覧のレイアウト調整（デスクトップ、トップページ・NEWSページ） */
	body.home .wp-block-latest-posts__list li,
	body.page .wp-block-latest-posts__list li,
	body.page .wp-block-post-template li {
		display: flex !important;
		flex-direction: row !important;
		align-items: center !important;
	}

	/* NEWS一覧の日付を左側に配置 */
	body.home .wp-block-latest-posts__post-date,
	body.page .wp-block-latest-posts__post-date,
	body.page .wp-block-post-date {
		order: 0 !important;
		white-space: nowrap !important;
		margin-right: auto !important;
	}

	/* NEWS一覧のタイトル */
	body.home .wp-block-latest-posts__post-title,
	body.page .wp-block-latest-posts__post-title,
	body.page .wp-block-post-title {
		order: 1 !important;
		flex: 1 !important;
		white-space: nowrap !important;
		overflow: hidden !important;
		text-overflow: ellipsis !important;
	}

	body.page .wp-block-post-title a {
		white-space: nowrap !important;
		overflow: hidden !important;
		text-overflow: ellipsis !important;
	}
}

/* ========================================
   検索結果ページ
   ======================================== */
.search-results {
	h2 {
		background-color: transparent;
		background-image: none;
		color: inherit;
	}

	/* h1タイトルを含む親要素の調整 */
	main .wp-block-group:has(.wp-block-query-title) {
		margin-left: 0 !important;
		margin-right: 0 !important;
		max-width: 100% !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
	}

	/* h1タイトル（検索結果） */
	.wp-block-query-title {
		background-color: #000;
		color: white;
		margin: 0 !important;
		margin-bottom: 80px !important;
		min-width: 100%;
		padding: 1em;
		font-size: 1.5rem;

		&::before {
			content: "🔍 ";
		}
	}

	.wp-block-query {
		max-width: 1060px;
		margin: 0 auto;
	}

	.wp-block-post-template {
		list-style: none;
		padding: 0;

		& > li {
			margin-bottom: 0;
			transition: background-color 0.2s ease;

			&:hover {
				background-color: #f8f9fa;
			}
		}
	}

	.wp-block-post-title a {
		color: #1a0dab;
		text-decoration: none;
		font-size: 1.25rem;
		line-height: 1.4;

		&:visited {
			color: #681da8;
		}

		&:hover {
			text-decoration: underline;
		}
	}

	/* .homeページ：タイトルを1行のみ表示、超えたら3点リーダー */
	body.home .wp-block-post-title a {
		display: block !important;
		white-space: nowrap !important;
		overflow: hidden !important;
		text-overflow: ellipsis !important;
	}

	.wp-block-post-excerpt {
		color: #545454;
		line-height: 1.6;

		p {
			margin: 0;
		}

		.wp-block-post-excerpt__more-link {
			color: #1a0dab;
			text-decoration: none;
			margin-left: 0.5em;

			&:hover {
				text-decoration: underline;
			}
		}
	}

	.wp-block-post-date {
		color: #70757a;
		font-size: 0.875rem;

		a {
			color: inherit;
			text-decoration: none;

			&:hover {
				text-decoration: underline;
			}
		}
	}

	/* .homeページ：日付の折り返し禁止 */
	body.home .wp-block-post-date {
		white-space: nowrap !important;
	}

	.wp-block-post-terms {
		color: #70757a;
		font-size: 0.875rem;

		a {
			color: #70757a;
			text-decoration: none;

			&:hover {
				text-decoration: underline;
			}
		}
	}

	/* ページネーション（前へ・次へ） */
	.wp-block-query-pagination {
		margin-top: 3rem;
		padding-top: 2rem;
		border-top: 1px solid #e0e0e0;

		.wp-block-query-pagination-previous,
		.wp-block-query-pagination-next,
		.wp-block-query-pagination-numbers {
			a {
				color: #0043AF;
				text-decoration: none;
				padding: 0.5em 1em;
				border: 1px solid #ddd;
				border-radius: 4px;
				background-color: white;
				transition: all 0.2s ease;

				&:hover {
					background-color: #0043AF;
					color: white;
					border-color: #0043AF;
				}
			}
		}

		.wp-block-query-pagination-numbers {
			.page-numbers {
				color: #0043AF;
				text-decoration: none;
				padding: 0.5em 1em;
				border: 1px solid #ddd;
				border-radius: 4px;
				background-color: white;
				transition: all 0.2s ease;
				display: inline-block;
				margin: 0 0.25em;

				&:hover {
					background-color: #0043AF;
					color: white;
					border-color: #0043AF;
				}

				&.current {
					background-color: #0043AF;
					color: white;
					border-color: #0043AF;
					font-weight: bold;
				}
			}

			.dots {
				padding: 0.5em;
				color: #666;
			}
		}
	}
}

/* 検索結果ページのh2背景色削除（bodyクラスでも適用） */
body.search h1 {
margin: 0;
    padding: 5rem 0;
    max-width: 100%;
    background: #000;
    margin-left: 0 !important;
    text-align: center;
    margin-right: 0 !important;
    color: #fff !important;
}
body.search h2 {
	background-color: transparent;
	background-image: none;
	color: inherit;
}

/* ========================================
   個別投稿ページ（.wp-singular）
   ======================================== */
.wp-singular {
	/* main内の全ての直接の子要素の横幅を統一 */
	main > div > * {
		max-width: 1060px;
		margin-left: auto !important;
		margin-right: auto !important;
		padding-left: 0;
		padding-right: 0;
		box-sizing: border-box;
	}

	/* h1見出しは幅100% */
	main > div > h1 {
		width: 100% !important;
		max-width: 100% !important;
	}

	/* figure要素は幅100% */
	main > div > figure {
		width: 100% !important;
		max-width: 100% !important;
	}

	/* ボタンのスタイル調整 */
	main .wp-block-buttons {
		& .wp-block-button {
			text-align: left;

			& .wp-block-button__link {
				min-width: auto;
				padding: 1em 3em 1em 1em;
			}
		}
	}

	/* 投稿ナビゲーション以下の要素の横幅を統一 */
	main .entry-content ~ * {
		max-width: 1060px;
		margin-left: auto !important;
		margin-right: auto !important;
		width: 100%;
		box-sizing: border-box;
	}

	/* alignwideクラスの幅を制限 */
	main .alignwide {
		max-width: 1060px !important;
		margin-left: auto !important;
		margin-right: auto !important;
		width: 100% !important;
	}

	/* 投稿ナビゲーション内の要素 */
	.wp-block-post-navigation-link {
		a {
			color: var(--main-color);
			text-decoration: none;

			&:hover {
				text-decoration: underline;
			}
		}
	}
	p > strong ,	
	li > strong {
		font-weight: 700;
	}
	p > strong:before {
		content: none;
	}
}

/* モバイル・タブレット対応 */
@media screen and (max-width: 1199px) {
	.wp-singular {
		/* 見出し、リスト、entry-content内の要素を除外してpaddingを適用 */
		main > div > *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(ul):not(ol):not(.entry-content),
		main .entry-content ~ *:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6):not(ul):not(ol),
		main .alignwide {
			max-width: 100% !important;
			padding-left: 0.8rem !important;
			padding-right: 0.8rem !important;
		}

		/* h1タイトル：外側のpaddingを削除、内側にpaddingを追加 */
		main h1.wp-block-post-title {
			padding: 2em 1.5rem !important;
			margin-left: 0 !important;
			margin-right: 0 !important;
			max-width: 100% !important;
			display: flex !important;
			align-items: center !important;
			justify-content: center !important;
			min-height: 150px !important;
			font-size: 1.75rem !important;
			white-space: normal !important;
			line-height: 1.4 !important;
		}

		/* h1を含むグループのpaddingも削除 */
		main .wp-block-group:has(h1.wp-block-post-title) {
			padding-left: 0 !important;
			padding-right: 0 !important;
			margin-left: 0 !important;
			margin-right: 0 !important;
			max-width: 100% !important;
		}
	}

	/* フッターの余白を確保 */
	footer > div {
		padding-left: 0.8rem !important;
		padding-right: 0.8rem !important;
	}
}

/* ハイライト（mark）の背景色を削除 */
mark,
.has-inline-color {
	background-color: transparent;
}

/* ========================================
   投稿ページ専用スタイル（.single-post）
   ======================================== */
.single-post {
	/* 「投稿をさらに読み込む」見出し */
	h2.wp-block-heading.alignwide {
		color: #ffffff;
		background-color: #000000;
		padding: 1em 2em;
		margin-top: 3em;
		margin-bottom: 1.5em;
	}

	/* 投稿リストの文字サイズ */
	.wp-block-query .wp-block-post-template,
	.wp-block-post-template li,
	.wp-block-post-template .wp-block-post-title,
	.wp-block-post-template .wp-block-post-title.has-large-font-size,
	.wp-block-post-template .wp-block-post-excerpt,
	.wp-block-post-template .wp-block-post-date {
		font-size: 1rem !important;
	}

	/* 投稿ナビゲーション（前の投稿/次の投稿）の文字サイズ */
	.wp-block-post-navigation-link,
	.wp-block-post-navigation-link a {
		font-size: 1rem !important;
	}

	/* カテゴリ表示エリアの下マージン */
	.wp-block-group.has-small-font-size .wp-block-post-terms {
		margin-bottom: 0 !important;
	}

	.wp-block-group.has-small-font-size.has-accent-4-color {
		margin-bottom: var(--wp--preset--spacing--30) !important;
	}

	/* 空のグループブロックを非表示 */
	.wp-block-group.has-global-padding:empty {
		display: none !important;
	}
}


/* タブレット/スマホ: トップナビのアイコンを拡大（PCレイアウト非影響 / max-width:1199） */
@media screen and (max-width: 1199px) {
	header .wp-block-navigation-item__content::before {
		width: 48px !important;
		height: 48px !important;
	}
}


/* スマホ(<600px): ナビアイコンを小さめに（タブレット48px/PCは非影響） */
@media screen and (max-width: 599px) {
	header .wp-block-navigation-item__content::before {
		width: 36px !important;
		height: 36px !important;
	}
}


/* スマホ/タブレットのみ: 会員専用サブメニューのボタン間余白（PCは余白なし） */
@media screen and (max-width: 1199px) {
	header .wp-block-navigation-item:nth-child(4) .wp-block-navigation__submenu-container .wp-block-navigation-item {
		margin: 0 0 10px !important;
	}
	header .wp-block-navigation-item:nth-child(4) .wp-block-navigation__submenu-container .wp-block-navigation-item:last-child {
		margin-bottom: 0 !important;
	}
}
