/**
 * Membership Page Styles
 * 会員タイプ紹介ページ専用スタイル
 * フォントサイズ、色、text-alignは管理画面で設定
 * 
 * @package Jiyujin
 */

/* ============================================
   ブロックスタイル対応
   ============================================ */

グループブロックスタイル
.pg.journal#journal .wp-block-group.is-style-card-beige-bg {
	background-color: #f5ede0;
	border-radius: 20px;
	padding: 40px;
	border: 2px solid rgba(255, 255, 255, 0.5);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.pg.journal#journal .wp-block-group.is-style-card-premium {
	background: linear-gradient(135deg, #fff 0%, #f5ede0 100%);
	border: 3px solid #ff8063;
	border-radius: 20px;
	padding: 40px;
	box-shadow: 0 6px 30px rgba(255, 128, 99, 0.2);
	position: relative;
}

.pg.journal#journal .wp-block-group.is-style-gradient-beige-white {
	background: linear-gradient(135deg, #f5ede0 0%, #fff 100%);
	border: 2px solid #f5ede0;
	border-radius: 20px;
	padding: 50px;
	box-shadow: 0 4px 20px rgba(245, 237, 224, 0.5);
}

.pg.journal#journal .wp-block-group.is-style-dark-green-bg {
	background-color: #436000;
	border-radius: 20px;
	padding: 50px;
}

/* ============================================
   ベーススタイル
   ============================================ */

/* コンテナの最大幅設定 */
.pg.journal#journal .detail-membership .inner-membership {
	margin: 0 auto;
}

/* ============================================
   ヒーローセクション (#hero)
   ============================================ */

#hero.wp-block-group {
	position: relative;
	min-height: 500px;
	height: 63.68vw;
	padding: 160px 50px 200px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	background: #fff;
	z-index: 10;
}

/* 背景画像コンテナ */
#hero .hero-background-container {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 63.68vw;
	z-index: 10;
}

/* 背景画像 */
#hero .hero-background-image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
	background-attachment: scroll;
	opacity: 0;
	transition: opacity 2s ease-in-out;
}

#hero .hero-background-image.active {
	opacity: 1;
}

/* ヒーローセクションのコンテンツ（テキスト・ボタン） */
#hero.wp-block-group > *:not(.hero-background-container) {
	position: relative;
	z-index: 15;
}

/* ヒーローセクションのテキスト */
#hero.wp-block-group h2,
#hero.wp-block-group p {
	position: relative;
	z-index: 15;
}

/* ヒーローセクションのボタン */
#hero.wp-block-group .wp-block-buttons {
	position: relative;
	z-index: 15;
}

/* ============================================
   コンセプトセクション (#about)
   ============================================ */

#about.wp-block-group {
	position: relative;
	padding: 100px 100px 130px;
	overflow: hidden;
	z-index: 5;
}

#about.wp-block-group .wp-block-group__inner-container {
	max-width: 1000px;
	margin: 0 auto;
}

/* ベネフィットグリッド */
#about.wp-block-group .wp-block-group.is-layout-grid {
	gap: 20px;
	margin-bottom: 50px;
	max-width: 800px;
}

#about.wp-block-group .wp-block-group.is-layout-grid > .wp-block-group {
	background: #fff;
}

/* コンセプトリンクボタン */
#about.wp-block-group .wp-block-buttons {
	margin-top: 50px;
}

#about.wp-block-group .wp-block-button.is-style-outline .wp-block-button__link {
	display: inline-block;
	padding: 15px 40px;
	background: transparent;
	border: 2px solid #ff8063;
	border-radius: 30px;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	overflow: hidden;
}

#about.wp-block-group .wp-block-button.is-style-outline .wp-block-button__link::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: #ff8063;
	transition: left 0.4s;
	z-index: -1;
}

#about.wp-block-group .wp-block-button.is-style-outline .wp-block-button__link:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 25px rgba(255, 128, 99, 0.3);
}

#about.wp-block-group .wp-block-button.is-style-outline .wp-block-button__link:hover::before {
	left: 0;
}

/* ============================================
   施設紹介セクション (#facility)
   ============================================ */

#facility.wp-block-group {
	position: relative;
	padding: 100px 100px 130px;
}

#facility.wp-block-group::before {
	content: "";
	position: absolute;
	top: -50px;
	left: 0;
	width: 100%;
	height: 70px;
	background: url('../images/stay_top.webp') no-repeat top center;
	background-size: 100% 100%;
	z-index: 10;
}

