/* =====================================================================
 * Site chrome: light header + footer used on every page
 * (newsberg/header.php, newsberg/footer.php).
 * Global theme CSS sets font sizes/families with !important on bare
 * elements, so these rules use class selectors + !important where they
 * need to win.
 * ===================================================================== */
:root {
	--sc-purple: #6a0dad;
	--sc-purple-deep: #4b0880;
	--sc-lavender: #f3ecfb;
	--sc-ink: #1f1233;
	--sc-text: #4a4358;
	--sc-muted: #7a7288;
	--sc-line: #ebe5f2;
	--sc-max: 1240px;
}

::selection { background: #e2cff7; color: var(--sc-ink); }

/* ---------- Header ---------- */
.sc-header {
	position: sticky;
	top: 0;
	z-index: 1000;
	border-bottom: 1px solid transparent;
	transition: border-color .25s ease, box-shadow .25s ease;
}
/* Frosted background lives on a pseudo-element: backdrop-filter on the
   header itself would make it the containing block for the fixed
   mobile menu panel and clip it to the header's height. */
.sc-header::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(255, 255, 255, .96);
	backdrop-filter: saturate(160%) blur(10px);
	-webkit-backdrop-filter: saturate(160%) blur(10px);
}
.admin-bar .sc-header { top: 32px; }
.sc-header.is-scrolled { border-bottom-color: var(--sc-line); box-shadow: 0 6px 24px rgba(31, 18, 51, .06); }
/* Full-width bar: brand + menu hug the left edge, tools the right. */
.sc-header-inner {
	max-width: none;
	margin: 0;
	padding: 10px 32px;
	display: flex;
	align-items: center;
	gap: 28px;
}

.sc-brand { display: flex; align-items: center; gap: 14px; text-decoration: none !important; flex-shrink: 1; min-width: 0; }
.sc-brand-logo { width: 66px !important; height: 66px !important; object-fit: contain; }
.sc-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.sc-brand .sc-brand-abbr { font-size: 22px !important; font-weight: 800; color: var(--sc-purple); letter-spacing: .02em; }
.sc-brand .sc-brand-th { max-width: 190px; font-size: 12.5px !important; font-weight: 600; line-height: 1.35; color: var(--sc-ink); }
.sc-brand .sc-brand-en { display: none; }

.sc-nav { flex: 1; display: flex; justify-content: flex-start; min-width: 0; }
.sc-menu { display: flex; align-items: center; gap: 0; list-style: none; margin: 0; padding: 0; }
.sc-menu > li { position: relative; }
.sc-menu a {
	display: block;
	padding: 10px 8px;
	font-size: 16.5px !important;
	font-weight: 600;
	color: var(--sc-ink) !important;
	text-decoration: none !important;
	white-space: nowrap;
	border-radius: 8px;
	transition: color .2s ease, background .2s ease;
}
.sc-menu > li > a { position: relative; }
.sc-menu > li > a::after {
	content: "";
	position: absolute;
	left: 8px; right: 8px; bottom: 3px;
	height: 2px;
	border-radius: 2px;
	background: var(--sc-purple);
	transform: scaleX(0);
	transition: transform .25s ease;
}
.sc-menu > li > a:hover, .sc-menu > li > a:focus-visible { color: var(--sc-purple) !important; }
.sc-menu > li > a:hover::after,
.sc-menu > li.current-menu-item > a::after,
.sc-menu > li.current-menu-ancestor > a::after { transform: scaleX(1); }
.sc-menu > li.current-menu-item > a,
.sc-menu > li.current-menu-ancestor > a { color: var(--sc-purple) !important; }
.sc-menu .menu-item-has-children > a { padding-right: 22px; }
.sc-menu .menu-item-has-children > a::before {
	content: "";
	position: absolute;
	right: 8px; top: 50%;
	width: 6px; height: 6px;
	border-right: 1.6px solid currentColor;
	border-bottom: 1.6px solid currentColor;
	transform: translateY(-70%) rotate(45deg);
}
.sc-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	list-style: none;
	margin: 6px 0 0;
	padding: 8px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 16px 40px rgba(31, 18, 51, .14);
	border: 1px solid var(--sc-line);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.sc-menu .sub-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -10px; height: 10px; }
