/* =========================================================
   OttawaBBS 2026 redesign — phase 1 (site look + homepage)
   Everything is scoped to body.obbs-redesign so switching the
   option off restores the previous look.            @since 0.10.0
   ========================================================= */

body.obbs-redesign {
    --obbs-ink: #15202B;
    --obbs-ink-2: #3A4652;
    --obbs-muted: #5B6672;
    --obbs-line: #E3E6EA;
    --obbs-line-2: #EEF0F2;
    --obbs-ground: #F6F7F8;
    --obbs-soft: #F1F3F5;
    --obbs-red: #C8102E;
    --obbs-red-ink: #A50D26;
    --obbs-teal: #0F3D4C;
    --obbs-teal-soft: #C9DCE2;
    --obbs-radius: 16px;
    --obbs-serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
    --obbs-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;

    /* Blocksy palette: links and buttons follow the new accent. */
    --theme-palette-color-1: #C8102E;
    --theme-palette-color-2: #A50D26;
    --theme-palette-color-3: #15202B;
    --theme-palette-color-4: #3A4652;
    --theme-font-family: var(--obbs-sans);
    --theme-text-color: var(--obbs-ink-2);
    --theme-headings-color: var(--obbs-ink);

    background: var(--obbs-ground);
    color: var(--obbs-ink-2);
    font-family: var(--obbs-sans);
}

/* ---------- Header (Blocksy) ---------- */
body.obbs-redesign #header [data-row="middle"] {
    background: #FFFFFF;
    border-bottom: 1px solid var(--obbs-line);
    box-shadow: none;
}
body.obbs-redesign #header .menu {
    align-items: center;
}
body.obbs-redesign #header .menu > li {
    display: flex;
    align-items: center;
}
/* Blocksy stretches links to the full row height; keep a compact pill. */
body.obbs-redesign #header .menu > li > .ct-menu-link {
    height: 40px !important;
    min-height: 0;
    line-height: 20px;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--obbs-ink-2);
    font-weight: 500;
    font-size: 15px;
}
body.obbs-redesign #header .menu > li > .ct-menu-link:hover {
    background: var(--obbs-soft);
    color: var(--obbs-ink);
}
body.obbs-redesign #header .menu > li.current-menu-item > .ct-menu-link,
body.obbs-redesign #header .menu > li.current-menu-ancestor > .ct-menu-link {
    background: var(--obbs-soft);
    color: var(--obbs-ink);
    font-weight: 700;
}
body.obbs-redesign #header .menu > li > .ct-menu-link::before,
body.obbs-redesign #header .menu > li > .ct-menu-link::after {
    display: none;
}
body.obbs-redesign #header .ct-header-account .ct-label {
    color: var(--obbs-ink-2);
    font-weight: 500;
}
body.obbs-redesign #header .ct-header-cta .ct-button {
    min-height: 44px;
    padding: 0 18px;
    border-radius: 10px;
    background: var(--obbs-red);
    border-color: var(--obbs-red);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 15px;
}
body.obbs-redesign #header .ct-header-cta .ct-button:hover {
    background: var(--obbs-red-ink);
    border-color: var(--obbs-red-ink);
}

/* ---------- Logo: maple leaf with speech bubble + 渥京论坛 / ottawabbs.ca ----------
   The uploaded logo image stays in the markup (visually hidden) so its alt text
   still names the link; the mark is an SVG and the words use the site's serif.  @since 0.13.0 */
