/*
Theme Name: Salient Child
Description: Child theme of Salient — carries the core-blocks layout parity CSS for the Kadence->core migration.
Template: salient
Version: 1.1.0
*/

/* --- Kadence Row Layout parity for core Group/Columns wrappers --- */
/* (measured live: Kadence rows render with 0 side padding inside Salient's container.)
   flow-root = margin containment parity: Kadence's row wrap was display:grid, so child
   margins (divider 35px, trailing heading 8px) never collapsed out of the row. */
.wp-block-group.pal-row { display: flow-root; }
/* row content max-widths (Kadence maxWidth attr) */
.pal-max-874 { max-width: 874px; margin-left: auto; margin-right: auto; }
.pal-max-900 { max-width: 900px; margin-left: auto; margin-right: auto; }
.pal-max-820 { max-width: 820px; margin-left: auto; margin-right: auto; }
.pal-max-648 { max-width: 648px; margin-left: auto; margin-right: auto; }
.pal-max-421 { max-width: 421px; margin-left: auto; margin-right: auto; }
.pal-max-422 { max-width: 422px; margin-left: auto; margin-right: auto; }
.pal-max-875 { max-width: 875px; margin-left: auto; margin-right: auto; }
/* column gutters: 30px on converted inner pages, 32px (2rem Kadence default) on Home */
.wp-block-columns.pal-cols { gap: 30px; margin-bottom: 0; }
.wp-block-columns.pal-gap-32 { gap: 32px; }
/* 6-col lineage row (1638): 6 -> 3 (<=1024) -> 1 (<=767); Kadence breakpoints */
@media (max-width: 1024px) {
  .wp-block-columns.pal-cols-6 { flex-wrap: wrap !important; }
  .wp-block-columns.pal-cols-6 > .wp-block-column { flex-basis: calc(33.333% - 20px) !important; flex-grow: 0; }
  /* 4-col cards row (Home): 4 -> 2 (<=1024) -> 1 (<=767) */
  .wp-block-columns.pal-cols-4 { flex-wrap: wrap !important; }
  .wp-block-columns.pal-cols-4 > .wp-block-column { flex-basis: calc(50% - 16px) !important; flex-grow: 0; }
}
@media (max-width: 767px) {
  .wp-block-columns.pal-cols-6 > .wp-block-column,
  .wp-block-columns.pal-cols-4 > .wp-block-column { flex-basis: 100% !important; }
}
/* core stacks at <=781px; Kadence stacked at <=767px — force the Kadence boundary */
@media (min-width: 768px) and (max-width: 781px) {
  .wp-block-columns.pal-cols:not(.pal-cols-6):not(.pal-cols-4) { flex-wrap: nowrap !important; }
  .wp-block-columns.pal-cols:not(.pal-cols-6):not(.pal-cols-4) > .wp-block-column { flex-basis: 0 !important; flex-grow: 1; }
}
/* Home hero h1: 34/30/26 per device (was Kadence per-device fontSize) */
.pal-hero-h1 { font-size: 34px; line-height: 1.5em; }
@media (max-width: 1024px) { .pal-hero-h1 { font-size: 30px; } }
@media (max-width: 767px) { .pal-hero-h1 { font-size: 26px; } }
/* Home card title links + contact links (was Kadence linkColor/linkHoverColor) */
.pal-link-dark a { color: #1c1c1c; }
.pal-link-dark a:hover { color: #17867d; }
/* Home teal CTA hover (was Kadence backgroundHover) */
.pal-btn-teal .wp-block-button__link:hover,
.pal-btn-teal .wp-block-button__link:focus { background-color: #1fb3a8 !important; color: #1c1c1c !important; }
/* was inline width:100%;height:auto on sow-image full_width imgs (invalid in core attrs) */
figure.pal-img-full img { width: 100%; height: auto; }
/* Kadence stretched aligncenter figures to the full cell width (.kt-inside-inner-col > .aligncenter) */
.wp-block-group.pal-row > .aligncenter,
.pal-cols .wp-block-column > .aligncenter { width: 100%; }
/* CJK: never let an unbroken string overflow its column */
.entry-content :where(h1, h2, h3, h4, h5, h6, p, li) { overflow-wrap: break-word; }

/* ============================================================
   DESIGN PASS 2026-08 — unified inner-page look
   (appended below the core-blocks parity CSS; everything above
    this banner is load-bearing conversion CSS — do not remove.)
   Revert: delete from this banner to end of file.
   ============================================================ */

/* --- Page-header banner: one consistent treatment ------------- */
#page-header-bg .inner-wrap h1 {
  font-size: 34px;
  line-height: 1.45;
  font-weight: 600;
  letter-spacing: .02em;
  text-shadow: 0 1px 14px rgba(0,0,0,.5);
}
/* thin teal hairline accent under the title */
#page-header-bg .inner-wrap h1::after {
  content: "";
  display: block;
  width: 56px;
  border-top: 3px solid #27CCC0;
  margin-top: 20px;
}
#page-header-bg .inner-wrap .subheader {
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: .14em;
  opacity: .85;
  margin-top: 14px;
  text-shadow: 0 1px 10px rgba(0,0,0,.5);
}
@media (max-width: 767px) {
  #page-header-bg .inner-wrap h1 { font-size: 26px; }
}