#facility.wp-block-group::after {
	content: "";
	position: absolute;
	bottom: -50px;
	left: 0;
	width: 100%;
	height: 70px;
	background: url('../images/stay_top.webp') no-repeat top center;
	background-size: 100% 100%;
	transform: rotate(180deg);
	z-index: 10;
}

#facility.wp-block-group .wp-block-group__inner-container {
	max-width: 1000px;
	margin: 0 auto;
}

/* 施設カラム（1施設1行） */
#facility.wp-block-group .wp-block-columns {
	background: #fff;
	padding: 40px;
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-radius: 20px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	transition: all 0.4s;
	position: relative;
	z-index: 2;
	gap: 40px;
}

/* 施設画像カラム */
#facility.wp-block-group .wp-block-column:first-child {
	flex-shrink: 0;
	width: 300px;
}


/* 施設コンテンツカラム */
#facility.wp-block-group .wp-block-column:last-child {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

#facility.wp-block-group .wp-block-column p {
	line-height: 2;
}


/* ============================================
   会員案内セクション (#member)
   ============================================ */

#member.wp-block-group {
	position: relative;
	padding: 150px 100px 180px;
	overflow: hidden;
	background: #fff;
	z-index: 5;
}

#member.wp-block-group .wp-block-group__inner-container {
	max-width: 1000px;
	margin: 0 auto;
}

/* 会員プランカード（1行1プラン） */
#member.wp-block-group > .wp-block-group__inner-container > .wp-block-group {
	position: relative;
	background: #fff;
	border: 2px solid #e0e0e0;
	border-radius: 20px;
	padding: 40px;
	margin-bottom: 40px;
	display: flex;
	flex-direction: column;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	overflow: hidden;
}

#member.wp-block-group > .wp-block-group__inner-container > .wp-block-group::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 6px;
	background: linear-gradient(90deg, #ff8063 0%, #f5ede0 50%, #ff8063 100%);
	opacity: 0;
	transition: opacity 0.4s;
}

#member.wp-block-group > .wp-block-group__inner-container > .wp-block-group:hover {
	transform: translateY(-8px);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
	border-color: #ff8063;
}

#member.wp-block-group > .wp-block-group__inner-container > .wp-block-group:hover::before {
	opacity: 1;
}

/* PREMIUMプラン（グラデーション背景） */
#member.wp-block-group > .wp-block-group__inner-container > .wp-block-group.has-background[style*="gradient"] {
	border: 3px solid #ff8063;
	background: linear-gradient(135deg, #fff 0%, #f5ede0 100%);
	box-shadow: 0 6px 30px rgba(255, 128, 99, 0.2);
}

#member.wp-block-group > .wp-block-group__inner-container > .wp-block-group.has-background[style*="gradient"]::before {
	background: linear-gradient(90deg, #ff8063 0%, #f5ede0 50%, #ff8063 100%);
	opacity: 1;
	height: 8px;
}

#member.wp-block-group > .wp-block-group__inner-container > .wp-block-group.has-background[style*="gradient"]:hover {
	transform: translateY(-10px);
	box-shadow: 0 16px 50px rgba(255, 128, 99, 0.3);
}

/* プラン名と価格の横並び */
#member.wp-block-group .wp-block-group.is-layout-flex.is-nowrap {
	display: flex;
	align-items: baseline;
	gap: 20px;
	margin-bottom: 15px;
}


/* PREMIUMプランのボタン（アウトライン） */
#member.wp-block-group > .wp-block-group__inner-container > .wp-block-group.has-background[style*="gradient"] .wp-block-button .wp-block-button__link.has-background {
	background: transparent;
	border: 2px solid #ff8063;
	box-shadow: none;
}

#member.wp-block-group > .wp-block-group__inner-container > .wp-block-group.has-background[style*="gradient"] .wp-block-button .wp-block-button__link.has-background::before {
	background: #ff8063;
	left: -100%;
	width: 100%;
	height: 100%;
	border-radius: 0;
	transform: none;
	top: 0;
	transition: left 0.4s;
}

#member.wp-block-group > .wp-block-group__inner-container > .wp-block-group.has-background[style*="gradient"] .wp-block-button .wp-block-button__link.has-background:hover {
	box-shadow: 0 8px 25px rgba(255, 128, 99, 0.3);
}

#member.wp-block-group > .wp-block-group__inner-container > .wp-block-group.has-background[style*="gradient"] .wp-block-button .wp-block-button__link.has-background:hover::before {
	left: 0;
	width: 100%;
	height: 100%;
}

/* 最低契約期間の注記 */
#member.wp-block-group > .wp-block-group__inner-container > p:not(.has-text-align-center) {
	margin-bottom: 50px;
}

