/*
Theme Name: K2 Gym Theme (Reborn)
Author: CURSOR & K2 Gym
Description: FSE theme for K2 Gym. Simple, robust, and efficient.
Version: 2.0.1
*/

/* Heroセクションの全幅化 */
.alignfull {
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	max-width: 100vw !important;
	width: 100vw !important;
}

/* ヘッダー追従（Sticky）の完全実装 */
header.wp-block-template-part {
	position: sticky !important;
	top: 0 !important;
	z-index: 9999 !important;
}

header.wp-block-template-part .wp-block-group {
	background-color: #000000 !important;
}

/* 料金表パターン専用スタイル */
/* プランカードの背景色とホバーエフェクト */
.wp-block-column[style*="background-color:#2a2a2a"] {
	background-color: #2a2a2a !important;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.wp-block-column[style*="background-color:#2a2a2a"]:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 30px rgba(255, 215, 0, 0.2);
}

/* テーブルのスタイリング強化 */
.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
}

.wp-block-table th,
.wp-block-table td {
	border: 1px solid #444444;
	padding: 1rem;
	text-align: left;
}

.wp-block-table tbody tr {
	transition: background-color 0.2s ease;
}

.wp-block-table tbody tr:hover {
	background-color: rgba(255, 215, 0, 0.1);
}

/* レスポンシブ対応：モバイルでカードを縦並び */
@media (max-width: 782px) {
	.wp-block-columns.alignwide {
		flex-direction: column;
	}
	
	.wp-block-column[style*="background-color:#2a2a2a"] {
		margin-bottom: 1.5rem;
	}
}

/* お問い合わせフォーム専用スタイル */
/* 入力フィールドのフォーカス時のゴールド枠線エフェクト */
.k2-form-input:focus {
	outline: none !important;
	border-color: #FFD700 !important;
	box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2), 0 0 15px rgba(255, 215, 0, 0.3) !important;
}

.k2-form-input:hover {
	border-color: #666666 !important;
}

