/**
 * Front page — yosegi-kaikan.com aligned (Splide hero retained).
 */

/* Section common */
main.sanpuku-front > .sanpuku-front-section {
	margin-block: 0 !important;
	padding-top: var(--sanpuku-space-section-y) !important;
	padding-bottom: var(--sanpuku-space-section-y) !important;
}

main.sanpuku-front > .sanpuku-front-section + .sanpuku-front-section {
	padding-top: var(--sanpuku-space-section-y) !important;
}

/* WordPress block layout adds extra gap between sections / headings — reset on front */
main.sanpuku-front,
main.sanpuku-front.wp-block-group {
	gap: 0 !important;
	--wp--style--block-gap: 0;
}

main.sanpuku-front.is-layout-flow > * + *,
main.sanpuku-front > .sanpuku-front-section + .sanpuku-front-section {
	margin-block-start: 0 !important;
}

.sanpuku-front-section.alignfull {
	margin-block: 0 !important;
}

.sanpuku-front-section {
	background: var(--sanpuku-white);
}

main.sanpuku-front > .sanpuku-front-section.sanpuku-front-section--cream {
	background: var(--sanpuku-bg-soft) !important;
}

main.sanpuku-front > .sanpuku-front-section.sanpuku-front-section--soft {
	background: var(--sanpuku-bg-panel) !important;
}

.sanpuku-front-section__inner {
	max-width: var(--sanpuku-width-hero);
	margin-inline: auto;
	padding-inline: var(--sanpuku-gutter);
	gap: 0 !important;
	--wp--style--block-gap: 0;
}

@media (min-width: 901px) {
	.sanpuku-front-section__inner {
		padding-inline: 0;
	}
}

/* WP constrained layout の margin:auto が section__body のネガティブ margin と競合して右ズレする */
.sanpuku-front-section__inner.is-layout-constrained > .wp-block-shortcode {
	margin-inline: 0 !important;
	max-width: none !important;
	width: 100%;
}

.sanpuku-front-section__inner.is-layout-constrained > * + * {
	margin-block-start: 0 !important;
}

.sanpuku-front-section__title {
	color: var(--sanpuku-accent);
	font-family: var(--sanpuku-font-serif);
	font-weight: 800;
	text-align: center;
	margin: 0 0 var(--sanpuku-space-content) !important;
	font-size: clamp(1.75rem, 4vw, 2.1rem);
	letter-spacing: 0.1em;
	line-height: 1.3;
}

.sanpuku-front-section__subtitle {
	margin: -0.5rem 0 var(--sanpuku-space-block);
	text-align: center;
	color: var(--sanpuku-accent);
	font-family: var(--sanpuku-font-sans);
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	line-height: 1.4;
}

.sanpuku-front-section__body,
.sanpuku-front-news__body {
	box-sizing: border-box;
	width: 100%;
	max-width: none;
	margin-inline: 0 !important;
	margin-block: 0;
	padding-block: 0;
}

/* wpautop が挿入する class なし空段落の保険 */
.sanpuku-front-section__body > p:not([class]),
.sanpuku-front-news__body > p:not([class]) {
	display: none;
	margin: 0;
	padding: 0;
}

.sanpuku-front-section__lead {
	text-align: justify;
	max-width: var(--sanpuku-width-lead);
	width: min(100%, var(--sanpuku-width-lead));
	margin-block: 0 !important;
	margin-inline: auto;
	padding-block: 0 !important;
	padding-inline: 0;
	color: var(--sanpuku-text);
	font-size: 1.15rem;
	line-height: 1.75;
}

.sanpuku-front-section__body > .sanpuku-front-section__lead {
	margin-bottom: 0 !important;
	margin-block-end: 0 !important;
}

.sanpuku-front-section__body > .sanpuku-front-section__lead + * {
	margin-top: var(--sanpuku-space-block);
}