/* 共通特典セクション */
#member.wp-block-group > .wp-block-group__inner-container > .wp-block-group.has-background[style*="linear-gradient(130deg"] {
	position: relative;
	z-index: 2;
	margin-bottom: 60px;
	padding: 50px;
	background: linear-gradient(135deg, #f5ede0 0%, #fff 100%);
	border: 2px solid #f5ede0;
	border-radius: 20px;
	box-shadow: 0 4px 20px rgba(245, 237, 224, 0.5);
}

/* 特典項目（カラムレイアウト） */
#member.wp-block-group .wp-block-columns[style*="flex-basis:10%"] {
	margin-bottom: 25px;
}

#member.wp-block-group .wp-block-columns[style*="flex-basis:10%"] .wp-block-column:first-child {
	margin-right: 10px;
	flex-shrink: 0;
}

#member.wp-block-group .wp-block-columns[style*="flex-basis:10%"] .wp-block-column:last-child p {
	line-height: 2;
	margin-bottom: 6px;
}

/* 比較表 */
#member.wp-block-group .wp-block-table,
.pg.journal#journal .wp-block-table.is-style-membership-comparison {
	margin-bottom: 60px;
	overflow-x: auto;
}

#member.wp-block-group .wp-block-table table,
.pg.journal#journal .wp-block-table.is-style-membership-comparison table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border-radius: 15px;
	overflow: hidden;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

#member.wp-block-group .wp-block-table th,
#member.wp-block-group .wp-block-table td,
.pg.journal#journal .wp-block-table.is-style-membership-comparison th,
.pg.journal#journal .wp-block-table.is-style-membership-comparison td {
	padding: 10px 15px;
	border: 1px solid rgba(255, 128, 99, 0.2);
	line-height: 1.6;
}

#member.wp-block-group .wp-block-table th,
.pg.journal#journal .wp-block-table.is-style-membership-comparison th {
	background: linear-gradient(135deg, #ff8063 0%, #ff9068 100%);
	border: 1px solid rgba(255, 255, 255, 0.3);
	font-weight: 500;
}

#member.wp-block-group .wp-block-table th:nth-child(-n+2),
.pg.journal#journal .wp-block-table.is-style-membership-comparison th:nth-child(-n+2) {
	/*background: linear-gradient(135deg, #f5ede0 0%, #fff 100%);*/
	background: #f5ede0;
	border: 1px solid rgba(255, 128, 99, 0.2);
	text-align: left;
}

#member.wp-block-group .wp-block-table tbody tr:nth-child(even),
.pg.journal#journal .wp-block-table.is-style-membership-comparison tbody tr:nth-child(even) {
	background: rgba(245, 237, 224, 0.3);
}

#member.wp-block-group .wp-block-table tbody tr:hover,
.pg.journal#journal .wp-block-table.is-style-membership-comparison tbody tr:hover {
	background: rgba(255, 128, 99, 0.1);
	transition: background 0.3s;
}

.pg.journal#journal .wp-block-table.is-style-membership-comparison td:nth-child(-n+2) {
	background: #f5ede0;
}

/* ============================================
   利用ルールセクション
   ============================================ */

.pg.journal#journal .wp-block-group.has-background[style*="background-color:#f5ede0"] {
	padding: 100px 50px 200px;
	position: relative;
}

.pg.journal#journal .wp-block-group.has-background[style*="background-color:#f5ede0"]::before {
	content: "";
	position: absolute;
	top: -50px;
	left: 0;
	width: 100%;
	height: 70px;
	background: url('../images/stay_top.webp') no-repeat top center;
	background-size: 100% 100%;
	z-index: 10;
}

.pg.journal#journal .wp-block-group.has-background[style*="background-color:#f5ede0"] .wp-block-group__inner-container {
	max-width: 800px;
	margin: 0 auto;
}

.pg.journal#journal .wp-block-group.has-background[style*="background-color:#f5ede0"] p {
	margin: 0 auto 15px;
	max-width: 800px;
}

.pg.journal#journal .wp-block-group.has-background[style*="background-color:#f5ede0"] h3.wp-block-heading {
	margin-bottom: 40px;
	line-height: 2;
}

.pg.journal#journal .wp-block-group.has-background[style*="background-color:#f5ede0"] p:not(:first-child):not(.wp-block-heading) {
	line-height: 2;
	margin: 0 auto 15px;
	max-width: 800px;
}

/* リンクテキスト（下線のみ） */
.pg.journal#journal .wp-block-group.has-background[style*="background-color:#f5ede0"] a:not(.wp-block-button__link) {
	text-decoration: underline;
	transition: color 0.3s;
}

/* ============================================
   最終CTAセクション
   ============================================ */