/* 送信ボタンのホバーエフェクト */
.k2-contact-form button[type="submit"]:hover {
	background-color: #FFED4E !important;
	transform: translateY(-2px);
	box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

.k2-contact-form button[type="submit"]:active {
	transform: translateY(0);
}

/* フッター専用スタイル */
/* フッターの背景色とテキスト色 */
footer.wp-block-template-part,
footer.wp-block-template-part .wp-block-group {
	background-color: #1a1a1a !important;
	color: #ffffff !important;
}

/* フッターのリンクスタイル */
footer.wp-block-template-part a {
	color: #ffffff !important;
	text-decoration: none;
	transition: color 0.3s ease;
	font-size: 0.85rem;
}

footer.wp-block-template-part a:hover {
	color: #FFD700 !important;
}

/* フッターのナビゲーションリンクのスタイル */
footer.wp-block-template-part .wp-block-navigation a {
	font-size: 0.85rem !important;
	line-height: 1.8;
}

/* フッターのセパレーター（区切り線）のスタイル */
footer.wp-block-template-part .wp-block-separator {
	border-color: #444444 !important;
	opacity: 0.5;
}

/* フッターのレスポンシブ対応 */
@media (max-width: 782px) {
	footer.wp-block-template-part .wp-block-columns {
		flex-direction: column;
		gap: 2rem;
	}
	
	footer.wp-block-template-part .wp-block-column {
		flex-basis: 100% !important;
	}
}

/* ============================================
   モバイル最適化スタイル
   ============================================ */

/* 基本設定：モバイルファースト */
* {
	box-sizing: border-box;
}

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

/* ヘッダーのモバイル最適化 */
@media (max-width: 782px) {
	/* 告知バーのテキストサイズ調整 */
	.header-sticky + .wp-block-group .has-small-font-size,
	.wp-block-group.alignfull .has-small-font-size {
		font-size: 0.75rem !important;
		padding: 0.5rem 1rem !important;
		line-height: 1.4;
	}
	
	/* ヘッダーのカラムレイアウト調整 */
	.header-sticky .wp-block-columns {
		flex-direction: row !important;
		flex-wrap: wrap !important;
		gap: 0.5rem !important;
	}
	
	/* ロゴのサイズ調整 */
	.header-sticky .wp-block-column:first-child {
		flex-basis: auto !important;
		min-width: 100px;
	}
	
	.header-sticky .wp-block-column:first-child img {
		width: 100px !important;
		height: auto !important;
	}
	
	/* ナビゲーションメニューの調整 */
	.header-sticky .header-nav-column,
	.header-sticky .wp-block-column:nth-child(2) {
		flex-basis: 100% !important;
		order: 3;
		margin-top: 0.5rem;
		width: 100% !important;
	}
	
	.header-sticky .header-main-nav,
	.header-sticky .wp-block-navigation {
		flex-wrap: wrap !important;
		justify-content: center !important;
		gap: 0.5rem 0.75rem !important;
		width: 100%;
	}
	
	.header-sticky .wp-block-navigation a,
	.header-sticky .header-main-nav a {
		font-size: 0.8rem !important;
		padding: 0.4rem 0.6rem !important;
		display: inline-block;
		white-space: nowrap;
	}
	
	/* CTAボタンの調整 */
	.header-sticky .wp-block-column:last-child {
		flex-basis: auto !important;
		margin-left: auto;
	}
	
	.header-sticky .wp-block-button__link {
		font-size: 0.75rem !important;
		padding: 0.4rem 0.8rem !important;
		white-space: nowrap;
	}
	
	/* ヘッダーのパディング調整 */
	.header-sticky {
		padding-top: 0.5rem !important;
		padding-bottom: 0.5rem !important;
	}
}

/* タブレットサイズ（783px - 1024px） */
@media (min-width: 783px) and (max-width: 1024px) {
	.header-sticky .wp-block-navigation a {
		font-size: 0.85rem !important;
		padding: 0.3rem 0.6rem !important;
	}
	
	.header-sticky .wp-block-button__link {
		font-size: 0.8rem !important;
		padding: 0.5rem 1rem !important;
	}
}

/* フッターのモバイル最適化 */
@media (max-width: 782px) {
	footer.wp-block-template-part {
		padding-top: 2.5rem !important;
		padding-bottom: 1.5rem !important;
	}
	
	footer.wp-block-template-part .wp-block-columns {
		flex-direction: column !important;
		gap: 2rem !important;
	}
	
	footer.wp-block-template-part .wp-block-column {
		flex-basis: 100% !important;
		width: 100% !important;
	}
	
	/* フッターロゴ */
	footer.wp-block-template-part .wp-block-image {
		margin-bottom: 1rem;
	}
	
	footer.wp-block-template-part .wp-block-image img {
		width: 100px !important;
		height: auto !important;
	}
	
	/* フッターテキスト */
	footer.wp-block-template-part .has-small-font-size {
		font-size: 0.8rem !important;
		line-height: 1.6 !important;
	}
	
	/* フッター見出し */
	footer.wp-block-template-part h3 {
		font-size: 0.95rem !important;
		margin-bottom: 1rem !important;
	}
	
	/* フッターナビゲーション */
	footer.wp-block-template-part .wp-block-navigation {
		flex-direction: column !important;
		align-items: flex-start !important;
		gap: 0.5rem !important;
	}
	
	footer.wp-block-template-part .wp-block-navigation a {
		font-size: 0.8rem !important;
		padding: 0.25rem 0 !important;
	}
	
	/* フッターのソーシャルリンク */
	footer.wp-block-template-part .wp-block-social-links {
		margin-top: 1rem;
	}
}

/* コンテンツエリアのモバイル最適化 */
@media (max-width: 782px) {
	/* 全体的なパディング調整 */
	.wp-block-group[style*="padding-top:6rem"],
	.wp-block-group[style*="padding-top:4rem"] {
		padding-top: 3rem !important;
		padding-bottom: 3rem !important;
	}
	
	/* 見出しのサイズ調整 */
	.wp-block-heading.has-xl-font-size {
		font-size: 1.75rem !important;
		line-height: 1.3;
	}
	
	.wp-block-heading.has-large-font-size {
		font-size: 1.5rem !important;
		line-height: 1.3;
	}
	
	/* 段落のサイズ調整 */
	.has-medium-font-size {
		font-size: 0.95rem !important;
		line-height: 1.6;
	}
	
	.has-small-font-size {
		font-size: 0.85rem !important;
		line-height: 1.5;
	}
	
	/* カラムの縦並び */
	.wp-block-columns {
		flex-direction: column !important;
		gap: 1.5rem !important;
	}
	
	.wp-block-column {
		flex-basis: 100% !important;
		width: 100% !important;
	}
	
	/* メディアテキストブロックの調整 */
	.wp-block-media-text {
		grid-template-columns: 1fr !important;
		grid-template-rows: auto auto !important;
	}
	
	.wp-block-media-text__media {
		grid-row: 1;
		margin-bottom: 1.5rem;
	}
	
	.wp-block-media-text__content {
		grid-row: 2;
		padding: 0 !important;
	}
	
	/* ボタンのサイズ調整 */
	.wp-block-button__link {
		font-size: 0.9rem !important;
		padding: 0.75rem 1.5rem !important;
	}
	
	/* テーブルの横スクロール対応 */
	.wp-block-table {
		overflow-x: auto;
		display: block;
		-webkit-overflow-scrolling: touch;
	}
	
	.wp-block-table table {
		min-width: 600px;
		font-size: 0.85rem;
	}
	
	.wp-block-table th,
	.wp-block-table td {
		padding: 0.75rem 0.5rem !important;
		font-size: 0.85rem;
	}
	
	/* 料金表のカード調整 */
	.wp-block-column[style*="background-color:#1a1a1a"],
	.wp-block-column[style*="background-color:#2a2a2a"] {
		margin-bottom: 1.5rem !important;
		padding: 2rem 1.5rem !important;
	}
	
	/* 料金表の価格表示 */
	.has-xxl-font-size {
		font-size: 1.75rem !important;
	}
	
	/* お問い合わせフォームの調整 */
	.k2-contact-form {
		padding: 0 1rem;
	}
	
	.k2-form-input {
		font-size: 0.9rem !important;
		padding: 0.875rem !important;
	}
	
	.k2-contact-form button[type="submit"] {
		width: 100%;
		padding: 1rem !important;
		font-size: 1rem !important;
	}
	
	/* Heroセクションの調整 */
	.wp-block-cover {
		min-height: 70vh !important;
		padding-top: 10vh !important;
		padding-bottom: 10vh !important;
	}
	
	.wp-block-cover h1 {
		font-size: 2rem !important;
		line-height: 1.2;
		margin-left: 5% !important;
	}
	
	.wp-block-cover p {
		font-size: 0.95rem !important;
		margin-left: 5% !important;
	}
	
	/* CTAセクションの調整 */
	.wp-block-cover .wp-block-cover__inner-container {
		padding: 2rem 1rem !important;
	}
}

/* 小さいスマートフォン（480px以下） */
@media (max-width: 480px) {
	/* さらに小さなフォントサイズ */
	.wp-block-heading.has-xl-font-size {
		font-size: 1.5rem !important;
	}
	
	.wp-block-heading.has-large-font-size {
		font-size: 1.25rem !important;
	}
	
	.has-medium-font-size {
		font-size: 0.9rem !important;
	}
	
	/* ヘッダーのCTAボタンテキスト短縮 */
	.header-sticky .wp-block-button__link {
		font-size: 0.7rem !important;
		padding: 0.35rem 0.6rem !important;
	}
	
	/* ナビゲーションリンクのサイズ */
	.header-sticky .wp-block-navigation a {
		font-size: 0.75rem !important;
		padding: 0.2rem 0.4rem !important;
	}
	
	/* テーブルの最小幅調整 */
	.wp-block-table table {
		min-width: 500px;
		font-size: 0.8rem;
	}
	
	.wp-block-table th,
	.wp-block-table td {
		padding: 0.6rem 0.4rem !important;
		font-size: 0.8rem;
	}
	
	/* 料金表カードのパディング */
	.wp-block-column[style*="background-color:#1a1a1a"],
	.wp-block-column[style*="background-color:#2a2a2a"] {
		padding: 1.5rem 1rem !important;
	}
}

/* タッチデバイス用の調整 */
@media (hover: none) and (pointer: coarse) {
	/* タッチターゲットの最小サイズ */
	.wp-block-button__link,
	.wp-block-navigation a,
	.k2-contact-form button[type="submit"] {
		min-height: 44px;
		min-width: 44px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}
	
	/* ホバーエフェクトを無効化 */
	.wp-block-column[style*="background-color:#2a2a2a"]:hover {
		transform: none;
		box-shadow: none;
	}
}

/* 横画面（ランドスケープ）モバイル */
@media (max-width: 782px) and (orientation: landscape) {
	.wp-block-cover {
		min-height: 60vh !important;
		padding-top: 8vh !important;
		padding-bottom: 8vh !important;
	}
	
	.header-sticky {
		padding-top: 0.4rem !important;
		padding-bottom: 0.4rem !important;
	}
}

/* ============================================
   ボタンの押下フィードバック（全ページ共通）
   ============================================ */

.wp-block-button__link,
.wp-element-button {
	-webkit-tap-highlight-color: rgba(255, 215, 0, 0.25);
	transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease, background-color 0.12s ease, color 0.12s ease, border-color 0.12s ease;
	will-change: transform;
}

/* Hover（マウス） */
@media (hover: hover) and (pointer: fine) {
	.wp-block-button__link:hover,
	.wp-element-button:hover {
		transform: translateY(-1px);
		filter: brightness(1.04);
		box-shadow: 0 10px 24px rgba(255, 215, 0, 0.18);
	}
}

/* Active（押下中：モバイル含む） */
.wp-block-button__link:active,
.wp-element-button:active {
	transform: translateY(0) scale(0.98);
	filter: brightness(0.98);
	box-shadow: 0 6px 16px rgba(255, 215, 0, 0.14);
}

/* Focus（キーボード操作で見えるリング） */
.wp-block-button__link:focus-visible,
.wp-element-button:focus-visible {
	outline: 3px solid rgba(255, 215, 0, 0.55);
	outline-offset: 3px;
	box-shadow: 0 0 0 4px rgba(255, 215, 0, 0.18);
}

/* 無効化されている見た目（念のため） */
.wp-block-button__link[aria-disabled="true"],
.wp-element-button[aria-disabled="true"],
.wp-block-button__link:disabled,
.wp-element-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	pointer-events: none;
}
