/* ---------------------------------------------------------------
   Public site. Sits on top of Tabler's Bootstrap 5 base but reads
   as its own design: quieter chrome, larger type, generous spacing.
   --------------------------------------------------------------- */

:root {
    --pub-ink: #101418;
    --pub-body: #4b5560;
    --pub-muted: #7b8794;
    --pub-line: #e4e7ea;
    --pub-surface: #ffffff;
    --pub-canvas: #f6f7f8;
    --pub-accent: #1b64c4;
    --pub-accent-dark: #14509f;
}

body.public {
    background: var(--pub-canvas);
    color: var(--pub-body);
    font-size: 1rem;
    line-height: 1.6;
}

.public h1, .public h2, .public h3, .public h4 {
    color: var(--pub-ink);
    letter-spacing: -0.015em;
    font-weight: 650;
}

/* ---------- Header ---------- */

.pub-header {
    background: var(--pub-surface);
    border-bottom: 1px solid var(--pub-line);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.pub-header .navbar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1rem 0;
    text-decoration: none;
}

.pub-logo {
    height: 40px;
    width: auto;
}

.pub-logo-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--pub-accent);
    color: #fff;
    font-weight: 700;
    font-size: .8125rem;
}

.pub-wordmark strong {
    display: block;
    font-size: 1rem;
    color: var(--pub-ink);
    line-height: 1.2;
    font-weight: 650;
}

.pub-wordmark span {
    display: block;
    font-size: .75rem;
    color: var(--pub-muted);
}

.pub-nav a {
    color: var(--pub-body);
    text-decoration: none;
    font-weight: 500;
    padding: .5rem .875rem;
    border-radius: 6px;
}

.pub-nav a:hover { background: var(--pub-canvas); color: var(--pub-ink); }
.pub-nav a.active { color: var(--pub-accent); }

/* ---------- Hero ---------- */

.pub-hero {
    background: linear-gradient(180deg, #ffffff 0%, var(--pub-canvas) 100%);
    border-bottom: 1px solid var(--pub-line);
    padding: 4.5rem 0 3.5rem;
}

.pub-hero h1 {
    font-size: clamp(1.9rem, 4vw, 2.75rem);
    line-height: 1.15;
    margin-bottom: 1rem;
}

.pub-hero p.lead {
    font-size: 1.0625rem;
    color: var(--pub-body);
    max-width: 42rem;
}

.pub-stat {
    border-left: 3px solid var(--pub-accent);
    padding-left: .875rem;
}

.pub-stat .value {
    font-size: 1.5rem;
    font-weight: 650;
    color: var(--pub-ink);
    line-height: 1.1;
}

.pub-stat .label {
    font-size: .8125rem;
    color: var(--pub-muted);
}

/* ---------- Section headings ---------- */

.pub-section { padding: 3rem 0; }

.pub-eyebrow {
    font-size: .75rem;
    font-weight: 650;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--pub-accent);
    margin-bottom: .375rem;
}

/* ---------- Event card ---------- */

.event-card {
    background: var(--pub-surface);
    border: 1px solid var(--pub-line);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: box-shadow .15s ease, transform .15s ease;
}

.event-card:hover {
    box-shadow: 0 6px 24px rgba(16, 20, 24, .08);
    transform: translateY(-2px);
}

.event-card .banner {
    aspect-ratio: 21 / 9;
    background: #eceff1 center/cover no-repeat;
    position: relative;
}

.event-card .banner-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, #eef2f6, #dde5ed);
    color: #9aa7b4;
    font-size: 2rem;
}

.event-card .body { padding: 1.125rem 1.25rem; flex: 1 1 auto; }
.event-card .foot {
    padding: .875rem 1.25rem;
    border-top: 1px solid var(--pub-line);
    background: #fbfcfc;
}

.event-card h3 {
    font-size: 1.0625rem;
    line-height: 1.35;
    margin-bottom: .5rem;
}

.event-card h3 a { color: var(--pub-ink); text-decoration: none; }
.event-card h3 a:hover { color: var(--pub-accent); }

.event-card .excerpt {
    font-size: .875rem;
    color: var(--pub-body);
    margin-bottom: .875rem;
}

