/**
 * Top page (block-based) overrides.
 *
 * Bridges core block markup (button / columns / group) to the existing theme
 * design so the home page can be built entirely from standard blocks and stay
 * editable in the block editor. Selectors use bespoke classes only, so they
 * apply both on the front end and inside the editor canvas.
 */

/* --- Buttons: map core/button link to the theme btn-wide look --- */
.tcbtn { margin: 0; }
.tcbtn .wp-block-button__link {
	display: flex;
	justify-content: center;
	align-items: center;
	box-sizing: border-box;
	margin-left: auto;
	margin-right: auto;
	padding: 5px 20px;
	width: 100%;
	height: 52px;
	max-width: 640px;
	background: #063190;
	color: #fff;
	font-size: clamp(1.5rem, 1.8vw, 1.8rem);
	font-weight: 700;
	line-height: 1.4;
	text-align: center;
	text-decoration: none;
	border-radius: 0;
	transition: background .2s ease;
}
.tcbtn .wp-block-button__link:hover,
.tcbtn .wp-block-button__link:focus {
	background: #0b56a9;
	color: #fff;
}
.tcbtn--newsletter .wp-block-button__link,
.tcbtn--entry .wp-block-button__link {
	max-width: 360px;
	position: relative;
}
/* Newsletter external-link icon (FontAwesome f08e) */
.tcbtn--newsletter .wp-block-button__link::before {
	content: "\f08e";
	font-family: "Font Awesome 6 Free";
	font-weight: bold;
	position: absolute;
	top: 50%;
	right: 18px;
	transform: translateY(-50%);
	line-height: 1;
	pointer-events: none;
}

/* 旧マークアップ（page 8）は newsletter リード・会期会場・stats を <div> で組んでいた。
   それを core/paragraph(<p>) 化したため、テーマの強い p ルール
   （article p{line-height:2} と p:not(#article-contact p):not(:last-child){margin-bottom:40px}
   ＝ :not() 内 ID で specificity が ID 級）を拾って間延びする。該当コンテナで !important で
   打ち消す。縦リズムは mt-* と下記の構造側で付ける。lead / entry-card__note は原本も <p>
   なので触らない（テーマ p ルールのまま＝原本一致）。 */
.newsletter-box__lead,
.newsletter-box__desc,
.event__info p,
.stats__item p,
.entry-card__sub {
	margin-bottom: 0 !important;
}

/* --- Event info (会期 / 会場): label + value rows --- */
.event__info { font-size: 2.4rem; }
/* テーマの .event__info{flex-grow:1; justify-content:center} は <ul> 前提で、
   core/group 構造だと縦に大きく散らばる。上詰め・伸長なしにする。 */
.container__2column .inner__left .event__info {
	flex-grow: 0 !important;
	justify-content: flex-start !important;
}
.event__info > .wp-block-group__inner-container > * + * { margin-top: 16px; }
.event__info__row > .wp-block-group__inner-container {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	column-gap: 8px;
}
.event__info p { line-height: 1.6 !important; margin-top: 0 !important; }
.event__info__label {
	min-width: 60px;
	font-size: 1.6rem;
}
.event__info__label::after { content: "："; }

/* --- 2025 Summary stats --- */
.stats__cols { margin-top: 30px; }
.stats__item p { line-height: 1.2 !important; }
.stats__item .stats__label { margin: 0 !important; }
.stats__item .stats__value {
	margin: 12px 0 0 !important;
	font-size: clamp(42px, 6vw, 62px);
	line-height: 1 !important;
}
.entry-card__sub {
	margin-top: 4px !important;
	line-height: 1.4 !important;
}
@media (max-width: 781px) {
	.stats__cols { flex-wrap: wrap; }
	/* Reset the theme's grid/subgrid stats item (it assumes a grid parent). */
	.stats__cols > .stats__item {
		flex-basis: 100% !important;
		display: flex;
		flex-direction: column;
		align-items: center;
		grid-template-columns: none;
	}
}

/* --- Gallery: let core flex layout win over the theme grid rule --- */
.wp-block-gallery.top__about-gallery { display: flex; }

/* --- Entry card note inline emphasis --- */
.entry-card__note strong { color: #063190; }

/* --- Section titles ---
   見出し階層を「英語=装飾 / 日本語=実見出し(h2/h3)」に組み替えた（TIFFCOM 2026 のみ
   英語が h2・について が h3）。視覚は section__title--en/jp クラスで維持するが、
   core/heading が付ける wp-block-heading に iid の h2/h3 装飾（下線・左バー・24px、
   !important）が乗るため、これらのクラス上では打ち消す。値は page 8 実測に一致。 */
.section__title--en.wp-block-heading,
.section__title--jp.wp-block-heading {
	border: 0 !important;
	padding: 0 !important;
}
/* 英語タイトル（装飾 paragraph と TIFFCOM 2026 見出しの共通: navy / weight 600）。
   サイズは文脈別のテーマ値（newsletter 48 / entry 42 / stats 48）をそのまま使う。 */
.section__title--en {
	color: #063190;
	font-weight: 600;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}
/* TIFFCOM 2026（英語が見出しの箇所）は 62px。iid h2(24px!important) に勝たせる。 */
.top__about-header .section__title--en.wp-block-heading {
	font-size: clamp(38px, 8vw, 62px) !important;
	line-height: 1.2 !important;
}
/* 日本語見出し（h2/h3 だが小さめ青の副題ビジュアル）。 */
.section__title--jp.wp-block-heading {
	font-size: 1.6rem !important;
	color: #094bbd !important;
	font-weight: 700 !important;
	line-height: 1.7 !important;
	margin-top: 0 !important;
	margin-bottom: 0 !important;
}
.entry-card .section__title--jp.wp-block-heading { margin-top: 8px !important; }
