/****************************************
 * apinworks.art 額外 CSS 整理版
 * 2026｜保留作品牆、作品頁、新聞頁、瀟灑江湖首頁設定
 ****************************************/
/****************************************
 * 1. 作品牆
 ****************************************/
/* 作品牆外框 */
.works-wall-area .wp-block-post-template,
.works-wall-list {
	list-style: none;
	margin: 24px auto 32px;
	padding: 0;
}

.works-wall-area .wp-block-post,
.works-wall-list .wp-block-latest-posts__post {
	margin: 0;
}

/* 縮圖：正方形＋圓角 */
.works-wall-area .wp-block-post-featured-image,
.works-wall-list .wp-block-latest-posts__featured-image {
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 8px;
}

.works-wall-area .wp-block-post-featured-image img,
.works-wall-list .wp-block-latest-posts__featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

/* 整張縮圖可點擊 */
.works-wall-area .wp-block-post-featured-image a,
.works-wall-list .wp-block-latest-posts__featured-image a {
	display: block;
	width: 100%;
	height: 100%;
}

/* 標題 */
.works-wall-area .wp-block-post-title,
.works-wall-list .wp-block-latest-posts__post-title {
	font-weight: 500;
	color: #333;
	margin: 4px 0 0;
	line-height: 1.25;
	text-align: left;
}

/* 日期隱藏 */
.works-wall-area .wp-block-post-date,
.works-wall-list .wp-block-latest-posts__post-date {
	display: none;
}

/* 手機：三欄 */
@media (max-width: 768px) {
	.works-wall-area .wp-block-post-template,
													.works-wall-list {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		column-gap: 10px;
	}
	
	.works-wall-area .wp-block-post-title,
													.works-wall-list .wp-block-latest-posts__post-title {
		font-size: .9rem;
		line-height: 1.1;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}

/* 平板：四欄 */
@media (min-width: 769px) and (max-width: 1199px) {
	.works-wall-area .wp-block-post-template,
													.works-wall-list {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		column-gap: 18px;
	}
	
	.works-wall-area .wp-block-post-title,
													.works-wall-list .wp-block-latest-posts__post-title {
		font-size: 1rem;
		line-height: 1.2;
	}
}

/* 桌機：五欄 */
@media (min-width: 1200px) {
	.works-wall-area {
		max-width: 1800px;
		margin: 0 auto;
		padding: 0 24px;
		box-sizing: border-box;
	}
	
	.works-wall-area .wp-block-post-template,
													.works-wall-list {
		display: grid;
		grid-template-columns: repeat(5, minmax(0, 1fr));
		column-gap: 20px;
		justify-content: center;
	}
}

/****************************************
 * 2. 全站基本樣式
 ****************************************/
/* 全站按鈕字體 */
.wp-block-button__link,
.wp-element-button,
button,
a.button,
input[type="button"],
input[type="submit"],
input[type="reset"],
.wp-block-button a {
	font-weight: 400;
	font-family: inherit;
}

/* 區塊按鈕稍微加重 */
.wp-block-buttons .wp-block-button__link {
	font-weight: 500;
	color: #333;
}

/* 標題金色 */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
body.single-post .entry-title,
body.single .entry-title,
body.page .entry-title,
body.single-post .wp-block-heading,
body.single .wp-block-heading,
body.page .wp-block-heading {
	color: #b38b37;
}

/* 回上一頁按鈕 */
.apin-back-btn {
	text-align: center;
	margin: 32px 0 10px;
}

.apin-back-btn a {
	display: inline-block;
	padding: 8px 18px;
	border-radius: 6px;
	background: #f4f4f4;
	color: #333;
	font-size: 14px;
	text-decoration: none;
	border: 1px solid #ccc;
	transition: .2s ease;
}

.apin-back-btn a:hover {
	background: #eaeaea;
	border-color: #999;
}

/* 避免手機標題換行 */
@media (max-width: 768px) {
	.wp-block-heading,
													header .site-title,
													.menu-text,
													.logo-text {
		white-space: nowrap !important;
	}
}

/* 桌機版：放大圖片說明 Caption */
@media (min-width: 1024px) {
	.wp-element-caption,
													figcaption {
		font-size: 1.1rem !important;
		line-height: 1.4;
	}
}

/****************************************
 * 3. 單篇作品頁
 ****************************************/
/* 隱藏模板自動顯示的精選圖片 */
body.single-post .wp-block-post-featured-image,
body.single .wp-block-post-featured-image,
body.single-post .post-thumbnail,
body.single .post-thumbnail {
	display: none;
}

/* 單篇作品頁主標題金色 */
body.single-post .entry-title,
body.single .entry-title {
	color: #b38b37 !important;
}

/* 單篇作品頁：左右欄外框加寬 */
body.single .wp-block-columns {
	max-width: 90% !important;
	margin-left: auto;
	margin-right: auto;
}

/* 單篇作品頁圖片上方距離 */
.single .entry-content figure.wp-block-image:first-of-type {
	margin-top: 12px !important;
}

/* 桌機：單篇內容往上收 */
@media (min-width: 769px) {
	.single .entry-content {
		margin-top: -45px;
	}
}

/* 手機：單篇內容往上收 */
@media (max-width: 768px) {
	.single .entry-content {
		margin-top: -25px;
	}
	
	.single .entry-content > p:first-of-type {
		margin-top: 2px !important;
		margin-bottom: 6px !important;
	}
	
	.single .entry-content figure.wp-block-image:first-of-type {
		margin-top: 4px !important;
	}
	
	.single .entry-content figure.wp-block-image:first-of-type + p {
		margin-top: 8px !important;
	}
}

/* 手機：單篇文章標題上方空白縮小 */
@media (max-width: 767px) {
	.single .entry-header,
													.single-post .entry-header,
													.entry-header {
		padding-top: 8px !important;
		margin-top: 0 !important;
	}
	
	.single .site-content,
													.single-post .site-content {
		padding-top: 0 !important;
		margin-top: 0 !important;
	}
	
	.single .entry-title,
													.single-post .entry-title,
													h1.entry-title {
		margin-top: 6px !important;
	}
}

/****************************************
 * 4. 作品互動列與典藏洽詢
 ****************************************/
/* 第一層：喜歡、瀏覽、按鈕 */
.work-top-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	align-items: center;
	gap: 16px;
	margin: 10px 0;
}

