/*
Theme Name:  司徒華紀念網站 (Kadence child)
Template:    kadence
Description: Recreates the 2020 szetowah.org design on Kadence: lavender left sidebar, warm-grey open page, white article tiles. Fonts come from mu-plugins/szetowah-fonts.php.
Version:     1.0.0
Text Domain: szetowah
*/

/* Values measured from the live 2020 site (Draven), 2026-12-02. */
:root {
	--sw-sidebar-w: 370px;
	--sw-lavender: #d3ccd6;
	--sw-bg: #f3f3f2;
	--sw-text: #535353;
	--sw-heading: #2f2f2f;
	--sw-title: #262626;
	--sw-menu: #393f4c;
	--sw-accent: #9d5b8b;
	--sw-muted: rgba(0, 0, 0, .7);
}

body {
	background: var(--sw-bg);
	color: var(--sw-text);
	font-size: 20px;
	line-height: 1.714;
}

/* ---------------------------------------------------------- sidebar */

.sw-sidebar { display: none; }

@media (min-width: 1025px) {
	body { padding-left: var(--sw-sidebar-w); }
	#masthead { display: none; }

	.sw-sidebar {
		display: flex;
		flex-direction: column;
		position: fixed;
		inset: 0 auto 0 0;
		width: var(--sw-sidebar-w);
		background: var(--sw-lavender);
		padding: 70px 40px 60px;
		overflow-y: auto;
		z-index: 100;
	}
	.admin-bar .sw-sidebar { top: 32px; }

	.sw-sidebar__logo { margin: 0 0 90px 5px; }
	.sw-sidebar__logo img { width: 280px; max-width: 100%; height: auto; display: block; }

	.sw-menu, .sw-menu .sub-menu { list-style: none; margin: 0; padding: 0; }
	.sw-menu > li { position: relative; }
	.sw-menu a {
		display: block;
		padding: 10px 32px 10px 0;
		font-size: 20px;
		line-height: 1.714;
		color: var(--sw-menu);
		text-decoration: none;
	}
	.sw-menu a:hover,
	.sw-menu .current-menu-item > a { color: var(--sw-accent); }

	.sw-menu .sub-menu { display: none; padding: 0 0 6px 18px; }
	.sw-menu .sub-menu a { font-size: 18px; padding: 6px 0; }
	.sw-menu li.is-open > .sub-menu { display: block; }

	.sw-menu__toggle {
		position: absolute; right: 0; top: 14px;
		width: 28px; height: 28px; padding: 0;
		background: none; border: 0; color: var(--sw-menu); cursor: pointer;
		display: flex; align-items: center; justify-content: center;
		transition: transform .2s;
	}
	.sw-menu li.is-open > .sw-menu__toggle { transform: rotate(180deg); }

	.sw-sidebar__search {
		margin: auto auto 0;
		padding-top: 60px;
		display: flex; align-items: center;
		width: 176px;
	}
	.sw-sidebar__search input {
		flex: 1; min-width: 0; height: 22px; padding: 0 8px;
		border: 0; border-radius: 0; background: #fff;
		font-size: 13px; text-align: center; color: var(--sw-text);
	}
	.sw-sidebar__search button {
		background: none; border: 0; padding: 0 0 0 4px; color: #000; cursor: pointer; display: flex;
	}
}

/* ------------------------------------------------- mobile/tablet header */

@media (max-width: 1024px) {
	#masthead,
	#masthead .site-header-row-container-inner,
	#mobile-header .site-main-header-wrap .site-header-row-container-inner {
		background: var(--sw-lavender);
	}
	#mobile-header .site-main-header-inner-wrap { min-height: 90px; }
	#mobile-header .custom-logo { max-height: 70px; width: auto; }
	.menu-toggle-open { color: var(--sw-menu); }
}

/* ------------------------------------------------------------- layout */

.content-container.site-container { max-width: none; padding-left: 30px; padding-right: 30px; }
.content-area { margin-top: 40px; margin-bottom: 60px; }
.entry.single-entry,
.content-bg, .site .entry-content-wrap { background: transparent; box-shadow: none; padding: 0; }
.site-footer, .site-footer .site-bottom-footer-wrap .site-footer-row-container-inner { background: transparent; }
.site-footer { font-size: 15px; color: var(--sw-muted); }

/* ------------------------------------------------------- page titles */

.page .entry-header { text-align: center; margin-bottom: 40px; }
.page .entry-title {
	font-size: 36px; font-weight: 400; line-height: 1.4; color: var(--sw-title);
}
.page .kadence-breadcrumbs, .page .entry-header .kadence-breadcrumbs {
	margin: 10px 0 0; font-size: 20px; color: var(--sw-muted);
}
.kadence-breadcrumbs a { color: var(--sw-muted); text-decoration: none; }
.kadence-breadcrumbs .bc-delimiter { margin: 0 .6em; font-size: 15px; }

