/*
 * Brainwave journal visual refresh.
 *
 * Additive only -- never edits css/main.css or css/dept.css (shared by
 * the rest of the university site), so nothing outside brainwave/ pages
 * is affected. Every rule is scoped under body.bwj-page so even generic
 * Bootstrap/global class names (.point, .overview, .bg-light, etc.)
 * can't leak onto non-Brainwave pages that happen to reuse them.
 *
 * Palette is sourced entirely from the university's own existing brand
 * colors (confirmed in css/main.css): primary blue #0f3db8 and its
 * tonal family, accent orange #f77a10. Nothing new introduced -- just
 * used more deliberately (gradients, soft tints, shadows) for a more
 * current, student-friendly feel while staying on-brand.
 */

body.bwj-page {
    --bwj-primary: #0f3db8;
    --bwj-primary-dark: #00268a;
    --bwj-primary-mid: #1758a8;
    --bwj-primary-light: #1db3ed;
    --bwj-primary-tint: #eaf2ff;
    --bwj-accent: #f77a10;
    --bwj-text: #333c47;
    --bwj-muted: #6b7684;
    --bwj-border: #e3e8f0;
    --bwj-bg-soft: #f5f8fd;
    --bwj-card-bg: #ffffff;
    --bwj-shadow-sm: 0 2px 10px rgba(15, 61, 184, 0.07);
    --bwj-shadow-md: 0 10px 28px rgba(15, 61, 184, 0.13);

    background: var(--bwj-bg-soft);
    color: var(--bwj-text);
}

/* ---------- Banner ---------- */
body.bwj-page .inner-banner {
    position: relative;
    overflow: hidden;
    border-radius: 0 0 22px 22px;
    box-shadow: var(--bwj-shadow-md);
}

/*
 * No overlay here: .banner-wrap wraps the photo AND the title/search
 * band below it (confirmed in main.css -- .banner-info is a normal
 * in-flow block with its own border-bottom, not an absolutely-positioned
 * overlay on the image), so a semi-transparent wash on .banner-wrap
 * bleeds across the title and search bar too. .banner-info h1 already
 * has its own solid blue background + white text from main.css; nothing
 * extra needed here beyond the rounded corners/shadow on .inner-banner.
 */
body.bwj-page .inner-banner h1 {
    font-weight: 800;
    letter-spacing: 0.01em;
}

/* ---------- Main content panel ---------- */
body.bwj-page .overview .col-md-9 {
    background: var(--bwj-card-bg);
    border-radius: 18px;
    box-shadow: var(--bwj-shadow-sm);
    /* .p-0 (Bootstrap) sets padding:0 !important on this same element,
       so these need !important too or they'd be silently overridden.
       Left/right left alone -- the inner .col-sm-12 content div already
       carries Bootstrap's own grid gutter padding on those sides. */
    padding-top: 22px !important;
    padding-bottom: 28px !important;
    animation: bwjFadeUp 0.35s ease both;
}

@keyframes bwjFadeUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    body.bwj-page .overview .col-md-9 {
        animation: none;
    }
}

/* ---------- Section headings ---------- */
body.bwj-page .point {
    font-weight: 800;
    color: var(--bwj-primary-dark);
    padding-bottom: 10px;
    margin-bottom: 20px;
    border-bottom: 3px solid var(--bwj-primary-tint);
    position: relative;
}

body.bwj-page .point::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -3px;
    width: 64px;
    height: 3px;
    background: linear-gradient(90deg, var(--bwj-primary), var(--bwj-accent));
}