.stat-item {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 14px;
	color: #555;
}

.stat-icon {
	font-size: 20px;
}

.stat-number {
	font-weight: 500;
}

/* 膠囊按鈕 */
.pill-btn {
	display: inline-block;
	padding: 6px 18px;
	border-radius: 999px;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	border: 2px solid transparent;
}

.orange-pill {
	background-color: #fff5eb;
	border-color: #e8a15b;
	color: #545454;
}

.blue-pill {
	background-color: #e7f4ff;
	border-color: #8ab7d8;
	color: #545454;
}

/* 提示文字 */
.copy-hint {
	margin: 10px 0 8px;
	background: #fff7ef;
	display: inline-block;
	padding: 6px 12px;
	border: 2px solid #e8a15b;
	border-radius: 10px;
	color: #545454;
	font-size: 18px;
}

/* 標題＋網址灰底區 */
.copy-title {
	font-weight: 600;
	margin-bottom: 6px;
}

.copy-url {
	font-family: "Courier New", monospace;
	font-size: 18px;
	color: #545454;
	word-break: break-all;
}

/* 作品資訊 */
.work-meta {
	font-weight: 600;
	color: #444;
}

.work-url {
	color: #555;
}

/* 桌機：典藏洽詢與作品資訊 */
@media (min-width: 769px) {
	.copy-info,
													div.copy-info,
													.wp-block-group.copy-info {
		font-size: 22px !important;
		font-weight: 600 !important;
		color: #444 !important;
		line-height: 1.6 !important;
		padding: 14px 20px !important;
	}
	
	.copy-info .copy-title,
													div.copy-info .copy-title {
		font-size: 22px !important;
		font-weight: 700 !important;
		color: #444 !important;
	}
	
	.copy-info .copy-url,
													div.copy-info .copy-url {
		font-size: 22px !important;
		font-weight: 600 !important;
		color: #555 !important;
		font-family: "Courier New", monospace !important;
		word-break: break-all !important;
	}
	
	.work-meta,
													.work-meta-title {
		font-size: 24px !important;
		font-weight: 700 !important;
		color: #545454 !important;
	}
	
	.work-url,
													.work-meta-url {
		font-size: 22px !important;
		color: #545454 !important;
	}
}

/* 手機：互動列與典藏洽詢 */
@media (max-width: 768px) {
	.work-top-row {
		gap: 10px;
		margin: 6px 0;
	}
	
	.stat-item {
		font-size: 10px !important;
	}
	
	.stat-icon,
													.stat-item .stat-icon {
		font-size: 14px !important;
	}
	
	.pill-btn,
													.orange-pill,
													.blue-pill,
													.post-inquiry .inquiry-btn,
													.post-return-buttons a {
		font-size: .7em !important;
		padding: 2px 4px !important;
		border-width: 1px !important;
		margin: 2px 0 !important;
	}
	
	.copy-info {
		font-size: 10px !important;
		padding: 10px 12px;
		margin: 8px 0 12px;
	}
	
	.copy-info .copy-title {
		font-size: 16px !important;
	}
	
	.copy-info .copy-url {
		font-size: 10px !important;
	}
	
	.work-meta {
		font-size: 16px !important;
		font-weight: 600 !important;
	}
	
	.work-url {
		font-size: 8px !important;
		font-weight: 500 !important;
	}
}