/* ------------------------------------------------------- single posts */

.single-post .entry-header { margin-bottom: 50px; }
.single-post .entry-title {
	font-size: 46px; font-weight: 600; line-height: 1.4; color: var(--sw-heading); margin: 0 0 15px;
}
.single-post .entry-taxonomies {
	font-size: 20px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--sw-text);
}
.single-post .entry-taxonomies::before { content: "｜ "; }
.single-post .entry-taxonomies a { color: var(--sw-text); text-decoration: none; }
.single-post .entry-taxonomies a:hover { color: var(--sw-accent); }
.single-post .entry-header .kadence-breadcrumbs { display: none; }

.entry-content p { font-size: 20px; line-height: 35px; margin: 0 0 30px; }
.entry-content { font-size: 20px; }

@media (max-width: 767px) {
	.single-post .entry-title { font-size: 26px; }
	.page .entry-title { font-size: 28px; }
}

/* ------------------------------------- article lists (Query Loop tiles) */

.sw-article-list .wp-block-post-template.is-layout-grid,
.sw-article-list .wp-block-post-template {
	gap: 20px 26px;
}
.sw-article-list .wp-block-post-template > li {
	background: #fff;
	min-height: 58px;
	padding: 12px 10px;
	display: flex; align-items: center;
	margin: 0;
}
.sw-article-list .wp-block-post-title {
	font-size: 20px !important; font-weight: 400; line-height: 1.4; margin: 0;
}
.sw-article-list .wp-block-post-title a { color: var(--sw-heading); text-decoration: none; }
.sw-article-list .wp-block-post-title a:hover { color: var(--sw-accent); }

@media (max-width: 781px) {
	.sw-article-list .wp-block-post-template.is-layout-grid { grid-template-columns: 1fr; }
}

/* --------------------------------------------------- content blocks */

.entry-content a { color: var(--sw-accent); }
.wp-block-image img { height: auto; }
.sw-timeline h3 { margin-bottom: .2em; }
.sw-timeline li { margin-bottom: .4em; }
.sw-tour .wp-block-image img { aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.sw-tour h3 { margin: .6em 0 0; }

/* Home page sections (see scripts/migration/elementor-to-blocks.php) */
.home .entry-content > .sw-band { margin-left: -30px; margin-right: -30px; padding: 50px 30px; }
.home .content-area { margin-top: 0; }

/* Section "bands" produced by the converter */
.sw-band { padding: 60px 30px; }
.sw-band--photo { padding: 80px 30px; background-attachment: fixed; }
.sw-band--photo .wp-block-image { margin: 0 auto; }
.sw-band--decor { background-size: auto 100% !important; background-position: left bottom !important; }
@media (max-width: 767px) { .sw-band--photo { padding: 57px 16px 71px; background-attachment: scroll; } }

/* --- fixes after first visual comparison (2026-12-02) --- */
/* Kadence paints white site/content layers; the old site was warm grey throughout. */
body, #wrapper, .site, #inner-wrap, #primary, .content-area, .site-main,
.content-bg, .entry.content-bg, .single-entry, .entry-content-wrap { background-color: var(--sw-bg) !important; }
.sw-article-list .wp-block-post-template > li { background: #fff !important; }

.single-post .entry-taxonomies,
.single-post .entry-taxonomies a,
.single-post .entry-taxonomies .category-links { font-weight: 400 !important; font-size: 20px; }
.single-post .entry-taxonomies .category-style-normal a { color: var(--sw-text); }

/* Decorative bamboo on the left of its band: keep text clear of it. */
@media (min-width: 768px) { .sw-band--decor { padding-left: 300px; } }
@media (max-width: 767px) { .sw-band--decor { background-size: auto 60% !important; padding-top: 110px; } }

.sw-sidebar__search input::placeholder { color: #777; opacity: 1; }

/* Bamboo band: the home rule `.home .entry-content > .sw-band` sets padding with higher specificity. */
@media (min-width: 768px) { .home .entry-content > .sw-band--decor { padding-left: 300px; } }
/* Credit line under self-hosted videos in classic posts */
.sw-video-credit, .wp-block-video figcaption { font-size: 15px; color: #8a8790; text-align: center; margin-top: .4em; }

/* Headings inside page content always get air above them (not only from the previous block's margin). */
.entry-content > h2, .entry-content > h3, .entry-content .wp-block-column > h2, .entry-content .wp-block-column > h3 { margin-top: 1.6em; }
.entry-content > h2:first-child, .entry-content > h3:first-child, .entry-content .wp-block-column > h2:first-child, .entry-content .wp-block-column > h3:first-child { margin-top: 0; }
