/* ==========================================================================
   WebCMS — shared front-end layer

   Every public template loads this file, then its own themes/<slug>/assets/
   theme.css, which only redefines the tokens below (on :root) and adds its
   signature components. The admin's colour pickers override --primary /
   --accent last, so every derived shade follows the client's brand.
   ========================================================================== */

:root {
  --font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --heading-font-family: var(--font-family);
  --heading-weight: 700;
  --heading-tracking: -0.02em;

  --primary: #2563eb;
  --accent: #f59e0b;
  --primary-dark: color-mix(in srgb, var(--primary) 78%, #000);
  --primary-soft: color-mix(in srgb, var(--primary) 10%, transparent);
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --on-primary: #ffffff;

  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f6f7f9;
  --text: #1f2937;
  --muted: #6b7280;
  --heading-color: #0f172a;
  --border-color: #e5e7eb;

  --radius: 16px;
  --radius-sm: 10px;
  --btn-radius: 999px;
  --shadow: 0 10px 30px rgba(15, 23, 42, .06);
  --shadow-hover: 0 18px 40px rgba(15, 23, 42, .10);

  --nav-bg: rgba(255, 255, 255, .85);
  --nav-text: var(--text);
  --footer-bg: #0f172a;
  --footer-text: #e2e8f0;
  --footer-muted: #94a3b8;
}

/* ---- Base --------------------------------------------------------------- */
body {
  font-family: var(--font-family);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--primary-soft); }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5 {
  font-family: var(--heading-font-family);
  font-weight: var(--heading-weight);
  letter-spacing: var(--heading-tracking);
  color: var(--heading-color);
}
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
.text-primary { color: var(--primary) !important; }
.text-accent { color: var(--accent) !important; }
.text-muted, .text-secondary { color: var(--muted) !important; }
.bg-primary { background-color: var(--primary) !important; color: var(--on-primary) !important; }
.bg-primary-soft { background: var(--primary-soft) !important; }
.bg-surface-alt { background: var(--surface-alt) !important; }
.line-clamp-2, .line-clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { -webkit-line-clamp: 2; }
.line-clamp-3 { -webkit-line-clamp: 3; }

/* ---- Navigation --------------------------------------------------------- */
.site-nav { background: var(--nav-bg); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--border-color); z-index: 1030; }
.site-nav .navbar-brand { font-family: var(--heading-font-family); font-weight: var(--heading-weight); color: var(--heading-color); }
.site-nav .navbar-brand img { object-fit: contain; }
.site-nav .nav-link { color: var(--nav-text); font-weight: 500; border-radius: var(--radius-sm); padding: .5rem .9rem !important; transition: color .15s, background .15s; }
.site-nav .nav-link:hover, .site-nav .nav-link.active { color: var(--primary); background: var(--primary-soft); }

/* ---- Buttons & forms ---------------------------------------------------- */
.btn { font-weight: 600; border-radius: var(--btn-radius); padding: .65rem 1.4rem; transition: transform .15s, box-shadow .15s, background-color .15s; }
.btn-sm { padding: .4rem .9rem; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-primary:hover, .btn-primary:focus { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--on-primary); transform: translateY(-1px); box-shadow: 0 8px 20px var(--primary-soft); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #111; }
.btn-accent:hover { filter: brightness(.95); color: #111; transform: translateY(-1px); }
.form-control, .form-select { border-radius: var(--radius-sm); border-color: var(--border-color); padding: .7rem 1rem; background-color: var(--surface); color: var(--text); }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }

/* ---- Cards -------------------------------------------------------------- */
.card { background: var(--surface); color: var(--text); border: 1px solid var(--border-color); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card.hover-shadow, .hover-lift { transition: transform .25s cubic-bezier(.16,1,.3,1), box-shadow .25s; }
.card.hover-shadow:hover, .hover-lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.card-title { color: var(--heading-color); }
.hover-translate-x { transition: transform .2s, box-shadow .2s; }
.hover-translate-x:hover { transform: translateX(3px); }
.badge.bg-primary { background: var(--primary) !important; }

/* ---- Page header (all content templates use .hero-banner-section) ------- */
.hero-banner-section { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: var(--on-primary); }
.hero-banner-section h1, .hero-banner-section p, .hero-banner-section span, .hero-banner-section .bi { color: var(--on-primary) !important; }
.hero-banner-section .lead, .hero-banner-section span { opacity: .92; }

/* ---- Layout ------------------------------------------------------------- */
.content-card { background: var(--surface); border: 1px solid var(--border-color); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.25rem, 3vw, 2.5rem); }
.content-narrow { max-width: 920px; margin-inline: auto; }
.section { padding-block: clamp(3rem, 7vw, 6rem); }
.section-title { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: .75rem; }
.section-eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--primary); }
.icon-bubble { width: 56px; height: 56px; display: inline-flex; align-items: center; justify-content: center; border-radius: 16px; background: var(--primary-soft); color: var(--primary); font-size: 1.5rem; }
.sidebar-widget { background: var(--surface); border: 1px solid var(--border-color); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); }
.sidebar-widget h4 { font-size: 1.05rem; padding-bottom: .6rem; margin-bottom: 1rem; border-bottom: 2px solid var(--primary-soft); }

