/* Pakistan Relief Program Check — mobile-first, green + blue trust theme */

:root {
  --green-700: #0d5c3b;
  --green-600: #14805a;
  --green-400: #2fb27c;
  --blue-800: #0b3d6d;
  --blue-600: #1565c0;
  --blue-400: #42a5f5;
  --bg: #f3f7f5;
  --card: #ffffff;
  --text: #1a2e28;
  --muted: #5c6f68;
  --warn-bg: #fff4e6;
  --warn-border: #f0a04b;
  --danger-bg: #fdecea;
  --radius: 16px;
  --shadow: 0 12px 40px rgba(11, 61, 109, 0.08);
  --shadow-hover: 0 18px 48px rgba(13, 92, 59, 0.15);
  --font: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-urdu: "Noto Nastaliq Urdu", "Plus Jakarta Sans", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

.urdu {
  font-family: var(--font-urdu);
}

.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
  padding-inline: 16px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(13, 92, 59, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.logo {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--green-700);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.nav a {
  color: var(--blue-800);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.nav a:hover {
  color: var(--green-600);
}

.nav-admin {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-800));
  color: #fff !important;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: none;
  background: var(--green-600);
  border-radius: 12px;
  cursor: pointer;
  position: relative;
}

.nav-toggle::before,
.nav-toggle::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
}

.nav-toggle::before {
  top: 16px;
  box-shadow: 0 6px 0 #fff;
}

.nav-toggle::after {
  bottom: 16px;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }
  .nav {
    position: fixed;
    inset: 64px 16px auto 16px;
    background: #fff;
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    flex-direction: column;
    align-items: stretch;
    display: none;
  }
  .nav.open {
    display: flex;
  }
}

/* Hero */
.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 5rem) 0;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, #e8f5ef 0%, #e3f2fd 45%, #f5faf7 100%);
  z-index: 0;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: -40% -20%;
  background: radial-gradient(circle at 30% 20%, rgba(20, 128, 90, 0.15), transparent 50%),
    radial-gradient(circle at 80% 60%, rgba(21, 101, 192, 0.12), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  line-height: 1.2;
  margin: 0 0 1rem;
  color: var(--blue-800);
  letter-spacing: -0.03em;
}

.hero-sub {
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-size: 1.05rem;
}

/* Sections */
.section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.section-alt {
  background: linear-gradient(180deg, #fff 0%, #f0f7f4 100%);
}

.section-title {
  text-align: center;
  font-size: 1.75rem;
  margin: 0 0 0.5rem;
  color: var(--green-700);
}

.section-lead {
  text-align: center;
  color: var(--muted);
  margin: 0 0 2rem;
}

/* Program grid */
.program-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.program-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.program-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.program-card.is-selected {
  border-color: var(--green-400);
  box-shadow: 0 0 0 3px rgba(47, 178, 124, 0.25);
}

.program-icon {
  font-size: 2rem;
  line-height: 1;
}

.program-icon-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
}

.program-icon-img-wrap img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.section-programs-bottom {
  background: linear-gradient(180deg, #f5faf7 0%, #fff 100%);
  border-top: 1px solid rgba(13, 92, 59, 0.1);
}

.page-flow {
  padding-top: 0.5rem;
}

.program-card h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--blue-800);
}

.program-card p {
  margin: 0;
  flex: 1;
  color: var(--muted);
  font-size: 0.92rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: transform 0.15s ease, box-shadow 0.2s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--green-600), var(--green-700));
  color: #fff;
  box-shadow: 0 8px 24px rgba(13, 92, 59, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 12px 28px rgba(13, 92, 59, 0.35);
}

.btn-lg {
  padding: 0.95rem 1.75rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

.btn-card {
  margin-top: auto;
  background: linear-gradient(135deg, var(--blue-600), var(--blue-800));
  color: #fff;
}

.btn-outline {
  background: #fff;
  color: var(--blue-800);
  border: 2px solid rgba(21, 101, 192, 0.25);
}

.btn-wa {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #fff;
}

.empty-msg {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--muted);
}