/****************************************
 * 5. Art Briefs 即時新聞頁
 ****************************************/
/* 桌機：新聞頁拉寬到 90vw */
@media (min-width: 1200px) {
	.artbriefs-wrap {
		width: 90vw !important;
		max-width: 90vw !important;
		margin-left: calc(50% - 45vw) !important;
		margin-right: 0 !important;
		padding-left: 12px;
		padding-right: 12px;
		box-sizing: border-box;
	}
	
	.artbriefs-wrap .wp-block-columns,
													.artbriefs-wrap .wp-block-query {
		width: 100% !important;
		max-width: none !important;
	}
}

/* 新聞卡片縮圖 */
.artbriefs-wrap .wp-block-post-featured-image {
	aspect-ratio: 4 / 3;
	overflow: hidden;
	margin: 0 0 10px !important;
	border-radius: 8px;
}

.artbriefs-wrap .wp-block-post-featured-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* 新聞卡片自身 */
.artbriefs-wrap .wp-block-post {
	padding: 0 !important;
	margin: 0 0 18px !important;
}

/* 主視覺高度與背景 */
.home .wp-block-cover {
	min-height: 82vh !important;
	background-position: center center !important;
	position: relative;
}

/* 首頁主視覺文字陰影 */
.home .wp-block-cover h1,
.home .wp-block-cover h2,
.home .wp-block-cover h3,
.home .wp-block-cover p,
.home .wp-block-cover a {
	text-shadow: 2px 2px 2px rgba(0,0,0,.8), 0 0 12px rgba(0,0,0,.45) !important;
}

/* 電腦版 */
@media (min-width: 1024px) {
	/* 主標題圖片：瀟灑江湖 */
	.home .wp-block-cover img {
		max-width: 560px !important;
		height: auto !important;
	}
	
	/* 相忘於江湖 */
	.home .wp-block-cover h3 {
		font-size: 22px !important;
		margin-left: 0 !important;
		letter-spacing: .08em !important;
		background: none !important;
	}
	
	/* 教壇卅七春秋 */
	.home .wp-block-cover p {
		font-size: 34px !important;
		line-height: 1.5 !important;
		letter-spacing: .12em !important;
		margin-left: 40px !important;
		margin-top: 10px !important;
		font-weight: 600 !important;
	}
}

/* 手機版 */
@media (max-width: 768px) {
	.home-top-menu {
		margin-top: 0 !important;
	}
}

	
}

/* 主標題圖片 */
.home .wp-block-cover img {
	max-width: 62% !important;
	height: auto !important;
	margin: 0 auto 14px !important;
	display: block !important;
}

/* 相忘於江湖 */
.home .wp-block-cover h3 {
	font-size: 18px !important;
	margin-left: 40px !important;
	background: none !important;
	padding: 0 !important;
}

/* 教壇卅七春秋 */
.home .wp-block-cover p {
	font-size: 20px !important;
	line-height: 1.3 !important;
	font-weight: 600 !important;
	margin-top: 80px !important;
}

/* 手機按鈕直排 */
.home .wp-block-buttons {
	flex-direction: column !important;
	gap: 14px !important;
}

.home .wp-block-button,
										.home .wp-block-button__link {
	width: 100% !important;
	text-align: center !important;
}	
}

/* 超小手機 */
@media (max-width: 420px) {
	.home .wp-block-cover img {
		max-width: 58% !important;
	}
	
	.home .wp-block-cover p {
		font-size: 18px !important;
	}
}

@media (min-width:1024px) {
	.home h4 {
		margin-left: 30px !important;
	}
}

/* 首頁左上選單－僅電腦版 */
@media (min-width:1024px) {
	.home .wp-block-cover a {
		font-size: 16px !important;
		line-height: 1.05 !important;
		letter-spacing: .03em !important;
	}
}

/* 電腦版：首頁左上兩行導覽縮小間距 */
@media (min-width:1024px) {
	.home .wp-block-cover .wp-block-navigation {
		gap: 4px !important;
	}
	
	.home .wp-block-cover .wp-block-navigation__container {
		gap: 4px !important;
	}
}

/* ===== 首頁導覽 ===== */
.home-top-menu {
	font-size: 24px;
	line-height: 1;
	letter-spacing: 1px;
}

/* 手機版首頁導覽往上移 */
@media (max-width:768px) {
	.home-top-menu {
		transform: translateY(-30px) !important;
	}
}

/* 手機版：只把首頁主視覺最上方導覽往上移 */
@media (max-width:768px) {
	body.home .wp-block-cover .wp-block-cover__inner-container > :first-child {
		transform: translateY(0px) !important;
		margin-top: -40px !important;
	}
}