/*
Theme Name: 邑為澄金 Y.C. DESIGN
Theme URI: https://www.facebook.com/ycdesign.tw
Author: 邑為澄金空間室內裝修設計有限公司
Description: 邑為澄金官網專用區塊佈景主題。整頁金棕底、細體英文大標、一排兩張大圖。
Version: 1.0.2
Requires at least: 6.6
Requires PHP: 7.4
License: GPLv2 or later
Text Domain: yc-design
*/

/* Logo 原檔是金色，放在金棕底上改成白色 */
.yc-logo img { filter: brightness(0) invert(1); }

/* 照片預留框：之後把整個框換成「圖片」區塊即可 */
.yc-ph {
	aspect-ratio: 4 / 3;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.2);
	text-align: center;
}
.yc-ph.is-wide { aspect-ratio: 21 / 9; }
.yc-ph.is-article { aspect-ratio: 3 / 2; }

.yc-card img,
.wp-block-post-featured-image img { transition: filter 0.2s ease; }
.yc-card:hover img,
.wp-block-post:hover .wp-block-post-featured-image img { filter: brightness(1.08); }

.yc-rule-top { border-top: 1px solid rgba(255, 255, 255, 0.25); }
.yc-rule-bottom { border-bottom: 1px solid rgba(255, 255, 255, 0.25); }

/* 頁首捲動時固定 */
.yc-header {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}
.admin-bar .yc-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .yc-header { top: 46px; } }

/* 標籤 */
.yc-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.yc-tags li { font-size: 13px; padding: 6px 14px; border: 1px solid rgba(255, 255, 255, 0.45); border-radius: 999px; }

/* 流程步驟：手機兩欄、桌機六欄 */
.yc-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px; }
.yc-steps li { border-top: 1px solid #fff; padding-top: 18px; }
@media (max-width: 900px) { .yc-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 文章內頁：小標用中文字體、尺寸收小 */
.wp-block-post-content h2 {
	font-family: var(--wp--preset--font-family--body);
	font-size: clamp(24px, 3vw, 30px);
	font-weight: 500;
	line-height: 1.45;
	letter-spacing: 0.02em;
	margin-top: 64px;
}
.wp-block-post-content h3 { margin-top: 40px; }
.yc-updated:not(:has(.wp-block-post-date)) { display: none; }

/* 文章內頁可讀性 */
.single .wp-block-post-content p,
.page .entry-prose p { line-height: 1.9; }
.wp-block-post-content table { border-collapse: collapse; width: 100%; }
.wp-block-post-content th,
.wp-block-post-content td { border: 1px solid rgba(255, 255, 255, 0.35); padding: 10px 12px; }

:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* 工程款分期表：手機可左右捲 */
.yc-pay-table { overflow-x: auto; }
.yc-pay-table table { min-width: 560px; text-align: center; }
.yc-pay-table th, .yc-pay-table td { border: 1px solid rgba(255, 255, 255, 0.35); padding: 12px; }

/* 常見問題：點一下展開 */
.yc-faq .wp-block-details { border-top: 1px solid rgba(255, 255, 255, 0.25); padding: 22px 0; margin: 0; }
.yc-faq .wp-block-details:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.25); }
.yc-faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 24px; font-weight: 500; letter-spacing: 0.04em; }
.yc-faq summary::-webkit-details-marker { display: none; }
.yc-faq summary::after { content: "+"; font-family: var(--wp--preset--font-family--display); font-weight: 200; font-size: 24px; line-height: 1; }
.yc-faq details[open] summary::after { content: "−"; }
.yc-faq details p { margin-top: 14px; }
