/*
Theme Name: japantaxation
Author: happy in code
Description: site Theme of Miyuki Ueda, Japanese Tax Advisor
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: japantaxation
*/
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@100..900&family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');
html {
	scroll-behavior: smooth;
}
body {
	font-family: 'Roboto', 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', 'Noto Sans JP', sans-serif;
}

:where(:root) {
	overflow-wrap: anywhere;
	line-break: strict;
  text-spacing-trim: trim-start;
}
:where(pre) {
  text-spacing-trim: space-all;
}
:where(:is(h1, h2, h3, h4, h5, h6, caption)) {
	font-feature-settings: "palt";
	font-kerning: normal;
}
:where(:root) {
  text-autospace: normal;
}
:where(pre, time, input:not([type="button" i], [type="submit" i], [type="reset" i]), textarea, [contenteditable]) {
  text-autospace: no-autospace;
}

:where(p) {
  text-wrap: pretty;
}

header {
	position: sticky;
	top: 0;
	left: 0;
	width: 100vw;
	height: 64px;
	background: transparent;
	z-index: 98;
	.is-layout-flex {
		display: grid;
		grid-template-columns: 285px 1fr;
		gap: 0;
		height: 64px;
		align-items: center;
	}
	&.is-scroll {
		background: rgba(255 255 255 / 0.6);
	}
}
.l-contents {
	margin-top: -64px !important;
}
.p-menu {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	justify-content: flex-end;
	align-items: center;
	gap: 1em;
	font-size: 16px;
	font-weight: 600;
	text-transform: capitalize;
	li {
		a {
			position: relative;
			text-decoration: none;
		}
		&:not(.is-btn) a:hover::after {
			position: absolute;
			top: calc(100% + 4px);
			left: calc(50% - ((1em * 5) /2 ));
			font-size: 4px;
			letter-spacing: 1em;
			color: var(--wp--preset--color--theme-red-02);
			content: "●●●";
		}
		&.is-btn a {
			display: inline-block;
			padding: 8px 16px;
			border-radius: 4px;
			background-color: var(--wp--preset--color--theme-red-01);
			color: var(--wp--preset--color--white);
			transition: backgroud-color .3s ease-in;
			&:hover {
				border: none;
				background-color: var(--wp--preset--color--theme-red-02);
			}
		}
	}
}
.m-spmenu-btn { display: none; }
@media screen and (max-width: 768px) {
	.m-spmenu-btn {
		display: block;
		position: sticky;
		top: 8px;
		right: 8px;
		margin: 0;
		padding: 0;
		text-align: right;
		min-width: 40px;
		z-index: 99;
	}
	.p-menu {
		position: fixed;
		top: 0;
		left: 100%;
		width: 100vw;
		height: 100vh;
		background: var(--wp--preset--color--white);
		padding: 80px 32px 16px;
		flex-direction: column;
		justify-content: flex-start;
		align-items: flex-start;
		transition: left .5s ease-in;
		&.is-open { left: 0; }
		li {
			display: block;
			width: 100%;
			a {
				display: block;
				padding: 16px 8px;
			}
			&.is-btn {
				margin-top: 16px;
				a {
					display: block;
					padding: 16px 8px;
					text-align: center;
				}
			}
		}
	} 

}

/* ボタン */
.wp-block-button__link {
	border-radius: 8px;
	font-weight: 600;
	transition: background-color .3s ease-in;
}
.wp-block-button__link.is-style-outline {
	transition: border-color .3s ease-in;
}
.wp-block-button__link:hover {
	background-color: var(--wp--preset--color--theme-blue-01) !important;
	border-color: var(--wp--preset--color--theme-blue-01) !important;
}
.wp-block-button__link.is-style-outline:hover {
	border-color: var(--wp--preset--color--theme-blue-02) !important;
}

.p-contact {
	h2 { text-transform: none !important; }
	.wp-block-buttons {
		display: grid;
		grid-template-columns: repeat(2, 1fr);
		.wp-block-button a {
			display: grid;
			grid-template-columns: 10% 1fr;
			align-items: center;
			text-align: left;
			gap: 8px;
			padding: 16px;
			font-size: var(--wp--preset--font-size--medium);
			white-space: nowrap;
		}
	}
}
@media screen and (max-width: 768px) {
	.p-contact {
		.wp-block-buttons {
			display: flex;
			flex-direction: row;
			.wp-block-button {
				width: 100%;
				a { font-size: var(--wp--preset--font-size--small); }
			}
		}
	}
}

