/*
Theme Name:     Tw-food-blocksy
Theme URI:      
Description:    Blocksy child theme - 台灣人的日本美食護照（Phase 3 デザイン移植）
Author:         Me
Author URI:     
Template:       blocksy
Version:        0.4.0
*/

/* ==========================================================================
   フォント（現行サイトの Noto Sans TC WOFF2 を子テーマに同梱）
   ========================================================================== */
@font-face {
	font-family: 'Noto Sans TC';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('assets/fonts/NotoSansTC-Regular.subset.woff2') format('woff2');
}

@font-face {
	font-family: 'Noto Sans TC';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('assets/fonts/NotoSansTC-Bold.subset.woff2') format('woff2');
}

/* ==========================================================================
   デザイントークン（現行サイトの :root 変数を移植・2026-08-03）
   ========================================================================== */
:root {
	--theme-font-family: 'Noto Sans TC', sans-serif;
	--primary: #667eea;
	--primary-dark: #5568d3;
	--primary-light: #a5b4fc;
	--secondary: #764ba2;
	--accent: #f39c12;
	--accent-dark: #e67e22;
	--tw-green: #1A8C4C;
	--tw-gold: #F5A623;
	--tw-orange: #FF6B35;
	--tw-night-market: #2C1810;
	--text: #2d3748;
	--text-light: #718096;
	--text-muted: #a0aec0;
	--bg: #f7fafc;
	--bg-light: #fff;
	--white: #fff;
	--border: #e2e8f0;
	--border-light: #f0f0f0;
	--shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);
	--shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);
	--shadow-md: 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -2px rgba(0, 0, 0, .05);
	--shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 10px 10px -5px rgba(0, 0, 0, .04);
	--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 10px 10px -5px rgba(0, 0, 0, .04);
	--radius-sm: 8px;
	--radius-md: 12px;
	--radius: 16px;
	--radius-lg: 24px;
	--radius-full: 9999px;
	--container-narrow: 800px;
	--container-wide: 1280px;
	--font-family: 'Noto Sans TC', sans-serif;
	--ease-spring: cubic-bezier(.34, 1.56, .64, 1);
	--ease-smooth: cubic-bezier(.4, 0, .2, 1);
	--transition-fast: .2s ease;
	--transition-base: .3s ease;
	--transition-slow: .5s ease;
}

/* ==========================================================================
   グローバル（Blocksy のデフォルトフォントを Noto Sans TC に上書き）
   ========================================================================== */
body,
.ct-header,
.ct-footer,
.ct-panel,
.entry-content,
.related-card,
.shop-card,
.category-card,
.tw-hero,
.tw-section-header,
.article-header,
.shop-single {
	font-family: 'Noto Sans TC', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
}

.ct-header-text,
.ct-footer-copyright,
.ct-widget,
.ct-search-form,
.ct-breadcrumb,
.widget-title,
.entry-title,
.ct-entry-card {
	font-family: inherit;
}

/* ==========================================================================
   記事コンテンツ（article-content 内の見出し・テーブル・引用など）
   ========================================================================== */
.entry-content {
	max-width: 800px;
	margin: 0 auto;
	line-height: 1.9;
	text-align: justify;
	letter-spacing: .02em;
}

.entry-content h2 {
	font-size: 1.7rem;
	font-weight: 700;
	margin: 56px 0 24px;
	position: relative;
	padding-bottom: 14px;
	scroll-margin-top: 80px;
}

.entry-content h2::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 60px;
	height: 4px;
	background: linear-gradient(90deg, var(--primary), var(--secondary));
	border-radius: 2px;
}

.entry-content h3 {
	font-size: 1.35rem;
	font-weight: 600;
	margin: 40px 0 20px;
	color: var(--primary-dark);
	scroll-margin-top: 80px;
}

.entry-content h4 {
	font-size: 1.1rem;
	font-weight: 600;
	margin: 28px 0 16px;
	scroll-margin-top: 80px;
}

.entry-content p {
	margin-bottom: 20px;
}

.entry-content ul,
.entry-content ol {
	margin: 20px 0;
	padding-left: 28px;
}

