/* LiteSite — public website styles. Colours and fonts come from the theme variables set by the admin area. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-size: var(--base-size); line-height: 1.65;
  overflow-x: clip; min-height: 100vh; display: flex; flex-direction: column;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--primary-dark); }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.2; margin: 1.4em 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--primary); color: var(--primary-text); padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }

/* ---------- admin bar (only when logged in) ---------- */
.ls-adminbar { background: #111827; color: #e5e7eb; font: 13px/1 system-ui, sans-serif; display: flex; gap: 18px; align-items: center; padding: 0 16px; height: 34px; position: relative; z-index: 60; }
.ls-adminbar a { color: #e5e7eb; text-decoration: none; }
.ls-adminbar a:hover { color: #fff; text-decoration: underline; }
.ls-adminbar .ls-draft { background: #f59e0b; color: #111; padding: 4px 8px; border-radius: 4px; font-weight: 600; }

/* ---------- header ---------- */
.announcement { background: var(--accent); color: var(--accent-text); text-align: center; font-size: .9rem; padding: 8px 16px; font-weight: 600; }
.site-header { background: var(--header-bg); color: var(--header-text); border-bottom: 1px solid var(--header-border); z-index: 50; }
.site-header.sticky { position: sticky; top: 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 72px; }
.hl-center .header-inner { flex-direction: column; justify-content: center; gap: 6px; padding-top: 18px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand:hover { color: inherit; }
.brand .logo { width: auto; }
.brand-text { display: flex; flex-direction: column; }
.site-title { font-family: var(--font-heading); font-weight: 700; font-size: 1.25rem; line-height: 1.2; }
.site-tagline { font-size: .82rem; opacity: .75; }
.site-nav .menu { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; margin: 0; padding: 0; }
.site-nav li { position: relative; display: flex; align-items: center; }
.site-nav a { color: inherit; text-decoration: none; padding: 10px 14px; border-radius: calc(var(--radius) * .7); font-weight: 500; display: block; }
.site-nav a:hover, .site-nav li.active > a { background: color-mix(in srgb, currentColor 9%, transparent); }
.site-nav li.active > a { font-weight: 650; }
.site-nav .sub-toggle { display: none; }
.site-nav .has-sub > a::after { content: ''; display: inline-block; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-3px); margin-left: 8px; opacity: .7; }
.site-nav .sub { list-style: none; margin: 0; padding: 8px; position: absolute; left: 0; top: 100%; min-width: 220px; background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(15, 23, 42, .14); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s ease; z-index: 70; flex-direction: column; display: flex; }
.site-nav .has-sub:hover > .sub, .site-nav .has-sub:focus-within > .sub { opacity: 1; visibility: visible; transform: none; }
.site-nav .sub li { display: block; }
.site-nav .sub a { padding: 8px 12px; }
.nav-toggle { display: none; background: none; border: 0; color: inherit; width: 44px; height: 44px; padding: 10px; cursor: pointer; border-radius: 8px; }
.nav-toggle span { display: block; height: 2px; background: currentColor; margin: 5px 0; border-radius: 2px; transition: .2s; }

/* ---------- search ---------- */
.search-form { display: flex; align-items: center; position: relative; }
.search-form input[type="search"] { font: inherit; font-size: .92rem; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 999px;
  height: 40px; padding: 0 42px 0 16px; width: 100%; min-width: 0; outline: none; transition: border-color .15s, box-shadow .15s, width .2s; -webkit-appearance: none; appearance: none; }
.search-form input[type="search"]:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
.search-form button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); height: 32px; min-width: 32px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 8px; font: inherit; font-weight: 600; }
.search-form button:hover { color: var(--primary); }
.header-search { flex: 0 1 200px; }
.header-search input[type="search"] { width: 170px; }
.header-search input[type="search"]:focus { width: 220px; }
.hs-dark .header-search input[type="search"], .hs-brand .header-search input[type="search"] { background: color-mix(in srgb, var(--header-text) 12%, transparent); border-color: color-mix(in srgb, var(--header-text) 25%, transparent); color: var(--header-text); }
.hs-dark .header-search input::placeholder, .hs-brand .header-search input::placeholder { color: color-mix(in srgb, var(--header-text) 70%, transparent); }
.hs-dark .header-search button, .hs-brand .header-search button { color: var(--header-text); }
.site-nav { margin-left: auto; }
.hl-center .site-nav { margin-left: 0; }
.search-page { max-width: 640px; margin: 0 0 18px; }
.search-page input[type="search"] { height: 52px; font-size: 1.05rem; padding-right: 120px; }
.search-page button { background: var(--primary); color: var(--primary-text); height: 42px; padding: 0 18px; right: 5px; }
.search-page button:hover { background: var(--primary-dark); color: var(--primary-text); }
.search-count { color: var(--muted); margin-bottom: 24px; }
.search-results { list-style: none; padding: 0; margin: 0; max-width: 760px; }
.search-results li { padding: 18px 0; border-top: 1px solid var(--border); }
.search-results li:first-child { border-top: 0; padding-top: 4px; }
.sr-title { font-family: var(--font-heading); font-size: 1.25rem; font-weight: 650; text-decoration: none; }
.sr-title:hover { text-decoration: underline; }
.sr-path { display: block; font-size: .82rem; color: var(--muted); margin: 2px 0 6px; }
.search-results p { margin: 0; color: var(--text); }
.search-results mark { background: color-mix(in srgb, var(--accent) 35%, transparent); color: inherit; padding: 0 2px; border-radius: 3px; }
.b-search { margin: 0 0 1.2em; }
.b-search h3 { margin: 0 0 .6em; font-size: 1.05rem; }

/* ---------- share ---------- */
.share-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--border); }
.share-label { font-weight: 600; color: var(--muted); font-size: .92rem; margin-right: 4px; }
.share-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: inherit; font-size: .92rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.share-btn:hover { border-color: var(--primary); color: var(--primary); background: color-mix(in srgb, var(--primary) 6%, var(--bg)); }
.share-btn svg { flex: none; }

