
/**
 * 5.0 Alignment
 * ----------------------------------------------------------------------------
 */

.alignleft {
	float: left;
	margin: 7px 24px 7px 0;
}

.alignright {
	float: right;
	margin: 7px 0 7px 24px;
}

.aligncenter {
	clear: both;
	display: block;
	margin: 7px auto;
}

blockquote.alignleft,
blockquote.alignright {
	border-top: 1px solid rgba(0, 0, 0, 0.1);
	border-bottom: 1px solid rgba(0, 0, 0, 0.1);
	padding-top: 17px;
	width: 50%;
}

blockquote.alignleft p,
blockquote.alignright p {
	margin-bottom: 17px;
}

@media print, screen and (max-width:640px) {
	.alignleft,
	.alignright {
		display: block;
		float: none;
		margin: 7px auto;
	}
}

/**
 * 6.0 Tables
 * ----------------------------------------------------------------------------
 */

.mceItemTable {
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-width: 1px 0 0 1px;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 14px;
	line-height: 1.2857142857;
	margin-bottom: 24px;
	width: 100%;
}

.mceItemTable th,
.mceItemTable caption {
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-width: 0 1px 1px 0;
	font-weight: 700;
	padding: 8px;
	text-align: left;
	text-transform: uppercase;
	vertical-align: baseline;
}

.mceItemTable td {
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-width: 0 1px 1px 0;
	font-family: Lato, sans-serif;
	font-size: 14px;
	padding: 8px;
	vertical-align: baseline;
}


/**
 * 6.5 Gallery
 * -----------------------------------------------------------------------------
 */

.gallery {
	margin-bottom: 20px;
}

.gallery-item {
	float: left;
	margin: 0 4px 4px 0;
	overflow: hidden;
	position: relative;
}

.gallery-columns-1 .gallery-item {
	max-width: 100%;
}

.gallery-columns-2 .gallery-item {
	max-width: 48%;
	max-width: -webkit-calc(50% - 4px);
	max-width:         calc(50% - 4px);
}

.gallery-columns-3 .gallery-item {
	max-width: 32%;
	max-width: -webkit-calc(33.3% - 4px);
	max-width:         calc(33.3% - 4px);
}

.gallery-columns-4 .gallery-item {
	max-width: 23%;
	max-width: -webkit-calc(25% - 4px);
	max-width:         calc(25% - 4px);
}

.gallery-columns-5 .gallery-item {
	max-width: 19%;
	max-width: -webkit-calc(20% - 4px);
	max-width:         calc(20% - 4px);
}

.gallery-columns-6 .gallery-item {
	max-width: 15%;
	max-width: -webkit-calc(16.7% - 4px);
	max-width:         calc(16.7% - 4px);
}

.gallery-columns-7 .gallery-item {
	max-width: 13%;
	max-width: -webkit-calc(14.28% - 4px);
	max-width:         calc(14.28% - 4px);
}

.gallery-columns-8 .gallery-item {
	max-width: 11%;
	max-width: -webkit-calc(12.5% - 4px);
	max-width:         calc(12.5% - 4px);
}

.gallery-columns-9 .gallery-item {
	max-width: 9%;
	max-width: -webkit-calc(11.1% - 4px);
	max-width:         calc(11.1% - 4px);
}

.gallery-columns-1 .gallery-item:nth-of-type(1n),
.gallery-columns-2 .gallery-item:nth-of-type(2n),
.gallery-columns-3 .gallery-item:nth-of-type(3n),
.gallery-columns-4 .gallery-item:nth-of-type(4n),
.gallery-columns-5 .gallery-item:nth-of-type(5n),
.gallery-columns-6 .gallery-item:nth-of-type(6n),
.gallery-columns-7 .gallery-item:nth-of-type(7n),
.gallery-columns-8 .gallery-item:nth-of-type(8n),
.gallery-columns-9 .gallery-item:nth-of-type(9n) {
	margin-right: 0;
}

