/*
 Theme Name:   Precious Child_Yattemita
 Template:     precious_tcd019
 Version:      1.0.0
*/

/* ============================================================
   全ページ: サイドバー領域を完全に削除して全幅表示
   ============================================================ */
#main_col {
	width: 100% !important;
	float: none !important;
}
#side_col {
	display: none !important;
}

/* ============================================================
   フロントページ タイルレイアウト
   ============================================================ */

#post-tiles-section {
	padding: 20px 0;
}

.post-tiles {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	margin: 0 0 24px;
}

.post-tile {
	position: relative;
	overflow: hidden;
	background: #222;
	aspect-ratio: 4 / 3;
}

.post-tile a.tile-link {
	display: block;
	width: 100%;
	height: 100%;
	text-decoration: none;
	color: inherit;
}

.post-tile .tile-image {
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.post-tile .tile-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.post-tile:hover .tile-image img {
	transform: scale(1.05);
}

/* アイキャッチなし時のプレースホルダー */
.post-tile .tile-image-placeholder {
	width: 100%;
	height: 100%;
	background: #444;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #888;
	font-size: 14px;
}

/* ホバーでタイトルオーバーレイ */
.post-tile .tile-overlay {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(0, 0, 0, 0.72);
	padding: 12px 14px;
	transform: translateY(100%);
	transition: transform 0.25s ease;
}

.post-tile:hover .tile-overlay {
	transform: translateY(0);
}

.post-tile .tile-overlay .tile-date {
	font-size: 11px;
	color: #bbb;
	margin: 0 0 4px;
}

.post-tile .tile-overlay .tile-title {
	font-size: 13px;
	color: #fff;
	margin: 0;
	line-height: 1.4;
	/* 長いタイトルは2行で切る */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ページネーション */
.post-tiles-pagination {
	text-align: center;
	padding: 16px 0 8px;
}

.post-tiles-pagination .page-numbers {
	display: inline-block;
	padding: 6px 12px;
	margin: 0 3px;
	border: 1px solid #ccc;
	color: #333;
	text-decoration: none;
	font-size: 15px;
	transition: background 0.2s, color 0.2s;
}

.post-tiles-pagination .page-numbers:hover,
.post-tiles-pagination .page-numbers.current {
	background: #333;
	color: #fff;
	border-color: #333;
}

/* ============================================================
   X リンク（ヘッダー内）
   ============================================================ */
#x-announcement-link {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	color: #000 !important;
	text-decoration: none !important;
	font-size: 13px;
	background-color: #fff;
	border: 1.5px solid #000;
	border-radius: 9999px;
	padding: 5px 14px 5px 10px;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
#x-announcement-link:hover {
	background-color: #000;
	color: #fff !important;
	transform: translateY(-1px);
}
#x-announcement-link:hover #x-icon {
	fill: #fff;
}
#x-icon {
	width: 14px;
	height: 14px;
	fill: #000;
	flex-shrink: 0;
	transition: fill 0.2s ease;
}

/* 幅が狭くなったら X リンクを非表示 */
@media screen and (max-width: 900px) {
	#x-announcement-link {
		display: none;
	}
}

/* ============================================================
   レスポンシブ: タブレット → 2列 */
@media screen and (max-width: 900px) {
	.post-tiles {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* レスポンシブ: スマートフォン → 1列 */
@media screen and (max-width: 600px) {
	.post-tiles {
		grid-template-columns: 1fr;
		gap: 10px;
	}
	.post-tile {
		aspect-ratio: 16 / 9;
	}
	/* SP ではオーバーレイを常時表示 */
	.post-tile .tile-overlay {
		transform: translateY(0);
		background: rgba(0, 0, 0, 0.55);
	}
}
