/* ITIHAAS inner pages: shared kit. Loaded after home.css on every page except the home page.
   Tokens (--p --m --pk --lav --tint --ivory --ink --serif --ease --h2) come from home.css / header.css.
   Prefix pg-. Each template adds its own file in assets/css/pages/<name>.css for anything page-specific. */

/* ---- hero (reuses .hx-hero from home.css) ---- */
.pg-title { margin: 0 0 1.5rem; font-weight: 800; }
.pg-word { display: block; font-size: clamp(2.8rem, 8.2vw, 7rem); font-weight: 800; line-height: 0.97; letter-spacing: -0.05em; color: #fff; }
.pg-word--grad .hx-word__in { background: linear-gradient(110deg, var(--m), var(--p) 70%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; padding-right: 0.06em; }
.pg-hero .hx-hero__text { max-width: 34rem; }
.pg-chips { gap: 0.6rem; }
.pg-chip--link { text-decoration: none; transition: background 0.3s, border-color 0.3s, color 0.3s; }
.pg-chip--link:hover, .pg-chip--link:focus-visible { background: rgba(255, 255, 255, 0.16); border-color: rgba(252, 215, 255, 0.6); color: #fff; }
.pg-chip__svg { width: 1rem; height: 1rem; flex: 0 0 auto; }
.pg-chip { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.55rem 1rem; border: 1px solid rgba(252, 215, 255, 0.25); border-radius: 999px; background: rgba(255, 255, 255, 0.05); font-size: 0.74rem; font-weight: 600; color: var(--tint); }
.pg-hero--text .hx-hero__inner { grid-template-columns: 1fr; }
.pg-hero--text { min-height: 78vh; min-height: 78svh; }
/* Banner hero: every inner page. Shorter than the home hero, photo runs full width under a plum wash, copy sits bottom-left. */
body .pg-hero--banner { min-height: 62vh; min-height: 62svh; align-items: flex-end; padding: calc(var(--header-top) + 7rem) 0 4.5rem; }
body .pg-hero--banner.pg-hero--text { min-height: 48vh; min-height: 48svh; }
body .pg-hero--banner .hx-hero__inner { grid-template-columns: 1fr; width: 100%; }
body .pg-hero--banner .hx-hero__copy { max-width: 56rem; }
body .pg-hero--banner .pg-word { font-size: clamp(2.4rem, 5.4vw, 5rem); white-space: nowrap; }
.pg-hero__photo { position: absolute; inset: -6% 0; background-size: cover; background-position: center; filter: none; transform: scale(1.04); }
.pg-hero--banner .hx-hero__bg { background: linear-gradient(180deg, #1c101d, #150b16); }
.pg-hero--banner .hx-hero__bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(95deg, rgba(28, 12, 34, 0.94) 0%, rgba(78, 18, 98, 0.72) 48%, rgba(116, 21, 143, 0.35) 100%), linear-gradient(0deg, rgba(21, 11, 22, 0.85), transparent 45%); }
.pg-hero--banner .pg-word--grad .hx-word__in { background-image: linear-gradient(110deg, var(--pk), #e9a6ff 80%); }
.pg-hero--banner .hx-orb,.pg-hero--banner .hx-grid { z-index: 1; }
.pg-hero--banner .hx-hero__lead { max-width: 40rem; }
@media (min-width: 1024px) {
  body .pg-hero--banner .hx-hero__copy { max-width: none; }
  body .pg-hero--banner .hx-hero__cta.pg-chips { flex-wrap: nowrap; flex-direction: row; align-items: center; }
  body .pg-hero--banner .pg-chip, body .pg-hero--banner .hx-hero__cta .hx-btn { white-space: nowrap; flex: 0 0 auto; }
}
.pg-crumb { display: flex; align-items: center; gap: 0.6rem; margin: 0 0 1.1rem; font-size: 0.68rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(252, 215, 255, 0.7); }
.pg-crumb a { color: var(--tint); text-decoration: none; transition: color 0.3s var(--ease); }
.pg-crumb a:hover { color: var(--pk); }
.pg-crumb b { font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60vw; }
.pg-crumb span { opacity: 0.5; }
@media (max-width: 639px) {
  body .pg-hero--banner { min-height: 0; padding: calc(var(--header-top) + 5.5rem) 0 3rem; }
  body .pg-hero--banner .pg-word { font-size: clamp(1.9rem, 8.6vw, 2.8rem); white-space: normal; }
}
@media (max-width: 639px) {
  .pg-chip { font-size: 0.68rem; }
  .hx-hero__cta.pg-chips { flex-direction: row; flex-wrap: wrap; }
  .hx-hero__cta.pg-chips .hx-btn { width: 100%; }
}

/* ---- section shell ---- */
.pg-sec { position: relative; padding: 8rem 0; overflow: clip; }
.pg-sec--ivory { background: var(--ivory); }
.pg-sec--lav { background: #f7f2f8; }
.pg-sec--white { background: #fff; }
.pg-sec--dark { background: linear-gradient(180deg, #150b16 0%, #2c0b36 100%); color: #fff; }
.pg-sec--purple { background: linear-gradient(165deg, #55006c 0%, #2c0b36 55%, #1c101d 100%); color: #fff; }
.pg-head { max-width: none; margin-bottom: 3.5rem; }
.pg-head--center { max-width: 52rem; margin-left: auto; margin-right: auto; text-align: center; }
.pg-head--center .hx-kicker { justify-content: center; }
.pg-head--center .hx-lead { margin-left: auto; margin-right: auto; }
.pg-split { display: grid; gap: 3rem; align-items: center; }
/* No photo beside the text: let the text use the full width instead of a half-empty column. */
@media (min-width: 1024px) { .pg-split:has(> :only-child) { grid-template-columns: 1fr; } }
@media (min-width: 1024px) { .pg-split { grid-template-columns: 1fr 1fr; gap: 5rem; } .pg-split--wide-text { grid-template-columns: 1.15fr 0.85fr; } .pg-split--rev > :first-child { order: 2; } }
.pg-stack > * + * { margin-top: 1.3rem; }
.pg-sec .hx-lead { max-width: none; }

/* ---- grids ---- */
.pg-grid { display: grid; gap: 1.3rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .pg-grid--2, .pg-grid--3, .pg-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .pg-grid--3 { grid-template-columns: repeat(3, 1fr); } .pg-grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* ---- cards ---- */
.pg-card { position: relative; display: flex; flex-direction: column; gap: 0.9rem; padding: 1.8rem; border: 1px solid var(--lav); border-radius: 1.5rem; background: #fff; transition: transform 0.55s var(--ease), box-shadow 0.55s, border-color 0.4s; }
.pg-card:hover { transform: translateY(-8px); border-color: var(--p); box-shadow: 0 28px 50px -30px rgba(116, 21, 143, 0.6); }
.pg-card h3 { margin: 0; font-size: 1.25rem; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
.pg-card p { margin: 0; font-size: 0.92rem; line-height: 1.7; color: rgba(32, 26, 32, 0.7); }
.pg-card__ico { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: linear-gradient(135deg, var(--m), var(--p)); color: #fff; }
.pg-card--glass { border-color: rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.07); backdrop-filter: blur(10px); color: #fff; }
.pg-card--glass h3 { color: #fff; }
.pg-card--glass p { color: rgba(232, 217, 234, 0.82); }
.pg-card--glass:hover { border-color: rgba(255, 255, 255, 0.4); box-shadow: none; }
.pg-card--grad { background: linear-gradient(135deg, var(--p), #3b0a49); border-color: rgba(255, 255, 255, 0.14); color: #fff; }
.pg-card--grad h3 { color: #fff; }
.pg-card--grad p { color: rgba(255, 255, 255, 0.82); }
.pg-num { font-size: 3.4rem; font-weight: 800; line-height: 1; letter-spacing: -0.05em; background: linear-gradient(110deg, var(--m), var(--p) 70%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.pg-tag { align-self: flex-start; padding: 0.3rem 0.75rem; border-radius: 999px; background: var(--tint); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #55006c; }
.pg-card--glass .pg-tag, .pg-card--grad .pg-tag { background: rgba(255, 255, 255, 0.16); color: #fff; }

/* ---- media ---- */
.pg-media { position: relative; overflow: hidden; border-radius: 1.6rem; background: var(--pd, #55006c); box-shadow: 0 30px 60px -30px rgba(40, 8, 52, 0.6); }
.pg-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease); }
.pg-media:hover img { transform: scale(1.04); }
.pg-media--arch { border-radius: 999px 999px 1.4rem 1.4rem; }
.pg-media--45 { aspect-ratio: 4 / 5; }
.pg-media--43 { aspect-ratio: 4 / 3; }
.pg-media--169 { aspect-ratio: 16 / 10; }

/* ---- quote, list, steps ---- */
.pg-quote { position: relative; margin: 1.6rem 0; padding-left: 1.4rem; border-left: 3px solid var(--m); font-family: var(--serif); font-size: clamp(1.4rem, 2.4vw, 2rem); font-style: italic; line-height: 1.3; color: var(--ink); }
.pg-sec--dark .pg-quote, .pg-sec--purple .pg-quote { color: #fff; }
.pg-list { margin: 0; padding: 0; list-style: none; }
.pg-list li { display: flex; gap: 0.8rem; padding: 0.85rem 0; border-bottom: 1px solid rgba(116, 21, 143, 0.14); font-size: 0.95rem; line-height: 1.6; }
.pg-list li::before { content: '✦'; flex: 0 0 auto; color: var(--m); }
.pg-sec--dark .pg-list li, .pg-sec--purple .pg-list li { border-color: rgba(255, 255, 255, 0.14); }

/* ---- chapter nav (sticky pills) ---- */
.pg-nav { position: sticky; top: calc(var(--header-top) + 0.6rem); z-index: 30; display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; width: fit-content; max-width: 100%; margin: 0 auto 3rem; padding: 0.35rem; border-radius: 999px; background: rgba(250, 248, 245, 0.92); backdrop-filter: blur(14px); box-shadow: 0 14px 34px -18px rgba(28, 16, 29, 0.5); }
.pg-nav a { padding: 0.5rem 1rem; border-radius: 999px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); text-decoration: none; transition: background 0.3s, color 0.3s; }
.pg-nav a:hover, .pg-nav a.is-active { background: linear-gradient(110deg, var(--m), var(--p) 70%); color: #fff; }

/* ---- generic copy pages (page.php, single.php) ---- */
.pg-prose { max-width: 46rem; margin: 0 auto; font-size: 1.05rem; line-height: 1.85; color: rgba(32, 26, 32, 0.82); }
.pg-prose h2, .pg-prose h3 { margin: 2.2rem 0 0.8rem; font-weight: 500; letter-spacing: -0.02em; color: var(--ink); }
.pg-prose a { color: var(--p); text-decoration: underline; text-underline-offset: 3px; }
.pg-prose img { max-width: 100%; height: auto; border-radius: 1.2rem; }

/* ---- forms (Gravity Forms and the theme fallback) ---- */
.pg-form input[type='text'], .pg-form input[type='email'], .pg-form input[type='tel'], .pg-form input[type='url'], .pg-form select, .pg-form textarea { width: 100%; box-sizing: border-box; padding: 0.95rem 1.1rem; border: 1px solid var(--lav); border-radius: 0.9rem; background: #fff; font: inherit; font-size: 0.95rem; color: var(--ink); transition: border-color 0.3s, box-shadow 0.3s; }
.pg-form input:focus, .pg-form select:focus, .pg-form textarea:focus { outline: none; border-color: var(--p); box-shadow: 0 0 0 4px rgba(116, 21, 143, 0.12); }
.pg-form label, .pg-form .gfield_label { display: block; margin-bottom: 0.45rem; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: rgba(32, 26, 32, 0.75); }
.pg-form input[type='submit'], .pg-form button[type='submit'], .pg-form .gform_button { min-height: 3rem; padding: 0 1.8rem; border: 0; border-radius: 999px; background: linear-gradient(110deg, var(--m), var(--p) 70%); color: #fff; font: inherit; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; cursor: pointer; box-shadow: 0 10px 30px -10px rgba(194, 24, 115, 0.7); transition: transform 0.35s var(--ease); }
.pg-form input[type='submit']:hover, .pg-form button[type='submit']:hover { transform: translateY(-3px); }

/* ---- mobile rhythm ---- */
@media (max-width: 639px) {
  .pg-sec { padding: 3.5rem 0; }
  .pg-head { margin-bottom: 2rem; }
  .pg-split { gap: 2rem; }
  .pg-card { padding: 1.3rem; }
  .pg-num { font-size: 2.6rem; }
  .pg-nav { position: static; border-radius: 1.2rem; }
}

/* ---- sticky sub-navs (Tourism chapters, Events chapters, Classrooms filter): a full-width bar pinned directly under the header.
   The header is 4rem + 1px once scrolled, and slides away on scroll down (.hx-hide), so the bar follows it up to the top. ---- */
html, body { overflow-x: clip; }
body .pg-nav.tp-nav, body .ev-navwrap, body .cl-bar { --bar-top: calc(4rem + 1px); position: sticky; top: var(--bar-top); z-index: 35; transition: top 0.6s var(--ease); }
body:has(#main-header.hx-hide) .pg-nav.tp-nav, body:has(#main-header.hx-hide) .ev-navwrap, body:has(#main-header.hx-hide) .cl-bar { top: 0; }
body .pg-nav.tp-nav, body .ev-navwrap { width: 100%; max-width: none; margin: 0; padding: 0.55rem 1rem; border-radius: 0; background: rgba(250, 248, 245, 0.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid rgba(116, 21, 143, 0.12); box-shadow: 0 10px 24px -18px rgba(28, 16, 29, 0.45); pointer-events: auto; }
body .pg-nav.tp-nav { justify-content: center; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
body .pg-nav.tp-nav::-webkit-scrollbar { display: none; }
body .ev-navwrap { display: flex; justify-content: center; }
body .ev-navwrap .ev-nav { width: auto; max-width: 100%; margin: 0; padding: 0; background: none; box-shadow: none; backdrop-filter: none; position: static; border-radius: 0; justify-content: center; }
body .cl-bar { width: 100%; max-width: none; margin: 0 0 1rem; padding: 0.55rem 1.5rem; border-radius: 0; background: rgba(250, 248, 245, 0.96); border-bottom: 1px solid rgba(116, 21, 143, 0.12); box-shadow: 0 10px 24px -18px rgba(28, 16, 29, 0.45); }
@media (min-width: 768px) { body .cl-bar { padding-inline: 3rem; } }
@media (max-width: 767px) {
  body .pg-nav.tp-nav, body .ev-navwrap { justify-content: flex-start; padding: 0.5rem 0.8rem; margin: 0; border-radius: 0; width: 100%; }
  body .ev-navwrap { overflow-x: auto; scrollbar-width: none; }
  body .ev-navwrap::-webkit-scrollbar { display: none; }
  body .ev-navwrap .ev-nav { flex-wrap: nowrap; overflow: visible; }
  body .cl-bar { position: sticky; border-radius: 0; flex-wrap: nowrap; overflow: hidden; padding: 0.5rem 0.8rem; }
  body .cl-counter { display: none; }
}

/* ---- numbered chapter nav (Tourism Praxis, Heritage Education): main.js (initChapterNav) adds .text-primary to the link of the section in view ---- */
/* chapter nav: main.js (initChapterNav) adds .text-primary to the link of the section in view */
.tp-nav { margin-top: 1.4rem; margin-bottom: 0; }
.tp-nav a { display: inline-flex; align-items: center; gap: 0.5rem; white-space: nowrap; }
.tp-nav a b { font-size: 0.66rem; font-weight: 800; letter-spacing: 0.12em; color: var(--m); }
.tp-nav a:hover b, .tp-nav a.text-primary b { color: #fff; }
.tp-nav a.text-primary { background: linear-gradient(110deg, var(--m), var(--p) 70%); color: #fff; }
@media (max-width: 639px) { .tp-nav { position: sticky; top: calc(var(--header-top) + 0.4rem); flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; width: auto; margin: 1rem 1rem 0; border-radius: 999px; scrollbar-width: none; } .tp-nav::-webkit-scrollbar { display: none; } }
#chapters-nav { scroll-margin-top: 6rem; }


/* ---- section headings on every inner page: pink-to-purple gradient text (lighter on dark sections), medium weight ---- */
main .hx-h2 .hx-w > i { padding-bottom: 0.1em; background: linear-gradient(100deg, var(--m) 0%, var(--p) 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
main .hx-h2--light .hx-w > i { background: linear-gradient(100deg, #ff7ac0 0%, #e9a6ff 60%, #ffffff 120%); -webkit-background-clip: text; background-clip: text; }
main .hx-h2 { font-weight: 600; }
