/* ==========================================================================
   layout.css — container, header, nav, footer, breadcrumb, section rhythm
   ========================================================================== */

.c-container {
	max-width: var(--container-width);
	margin-inline: auto;
	padding-inline: var(--container-pad);
}

.c-section {
	padding-block: var(--space-section-sp);
}

@media (min-width: 1280px) {
	.c-section {
		padding-block: var(--space-section-pc);
	}
}

/* ---------- Header ---------- */

.c-header {
	position: sticky;
	top: var(--admin-bar-offset, 0);
	z-index: 100;
	background: var(--color-white);
	box-shadow: var(--shadow-sm);
}

.c-header__top-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-md);
	padding-block: var(--space-sm);
}

.c-header__logo img {
	max-height: 56px;
	width: auto;
}

.c-header__site-title {
	font-size: 20px;
	font-weight: 700;
	color: var(--color-text);
}

.c-header__contact {
	display: none;
}

.c-header__phone {
	display: flex;
	align-items: center;
	gap: var(--space-xs);
	color: var(--color-text);
}

.c-header__phone:hover {
	text-decoration: none;
	color: var(--color-primary);
}

.c-header__phone-icon {
	color: var(--color-primary);
}

.c-header__phone-text {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}

.c-header__phone-text small {
	font-size: 11px;
	color: var(--color-text-light);
}

.c-header__phone-text strong {
	font-size: 20px;
	font-weight: 700;
}

.c-header__sp-phone {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--color-accent-emergency);
	color: var(--color-white);
}

.c-header__hamburger {
	position: relative;
	width: 40px;
	height: 40px;
	background: none;
	border: 0;
	padding: 0;
}

.c-header__hamburger span {
	position: absolute;
	left: 8px;
	right: 8px;
	height: 2px;
	background: var(--color-text);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.c-header__hamburger span:nth-child(1) { top: 13px; }
.c-header__hamburger span:nth-child(2) { top: 19px; }
.c-header__hamburger span:nth-child(3) { top: 25px; }

body.is-nav-open .c-header__hamburger span:nth-child(1) {
	transform: translateY(6px) rotate(45deg);
}
body.is-nav-open .c-header__hamburger span:nth-child(2) {
	opacity: 0;
}
body.is-nav-open .c-header__hamburger span:nth-child(3) {
	transform: translateY(-6px) rotate(-45deg);
}

@media (min-width: 1280px) {
	.c-header__contact {
		display: flex;
		align-items: center;
		gap: var(--space-md);
	}
	.c-header__sp-phone,
	.c-header__hamburger {
		display: none;
	}
}

/* ---------- Nav ---------- */

.c-nav {
	background: var(--color-primary-dark);
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.25s ease;
}

body.is-nav-open .c-nav {
	max-height: 2000px;
}

.c-nav__list {
	display: flex;
	flex-direction: column;
}

.c-nav__item--top {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.c-nav__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-xs);
	padding: var(--space-sm) var(--container-pad);
	color: var(--color-white);
	font-weight: 500;
}

.c-nav__link:hover,
.c-nav__link:focus-visible {
	background: rgba(255, 255, 255, 0.08);
	text-decoration: none;
}

.c-nav__caret {
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
}

.c-nav__submenu {
	background: rgba(0, 0, 0, 0.15);
}

.c-nav__submenu .c-nav__link {
	padding-left: calc(var(--container-pad) + var(--space-md));
	font-weight: 400;
	font-size: var(--fs-small);
}

.c-nav__sp-cta {
	padding: var(--space-md) var(--container-pad);
}

@media (min-width: 1280px) {
	.c-nav {
		max-height: none;
		overflow: visible;
	}

	.c-nav__list {
		flex-direction: row;
		justify-content: center;
	}

	.c-nav__item--top {
		border-top: 0;
		position: relative;
	}

	.c-nav__link {
		padding: var(--space-sm) var(--space-md);
		justify-content: center;
	}

	.c-nav__submenu {
		display: none;
		position: absolute;
		left: 0;
		top: 100%;
		min-width: 240px;
		background: var(--color-primary-dark);
		box-shadow: var(--shadow-md);
		z-index: 10;
	}

	.c-nav__item--has-children:hover .c-nav__submenu,
	.c-nav__item--has-children:focus-within .c-nav__submenu {
		display: block;
	}

	.c-nav__submenu .c-nav__link {
		padding-left: var(--space-md);
	}

	.c-nav__sp-cta {
		display: none;
	}
}