/* ---------- page body ---------- */
.page-body { flex: 1; padding: 48px 0 64px; }
.page-body.starts-with-hero { padding-top: 0; }
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
.layout-sidebar-right .page-grid { grid-template-columns: minmax(0, 1fr) 300px; }
.layout-sidebar-left .page-grid { grid-template-columns: 300px minmax(0, 1fr); }
.layout-sidebar-left .sidebar { order: -1; }
.content > :first-child { margin-top: 0; }
.page-title { margin-top: 0; }
.empty-page { border: 2px dashed var(--border); border-radius: var(--radius); padding: 48px; text-align: center; color: var(--muted); }

.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 18px; font-size: .88rem; color: var(--muted); }
.breadcrumbs li + li::before { content: '›'; margin-right: 6px; opacity: .7; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--primary); text-decoration: underline; }

/* ---------- sidebar ---------- */
.sidebar { font-size: .95rem; align-self: start; display: flex; flex-direction: column; gap: 4px; }
.sidebar.sb-boxed { background: var(--surface); border-radius: var(--radius); padding: 24px; }
.sidebar > :first-child { margin-top: 0; }
.sidebar h2, .sidebar h3 { font-size: 1.05rem; margin-top: 1.2em; }
.sidebar .b-card.style-boxed { background: var(--bg); }