/* top */
.p-mv {
	min-height: 500px;
}
.home {
	:where(.is-layout-flow) > * {
		margin-block-start: 0;
	}
	h2 {
		position: relative;
		margin-bottom: 56px;
		font-size: 36px;
		letter-spacing: 0.05em;
		text-transform: uppercase;
		&::after {
			position: absolute;
			top: calc(100% + 4px);
			left: calc(50% - ((1em * 5) /2 ));
			font-size: 8px;
			letter-spacing: 1em;
			color: var(--wp--preset--color--theme-red-02);
			content: "●●●";
		}
	}
	h3 {
		margin: 0 0 16px;
		padding: 0;
		font-size: 24px;
		span { font-size: 0.85em; }
	}
	p {
		margin: 0;
		padding: 0;
		font-size: var(--wp--preset--font-size--small);
		line-height: 2;
		+ p { margin-top: 1em; }
	}
	.m-service-menu {
		margin: 0 auto 24px;
		padding: 0;
		list-style: none;
		display: flex;
		justify-content: flex-start;
		align-items: center;
		gap: 8px;
		li {
			min-width: 245px;
			display: block;
			a {
				position: relative;
				display: block;
				padding: 8px 16px;
				background: var(--wp--preset--color--theme-blue-03);
				text-align: center;
				font-size: 20px;
				font-weight: 600;
				text-decoration: none;
				&::after {
					position: absolute;
					top: 90%;
					left: calc(50% - (24px / 2));
					width: 24px;
					height: 20px;
					clip-path: polygon(0 0, 50% 100%, 100% 0);
					background: var(--wp--preset--color--theme-blue-03);
					content: "";
				}
				&:hover,
				&.is-current {
					background: var(--wp--preset--color--theme-blue-01);
					&::after { background: var(--wp--preset--color--theme-blue-01); }
				}
			}
		}
	}
	@media screen and (max-width: 600px) {
		.m-service-menu {
			li {
				width: 50%;
				min-width: unset;
				a { font-size: var(--wp--preset--font-size--small); }
			}
		}
	}
	.m-service-area {
		display: grid;
		.m-service-block {
			grid-area: 1 / 1;
			display: none;
			z-index: 0;
			&.is-show {
				display: block;
				z-index: 1;
			}
			.wp-block-media-text {
				gap: 24px;
				padding: 32px 24px;
				background: var(--wp--preset--color--white);
				box-shadow: 0 3px 6px rgba(0 0 0 / 0.16 );
				border-radius: 8px;
				.wp-block-media-text__content {
					padding: 0;
				}
				h3 {
					margin-bottom: 8px;
					font-size: 20px;
				}
				p {
					font-size: 16px;
					line-height: 1.6;
				}
			}
		}
	}
	.p-blog {
		.wp-block-buttons {
			display: block;
			.wp-block-button {
				display: block;
				margin: 0 auto;
				text-align: center;
				.wp-block-button__link {
					position: relative;
					text-align: center;
					width: 90%;
					max-width: 300px;
					margin: 0 auto;
					gap: 4px;
					img {
						position: absolute;
						top: calc(50% - 8px);
						right: 16px;
					}
				}	
			}
		}
		.m-blog-block {
			margin-bottom: 48px;
			.m-blog-block-inner {
				position: relative;
				display: grid;
				grid-template-rows: auto 1fr 2em;
				height: 100%;
				padding: 16px;
				border-radius: 8px;
				background: var(--wp--preset--color--white);
				box-shadow: 0 3px 6px rgba(0 0 0 / 0.16 );
				transition: background-color .1s ease-in;
				&:hover {
					background-color: rgba(255 255 255 / 0.6);
				}
				figure {
					margin-bottom: 8px;
					aspect-ratio: 120 / 63;
					overflow: hidden;
					img {
						width: 100%;
						height: 100%;
						object-fit: cover;
					}
				}
				h3 {
					width: 100%;
					margin-bottom: 8px;
					font-size: 16px;
					line-height: 1.4;
					a {
						display: -webkit-box;
						text-overflow: ellipsis;
						-webkit-box-orient: vertical;
						line-clamp: 3;
						-webkit-line-clamp: 3;
						overflow: hidden;
						&::after {
							position: absolute;
							top: 0;
							left: 0;
							width: 100%;
							height: 100%;
							content: '';
							z-index: 1;
						}	
					}
				}
				.is-layout-flex.m-metadata {
					display: grid;
					grid-template-columns: 1fr auto;
					gap: 8px;
					font-size: var(--wp--preset--font-size--custom-1);
					margin: 0;
					.taxonomy-category a {
						display: inline-block;
						padding: 2px 4px;
						background: var(--wp--preset--color--theme-blue-03);
						text-decoration: none;
						pointer-events: none;
					}
				}
			}
		}
	}
}

