/* ==========================================================================
   St. James Infirmary Busia — shared theme (header, footer, buttons)
   Every rule is scoped to .sj-* classes so it is safe on the older
   Bootstrap-template pages as well as the redesigned ones.
   ========================================================================== */

:root {
    --sj-red: #d3202e;
    --sj-red-dark: #a8141f;
    --sj-red-soft: #fdecee;
    --sj-navy: #0c1a3a;
    --sj-navy-2: #14284f;
    --sj-blue: #2456c7;
    --sj-blue-soft: #eaf0fc;
    --sj-ink: #0f172a;
    --sj-body: #3f4a5e;
    --sj-muted: #6b7489;
    --sj-line: #e3e8f1;
    --sj-surface: #f5f7fb;
    --sj-white: #ffffff;

    --sj-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --sj-serif: "Fraunces", Georgia, "Times New Roman", serif;

    --sj-radius-sm: 10px;
    --sj-radius: 18px;
    --sj-radius-lg: 28px;
    --sj-shadow-sm: 0 1px 2px rgba(12, 26, 58, .06), 0 2px 8px rgba(12, 26, 58, .05);
    --sj-shadow: 0 10px 30px -10px rgba(12, 26, 58, .18);
    --sj-shadow-lg: 0 30px 60px -20px rgba(12, 26, 58, .28);
    --sj-max: 1200px;
    --sj-gutter: clamp(16px, 4vw, 32px);
}

.sj-container {
    width: 100%;
    max-width: calc(var(--sj-max) + var(--sj-gutter) * 2);
    margin: 0 auto;
    padding: 0 var(--sj-gutter);
    box-sizing: border-box;
}