body.obbs-redesign .site-branding .site-logo-container {
    position: relative;
    display: inline-grid !important;
    grid-template-columns: auto;
    align-content: center;
    row-gap: 4px;
    min-height: 46px;
    padding-left: 56px;
    background: url("../img/logo-mark.svg") no-repeat left center / 46px 46px;
    color: var(--obbs-ink);
    text-decoration: none;
}
body.obbs-redesign .site-branding .site-logo-container img {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}
body.obbs-redesign .site-branding .site-logo-container::before {
    content: "渥京论坛";
    color: var(--obbs-ink);
    font-family: var(--obbs-serif);
    font-size: 25px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: 1px;
    white-space: nowrap;
}
body.obbs-redesign .site-branding .site-logo-container::after {
    content: "ottawabbs.ca";
    color: var(--obbs-ink-2);
    font-family: var(--obbs-sans);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .5px;
    white-space: nowrap;
}
@media (max-width: 999px) {
    body.obbs-redesign .site-branding .site-logo-container {
        min-height: 38px;
        padding-left: 46px;
        background-size: 38px 38px;
        row-gap: 3px;
    }
    body.obbs-redesign .site-branding .site-logo-container::before {
        font-size: 21px;
    }
    body.obbs-redesign .site-branding .site-logo-container::after {
        font-size: 11px;
    }
}

/* ---------- Footer (Blocksy) ---------- */
body.obbs-redesign #footer [data-row] {
    background: #FFFFFF;
}
body.obbs-redesign #footer [data-row="top"] {
    border-top: 1px solid var(--obbs-line);
}
body.obbs-redesign #footer .ct-menu-link {
    color: var(--obbs-ink-2);
    font-size: 14px;
}
body.obbs-redesign #footer .ct-menu-link:hover {
    color: var(--obbs-red-ink);
}

/* ---------- Shared plugin pieces ---------- */
body.obbs-redesign .ottawabbs-unified-search-button,
body.obbs-redesign .ottawabbs-button,
body.obbs-redesign .ottawabbs-event-submit-button {
    background: var(--obbs-ink) !important;
    border-color: var(--obbs-ink) !important;
    color: #FFFFFF !important;
}
body.obbs-redesign .ottawabbs-unified-search-button:hover,
body.obbs-redesign .ottawabbs-button:hover,
body.obbs-redesign .ottawabbs-event-submit-button:hover {
    background: #26313C !important;
}
body.obbs-redesign .ottawabbs-ottnews-more,
body.obbs-redesign .ottawabbs-blog-featured-more {
    color: var(--obbs-red-ink) !important;
}

/* =========================================================
   Homepage
   ========================================================= */
body.obbs-redesign-home {
    overflow-x: clip;
}
/* The page container is already full width; 100vw would add the scrollbar width. */
body.obbs-redesign .obbs-home {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 0 56px;
    color: var(--obbs-ink-2);
    font-size: 15px;
    line-height: 1.6;
}
.obbs-home *,
.obbs-home *::before,
.obbs-home *::after {
    box-sizing: border-box;
}
.obbs-home a {
    text-decoration: none;
}
.obbs-home .obbs-wrap {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}
.obbs-home .obbs-icon {
    flex-shrink: 0;
}

/* ---------- Hero ---------- */
.obbs-home .obbs-hero {
    background: #FFFFFF;
    border-bottom: 1px solid var(--obbs-line);
}
.obbs-home .obbs-hero-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 40px;
    padding-top: 56px;
    padding-bottom: 56px;
}
.obbs-home .obbs-hero-main {
    flex: 999 1 520px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}
.obbs-home .obbs-eyebrow {
    margin: 0;
    color: var(--obbs-red-ink);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
}
.obbs-home .obbs-hero-title {
    margin: 0;
    color: var(--obbs-ink);
    font-family: var(--obbs-serif);
    font-weight: 900;
    font-size: clamp(34px, 4.6vw, 58px);
    line-height: 1.2;
    letter-spacing: 1px;
}
.obbs-home .obbs-accent {
    color: var(--obbs-red);
}
.obbs-home .obbs-hero-sub {
    margin: 0;
    max-width: 520px;
    color: #4A5560;
    font-size: 17px;
}

