/* ===================================
   Open Care Connect - V2 Stylesheet
   =================================== */

:root {
    --primary-blue: #240046;
    --primary-blue-dark: #5A189A;
    --accent-coral: #f97316;
    --accent-coral-dark: #ea580c;
    --text-dark: #1f2937;
    --text-medium: #4b5563;
    --bg-primary: #5A189A;
    --bg-light: #f9fafb;
    --bg-lighter: #f3f4f6;
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition-normal: 300ms ease-in-out;
    --success-green: #16a34a;
}

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

/* Global */
html {
    font-size: 100%;
    scroll-padding-top: 70px;
    scroll-behavior: smooth;
    overflow-y: scroll;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    background: var(--bg-lighter);
    line-height: 1.6;
}

/* Wrapper */
.content-wrapper {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 70px);
    overflow-x: hidden;
}

main {
    flex: 1 0 auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
}

.display-6 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lead {
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--text-medium);
}

/* Skip Link */
.visually-hidden-focusable:not(:focus) {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.visually-hidden-focusable:focus {
    display: inline-block;
    background: var(--primary-blue);
    color: white;
    padding: 0.75rem 1.5rem;
    outline: 3px solid #000;
    text-decoration: none;
    border-radius: 4px;
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 10000;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 100%);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    min-height: 70px;
}

.navbar.sticky-top {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1020 !important;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
    display: flex;
    align-items: center;
}

.navbar-brand img {
    height: 40px;
    width: auto;
    margin-right: 0.5rem;
}

.navbar-nav {
    margin: 0;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600;
    margin: 0 0.25rem;
    padding: 0.5rem 0.65rem !important;
    line-height: 1.5;
    border-bottom: 3px solid transparent;
    transition: border-color 0.2s;
}

.nav-link:hover {
    background: var(--primary-blue-dark) !important;
    color: white !important;
    border-radius: 12px !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.nav-link.active {
    border-bottom: 3px solid var(--accent-coral) !important;
    color: white !important;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

/* Make Referral nav button stands out */
.nav-referral {
    background: var(--accent-coral) !important;
    color: white !important;
    border-radius: 8px !important;
    border-bottom: none !important;
    margin-left: 0.5rem !important;
    padding: 0.4rem 0.9rem !important;
    transition: background var(--transition-normal), transform 0.15s ease !important;
}

.nav-referral:hover {
    background: var(--accent-coral-dark) !important;
    border-radius: 8px !important;
    transform: translateY(-1px);
    text-shadow: none !important;
    border-bottom: none !important;
}

.nav-referral.active {
    border-bottom: 3px solid var(--accent-coral) !important;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    min-height: 420px;
    padding: 4rem 2rem;
}

/* Text overrides for dark hero background */
.hero .display-6 {
    color: white !important;
    background: none !important;
    -webkit-text-fill-color: white !important;
}

.hero .lead {
    color: rgba(255, 255, 255, 0.92) !important;
}

.hero .btn-primary {
    background: var(--accent-coral) !important;
    border-color: var(--accent-coral) !important;
}

.hero .btn-primary:hover {
    background: var(--accent-coral-dark) !important;
    border-color: var(--accent-coral-dark) !important;
}

/* Buttons */
.btn {
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 12px;
    border: none;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: white;
    border: 1px solid var(--primary-blue);
}

.btn-light {
    background: white;
    color: var(--primary-blue);
    border: 1px solid var(--primary-blue);
}

.btn-primary:hover,
.btn-light:hover,
.submit-btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

/* Cards & Info Boxes */
.card,
.value-box,
.goal-box,
.registration-groups,
.why-list {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: none;
    height: 100%;
}

.value-box,
.goal-box,
.registration-groups,
.why-list {
    border-left: 4px solid var(--accent-coral);
    padding: 2rem;
}

.card:hover,
.goal-box:hover,
.registration-groups:hover,
.why-list:hover,
.value-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.card:hover i,
.value-box:hover i,
.goal-box:hover i,
.registration-groups:hover i,
.why-list:hover i {
    color: var(--accent-coral) !important;
    transition: color var(--transition-normal);
}

.card-title,
.value-box h4,
.goal-box h5 {
    color: var(--primary-blue-dark);
}

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

/* Trust Badge Bar */
.trust-bar {
    background: linear-gradient(135deg, #f0f4ff 0%, #fef3e8 100%);
    border-top: 2px solid rgba(90, 24, 154, 0.1);
    border-bottom: 2px solid rgba(90, 24, 154, 0.1);
    padding: 1rem 0;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.trust-item i {
    color: var(--accent-coral);
    font-size: 1.2rem;
}

/* Stats section */
.stat-box {
    text-align: center;
    padding: 1.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-medium);
    margin-top: 0.25rem;
}

/* Forms */
.field-group {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.field-group legend {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue-dark);
    border-bottom: 3px solid var(--accent-coral);
    padding-bottom: 0.5rem;
    width: 100%;
    margin-bottom: 1.5rem;
}

input,
select,
textarea {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem;
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-blue-dark);
    outline: none;
    box-shadow: 0 0 0 3px rgba(90, 24, 154, 0.15);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.25rem 0;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 0.25rem;
    flex-shrink: 0;
    accent-color: var(--primary-blue);
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: white;
    padding: 1rem 3rem;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

/* Honeypot field - hidden from users, visible to bots */
.bot-trap {
    display: none !important;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 100%);
    color: white !important;
    padding: 2rem 0;
}

.footer h5 {
    color: #ffffff !important;
    font-weight: 700;
}

.footer p,
.footer a {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
}

.footer a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

.footer-abn {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Complaints page */
.complaint-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0;
}

.complaint-step:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.complaint-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-blue-dark);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 1.1rem;
}

