/* Refer a Patient page: navy hero shared with diagnostics, KIH brand colours throughout. */
.rp-page { color: var(--ink); }
.rp-page h2 { color: var(--ink); font-size: clamp(1.75rem, 2.4vw, 2.75rem); font-weight: 600; line-height: 1.15; margin-bottom: 1rem; }
.rp-page h3 { color: var(--ink); font-size: 1.1rem; font-weight: 600; line-height: 1.35; margin-bottom: .4rem; }
.rp-page p { font-size: .95rem; line-height: 1.8; }
.rp-page a:focus-visible, .rp-page button:focus-visible { outline: 2px solid var(--kih-blue); outline-offset: 4px; }
/* Same section rhythm as the Kulsum Story page. */
.rp-section { padding: clamp(1.5rem, 3vw, 2.5rem) 0; }
.rp-hero + .rp-section { padding-top: clamp(1.75rem, 3vw, 2.5rem); padding-bottom: clamp(2.25rem, 4vw, 3.5rem); }
.rp-section-soft { background: radial-gradient(circle at 92% 0%, rgba(229, 27, 62, .055), transparent 28%), #f4f7fc; }

/* Buttons */
.rp-btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 50px; padding: .75rem 1.4rem; border: 1px solid transparent; border-radius: 12px; font-size: .9rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.rp-btn-primary { border-color: var(--kih-red); background: var(--kih-red); color: #fff; }
.rp-btn-primary:hover { border-color: var(--kih-red-dark); background: var(--kih-red-dark); color: #fff; }
.rp-btn-outline { border-color: rgba(255, 255, 255, .75); color: #fff; }
.rp-btn-outline:hover { background: #fff; color: var(--kih-blue-dark); }

/* Hero */
.rp-hero { position: relative; isolation: isolate; overflow: hidden; background: #063b74; }
.rp-hero-art { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 80% 50%; }
.rp-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(3, 30, 60, .97) 0%, rgba(6, 46, 86, .91) 38%, rgba(6, 46, 86, .55) 68%, rgba(6, 46, 86, .25) 100%); }
.rp-hero-copy { max-width: 720px; padding: clamp(3rem, 6vw, 5rem) 0; }
.rp-hero h1 { color: #fff; font-size: clamp(2.25rem, 4vw, 3.75rem); font-weight: 600; line-height: 1.08; margin-bottom: .6rem; }
.rp-hero .rp-lead { color: #fff; font-size: clamp(1.15rem, 1.8vw, 1.5rem); font-weight: 500; line-height: 1.45; margin-bottom: .6rem; }
.rp-hero p { color: #e0ebf7; }
.rp-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.rp-hero a:focus-visible { outline-color: #fff; }
@media (min-width: 992px) { .rp-hero-copy { padding: 3.5rem 0 3.75rem; } }

/* Steps */
.rp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin: 1.5rem 0 0; padding: 0; list-style: none; counter-reset: rp-step; }
.rp-steps li { position: relative; display: flex; gap: 1rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); counter-increment: rp-step; }
.rp-steps li::after { content: "0" counter(rp-step); position: absolute; top: 1rem; right: 1.25rem; color: #d5e2f0; font-size: 1.75rem; font-weight: 700; line-height: 1; }
.rp-step-icon { display: grid; place-items: center; flex-shrink: 0; width: 52px; height: 52px; border-radius: 15px; background: var(--kih-blue-soft); color: var(--kih-blue); font-size: 1.4rem; }
.rp-steps h3 { padding-right: 2.5rem; }
.rp-page .rp-steps p { margin: 0; color: #3a5068; font-size: .88rem; line-height: 1.7; }

/* Form layout */
.rp-form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
.rp-form-card { padding: clamp(1.4rem, 3.5vw, 2.5rem); border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: var(--shadow-sm); }
.rp-form-card h2 { margin-bottom: .35rem; }
.rp-page .rp-form-intro { margin-bottom: 1.5rem; color: var(--muted); font-size: .88rem; }
.rp-fieldset { margin: 0 0 1.75rem; padding: 0 0 1.75rem; border: 0; border-bottom: 1px dashed var(--line); min-width: 0; }
.rp-fieldset legend { display: flex; align-items: center; gap: .7rem; float: none; width: auto; margin-bottom: 1.1rem; padding: 0; color: var(--ink); font-size: 1.15rem; font-weight: 600; line-height: 1.3; }
.rp-legend-num { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--kih-blue); color: #fff; font-size: .85rem; font-weight: 700; }
.rp-page .form-label { margin-bottom: .4rem; color: var(--ink); font-size: .85rem; font-weight: 600; }
.rp-hint { color: var(--muted); font-weight: 400; }
.rp-page .form-control, .rp-page .form-select { min-height: 46px; border-color: #cfdcec; border-radius: 10px; font-size: .92rem; }
.rp-page textarea.form-control { min-height: 0; }
.rp-page .form-control:focus, .rp-page .form-select:focus { border-color: var(--kih-blue); box-shadow: 0 0 0 .2rem rgba(9, 81, 158, .14); }
.rp-page .form-control::placeholder { color: #9aabbd; }
.rp-choice-group { display: flex; flex-wrap: wrap; gap: .6rem; }
.rp-choice { position: relative; display: inline-flex; cursor: pointer; }
.rp-choice input { position: absolute; opacity: 0; pointer-events: none; }
.rp-choice span { display: inline-flex; align-items: center; min-height: 46px; padding: .55rem 1.25rem; border: 1px solid #cfdcec; border-radius: 10px; background: #fff; color: var(--ink); font-size: .9rem; font-weight: 500; transition: border-color .2s ease, background-color .2s ease, color .2s ease; }
.rp-choice:hover span { border-color: var(--kih-blue); }
.rp-choice input:checked + span { border-color: var(--kih-blue); background: var(--kih-blue); color: #fff; }
.rp-choice input:focus-visible + span { outline: 2px solid var(--kih-blue); outline-offset: 2px; }
.rp-choice-group.is-invalid .rp-choice span { border-color: var(--bs-form-invalid-border-color, #dc3545); }
/* Age: the number beside a compact years/months box, as the field takes a quarter or half of the row */
.rp-age { display: flex; gap: .4rem; }
.rp-page .rp-age .form-control { flex: 1 1 auto; min-width: 0; padding-right: .4rem; padding-left: .7rem; }
.rp-page .rp-age .form-select { flex: 0 0 96px; padding-left: .7rem; padding-right: 1.6rem; background-position: right .5rem center; }
/* Male and Female share the field's width */
.rp-choice-fill { flex-wrap: nowrap; gap: .4rem; }
.rp-choice-fill .rp-choice { flex: 1 1 0; min-width: 0; }
.rp-choice-fill .rp-choice span { justify-content: center; width: 100%; padding: .55rem .4rem; }
/* Reports: a dashed drop box around the file input */
.rp-upload { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem 1.1rem; border: 1.5px dashed #b9cde4; border-radius: 14px; background: #f8fbff; }
.rp-upload.is-invalid { border-color: var(--bs-form-invalid-border-color, #dc3545); }
.rp-upload-icon { display: grid; place-items: center; flex-shrink: 0; width: 46px; height: 46px; border-radius: 12px; background: var(--kih-blue-soft); color: var(--kih-blue); font-size: 1.35rem; }
.rp-upload-body { flex: 1 1 auto; min-width: 0; }
.rp-upload-body small { display: block; margin-top: .45rem; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.rp-page .rp-upload .form-control { min-height: 0; background: #fff; }
.rp-files { margin: .5rem 0 0; padding: 0; list-style: none; }
.rp-files li { position: relative; padding: .2rem 0 .2rem 1.2rem; color: var(--ink); font-size: .84rem; overflow-wrap: anywhere; }
.rp-files li::before { content: ""; position: absolute; left: .15rem; top: .62rem; width: 7px; height: 7px; border-radius: 2px; background: var(--kih-blue); }
.rp-consent { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: 1.25rem; padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: 12px; background: var(--kih-blue-soft); }
.rp-consent .form-check-input { flex-shrink: 0; width: 1.2rem; height: 1.2rem; margin-top: .15rem; }
.rp-consent label { color: var(--ink); font-size: .88rem; line-height: 1.6; }
.rp-consent.is-invalid { border-color: var(--bs-form-invalid-border-color, #dc3545); }
.rp-captcha { margin-bottom: 1.25rem; max-width: 360px; }
.rp-submit { min-width: 220px; }
.rp-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Aside */
.rp-aside { display: grid; gap: 1rem; }
.rp-aside-card { padding: 1.4rem 1.5rem; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.rp-aside-card > .bi { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-bottom: .85rem; border-radius: 12px; background: var(--kih-blue-soft); color: var(--kih-blue); font-size: 1.2rem; }
.rp-page .rp-aside-card p { margin-bottom: .5rem; color: #3a5068; font-size: .88rem; line-height: 1.65; }
.rp-aside-call { border: 0; background: linear-gradient(145deg, #031e3c 0%, #063b74 55%, #09519e 100%); }
.rp-aside-call h3 { color: #fff; }
.rp-page .rp-aside-call p { color: #d3e2f3; }
.rp-aside-call > .bi { background: rgba(255, 255, 255, .12); color: #fff; }
.rp-aside-call a { color: #fff; font-size: 1.25rem; font-weight: 700; text-decoration: none; }
.rp-aside-call a:hover { text-decoration: underline; text-underline-offset: 4px; }
.rp-aside-call a:focus-visible { outline-color: #fff; }
.rp-aside-alert { border-color: #f6c7d0; background: var(--kih-red-soft); }
.rp-aside-alert > .bi { background: #fff; color: var(--kih-red); }
.rp-aside-alert a { color: var(--kih-red); font-weight: 600; }
.rp-checklist { margin: .5rem 0 .75rem; padding: 0; list-style: none; }
.rp-checklist li { position: relative; padding: .3rem 0 .3rem 1.75rem; color: #3a5068; font-size: .88rem; line-height: 1.55; }
.rp-checklist li::before { content: "\F270"; position: absolute; left: 0; top: .3rem; color: var(--kih-blue); font-family: "bootstrap-icons"; font-size: 1rem; line-height: 1.4; }
.rp-page .rp-aside-note { margin: 0; color: var(--muted); font-size: .8rem; }
@media (min-width: 992px) { .rp-aside { position: sticky; top: calc(var(--site-header-height, 168px) + 1rem); } }

@media (max-width: 991.98px) {
    .rp-steps { grid-template-columns: 1fr; }
    .rp-form-layout { grid-template-columns: 1fr; }
    .rp-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rp-aside-card:last-child { grid-column: 1 / -1; }
}
@media (max-width: 767.98px) {
    .rp-hero::before { background: rgba(3, 30, 60, .82); }
    .rp-actions .rp-btn { min-height: 42px; padding: .55rem 1.1rem; border-radius: 10px; font-size: .82rem; }
    .rp-aside { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
    .rp-page h2 { font-size: clamp(1.5rem, 6.5vw, 1.85rem); line-height: 1.2; }
    .rp-page p { font-size: .88rem; line-height: 1.75; }
    .rp-steps li { padding: 1.2rem; }
    .rp-submit { width: 100%; }
    .rp-upload { flex-direction: column; gap: .75rem; }
    /* Half-width age field on phones: a narrower years/months box. */
    .rp-age { gap: .35rem; }
    .rp-page .rp-age .form-select { flex-basis: 88px; padding-left: .6rem; padding-right: 1.45rem; background-position: right .45rem center; }
}
@media (prefers-reduced-motion: reduce) {
    .rp-btn, .rp-choice span { transition: none; }
}