.pg.journal#journal .wp-block-group:has(.wp-block-group[style*="background-color:#436000"]) {
	position: relative;
}
.pg.journal#journal .wp-block-group:has(.wp-block-group[style*="background-color:#436000"])::before {
    content: "";
    position: absolute;
    top: -100px;
    left: 0;
    width: 100%;
    height: 150px;
    background: url('../images/journal_top.webp?1') no-repeat top center;
    background-size: 100% 100%;
}

.pg.journal#journal .wp-block-group[style*="background-color:#436000"] {
	padding: 50px;
	padding-bottom: 130px;

}

/* ============================================
   追従ボタン（booknow）
   ============================================ */

.pg.journal#journal .booknow {
	position: fixed;
	bottom: 30px;
	right: 30px;
	z-index: 1000;
	animation: fadeIn 0.3s ease-in;
}

.pg.journal#journal .booknow a {
	display: block;
	transition: transform 0.3s;
}

.pg.journal#journal .booknow a:hover {
	transform: scale(1.1);
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ============================================
   改行制御用クラス
   ============================================ */

/* スマホ表示時のみ改行を表示するbrタグ */
br.sp-br,
br.mobile-br {
	display: none;
}

/* PC表示時のみ改行を表示するbrタグ */
br.pc-br {
	display: inline;
}

/* ============================================
   レスポンシブ対応
   ============================================ */

@media (max-width: 1024px) {
	/* ベネフィットグリッド（2列） */
	#about.wp-block-group .wp-block-group.is-layout-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	/* 施設カラム（縦並び） */
	#facility.wp-block-group .wp-block-columns {
		flex-direction: column;
		gap: 20px;
	}

	#facility.wp-block-group .wp-block-column:first-child {
		width: 100%;
	}

	#facility.wp-block-group .wp-block-column:first-child::before {
		height: 250px;
	}

	/* 比較表のスクロール */
	#member.wp-block-group .wp-block-table {
		overflow-x: scroll;
	}
}