/* Unified search inside the hero */
.obbs-home .obbs-hero-search .ottawabbs-unified-search-form {
    width: 100% !important;
    max-width: 620px;
    margin: 4px 0 0 !important;
}
.obbs-home .obbs-hero-search .ottawabbs-unified-search-inner {
    align-items: center;
    height: 56px;
    padding: 0 5px 0 6px;
    border: 1.5px solid #CDD3D9;
    border-radius: 12px;
    box-shadow: none;
}
.obbs-home .obbs-hero-search .ottawabbs-unified-search-inner:focus-within {
    border-color: var(--obbs-ink);
    box-shadow: 0 0 0 3px rgba(21, 32, 43, .08);
}
.obbs-home .obbs-hero-search .ottawabbs-unified-search-input {
    height: 52px;
    padding: 0 12px !important;
    color: var(--obbs-ink);
    font-size: 16px;
}
.obbs-home .obbs-hero-search .ottawabbs-unified-search-button {
    min-width: 76px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 20px !important;
    border-radius: 9px !important;
    font-size: 16px;
    font-weight: 700;
}
.obbs-home .obbs-hot-searches {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}
.obbs-home .obbs-hot-searches span {
    color: var(--obbs-muted);
}
.obbs-home .obbs-hot-searches a {
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--obbs-soft);
    color: var(--obbs-ink-2);
}
.obbs-home .obbs-hot-searches a:hover {
    background: #E6E9EC;
    color: var(--obbs-ink);
}

/* Newcomer card */
.obbs-home .obbs-newcomer {
    flex: 1 1 320px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 32px;
    border-radius: 20px;
    background: var(--obbs-teal);
    color: #FFFFFF;
}
.obbs-home .obbs-newcomer-head {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #F2B8C2;
}
.obbs-home .obbs-newcomer h2 {
    margin: 0;
    color: #FFFFFF;
    font-family: var(--obbs-serif);
    font-weight: 900;
    font-size: 26px;
}
.obbs-home .obbs-newcomer p {
    margin: 0;
    color: var(--obbs-teal-soft);
}
.obbs-home .obbs-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}
.obbs-home .obbs-steps a {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 52px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .08);
    color: #FFFFFF;
    font-weight: 500;
}
.obbs-home .obbs-steps a:hover {
    background: rgba(255, 255, 255, .15);
    color: #FFFFFF;
}
.obbs-home .obbs-step-no {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #FFFFFF;
    color: var(--obbs-teal);
    font-size: 14px;
    font-weight: 700;
}
.obbs-home .obbs-step-text {
    flex-grow: 1;
}

/* ---------- Section heads ---------- */
.obbs-home .obbs-section {
    padding-top: 40px;
}
.obbs-home .obbs-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}
.obbs-home .obbs-section-head h2 {
    margin: 0;
    color: var(--obbs-ink);
    font-size: 20px;
    font-weight: 700;
}
.obbs-home .obbs-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 0;
    color: var(--obbs-red-ink);
    font-size: 14px;
    font-weight: 500;
}