.entry-content li {
	margin-bottom: 10px;
	line-height: 1.8;
}

.entry-content img {
	border-radius: var(--radius-sm);
	margin: 28px 0;
	max-width: 100%;
	height: auto;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.entry-content a {
	color: var(--primary);
	text-decoration: underline;
}

.entry-content blockquote {
	border-left: 4px solid var(--primary);
	padding: 20px 24px;
	margin: 28px 0;
	background: linear-gradient(135deg, #f8f9ff, #fff);
	border-radius: 0 12px 12px 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.entry-content table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	margin: 28px 0;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: var(--shadow);
	font-size: .92rem;
}

.entry-content th,
.entry-content td {
	padding: 14px 18px;
	text-align: left;
	line-height: 1.6;
}

.entry-content th {
	background-image: linear-gradient(135deg, var(--primary), var(--primary-dark));
	color: #fff;
	font-weight: 600;
	font-size: .88rem;
	letter-spacing: .3px;
}

.entry-content td {
	border-bottom: 1px solid #e2e8f0;
	background: #fff;
}

.entry-content tr:last-child td {
	border-bottom: none;
}

.entry-content tr:hover td {
	background: #f0f4ff;
}

/* ==========================================================================
   目次（article-toc）
   ========================================================================== */
.entry-content details.article-toc {
	margin: 24px 0 32px;
	padding: 0;
	background: #fff;
	border-radius: var(--radius);
	border: 1px solid var(--border);
	overflow: hidden;
	transition: box-shadow .3s ease;
}

.entry-content details.article-toc[open] {
	box-shadow: var(--shadow-sm);
}

.entry-content details.article-toc summary {
	cursor: pointer;
	font-size: .95rem;
	font-weight: 700;
	color: var(--primary-dark);
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	background: linear-gradient(135deg, var(--bg), #fff);
	user-select: none;
}

.entry-content details.article-toc summary::-webkit-details-marker {
	display: none;
}

.entry-content details.article-toc summary::after {
	content: '▼';
	font-size: .75rem;
	transition: transform .3s ease;
}

.entry-content details.article-toc[open] summary::after {
	transform: rotate(180deg);
}

.entry-content details.article-toc ol {
	margin: 0;
	padding: 4px 20px 16px;
	list-style: none;
	counter-reset: toc-counter;
}

.entry-content details.article-toc li {
	margin: 0;
	border-bottom: 1px solid var(--border-light);
	counter-increment: toc-counter;
}

.entry-content details.article-toc li:last-child {
	border-bottom: none;
}

.entry-content details.article-toc li::before {
	content: counter(toc-counter) '.';
	display: inline-block;
	width: 20px;
	color: var(--text-light);
	font-size: .78rem;
	font-weight: 600;
}

.entry-content details.article-toc li a {
	padding: 8px 4px;
	display: inline-block;
	color: var(--primary);
	font-size: .88rem;
	text-decoration: none;
	transition: color .2s ease;
}

.entry-content details.article-toc li a:hover {
	color: var(--primary-dark);
	text-decoration: underline;
}

/* ==========================================================================
   関連記事（related-grid / related-card）・カード全体クリック
   ========================================================================== */
.related-articles {
	margin-top: 60px;
}

.related-articles h2 {
	font-size: 1.5rem;
	font-weight: 700;
	margin-bottom: 12px;
	text-align: center;
}

.related-articles h2::after {
	content: '';
	display: block;
	width: 60px;
	height: 4px;
	background: linear-gradient(90deg, var(--primary), var(--secondary));
	border-radius: 2px;
	margin: 16px auto 0;
}

.related-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	gap: 20px;
}

.related-card {
	background: #fff;
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
	transition: all .3s ease;
	cursor: pointer;
	position: relative;
}

.related-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-lg);
}

.related-card a::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
}

.related-card img {
	width: 100%;
	height: 150px;
	object-fit: cover;
}

.related-card-body {
	padding: 16px;
}