/* --- Typography & rhythm (inner-page body) -------------------- */
/* Legacy markup renders body paragraphs as h3 blocks; read them
   as calm body text — emphasis comes from the inline <b> spans. */
.container-wrap .main-content h3.wp-block-heading:not(.pal-link-dark) {
  font-size: 17px;
  line-height: 1.95;          /* CJK comfortable */
  font-weight: 400;
  color: #333;
  margin-bottom: 1.4em;
}
.container-wrap .main-content h3.wp-block-heading b,
.container-wrap .main-content h3.wp-block-heading strong { font-weight: 600; color: #1c1c1c; }
.container-wrap .main-content p {
  font-size: 16px;
  line-height: 1.9;
  color: #333;
}
/* true sub-headings (tagged during the content pass) */
.container-wrap .main-content .pal-h,
.container-wrap .main-content h3.wp-block-heading.pal-h {
  font-size: 21px;
  line-height: 1.5;
  font-weight: 600;
  color: #1c1c1c;
  margin: 2.4em 0 1em;
}
/* content links: darker teal for AA contrast on white */
.container-wrap .main-content a { color: #17867d; }
.container-wrap .main-content a:hover { color: #27CCC0; }

/* --- Section divider motif ------------------------------------ */
.container-wrap .main-content hr,
.container-wrap .main-content .wp-block-separator {
  border: 0;
  height: 1px;
  background: #e4ddd0;
  max-width: 240px;
  margin: 3em auto;
  position: relative;
  overflow: visible;
}
.container-wrap .main-content hr::after,
.container-wrap .main-content .wp-block-separator::after {
  content: "◆";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  font-size: 9px;
  line-height: 1;
  color: #c9a55c;                /* crest gold */
  background: #fff;
  padding: 0 10px;
}

/* --- Refined blockquote / pull-quote -------------------------- */
.container-wrap .main-content blockquote:not(.is-style-plain) {
  border-left: 3px solid #27CCC0;
  background: #f7faf9;
  padding: 1.4em 1.6em;
  margin: 2em 0;
  font-size: 16px;
  line-height: 1.9;
  color: #333;
}

/* --- Teaching pages: 目錄 + numbered entries ------------------ */
html { scroll-behavior: smooth; }
.pal-toc .wp-block-details {
  border: 1px solid #e4ddd0;
  border-radius: 4px;
  background: #faf9f6;
  padding: 18px 24px;
  margin-bottom: 0;
}
.pal-toc summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: .18em;
  color: #1c1c1c;
}
.pal-toc summary::marker { color: #27CCC0; }
.pal-toc .pal-toc-list {
  columns: 2;
  column-gap: 40px;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}
.container-wrap .main-content .pal-toc .pal-toc-list li {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
}
.pal-toc .pal-toc-list li {
  margin: 0 0 .55em;
  font-size: 15px;
  line-height: 1.6;
  break-inside: avoid;
}
.pal-toc .pal-toc-list a { color: #17867d; text-decoration: none; }
.pal-toc .pal-toc-list a:hover { color: #27CCC0; }
@media (max-width: 767px) { .pal-toc .pal-toc-list { columns: 1; } }
/* numbered entry headings: scannable, quiet left accent */
.container-wrap .main-content h3.wp-block-heading.pal-entry {
  font-size: 19px;
  line-height: 1.5;
  font-weight: 600;
  color: #1c1c1c;
  border-left: 3px solid #27CCC0;
  padding-left: 14px;
  margin: 2.6em 0 .9em;
  scroll-margin-top: 140px;
}

/* --- Footer --------------------------------------------------- */
#footer-outer { background-color: #1C1C1C; }
#footer-outer #footer-widgets {
  padding-top: 56px;
  padding-bottom: 36px;
  color: rgba(255,255,255,.72);
}
#footer-outer #footer-widgets p,
#footer-outer #footer-widgets li {
  font-size: 14.5px;
  line-height: 2;
  color: rgba(255,255,255,.72);
}
#footer-outer #footer-widgets h4 {
  color: #fff;
  font-size: 16px;
  letter-spacing: .1em;
  margin-bottom: 1.1em;
  padding-bottom: .8em;
  position: relative;
}
#footer-outer #footer-widgets h4::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 28px;
  border-top: 2px solid #27CCC0;
}
#footer-outer #footer-widgets a { color: rgba(255,255,255,.72); }
#footer-outer #footer-widgets a:hover { color: #27CCC0; }
#footer-outer .pal-footer-nav { list-style: none; margin: 0; padding: 0; }
#footer-outer .pal-footer-en { opacity: .85; letter-spacing: .02em; }
#footer-outer .pal-dedication { line-height: 2.3; }
#footer-outer #copyright p { color: rgba(255,255,255,.5); }
@media (max-width: 767px) {
  #footer-outer #footer-widgets .col { margin-bottom: 28px; }
}