/* ---- Footer ------------------------------------------------------------- */
.site-footer { background: var(--footer-bg); color: var(--footer-text); }
.site-footer h5 { color: var(--footer-text); font-size: 1rem; }
.site-footer a { color: var(--footer-muted); text-decoration: none; }
.site-footer a:hover { color: var(--footer-text); }
.site-footer .text-footer-muted { color: var(--footer-muted); }
.social-link { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--footer-muted) 40%, transparent); }
.social-link:hover { background: var(--primary); border-color: var(--primary); color: var(--on-primary) !important; }

/* ---- Admin theme preview banner ---------------------------------------- */
.theme-preview-bar { position: fixed; z-index: 2000; bottom: 1rem; left: 50%; transform: translateX(-50%); background: #0f172a; color: #fff; border-radius: 999px; padding: .5rem .6rem .5rem 1.1rem; font: 500 .85rem system-ui, sans-serif; box-shadow: 0 10px 30px rgba(0,0,0,.25); display: flex; gap: .6rem; align-items: center; }
.theme-preview-bar a { color: #fff; text-decoration: none; padding: .3rem .8rem; border-radius: 999px; background: rgba(255,255,255,.12); }
.theme-preview-bar a.primary { background: #2563eb; }

@media (max-width: 991.98px) {
  .site-nav .navbar-collapse { padding: 1rem 0; }
}

/* ---- Markdown content follows the template tokens ----------------------- */
body .markdown-body { --md-text: var(--text); --md-muted: var(--muted); --md-border: var(--border-color); --md-bg-subtle: var(--surface-alt); --md-accent: var(--primary); }
body .markdown-body h1, body .markdown-body h2, body .markdown-body h3, body .markdown-body h4 { color: var(--heading-color); font-family: var(--heading-font-family); }
body .markdown-body img { border-radius: var(--radius-sm); max-width: 100%; height: auto; }

/* ==========================================================================
   v2.1 — page header, components, agenda, utilities
   ========================================================================== */

/* ---- Navigation polish --------------------------------------------------- */
.site-nav { transition: box-shadow .2s, background .2s; }
.site-nav.scrolled { box-shadow: 0 6px 24px rgba(15, 23, 42, .07); }
.dropdown-menu { border-radius: var(--radius-sm); border-color: var(--border-color); box-shadow: var(--shadow-hover); }
.dropdown-item:active { background: var(--primary); }

/* ---- Page header ----------------------------------------------------------- */
.page-hero { position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; inset: auto -10% -60% auto; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--on-primary) 14%, transparent), transparent); pointer-events: none; }
.page-hero .container { position: relative; z-index: 1; }
.page-title { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.1; }
.page-lead { max-width: 46rem; font-size: 1.1rem; }
.page-crumbs { font-size: .85rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.page-crumbs a { color: inherit; opacity: .8; text-decoration: none; }
.page-crumbs a:hover { opacity: 1; text-decoration: underline; }
.page-crumbs .bi { font-size: .7rem; opacity: .6; }
.page-meta { display: flex; flex-wrap: wrap; gap: .25rem 0; font-weight: 500; }

/* ---- Component sections (page layout) ------------------------------------ */
.cmp-section { padding-block: clamp(1.5rem, 4vw, 3rem); }
.cmp-section:first-child { padding-top: 0; }
.cmp-band { background: var(--surface-alt); padding-block: clamp(3rem, 7vw, 5.5rem); margin-block: 1.5rem; }
.cmp-container { max-width: 1140px; }
.cmp-prose { padding-block: 1rem; }
.page-blocks { padding-block: clamp(2rem, 5vw, 4rem); }
.cmp + .cmp, .markdown-body + .cmp, .cmp + .markdown-body { margin-top: 2.5rem; }
.cmp-head { max-width: 46rem; margin-bottom: 2.5rem; }
.cmp-intro { color: var(--muted); font-size: 1.08rem; }
.cmp-intro p:last-child, .cmp-text p:last-child, .cmp-note-body p:last-child, .cmp-cta-text p:last-child, .cmp-hero-lead p:last-child { margin-bottom: 0; }
.cmp-placeholder { display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-size: 3rem; aspect-ratio: 4 / 3; }

/* hero */
.cmp-hero { padding-block: clamp(1rem, 4vw, 3rem); }
.cmp-hero-title { font-size: clamp(2.1rem, 5vw, 3.5rem); line-height: 1.08; margin-bottom: 1rem; }
.cmp-hero-lead { font-size: 1.15rem; color: var(--muted); }
.cmp-hero-center .cmp-hero-lead { margin-inline: auto; max-width: 40rem; }
.cmp-hero-img { width: 100%; border-radius: calc(var(--radius) + 8px); box-shadow: 0 30px 60px rgba(15, 23, 42, .16); aspect-ratio: 4 / 3; object-fit: cover; }

/* features */
.cmp-feature { padding: 1.75rem; display: flex; flex-direction: column; }
.cmp-feature.plain { padding: 0; }
.cmp-feature-img { width: calc(100% + 3.5rem); margin: -1.75rem -1.75rem 1.25rem; aspect-ratio: 16 / 9; object-fit: cover; }

/* stats */
.cmp-stats { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: var(--on-primary); border-radius: calc(var(--radius) + 8px); padding: clamp(2rem, 5vw, 3.5rem); }
.cmp-stats .section-title, .cmp-stats .section-eyebrow, .cmp-stats .cmp-intro { color: var(--on-primary); }
.cmp-stat-value { font-family: var(--heading-font-family); font-weight: 800; font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.cmp-stat-label { opacity: .85; margin-top: .5rem; font-weight: 500; }

/* cta */
.cmp-cta { background: linear-gradient(120deg, var(--primary), var(--primary-dark)); color: var(--on-primary); border-radius: calc(var(--radius) + 8px); padding: clamp(1.75rem, 5vw, 3.25rem); display: flex; flex-direction: column; gap: 1.5rem; justify-content: space-between; position: relative; overflow: hidden; }
.cmp-cta::before { content: ""; position: absolute; width: 380px; height: 380px; right: -120px; top: -160px; border-radius: 50%; background: color-mix(in srgb, var(--on-primary) 10%, transparent); }
.cmp-cta > * { position: relative; }
.cmp-cta h2 { color: var(--on-primary); font-size: clamp(1.5rem, 3vw, 2.2rem); }
.cmp-cta-text { opacity: .9; font-size: 1.05rem; }
.cmp-cta .btn-light { color: var(--primary); font-weight: 700; }
@media (min-width: 992px) { .cmp-cta { flex-direction: row; align-items: center; } }

/* faq */
.cmp-faq { max-width: 860px; margin-inline: auto; }
.cmp-accordion { --bs-accordion-border-color: var(--border-color); --bs-accordion-active-bg: var(--primary-soft); --bs-accordion-active-color: var(--heading-color); --bs-accordion-btn-focus-box-shadow: 0 0 0 4px var(--primary-soft); --bs-accordion-bg: var(--surface); --bs-accordion-color: var(--text); --bs-accordion-border-radius: var(--radius-sm); --bs-accordion-inner-border-radius: var(--radius-sm); }
.cmp-accordion .accordion-item { margin-bottom: .75rem; border: 1px solid var(--border-color) !important; border-radius: var(--radius-sm) !important; overflow: hidden; }
.cmp-accordion .accordion-button { font-weight: 600; font-family: var(--heading-font-family); padding: 1.1rem 1.25rem; color: var(--heading-color); }
.cmp-accordion .accordion-body { color: var(--muted); }
.cmp-accordion .accordion-body p:last-child { margin-bottom: 0; }

/* pricing */
.cmp-plan { padding: 2rem; display: flex; flex-direction: column; position: relative; overflow: visible; }
.cmp-plan.featured { border: 2px solid var(--primary); box-shadow: 0 24px 48px color-mix(in srgb, var(--primary) 18%, transparent); }
@media (min-width: 992px) { .cmp-plan.featured { transform: translateY(-8px); } }
.cmp-plan-badge { position: absolute; top: -.8rem; left: 50%; transform: translateX(-50%); background: var(--primary); color: var(--on-primary); font-size: .75rem; font-weight: 700; padding: .25rem .8rem; border-radius: 999px; white-space: nowrap; }
.cmp-plan-price { font-family: var(--heading-font-family); font-size: 2.4rem; font-weight: 800; color: var(--heading-color); letter-spacing: -0.03em; margin-bottom: 1rem; }
.cmp-plan-price small { font-size: .95rem; font-weight: 500; color: var(--muted); margin-left: .2rem; letter-spacing: 0; }
.cmp-plan-body ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .6rem; }
.cmp-plan-body li { padding-left: 1.6rem; position: relative; }
.cmp-plan-body li::before { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; left: 0; color: var(--primary); font-weight: 700; }

/* testimonials */
.cmp-quote { padding: 1.75rem; display: flex; flex-direction: column; position: relative; }
.cmp-quote-mark { position: absolute; top: .4rem; right: 1.2rem; font-size: 3.5rem; color: var(--primary-soft); line-height: 1; }
.cmp-quote blockquote { font-size: 1.02rem; color: var(--text); }
.cmp-quote blockquote p:last-child { margin: 0; }
.cmp-stars { color: #f59e0b; font-size: .9rem; display: flex; gap: .15rem; }
.cmp-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.cmp-avatar-initial { display: inline-grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-family: var(--heading-font-family); }

/* team */
.cmp-member-photo { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; font-size: 2rem; box-shadow: 0 0 0 6px var(--surface), 0 0 0 7px var(--border-color); }

/* steps */
.cmp-steps-list { counter-reset: none; }
.cmp-step { height: 100%; padding: 1.5rem; border-radius: var(--radius); background: var(--surface-alt); position: relative; }
.cmp-step-num { width: 42px; height: 42px; border-radius: 12px; display: inline-grid; place-items: center; background: var(--primary); color: var(--on-primary); font-weight: 800; font-family: var(--heading-font-family); }
.cmp-step p:last-child { margin: 0; }

/* timeline */
.cmp-tl { position: relative; max-width: 760px; margin: 0 auto; padding-left: 2rem; }
.cmp-tl::before { content: ""; position: absolute; left: 7px; top: .4rem; bottom: .4rem; width: 2px; background: linear-gradient(var(--primary), var(--primary-soft)); }
.cmp-tl-item { position: relative; padding-bottom: 2rem; }
.cmp-tl-item:last-child { padding-bottom: 0; }
.cmp-tl-dot { position: absolute; left: -2rem; top: .3rem; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--primary); }
.cmp-tl-date { font-family: var(--heading-font-family); font-weight: 800; color: var(--primary); font-size: 1.1rem; }
.cmp-tl-body { color: var(--muted); }
.cmp-tl-body p:last-child { margin: 0; }

/* gallery */
.cmp-gallery-grid { display: grid; gap: .75rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .cmp-gallery-grid { grid-template-columns: repeat(var(--cols, 3), 1fr); } }
.cmp-gallery-item { position: relative; display: block; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-alt); }
.cmp-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.16,1,.3,1); }
.cmp-gallery-item:hover img { transform: scale(1.05); }
.cmp-gallery-cap { position: absolute; inset: auto 0 0 0; padding: 1.5rem .8rem .6rem; color: #fff; font-size: .85rem; background: linear-gradient(transparent, rgba(0,0,0,.6)); opacity: 0; transition: opacity .25s; }
.cmp-gallery-item:hover .cmp-gallery-cap { opacity: 1; }
.lightbox { position: fixed; inset: 0; z-index: 3000; background: rgba(8, 10, 15, .92); display: none; align-items: center; justify-content: center; padding: 3rem 4rem; }
.lightbox.open { display: flex; }
.lightbox figure { margin: 0; text-align: center; }
.lightbox img { max-width: 100%; max-height: 80vh; border-radius: 8px; }
.lightbox figcaption { color: #e5e7eb; margin-top: .75rem; }
.lightbox button { position: absolute; background: rgba(255,255,255,.1); border: 0; color: #fff; width: 46px; height: 46px; border-radius: 50%; font-size: 1.2rem; }
.lightbox button:hover { background: rgba(255,255,255,.2); }
.lb-close { top: 1rem; right: 1rem; } .lb-prev { left: 1rem; top: 50%; } .lb-next { right: 1rem; top: 50%; }

/* logos */
.cmp-logos { text-align: center; padding-block: 1rem; }
.cmp-logos-title { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 700; color: var(--muted); margin-bottom: 1.5rem; }
.cmp-logos-row { display: flex; flex-wrap: wrap; gap: 2rem 3rem; align-items: center; justify-content: center; }
.cmp-logos-row img { max-height: 48px; max-width: 160px; object-fit: contain; filter: grayscale(1); opacity: .7; transition: filter .2s, opacity .2s; }
.cmp-logos-row img:hover { filter: none; opacity: 1; }

/* split */
.cmp-split-img { width: 100%; border-radius: var(--radius); aspect-ratio: 4 / 3; object-fit: cover; box-shadow: var(--shadow-hover); }

/* note */
.cmp-note { display: flex; gap: .9rem; padding: 1rem 1.2rem; border-radius: var(--radius-sm); border: 1px solid var(--n-border); background: var(--n-bg); color: var(--text); margin-block: 1.5rem; }
.cmp-note-icon { color: var(--n-fg); font-size: 1.2rem; line-height: 1.4; }
.cmp-note-info { --n-fg: #2563eb; --n-bg: #eff6ff; --n-border: #bfdbfe; }
.cmp-note-tip { --n-fg: var(--primary); --n-bg: var(--primary-soft); --n-border: color-mix(in srgb, var(--primary) 30%, transparent); }
.cmp-note-success { --n-fg: #16a34a; --n-bg: #f0fdf4; --n-border: #bbf7d0; }
.cmp-note-warning { --n-fg: #d97706; --n-bg: #fffbeb; --n-border: #fde68a; }
.cmp-note-danger { --n-fg: #dc2626; --n-bg: #fef2f2; --n-border: #fecaca; }
[data-bs-theme="dark"] .cmp-note { --n-bg: color-mix(in srgb, var(--n-fg) 12%, transparent); --n-border: color-mix(in srgb, var(--n-fg) 35%, transparent); }

/* video, map, contact */
.cmp-video .ratio { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-hover); }
.cmp-map-frame { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border-color); aspect-ratio: 16 / 7; min-height: 280px; background: var(--surface-alt); }
.cmp-map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cmp-map-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; text-decoration: none; color: var(--heading-color); font-weight: 600; }
.cmp-map-fallback .bi { font-size: 2rem; color: var(--primary); }
.cmp-map-fallback small { color: var(--muted); font-weight: 500; }
.cmp-map-frame.has-map .cmp-map-fallback { inset: auto .75rem .75rem auto; flex-direction: row; background: var(--surface); padding: .45rem .8rem; border-radius: 999px; box-shadow: var(--shadow); font-size: .85rem; z-index: 2; }
.cmp-map-frame.has-map .cmp-map-fallback .bi { font-size: 1rem; }
.cmp-map-frame.has-map .cmp-map-fallback span { display: none; }
.cmp-contact { padding: clamp(1.5rem, 4vw, 2.5rem); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---- Agenda -------------------------------------------------------------------- */
.agenda-toolbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface-alt); border: 1px solid var(--border-color); }
.seg-btn { padding: .45rem 1rem; border-radius: 999px; color: var(--muted); font-weight: 600; text-decoration: none; font-size: .9rem; display: inline-flex; gap: .4rem; align-items: center; }
.seg-btn:hover { color: var(--heading-color); }
.seg-btn.active { background: var(--surface); color: var(--heading-color); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { --chip: var(--primary); display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .85rem; border-radius: 999px; border: 1px solid var(--border-color); background: var(--surface); color: var(--text); font-size: .85rem; font-weight: 600; text-decoration: none; transition: border-color .15s, background .15s; }
.chip:hover { border-color: var(--chip); color: var(--text); }
.chip.active { background: var(--chip); border-color: var(--chip); color: #fff; }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--chip); }
.chip.active .chip-dot { background: #fff; }
.cat-badge { --chip: var(--primary); display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 700; background: color-mix(in srgb, var(--chip) 13%, transparent); color: var(--chip); }
.cat-badge-light { background: var(--surface); color: var(--chip) !important; box-shadow: 0 1px 2px rgba(15, 23, 42, .12); }
.page-eyebrow { display: flex; gap: .4rem; flex-wrap: wrap; }
.btn-link { color: var(--primary); }
.page-blocks > .cmp-section:last-child { padding-bottom: 0; }

.agenda-month-title { font-size: 1.15rem; margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border-color); text-transform: none; }
.event-row { --chip: var(--primary); position: relative; display: flex; gap: 1.1rem; align-items: center; padding: 1rem 1.1rem; background: var(--surface); border: 1px solid var(--border-color); border-radius: var(--radius); transition: border-color .2s, box-shadow .2s, transform .2s; }
.event-row:hover { border-color: color-mix(in srgb, var(--chip) 50%, var(--border-color)); box-shadow: var(--shadow-hover); }
.event-row-date { flex: 0 0 64px; text-align: center; border-radius: 14px; padding: .5rem 0; background: color-mix(in srgb, var(--chip) 11%, transparent); color: var(--chip); display: flex; flex-direction: column; line-height: 1.1; }
.event-row-wd, .event-row-month { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.event-row-day { font-family: var(--heading-font-family); font-size: 1.65rem; font-weight: 800; }
.event-row-body { flex: 1; min-width: 0; }
.event-row-meta { display: flex; flex-wrap: wrap; gap: .4rem .9rem; align-items: center; font-size: .82rem; color: var(--muted); margin-bottom: .2rem; }
.event-row-title { font-size: 1.05rem; margin: 0 0 .15rem; }
.event-row-title a { color: var(--heading-color); text-decoration: none; }
.event-row:hover .event-row-title a { color: var(--chip); }
.event-row-place { font-size: .87rem; color: var(--muted); }
.event-row-desc { font-size: .87rem; color: var(--muted); margin: .35rem 0 0; }
.event-row-img { width: 108px; height: 76px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.event-row-go { color: var(--muted); transition: transform .2s; }
.event-row:hover .event-row-go { transform: translateX(3px); color: var(--chip); }
@media (max-width: 575.98px) { .event-row-img, .event-row-go { display: none; } .event-row { padding: .85rem; gap: .85rem; } }

.date-chip { --chip: var(--primary); min-width: 52px; text-align: center; border-radius: 12px; padding: .35rem .25rem; background: color-mix(in srgb, var(--chip) 11%, transparent); color: var(--chip); display: flex; flex-direction: column; line-height: 1.1; }
.date-chip-day { font-weight: 800; font-size: 1.2rem; font-family: var(--heading-font-family); }
.date-chip-month { font-size: .7rem; font-weight: 700; text-transform: uppercase; }
.event-mini-title { color: var(--heading-color); }
.event-mini-title:hover { color: var(--primary); }

.agenda-next { border-top: 4px solid var(--chip, var(--primary)); }
.agenda-next-date { font-weight: 700; color: var(--chip, var(--primary)); }
.countdown { display: flex; gap: .5rem; }
.countdown span { flex: 1; text-align: center; background: var(--surface-alt); border-radius: var(--radius-sm); padding: .5rem .25rem; font-size: .75rem; color: var(--muted); }
.countdown b { display: block; font-size: 1.35rem; color: var(--heading-color); font-family: var(--heading-font-family); font-variant-numeric: tabular-nums; }
.countdown .cd-now { background: var(--primary-soft); color: var(--primary); font-weight: 700; }

.mini-cal .mc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .6rem; text-transform: capitalize; }
.mini-cal .mc-head button { border: 0; background: transparent; width: 32px; height: 32px; border-radius: 8px; color: var(--muted); }
.mini-cal .mc-head button:hover { background: var(--surface-alt); color: var(--heading-color); }
.mini-cal .mc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; font-size: .85rem; }
.mini-cal .mc-wd { font-size: .7rem; font-weight: 700; color: var(--muted); padding-bottom: .3rem; }
.mini-cal .mc-day { aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px; color: var(--text); text-decoration: none; }
.mini-cal .mc-day.today { box-shadow: inset 0 0 0 1.5px var(--primary); font-weight: 700; }
.mini-cal a.mc-day.has { background: var(--primary); color: var(--on-primary); font-weight: 700; }
.mini-cal a.mc-day.has:hover { background: var(--primary-dark); }

.past-row { display: flex; gap: .8rem; align-items: baseline; padding: .6rem .9rem; border-radius: var(--radius-sm); background: var(--surface-alt); }
.past-row a { color: var(--text); text-decoration: none; font-weight: 500; }
.past-row a:hover { color: var(--primary); }

.event-cover { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius-sm); }
.event-facts { border-top: 4px solid var(--chip); }
.event-facts-date { display: inline-flex; flex-direction: column; align-items: center; min-width: 88px; padding: .6rem; border-radius: 16px; background: color-mix(in srgb, var(--chip) 11%, transparent); color: var(--chip); line-height: 1.1; }
.event-facts-day { font-family: var(--heading-font-family); font-weight: 800; font-size: 2.4rem; }
.event-facts .bi { margin-top: .15rem; }

.empty-state { text-align: center; padding: 4rem 1rem; border: 1px dashed var(--border-color); border-radius: var(--radius); background: var(--surface-alt); }

/* FullCalendar, themed with the template tokens */
.agenda-calendar { overflow: visible; }
.fc { --fc-border-color: var(--border-color); --fc-today-bg-color: var(--primary-soft); --fc-page-bg-color: var(--surface); --fc-neutral-bg-color: var(--surface-alt); --fc-list-event-hover-bg-color: var(--surface-alt); --fc-event-border-color: transparent; font-family: var(--font-family); }
.fc a { text-decoration: none !important; color: inherit; }
.fc .fc-toolbar { flex-wrap: wrap; gap: .75rem; }
.fc .fc-toolbar-title { font-family: var(--heading-font-family); color: var(--heading-color); font-size: 1.35rem; text-transform: capitalize; }
.fc .fc-button { background: var(--surface) !important; border: 1px solid var(--border-color) !important; color: var(--text) !important; border-radius: var(--radius-sm) !important; font-weight: 600; font-size: .85rem; padding: .4rem .8rem; box-shadow: none !important; text-transform: none; }
.fc .fc-button:hover { background: var(--surface-alt) !important; }
.fc .fc-button-active, .fc .fc-button-active:hover { background: var(--primary) !important; border-color: var(--primary) !important; color: var(--on-primary) !important; }
.fc .fc-button:disabled { opacity: .5; }
.fc .fc-button-group > .fc-button:not(:first-child) { margin-left: 4px; }
.fc .fc-col-header-cell-cushion { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: .6rem 0; font-weight: 700; }
.fc .fc-daygrid-day-number { font-size: .85rem; color: var(--text); padding: .4rem .55rem; }
.fc .fc-day-today .fc-daygrid-day-number { background: var(--primary); color: var(--on-primary); border-radius: 999px; min-width: 28px; text-align: center; margin: 4px; padding: .15rem .45rem; }
.fc .fc-day-other .fc-daygrid-day-number { opacity: .4; }
.fc .fc-daygrid-event { border-radius: 6px; padding: 1px 4px; font-size: .78rem; font-weight: 600; }
.fc .fc-daygrid-dot-event:hover { background: var(--surface-alt); }
.fc .fc-list-day-cushion { background: var(--surface-alt) !important; text-transform: capitalize; }
.fc .fc-list-event-title a { font-weight: 600; }
.fc-theme-standard .fc-scrollgrid { border-radius: var(--radius-sm); overflow: hidden; }
#calendar.is-loading { opacity: .6; transition: opacity .2s; }

/* ---- Utilities: toast, back to top ------------------------------------------------- */
.site-toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 20px); opacity: 0; background: #0f172a; color: #fff; padding: .6rem 1.1rem; border-radius: 999px; font-size: .9rem; z-index: 3001; transition: opacity .25s, transform .25s; }
.site-toast.show { opacity: 1; transform: translate(-50%, 0); }
.to-top { position: fixed; right: 1.25rem; bottom: 1.25rem; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-hover); opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .25s, transform .25s; z-index: 1020; }
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }
a:focus-visible, .btn:focus-visible, button:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* Page header: theme rules colour every span/icon of the header; keep
   badges, buttons and the subscribe menu readable on any template. */
.page-hero .cat-badge, .page-hero .cat-badge-light { color: var(--chip) !important; opacity: 1 !important; }
.page-hero .dropdown-menu, .page-hero .dropdown-menu .bi, .page-hero .dropdown-menu span { color: var(--text) !important; opacity: 1 !important; }
.page-hero .btn .bi, .page-hero .btn span { color: inherit !important; opacity: 1 !important; }