.related-card-body .article-category {
	display: inline-block;
	background: var(--primary);
	color: #fff;
	padding: 2px 10px;
	border-radius: 12px;
	font-size: .72rem;
	font-weight: 600;
	margin-bottom: 8px;
}

.related-card-title {
	font-size: 1rem;
	font-weight: 600;
	margin: 0 0 8px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	color: var(--text);
}

.related-card-excerpt {
	font-size: .82rem;
	color: var(--text-light);
	line-height: 1.6;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ==========================================================================
   パンくず
   ========================================================================== */
.tw-breadcrumb {
	font-size: .85rem;
	color: var(--text-light);
	margin-bottom: 16px;
}

.tw-breadcrumb a {
	color: var(--primary);
	text-decoration: none;
}

.tw-breadcrumb a:hover {
	text-decoration: underline;
}

.tw-breadcrumb-sep {
	margin: 0 8px;
	color: var(--text-muted);
}

.tw-breadcrumb-current {
	color: var(--text);
}

/* ==========================================================================
   記事ヘッダー（カテゴリ・日付）
   ========================================================================== */
.article-header {
	margin-bottom: 32px;
}

.article-header .article-category {
	display: inline-block;
	background-image: linear-gradient(135deg, var(--primary), var(--secondary));
	color: #fff;
	padding: 6px 18px;
	border-radius: 20px;
	font-size: .82rem;
	font-weight: 600;
	margin-bottom: 16px;
	letter-spacing: .5px;
}

.article-header h1 {
	font-size: 2.2rem;
	font-weight: 800;
	line-height: 1.25;
	margin: 0 0 16px;
	color: var(--text);
}

.article-header .article-date {
	color: var(--text-light);
	font-size: .9rem;
}

.article-eyecatch {
	width: 100%;
	border-radius: var(--radius);
	margin: 30px 0;
	box-shadow: 0 8px 30px rgba(0, 0, 0, .12), 0 2px 8px rgba(0, 0, 0, .06);
}

/* ==========================================================================
   店舗カード・一覧
   ========================================================================== */
.shops-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 24px;
}

.shop-card {
	background: #fff;
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
	transition: all .3s ease;
	position: relative;
}

.shop-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-lg);
}

.shop-card a::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
}

.shop-card img {
	width: 100%;
	height: 180px;
	object-fit: cover;
}

.shop-info {
	padding: 20px;
}

.shop-info h3 {
	font-size: 1.1rem;
	font-weight: 600;
	margin: 0 0 8px;
	color: var(--text);
}

.shop-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.shop-genre {
	background: #edf2f7;
	color: var(--text-light);
	padding: 4px 10px;
	border-radius: 12px;
	font-size: .8rem;
}

.shop-rating {
	color: var(--accent);
	font-weight: 600;
	font-size: .9rem;
}

.shop-detail-table {
	width: 100%;
	border-collapse: collapse;
	margin: 24px 0;
}

.shop-detail-table th {
	width: 120px;
	background: var(--bg);
	color: var(--text-light);
	font-weight: 600;
	padding: 10px 14px;
	text-align: left;
	border: 1px solid var(--border);
}

.shop-detail-table td {
	padding: 10px 14px;
	border: 1px solid var(--border);
	background: #fff;
}

.shop-map {
	margin: 24px 0;
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow);
}

.shop-map iframe {
	display: block;
	width: 100%;
	height: 300px;
	border: 0;
}

/* ==========================================================================
   ヒーロー（front-page）
   ========================================================================== */
.tw-hero {
	position: relative;
	min-height: 500px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, #f093fb 100%);
	margin-bottom: 0;
}

.tw-hero-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
}

.tw-hero-bg img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.tw-hero-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, rgba(102, 126, 234, .5) 0%, rgba(118, 75, 162, .5) 50%, rgba(240, 147, 251, .5) 100%);
	z-index: 1;
}

.tw-hero-content {
	position: relative;
	z-index: 3;
	text-align: center;
	color: #fff;
	padding: 40px 20px;
	max-width: 800px;
}