.sc-menu li:hover > .sub-menu,
.sc-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.sc-menu .sub-menu a { font-weight: 500; font-size: 15.5px !important; }
.sc-menu .sub-menu a:hover { background: var(--sc-lavender); color: var(--sc-purple) !important; }

.sc-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; }
.sc-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px; height: 40px;
	border-radius: 50%;
	border: 1px solid var(--sc-line);
	background: #fff;
	color: var(--sc-ink);
	box-shadow: none !important;
	padding: 0;
	cursor: pointer;
	transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.sc-icon-btn:hover { background: var(--sc-lavender); color: var(--sc-purple); border-color: #dccbf0; }
.sc-icon-btn i { font-size: 15px !important; }

.sc-lang { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--sc-lavender); }
.sc-lang a {
	font-size: 12.5px !important;
	font-weight: 700;
	padding: 5px 10px;
	border-radius: 999px;
	color: var(--sc-muted) !important;
	text-decoration: none !important;
	transition: background .2s ease, color .2s ease;
}
.sc-lang a:hover { color: var(--sc-purple) !important; }
.sc-lang a.is-active { background: #fff; color: var(--sc-purple) !important; box-shadow: 0 1px 4px rgba(31, 18, 51, .1); }

.sc-login {
	display: inline-flex;
	align-items: center;
	padding: 9px 17px;
	border-radius: 999px;
	background: var(--sc-purple);
	color: #fff !important;
	font-size: 14.5px !important;
	font-weight: 700;
	text-decoration: none !important;
	white-space: nowrap;
	box-shadow: 0 6px 16px rgba(106, 13, 173, .25);
	transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}
.sc-login:hover { background: var(--sc-purple-deep); transform: translateY(-1px); box-shadow: 0 10px 22px rgba(106, 13, 173, .3); }

.sc-burger { display: none; flex-direction: column; gap: 4px; }
.sc-burger span { display: block; width: 16px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .25s ease, opacity .25s ease; }
.sc-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.sc-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.sc-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.sc-nav-mobile-extra { display: none; }

.sc-search { border-top: 1px solid var(--sc-line); background: #fff; padding: 14px 24px; }
.sc-search[hidden] { display: none; }
.sc-search form {
	max-width: 720px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 6px 6px 18px;
	border-radius: 999px;
	border: 1.5px solid #dccbf0;
	background: #fcfaff;
}
.sc-search form:focus-within { border-color: var(--sc-purple); box-shadow: 0 0 0 4px rgba(106, 13, 173, .1); }
.sc-search i { color: var(--sc-muted); }
.sc-search input[type="search"] {
	flex: 1;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	outline: none;
	font-size: 15px !important;
	padding: 8px 0 !important;
	height: auto !important;
	color: var(--sc-ink);
}
.sc-search button {
	border: 0;
	border-radius: 999px;
	padding: 9px 20px;
	background: var(--sc-purple);
	color: #fff;
	font-weight: 700;
	font-size: 14px !important;
	cursor: pointer;
}

.sc-header a:focus-visible,
.sc-header button:focus-visible,
.sc-footer a:focus-visible { outline: 2px solid var(--sc-purple); outline-offset: 2px; }

@media (max-width: 1599px) { .sc-brand .sc-brand-th { display: none; } }
/* Menu text steps down on laptop widths so it stays on one row. */
@media (max-width: 1599px) {
	.sc-header-inner { padding: 12px 24px; gap: 20px; }
	.sc-header:not(.is-collapsed) .sc-menu a { font-size: 15.5px !important; padding: 10px 7px; }
}
@media (max-width: 1439px) {
	.sc-header:not(.is-collapsed) .sc-menu a { font-size: 15px !important; padding: 10px 6px; }
	.sc-header-inner { gap: 16px; }
}
@media (max-width: 1365px) {
	.sc-header:not(.is-collapsed) .sc-menu a { font-size: 14.5px !important; padding: 10px 5px; }
	.sc-header-inner { padding: 12px 20px; gap: 12px; }
}
/* Keep room for the dropdown caret after the label at every size. */
.sc-header:not(.is-collapsed) .sc-menu .menu-item-has-children > a { padding-right: 24px; }

.sc-header.is-measuring, .sc-header.is-measuring * { transition: none !important; }

/* Burger mode: header.php adds .is-collapsed whenever the menu doesn't
   fit on one row (narrow screens, long translated labels, extra items
   added in wp-admin), so the layout never overlaps. */
.sc-header.is-collapsed .sc-burger { display: inline-flex; }
.sc-header.is-collapsed .sc-lang-desktop,
.sc-header.is-collapsed .sc-login-desktop { display: none; }
.sc-header.is-collapsed .sc-actions { margin-left: auto; }
.sc-header.is-collapsed .sc-brand .sc-brand-th { display: block; }
.sc-header.is-collapsed .sc-nav {
	position: fixed;
	inset: var(--sc-header-h, 77px) 0 0 0;
	display: block;
	background: #fff;
	overflow-y: auto;
	padding: 12px 20px 32px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: opacity .25s ease, transform .25s ease, visibility .25s;
}
.sc-header.is-collapsed .sc-nav.is-open { opacity: 1; visibility: visible; transform: none; }
body.sc-menu-open { overflow: hidden; }
.sc-header.is-collapsed .sc-menu { flex-direction: column; align-items: stretch; gap: 0; max-width: 640px; margin: 0 auto; }
.sc-header.is-collapsed .sc-menu > li { border-bottom: 1px solid var(--sc-line); }
.sc-header.is-collapsed .sc-menu a { padding: 14px 6px; font-size: 16px !important; white-space: normal; }
.sc-header.is-collapsed .sc-menu > li > a::after { display: none; }
.sc-header.is-collapsed .sc-menu .menu-item-has-children > a::before { right: 10px; }
.sc-header.is-collapsed .sc-menu .sub-menu {
	position: static;
	display: none;
	opacity: 1;
	visibility: visible;
	transform: none;
	box-shadow: none;
	border: 0;
	margin: 0 0 10px;
	padding: 0 0 0 12px;
	background: transparent;
}
.sc-header.is-collapsed .sc-menu li.is-open > .sub-menu { display: block; }
.sc-header.is-collapsed .sc-nav-mobile-extra { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 20px; max-width: 640px; margin: 0 auto; }
@media (max-width: 600px) {
	.sc-header-inner { padding: 10px 16px; }
	.sc-brand-logo { width: 50px !important; height: 50px !important; }
	.sc-brand { gap: 10px; }
	.sc-brand .sc-brand-th { font-size: 10.5px !important; max-width: 165px; }
	.sc-actions { gap: 8px; }
	.sc-search { padding: 12px 16px; }
}
@media (max-width: 782px) { .admin-bar .sc-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .sc-header { top: 0; } }

/* ---------- Footer ---------- */
.sc-footer { background: #faf7fd; border-top: 1px solid var(--sc-line); color: var(--sc-text); margin-top: 0; }
.sc-footer-inner { max-width: var(--sc-max); margin: 0 auto; padding: 44px 24px 26px; }
.sc-footer-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.sc-footer-brand { display: flex; align-items: center; gap: 14px; }
.sc-footer-logo { width: 58px !important; height: 58px !important; object-fit: contain; }
.sc-footer .sc-footer-org { margin: 0; font-size: 16px !important; font-weight: 700; color: var(--sc-ink); }
.sc-footer .sc-footer-org-en { margin: 2px 0 0; font-size: 12.5px !important; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--sc-muted); }
.sc-footer-contact { display: flex; gap: 10px; }
.sc-footer-icon {
	display: inline-flex; align-items: center; justify-content: center;
	width: 42px; height: 42px; border-radius: 50%;
	background: #fff; border: 1px solid var(--sc-line);
	color: var(--sc-purple) !important;
	transition: background .2s ease, color .2s ease, transform .2s ease;
}
.sc-footer-icon:hover { background: var(--sc-purple); color: #fff !important; transform: translateY(-2px); }
.sc-footer-icon i { font-size: 15px !important; }
.sc-footer-links {
	display: flex; flex-wrap: wrap; gap: 6px 26px;
	margin: 28px 0 0; padding: 22px 0; border-top: 1px solid var(--sc-line); border-bottom: 1px solid var(--sc-line);
}
.sc-footer-links a { font-size: 14.5px !important; font-weight: 600; color: var(--sc-text) !important; text-decoration: none !important; }
.sc-footer-links a:hover { color: var(--sc-purple) !important; }
.sc-footer-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px 40px; flex-wrap: wrap; padding-top: 20px; }
.sc-footer .sc-footer-address { margin: 0; max-width: 720px; font-size: 13.5px !important; line-height: 1.75; color: var(--sc-muted); }
.sc-footer .sc-footer-copy { margin: 0; font-size: 13px !important; color: var(--sc-muted); }
@media (max-width: 600px) {
	.sc-footer-inner { padding: 34px 16px 22px; }
	.sc-footer-links { gap: 4px 18px; }
}

@media (prefers-reduced-motion: reduce) {
	.sc-header *, .sc-footer * { transition: none !important; }
}

/* ---------- Shared close button (popup, lightbox, …) ----------
   Frosted round button with a crisp X drawn from two bars; turns brand
   purple and rotates a quarter turn on hover. Markup:
   <button class="sc-close" aria-label="…"><span class="sc-close-x"></span></button> */
.sc-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	min-width: 0;
	padding: 0 !important;
	margin: 0;
	border-radius: 50% !important;
	border: 1px solid rgba(255, 255, 255, .35) !important;
	background: rgba(20, 12, 36, .45) !important;
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	color: #fff !important;
	box-shadow: 0 8px 24px rgba(0, 0, 0, .3) !important;
	line-height: 1;
	cursor: pointer;
	transition: background .25s ease, border-color .25s ease, transform .3s cubic-bezier(.2, .7, .2, 1), box-shadow .25s ease;
}
.sc-close-x { position: relative; display: block; width: 18px; height: 18px; }
.sc-close-x::before,
.sc-close-x::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 20px;
	height: 2px;
	margin: -1px 0 0 -10px;
	border-radius: 2px;
	background: currentColor;
	transform: rotate(45deg);
}
.sc-close-x::after { transform: rotate(-45deg); }
.sc-close:hover {
	background: var(--sc-purple) !important;
	border-color: var(--sc-purple) !important;
	box-shadow: 0 10px 28px rgba(106, 13, 173, .5) !important;
	transform: rotate(90deg);
}
.sc-close:active { transform: rotate(90deg) scale(.92); }
.sc-close:focus { outline: none; }
.sc-close:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@media (max-width: 600px) {
	.sc-close { width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
	.sc-close, .sc-close:hover, .sc-close:active { transition: none; transform: none; }
}

/* ---------- Footer legal links ---------- */
.sc-footer-legal { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.sc-footer-legal > a,
.sc-footer-legal > button { display: inline; margin: 0; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; font-size: 13px !important; font-weight: 600; color: var(--sc-purple) !important; text-decoration: underline; text-decoration-color: rgba(106, 13, 173, .3); text-underline-offset: 3px; cursor: pointer; line-height: 1.5; }
.sc-footer-legal > a:hover,
.sc-footer-legal > button:hover { text-decoration-color: currentColor; }
@media (max-width: 760px) { .sc-footer-legal { align-items: flex-start; } }

/* ---------- PDPA cookie notice ---------- */
.sc-cookie { position: fixed; left: 0; right: 0; bottom: 0; z-index: 100000; padding: 0 16px 16px; pointer-events: none; transform: translateY(110%); transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.sc-cookie.is-in { transform: none; }
.sc-cookie-inner { pointer-events: auto; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 18px; align-items: center; max-width: 1180px; margin: 0 auto; padding: 18px 22px; border-radius: 20px; background: #fff; border: 1px solid var(--sc-line); box-shadow: 0 24px 60px rgba(31, 18, 51, .22); }
.sc-cookie-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--sc-lavender); color: var(--sc-purple); font-size: 22px; }
.sc-cookie-icon i::before { font-family: "Font Awesome 6 Free" !important; font-weight: 900; }
.sc-cookie-text p { margin: 0 !important; font-size: 14px !important; line-height: 1.65 !important; color: var(--sc-text); }
.sc-cookie .sc-cookie-title { margin-bottom: 2px !important; font-size: 15.5px !important; font-weight: 800; color: var(--sc-ink); }
.sc-cookie-text a { color: var(--sc-purple) !important; font-weight: 700; text-decoration: underline !important; text-underline-offset: 3px; white-space: nowrap; }
.sc-cookie-actions { display: flex; gap: 10px; }
.sc-cookie-btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; margin: 0; padding: 0 20px !important; border: 1.5px solid #dccbf0 !important; border-radius: 999px !important; background: #fff !important; color: var(--sc-purple) !important; font-size: 14.5px !important; font-weight: 700; line-height: 1 !important; white-space: nowrap; cursor: pointer; box-shadow: none !important; transition: background .2s ease, color .2s ease, transform .2s ease; }
.sc-cookie-btn:hover { background: var(--sc-lavender) !important; }
.sc-cookie-btn.is-primary { background: var(--sc-purple) !important; border-color: var(--sc-purple) !important; color: #fff !important; }
.sc-cookie-btn.is-primary:hover { background: var(--sc-purple-deep) !important; transform: translateY(-1px); }
.sc-cookie-btn:focus-visible { outline: 3px solid rgba(106, 13, 173, .35); outline-offset: 2px; }
@media (max-width: 860px) {
	.sc-cookie { padding: 0 10px 10px; }
	.sc-cookie-inner { grid-template-columns: 40px minmax(0, 1fr); gap: 12px 14px; padding: 16px; border-radius: 18px; }
	.sc-cookie-icon { width: 40px; height: 40px; font-size: 18px; border-radius: 12px; }
	.sc-cookie-actions { grid-column: 1 / -1; }
	.sc-cookie-btn { flex: 1 1 0; padding: 0 12px !important; }
	.sc-cookie-text p { font-size: 13.5px !important; }
}

/* ---------- Policy pages (template-policy.php) ---------- */
#content.pol { padding: 0 !important; }
.pol { background: #faf7fd; color: var(--sc-text); }
.pol-wrap { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.pol-hero { padding: 40px 0 34px; background: linear-gradient(180deg, #fff 0%, #fbf8fe 100%); border-bottom: 1px solid var(--sc-line); }
.pol-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 20px; font-size: 13.5px !important; color: var(--sc-muted); }
.pol-crumbs a { color: var(--sc-muted) !important; font-weight: 600; text-decoration: none !important; }
.pol-crumbs a:hover { color: var(--sc-purple) !important; }
.pol-crumbs i { font-size: 9px !important; opacity: .6; }
.pol-crumbs span { color: var(--sc-ink); font-weight: 600; }
.pol .pol-eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 12.5px !important; font-weight: 700; letter-spacing: .14em; color: var(--sc-purple); }
.pol .pol-title { margin: 0; font-size: clamp(28px, 3.6vw, 40px) !important; font-weight: 800; line-height: 1.25; color: var(--sc-ink); }
.pol .pol-updated { margin: 10px 0 0; font-size: 14px !important; color: var(--sc-muted); }
.pol-body { padding-top: 32px; padding-bottom: 72px; }
.pol-content { padding: 32px 36px; border-radius: 22px; background: #fff; border: 1px solid var(--sc-line); }
.pol-content > :first-child { margin-top: 0 !important; }
.pol .pol-content p, .pol .pol-content li { font-size: 16px !important; line-height: 1.9; }
.pol .pol-content h2 { display: flex; align-items: center; gap: 12px; margin: 32px 0 12px; font-size: 21px !important; font-weight: 700; color: var(--sc-ink); }
.pol .pol-content h2::before { content: ""; flex-shrink: 0; width: 6px; height: 1.1em; border-radius: 4px; background: linear-gradient(180deg, #a855f7, var(--sc-purple)); }
.pol .pol-content ul { margin: 0 0 18px; padding-left: 22px; }
.pol .pol-content li { margin-bottom: 6px; }
.pol .pol-content li::marker { color: var(--sc-purple); }
.pol .pol-content table { width: 100%; margin: 6px 0 20px; border-collapse: collapse; font-size: 14.5px; }
.pol .pol-content th, .pol .pol-content td { padding: 10px 12px; border: 1px solid var(--sc-line); text-align: left; vertical-align: top; }
.pol .pol-content th { background: var(--sc-lavender); color: var(--sc-ink); font-weight: 700; }
.pol .pol-content a { color: var(--sc-purple); }
.pol-settings { margin: 22px 0 0; text-align: center; }
.pol-btn { display: inline-flex; align-items: center; gap: 9px; padding: 12px 22px !important; border: 0 !important; border-radius: 999px !important; background: var(--sc-purple) !important; color: #fff !important; font-size: 15px !important; font-weight: 700; cursor: pointer; box-shadow: none !important; }
.pol-btn:hover { background: var(--sc-purple-deep) !important; }
@media (max-width: 640px) {
	.pol-content { padding: 22px 18px; border-radius: 18px; }
	.pol .pol-content table { display: block; overflow-x: auto; }
}
