/*
 * Design D7 (owner request 25 Nov 2026): use all three logo colours, not green alone.
 * Rule of thumb 60-30-10: light neutral surfaces (60), logo green for trust and structure (30),
 * logo red for actions and logo gold for highlights (10). Logo red/green/gold cannot carry small white text
 * (contrast 4.5:1 / 2.6:1 / 1.8:1), so text uses the deeper shades below; the pure logo colours are used
 * for stripes, borders, icons and large shapes only. Loaded last; deleting this file restores D1-D6.
 */
:root {
    --gh-logo-red: #e52229; --gh-logo-green: #51b64b; --gh-logo-gold: #f4b90a;
    --gh-red-700: #b3141c; --gh-red-800: #8f1016; --gh-red-50: #fdecec;
    --gh-gold-700: #8a6100; --gh-gold-50: #fff6dc;
    --gh-maroon-700: #b3141c;
    --gh-tri: linear-gradient(90deg, var(--gh-logo-red) 0 33.4%, var(--gh-logo-gold) 33.4% 66.7%, var(--gh-logo-green) 66.7% 100%);
}

/* Tri-colour stripe: header, footer, inner page headers */
.gh-header { position: relative; }
.gh-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; background: var(--gh-tri); pointer-events: none; }
#footer.gh-footer { position: relative; background: radial-gradient(1200px 400px at 85% -10%, rgba(229, 34, 41, .16), transparent 60%), radial-gradient(900px 380px at 0% 0%, rgba(244, 185, 10, .10), transparent 55%), #0e2f1f !important; }
#footer.gh-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--gh-tri); }
#footer.gh-footer h2 { position: relative; padding-bottom: 8px; }
#footer.gh-footer h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 38px; height: 3px; border-radius: 3px; background: var(--gh-logo-gold); }
.gh-footer .gh-cols > div:nth-child(1) h2::after { background: var(--gh-logo-red); }
.gh-footer .gh-cols > div:nth-child(3) h2::after { background: var(--gh-logo-green); }
.gh-footer a:hover { color: var(--gh-logo-gold); }
body.gh-inner > main:first-of-type:has(.main-heading) { border-bottom: 4px solid; border-image: var(--gh-tri) 1; }
body.gh-inner > main:first-of-type:has(.main-heading)::before {
    background: radial-gradient(600px 300px at 88% 20%, rgba(229, 34, 41, .35), transparent 65%), radial-gradient(520px 260px at 10% 90%, rgba(244, 185, 10, .22), transparent 60%), linear-gradient(120deg, rgba(18, 61, 40, .94), rgba(18, 61, 40, .72));
}

/* Top bar: green with a red edge */
.gh-topbar { background: linear-gradient(90deg, var(--gh-red-800) 0, var(--gh-red-700) 6px, var(--gh-green-900) 6px) !important; }