/* セクション端の余白は padding-top / padding-bottom のみ（末尾要素の margin は載せない） */
.sanpuku-front-section__inner > .wp-block-shortcode {
	margin-block: 0 !important;
}

.sanpuku-front-section__body > :last-child,
.sanpuku-front-news__body > :last-child {
	margin-bottom: 0 !important;
	padding-bottom: 0 !important;
}

.sanpuku-front-section .sanpuku-front-btn-wrap:last-child {
	margin-bottom: 0 !important;
}

.sanpuku-front-panel {
	box-sizing: border-box;
	border: 1px solid var(--sanpuku-accent);
	border-radius: var(--sanpuku-radius);
	background: var(--sanpuku-white);
	padding: var(--sanpuku-space-content);
}

.sanpuku-front-about__lead,
.sanpuku-front-services__lead {
	margin-top: 0;
}

.sanpuku-front-btn-wrap {
	margin: var(--sanpuku-space-block) 0;
	text-align: center;
}

.sanpuku-front-btn-wrap--last,
.sanpuku-front-news__body > .sanpuku-front-btn-wrap {
	margin-bottom: 0 !important;
}

.sanpuku-front-btn-wrap--card {
	margin: var(--sanpuku-space-block) 0 0;
	align-self: stretch;
}

.sanpuku-front-btn-wrap--card .sanpuku-front-btn {
	width: 100%;
	min-width: 0;
}

.sanpuku-front-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	min-width: min(100%, 18rem);
	padding: calc(0.85rem + 2px) 1.5rem;
	border-radius: var(--sanpuku-radius-pill);
	background: var(--sanpuku-accent);
	color: var(--sanpuku-white);
	font-family: var(--sanpuku-font-sans);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	box-sizing: border-box;
}

@media (min-width: 901px) {
	.sanpuku-front-btn {
		font-size: var(--sanpuku-font-size-body-pc);
	}
}

.sanpuku-front-btn:has(.sanpuku-front-btn__icon) {
	position: relative;
}

.sanpuku-front-btn__text {
	text-align: center;
}

.sanpuku-front-btn:not(:has(.sanpuku-front-btn__icon)) .sanpuku-front-btn__text {
	flex: 1 1 auto;
	min-width: 0;
}

.sanpuku-front-btn:hover,
.sanpuku-front-btn:focus-visible {
	background: var(--sanpuku-accent-dark);
	color: var(--sanpuku-white);
}

.sanpuku-front-btn__icon {
	position: absolute;
	inset-inline-end: calc(1.25rem - 3px);
	top: 50%;
	display: block;
	width: 0.9375rem;
	height: auto;
	color: var(--sanpuku-white);
	opacity: 0.9;
	transform: translateY(calc(-50% + 1px));
	pointer-events: none;
}

/* Hero carousel */
.sanpuku-front,
main.sanpuku-front {
	margin-top: 0;
}

.sanpuku-front-hero {
	position: relative;
	padding-block: 0 var(--sanpuku-space-block);
	background: var(--sanpuku-white);
	max-width: var(--sanpuku-width-hero);
	margin-inline: auto;
	padding-inline: var(--sanpuku-gutter);
	box-sizing: content-box;
}

.sanpuku-front-hero__tagline {
	text-align: left;
	font-size: 16px;
	font-weight: 400;
	color: var(--sanpuku-text);
	margin: 0;
	padding: 16px 0;
	letter-spacing: normal;
	line-height: normal;
	font-family: var(--sanpuku-font-sans);
}

.sanpuku-front-hero .wp-block-shortcode,
.sanpuku-front-hero .sanpuku-hero-splide,
.sanpuku-front-hero .sanpuku-front-hero__photo {
	margin: 0;
}

.sanpuku-front-hero__photo {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	margin: 0;
	overflow: hidden;
	border-radius: var(--sanpuku-radius);
	background: var(--sanpuku-bg-panel);
}

