:root {
    /* ----- AASCU core colors (Brand Style Guide 2023) ----- */
    --brand-navy: #1E2642;       /* Deep Navy — our strong foundation */
    --brand-navy-700: #2c3658;   /* lifted navy, for hover/active on dark */
    --brand-navy-050: #ecedf2;   /* faint navy tint, for subtle fills */
    --brand-red: #EF3B48;        /* Red — large text, highlights, decorative graphics (≥3:1) */
    --brand-red-600: #d52c39;    /* AA-safe red (4.95:1 on white) — links + button fills */
    --brand-red-700: #b21f2a;    /* darker still, for hover/active on the AA-safe red */
    --brand-red-050: #fdebec;    /* faint red tint, for icon chips */
    --brand-light-gray: #F8F8F8; /* Light Gray — page surface */

    /* ----- Service-line accent colors (used as accents only) ----- */
    --accent-teal: #54AF9E;      /* Student Success */
    --accent-gold: #F7C884;      /* Policy & Advocacy */
    --accent-purple: #5353B4;    /* Leadership Development */
    --accent-clay: #D06F46;      /* Civic & Global Engagement */
    --accent-green: #739563;     /* Communities & Convening */
    --accent-lavender: #ABBBFA;  /* Resources & Expertise */

    --surface: var(--brand-light-gray);
    --surface-card: #ffffff;
    --line: #e4e6ec;
    --ink: var(--brand-navy);    /* body copy = deep navy on white */
    --ink-muted: #5b6275;

    /* Sora for headers & CTAs, Raleway for body — Verdana is the brand's
       substitution font when the Google fonts are unavailable. */
    --font-head: 'Sora', Verdana, system-ui, -apple-system, sans-serif;
    --font-body: 'Raleway', Verdana, system-ui, -apple-system, sans-serif;

    /* The brand keeps soft curves throughout: squares use rounded corners. */
    --radius: 0.6rem;
    --radius-lg: 0.85rem;

    --sidebar-width: 256px;
}

html {
    font-size: 15px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: var(--font-body);
    color: var(--ink);
    background-color: var(--surface);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--font-head);
    font-weight: 700;
    color: var(--brand-navy);
}

/* Links use the AA-safe darker red (4.95:1 on white); the vivid --brand-red is
   reserved for large text and decorative graphics where 3:1 suffices. */
a {
    color: var(--brand-red-600);
    text-decoration-color: rgba(213, 44, 57, 0.5);
}

a:hover {
    color: var(--brand-red-700);
}

/* Visible, branded focus indicator for every interactive element (WCAG 2.4.7).
   :focus-visible keeps it off mouse clicks but on for keyboard/AT navigation. */
a:focus-visible,
.facet-option:focus-visible,
.badge:focus-visible,
.page-link:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--brand-red-600);
    outline-offset: 2px;
    border-radius: 3px;
}

/* Skip-to-content link: off-screen until focused, then pinned top-left. */
.skip-link {
    position: absolute;
    left: 0;
    top: -3rem;
    z-index: 2000;
    padding: 0.5rem 1rem;
    background: var(--brand-navy);
    color: #fff;
    font-family: var(--font-head);
    font-weight: 600;
    border-radius: 0 0 var(--radius) 0;
    transition: top 0.15s ease;
}

.skip-link:focus {
    top: 0;
    color: #fff;
}

/* ---------- Buttons (Bootstrap 5.3 component variables) ---------- */
/* Sora is the brand's call-to-action typeface; red is the CTA color. */
.btn {
    font-family: var(--font-head);
    font-weight: 600;
}

/* White-on-red button text needs 4.5:1, so the fill is the AA-safe red (4.95:1),
   not the vivid --brand-red (3.9:1). */
.btn-primary {
    --bs-btn-bg: var(--brand-red-600);
    --bs-btn-border-color: var(--brand-red-600);
    --bs-btn-hover-bg: var(--brand-red-700);
    --bs-btn-hover-border-color: var(--brand-red-700);
    --bs-btn-active-bg: var(--brand-red-700);
    --bs-btn-active-border-color: var(--brand-red-700);
}

/* Deep-navy secondary action, the brand's foundation color. */
.btn-secondary {
    --bs-btn-bg: var(--brand-navy);
    --bs-btn-border-color: var(--brand-navy);
    --bs-btn-hover-bg: var(--brand-navy-700);
    --bs-btn-hover-border-color: var(--brand-navy-700);
    --bs-btn-active-bg: var(--brand-navy-700);
    --bs-btn-active-border-color: var(--brand-navy-700);
}