/* ---------- Mobile fixed CTA ---------- */

.c-mobile-cta {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 90;
	display: grid;
	grid-template-columns: 1fr 1fr;
	height: var(--mobile-cta-height);
	box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.12);
}

.c-mobile-cta__item {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-xs);
	color: var(--color-white);
	font-weight: 700;
}

.c-mobile-cta__item:hover {
	text-decoration: none;
}

.c-mobile-cta__item--phone {
	background: var(--color-accent-emergency);
}

.c-mobile-cta__item--form {
	background: var(--color-primary);
}

@media (min-width: 768px) {
	.c-mobile-cta {
		display: none;
	}
}

/* ---------- Breadcrumb ---------- */

.c-breadcrumb {
	padding-block: var(--space-sm);
	background: var(--color-bg);
}

.c-breadcrumb__list {
	max-width: var(--container-width);
	margin-inline: auto;
	padding-inline: var(--container-pad);
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-xs);
	font-size: var(--fs-small);
	color: var(--color-text-light);
}

.c-breadcrumb__item:not(:last-child)::after {
	content: "›";
	margin-left: var(--space-xs);
}

/* ---------- Page / Post header ---------- */

.c-page__header,
.c-post__header {
	padding-block: var(--space-lg) var(--space-md);
}

.c-page__title,
.c-post__title {
	font-size: var(--fs-h1);
}

.c-page__thumb img,
.c-post__thumb img {
	width: 100%;
	max-height: 480px;
	object-fit: cover;
}

.c-page__content,
.c-post__content {
	max-width: var(--container-width-narrow);
	margin-inline: auto;
	padding-block: var(--space-lg);
}

/* ---------- Footer ---------- */

.c-footer {
	background: var(--color-primary-dark);
	color: rgba(255, 255, 255, 0.85);
}

.c-footer__inner {
	display: grid;
	gap: var(--space-lg);
	padding-block: var(--space-xl);
}

@media (min-width: 768px) {
	.c-footer__inner {
		grid-template-columns: 1.2fr 1fr 1fr;
	}
}

.c-footer__logo img {
	max-height: 48px;
	filter: brightness(0) invert(1);
}

.c-footer__site-title {
	font-size: 18px;
	font-weight: 700;
	color: var(--color-white);
}

.c-footer__tagline {
	margin-top: var(--space-sm);
	font-size: var(--fs-small);
	color: rgba(255, 255, 255, 0.65);
}

.c-footer__sns {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm);
	margin-top: var(--space-md);
}

.c-footer__sns a {
	color: var(--color-white);
	font-size: var(--fs-small);
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 999px;
	padding: 6px 14px;
	display: inline-block;
}

.c-footer__sns a:hover {
	background: rgba(255, 255, 255, 0.1);
	text-decoration: none;
}

.c-footer__heading {
	color: var(--color-white);
	font-size: 16px;
	margin-bottom: var(--space-sm);
}

.c-footer__dl {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 4px var(--space-sm);
	font-size: var(--fs-small);
}

.c-footer__dl dt {
	color: rgba(255, 255, 255, 0.55);
}

.c-footer__dl dd {
	margin: 0;
}

.c-footer__dl a {
	color: var(--color-white);
}

.c-footer__nav-list {
	display: grid;
	gap: var(--space-xs);
	font-size: var(--fs-small);
}

.c-footer__nav-list a {
	color: rgba(255, 255, 255, 0.85);
}

.c-footer__nav-list a:hover {
	color: var(--color-white);
}

.c-footer__widgets {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	padding-block: var(--space-md);
}

.c-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.c-footer__bottom-inner {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-sm);
	justify-content: space-between;
	padding-block: var(--space-md);
	font-size: 12px;
	color: rgba(255, 255, 255, 0.6);
}

.c-footer__privacy-link {
	color: rgba(255, 255, 255, 0.6);
}