.sanpuku-front-hero__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sanpuku-hero-splide {
	max-width: 100%;
	margin-inline: auto;
	padding-inline: 0;
}

.sanpuku-hero-splide .splide__slide figure {
	margin: 0;
}

.sanpuku-hero-slide {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--sanpuku-radius);
	background: var(--sanpuku-bg-panel);
}

.sanpuku-hero-slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sanpuku-hero-slide__caption {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	margin: 0;
	padding: 1.25rem 1rem 1.5rem;
	pointer-events: none;
	background: linear-gradient(to top, rgb(0 0 0 / 0.35) 0%, transparent 55%);
}

.sanpuku-hero-slide__btn {
	pointer-events: auto;
	display: inline-block;
	padding: 0.65rem 1.25rem;
	background: var(--sanpuku-accent);
	color: var(--sanpuku-white);
	font-family: var(--sanpuku-font-sans);
	font-size: 0.875rem;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	border-radius: var(--sanpuku-radius-pill);
	box-shadow: 0 2px 8px rgb(0 0 0 / 0.2);
}

.sanpuku-hero-slide__btn:hover,
.sanpuku-hero-slide__btn:focus-visible {
	background: var(--sanpuku-accent-dark);
	color: var(--sanpuku-white);
}

.sanpuku-hero-splide .splide__arrow {
	background: rgb(255 255 255 / 0.92);
	opacity: 1;
}

.sanpuku-hero-splide .splide__arrow svg {
	fill: var(--sanpuku-accent);
}

.sanpuku-hero-splide .splide__pagination__page.is-active {
	background: var(--sanpuku-accent);
}

/* Service cards */
.sanpuku-front-services__grid {
	display: grid;
	gap: var(--sanpuku-space-tight);
	grid-template-columns: repeat(3, 1fr);
	align-items: start;
}

@media (max-width: 879px) {
	.sanpuku-front-services__grid {
		grid-template-columns: 1fr;
	}
}

.sanpuku-service-card {
	background: var(--sanpuku-white);
	border-radius: var(--sanpuku-radius);
	padding: var(--sanpuku-space-content);
	text-align: center;
	display: flex;
	flex-direction: column;
}

.sanpuku-service-card__image {
	width: 96px;
	height: 96px;
	margin: 0 auto;
	border-radius: var(--sanpuku-radius-circle);
	overflow: hidden;
	background: var(--sanpuku-accent);
}

.sanpuku-service-card__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.sanpuku-service-card h3 {
	margin: 0;
	padding: 0.75rem 0;
	font-size: 1.15rem;
	font-weight: 600;
	color: var(--sanpuku-accent);
	font-family: var(--sanpuku-font-sans);
}

.sanpuku-service-card p:not(.sanpuku-front-btn-wrap) {
	margin: 0;
	padding: 0 0.5rem;
	font-size: 1.15rem;
	line-height: 1.75;
	text-align: justify;
	flex: 0 0 auto;
}

/* Access / hours */
.sanpuku-front-access {
	margin: 0;
}

.sanpuku-front-access__hours {
	margin-block-end: 0;
	max-width: var(--sanpuku-width-lead);
	width: min(100%, var(--sanpuku-width-lead));
	margin-inline: auto;
	border-radius: var(--sanpuku-radius);
	overflow: hidden;
}

.sanpuku-front-access__details {
	margin: 0 0 var(--sanpuku-space-content);
	text-align: center;
	line-height: 1.9;
	font-family: var(--sanpuku-font-sans);
}

.sanpuku-front-access__table {
	margin: 0;
	padding: 0;
	width: 100%;
}

.sanpuku-front-access__table,
.sanpuku-front-access__th,
.sanpuku-front-access__td {
	margin: 0;
}

.sanpuku-front-access__row {
	display: grid;
	grid-template-columns: 10rem 1fr;
	border-top: 1px solid var(--sanpuku-accent);
	border-right: 1px solid var(--sanpuku-accent);
	border-left: 1px solid var(--sanpuku-accent);
	background: var(--sanpuku-white);
}