/* Accessibility Widget */
.accessibility-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
}

.accessibility-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-blue-dark);
    color: white;
    border: 3px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.accessibility-panel {
    display: none;
    position: absolute;
    bottom: 80px;
    right: 0;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    width: 320px;
    border: 1px solid #eee;
    font-size: 16px !important;
    line-height: 1.5;
}

.accessibility-panel h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.accessibility-panel.active {
    display: block;
}

.accessibility-btn {
    flex: 1;
    padding: 8px 4px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    text-align: center;
}

.accessibility-btn.active {
    background: var(--primary-blue);
    color: white;
}

.accessibility-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

/* Cookie Consent Banner */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a2e;
    color: #f0f0f0;
    padding: 1rem 1.5rem;
    z-index: 9999;
    display: none;
    border-top: 3px solid var(--accent-coral);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

#cookie-banner.visible {
    display: flex;
}

.cookie-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    width: 100%;
}

.cookie-banner-text {
    flex: 1;
    font-size: 0.9rem;
    min-width: 250px;
    line-height: 1.5;
}

.cookie-banner-text a {
    color: var(--accent-coral);
    text-decoration: underline;
}

.cookie-banner-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.cookie-btn-accept {
    background: var(--accent-coral);
    color: white;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.cookie-btn-accept:hover {
    background: var(--accent-coral-dark);
}

.cookie-btn-decline {
    background: transparent;
    color: #ccc;
    border: 1px solid #555;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.cookie-btn-decline:hover {
    border-color: #999;
    color: white;
}

/* Font Size Modes */
html.font-size-small {
    font-size: 85%;
}

html.font-size-normal {
    font-size: 100%;
}

html.font-size-large {
    font-size: 120%;
}

html.font-size-xlarge {
    font-size: 140%;
}

/* High Contrast Mode */
body.high-contrast {
    background-color: #000 !important;
    color: #fff !important;
}

body.high-contrast .bg-white,
body.high-contrast .bg-light,
body.high-contrast .bg-lighter,
body.high-contrast .card,
body.high-contrast .value-box,
body.high-contrast .goal-box,
body.high-contrast .registration-groups,
body.high-contrast .why-list,
body.high-contrast .field-group,
body.high-contrast .navbar,
body.high-contrast .footer,
body.high-contrast .hero,
body.high-contrast .cta-section,
body.high-contrast .accessibility-panel,
body.high-contrast .trust-bar,
body.high-contrast .alert-info,
body.high-contrast .bg-primary {
    background: #000 !important;
    background-image: none !important;
    border: 2px solid #fff !important;
    box-shadow: none !important;
}

body.high-contrast .nav-link:hover {
    background: rgba(255, 255, 255, 0.109) !important;
    color: white !important;
}

body.high-contrast input::placeholder,
body.high-contrast textarea::placeholder,
body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4,
body.high-contrast h5,
body.high-contrast h6,
body.high-contrast p,
body.high-contrast span,
body.high-contrast li,
body.high-contrast label,
body.high-contrast .display-6,
body.high-contrast .lead,
body.high-contrast .text-muted,
body.high-contrast .text-secondary,
body.high-contrast .alert-info,
body.high-contrast .stat-number {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

body.high-contrast li .nav-referral {
    background: #ff0 !important;
    -webkit-text-fill-color: #000000 !important;
    color: #000000 !important;
}

body.high-contrast li .nav-referral:hover {
    background: rgba(255, 255, 255, 0.109) !important;
    color: white !important;
    -webkit-text-fill-color: #ffffff !important;
}

body.high-contrast .text-primary,
body.high-contrast .navbar-brand {
    color: #ff0 !important;
    text-decoration: underline !important;
}

body.high-contrast input,
body.high-contrast select,
body.high-contrast textarea {
    background-color: #000 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
}

body.high-contrast legend {
    color: #fff !important;
    border-bottom-color: #ff0 !important;
}

body.high-contrast .btn,
body.high-contrast .submit-btn {
    background: #ff0 !important;
    color: #000 !important;
    border: 2px solid #fff !important;
    text-decoration: none !important;
}

body.high-contrast .accessibility-btn {
    background: #000 !important;
    color: #fff !important;
    border: 1px solid #fff !important;
}

body.high-contrast .accessibility-btn.active {
    background: #ff0 !important;
    color: #000 !important;
}

body.high-contrast i.bi {
    color: #ff0 !important;
}

body.high-contrast .btn i,
body.high-contrast .submit-btn i,
body.high-contrast button i {
    color: inherit !important;
}

body.high-contrast .complaint-step {
    border-bottom-color: rgba(255, 255, 255, 0.3) !important;
}

body.high-contrast .complaint-step-number {
    background: #ff0 !important;
    color: #000 !important;
}

/* FAQ Accordion */
.faq-question i.bi-chevron-down {
    transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] i.bi-chevron-down {
    transform: rotate(180deg);
}

/* Logos */
.logo {
    max-width: 100%;
    height: auto;
    display: inline-block;
}

.logo-company {
    height: 80px;
    width: auto;
    display: block;
    margin: 0 auto;
}

.logo-ndis {
    height: 100px;
    width: auto;
    display: block;
    margin: 0 auto;
}

/* Consistent focus styles for keyboard users */
:focus-visible {
    outline: 3px solid var(--accent-coral) !important;
    outline-offset: 2px;
    border-radius: 4px;
}

:focus {
    outline: 3px solid var(--accent-coral) !important;
    outline-offset: 2px;
    border-radius: 4px;
}

.btn:focus,
.btn:focus-visible,
.nav-link:focus,
.nav-link:focus-visible,
.form-control:focus,
.form-control:focus-visible,
.form-check-input:focus,
.form-check-input:focus-visible {
    box-shadow: none !important;
}

/* Mobile & Tablet */
@media (max-width: 576px) {
    .hero .btn-lg {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .value-box,
    .goal-box,
    .registration-groups,
    .why-list {
        padding: 1.5rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .display-6 {
        font-size: 2rem;
    }

    .registration-groups ul {
        padding-left: 0;
    }

    .registration-groups li,
    .why-list li {
        word-break: break-word;
        display: flex;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .registration-groups i,
    .why-list i {
        margin-right: 0.25rem;
        flex-shrink: 0;
    }

    .registration-groups .btn {
        width: 100%;
        display: block;
    }

    .why-list ul.ms-4 {
        margin-left: 0.5rem !important;
    }

    .why-list h5 {
        font-size: 1.1rem;
    }

    .registration-groups,
    .why-list {
        padding: 1.25rem;
    }

    html {
        scroll-padding-top: 60px;
    }

    .logo-company {
        height: 60px;
    }

    .logo-ndis {
        height: 70px;
        max-width: 90%;
    }

    .trust-bar .trust-item {
        justify-content: center;
    }

    .cookie-banner-inner {
        flex-direction: column;
    }

    .cookie-banner-buttons {
        width: 100%;
        justify-content: center;
    }

    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 991.98px) {
    .row>.col-lg-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .row>.col-lg-6:last-child {
        margin-top: 2rem;
    }

    .registration-groups,
    .why-list {
        overflow-x: hidden;
    }

    .why-list ul {
        padding-left: 0;
    }

    .why-list li {
        display: flex;
        align-items: flex-start;
        gap: 0.5rem;
        word-break: break-word;
    }

    .why-list i {
        flex-shrink: 0;
        margin-top: 0.2rem;
    }

    .nav-referral {
        margin-left: 0 !important;
        margin-top: 0.25rem;
        display: inline-block;
    }
}

@media (max-width: 425px) {
    .navbar-brand {
        font-size: 1rem;
    }

    .navbar-brand img {
        height: 30px !important;
        margin-right: 0.5rem;
    }

    .navbar-brand strong {
        white-space: normal;
        line-height: 1.2;
    }
}

/* =============================================
   ACKNOWLEDGEMENT OF COUNTRY
   ============================================= */
.acknowledgement-section {
    border-radius: 0.75rem;
}

.acknowledgement-section p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #3d2b1f;
}

.acknowledgement-section h2 {
    color: #c04a00;
}

/* =============================================
   ABN FOOTER LINE
   ============================================= */
.footer-abn {
    font-size: 0.78rem;
    opacity: 0.8;
    letter-spacing: 0.02em;
}

/* =============================================
   FORM VALIDATION — Visual feedback
   Works with Bootstrap 5 was-validated + is-invalid
   ============================================= */

/* Show invalid feedback text */
.was-validated .form-control:invalid~.invalid-feedback,
.was-validated .form-select:invalid~.invalid-feedback,
.was-validated .form-check-input:invalid~.invalid-feedback,
.form-control.is-invalid~.invalid-feedback,
.form-select.is-invalid~.invalid-feedback,
.form-check-input.is-invalid~.invalid-feedback {
    display: block !important;
}

/* Red border on invalid fields */
.was-validated .form-control:invalid,
.was-validated .form-select:invalid,
.was-validated .form-check-input:invalid,
.form-control.is-invalid,
.form-select.is-invalid,
.form-check-input.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

/* Green border on valid fields */
.was-validated .form-control:valid,
.was-validated .form-select:valid,
.form-control.is-valid,
.form-select.is-valid {
    border-color: #198754 !important;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.12);
}

/* Checkbox invalid feedback positioning */
.form-check .invalid-feedback {
    display: none;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

/* Success / error alert messages */
#formSuccess,
#successMsg,
#complaintsSuccess {
    display: none;
    border-left: 4px solid #198754;
}

#formError,
#errorMsg,
#complaintsError {
    display: none;
    border-left: 4px solid #dc3545;
}

/* =============================================
   RESPONSIVE IMAGES — Ensure all images scale
   ============================================= */
/* Logo images - responsive but respect explicit heights */
.logo {
    max-width: 100%;
    object-fit: contain;
    display: inline-block;
}

.navbar-brand img {
    max-height: 44px;
    width: auto;
}

/* =============================================
   RESPONSIVE BUTTONS — Touch-friendly sizes
   ============================================= */
@media (max-width: 576px) {
    .btn-lg {
        font-size: 1rem;
        padding: 0.6rem 1.2rem;
    }

    .btn {
        min-height: 44px;
        /* WCAG 2.5.5 touch target */
    }

    /* Stack hero CTA buttons vertically on xs */
    .hero .d-flex.gap-3,
    .cta-buttons {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .hero .d-flex.gap-3 .btn,
    .cta-buttons .btn {
        width: 100%;
        text-align: center;
    }
}

/* =============================================
   RESPONSIVE TYPOGRAPHY
   ============================================= */
@media (max-width: 576px) {
    .display-4 {
        font-size: 1.9rem !important;
    }

    .display-5 {
        font-size: 1.7rem !important;
    }

    .display-6 {
        font-size: 1.5rem !important;
    }

    .lead {
        font-size: 1rem !important;
    }

    h1,
    .h1 {
        font-size: 1.8rem;
    }

    h2,
    .h2 {
        font-size: 1.4rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

/* =============================================
   FAQ ACCORDION — Fully Bootstrap 5 compatible
   ============================================= */
.faq-question {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    color: #212529;
    margin-bottom: 0;
}

.faq-question:hover,
.faq-question:focus {
    background: #f0f4ff;
    color: var(--primary-blue, #2563eb);
    outline: 2px solid var(--primary-blue, #2563eb);
    outline-offset: 2px;
}

.faq-question[aria-expanded="true"] {
    background: var(--primary-blue, #2563eb);
    color: #fff;
    border-color: var(--primary-blue, #2563eb);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.faq-question i {
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 0.75rem;
}

.faq-question[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.faq-item {
    margin-bottom: 0.75rem;
}

.faq-answer-content {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-top: none;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    font-size: 0.97rem;
    line-height: 1.7;
    color: #444;
}


/* =============================================
   FIX 1: High contrast — AoC section legibility
   The footer AoC text and about-page AoC block
   need explicit overrides in high contrast mode.
   ============================================= */
body.high-contrast .acknowledgement-section {
    background: #000 !important;
    border-left-color: #ff0 !important;
}

body.high-contrast .acknowledgement-section p,
body.high-contrast .acknowledgement-section h2 {
    color: #fff !important;
}

/* Footer AoC italic line (all pages) */
body.high-contrast footer [style*="font-style:italic"],
body.high-contrast footer [style*="font-style: italic"] {
    color: #fff !important;
    opacity: 1 !important;
    background: transparent !important;
}

/* =============================================
   FIX 2: High contrast — button text must be
   black on yellow backgrounds, never white.
   ============================================= */
body.high-contrast .btn,
body.high-contrast .btn-primary,
body.high-contrast .btn-light,
body.high-contrast .btn-outline-primary,
body.high-contrast a.btn,
body.high-contrast .back-to-home {
    background: #ff0 !important;
    color: #000 !important;
    border: 2px solid #000 !important;
}

body.high-contrast .nav-referral {
    background: #ff0 !important;
    color: #000 !important;
    border-bottom: 3px solid var(--accent-coral) !important;
}

body.high-contrast .nav-link strong {
    color: #000 !important;
}

body.high-contrast .btn:hover,
body.high-contrast .btn:focus {
    background: #ffe000 !important;
    color: #000 !important;
    outline: 3px solid #fff !important;
}

/* =============================================
   FIX 3: Checkbox + long label alignment
   Ensures the checkbox sits at the top of the
   label text, not centred vertically against it.
   ============================================= */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding-left: 0;
}

.form-check .form-check-input {
    flex-shrink: 0;
    margin-top: 0.25rem;
    /* aligns with first line of text cap-height */
    margin-left: 0;
}

.form-check .form-check-label {
    margin-bottom: 0;
    line-height: 1.5;
}

.form-check .invalid-feedback {
    padding-left: 0;
    margin-top: 0.25rem;
    width: 100%;
}

/* Ensure checkbox is always visible and tick shows when checked */
.form-check-input[type="checkbox"] {
    width: 1.1em;
    height: 1.1em;
    border: 2px solid #adb5bd;
    background-color: #fff;
    display: inline-block;
    flex-shrink: 0;
    appearance: none;
    -webkit-appearance: none;
    border-radius: 0.25em;
    vertical-align: top;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    cursor: pointer;
}
.form-check-input[type="checkbox"]:checked {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}
body.high-contrast .form-check-input[type="checkbox"] {
    background-color: #000 !important;
    border: 2px solid #fff !important;
}
body.high-contrast .form-check-input[type="checkbox"]:checked {
    background-color: #ff0 !important;
    border-color: #fff !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23000' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
}

/* =============================================
   MOBILE NAV — Smooth dropdown
   ============================================= */
@media (max-width: 991px) {
    .navbar-collapse {
        padding: 1rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
        margin-top: 0.5rem;
    }

    .navbar-nav .nav-link {
        padding: 0.65rem 0.5rem;
        font-size: 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .nav-referral {
        margin-top: 0.5rem;
        border-radius: 0.375rem;
        justify-content: center;
    }
}

/*PREFERS-REDUCED-MOTION
   Disables all animations and transitions for usersbg-primary
   who have set "reduce motion" in their OS settings.
   Required for WCAG 2.1 SC 2.3.3 (AAA) and strongly
   recommended for NDIS audience (vestibular disorders,
   photosensitive epilepsy, cognitive disabilities).
   ============================================= */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .btn:hover,
    .btn-primary:hover,
    .btn-light:hover,
    .submit-btn:hover {
        transform: none !important;
    }

    .accessibility-panel {
        transition: none !important;
    }
}

/* =============================================
   PAGE HERO — inner page banner
   ============================================= */
.page-hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    padding: 3rem 1.5rem;
    text-align: center;
    color: white;
}

.page-hero h1,
.page-hero .display-6 {
    color: white !important;
    -webkit-text-fill-color: white !important;
    background: none !important;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.page-hero .lead {
    color: rgba(255, 255, 255, 0.88) !important;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 0;
}

/* =============================================
   CTA BAND — full-width call-to-action strip
   ============================================= */
.cta-band {
    background: linear-gradient(135deg, var(--primary-blue-dark) 0%, var(--primary-blue) 100%);
    padding: 4rem 2rem;
    text-align: center;
}

.cta-band h2 {
    color: white !important;
    margin-bottom: 1rem;
}

.cta-band p,
.cta-band .lead {
    color: rgba(255, 255, 255, 0.9) !important;
}

.cta-band .btn-primary {
    background: var(--accent-coral) !important;
    border-color: var(--accent-coral) !important;
    color: white !important;
}

.cta-band .btn-primary:hover {
    background: var(--accent-coral-dark) !important;
    border-color: var(--accent-coral-dark) !important;
}

.cta-band .btn-light {
    background: white !important;
    color: var(--primary-blue) !important;
    border-color: white !important;
}

/* =============================================
   HOW IT WORKS — numbered step cards
   ============================================= */
.step-card {
    padding: 2rem 1.5rem;
    text-align: center;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    height: 100%;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.step-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    color: white;
    font-size: 1.4rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    box-shadow: var(--shadow-md);
}

/* =============================================
   HIGH CONTRAST — new component overrides
   ============================================= */
body.high-contrast .hero,
body.high-contrast .page-hero,
body.high-contrast .cta-band {
    background: #000 !important;
    background-image: none !important;
    border: 2px solid #fff !important;
}

body.high-contrast .hero .display-6,
body.high-contrast .hero h1,
body.high-contrast .page-hero h1,
body.high-contrast .page-hero .display-6,
body.high-contrast .cta-band h2,
body.high-contrast .hero .lead,
body.high-contrast .page-hero .lead,
body.high-contrast .cta-band p,
body.high-contrast .cta-band .lead {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

body.high-contrast .step-number {
    background: #ff0 !important;
    color: #000 !important;
    border: 2px solid #fff !important;
}

body.high-contrast .step-card {
    background: #000 !important;
    border: 2px solid #fff !important;
    box-shadow: none !important;
}

body.high-contrast .card .fw-semibold,
body.high-contrast .card small,
body.high-contrast .card div {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

@media (max-width: 576px) {
    .page-hero {
        padding: 2rem 1rem;
    }

    .page-hero h1,
    .page-hero .display-6 {
        font-size: 1.6rem;
    }

    .cta-band {
        padding: 2.5rem 1rem;
    }
}