.p-page-mv {
	.wp-block-cover__inner-container {
		.wp-block-cover__inner-container {
			max-width: var(--wp--style--global--content-size);
		}
	}
}
.p-bloglist-leftimg {
	margin-bottom: 60px;
	li {
		position: relative;
		margin-block-start: 0 !important;
		transition: background-color .3s ease-in;
		&:hover { background-color: var(--wp--preset--color--theme-blue-04); }
		figure {
			aspect-ratio: 120 / 63;
			overflow: hidden;
			img {
				width: 100%;
				height: 100%;
				object-fit: cover;
			}
		}
		.ms-txtarea {
			display: grid;
			grid-template-rows: auto 1fr auto;
			gap: 8px;
		}
		h2 {
			margin: 0;
			font-size: var(--wp--preset--font-size--medium);
			line-height: 1.4;
			a {
				display: -webkit-box;
				text-overflow: ellipsis;
				-webkit-box-orient: vertical;
				line-clamp: 2;
				-webkit-line-clamp: 2;
				overflow: hidden;
				&::after {
					position: absolute;
					top: 0;
					left: 0;
					width: 100%;
					height: 100%;
					content: '';
					z-index: 1;
				}
			}
		}
		.wp-block-post-excerpt {
			margin: 0;
			p {
				font-size: 14px;
				display: -webkit-box;
				text-overflow: ellipsis;
				-webkit-box-orient: vertical;
				line-clamp: 3;
				-webkit-line-clamp: 3;
				overflow: hidden;
			}
		}
		.m-metadata {
			display: grid;
			grid-template-columns: 1fr auto;
			align-items: center;
			gap: 8px;
			font-size: var(--wp--preset--font-size--custom-1);
			margin: 0;
			.wp-block-column {
				display: flex;
				align-items: center;
			}
			.taxonomy-category a {
				display: inline-block;
				padding: 2px 4px;
				background: var(--wp--preset--color--theme-blue-03);
				text-decoration: none;
				pointer-events: none;
			}
			.wp-block-post-date { margin-block-start: 0 !important; }
		}
	}
}
.wp-block-query-pagination {
	margin-top: 0;
	padding: 0;
	.wp-block-query-pagination-previous {
		display: block;
		width: 20px;
		height: 40px;
		background: url(asset/images/icon-arrow.svg) no-repeat center center;
		rotate: 180deg;
		background-size: 20px auto;
		span { opacity: 0; }
		&:hover { opacity: .7; }
	}
	.wp-block-query-pagination-next {
		display: block;
		width: 20px;
		height: 40px;
		background: url(asset/images/icon-arrow.svg) no-repeat center center;
		background-size: 20px auto;
		span { opacity: 0; }
		&:hover { opacity: .7; }
	}
	.wp-block-query-pagination-numbers {
		display: flex;
		justify-content: center;
		align-items: center;
		gap: 4px;
		span, a {
			display: flex;
			justify-content: center;
			align-items: center;
			width: 40px;
			height: 40px;
			border-radius: 2px;
			border: 2px solid var(--wp--preset--color--theme-blue-01);
			text-decoration: none;
			font-size: 14px;
			font-weight: 500;
			transition: background-color .3s ease-in;
		}
		span, a:hover {
			background: var(--wp--preset--color--theme-blue-01);
		}
	}
}

.single {
	.p-page-mv {
		p {
			margin: 0;
			padding: 0;
			font-size: var(--wp--preset--font-size--x-large);
			font-style: normal;
			font-weight: 700;
			letter-spacing: 0.05px;
			line-height: 1.5;
		}
	}
	.p-contents-inner {
		h1 {
			line-height: 1.3;
		}
		.m-taxonomy {
			margin-block-start: 8px;
			margin-bottom: 8px;
			display: grid;
			grid-template-columns: auto 1fr;
			justify-content: flex-start;
			align-items: center;
			gap: 16px;
			font-size: 14px;
			.wp-block-column {
				display: flex;
				align-items: center;
			}
			.taxonomy-category a {
				display: inline-block;
				padding: 2px 4px;
				background: var(--wp--preset--color--theme-blue-03);
				text-decoration: none;
				&:hover { background-color: var(--wp--preset--color--theme-blue-02); }
			}
			.taxonomy-post_tag {
				display: flex;
				align-items: center;
				gap: 4px;
				.wp-block-post-terms__prefix {
					display: flex;
					align-items: center;
				}
				a {
					display: inline-block;
					text-decoration: none;
					&::before { content: '#'; }
					&:hover { text-decoration: underline; }
				}
			}
		}
		.m-date {
			margin-block-start: 8px;
			margin-bottom: 16px;
			display: grid;
			grid-template-columns: 1fr auto;
			justify-content: flex-end;
			align-items: center;
			gap: 16px;
			font-size: 14px;
			.wp-block-column {
				display: flex;
				flex-wrap: nowrap;
				justify-content: flex-end;
				align-items: center;
				.wp-block-post-date__modified-date,
				.wp-block-post-date { margin-block-start: 0; }
			}
		}
	}
}
.single,
.page {
	.p-contents-inner {
		margin-block-start: 0;
		h3 {
			display: flex;
			flex-direction: column;
			&.has-text-align-center { align-items: center; }
			&::after {
				width: 10%;
				height: 4px;
				background-color: var(--wp--preset--color--theme-red-02);
				content: '';
			}	
		}
		h5 { color: var(--wp--preset--color--theme-blue-05); }
		p {
			line-height: 2;
		}
		.m-btm-linkbtn {
			display: block;
			.wp-block-button {
				display: block;
				margin: 0 auto;
				text-align: center;
				.wp-block-button__link {
					position: relative;
					text-align: center;
					width: 90%;
					max-width: 300px;
					margin: 0 auto;
					gap: 4px;
					img {
						position: absolute;
						top: calc(50% - 8px);
						right: 16px;
					}
				}	
			}
		}
	}
}