.sanpuku-front-access__row:last-child {
	border-bottom: 1px solid var(--sanpuku-accent);
}

.sanpuku-front-access__th {
	padding: var(--sanpuku-space-tight);
	background: var(--sanpuku-accent);
	border-bottom: 1px solid var(--sanpuku-white);
	font-weight: 500;
	letter-spacing: 0.05em;
	text-align: center;
	color: var(--sanpuku-white);
	font-family: var(--sanpuku-font-sans);
}

.sanpuku-front-access__row:last-child .sanpuku-front-access__th {
	border-bottom: 0;
}

.sanpuku-front-access__td {
	padding: var(--sanpuku-space-tight);
	font-family: var(--sanpuku-font-sans);
}

.sanpuku-front-access__details p {
	margin: 0 0 0.35rem;
}

.sanpuku-front-access__address {
	font-weight: 600;
}

.sanpuku-front-access__map {
	width: 100%;
	margin: 0;
	aspect-ratio: 4 / 3;
	background: var(--sanpuku-bg-panel);
	border-radius: var(--sanpuku-radius);
	overflow: hidden;
}

.sanpuku-front-access__map iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

@media (max-width: 600px) {
	.sanpuku-front-access__row {
		grid-template-columns: 1fr;
	}

	.sanpuku-front-access__th {
		border-bottom: 1px solid var(--sanpuku-white);
	}

	.sanpuku-front-access__row:last-child .sanpuku-front-access__th {
		border-bottom: 1px solid var(--sanpuku-white);
	}

	.sanpuku-front-access__td {
		text-align: center;
	}
}

/* News */
.sanpuku-front-panel.sanpuku-front-news-list {
	padding-block: 0;
	padding-inline: var(--sanpuku-space-content);
}

.sanpuku-front-news-list {
	--sanpuku-news-cat-font-size: 0.75rem;
	--sanpuku-news-cat-pad-x: 1.7rem;
	--sanpuku-news-cat-width: calc(6 * var(--sanpuku-news-cat-font-size) + var(--sanpuku-news-cat-pad-x));
	--sanpuku-news-item-gap: 1.25rem;
}

.sanpuku-front-news-list__items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sanpuku-front-news-list__item {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: var(--sanpuku-news-item-gap);
	min-height: 4.25rem;
	box-sizing: border-box;
	padding: 0;
	border-bottom: 1px dotted color-mix(in srgb, var(--sanpuku-accent) 35%, transparent);
}

.sanpuku-front-news-list__item:last-child {
	border-bottom: 0;
}

.sanpuku-front-news-list__date {
	flex: 0 0 auto;
	margin: 0;
	color: var(--sanpuku-accent);
	font-family: var(--sanpuku-font-sans);
	font-size: 0.9375rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	white-space: nowrap;
}

.sanpuku-front-news-list__cat {
	flex: 0 0 var(--sanpuku-news-cat-width);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: var(--sanpuku-news-cat-width);
	min-width: var(--sanpuku-news-cat-width);
	max-width: var(--sanpuku-news-cat-width);
	padding: 0.3rem 0.85rem;
	border-radius: var(--sanpuku-radius);
	background: var(--sanpuku-accent);
	color: var(--sanpuku-white);
	font-family: var(--sanpuku-font-sans);
	font-size: var(--sanpuku-news-cat-font-size);
	font-weight: 600;
	line-height: 1.4;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sanpuku-front-news-list__title {
	flex: 1 1 auto;
	min-width: 0;
	color: var(--sanpuku-text);
	font-family: var(--sanpuku-font-sans);
	font-size: var(--sanpuku-font-size-body-pc);
	line-height: 1.6;
	text-decoration: none;
}

.sanpuku-front-news-list__title:hover,
.sanpuku-front-news-list__title:focus-visible {
	color: var(--sanpuku-accent);
	text-decoration: underline;
}

.sanpuku-front-news__empty {
	margin: 0 0 var(--sanpuku-space-content);
	text-align: center;
	color: var(--sanpuku-text);
	font-family: var(--sanpuku-font-sans);
}

@media (max-width: 720px) {
	.sanpuku-front-panel.sanpuku-front-news-list {
		padding-inline: 1rem;
		padding-block: 0;
	}

	.sanpuku-front-news-list__item {
		flex-wrap: wrap;
		gap: 0.5rem var(--sanpuku-news-item-gap);
	}

	.sanpuku-front-news-list__title {
		flex: 1 1 100%;
	}
}

/* Contact CTA */
.sanpuku-front-contact {
	text-align: center;
}

.sanpuku-front-contact__lead {
	margin-top: 0;
}

.sanpuku-front-contact__actions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--sanpuku-space-tight);
	width: 100%;
	max-width: var(--sanpuku-width-hero);
	margin: 0 auto;
}