.gallery-columns-1.gallery-size-medium figure.gallery-item:nth-of-type(1n+1),
.gallery-columns-1.gallery-size-thumbnail figure.gallery-item:nth-of-type(1n+1),
.gallery-columns-2.gallery-size-thumbnail figure.gallery-item:nth-of-type(2n+1),
.gallery-columns-3.gallery-size-thumbnail figure.gallery-item:nth-of-type(3n+1) {
	clear: left;
}

.gallery-caption {
	background-color: rgba(0, 0, 0, 0.7);
	-webkit-box-sizing: border-box;
	-moz-box-sizing:    border-box;
	box-sizing:         border-box;
	color: #fff;
	font-size: 12px;
	line-height: 1.5;
	margin: 0;
	max-height: 50%;
	opacity: 0;
	padding: 6px 8px;
	position: absolute;
	bottom: 0;
	left: 0;
	text-align: left;
	width: 100%;
}

.gallery-caption:before {
	content: "";
	height: 100%;
	min-height: 49px;
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
}

.gallery-item:hover .gallery-caption {
	opacity: 1;
}

.gallery-columns-7 .gallery-caption,
.gallery-columns-8 .gallery-caption,
.gallery-columns-9 .gallery-caption {
	display: none;
}


/**
 * 6.8 Attachments
 * -----------------------------------------------------------------------------
 */

.attachment .content-sidebar,
.attachment .post-thumbnail {
	display: none;
}

.attachment .entry-content {
	padding-top: 0;
}

.attachment footer.entry-meta {
	text-transform: none;
}

.entry-attachment .attachment {
	margin-bottom: 24px;
}


.wp-caption {
	background: transparent;
	border: none;
	color: #767676;
	margin: 0 0 24px 0;
	max-width: 474px;
	padding: 0;
	text-align: left;
}

.wp-caption.alignleft {
	margin: 7px 14px 7px 0;
}

.wp-caption.alignright {
	margin: 7px 0 7px 14px;
}

.wp-caption.aligncenter {
	margin: 7px 0;
}

.wp-caption-dt {
	margin: 0;
}

.wp-caption .wp-caption-text,
.wp-caption-dd {
	-webkit-box-sizing: border-box;
	-moz-box-sizing: border-box;
	box-sizing: border-box;
	font-size: 12px;
	font-style: italic;
	line-height: 1.5;
	margin: 9px 0;
	padding: 0 10px 0 0; /* Avoid the caption to overflow the width of the image because wp-caption has 10px wider width */
	text-align: left;
}

.mceTemp + ul,
.mceTemp + ol {
	list-style-position: inside;
}