/* Forms */
.selected-banner {
  background: linear-gradient(90deg, rgba(20, 128, 90, 0.12), rgba(21, 101, 192, 0.1));
  border: 1px solid rgba(20, 128, 90, 0.25);
  padding: 0.85rem 1rem;
  border-radius: 12px;
  margin-bottom: 1.25rem;
  color: var(--green-700);
}

.form-card,
.result-card,
.success-card {
  max-width: 520px;
  margin-inline: auto;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow);
}

.form-title {
  margin: 0 0 0.35rem;
  color: var(--blue-800);
}

.form-hint {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.field span {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.field input {
  padding: 0.95rem 1rem;
  border-radius: 12px;
  border: 2px solid #dfe8e3;
  font-size: 1.05rem;
  font-family: inherit;
  min-height: 52px;
}

.field input:focus {
  outline: none;
  border-color: var(--green-400);
  box-shadow: 0 0 0 3px rgba(47, 178, 124, 0.2);
}

.field select.field-select,
.field-select {
  padding: 0.95rem 1rem;
  border-radius: 12px;
  border: 2px solid #dfe8e3;
  font-size: 1.05rem;
  font-family: inherit;
  min-height: 52px;
  width: 100%;
  background-color: #fff;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%230d5c3b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.field select.field-select:focus,
.field-select:focus {
  outline: none;
  border-color: var(--green-400);
  box-shadow: 0 0 0 3px rgba(47, 178, 124, 0.2);
}

.hp-wrap {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

.request-form {
  position: relative;
  margin-top: 1rem;
}

.error-text {
  color: #c62828;
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
}

/* Results */
.result-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-top: 1.25rem;
}

.result-success {
  background: linear-gradient(145deg, #e8f8f0, #f2fcf6);
  border: 1px solid #8fd4b4;
}

.result-success h3 {
  margin: 0 0 0.75rem;
  color: var(--green-700);
}

.result-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.result-list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid rgba(13, 92, 59, 0.12);
  font-size: 0.98rem;
}

.result-list li:last-child {
  border-bottom: none;
}

.result-warn {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: #6d4c1a;
}

.result-warn p {
  margin: 0 0 1rem;
  font-weight: 600;
}

/* Success */
.success-card {
  text-align: center;
  border: 1px solid rgba(20, 128, 90, 0.25);
  background: linear-gradient(180deg, #fff, #f0faf5);
}

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green-400), var(--green-700));
  color: #fff;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(13, 92, 59, 0.3);
}

.success-card h3 {
  margin: 0 0 1.25rem;
  color: var(--green-700);
  font-size: 1.15rem;
  line-height: 1.45;
}

.success-user-summary {
  text-align: left;
  background: #fff;
  border: 1px solid rgba(21, 101, 192, 0.2);
  border-radius: 12px;
  padding: 1rem 1.15rem;
  margin: 0 auto 1rem;
  max-width: 100%;
}

.success-user-program {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--blue-800);
}

.success-user-line {
  margin: 0.35rem 0;
  font-size: 1rem;
}

.success-label {
  display: inline-block;
  min-width: 4.5rem;
  font-weight: 700;
  color: var(--muted);
}

.success-pending-note {
  text-align: left;
  margin: 0 0 1rem;
  padding: 1rem 1.15rem;
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: 12px;
  color: #5d4200;
  font-size: 0.98rem;
  line-height: 1.5;
}

.referral-box {
  text-align: left;
  background: #fff;
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px dashed rgba(21, 101, 192, 0.35);
}

.referral-box label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.referral-url {
  word-break: break-all;
  font-family: ui-monospace, monospace;
  font-size: 0.9rem;
  color: var(--blue-800);
  margin-bottom: 1rem;
}

.share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.share-actions .btn {
  flex: 1 1 calc(50% - 0.25rem);
  min-width: 140px;
}

.share-require {
  margin: 1rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.copy-toast {
  margin: 0.75rem 0 0;
  color: var(--green-700);
  font-weight: 700;
}

.admin-wa {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.admin-wa p {
  margin: 0 0 0.75rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  padding: 2rem 0;
  background: var(--blue-800);
  color: #e3eef8;
  font-size: 0.92rem;
}

.site-footer .privacy-note {
  margin-top: 1rem;
  opacity: 0.85;
  font-size: 0.88rem;
}