.sj-icon {
    width: 1.15em;
    height: 1.15em;
    flex: none;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- Buttons ---------- */
.sj-btn,
a.sj-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55em;
    min-height: 48px;
    padding: .8em 1.4em;
    border-radius: 999px;
    border: 1.5px solid transparent;
    font: 600 15px/1.2 var(--sj-font);
    letter-spacing: .01em;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.sj-btn:hover { text-decoration: none; transform: translateY(-1px); }
.sj-btn:focus-visible { outline: 3px solid rgba(36, 86, 199, .45); outline-offset: 2px; }

.sj-btn.sj-btn--primary { background: var(--sj-red); color: #fff; box-shadow: 0 8px 20px -8px rgba(211, 32, 46, .6); }
.sj-btn.sj-btn--primary:hover { background: var(--sj-red-dark); color: #fff; }

.sj-btn.sj-btn--light { background: #fff; color: var(--sj-navy); }
.sj-btn.sj-btn--light:hover { background: var(--sj-blue-soft); color: var(--sj-navy); }

.sj-btn.sj-btn--ghost { background: transparent; color: var(--sj-navy); border-color: rgba(12, 26, 58, .18); }
.sj-btn.sj-btn--ghost:hover { border-color: var(--sj-navy); color: var(--sj-navy); }

.sj-btn.sj-btn--ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.sj-btn.sj-btn--ghost-light:hover { border-color: #fff; color: #fff; background: rgba(255, 255, 255, .08); }

/* ---------- Top bar ---------- */
.sj-topbar {
    background: var(--sj-navy);
    color: rgba(255, 255, 255, .82);
    font: 500 13px/1.4 var(--sj-font);
}
.sj-topbar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 42px;
}
.sj-topbar__group { display: flex; align-items: center; gap: 22px; min-width: 0; }
.sj-topbar__item { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.sj-topbar a { color: #fff; text-decoration: none; }
.sj-topbar a:hover { color: #fff; text-decoration: underline; }
.sj-topbar__pulse {
    width: 8px; height: 8px; border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, .7);
    animation: sj-pulse 2s infinite;
}
.sj-topbar__clock { font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, .6); }
@keyframes sj-pulse {
    0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); }
    70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

/* ---------- Main nav ---------- */
.sj-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: box-shadow .25s ease, border-color .25s ease;
    font-family: var(--sj-font);
}
.sj-header.is-scrolled { border-color: var(--sj-line); box-shadow: 0 6px 24px -12px rgba(12, 26, 58, .2); }
.sj-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 78px; }

.sj-brand, a.sj-brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--sj-ink); }
.sj-brand:hover { text-decoration: none; color: var(--sj-ink); }
.sj-brand img { width: 52px; height: 52px; border-radius: 50%; box-shadow: var(--sj-shadow-sm); background: #fff; }
.sj-brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.sj-brand__name { font: 800 17px/1.1 var(--sj-font); letter-spacing: -.01em; color: var(--sj-navy); }
.sj-brand__sub { font: 500 italic 13px/1.3 var(--sj-serif); color: var(--sj-red); margin-top: 3px; }

.sj-nav { display: flex; align-items: center; gap: 6px; }
.sj-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.sj-nav li { margin: 0; }
.sj-nav__link, a.sj-nav__link {
    position: relative;
    display: inline-block;
    padding: 10px 14px;
    border-radius: 999px;
    font: 600 15px/1 var(--sj-font);
    color: var(--sj-body);
    text-decoration: none;
    transition: color .2s ease, background-color .2s ease;
}
.sj-nav__link:hover { color: var(--sj-navy); background: var(--sj-surface); text-decoration: none; }
.sj-nav__link.is-active { color: var(--sj-red); }
.sj-nav__link.is-active::after {
    content: "";
    position: absolute;
    left: 50%; bottom: 3px;
    width: 5px; height: 5px;
    margin-left: -2.5px;
    border-radius: 50%;
    background: var(--sj-red);
}
.sj-nav__cta { margin-left: 10px; }

.sj-burger {
    display: none;
    width: 46px; height: 46px;
    align-items: center; justify-content: center;
    border-radius: 12px;
    border: 1px solid var(--sj-line);
    background: #fff;
    color: var(--sj-navy);
    cursor: pointer;
}
.sj-burger .sj-icon { width: 22px; height: 22px; }
.sj-burger .sj-icon--close { display: none; }
.sj-header.is-open .sj-burger .sj-icon--open { display: none; }
.sj-header.is-open .sj-burger .sj-icon--close { display: block; }

@media (max-width: 991px) {
    .sj-burger { display: inline-flex; }
    .sj-nav {
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px var(--sj-gutter) 22px;
        background: #fff;
        border-bottom: 1px solid var(--sj-line);
        box-shadow: 0 20px 30px -20px rgba(12, 26, 58, .25);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity .2s ease, transform .2s ease, visibility .2s;
    }
    .sj-header.is-open .sj-nav { opacity: 1; visibility: visible; transform: none; }
    .sj-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
    .sj-nav__link, a.sj-nav__link { display: block; padding: 14px 12px; border-radius: 12px; font-size: 16px; }
    .sj-nav__link.is-active { background: var(--sj-red-soft); }
    .sj-nav__link.is-active::after { display: none; }
    .sj-nav__cta { margin: 0; width: 100%; }
}
@media (max-width: 767px) {
    .sj-topbar__hide-sm { display: none; }
    .sj-topbar__inner { justify-content: center; }
    .sj-header__inner { min-height: 68px; }
    .sj-brand img { width: 44px; height: 44px; }
    .sj-brand__name { font-size: 15px; }
    .sj-brand__sub { font-size: 12px; }
}
@media (max-width: 380px) {
    .sj-brand__sub { display: none; }
}

/* ---------- Footer ---------- */
.sj-footer {
    position: relative;
    background: var(--sj-navy);
    color: rgba(255, 255, 255, .72);
    font: 400 15px/1.65 var(--sj-font);
    padding-top: clamp(48px, 6vw, 72px);
    margin-top: 0;
}
.sj-footer * { box-sizing: border-box; }
.sj-footer a { color: rgba(255, 255, 255, .78); text-decoration: none; transition: color .2s ease; }
.sj-footer a:hover { color: #fff; text-decoration: none; }
.sj-footer h2, .sj-footer h3, .sj-footer p, .sj-footer ul { margin: 0; padding: 0; }

.sj-footer__cta {
    position: relative;
    top: -1px;
    background:
        radial-gradient(600px 240px at 90% 0%, rgba(255, 255, 255, .14), transparent 60%),
        linear-gradient(120deg, var(--sj-red) 0%, #b3172a 100%);
    color: #fff;
    border-radius: var(--sj-radius-lg);
    padding: clamp(28px, 4vw, 44px) clamp(22px, 4vw, 52px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    box-shadow: var(--sj-shadow-lg);
}
.sj-footer__cta h2 {
    font: 800 clamp(22px, 3vw, 32px)/1.15 var(--sj-font);
    letter-spacing: -.02em;
    color: #fff;
}
.sj-footer__cta p { color: rgba(255, 255, 255, .85); margin-top: 6px; font-size: 16px; }
.sj-footer__cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.sj-footer__top { padding-top: clamp(48px, 6vw, 64px); }

.sj-footer__grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.3fr;
    gap: 40px;
    padding-bottom: 48px;
}
.sj-footer__brand .sj-brand__name { color: #fff; font-size: 18px; }
.sj-footer__brand .sj-brand__sub { color: #ff8a93; }
.sj-footer__about { margin-top: 18px; max-width: 340px; }
.sj-footer__badge {
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 20px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 13px; font-weight: 600;
}

.sj-footer__title {
    font: 700 13px/1 var(--sj-font);
    text-transform: uppercase;
    letter-spacing: .14em;
    color: #fff;
    margin-bottom: 20px !important;
}
.sj-footer__links { list-style: none; }
.sj-footer__links li { margin: 0 0 11px; }
.sj-footer__links a { display: inline-flex; align-items: center; gap: 8px; }
.sj-footer__links a::before {
    content: "";
    width: 6px; height: 1.5px;
    background: var(--sj-red);
    transition: width .2s ease;
}
.sj-footer__links a:hover::before { width: 12px; }

.sj-footer__contact { list-style: none; }
.sj-footer__contact li { display: flex; gap: 12px; margin-bottom: 16px; }
.sj-footer__contact .sj-footer__ico {
    flex: none;
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, .07);
    color: #ff8a93;
}
.sj-footer__contact small { display: block; font-size: 12px; color: rgba(255, 255, 255, .5); text-transform: uppercase; letter-spacing: .1em; }
.sj-footer__contact strong { color: #fff; font-weight: 600; }

.sj-footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
    padding: 22px 0 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 14px;
    color: rgba(255, 255, 255, .55);
}

@media (max-width: 991px) {
    .sj-footer__grid { grid-template-columns: 1fr 1fr; }
    .sj-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 575px) {
    .sj-footer__cta-actions, .sj-footer__cta-actions .sj-btn { width: 100%; }
    .sj-footer__grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
    .sj-footer__contact-col { grid-column: 1 / -1; }
    .sj-footer__bottom { justify-content: center; text-align: center; }
}

/* ---------- Floating call button (mobile) ---------- */
.sj-fab, a.sj-fab {
    position: fixed;
    right: 16px; bottom: 16px;
    z-index: 999;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    border-radius: 999px;
    background: var(--sj-red);
    color: #fff;
    font: 700 15px/1 var(--sj-font);
    text-decoration: none;
    box-shadow: 0 14px 30px -10px rgba(211, 32, 46, .7);
}
.sj-fab:hover { color: #fff; text-decoration: none; }
@media (max-width: 767px) { .sj-fab { display: inline-flex; } }

@media (prefers-reduced-motion: reduce) {
    .sj-topbar__pulse { animation: none; }
    .sj-btn, .sj-nav { transition: none; }
}