/* ---------- footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 48px 0 28px; font-size: .95rem; }
.site-footer a { color: inherit; }
.site-footer h2, .site-footer h3 { font-size: 1.05rem; margin-top: 0; }
.footer-blocks { margin-bottom: 28px; }
.footer-blocks .b-columns { margin: 0; }
.copyright { border-top: 1px solid var(--footer-border); padding-top: 20px; color: var(--footer-muted); font-size: .88rem; }
.copyright { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.login-link { color: var(--footer-muted) !important; text-decoration: none; }
.login-link:hover { color: var(--footer-text) !important; text-decoration: underline; }

/* demo-only pointer to the admin area */
.ls-demo-tip { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; align-items: center; gap: 16px; max-width: calc(100vw - 40px);
  background: #111827; color: #f3f4f6; padding: 14px 14px 14px 20px; border-radius: 14px; box-shadow: 0 16px 40px rgba(0,0,0,.3); font: 14px/1.4 system-ui, sans-serif; }
.ls-demo-tip b { display: block; color: #fff; }
.ls-demo-tip span { color: #c7cdd8; }
.ls-demo-go { background: #2563eb; color: #fff !important; text-decoration: none; font-weight: 700; padding: 11px 16px; border-radius: 10px; white-space: nowrap; }
.ls-demo-go:hover { background: #1d4ed8; }
.ls-demo-x { background: none; border: 0; color: #9aa3b2; font-size: 22px; cursor: pointer; padding: 0 4px; line-height: 1; }
.ls-demo-x:hover { color: #fff; }
@media (max-width: 600px) { .ls-demo-tip { left: 12px; right: 12px; bottom: 12px; flex-wrap: wrap; } .ls-demo-tip > div { flex: 1 1 70%; } }
.footer-blocks:empty + .copyright, .site-footer .wrap > .copyright:first-child { border-top: 0; padding-top: 0; }

/* ---------- blocks ---------- */
.align-center { text-align: center; }
.align-right { text-align: right; }
.b-heading { margin-top: 1.2em; }
.b-text > :last-child { margin-bottom: 0; }
.b-text, .mt-text { margin-bottom: 1em; }
.b-text ul, .b-text ol, .mt-text ul { padding-left: 1.3em; }
.b-text blockquote { border-left: 4px solid var(--primary); margin: 1em 0; padding: .2em 0 .2em 1em; color: var(--muted); }

.b-image { margin: 1.5em 0; }
.b-image img, .b-image .ph { border-radius: var(--radius); width: 100%; }
.b-image.square img { border-radius: 0; }
.b-image.size-small { max-width: 280px; }
.b-image.size-medium { max-width: 520px; }
.b-image.size-large { max-width: 860px; }
.b-image.align-center { margin-left: auto; margin-right: auto; }
.b-image.align-right { margin-left: auto; }
.b-image figcaption { font-size: .88rem; color: var(--muted); margin-top: 8px; text-align: center; }
.ph { background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 35%, var(--surface)), color-mix(in srgb, var(--accent) 35%, var(--surface))); aspect-ratio: 16 / 10; width: 100%; border-radius: var(--radius); }

.b-hero { position: relative; display: flex; align-items: center; justify-content: center; min-height: 380px; padding: 72px 24px;
  background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 45%, var(--accent))) center / cover no-repeat;
  background-size: cover; background-position: center; color: #fff; border-radius: var(--radius); overflow: hidden; margin: 0 0 1.5em; }
.b-hero.h-s { min-height: 260px; }
.b-hero.h-l { min-height: 520px; }
.hero-overlay { position: absolute; inset: 0; background: #000; pointer-events: none; }
.hero-inner { position: relative; max-width: 760px; }
.b-hero.align-left { justify-content: flex-start; }
.b-hero.align-left .hero-inner { margin-right: auto; }
.b-hero.align-right { justify-content: flex-end; }
.b-hero h1 { color: #fff; margin: 0 0 .35em; font-size: clamp(2.1rem, 5vw, 3.4rem); text-shadow: 0 2px 16px rgba(0,0,0,.2); }
.b-hero p { font-size: 1.2rem; opacity: .95; margin-bottom: 1.6em; }
.layout-full .content > .b-hero { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); border-radius: 0; padding-left: max(24px, calc(50vw - var(--wrap) / 2 + 24px)); padding-right: max(24px, calc(50vw - var(--wrap) / 2 + 24px)); }

.btn { display: inline-block; padding: 12px 24px; border-radius: var(--radius); font-weight: 600; text-decoration: none; border: 2px solid transparent; transition: transform .12s, background .12s, box-shadow .12s; line-height: 1.3; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(15,23,42,.15); }
.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-primary:hover { background: var(--primary-dark); color: var(--primary-text); }
.btn-accent { background: var(--accent); color: var(--accent-text); }
.btn-accent:hover { color: var(--accent-text); filter: brightness(.95); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: var(--primary-text); }
.btn-lg { padding: 15px 32px; font-size: 1.08rem; }
.b-button { margin: 1.5em 0; }

.b-mediatext { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin: 2em 0; }
.b-mediatext.img-right .mt-media { order: 2; }
.mt-media img, .mt-media .ph { border-radius: var(--radius); width: 100%; }
.mt-text h2 { margin-top: 0; }

.b-columns { display: grid; gap: 28px; margin: 1.5em 0; }
.b-columns.cols-1 { grid-template-columns: 1fr; }
.b-columns.cols-2 { grid-template-columns: 1fr 1fr; }
.b-columns.cols-2.ratio-2-1 { grid-template-columns: 2fr 1fr; }
.b-columns.cols-2.ratio-1-2 { grid-template-columns: 1fr 2fr; }
.b-columns.cols-3 { grid-template-columns: repeat(3, 1fr); }
.b-columns.cols-4 { grid-template-columns: repeat(4, 1fr); }
.b-columns .col > :first-child { margin-top: 0; }
.b-columns .col > :last-child { margin-bottom: 0; }

.b-card { height: 100%; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius); }
.b-card.style-boxed { background: var(--surface); border: 1px solid var(--border); }
.b-card .card-media img, .b-card .card-media .ph { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 0; }
.b-card.style-plain .card-media img, .b-card.style-plain .card-media .ph { border-radius: var(--radius); }
.b-card.style-plain.align-center .card-media img { width: 70%; aspect-ratio: 1; border-radius: 50%; margin: 0 auto; }
.card-body { padding: 20px 22px 22px; flex: 1; display: flex; flex-direction: column; }
.b-card.style-plain .card-body { padding: 16px 0 0; }
.card-body h3 { margin: 0 0 .4em; }
.card-body p { color: var(--muted); margin-bottom: .8em; }
.card-link { margin-top: auto; font-weight: 600; text-decoration: none; }
.card-link:hover { text-decoration: underline; }

.b-gallery { display: grid; gap: 14px; margin: 1.5em 0; }
.b-gallery.gcols-2 { grid-template-columns: repeat(2, 1fr); }
.b-gallery.gcols-3 { grid-template-columns: repeat(3, 1fr); }
.b-gallery.gcols-4 { grid-template-columns: repeat(4, 1fr); }
.b-gallery figure { margin: 0; }
.b-gallery img, .b-gallery .ph { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); }
.b-gallery figcaption { font-size: .85rem; color: var(--muted); margin-top: 6px; }

.b-quote { margin: 2em auto; max-width: 760px; padding: 28px 32px; background: var(--surface); border-left: 5px solid var(--primary); border-radius: var(--radius); }
.b-quote p { font-size: 1.25rem; font-family: var(--font-heading); margin: 0 0 .6em; font-style: italic; }
.b-quote cite { color: var(--muted); font-style: normal; font-weight: 600; font-size: .95rem; }
.b-quote cite::before { content: '— '; }
.b-divider { border: 0; border-top: 1px solid var(--border); margin: 2.5em 0; }

.b-pagelist { margin: 0 0 1.2em; }
.b-pagelist h3 { margin: 0 0 .6em; font-size: 1.05rem; }
.b-pagelist ul { list-style: none; margin: 0; padding: 0; }
.b-pagelist ul ul { padding-left: 14px; border-left: 2px solid var(--border); margin: 2px 0 6px 10px; }
.b-pagelist a { display: block; padding: 6px 10px; border-radius: calc(var(--radius) * .6); text-decoration: none; color: var(--text); }
.b-pagelist a:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); color: var(--primary); }
.b-pagelist li.current > a { background: var(--primary); color: var(--primary-text); font-weight: 600; }
.b-pagelist .section-root > a { font-weight: 650; }
.b-pagelist.empty p { color: var(--muted); font-size: .9rem; }
.site-footer .b-pagelist a { color: inherit; padding-left: 0; }

.not-found { text-align: center; padding: 48px 0; }
.nf-code { font-size: 5rem; font-weight: 800; color: var(--primary); margin: 0; line-height: 1; opacity: .25; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .layout-sidebar-right .page-grid, .layout-sidebar-left .page-grid { grid-template-columns: 1fr; }
  .layout-sidebar-left .sidebar { order: 2; }
  .b-columns.cols-3, .b-columns.cols-4 { grid-template-columns: 1fr 1fr; }
  .b-gallery.gcols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .header-inner { flex-wrap: wrap; min-height: 64px; }
  .hl-center .header-inner { flex-direction: row; justify-content: space-between; padding-top: 0; padding-bottom: 0; }
  .site-nav { display: none; width: 100%; padding-bottom: 14px; }
  body.nav-open .site-nav { display: block; }
  body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .site-nav .menu { flex-direction: column; }
  .header-search { display: none; flex: 1 1 100%; order: 3; padding-bottom: 14px; }
  .header-search input[type="search"], .header-search input[type="search"]:focus { width: 100%; }
  body.nav-open .header-search, .header-inner:not(:has(.nav-toggle)) .header-search { display: flex; }
  .site-nav { order: 4; margin-left: 0; }
  .search-page input[type="search"] { padding-right: 52px; }
  .search-page button span { display: none; }
  .site-nav li { flex-wrap: wrap; }
  .site-nav li > a { flex: 1; }
  .site-nav .has-sub > a::after { display: none; }
  .site-nav .sub-toggle { display: block; width: 44px; height: 44px; background: none; border: 0; color: inherit; cursor: pointer; position: relative; }
  .site-nav .sub-toggle::after { content: ''; position: absolute; left: 18px; top: 16px; width: 8px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); transition: .2s; }
  .site-nav .sub-toggle[aria-expanded="true"]::after { transform: rotate(225deg); top: 20px; }
  .site-nav .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; background: transparent; color: inherit; width: 100%; display: none; padding: 0 0 0 16px; min-width: 0; }
  .site-nav .sub.open { display: flex; }
  .site-nav .has-sub:hover > .sub { display: none; }
  .site-nav .has-sub:hover > .sub.open { display: flex; }
  .b-columns.cols-2, .b-columns.cols-2.ratio-2-1, .b-columns.cols-2.ratio-1-2, .b-columns.cols-3, .b-columns.cols-4 { grid-template-columns: 1fr; }
  .b-mediatext { grid-template-columns: 1fr; gap: 24px; }
  .b-mediatext.img-right .mt-media { order: 0; }
  .b-gallery.gcols-3 { grid-template-columns: repeat(2, 1fr); }
  .page-body { padding: 32px 0 48px; }
  .b-hero { min-height: 300px; padding: 56px 20px; }
  .b-hero.h-l { min-height: 400px; }
}
