/* =========================================================
   Kairova - main.css
   叩き台 全文差し替え版

========================================================= */
/* ---------------------------------
   Root
--------------------------------- */
:root {
	--color-text: #222;
	--color-bg: #fff;
	--color-base: #f7f7f5;
	--color-border: #ddd;
	--color-accent: #8c6b3b;
	--color-accent-dark: #6f532d;

	--font-base: "Noto Serif JP", serif;

	--content-width: 1200px;
	--content-width-narrow: 960px;

	--space-xs: 8px;
	--space-sm: 16px;
	--space-md: 24px;
	--space-lg: 40px;
	--space-xl: 64px;
}

/* ---------------------------------
   Base
--------------------------------- */
body {
	margin: 0;
	color: var(--color-text);
	background: var(--color-bg);
	font-family: var(--font-base);
	line-height: 1.75;
}

body.is-menu-open {
	overflow: hidden;
}

img {
	max-width: 100%;
	height: auto;
	vertical-align: bottom;
}

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

ul,
ol {
	margin: 0;
	padding: 0;
	list-style: none;
}

.l-inner {
	width: min(100% - 32px, var(--content-width));
	margin-inline: auto;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------------------------------
   Header
--------------------------------- */
.l-header {
	border-bottom: 1px solid var(--color-border);
	background: #fff;
}

body.is-scrolled .l-header {
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.p-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	width: min(100% - 32px, var(--content-width));
	margin-inline: auto;
	padding: 20px 0;
}

.p-header__logo {
	flex: 1 1 auto;
	min-width: 0;
}

.p-header__title {
	margin: 0;
	font-size: 1rem;
	line-height: 1.2;
}

.p-header__title a,
.custom-logo-link {
	display: inline-block;
}

.custom-logo-link {
	max-width: 100%;
}

.custom-logo {
	display: block;
	height: auto;
	max-width: 100%;
}

.p-header__site-name {
	display: inline-block;
	font-size: 1.5rem;
	font-weight: 600;
}

.p-header__description {
	margin: 8px 0 0;
	font-size: 0.875rem;
	color: #666;
}

.p-header__right {
	display: flex;
	align-items: center;
	gap: 16px;
}

.p-header__info > *,
.p-header__cta > * {
	margin: 0;
}

/* ここが重要：PCでは MENU ボタンを非表示 */
.p-header__menu-button {
	display: none !important;
	padding: 10px 14px;
	border: 1px solid var(--color-border);
	background: #fff;
	cursor: pointer;
	appearance: none;
	-webkit-appearance: none;
}

.p-header__menu-button-label {
	display: inline-block;
	font-size: 0.875rem;
	line-height: 1;
}

/* ---------------------------------
   Global Nav
--------------------------------- */
.p-global-nav {
	border-bottom: 1px solid var(--color-border);
	background: #fff;
}

.p-global-nav__list {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	justify-content: center;
	gap: 0;
	width: min(100% - 32px, var(--content-width));
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.p-global-nav__list > li {
	position: relative;
	margin: 0;
	padding: 0;
	list-style: none;
}

.p-global-nav__list > li > a {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 64px;
	padding: 0 24px;
	font-size: 0.95rem;
	line-height: 1.4;
	color: var(--color-text);
	text-decoration: none;
	background: transparent;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.p-global-nav__list > li > a:hover,
.p-global-nav__list > li > a:focus {
	background-color: var(--color-base);
	color: var(--color-accent-dark);
}

.p-global-nav__list > li > a::after {
	content: "";
	position: absolute;
	left: 24px;
	right: 24px;
	bottom: 12px;
	height: 1px;
	background-color: transparent;
	transition: background-color 0.2s ease;
}

.p-global-nav__list > li > a:hover::after,
.p-global-nav__list > li > a:focus::after,
.p-global-nav__list > li.current-menu-item > a::after,
.p-global-nav__list > li.current_page_item > a::after,
.p-global-nav__list > li.current-menu-ancestor > a::after,
.p-global-nav__list > li.current-page-ancestor > a::after {
	background-color: var(--color-accent);
}

.p-global-nav__list > li.current-menu-item > a,
.p-global-nav__list > li.current_page_item > a,
.p-global-nav__list > li.current-menu-ancestor > a,
.p-global-nav__list > li.current-page-ancestor > a {
	color: var(--color-accent-dark);
	font-weight: 600;
}

/* dropdown */
.p-global-nav__list .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 1000;
	min-width: 220px;
	margin: 0;
	padding: 8px 0;
	list-style: none;
	border: 1px solid var(--color-border);
	background: #fff;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.p-global-nav__list li:hover > .sub-menu,
.p-global-nav__list li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.p-global-nav__list .sub-menu li {
	margin: 0;
}

.p-global-nav__list .sub-menu a {
	display: block;
	padding: 12px 16px;
	font-size: 0.9rem;
	line-height: 1.5;
	color: var(--color-text);
	background: #fff;
	text-decoration: none;
}

.p-global-nav__list .sub-menu a:hover,
.p-global-nav__list .sub-menu a:focus {
	background-color: var(--color-base);
	color: var(--color-accent-dark);
}

/* ---------------------------------
   Slide Menu
--------------------------------- */
.p-slide-menu {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(0, 0, 0, 0.5);
}

.p-slide-menu[hidden] {
	display: none !important;
}

.p-slide-menu__inner {
	position: absolute;
	top: 0;
	right: 0;
	width: min(88vw, 360px);
	height: 100%;
	padding: 24px;
	background: #fff;
	overflow-y: auto;
}

.p-slide-menu__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin-left: auto;
	margin-bottom: 24px;
	border: 1px solid var(--color-border);
	background: #fff;
	font-size: 1.5rem;
	cursor: pointer;
}

.p-slide-menu__list {
	display: block;
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--color-border);
}

.p-slide-menu__list li {
	margin: 0;
	padding: 0;
	list-style: none;
	border-bottom: 1px solid var(--color-border);
}

.p-slide-menu__list a {
	display: block;
	padding: 14px 4px;
	font-size: 1rem;
	line-height: 1.5;
	color: var(--color-text);
	text-decoration: none;
}

.p-slide-menu__list a:hover,
.p-slide-menu__list a:focus {
	color: var(--color-accent-dark);
}

.p-slide-menu__list .sub-menu {
	margin: 0;
	padding: 0 0 8px 12px;
	list-style: none;
	border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.p-slide-menu__list .sub-menu li {
	border-bottom: 0;
}

.p-slide-menu__list .sub-menu a {
	padding: 10px 4px;
	font-size: 0.92rem;
	color: #555;
}

.p-slide-menu__cta {
	margin-top: 24px;
}

/* ---------------------------------
   Hero
--------------------------------- */
.p-hero {
	position: relative;
}

.p-hero img,
.p-hero video {
	display: block;
	width: 100%;
	height: auto;
}

/* ---------------------------------
   Front Page
--------------------------------- */
.p-front-page__section {
	padding: var(--space-xl) 0;
}

.p-front-page__title,
.widget-title {
	margin: 0 0 var(--space-md);
	font-size: 2rem;
	font-weight: 500;
	line-height: 1.4;
	text-align: center;
}

.p-front-page__content > *:first-child {
	margin-top: 0;
}

.p-front-page__content > *:last-child {
	margin-bottom: 0;
}

.p-front-page__section--feature .widget,
.p-front-page__section--links .widget,
.p-front-page__section--store .widget,
.p-front-page__section--before-footer .widget {
	width: 100%;
}

.p-news-list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

.p-news-list__item {
	margin: 0;
}

.p-news-card {
	display: block;
	height: 100%;
	border: 1px solid var(--color-border);
	background: #fff;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.p-news-card:hover,
.p-news-card:focus {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.p-news-card__thumb img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.p-news-card__body {
	padding: 16px;
}

.p-news-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 12px;
	margin-bottom: 12px;
	font-size: 0.8125rem;
	color: #666;
}

.p-news-card__category {
	display: inline-block;
	padding: 2px 8px;
	border: 1px solid var(--color-border);
	font-size: 0.75rem;
	line-height: 1.4;
}

.p-news-card__title {
	margin: 0 0 10px;
	font-size: 1.125rem;
	line-height: 1.6;
}

.p-news-card__excerpt {
	margin: 0;
	font-size: 0.9375rem;
	color: #555;
}

.p-front-page__news-footer {
	margin-top: 32px;
	text-align: center;
}

/* ---------------------------------
   Footer
--------------------------------- */
.l-footer {
	margin-top: 80px;
	padding: 56px 0 32px;
	color: #fff;
	background: #222;
}

.p-footer__inner {
	width: min(100% - 32px, var(--content-width));
	margin-inline: auto;
}

.p-footer__nav {
	margin-bottom: 32px;
}

.p-footer__nav-list {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
	justify-content: center;
}

.p-footer__main {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 24px;
	margin-bottom: 32px;
}

.p-footer__site-name {
	margin: 0 0 8px;
	font-size: 1.25rem;
	font-weight: 600;
}

.p-footer__description {
	margin: 0;
	color: rgba(255, 255, 255, 0.8);
}

.p-footer__copyright {
	margin: 0;
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.75);
}

.p-footer__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-top: 24px;
	border-top: 1px solid rgba(255, 255, 255, 0.16);
}

/* ---------------------------------
   Widgets / Blocks
--------------------------------- */
.widget > *:first-child {
	margin-top: 0;
}

.widget > *:last-child {
	margin-bottom: 0;
}

.widget .wp-block-group,
.widget .wp-block-columns,
.widget .wp-block-buttons {
	margin-top: 0;
	margin-bottom: 0;
}

.widget p:last-child {
	margin-bottom: 0;
}

/* ---------------------------------
   Responsive
--------------------------------- */
@media (max-width: 1024px) {
	.p-news-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.p-footer__main {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 768px) {
	.l-inner,
	.p-header__inner,
	.p-footer__inner,
	.p-global-nav__list {
		width: min(100% - 24px, var(--content-width));
	}

	.p-header__inner {
		gap: 16px;
		padding: 16px 0;
	}

	.p-header__right,
	.p-global-nav {
		display: none;
	}

	/* SPだけ MENU ボタン表示 */
	body .p-header__menu-button {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
		flex-shrink: 0;
	}

	.p-front-page__section {
		padding: 48px 0;
	}

	.p-front-page__title,
	.widget-title {
		font-size: 1.5rem;
	}

	.p-news-list {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.p-footer__main {
		grid-template-columns: 1fr;
	}

	.p-footer__bottom {
		flex-direction: column;
		align-items: flex-start;
	}
}

body {
	outline: 6px solid red !important;
}