/* Actions: red is the call to action, green stays for secondary actions */
.gh-btn-primary, .gh-actions .gh-btn-primary { background: var(--gh-red-700); color: #fff; box-shadow: 0 6px 16px rgba(179, 20, 28, .22); }
.gh-btn-primary:hover, .gh-btn-primary:focus-visible { background: var(--gh-red-800); color: #fff; }
.gh-btn-outline { border-color: var(--gh-green-700) !important; color: var(--gh-green-700) !important; }
.gh-btn-outline:hover { background: var(--gh-green-700) !important; color: #fff !important; }
.gh-header .navbar-nav .nav-link:hover, .gh-header .navbar-nav .nav-link.show { background: var(--gh-gold-50); color: var(--gh-red-700); box-shadow: inset 0 -2px 0 var(--gh-logo-gold); }
.gh-header .dropdown-menu { border-top: 3px solid var(--gh-logo-gold); }
.gh-header .dropdown-item:hover, .gh-header .dropdown-item:focus { background: var(--gh-gold-50); color: var(--gh-red-700); }
.gh-toggler { border-color: var(--gh-red-700) !important; color: var(--gh-red-700); }

/* Eyebrows and section titles: red label, green title, short tri-colour rule */
.gh-eyebrow, .gh-pr-eyebrow { color: var(--gh-red-700) !important; }
.gh-section-title, .gh-pr-section > h2, .gh-about h2 { position: relative; padding-bottom: 14px; }
.gh-section-title::after, .gh-pr-section > h2::after, .gh-about h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 72px; height: 4px; border-radius: 4px; background: var(--gh-tri); }

/* Home: hero glow in all three colours, quick links and stats cycle the colours */
.gh-hero { background: radial-gradient(700px 360px at 92% 8%, rgba(244, 185, 10, .22), transparent 60%), radial-gradient(640px 340px at 70% 100%, rgba(229, 34, 41, .12), transparent 60%), radial-gradient(600px 320px at 0% 30%, rgba(81, 182, 75, .14), transparent 60%), var(--gh-cream) !important; }
.gh-quick a { border-top: 4px solid var(--gh-logo-green) !important; }
.gh-quick a:nth-child(3n+1) { border-top-color: var(--gh-logo-red) !important; }
.gh-quick a:nth-child(3n+2) { border-top-color: var(--gh-logo-gold) !important; }
.gh-quick .gh-ico.m { background: var(--gh-red-50) !important; color: var(--gh-red-700) !important; }
.gh-quick .gh-ico.g { background: var(--gh-gold-50) !important; color: var(--gh-gold-700) !important; }
.gh-stats { background: var(--gh-green-900) !important; }
.gh-stat b { color: var(--gh-logo-gold) !important; }
.gh-stat:nth-child(3n+1) b { color: #ff8a8f !important; }
.gh-stat:nth-child(3n+3) b { color: #8fdc8a !important; }

/* Cards and tiles: coloured top edge in turn */
.gh-pr-dept:nth-child(3n+1) { border-top-color: var(--gh-logo-red) !important; }
.gh-pr-dept:nth-child(3n+2) { border-top-color: var(--gh-logo-gold) !important; }
.gh-pr-dept:nth-child(3n+3) { border-top-color: var(--gh-logo-green) !important; }
.gh-pr-dept .gh-btn-primary { background: var(--gh-green-700); box-shadow: none; }
.gh-pr-tile:nth-child(3n+1) i { background: var(--gh-red-50); color: var(--gh-red-700); }
.gh-pr-tile:nth-child(3n+2) i { background: var(--gh-gold-50); color: var(--gh-gold-700); }
.gh-pr-list li::before { background: var(--gh-logo-red); }
.gh-pr-list li:nth-child(3n+2)::before { background: var(--gh-logo-gold); }
.gh-pr-list li:nth-child(3n+3)::before { background: var(--gh-logo-green); }
.gh-pr-card-dark { background: radial-gradient(400px 220px at 100% 0%, rgba(229, 34, 41, .35), transparent 65%), var(--gh-green-900); }
.gh-pr-join { background: radial-gradient(600px 300px at 100% 0%, rgba(229, 34, 41, .30), transparent 60%), radial-gradient(500px 260px at 0% 100%, rgba(244, 185, 10, .18), transparent 60%), var(--gh-green-900); }
.gh-pr-toc a:hover, .gh-pr-toc a:focus-visible { background: var(--gh-gold-50); color: var(--gh-red-700); }
.gh-course-notes { border-left-color: var(--gh-logo-red) !important; }
body.gh-inner #our-courses thead th { background: linear-gradient(180deg, var(--gh-green-900), #0f3322) !important; border-bottom: 3px solid var(--gh-logo-gold) !important; }

@media (prefers-reduced-motion: reduce) { .gh-btn-primary { transition: none; } }
.gh-pr-card-dark .gh-pr-eyebrow, .gh-pr-join .gh-pr-eyebrow { color: #f3e3b5 !important; }

/* 26 Nov 2026 (owner feedback): home headings were shown in small letters, and the member/institute/student hub used one colour. */
.gh-home-body h2, .gh-home-body h3, .gh-home-body h4, .gh-home-body h5, .gh-home-body .card-title { text-transform: capitalize !important; }
.gh-home-body #divided-options > .container-fluid > .row > div:nth-child(3n+1) .card > h2 { background: linear-gradient(135deg, var(--gh-red-700), var(--gh-red-800)) !important; }
.gh-home-body #divided-options > .container-fluid > .row > div:nth-child(3n+2) .card > h2 { background: linear-gradient(135deg, #f4b90a, #d99a00) !important; color: #2a1d00 !important; }
.gh-home-body #divided-options > .container-fluid > .row > div:nth-child(3n+3) .card > h2 { background: linear-gradient(135deg, var(--gh-green-700), var(--gh-green-900)) !important; }
.gh-home-body #divided-options > .container-fluid > .row > div:nth-child(3n+1) > .card { border-top: 0 !important; box-shadow: 0 10px 28px rgba(179, 20, 28, .10) !important; }
.gh-home-body #divided-options > .container-fluid > .row > div:nth-child(3n+2) > .card { box-shadow: 0 10px 28px rgba(217, 154, 0, .12) !important; }
.gh-home-body #divided-options > .container-fluid > .row > div:nth-child(3n+3) > .card { box-shadow: 0 10px 28px rgba(18, 61, 40, .12) !important; }
.gh-home-body #divided-options > .container-fluid > .row > div:nth-child(3n+1) a i, .gh-home-body #divided-options > .container-fluid > .row > div:nth-child(3n+1) a svg { color: var(--gh-red-700) !important; fill: var(--gh-red-700) !important; }
.gh-home-body #divided-options > .container-fluid > .row > div:nth-child(3n+2) a i, .gh-home-body #divided-options > .container-fluid > .row > div:nth-child(3n+2) a svg { color: var(--gh-gold-700) !important; fill: var(--gh-gold-700) !important; }
.gh-home-body #divided-options > .container-fluid > .row > div:nth-child(3n+1) a p { background: var(--gh-red-50) !important; color: var(--gh-red-800) !important; }
.gh-home-body #divided-options > .container-fluid > .row > div:nth-child(3n+2) a p { background: var(--gh-gold-50) !important; color: #5c4100 !important; }
.gh-home-body #divided-options > .container-fluid > .row > div:nth-child(3n+1) a:hover p { background: var(--gh-red-700) !important; color: #fff !important; }
.gh-home-body #divided-options > .container-fluid > .row > div:nth-child(3n+2) a:hover p { background: #f4b90a !important; color: #2a1d00 !important; }
.gh-home-body #divided-options a .card { transition: transform .18s ease, box-shadow .18s ease; }
.gh-home-body #divided-options a:hover .card { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0, 0, 0, .08) !important; }
.gh-home-body #social-news-media .col-md-6:nth-child(odd) .card > .card-body > h2 { background: linear-gradient(135deg, var(--gh-red-700), var(--gh-red-800)) !important; }
@media (prefers-reduced-motion: reduce) { .gh-home-body #divided-options a .card { transition: none; } .gh-home-body #divided-options a:hover .card { transform: none; } }
.gh-home-body #social-news-media h2, .gh-home-body #divided-options h2, .gh-home-body #trending-courses h2, .gh-home-body #academic-partners h2, .gh-home-body #testimonials h2, .gh-home-body #lets-connect h2 { text-transform: capitalize !important; }
/* Home stylesheet loads inside <body> (after this file), so these rules carry higher specificity. */
html body .gh-home-body #social-news-media h2, html body .gh-home-body #divided-options h2, html body .gh-home-body #trending-courses h2,
html body .gh-home-body #academic-partners h2, html body .gh-home-body #testimonials h2, html body .gh-home-body #lets-connect h2 { text-transform: capitalize !important; }
html body .gh-home-body #divided-options a p { font-size: .8rem !important; word-break: normal !important; overflow-wrap: normal !important; hyphens: manual; line-height: 1.25; padding-left: 4px !important; padding-right: 4px !important; }
