/* ── Request page ── */
.req-hero {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 56px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(33, 63, 154, 0.12);
  border-radius: 24px;
  box-shadow: 0 16px 36px rgba(15, 27, 45, 0.12);
  padding: clamp(22px, 3vw, 15px);
  backdrop-filter: blur(2px);
}

.req-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e8efff;
  border: 1px solid #c4d0f0;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #213f9a;
  margin-bottom: 2px;
}

.req-eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #213f9a;
  flex-shrink: 0;
}

.req-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: #1a2332;
  line-height: 1.18;
  margin-bottom: 16px;
}

.req-subtitle {
  font-size: 15px;
  color: #5a6a7e;
  line-height: 1.18;
  max-width: 580px;
  margin: 0 auto;
}

/* ── Cards grid ── */
.req-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.previous-person-card {
  max-width: 900px;
  margin: -28px auto 28px;
  padding: 22px;
  background: #fff;
  border: 1px solid #dce3eb;
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(15, 27, 45, 0.08);
}

.previous-person-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.previous-person-eyebrow {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
}

.previous-person-title {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  color: #1a2332;
}

.previous-person-clear {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 13px;
  cursor: pointer;
}

.previous-person-clear:hover {
  background: #eef2f7;
}

.previous-person-field {
  display: grid;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.previous-person-input {
  height: 44px;
  border: 1.5px solid #d1d5db;
  border-radius: 12px;
  padding: 0 14px;
  font-size: 15px;
  font-family: inherit;
  color: #1e293b;
  background: #fff;
  outline: none;
  text-transform: none;
  letter-spacing: 0;
}

.previous-person-input:focus {
  border-color: #213f9a;
  box-shadow: 0 0 0 3px rgba(33, 63, 154, 0.1);
}

.previous-person-status {
  margin-top: 12px;
  font-size: 13px;
  color: #64748b;
}

.previous-person-results {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.previous-person-result {
  width: 100%;
  border: 1px solid #dce3eb;
  border-radius: 12px;
  background: #f8fafc;
  color: #1e293b;
  padding: 11px 13px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.previous-person-result:hover,
.previous-person-result:focus {
  border-color: #213f9a;
  background: #eef4ff;
  outline: none;
}

.previous-person-result-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
}

.previous-person-result-meta {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: #64748b;
}

.previous-person-selected {
  margin-top: 12px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #f0fdf4;
  color: #14532d;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
}

/* ── Individual card ── */
.req-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 28px;
  border: 1px solid #dce3eb;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.03), 0 16px 40px rgba(15,27,45,0.08);
  transition: transform 0.22s cubic-bezier(0.4,0,0.2,1), box-shadow 0.22s;
}

.req-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 12px rgba(0,0,0,0.04), 0 28px 56px rgba(15,27,45,0.14);
}

/* ── Card header ── */
.req-card-header {
  position: relative;
  padding: 32px 28px 28px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.req-card-header::after {
  content: '';
  position: absolute;
  bottom: -40px;
  right: -40px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
  pointer-events: none;
}

.req-card-header--medical {
  background: linear-gradient(145deg, #7f1d1d 0%, #b91c1c 60%, #dc2626 100%);
}

.req-card-header--social {
  background: linear-gradient(145deg, #1a2f73 0%, #213f9a 60%, #2a5bc4 100%);
}

.req-card-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: rgba(255,255,255,0.45);
  text-transform: uppercase;
  margin-bottom: auto;
}

.req-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(255,255,255,0.15);
  display: grid;
  place-items: center;
  font-size: 24px;
  color: #fff;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.req-card-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 6px;
}

.req-card-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  line-height: 1.55;
}

/* ── Card body ── */
.req-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 24px 28px 28px;
  gap: 20px;
}

.req-coverage-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #8896a6;
  margin-bottom: 10px;
}

.req-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.req-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid #dce3eb;
  background: #f6f8fb;
  font-size: 12px;
  font-weight: 500;
  color: #3a4a5e;
  white-space: nowrap;
}

.req-tag svg {
  flex-shrink: 0;
  color: #213f9a;
}

.req-tag--social svg {
  color: #b91c1c;
}