@media (max-width: 768px) {
	/* ============================================
	   改行制御（スマホ表示時）
	   ============================================ */
	
	/* スマホ表示時のみ改行を表示 */
	br.sp-br,
	br.mobile-br {
		display: inline;
	}
	
	/* PC表示時のみ改行を非表示 */
	br.pc-br {
		display: none;
	}
	
	/* ============================================
	   共通テキスト
	   ============================================ */
	.has-medium-font-size {
		font-size: 14px!important;
	}
	.has-large-font-size {
		font-size: 16px!important;
	}
	.has-x-large-font-size {
		font-size: 20px!important;
	}
	.has-xx-large-font-size {
		font-size: 28px!important;
	}
	   
	/* ============================================
	   ヒーローセクション
	   ============================================ */
	#hero.wp-block-group {
		min-height: 400px;
		padding: 80px 20px 60px;
		height: 224vw;
	}

	
	/* 背景画像コンテナ */
	#hero .hero-background-container {
		height: 224vw;
	}

	/* ============================================
	   コンセプトセクション (#about)
	   ============================================ */
	#about.wp-block-group {
		padding: 60px 20px 80px;
	}

	/* ベネフィットグリッド（1列） */
	#about.wp-block-group .wp-block-group.is-layout-grid {
		grid-template-columns: 1fr;
		gap: 30px;
	}

	/* コンセプトリンクボタン */
	#about.wp-block-group .wp-block-button.is-style-outline .wp-block-button__link {
		padding: 12px 30px;
		width: 100%;
		max-width: 100%;
		text-align: center;
	}

	/* ============================================
	   施設紹介セクション (#facility)
	   ============================================ */
	#facility.wp-block-group {
		padding: 60px 20px 80px;
	}

	#facility.wp-block-group::before,
	#facility.wp-block-group::after {
		height: 50px;
		top: -30px;
		bottom: -30px;
	}

	/* 施設カラム（縦並び） */
	#facility.wp-block-group .wp-block-columns {
		flex-direction: column;
		padding: 20px;
		gap: 20px;
	}

	/* -reverseクラスが付いているカラムは順序を逆にする（テキスト→画像を画像→テキストに） */
	#facility.wp-block-group .wp-block-columns[class*="-reverse"] {
		flex-direction: column-reverse;
	}

	/* 施設画像カラム */
	#facility.wp-block-group .wp-block-column:first-child {
		width: 100%;
		flex-basis: 100% !important;
	}

	#facility.wp-block-group .wp-block-column:first-child img {
		width: 100%;
		height: auto;
	}

	/* 施設コンテンツカラム */
	#facility.wp-block-group .wp-block-column:last-child {
		flex-basis: 100% !important;
		width: 100%;
	}

	/* 施設リンクボタン（全幅） */
	#facility.wp-block-group .wp-block-button {
		width: 100%;
	}

	#facility.wp-block-group .wp-block-button .wp-block-button__link {
		width: 100%;
		display: block;
		text-align: center;
	}

	/* ============================================
	   会員案内セクション (#member)
	   ============================================ */
	#member.wp-block-group {
		padding: 60px 20px 80px;
	}

	/* 会員プランカード */
	#member.wp-block-group > .wp-block-group__inner-container > .wp-block-group {
		padding: 25px 20px;
		margin-bottom: 30px;
	}

	/* プラン名と価格（縦並び） */
	#member.wp-block-group .wp-block-group.is-layout-flex.is-nowrap {
		flex-direction: column;
		gap: 10px;
		align-items: flex-start;
	}

	/* 共通特典セクション */
	#member.wp-block-group > .wp-block-group__inner-container > .wp-block-group.has-background[style*="linear-gradient(130deg"] {
		padding: 30px 20px;
	}

	/* 特典項目カラム（縦並び） */
	#member.wp-block-group .wp-block-columns[style*="flex-basis:10%"] {
		flex-direction: column;
		gap: 10px;
	}

	#member.wp-block-group .wp-block-columns[style*="flex-basis:10%"] .wp-block-column:first-child {
		flex-basis: auto !important;
		width: 100%;
	}

	#member.wp-block-group .wp-block-columns[style*="flex-basis:10%"] .wp-block-column:last-child {
		flex-basis: 100% !important;
		width: 100%;
	}

	/* 会員プランボタン */
	#member.wp-block-group .wp-block-button {
		width: 100%;
	}

	#member.wp-block-group .wp-block-button .wp-block-button__link {
		width: 100%;
		display: block;
		text-align: center;
		padding: 15px 20px;
	}

	/* 比較表 */
	#member.wp-block-group .wp-block-table {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		margin-left: -20px;
		margin-right: -20px;
		padding: 0 20px;
	}

	#member.wp-block-group .wp-block-table table {
		min-width: 600px;
	}

	#member.wp-block-group .wp-block-table th,
	#member.wp-block-group .wp-block-table td {
		padding: 10px 8px;
		word-break: break-word;
		overflow-wrap: break-word;
		hyphens: auto;
	}

	/* 最初の列（項目名）は固定幅で折り返し */
	#member.wp-block-group .wp-block-table th:first-child,
	#member.wp-block-group .wp-block-table td:first-child {
		position: sticky;
		left: 0;
		z-index: 1;
		box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
		min-width: 100px;
		max-width: 120px;
		word-break: break-word;
		overflow-wrap: break-word;
	}

	/* データ列は適切に折り返し */
	#member.wp-block-group .wp-block-table th:not(:first-child),
	#member.wp-block-group .wp-block-table td:not(:first-child) {
		min-width: 80px;
		max-width: 150px;
	}

	/* ============================================
	   利用ルールセクション
	   ============================================ */
	.pg.journal#journal .wp-block-group.has-background[style*="background-color:#f5ede0"] {
		padding: 60px 20px 100px;
	}

	.pg.journal#journal .wp-block-group.has-background[style*="background-color:#f5ede0"]::before {
		height: 50px;
		top: -30px;
	}

	.pg.journal#journal .wp-block-group.has-background[style*="background-color:#f5ede0"] .wp-block-image {
		margin: 0 -20px;
	}

	.pg.journal#journal .wp-block-group.has-background[style*="background-color:#f5ede0"] .wp-block-image img {
		width: 100%;
		height: auto;
	}

	/* ============================================
	   最終CTAセクション
	   ============================================ */
	.pg.journal#journal .wp-block-group[style*="background-color:#436000"] {
		padding: 40px 20px 80px;
	}

	.pg.journal#journal .wp-block-group:has(.wp-block-group[style*="background-color:#436000"])::before {
		height: 100px;
		top: -80px;
	}

	/* ============================================
	   追従ボタン（booknow）
	   ============================================ */
	.pg.journal#journal .booknow {
		bottom: 15px;
		right: 15px;
	}

	.pg.journal#journal .booknow img {
		width: 80px;
		height: 80px;
	}

	/* ============================================
	   グループブロックスタイル（レスポンシブ）
	   ============================================ */
	.pg.journal#journal .wp-block-group.is-style-card-normal-bg,
	.pg.journal#journal .wp-block-group.is-style-card-premium,
	.pg.journal#journal .wp-block-group.is-style-gradient-beige-white {
		padding: 25px 20px;
		border-radius: 15px;
	}
}