/* ---------- Content cards (all 3 markup eras share .bg-light) ---------- */
body.bwj-page .overview h4.bg-light,
body.bwj-page .overview article.bg-light {
    background: var(--bwj-card-bg) !important;
    border: 1px solid var(--bwj-border);
    border-left: 4px solid var(--bwj-primary);
    border-radius: 12px;
    box-shadow: var(--bwj-shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-left-color 0.18s ease;
    font-weight: 400;
}

body.bwj-page .overview h4.bg-light:hover,
body.bwj-page .overview article.bg-light:hover {
    transform: translateY(-3px) scale(1.004);
    box-shadow: var(--bwj-shadow-md);
    border-left-color: var(--bwj-accent);
}

body.bwj-page .overview h4.bg-light span,
body.bwj-page .overview article.bg-light header h4 {
    display: block;
    font-weight: 700;
    color: var(--bwj-primary-dark);
    font-size: 1.05rem;
    line-height: 1.4;
}

body.bwj-page .overview h4.bg-light span a,
body.bwj-page .overview article.bg-light header h4 a {
    color: var(--bwj-primary-dark) !important;
    text-decoration: none;
}

body.bwj-page .overview h4.bg-light span a:hover,
body.bwj-page .overview article.bg-light header h4 a:hover {
    color: var(--bwj-accent) !important;
    text-decoration: underline;
}

body.bwj-page .overview h4.bg-light small,
body.bwj-page .overview article.bg-light p {
    color: var(--bwj-muted);
}

/* ---------- Buttons ---------- */
body.bwj-page .btn-primary {
    background: linear-gradient(135deg, var(--bwj-primary) 0%, var(--bwj-primary-dark) 100%);
    border: none;
    border-radius: 22px;
    padding: 8px 20px;
    font-weight: 600;
    /* Forced explicitly: the diagonal gradient's lighter corner can make
       Bootstrap's default white text look washed out depending on where
       it falls, so pin it to solid white with a shadow for contrast. */
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    box-shadow: 0 4px 12px rgba(15, 61, 184, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

body.bwj-page .btn-primary:hover {
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15, 61, 184, 0.32);
}

/*
 * The "Read More" buttons also carry .lt-blue (a washed-out light-blue
 * background, no !important) and .text-primary (Bootstrap's own blue
 * text, WITH !important) straight from the HTML -- both overridden
 * explicitly here to match .btn-primary's solid, thick, filled look
 * instead of the low-contrast light-blue-on-light-blue original.
 */
body.bwj-page .btn-light {
    background: linear-gradient(135deg, var(--bwj-primary) 0%, var(--bwj-primary-dark) 100%) !important;
    border: none !important;
    border-radius: 22px;
    padding: 8px 20px;
    font-weight: 600;
    color: #fff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    box-shadow: 0 4px 12px rgba(15, 61, 184, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

body.bwj-page .btn-light:hover {
    transform: translateY(-2px);
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(15, 61, 184, 0.32);
}

/* ---------- Left navigation ---------- */
body.bwj-page .implinks {
    list-style: none;
    padding-left: 0;
}

body.bwj-page .implinks li {
    margin-bottom: 4px;
}

body.bwj-page .implinks li a {
    display: block;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--bwj-text);
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, padding-left 0.15s ease;
}

body.bwj-page .implinks li a:hover {
    background: var(--bwj-primary-tint);
    color: var(--bwj-primary-dark);
    padding-left: 18px;
}

body.bwj-page .implinks li a.active {
    background: linear-gradient(135deg, var(--bwj-primary) 0%, var(--bwj-primary-dark) 100%);
    color: #fff;
    font-weight: 700;
    box-shadow: var(--bwj-shadow-sm);
}

body.bwj-page .implinks li a.active:hover {
    color: #fff;
    padding-left: 14px;
}

body.bwj-page .brainwave-logo {
    border-radius: 12px;
    box-shadow: var(--bwj-shadow-sm);
}

/* "Follow us" social icons */
body.bwj-page .overflow-auto .bg-warning {
    background: var(--bwj-primary-tint) !important;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 0 !important;
    transition: background 0.15s ease, transform 0.15s ease;
}

body.bwj-page .overflow-auto .bg-warning:hover {
    background: var(--bwj-primary) !important;
    transform: translateY(-2px);
}

body.bwj-page .overflow-auto .bg-warning .fbk {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--bwj-primary-dark) !important;
    margin: 0 !important;
}

/*
 * SVG icons, not a Font Awesome <i> -- these don't depend on any
 * external icon-font file loading correctly, unlike the fab fa-* icons
 * used here before (which rendered 0x0 in production because the
 * separate "Font Awesome 5 Brands" font wasn't loading, even though
 * other Font Awesome icons elsewhere on the site worked fine).
 */
body.bwj-page .overflow-auto .bg-warning .fbk svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

body.bwj-page .overflow-auto .bg-warning:hover .fbk {
    color: #fff !important;
}

/* ---------- Search widget ---------- */
body.bwj-page .shadow-box {
    border-radius: 14px;
    box-shadow: var(--bwj-shadow-sm);
}

body.bwj-page .search-data.form-control {
    border-radius: 20px 0 0 20px;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

body.bwj-page .search-data.form-control:focus {
    border-color: var(--bwj-primary-light);
    box-shadow: 0 0 0 3px rgba(29, 179, 237, 0.25);
}

body.bwj-page .search-bx .btn-primary {
    border-radius: 0 20px 20px 0;
}

/* ---------- Archive listing ---------- */
body.bwj-page .overview .font-weight-bold.my-2,
body.bwj-page .overview .font-weight-bold.my-3 {
    display: inline-block;
    color: #fff;
    background: linear-gradient(135deg, var(--bwj-primary) 0%, var(--bwj-primary-dark) 100%);
    font-size: 0.95rem;
    padding: 5px 16px;
    border-radius: 20px;
    margin-top: 24px !important;
    box-shadow: var(--bwj-shadow-sm);
}

body.bwj-page .overview ul.pl-1 {
    list-style: none;
    padding-left: 0;
}

body.bwj-page .overview ul.pl-1 li {
    margin-bottom: 6px;
}

body.bwj-page .overview ul.pl-1 li a {
    display: block;
    padding: 10px 16px;
    border-radius: 10px;
    background: var(--bwj-card-bg);
    border: 1px solid var(--bwj-border);
    color: var(--bwj-text);
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

body.bwj-page .overview ul.pl-1 li a:hover {
    background: var(--bwj-primary-tint);
    border-color: var(--bwj-primary-light);
    transform: translateX(4px);
    color: var(--bwj-primary-dark);
}

/* ---------- Typography ---------- */
body.bwj-page p {
    line-height: 1.75;
}

/* ---------- Mobile refinements ---------- */
@media (max-width: 767px) {
    body.bwj-page .inner-banner {
        border-radius: 0 0 16px 16px;
    }

    body.bwj-page .point {
        font-size: 1.3rem;
    }

    body.bwj-page .overview h4.bg-light,
    body.bwj-page .overview article.bg-light {
        margin-bottom: 4px;
    }
}