/* ── CTA button ── */
.req-cta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 14px;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  text-decoration: none;
  transition: opacity 0.18s, transform 0.18s, box-shadow 0.18s;
}

.req-cta--medical {
  background: linear-gradient(135deg, #7f1d1d, #dc2626);
  color: #fff;
  box-shadow: 0 4px 14px rgba(185,28,28,0.28);
}

.req-cta--medical:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(185, 28, 28, 0.36);
}

.req-cta--social {
  background: linear-gradient(135deg, #1a2f73, #213f9a);
  color: #fff;
  box-shadow: 0 4px 14px rgba(33, 63, 154, 0.25);
}

.req-cta--social:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(33, 63, 154, 0.32);
}

/* ── Divider ── */
.req-divider {
  height: 1px;
  background: #eef1f5;
  margin: 0 -28px;
}

/* ── HREP Modal ── */
/* Prevent display:flex/grid from overriding the hidden attribute */
.hrep-modal-backdrop[hidden],
.hrep-modal-result[hidden],
.hrep-modal-fields[hidden],
.hrep-modal-error[hidden] {
  display: none !important;
}

.hrep-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 27, 45, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: 16px;
  animation: hrepFadeIn 0.18s ease;
}

@keyframes hrepFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.hrep-modal {
  position: relative;
  background: #fff;
  border-radius: 24px;
  padding: 36px 32px 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 64px rgba(15, 27, 45, 0.22), 0 4px 16px rgba(15, 27, 45, 0.1);
  animation: hrepSlideUp 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.hrep-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: #64748b;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.hrep-modal-close:hover {
  background: #e2e8f0;
  color: #1e293b;
}

.hrep-modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  display: grid;
  place-items: center;
  color: #213f9a;
  margin-bottom: 18px;
}

.hrep-modal-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 22px;
  font-weight: 700;
  color: #1a2332;
  margin-bottom: 6px;
}

.hrep-modal-subtitle {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 12px;
}

.hrep-modal-note {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  padding: 10px 13px;
  font-size: 12.5px;
  color: #92400e;
  line-height: 1.5;
  margin-bottom: 20px;
}

.hrep-modal-error {
  background: #fff1f2;
  border: 1px solid #fecdd3;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #be123c;
  margin-bottom: 16px;
}

.hrep-modal-fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hrep-modal-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hrep-modal-label {
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.hrep-modal-input {
  height: 44px;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  padding: 0 14px;
  font-size: 15px;
  font-family: inherit;
  color: #1e293b;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.hrep-modal-input:focus {
  border-color: #213f9a;
  box-shadow: 0 0 0 3px rgba(33, 63, 154, 0.1);
}

.hrep-modal-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
  width: 100%;
  margin-top: 4px;
}

.hrep-modal-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.hrep-modal-btn--primary {
  background: linear-gradient(135deg, #1a2f73, #213f9a);
  color: #fff;
  box-shadow: 0 4px 14px rgba(33, 63, 154, 0.25);
}

.hrep-modal-btn--primary:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

.hrep-modal-btn--proceed {
  background: linear-gradient(135deg, #14532d, #16a34a);
  color: #fff;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.25);
}

.hrep-modal-btn--proceed:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.hrep-modal-btn--ghost {
  background: #f1f5f9;
  color: #475569;
  box-shadow: none;
  margin-top: 0;
}

.hrep-modal-btn--ghost:hover {
  background: #e2e8f0;
}

.hrep-modal-result {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hrep-modal-found {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 14px 16px;
}

.hrep-modal-name {
  font-size: 16px;
  font-weight: 700;
  color: #14532d;
}

.hrep-modal-found-sub {
  font-size: 12px;
  color: #16a34a;
  margin-top: 2px;
}

/* Spinner animation */
.hrep-spinner {
  animation: hrepSpin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes hrepSpin {
  to { transform: rotate(360deg); }
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .req-cards {
    grid-template-columns: 1fr;
  }

  .req-hero {
    margin-bottom: 36px;
    padding: 20px 16px;
  }

  .previous-person-card {
    margin: -12px auto 22px;
    padding: 18px;
  }

  .previous-person-heading {
    align-items: flex-start;
    flex-direction: column;
  }
}
