:root {
    --primary-blue: #003399;
    --primary-blue-light: rgba(0, 51, 153, 0.1);
    --primary-blue-dark: #002266;
    --accent-gold: #ffac3d;
    --accent-gold-light: rgba(255, 172, 61, 0.15);
    --accent-gold-dark: #e69500;
    --bronze: #c08730;
    --bronze-light: rgba(192, 135, 48, 0.2);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', system-ui, -apple-system, sans-serif;
    color: #333333;
    background-color: #f8f9fa;
}

/* Typography Overrides */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Roboto', system-ui, -apple-system, sans-serif;
    color: var(--primary-blue);
    font-weight: 700;
}

.text-primary-brand {
    color: var(--primary-blue) !important;
}

.bg-primary-brand {
    background-color: var(--primary-blue) !important;
}

.text-accent {
    color: var(--accent-gold) !important;
}

.bg-accent {
    background-color: var(--accent-gold) !important;
}

/* Layout */
.container-custom {
    width: 100%;
    padding-right: var(--bs-gutter-x, .75rem);
    padding-left: var(--bs-gutter-x, .75rem);
    margin-right: auto;
    margin-left: auto;
    max-width: 1200px;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-blue-dark);
    border-color: var(--primary-blue-dark);
}

.btn-accent {
    background-color: var(--accent-gold);
    color: #fff;
    border-color: var(--accent-gold);
}

.btn-accent:hover,
.btn-accent:focus {
    background-color: var(--accent-gold-dark);
    color: #fff;
    border-color: var(--accent-gold-dark);
}

/* Header & Nav */
.site-header {
    background-color: #ffffff;
}

.site-header .nav-link {
    color: #333333;
    font-weight: 500;
    transition: color 0.2s ease-in-out;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus,
.site-header .nav-link.active {
    color: var(--primary-blue);
}

/* Desktop menu: uppercase nav links (not button) + extra spacing */
@media (min-width: 992px) {
    .site-header .navbar-collapse .navbar-nav .nav-link {
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .site-header .navbar-collapse .navbar-nav {
        gap: 1.75rem;
    }
}

/* Footer */
.site-footer {
    background-color: #1a1a1a;
}

.site-footer a.hover-white:hover {
    color: #fff !important;
}

/* Back to Top Button (always visible, works without JS) */
.back-to-top-btn {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-blue);
    color: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 51, 153, 0.4);
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    z-index: 1040;
}

.back-to-top-btn:hover,
.back-to-top-btn:focus {
    background-color: var(--primary-blue-dark);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 51, 153, 0.5);
}

.back-to-top-btn:focus {
    outline: 2px solid var(--accent-gold);
    outline-offset: 2px;
}

.back-to-top-btn i {
    font-size: 1.25rem;
}

/* Hero Slider - Sliding Background Images */
.hero-slider {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-slides {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide-fallback {
    background-color: var(--primary-blue);
    opacity: 1;
}

.hero-title {
    font-size: clamp(1.5rem, 4vw, 2.25rem);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 51, 153, 0.6) 0%, rgba(0, 51, 153, 0.75) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-slider .text-shadow {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-slider .hero-lead {
    font-size: 1rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.hero-slider .hero-btn {
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .hero-slider {
        min-height: 450px;
    }
}

/* Utilities */
.content-wrapper {
    min-height: 60vh;
}

/* Offcanvas Overrides */
.offcanvas {
    max-width: 300px;
}

.offcanvas-header .offcanvas-title {
    font-size: 1rem;
}

.offcanvas-body .nav-link {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.offcanvas-body .btn {
    font-size: 0.9rem;
}

/* Card Hover Effects */
.overlay-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.overlay-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.1) !important;
}

/* Timeline Custom */
.timeline-referral {
    position: relative;
    padding-left: 20px;
}

.timeline-referral::before {
    content: '';
    position: absolute;
    left: 40px;
    top: 40px;
    bottom: 20px;
    width: 2px;
    background: #e9ecef;
    z-index: 0;
}

/* Accordion Custom */
.accordion-button:not(.collapsed) {
    background-color: var(--primary-blue-light);
    color: var(--primary-blue);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
    border-color: rgba(0, 0, 0, .125);
}

/* Badge primary */
.bg-primary-brand {
    background-color: var(--primary-blue);
}

/* Animations */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

main>section {
    animation: fadeInScale 0.6s ease forwards;
}

/* Print Styles - Optimised for Referral Pathway, Contact, FAQs */
@media print {

    .site-header,
    .site-footer,
    .btn,
    .navbar-toggler,
    .offcanvas,
    .hero-slider .hero-slides,
    .hero-slider .hero-overlay,
    .hero-section .d-flex,
    .skip-link,
    .back-to-top-btn,
    a.visually-hidden-focusable {
        display: none !important;
    }

    body {
        background-color: #fff !important;
        color: #000 !important;
        font-size: 12pt;
    }

    .container-custom {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    h1,
    h2,
    h3,
    h4 {
        color: #000 !important;
        page-break-after: avoid;
    }

    /* Show all FAQ accordion content when printing */
    .accordion-collapse.collapse {
        display: block !important;
        visibility: visible !important;
    }

    .accordion-button::after {
        display: none !important;
    }

    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }

    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        break-inside: avoid;
    }

    .bg-primary-brand,
    .bg-accent {
        background-color: transparent !important;
        color: #000 !important;
        border: 1px solid #000;
    }

    /* Hero content readable when backgrounds hidden */
    .hero-content h1,
    .hero-content .lead {
        color: #000 !important;
    }

    /* Avoid breaking sections awkwardly */
    section {
        page-break-inside: avoid;
    }
}