.btn-outline-primary {
    --bs-btn-color: var(--brand-red-600);
    --bs-btn-border-color: var(--brand-red-600);
    --bs-btn-hover-bg: var(--brand-red-600);
    --bs-btn-hover-border-color: var(--brand-red-600);
    --bs-btn-active-bg: var(--brand-red-700);
    --bs-btn-active-border-color: var(--brand-red-700);
}

.btn-link {
    --bs-btn-color: var(--brand-red-600);
    --bs-btn-hover-color: var(--brand-red-700);
    text-decoration: none;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus,
.form-control:focus, .form-select:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(239, 59, 72, 0.25);
    border-color: var(--brand-red);
}

.form-check-input:checked {
    background-color: var(--brand-red);
    border-color: var(--brand-red);
}

/* ---------- Cards ---------- */
.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(30, 38, 66, 0.05);
}

/* ---------- Tables ---------- */
.table {
    --bs-table-hover-bg: var(--brand-navy-050);
    background-color: var(--surface-card);
}

.table > thead {
    background-color: var(--surface);
}

.table > thead th {
    color: var(--ink-muted);
    font-family: var(--font-head);
    font-size: 0.74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid var(--line);
}

/* ---------- Forms ---------- */
.form-label {
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.25rem;
}

.form-text {
    color: var(--ink-muted);
}

/* ---------- Badges ---------- */
.badge-public {
    color: #14524a;
    background-color: #e4f3f0;   /* teal-tinted (Student Success accent) */
}

.badge-private {
    color: var(--brand-navy);
    background-color: var(--brand-navy-050);
}

/* Active-filter chips on /Search: brand navy (white-on-navy, well past AA) instead of
   Bootstrap's default blue text-bg-primary. The chip is an <a>, so the :hover rule must
   match a:hover's specificity to keep white text on hover. */
.badge-filter {
    background-color: var(--brand-navy);
    color: #fff;
}

.badge-filter:hover,
.badge-filter:focus {
    background-color: var(--brand-navy-700);
    color: #fff;
}

/* ---------- Search facet: match any/all toggle ---------- */
/* Sits to the right of a taxonomy group's title; kept small so it doesn't crowd the heading.
   Always visible (discoverable) but muted + non-interactive until 2+ options are selected. */
.match-mode .btn {
    --bs-btn-padding-y: 0.05rem;
    --bs-btn-padding-x: 0.4rem;
    --bs-btn-font-size: 0.68rem;
    font-family: var(--font-head);
    font-weight: 600;
    /* WCAG 2.2 §2.5.8 Target Size (Minimum): keep the small toggle ≥ 24×24px. */
    min-width: 24px;
    min-height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.match-mode-muted .btn.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Long facets (Sponsor + taxonomy groups) cap their option list to ~6 rows and scroll the
   rest, paired with the type-to-filter box above. Height is in em so it tracks the font size;
   the partial 7th row hints that more is below. */
.facet-options-scroll {
    max-height: 11.25rem;
    overflow-y: auto;
    padding-right: 0.25rem;
    scrollbar-gutter: stable;
}

/* Facet option rows: long labels wrap (no horizontal scrollbar) with a hanging indent — the check
   glyph stays in its own column on the first line, wrapped lines align under the label text. The
   <wbr>s injected by FacetLabel give clean break points after commas/slashes; overflow-wrap is the
   safety net for any remaining long token. min-width:0 lets the flex text column shrink to wrap. */
.facet-check { flex-shrink: 0; }
.facet-option-text { min-width: 0; }
.facet-option-name { overflow-wrap: break-word; }

/* ========================================================= */
/*  Brand mark (logo + product wordmark)                     */
/* ========================================================= */
/* The program-logo treatment from the guide: AASCU mark, a red dividing
   rule, then the product name. Reverse logo is used on navy surfaces. */
.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.brand-logo {
    height: 68px;
    width: auto;
    display: block;
}

.brand-divider {
    display: inline-block;
    width: 1px;
    align-self: stretch;
    min-height: 50px;
    background: var(--brand-red);
}

/* Kept subordinate to the logo — the AASCU mark leads, the product name supports. */
.brand-product {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

/* ========================================================= */
/*  Public site                                              */
/* ========================================================= */
.public-navbar {
    background-color: var(--brand-navy);
}

.public-navbar .navbar-brand,
.public-navbar .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

.public-navbar .nav-link {
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.95rem;
}

.public-navbar .nav-link:hover,
.public-navbar .nav-link.active {
    color: #fff;
}

.public-navbar .brand-product {
    color: #fff;
}

.site-footer {
    border-top: 1px solid var(--line);
    color: var(--ink-muted);
    background-color: var(--surface-card);
    padding: 1.75rem 0;
}

.site-footer .footer-logo {
    height: 60px;
    width: auto;
}

/* Deep navy is the brand foundation; a red "spotlight" circle (filled, top
   emphasis) plus a supportive outline circle bring the signature curves. */
.public-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background: var(--brand-navy);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 3.5rem 2rem;
}

.public-hero::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 18rem;
    height: 18rem;
    border-radius: 50%;
    background: var(--brand-red);
    top: -7rem;
    left: -5rem;
    opacity: 0.9;
}