/* ---------- Shortcut tiles ---------- */
.obbs-home .obbs-shortcuts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.obbs-home .obbs-shortcut {
    flex: 1 1 160px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
    border: 1px solid var(--obbs-line);
    border-radius: var(--obbs-radius);
    background: #FFFFFF;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.obbs-home .obbs-shortcut:hover {
    border-color: #B9C0C8;
    box-shadow: 0 6px 18px rgba(21, 32, 43, .07);
    transform: translateY(-1px);
}
.obbs-home .obbs-shortcut-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
}
.obbs-home .obbs-tone-red { background: #FDECEF; color: #A50D26; }
.obbs-home .obbs-tone-teal { background: #E7F1F4; color: #0F3D4C; }
.obbs-home .obbs-tone-amber { background: #FFF1E3; color: #9A4A0B; }
.obbs-home .obbs-tone-blue { background: #EAEFFB; color: #2B4C9B; }
.obbs-home .obbs-tone-green { background: #E8F4EC; color: #1E6B3A; }
.obbs-home .obbs-tone-purple { background: #F3EAF8; color: #6B2E8C; }
.obbs-home .obbs-shortcut-name {
    color: var(--obbs-ink);
    font-size: 16px;
    font-weight: 700;
}
.obbs-home .obbs-shortcut-desc {
    color: var(--obbs-muted);
    font-size: 13px;
    line-height: 1.5;
}

/* ---------- Two columns ---------- */
.obbs-home .obbs-columns {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 24px;
    padding-top: 40px;
}
.obbs-home .obbs-main {
    flex: 999 1 560px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.obbs-home .obbs-main .obbs-section-head {
    margin-bottom: 0;
}
.obbs-home .obbs-side {
    flex: 1 1 320px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Ask prompt */
.obbs-home .obbs-composer {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid var(--obbs-line);
    border-radius: 14px;
    background: #FFFFFF;
    color: var(--obbs-muted);
}
.obbs-home .obbs-composer:hover {
    border-color: #B9C0C8;
    color: var(--obbs-muted);
}
.obbs-home .obbs-composer-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: var(--obbs-soft);
}
.obbs-home .obbs-composer-text {
    flex-grow: 1;
    min-width: 0;
}
.obbs-home .obbs-composer-btn {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    background: var(--obbs-ink);
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 700;
}

/* Tabs */
.obbs-home .obbs-tabs {
    display: inline-flex;
    align-self: flex-start;
    gap: 2px;
    padding: 4px;
    border-radius: 10px;
    background: #ECEEF1;
}
.obbs-home .obbs-tabs button {
    height: 36px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #4A5560;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.obbs-home .obbs-tabs button[aria-selected="true"] {
    background: #FFFFFF;
    color: var(--obbs-ink);
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(21, 32, 43, .12);
}
.obbs-home .obbs-tabs button:focus-visible {
    outline: 2px solid var(--obbs-ink);
    outline-offset: 1px;
}

/* Topic panels: one card holding rows */
.obbs-home .obbs-panel {
    overflow: hidden;
    border: 1px solid var(--obbs-line);
    border-radius: var(--obbs-radius);
    background: #FFFFFF;
}
.obbs-home .obbs-panel[hidden] {
    display: none;
}
.obbs-home .obbs-panel .ottawabbs-recent-topics ul {
    margin: 0 !important;
    padding: 0 !important;
}
.obbs-home .obbs-panel .ottawabbs-recent-topics li {
    margin: 0 !important;
    list-style: none !important;
}
.obbs-home .obbs-panel .ottawabbs-recent-topics .wpforo-list-item {
    padding: 18px 20px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--obbs-line-2) !important;
    border-radius: 0 !important;
    background: #FFFFFF !important;
    box-shadow: none !important;
    transform: none !important;
}
.obbs-home .obbs-panel .ottawabbs-recent-topics .wpforo-list-item:hover {
    background: #FAFBFB !important;
}
.obbs-home .obbs-panel .ottawabbs-recent-topics .posttitle {
    margin: 0 0 6px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
}
.obbs-home .obbs-panel .ottawabbs-recent-topics .posttitle a {
    color: var(--obbs-ink) !important;
}
.obbs-home .obbs-panel .ottawabbs-recent-topics .posttitle a:hover {
    color: var(--obbs-red-ink) !important;
}
.obbs-home .obbs-panel .ottawabbs-recent-topics .postuser {
    color: var(--obbs-muted) !important;
    font-size: 13px !important;
}
.obbs-home .obbs-badge-open {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 9px;
    border-radius: 999px;
    background: #FDECEF;
    color: var(--obbs-red-ink);
    font-size: 12px;
    font-weight: 700;
    vertical-align: 1px;
}
.obbs-home .obbs-panel-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px;
    background: #FAFBFB;
    color: var(--obbs-ink-2);
    font-weight: 500;
}
.obbs-home .obbs-panel-more:hover {
    color: var(--obbs-red-ink);
}

/* ---------- Sidebar ---------- */
.obbs-home .obbs-card,
.obbs-home .obbs-side .ottawabbs-ottnews,
.obbs-home .obbs-side .ottawabbs-blog-featured {
    padding: 20px;
    border: 1px solid var(--obbs-line);
    border-radius: var(--obbs-radius);
    background: #FFFFFF;
}
.obbs-home .obbs-card-head,
.obbs-home .obbs-side .ottawabbs-ottnews-header,
.obbs-home .obbs-side .ottawabbs-blog-featured-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.obbs-home .obbs-card-head h2,
.obbs-home .obbs-side .ottawabbs-ottnews-header h3,
.obbs-home .obbs-side .ottawabbs-blog-featured-header h3 {
    margin: 0;
    color: var(--obbs-ink);
    font-size: 17px;
    font-weight: 700;
}
.obbs-home .obbs-card-head a {
    color: var(--obbs-red-ink);
    font-size: 13px;
    font-weight: 500;
}

/* News: a single column list in the sidebar */
.obbs-home .obbs-side .ottawabbs-ottnews-grid {
    display: flex;
    flex-direction: column;
}
.obbs-home .obbs-side .ottawabbs-ottnews-item,
.obbs-home .obbs-side .ottawabbs-ottnews-item:first-child {
    padding: 12px 0;
    border-left: 0;
    border-top: 1px solid var(--obbs-line-2);
    border-bottom: 0;
}
.obbs-home .obbs-side .ottawabbs-ottnews-title {
    color: var(--obbs-ink) !important;
    font-size: 15px;
    font-weight: 500;
}
.obbs-home .obbs-side .ottawabbs-ottnews-title:hover {
    color: var(--obbs-red-ink) !important;
}
.obbs-home .obbs-side .ottawabbs-ottnews-meta,
.obbs-home .obbs-side .ottawabbs-blog-featured-meta {
    color: var(--obbs-muted);
}

/* Next event */
.obbs-home .obbs-event p {
    margin: 0;
}
.obbs-home .obbs-event .ottawabbs-next-event {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-top: 10px;
    border-top: 1px solid var(--obbs-line-2);
}
.obbs-home .obbs-event .ottawabbs-next-event strong,
.obbs-home .obbs-event .ottawabbs-next-event strong a {
    color: var(--obbs-ink);
    font-size: 15px;
}
.obbs-home .obbs-event .ottawabbs-next-event p + p {
    color: var(--obbs-muted);
    font-size: 13px;
}

/* Chat */
.obbs-home .obbs-chat {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    border: 0;
    background: var(--obbs-ink);
    color: #FFFFFF;
}
.obbs-home .obbs-chat-head {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #F2B8C2;
}
.obbs-home .obbs-chat h2 {
    margin: 0;
    color: #FFFFFF;
    font-size: 17px;
    font-weight: 700;
}
.obbs-home .obbs-chat p {
    margin: 0;
    color: #C3CAD2;
    font-size: 14px;
}
.obbs-home .obbs-btn-light {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 6px;
    height: 44px;
    margin-top: 4px;
    padding: 0 18px;
    border-radius: 10px;
    background: #FFFFFF;
    color: var(--obbs-ink);
    font-size: 14px;
    font-weight: 700;
}
.obbs-home .obbs-btn-light:hover {
    color: var(--obbs-red-ink);
}

/* Blog picks */
.obbs-home .obbs-side .ottawabbs-blog-featured-item {
    border-bottom-color: var(--obbs-line-2);
}
.obbs-home .obbs-side .ottawabbs-blog-featured-title {
    color: var(--obbs-ink) !important;
    font-size: 15px;
}
.obbs-home .obbs-side .ottawabbs-blog-featured-title:hover {
    color: var(--obbs-red-ink) !important;
}

/* ---------- Phones ---------- */
@media (max-width: 600px) {
    /* The logo already carries this tagline on phones. */
    .obbs-home .obbs-eyebrow {
        display: none;
    }
    .obbs-home .obbs-wrap {
        padding-left: 16px;
        padding-right: 16px;
    }
    .obbs-home .obbs-hero-inner {
        gap: 28px;
        padding-top: 36px;
        padding-bottom: 36px;
    }
    .obbs-home .obbs-newcomer {
        padding: 24px;
    }
    .obbs-home .obbs-hero-search .ottawabbs-unified-search-button {
        min-width: 64px !important;
        padding: 0 14px !important;
    }
    .obbs-home .obbs-panel .ottawabbs-recent-topics .wpforo-list-item {
        padding: 16px !important;
    }
}
