/* Intercultural 360 - pillar pages as app-like hubs (/pillars/work.html, /pillars/psychology.html).
   Builds on /assets/app-hub.css (tiles, panels, strip) and /assets/country-hub.css (compact header,
   "At a glance", collapsible steps). Behaviour: /assets/work-hub.js, /assets/psych-hub.js. */

/* pages with their own global nav/h2 rules: keep the hub's own spacing */
#hub-grid { padding: 0; }
.pl-hub { padding-bottom: 8px; }

/* header: small fact chips and the route chip with flags */
.pl-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; padding: 0; }
.pl-facts li { font-size: 12px; font-weight: 600; color: rgba(255,255,255,.88); background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 3px 10px; }
.ch-head .hub-chip-loc .ch-flag { box-shadow: 0 0 0 1px #e2e8f0; }
.ch-head .hub-chip-loc > span[aria-hidden] { color: #64748b; }
.ch-route-menu button.ch-route-link { font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.ch-route-link[aria-current="true"] { background: #fff; color: #0F6E56; }

/* a group with a single tile: a small inline card instead of a full row (like "Help") */
.hub-one { display: flex; align-items: center; gap: 14px; }
.hub-one .hub-group-title { margin: 0; flex: 1; }
.hub-one .hub-tiles { display: flex; }
.hub-one .hub-tile { width: 92px; }
@media (min-width: 768px) {
  .hub-one { width: auto; }
  .hub-one .hub-group-title { flex: 0 0 170px; }
  .hub-one .hub-tile { width: 104px; }
}

/* collapsible country cards (work: job boards, freelance, diploma) */
.pl-card.is-collapsed::after { background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.95)); }
.pl-card.bg-teal-50.is-collapsed::after { background: linear-gradient(rgba(240,253,250,0), rgba(240,253,250,.95)); }
.pl-card { border-radius: 12px; }

/* ── psychology: calm colours, compact sections inside panels ── */
.ps-head { background: linear-gradient(135deg, #1e4a55 0%, #2C5F6E 50%, #4A7C6F 100%); }
.ps-head .ch-title { font-family: 'Playfair Display', serif; font-weight: 700; }
.ps-page .ch-sub, .ps-page .ch-crumb { line-height: 1.5; }
.ps-page .ch-stat { font-family: 'Inter', sans-serif; line-height: 1.4; }
.ps-page .ch-stat-label svg, .ps-page .ch-stat:hover { color: #4A7C6F; }
.ps-page .hub-group-title { font-family: 'Inter', sans-serif; line-height: 1.4; }
/* five tiles in four groups: two groups per row on desktop */
@media (min-width: 1024px) {
  .ps-page #hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
  .ps-page #hub-grid .hub-group { width: auto; }
}
/* crisis numbers: always visible, never inside a panel */
.ps-crisis { margin-top: 10px; }
.ps-crisis .crisis-box { max-width: none; padding: 10px 12px; gap: 10px; }
.ps-panel .inner { padding: 32px 20px; }
.ps-panel .section-intro { margin-bottom: 28px; }
.ps-panel .quiz-inner { padding: 40px 20px; }
@media (min-width: 768px) { .ps-panel .inner { padding: 44px 40px; } }
/* the stage the user is in */
.phase.is-current .phase-card { outline: 2px solid #4A7C6F; outline-offset: 2px; }
.phase.is-current .phase-dur::after { content: " · you are here"; color: #2C5F6E; }
/* research numbers (were on the dark hero) on a light background */
.ps-research-title { text-align: center; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.ps-research .hero-stats { background: var(--cream, #FAF8F5); border-color: #E8EDEB; flex-wrap: wrap; }
.ps-research .hstat { border-right-color: #E8EDEB; flex: 1 1 45%; }
.ps-research .hstat-num { color: #2C5F6E; }
.ps-research .hstat-lab { color: #5A6A6A; }
.ps-research .hero-sources { color: #5A6A6A; text-align: center; }
@media (min-width: 768px) { .ps-research .hstat { flex: 1; } }
/* crisis card lines: one per service, numbers as large tap targets; the destination's line first */
.ps-crisis .crisis-content { flex: 1; min-width: 0; }
.ps-crisis .crisis-content h4 { font-size: 15px; margin-bottom: 2px; }
.crisis-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.crisis-lines li { font-size: 13px; line-height: 1.3; color: #6B2323; padding: 1px 0; }
.crisis-lines a { color: var(--danger, #C0392B); font-weight: 700; }
.crisis-lines .crisis-num { display: inline-flex; align-items: center; min-height: 36px; padding: 0 9px; margin: 0; border-radius: 999px; background: #fff; border: 1px solid rgba(192,57,43,.3); text-decoration: none; white-space: nowrap; font-size: 14px; }
.crisis-lines .crisis-note { font-size: 12px; color: #8a4a4a; }

/* ── language (/language/): self-study cards, panel titles ── */
.ln-body { padding-top: 4px; }
.ln-panel-title { font-size: 1.5rem; font-weight: 700; color: #0f172a; margin: 8px 0 14px; }
.ln-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 14px 16px; }
.ln-card > h3 { padding-right: 8px; }
/* an open card: only the chevron closes it, so the card's own selects stay usable */
.ln-card:not(.is-collapsed) > .ch-step-toggle { left: auto; width: 44px; height: 44px; padding: 12px; }
.ln-research { color: #fff; }

/* ── checklist (/checklist.html): header progress, chapter cards ── */
.cl-route { cursor: default; }
.cl-progress { margin-top: 12px; max-width: 30rem; }
.cl-progress-row { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; font-weight: 600; color: rgba(255,255,255,.85); }
.cl-progress-row #progress-label { color: #fff; font-weight: 800; }
.cl-progress-track { height: 8px; margin-top: 6px; border-radius: 999px; background: rgba(255,255,255,.22); overflow: hidden; }
.cl-progress-track > div { height: 100%; border-radius: 999px; background: #5eead4; }
.cl-progress #progress-sub { margin: 6px 0 0; font-size: 12px; color: rgba(255,255,255,.75); }
.cl-moveplan { margin: 0 0 10px; font-size: 13px; color: #475569; }
.cl-moveplan a { color: #0F6E56; font-weight: 700; text-decoration: none; white-space: nowrap; }
.cl-moveplan a:hover { text-decoration: underline; }
.cl-glance .cl-next { grid-column: 1 / -1; min-height: 0; }
@media (min-width: 768px) { .cl-glance { grid-template-columns: 2fr 1fr 1fr; } .cl-glance .cl-next { grid-column: auto; } }
.cl-chapter { margin-bottom: 8px !important; padding-right: 0 !important; }
.cl-chapter .cl-head { padding-right: 48px; }
.cl-chapter .cl-head .ml-auto { flex-shrink: 0; }
.cl-count { margin: 2px 0 0; font-size: 11px; font-weight: 700; color: #0F6E56; }
.cl-chapter > .ch-step-toggle { padding-top: 22px; }
/* a locked chapter: the unlock button sits below the chapter header, hidden while collapsed */
.cl-chapter .lock-overlay { top: var(--ch-peek, 76px); }
.cl-chapter.is-collapsed .lock-overlay { display: none; }
.cl-chapter.is-collapsed::after { border-radius: 0 0 16px 16px; }
@media print { .cl-hub, .cl-moveplan { display: none !important; } }
/* the page rounds every button into a pill: not the glance cards */
.cl-hub .ch-stat, .cl-chapter > .ch-step-toggle { border-radius: 16px !important; }
/* a closed chapter: title + count only */
.cl-chapter.is-collapsed .cl-head { padding-top: 10px; padding-bottom: 10px; }
.cl-chapter.is-collapsed .cl-head p:not(.cl-count), .cl-chapter.is-collapsed .cl-head .ml-auto { display: none; }
.cl-chapter.is-collapsed > .ch-step-toggle { padding-top: 0; align-items: center; }
#chapters + section { margin-top: 8px !important; }
/* language: three tile groups, two per row on desktop */
@media (min-width: 1024px) {
  .ln-hub #hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
  .ln-hub #hub-grid .hub-group { width: auto; }
}
.cl-item { cursor: pointer; }
/* home & living: area panels with collapsible cards */
.hl-body { padding-top: 4px; }
.hl-panel .book-area-header { margin-bottom: 16px; }
.hl-panel .hl-cards > * + * { margin-top: 10px !important; }
.hl-card { border-radius: 16px !important; padding: 14px 16px !important; background: #fff; border: 1px solid #e2e8f0; box-shadow: none; }
.hl-card h3 { padding-right: 8px; }
.hl-card:not(.is-collapsed) > .ch-step-toggle { left: auto; width: 44px; height: 44px; padding: 12px; }
.hl-route { cursor: default; }
@media (min-width: 1024px) {
  .hl-hub #hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
  .hl-hub #hub-grid .hub-group { width: auto; }
  /* four journey tiles take the full row; Tools and Help share the next one */
  .hl-hub #hub-grid .hub-g-plan { grid-column: 1 / -1; }
  .hl-hub #hub-grid .hub-g-near .hub-group-title, .hl-hub #hub-grid .hub-g-tips .hub-group-title { flex: 0 0 auto; min-width: 64px; }
  .hl-hub #hub-grid .hub-g-tips .hub-tiles { gap: 16px; }
}
/* ── PetMate (/pet-care.html): the page's own sections inside the panels ── */
.pm-body { padding-top: 4px; padding-bottom: 24px; }
.pm-route { cursor: pointer; }
.pm-panel > * + * { margin-top: 16px; }
.pm-panel h2.text-3xl { font-size: 1.5rem; line-height: 1.3; }
.pm-panel .mb-12, .pm-panel .mb-14 { margin-bottom: 20px; }
.pm-panel .gap-12 { gap: 24px; }
.pm-panel .py-20 { padding-top: 0; padding-bottom: 0; }
.pm-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 14px 16px; }
.pm-card > .text-center:first-child { text-align: left; }
.pm-card > .text-center:first-child .mx-auto { margin-left: 0; }
.pm-card.is-collapsed .text-center:first-child { margin-bottom: 0; }
.pm-card:not(.is-collapsed) > .ch-step-toggle { left: auto; width: 44px; height: 44px; padding: 12px; }
.pm-band { border-radius: 20px; padding: 32px 20px; overflow: hidden; }
.pm-final { padding: 24px 16px; }
.pm-final .text-5xl { font-size: 2.25rem; margin-bottom: 12px; }
@media (min-width: 1024px) {
  .pm-hub #hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 12px; }
  .pm-hub #hub-grid .hub-group { width: auto; }
}
/* ── guides library (/guides/): search, chips, country sections, compact cards (/assets/guides-hub.js) ── */
.gd-head { padding: 12px 0 14px; }
.gd-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
@media (max-width: 767.98px) { .gd-crumb { display: none; } }
.gd-count { flex-shrink: 0; font-size: 12px; font-weight: 700; color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: 2px 10px; }
.gd-count[hidden] { display: none; }
.gd-head .ch-sub { margin-top: 4px; font-size: 13px; line-height: 1.4; }
.gd-wrap { padding-top: 10px; padding-bottom: 32px; }
.gd-search { position: relative; }
.gd-search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: #64748b; pointer-events: none; }
.gd-search input { width: 100%; box-sizing: border-box; height: 44px; padding: 0 14px 0 42px; border: 1px solid #cbd5e1; border-radius: 999px; background: #fff; font: inherit; font-size: 16px; color: #0f172a; }
.gd-search input:focus { outline: none; border-color: #0F6E56; box-shadow: 0 0 0 3px rgba(15,110,86,.15); }
#filter-bar.gd-chips { flex-wrap: nowrap; overflow-x: auto; margin: 8px -16px 4px; padding: 2px 16px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
#filter-bar.gd-chips::-webkit-scrollbar { display: none; }
.gd-chips .filter-pill { flex-shrink: 0; min-height: 36px; white-space: nowrap; font-family: inherit; }
.gd-chips .pill-count { opacity: 1; }   /* the count's 75% opacity was below 4.5:1 */
#guide-grid .guide-card p.text-slate-400 { color: #64748b; }
#gd-library > p.text-slate-400, #no-results.text-slate-400 { color: #64748b; }
.gd-chips .gd-flag { width: 18px; height: 13px; box-shadow: 0 0 0 1px #e2e8f0; }
.gd-chip-sep { flex: 0 0 1px; align-self: stretch; margin: 4px 2px; background: #cbd5e1; }
@media (min-width: 1024px) { #filter-bar.gd-chips { flex-wrap: wrap; overflow: visible; margin: 12px 0 8px; padding: 0; } }
/* cards */
#guide-grid.gd-grouped { display: block; }
.gd-group + .gd-group { margin-top: 8px; }
.gd-group[hidden], .gd-group-body[hidden], #guide-grid a.guide-card[hidden] { display: none !important; }
.gd-group-title { margin: 0; font-size: inherit; }
.gd-group-head { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 6px 14px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; font: inherit; font-size: 15px; font-weight: 800; color: #0f172a; cursor: pointer; text-align: left; -webkit-tap-highlight-color: transparent; }
.gd-group-head .gd-flag { box-shadow: 0 0 0 1px #e2e8f0; }
.gd-group-name { flex: 1; min-width: 0; }
.gd-group-count { font-size: 12px; font-weight: 700; color: #0F6E56; background: #e6f4ef; border-radius: 999px; padding: 1px 8px; }
.gd-group-head svg { width: 18px; height: 18px; color: #64748b; transition: transform .2s ease; }
.gd-group-head[aria-expanded="true"] svg { transform: rotate(180deg); }
.gd-group-head:focus-visible { outline: 3px solid #5eead4; outline-offset: 2px; }
.gd-group-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 8px; }
.gd-flat .gd-group-title { display: none; }
.gd-flat .gd-group-body { margin-top: 0; }
.gd-flat .gd-group + .gd-group { margin-top: 8px; }
@media (min-width: 768px) { .gd-group-body { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
@media (min-width: 1024px) { .gd-group-body { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
#guide-grid a.guide-card { position: relative; padding: 10px 14px 12px; border-radius: 14px; }
.gd-meta { display: flex; align-items: center; gap: 8px; min-height: 16px; margin-bottom: 4px; }
.gd-topic { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #0F6E56; }
#guide-grid a.guide-card h2 { font-size: 15px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#guide-grid a.guide-card h2 + p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; margin-top: 4px; }
#guide-grid a.guide-card > p.text-xs, #guide-grid a.guide-card > span.inline-flex { margin-top: 6px; }
@media (max-width: 767.98px) {
  #guide-grid a.guide-card h2 + p, #guide-grid a.guide-card > span.inline-flex { display: none; }
  /* the "Updated" date sits on the flag / topic row */
  #guide-grid a.guide-card > p.text-xs { position: absolute; top: 10px; right: 14px; margin: 0; line-height: 16px; }
}
/* ── insights (/insights.html): country photo behind the header, country menu, category panels + sidebar ── */
.in-head { position: relative; overflow: hidden; }
/* #hero is the page's own photo layer (renderPage sets its background image) */
.in-head #hero.in-head-bg { position: absolute; inset: 0; margin: 0 !important; background-size: cover; background-position: center; }
.in-head::after { content: ""; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(10,74,58,.94) 0%, rgba(15,110,86,.86) 55%, rgba(20,150,122,.78) 100%); }
.in-head > .ch-wrap { position: relative; z-index: 1; }
.in-countries { display: flex; flex-wrap: wrap; gap: 8px; }
.in-countries .country-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; }
.in-countries .country-btn[aria-current="true"] { background: #fff; color: #0F6E56; }
.in-body { padding-top: 4px; padding-bottom: 24px; }
.in-panel:focus { outline: none; }
.in-panel .category-section { display: block; }
.in-panel .info-card { padding: 14px 16px; border-radius: 16px; }
.in-panel .info-card:hover { transform: none; }
.in-card.is-collapsed { cursor: pointer; }
.in-card:not(.is-collapsed) > .ch-step-toggle { left: auto; width: 44px; height: 44px; padding: 12px; }
.in-panel .space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 10px; }
.in-side.hub-panel:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.in-side.hub-panel > * { margin: 0 !important; }
@media (min-width: 768px) { .in-side.hub-panel:not([hidden]) { grid-template-columns: repeat(2, minmax(0, 1fr)); } .in-side.hub-panel > :first-child { grid-row: span 2; } }
@media (max-width: 767.98px) {
  .in-side #sidebar-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }
  .in-side .quick-fact { flex-wrap: wrap; gap: 2px 8px; padding: 6px 0; }
  .in-side .quick-fact .ml-auto { margin-left: 0; text-align: left; width: 100%; }
}
/* insights: four tiles per group, so the groups keep the full width on desktop (like Work) */