.sanpuku-front-contact__actions .sanpuku-front-btn {
	width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.sanpuku-front-btn--outline {
	background: var(--sanpuku-white);
	color: var(--sanpuku-accent);
	box-shadow: inset 0 0 0 2px var(--sanpuku-accent);
}

.sanpuku-front-btn--outline:hover,
.sanpuku-front-btn--outline:focus-visible {
	background: var(--sanpuku-bg-soft);
	color: var(--sanpuku-accent-dark);
	box-shadow: inset 0 0 0 2px var(--sanpuku-accent-dark);
}

@media (max-width: 640px) {
	.sanpuku-front-contact__actions {
		grid-template-columns: 1fr;
	}
}

/* Mobile / tablet front page */
@media (max-width: 900px) {
	:root {
		--sanpuku-space-section-y: 2.5rem;
		--sanpuku-space-block: 1.5rem;
	}

	main.sanpuku-front {
		overflow-x: clip;
	}

	main.sanpuku-front > .sanpuku-front-section {
		padding-top: var(--sanpuku-space-section-y) !important;
		padding-bottom: var(--sanpuku-space-section-y) !important;
	}

	main.sanpuku-front > .sanpuku-front-section + .sanpuku-front-section {
		padding-top: var(--sanpuku-space-section-y) !important;
	}

	main.sanpuku-front > .sanpuku-front-hero + .sanpuku-front-section {
		padding-top: var(--sanpuku-space-section-y) !important;
	}

	.sanpuku-front-hero {
		max-width: none;
		padding-block: 0 var(--sanpuku-space-tight);
	}

	.sanpuku-front-hero__tagline {
		font-size: 0.9375rem;
		padding: 0.75rem 0 1rem;
	}

	.sanpuku-front-section__title {
		margin-bottom: var(--sanpuku-space-tight);
		font-size: clamp(1.5rem, 6vw, 1.85rem);
	}

	.sanpuku-front-section__subtitle {
		margin-bottom: var(--sanpuku-space-content);
	}

	.sanpuku-front-section__lead {
		font-size: 1rem;
		line-height: 1.85;
		text-align: left;
		padding-inline: 0;
	}

	.sanpuku-service-card h3 {
		font-size: 1.1rem;
	}

	.sanpuku-service-card p:not(.sanpuku-front-btn-wrap) {
		font-size: 1rem;
		text-align: left;
		padding-inline: 0;
	}

	.sanpuku-front-btn-wrap .sanpuku-front-btn {
		width: 100%;
		max-width: none;
	}

	.sanpuku-front-panel:not(.sanpuku-front-news-list) {
		padding: var(--sanpuku-space-tight);
	}

	.sanpuku-front-access__details {
		font-size: 0.9375rem;
	}
}

@media (max-width: 480px) {
	.sanpuku-front-section__inner {
		padding-inline: 1rem;
	}

	.sanpuku-front-hero {
		padding-inline: 1rem;
	}
}