.public-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    width: 13rem;
    height: 13rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    bottom: -5rem;
    right: -3rem;
}

.public-hero h1 {
    color: #fff;
}

.public-hero .lead {
    color: rgba(255, 255, 255, 0.9);
}

/* Subtle rounded "spotlight" frame for a circular image/badge accent. */
.spotlight-circle {
    border-radius: 50%;
    overflow: hidden;
}

/* ========================================================= */
/*  Admin shell                                              */
/* ========================================================= */
.admin-shell {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: var(--sidebar-width);
    /* !important overrides Bootstrap's `.offcanvas-lg { background-color: transparent !important }`
       which otherwise wins at >=lg widths and leaves white nav text on a light surface. */
    background: var(--brand-navy) !important;
    color: rgba(255, 255, 255, 0.82);
}

@media (min-width: 992px) {
    .admin-sidebar {
        flex: 0 0 var(--sidebar-width);
    }
}

/* Stacked lockup (the guide's treatment for narrow/squared spaces): AASCU logo
   on top, a red dividing rule, then the product name — fits the fixed-width sidebar
   without the horizontal row overflowing into the content area. */
.admin-sidebar .admin-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1.25rem;
    color: #fff;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    text-align: center;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* In the stacked lockup the red divider is a horizontal rule under the logo. */
.admin-sidebar .admin-brand .brand-divider {
    align-self: stretch;
    width: auto;
    height: 1px;
    min-height: 0;
}

.admin-nav {
    padding: 0.75rem 0.75rem 2rem;
}

.admin-nav .nav-section {
    padding: 1rem 0.75rem 0.35rem;
    font-family: var(--font-head);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
}

.admin-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.15rem;
    border-radius: 0.45rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.95rem;
}

.admin-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.admin-nav .nav-link.active {
    background: var(--brand-red);
    color: #fff;
    font-weight: 600;
}

.admin-nav .nav-ico {
    width: 1.1rem;
    text-align: center;
    opacity: 0.9;
}

/* Collapsible group toggle */
.admin-nav .nav-group-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.admin-nav .nav-caret {
    margin-left: auto;
    font-size: 0.7rem;
    opacity: 0.7;
    transition: transform 0.15s ease;
}

.admin-nav .nav-group-toggle:not(.collapsed) .nav-caret {
    transform: rotate(90deg);
}

/* Nested submenu */
.admin-nav .nav-sub {
    margin: 0.1rem 0 0.4rem 1.1rem;
    padding-left: 0.6rem;
    border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.admin-nav .nav-sub .nav-link {
    font-size: 0.9rem;
}

/* Planned-but-unbuilt sections */
.admin-nav .nav-disabled,
.admin-nav .nav-disabled:hover {
    color: rgba(255, 255, 255, 0.5);
    background: transparent;
    cursor: default;
}

.admin-nav .nav-soon {
    margin-left: auto;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    padding: 0.1rem 0.35rem;
    border-radius: 0.3rem;
}

.admin-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-topbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--surface-card);
    border-bottom: 1px solid var(--line);
    padding: 0.75rem 1.5rem;
}

.admin-topbar .topbar-title {
    font-family: var(--font-head);
    font-weight: 600;
    color: var(--brand-navy);
}

.admin-topbar .topbar-user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--ink-muted);
    font-size: 0.9rem;
}

.admin-content {
    padding: 1.75rem;
    max-width: 1200px;
    width: 100%;
}

/* Wide data-table pages (opportunity list, etc.) opt out of the readable-form width cap so the table
   uses the available width instead of leaving whitespace on the right. Still bounded so a table doesn't
   stretch absurdly on ultrawide monitors. Views request this via ViewData["WideContent"] = true. */
.admin-content--wide {
    max-width: 1600px;
}

/* Dashboard tiles */
.tile-card {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
    transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.tile-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(30, 38, 66, 0.10);
    border-color: var(--brand-red);
    color: inherit;
}

.tile-card .tile-ico {
    display: inline-grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.55rem;
    background: var(--brand-red-050);
    color: var(--brand-red);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.page-header {
    margin-bottom: 1.5rem;
}

.page-header h1 {
    margin-bottom: 0.15rem;
}

/* Sidebar offcanvas tweaks on mobile */
@media (max-width: 991.98px) {
    .admin-sidebar {
        width: var(--sidebar-width);
    }
}