/* .entry-body
============================================================================================================ */
.entry-body,
.editor-styles-wrapper {
	--rate: 1;
	@media screen and (max-width: 743px) {
		--rate: calc(13 / 16);
	}
	font-size: calc(1.6rem * var(--rate));
	line-height: 2;
	&::after {
		content: "";
		display: table;
		clear: both;
	}
	img {
		max-width: 100%;
		width: revert;
		height: auto;
	}
	p:not(.eir *) {
		margin: 0 0 1lh;
	}
	ul:not(.eir *),
	ol:not(.eir *) {
		margin: 0 0 1lh 1.3333em;
	}
	ul:not(.eir *) {
		list-style: none;
		margin-left: 0;
		li {
			position: relative;
			padding-left: 1.3333em;
			&::before {
				content: "・";
				position: absolute;
				top: 0;
				left: 0;
			}
		}
	}
	ol:not(.eir *) {
		list-style: decimal;
	}
	li:not(.eir *):not(.eir *) > ul,
	li:not(.eir *):not(.eir *) > ol {
		margin-bottom: 0;
	}
	li:not(.eir *):not(.eir *) > ul li,
	li:not(.eir *):not(.eir *) > ol li {
		margin-top: 0;
	}
	dl:not(.eir *):not(.eir *) {
		margin-bottom: 1lh;
	}
	dt:not(.eir *) {
		font-weight: bold;
	}
	dd:not(.eir *) {
		margin-bottom: 1lh;
	}
	p:last-child:not(.eir *),
	dl:last-child:not(.eir *),
	ul:last-child:not(.eir *),
	ol:last-child:not(.eir *) {
		margin-bottom: 0;
	}

	h2,
	h3,
	h4,
	h5,
	h6 {
		clear: both;
		font-weight: 700;
		margin: 3em 0 1em;
	}

	h1 {
		font-size: calc(4rem * var(--rate));
	}
	h2 {
		margin-bottom: calc(6rem * var(--rate));
		font-size: calc(3.4rem * var(--rate));
		line-height: 1.6;
		&.has-x-large-font-size {
			font-weight: 900;
			font-size: calc(4.2rem * var(--rate)) !important;
		}
		@media screen and (max-width: 743px) {
			--rate: calc(11 / 16);
		}
	}

	h3 {
		margin-bottom: calc(2rem * var(--rate));
		font-size: calc(2.6rem * var(--rate));
		line-height: 1.8;
	}

	h4 {
		position: relative;
		padding-left: calc(5rem * var(--rate));
		margin-bottom: calc(3rem * var(--rate));
		font-size: calc(2.4rem * var(--rate));
		line-height: 1.6;
		&::before {
			content: "";
			position: absolute;
			top: 0.5lh;
			left: 0;
			width: calc(3rem * var(--rate));
			border-top: 2px solid var(--color-theme, #1F3CB0);
		}
	}

	h5 {
		margin-bottom: 1rem;
		font-size: 120%;
	}

	h6 {
		font-size: 100%;
		line-height: 1.5;
	}

	h2:first-child,
	h3:first-child,
	h4:first-child,
	h5:first-child,
	h6:first-child {
		margin-top: 0;
	}
	h2:last-child,
	h3:last-child,
	h4:last-child,
	h5:last-child,
	h6:last-child {
		margin-bottom: 0;
	}

	cite,
	dfn,
	em,
	i {
		font-style: italic;
	}
	mark,
	ins {
		border: 0;
		color: inherit;
		text-decoration: none;
	}

	hr {
		height: 0;
		margin: 1.5em 0;
		padding: 0;
		border: 0;
		border-top: 1px solid #d6d6d6;
	}
	hr:first-child {
		margin-top: 0;
	}
	hr:last-child {
		margin-bottom: 0;
	}

	.wp-block-image,
	.wp-block-embed {
		margin-block: calc(6rem * var(--rate));
		&:first-child {
			margin-top: 0;
		}
		&:last-child {
			margin-bottom: 0;
		}
	}
	.wp-block-image .aligncenter,
	.wp-block-image.aligncenter {
		margin-inline: auto;
	}

	.message_ph {
		float: right;
		width: 45rem;
		margin: 0 0 4rem 6rem;
		@media screen and (max-width: 743px) {
			float: none;
			width: 60%;
			margin-inline: auto;
			margin-bottom: 2rem;
		}
	}

	iframe {
		width: 100%;
		height: auto;
		aspect-ratio: 16 / 9;
		border-radius: 2rem;
	}
	iframe[src*="google.com/maps/"] {
		aspect-ratio: 1;
	}

	.wp-block-table {
		margin-block: calc(6rem * var(--rate));
		h2 + &,
		h3 + &,
		h4 + & {
			margin-top: 0;
		}
		&:first-child {
			margin-top: 0;
		}
		&:last-child {
			margin-bottom: 0;
		}
		table {
			background-color: #fff;
			width: 100%;
			border: 0;
			line-height: 1.8;
			th, td {
				border: 1px solid;
				padding: 1.4em 2em;
				&:first-child {
					border-left-width: 0;
				}
				&:last-child {
					border-right-width: 0;
				}
			}
			th {
				font-weight: 700;
			}
			thead {
				border-bottom: 0;
				th, td {
					font-weight: 700;
					padding: 1em;
					font-size: calc(18 / 16 * 100%);
					text-align: center;
					background-color: #e9ecf7;
				}
			}
		}
		@media screen and (max-width: 743px) {
			margin-inline: calc(var(--sp-base-padding) * -1);
			padding-inline: var(--sp-base-padding);
			padding-bottom: 1rem;
			overflow-x: auto;
			table {
				white-space: nowrap;
				th, td {
					padding: 1em;
				}
			}
			.has-fixed-layout {
				white-space: wrap;
				width: 70rem;
			}
		}
		&.company_table {
			table {
				th, td {
					padding: 1em 2em;
					border-right: 0;
					border-left: 0;
					vertical-align: top;
					&:first-child {
						width: 17.6rem;
						background-color: #F0F0F0;
						font-weight: 700;
					}
				}
			}
			@media screen and (max-width: 743px) {
				padding-bottom: 0;
				table {
					white-space: wrap;
					width: 100%;
					th, td {
						padding: 1em;
						&:first-child {
							width: 30%;
						}
					}
				}
			}
		}
	}

	.wp-element-caption {
		text-align: left;
		font-size: 1.4rem;
		margin-top: 1rem;
	}

	:where(.is-layout-flex) {
		gap: 4rem;
		@media screen and (max-width: 743px) {
			gap: 2rem;
		}
	}

	.wp-block-buttons {
		margin-block: calc(6rem * var(--rate));
		&:first-child {
			margin-top: 0;
		}
		&:last-child {
			margin-bottom: 0;
		}
		@media screen and (max-width: 743px) {
			&.is-layout-flex {
				flex-wrap: wrap;
				.wp-block-button {
					width: 100%;
				}
			}
		}
		.wp-block-button__link {
			position: relative;
			display: flex;
			align-items: center;
			max-width: 100%;
			width: auto;
			min-width: 22rem;
			min-height: 6rem;
			padding: 1rem 4rem 1rem 0;
			background: transparent;
			border-bottom: 1px solid;
			border-radius: 0;
			color: var(--color-base, #231815);
			text-decoration: none;
			font-size: 1.8rem;
			line-height: 1.4;
			font-weight: 700;
			text-align: left;
			&::before {
				content: "";
				position: absolute;
				top: 0;
				bottom: 0;
				right: 0;
				margin-block: auto;
				width: 2.4rem;
				height: 2.4rem;
				background-color: var(--bg-base, #F5F5F5);
				border-radius: 100%;
			}
			&::after {
				content: "";
				position: absolute;
				inset: 0 0 0 calc(100% - 2.4rem + (2.4rem * .05));
				width: .5rem;
				height: .7rem;
				margin: auto;
				background-color: #003968;
				clip-path: polygon(0 0, 100% 50%, 0 100%);
			}
			@media screen and (max-width: 743px) {
				min-width: 15rem;
				font-size: 1.6rem;
				margin-inline: auto;
			}
		}
		.is-style-button {
			@media screen and (max-width: 743px) {
				width: 100%;
			}
			.wp-block-button__link {
				align-items: center;
				max-width: 100%;
				width: 45.6rem;
				min-height: 8.6rem;
				padding: 1rem 6rem 1rem 4rem;
				background: #fff;
				border: 1px solid #6F6F6F;
				border-radius: 1rem;
				&::before {
					right: 2rem;
					background-color: var(--color-theme, #1F3CB0);
				}
				&::after {
					right: 2rem;
					left: calc(100% - 2rem - 2.4rem + (2.4rem * .05));
					background-color: #fff;
				}
				@media screen and (max-width: 743px) {
					min-height: 8rem;
					width: 100%;
					padding-left: 3rem;
				}
			}
		}
	}


	.wp-block-original-person-message.person-message {
		display: grid;
		grid-template-columns: 10rem minmax(0, 1fr);
		gap: 6rem;
		align-items: start;
		margin-block: calc(6rem * var(--rate));;
		h2 + &,
		h3 + &,
		h4 + & {
			margin-top: 0;
		}
		&:first-child {
			margin-top: 0;
		}
		&:last-child {
			margin-bottom: 0;
		}
		.person-message__person {
			min-width: 0;
		}
		.person-message__image {
			width: 10rem;
			margin: 0;
		}
		.person-message__image img {
			display: block;
			width: 10rem;
			height: 10rem;
			border-radius: 3rem;
			object-fit: cover;
		}
		.person-message__name {
			line-height: 1.5;
			text-align: center;
		}
		.person-message__image + .person-message__name {
			margin-top: 1.5rem;
		}
		.person-message__text {
			min-width: 0;
		}
		@media screen and (max-width: 743px) {
			display: block;
			&::after {
				content: "";
				display: table;
				clear: both;
			}
			.person-message__person {
				width: 8rem;
				margin: 0 3rem 2rem 0;
				float: left;
			}
			.person-message__image {
				width: 8rem;
			}
			.person-message__name {
				font-size: 1rem;
			}
			.person-message__image + .person-message__name {
				margin-top: .6rem;
			}
			.person-message__image img {
				width: 8rem;
				height: 8rem;
				border-radius: 2rem;
			}
		}
	}


	.wp-block-original-link-cards.link-cards  {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		gap: 5rem;
		.link-cards_item {
			position: relative;
			display: block;
			width: 45.6rem;
			border: 1px solid #6F6F6F;
			border-radius: 1rem;
			text-decoration: none;
			padding: 4.5rem 4rem 2.5rem;
			.link-cards_title {
				margin-bottom: 2.5rem;
				display: block;
				font-size: 3.4rem;
				line-height: 1.2;
			}
			.link-cards_text {
				display: block;
				font-size: 1.6rem;
				line-height: 1.8;
				padding-right: 2rem;
			}
			.link_arrow {
				top: auto;
				right: 2rem;
				bottom: 2.6rem;
			}
			&:not([href]) {
				.link_arrow {
					display: none;
				}
			}
		}
		@media screen and (max-width: 743px) {
			flex-direction: column;
			gap: 2rem;
			.link-cards_item {
				width: auto;
				padding: 3rem 2rem 1.5rem;
				.link-cards_title {
					margin-bottom: 1.5rem;
					font-size: 2.6rem;
				}
				.link-cards_text {
					font-size: 1.2rem;
				}
				.link_arrow {
					right: 1.5rem;
					bottom: 1.5rem;
				}
			}
		}
	}

	.eir_area_area_top_001 {
		font-size: calc(1.6rem * var(--rate));
	}
	.s_eirModule_category_icon {
		font-size: calc(1.4rem * var(--rate));
		line-height: 1.4;
	}
	.s_eirBlock + .s_eirBlock {
		margin-top: calc(4rem * var(--rate));
	}
	.ir_title_nav {
		align-items: center;
		margin-bottom: 3rem;
		a {
			color: var(--color-theme, #1F3CB0);
			--a-color: var(--color-theme, #1F3CB0);
			&[target] {
				display: inline-flex;
				align-items: center;
				gap: .2rem;
				&::after {
					content: "";
					display: block;
					width: 1.6rem;
					height: 1.6rem;
					background: url(../img/ico-blank.svg) no-repeat 50%;
					background-size: 100%;
				}
			}
		}
		@media screen and (max-width: 743px) {
			gap: 1rem;
		}
	}
}
.entry-body {
	.wp-block-buttons {
		.wp-block-button__link {
			@media (hover) {
				&[href]:hover {
					color: var(--color-theme, #1F3CB0);
					&::before {
						background-color: var(--color-theme, #1F3CB0);
					}
					&::after {
						background-color: #fff;
					}
				}
			}
		}
		.is-style-button {
			@media (hover) {
				position: relative;
				&::after {
					content: "";
					position: absolute;
					inset: 0;
					pointer-events: none;
					border: 2px solid var(--color-theme, #1F3CB0);
					border-radius: 1rem;
					opacity: 0;
					transition: opacity var(--transition);
				}
				&:has(.wp-block-button__link[href]:hover)::after {
					opacity: 1;
				}
			}
		}
	}
	.wp-block-original-link-cards.link-cards  {
		.link-cards_item {
			@media (hover) {
				&[href]::after {
					content: "";
					position: absolute;
					inset: -1px;
					pointer-events: none;
					border: 2px solid var(--color-theme, #1F3CB0);
					border-radius: 1rem;
					opacity: 0;
				}
				&[href]:hover::after {
					opacity: 1;
				}
			}
		}
	}
}
