/* ========================================
   ivy Custom Styles
   ======================================== */

/* --- Global --- */
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; }

/* --- Sticky Header --- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 999;
	transition: box-shadow 0.3s ease;
}

.site-header.is-scrolled {
	box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

/* --- Scroll Fade-in Animation --- */
.fade-in-up {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-in-up.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* --- Button hover --- */
.wp-block-button__link {
	transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* ========================================
   HERO
   ======================================== */
.iv-hero {
	margin-top: 0 !important;
}

.iv-hero .wp-block-cover__inner-container {
	animation: heroFadeIn 1s ease-out;
}

@keyframes heroFadeIn {
	from { opacity: 0; transform: translateY(20px); }
	to { opacity: 1; transform: translateY(0); }
}

.iv-hero .wp-block-cover__image-background {
	object-position: center center;
}

/* ========================================
   SECTION COMMON
   ======================================== */
.iv-section h2 {
	color: var(--wp--preset--color--primary-dark) !important;
	letter-spacing: 0.06em;
}

/* ========================================
   IMAGE PLACEHOLDERS
   ======================================== */
.iv-img-placeholder {
	border: 2px dashed var(--wp--preset--color--primary) !important;
	background: var(--wp--preset--color--primary-tint) !important;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: border-color 0.3s ease;
}

.iv-img-placeholder:hover {
	border-color: var(--wp--preset--color--primary-dark) !important;
}

/* ========================================
   KODAWARI
   ======================================== */
.iv-kodawari-item {
	transition: transform 0.3s ease;
}

.iv-kodawari-item:hover {
	transform: translateY(-2px);
}

/* ========================================
   CUSTOMER VOICE
   ======================================== */
.iv-voice-card {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	position: relative;
}

.iv-voice-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.iv-voice-card::before {
	content: '\201C';
	position: absolute;
	top: 16px;
	left: 20px;
	font-size: 3rem;
	line-height: 1;
	color: var(--wp--preset--color--primary);
	opacity: 0.2;
	font-family: Georgia, serif;
}

/* ========================================
   FLOW STEPS
   ======================================== */
.iv-flow-step {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.iv-flow-step:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* ========================================
   MENU CARDS
   ======================================== */
.iv-menu-card {
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	overflow: hidden;
}

.iv-menu-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* ========================================
   SALON INFO TABLE
   ======================================== */
.iv-salon-info th,
.iv-salon-info td {
	padding: 0.8em 1em;
	border-bottom: 1px solid #efdcd5;
	text-align: left;
	font-size: 0.88rem;
}

.iv-salon-info th {
	background: var(--wp--preset--color--primary-tint);
	color: var(--wp--preset--color--contrast);
	font-weight: 600;
	width: 120px;
	white-space: nowrap;
}

.iv-salon-info tr:last-child th,
.iv-salon-info tr:last-child td {
	border-bottom: none;
}

.iv-salon-info .wp-block-table th {
	background: var(--wp--preset--color--primary-tint);
	color: var(--wp--preset--color--contrast);
}
.iv-salon-info .wp-block-table td,
.iv-salon-info .wp-block-table th {
	border: none;
	border-bottom: 1px solid #efdcd5;
}

/* ========================================
   FAQ
   ======================================== */
.iv-faq-item {
	transition: box-shadow 0.3s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.iv-faq-item:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.iv-faq-item summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.iv-faq-item summary::-webkit-details-marker {
	display: none;
}

.iv-faq-item summary::after {
	content: '+';
	font-size: 1.3rem;
	font-weight: 300;
	color: var(--wp--preset--color--primary-dark);
	transition: transform 0.3s ease;
	flex-shrink: 0;
	margin-left: 16px;
}

.iv-faq-item[open] summary::after {
	content: '\2212';
}

/* ========================================
   CTA SECTION
   ======================================== */
.iv-cta {
	position: relative;
	overflow: hidden;
}

.iv-cta::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
	pointer-events: none;
}

.iv-cta > * {
	position: relative;
	z-index: 1;
}

/* ========================================
   PAGE STYLES
   ======================================== */
.page-section {
	margin-bottom: 2.5em;
}

.page-section h3 {
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--wp--preset--color--primary-dark);
	border-left: 4px solid var(--wp--preset--color--primary);
	padding-left: 12px;
	margin-bottom: 0.8em;
}

/* ========================================
   TABLE STYLES
   ======================================== */
.wp-block-table table { border-collapse: collapse; width: 100%; }
.wp-block-table td, .wp-block-table th { padding: 0.8em 1em; border: 1px solid #efdcd5; }
.wp-block-table th { background: var(--wp--preset--color--primary-tint); color: var(--wp--preset--color--contrast); font-weight: 600; }

/* ========================================
   SEPARATOR
   ======================================== */
.wp-block-separator:not(.is-style-wide):not(.is-style-dots) {
	width: 60px;
	height: 2px;
	border: none;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--wp--preset--color--primary); }

/* ========================================
   IMAGE PROTECTION
   ======================================== */
img { -webkit-user-drag: none; user-select: none; pointer-events: none; }

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 782px) {
	.site-header { padding-left: 1rem !important; padding-right: 1rem !important; }

	/* Hero */
	.iv-hero { min-height: 70vh !important; }

	/* Kodawari: stack */
	.iv-kodawari-item .wp-block-columns { flex-direction: column !important; }

	/* Voice cards: stack */
	.iv-voice .wp-block-columns { flex-direction: column !important; }

	/* Flow: 2 columns */
	.iv-flow .wp-block-columns { flex-wrap: wrap !important; }
	.iv-flow .wp-block-columns > .wp-block-column {
		flex-basis: calc(50% - 12px) !important;
		min-width: calc(50% - 12px) !important;
	}

	/* Menu cards: stack */
	.iv-menu .wp-block-columns { flex-direction: column !important; }

	/* Salon: stack */
	.iv-salon .wp-block-columns { flex-direction: column !important; }

	/* Gallery: 3→2 columns */
	.iv-gallery .wp-block-columns { flex-wrap: wrap !important; }
	.iv-gallery .wp-block-columns > .wp-block-column {
		flex-basis: calc(50% - 10px) !important;
		min-width: calc(50% - 10px) !important;
	}
}

@media (max-width: 480px) {
	/* Flow: single column */
	.iv-flow .wp-block-columns > .wp-block-column {
		flex-basis: 100% !important;
		min-width: 100% !important;
	}

	/* Gallery: 2→1 column */
	.iv-gallery .wp-block-columns > .wp-block-column {
		flex-basis: 100% !important;
		min-width: 100% !important;
	}

	/* Salon table: モバイルはカード型
	   （ストライプ+見出し背景の縦積みは背景がチグハグになるため、
	     1行=1カード・名前→価格→補足の階層に統一。2026-07-27代表FB） */
	.iv-salon-info table,
	.iv-salon-info tbody {
		display: block;
		width: 100%;
	}
	.iv-salon-info tr {
		display: block;
		width: 100%;
		box-sizing: border-box;
		background: #fff !important;
		border: 1px solid #efdcd5;
		border-radius: 10px;
		padding: 12px 16px;
		margin-bottom: 10px;
	}
	.iv-salon-info th,
	.iv-salon-info td {
		display: block;
		width: auto;
		box-sizing: border-box;
		white-space: normal;
		background: transparent;
		border: none;
		padding: 0;
	}
	.iv-salon-info th {
		font-size: 0.92rem;
		font-weight: 700;
		color: var(--wp--preset--color--contrast);
		margin-bottom: 4px;
	}
	.iv-salon-info td:first-of-type { font-weight: 600; }
	.iv-salon-info td + td {
		font-size: 0.8rem;
		color: var(--wp--preset--color--mid-gray, #999);
		margin-top: 2px;
	}
	.iv-salon-info td:empty { display: none; }
	.iv-salon-info.wp-block-table.is-style-stripes { border-bottom: none; }
}

/* ========================================
   PHOTOS (2026-07-16 実写真挿入)
   ======================================== */
.iv-photo { width: 100%; margin-left: 0; margin-right: 0; }
.iv-photo img { width: 100%; height: auto; display: block; }

/* ========================================
   READABILITY GUARD (2026-07-28 テーマカラー刷新)
   ピンク #edc0bc は白文字とのコントラストが不足するため、
   白文字のベタ塗りボタンは primary-dark(#9d776c) 背景に統一する
   ======================================== */
.wp-block-button__link.has-primary-background-color {
	background-color: var(--wp--preset--color--primary-dark) !important;
}
.wp-block-button__link.has-primary-background-color:hover {
	background-color: #86604f !important;
}
/* CTAセクションの見出しはピンク背景上のため contrast を優先（.iv-section h2 の primary-dark 上書きを打ち消す） */
.iv-cta h2 {
	color: var(--wp--preset--color--contrast) !important;
}