.event-meta {
    font-size: .8125rem;
    color: var(--pub-muted);
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.event-meta i { width: 1rem; color: #9aa7b4; }

.pill {
    display: inline-block;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .02em;
    padding: .1875rem .5rem;
    border-radius: 999px;
    background: #eef2f6;
    color: #55606b;
}

.pill-accent { background: rgba(27,100,196,.1); color: var(--pub-accent-dark); }
.pill-free   { background: rgba(16,133,101,.12); color: #0d6a51; }
.pill-closed { background: #f0f1f2; color: #8a939c; }

/* ---------- Filter bar ---------- */

.pub-filters {
    background: var(--pub-surface);
    border: 1px solid var(--pub-line);
    border-radius: 12px;
    padding: 1rem;
}

.pub-tabs {
    display: flex;
    gap: .25rem;
    border-bottom: 1px solid var(--pub-line);
    margin-bottom: 1.5rem;
}

.pub-tabs a {
    padding: .625rem 1rem;
    text-decoration: none;
    color: var(--pub-muted);
    font-weight: 550;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.pub-tabs a:hover { color: var(--pub-ink); }

.pub-tabs a.active {
    color: var(--pub-accent);
    border-bottom-color: var(--pub-accent);
}

.pub-tabs .count {
    font-size: .75rem;
    color: var(--pub-muted);
    margin-left: .25rem;
}

/* ---------- Detail page ---------- */

.detail-banner {
    aspect-ratio: 3 / 1;
    background: #eceff1 center/cover no-repeat;
    border-radius: 12px;
}

.detail-body { font-size: 1rem; color: #2f3843; }
.detail-body h2 { font-size: 1.375rem; margin: 1.75rem 0 .625rem; }
.detail-body h3 { font-size: 1.125rem; margin: 1.5rem 0 .5rem; }
.detail-body p  { margin-bottom: 1rem; }
.detail-body ul, .detail-body ol { margin-bottom: 1rem; padding-left: 1.25rem; }
.detail-body li { margin-bottom: .25rem; }
.detail-body blockquote {
    border-left: 3px solid var(--pub-line);
    padding-left: 1rem;
    color: var(--pub-muted);
    margin-bottom: 1rem;
}

.apply-card {
    background: var(--pub-surface);
    border: 1px solid var(--pub-line);
    border-radius: 12px;
    padding: 1.25rem;
    position: sticky;
    top: 6rem;
}

.apply-price {
    font-size: 1.75rem;
    font-weight: 650;
    color: var(--pub-ink);
    line-height: 1;
}

.fact-row {
    display: flex;
    gap: .75rem;
    padding: .625rem 0;
    border-bottom: 1px solid var(--pub-line);
    font-size: .875rem;
}

.fact-row:last-child { border-bottom: 0; }
.fact-row i { color: #9aa7b4; margin-top: .125rem; }
.fact-row .label { color: var(--pub-muted); font-size: .75rem; }
.fact-row .value { color: var(--pub-ink); font-weight: 500; }

.session-row {
    display: flex;
    gap: 1rem;
    padding: .875rem 0;
    border-bottom: 1px solid var(--pub-line);
}

.session-row:last-child { border-bottom: 0; }

.session-day {
    flex: 0 0 3.5rem;
    text-align: center;
    background: var(--pub-canvas);
    border-radius: 8px;
    padding: .375rem 0;
}

.session-day .d { font-size: 1.125rem; font-weight: 650; color: var(--pub-ink); line-height: 1; }
.session-day .m { font-size: .6875rem; text-transform: uppercase; color: var(--pub-muted); }

/* ---------- Footer ---------- */

.pub-footer {
    background: var(--pub-ink);
    color: #9aa7b4;
    padding: 2.5rem 0;
    margin-top: 4rem;
    font-size: .875rem;
}

.pub-footer a { color: #cdd5dd; text-decoration: none; }
.pub-footer a:hover { color: #fff; }

/* ---------- Buttons ---------- */

.btn-apply {
    background: var(--pub-accent);
    border-color: var(--pub-accent);
    color: #fff;
    font-weight: 550;
    padding: .625rem 1.25rem;
}

.btn-apply:hover { background: var(--pub-accent-dark); border-color: var(--pub-accent-dark); color: #fff; }