.tw-hero-badge {
	display: inline-block;
	background: rgba(255, 255, 255, .2);
	backdrop-filter: blur(10px);
	padding: 8px 20px;
	border-radius: 30px;
	font-size: .85rem;
	font-weight: 500;
	margin-bottom: 24px;
	border: 1px solid rgba(255, 255, 255, .3);
}

.tw-hero h1 {
	font-size: 2.6rem;
	font-weight: 900;
	line-height: 1.2;
	margin: 0 0 16px;
	text-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}

.tw-hero p {
	font-size: 1.15rem;
	opacity: .95;
	margin: 0 0 32px;
	line-height: 1.8;
	text-shadow: 0 1px 4px rgba(0, 0, 0, .15);
}

.tw-hero-buttons {
	display: flex;
	gap: 16px;
	justify-content: center;
	flex-wrap: wrap;
}

.tw-hero .btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 28px;
	border-radius: 30px;
	font-weight: 600;
	font-size: 1rem;
	cursor: pointer;
	transition: all .3s ease;
	border: none;
	text-decoration: none;
}

.tw-hero .btn-primary {
	background: #fff;
	color: var(--primary);
	box-shadow: var(--shadow-lg);
}

.tw-hero .btn-primary:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 30px rgba(102, 126, 234, .35);
}

.tw-hero .btn-outline {
	background: transparent;
	color: #fff;
	border: 2px solid rgba(255, 255, 255, .5);
}

.tw-hero .btn-outline:hover {
	background: rgba(255, 255, 255, .15);
	border-color: #fff;
	transform: translateY(-2px);
}

/* セクション見出し（front-page / archive） */
.tw-section-header {
	text-align: center;
	margin-bottom: 40px;
}

.tw-section-header h2 {
	font-size: 2rem;
	font-weight: 700;
	color: var(--text);
	margin: 0 0 12px;
}

.tw-section-header .line {
	width: 60px;
	height: 4px;
	background: linear-gradient(90deg, var(--primary), var(--secondary));
	border-radius: 2px;
	margin: 16px auto 0;
}

/* カテゴリカード（front-page） */
.category-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.category-card {
	background: #fff;
	border-radius: var(--radius);
	padding: 32px 20px;
	text-align: center;
	box-shadow: var(--shadow);
	transition: all .3s ease;
	text-decoration: none;
	color: var(--text);
}

.category-card:hover {
	transform: translateY(-8px);
	box-shadow: var(--shadow-xl);
	text-decoration: none;
}

.category-card .category-icon {
	width: 70px;
	height: 70px;
	margin: 0 auto 16px;
	background: linear-gradient(135deg, var(--primary), var(--secondary));
	border-radius: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 2rem;
}

.category-card h3 {
	font-size: 1.1rem;
	font-weight: 600;
	margin: 0 0 8px;
	color: var(--text);
}

.category-card p {
	font-size: .85rem;
	color: var(--text-light);
	margin: 0;
}

/* ==========================================================================
   レスポンシブ（375px / 480px / 768px）
   ========================================================================== */
@media (max-width: 768px) {
	.article-header h1 {
		font-size: 1.5rem;
	}
	.entry-content h2 {
		font-size: 1.25rem;
	}
	.related-grid {
		grid-template-columns: 1fr;
	}
	.shops-grid {
		grid-template-columns: 1fr;
	}
	.tw-hero {
		min-height: 400px;
	}
	.tw-hero h1 {
		font-size: 2rem;
	}
	.category-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}
}

@media (max-width: 480px) {
	.article-header h1 {
		font-size: 1.2rem;
	}
	.entry-content {
		font-size: .95rem;
		line-height: 1.85;
	}
	.entry-content h2 {
		font-size: 1.2rem;
		margin: 40px 0 18px;
	}
	.entry-content h3 {
		font-size: 1.05rem;
		margin: 32px 0 16px;
	}
	.related-card img {
		height: 120px;
	}
	.tw-hero h1 {
		font-size: 1.5rem;
	}
	.tw-hero p {
		font-size: .95rem;
	}
	.category-card {
		padding: 16px 10px;
	}
	.category-card .category-icon {
		width: 50px;
		height: 50px;
		font-size: 1.5rem;
	}
}
