:root {
  --red: #c00d0d;
  --red-dark: #97090a;
  --dark: #1a1a1a;
  --gray-50: #faf7f7;
  --gray-100: #f3eeee;
  --gray-300: #ddd3d3;
  --gray-500: #8a7f7f;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #fff;
  color: var(--dark);
}

a { color: inherit; text-decoration: none; }

/* ---------- top bar ---------- */
.jpga-topbar {
  background: #000;
  color: #fff;
}
.jpga-topbar__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.jpga-logo {
  font-weight: 800;
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--red);
}
.jpga-topnav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
}
.jpga-topnav a:hover { color: var(--red); }
.jpga-cart {
  background: var(--red);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

/* ---------- wizard shell ---------- */
.jpga-wizard {
max-width: 900px;
margin: 0px auto 80px;
padding: 175px 20px;
}

/* ---------- step progress bar ---------- */
.jpga-steps {
  list-style: none;
  display: flex;
  justify-content: space-between;
  padding: 0;
  margin: 0 0 28px;
}
.jpga-steps__item {
  flex: 1;
  text-align: center;
  position: relative;
  font-size: 12px;
  color: var(--gray-500);
}
.jpga-steps__item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 15px;
  left: 55%;
  width: 90%;
  height: 2px;
  background: var(--gray-300);
  z-index: 0;
}
.jpga-steps__item--done:not(:last-child)::after,
.jpga-steps__item--active:not(:last-child)::after {
  background: var(--gray-300);
}
.jpga-steps__circle {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--gray-300);
  color: var(--gray-500);
  font-weight: 700;
  font-size: 13px;
}
.jpga-steps__item--active .jpga-steps__circle {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.jpga-steps__item--done .jpga-steps__circle {
  background: #fff;
  border-color: var(--red);
  color: var(--red);
}
.jpga-steps__label {
  display: block;
  margin-top: 6px;
  font-weight: 600;
}
.jpga-steps__item--active .jpga-steps__label { color: var(--red); }

/* ---------- card ---------- */
.jpga-card {
  position: relative;
  background: var(--gray-50);
  border-radius: 20px;
  padding: 150px 40px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}
.jpga-card::before,
.jpga-card::after {
  content: "";
  position: absolute;
  width: 70px;
  height: 70px;
  border-top: 2px solid var(--red);
  opacity: .5;
}
.jpga-card::before { top: 14px; left: 14px; transform: rotate(-45deg); border-top-width: 1px; }
.jpga-card::after  { bottom: 14px; right: 14px; transform: rotate(135deg); border-top-width: 1px; }

.jpga-card__heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 6px;
}
.jpga-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fde3e3;
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.jpga-card__heading h1 {
  font-size: 22px;
  margin: 0;
}
.jpga-card__sub {
  font-size: 13px;
  color: var(--gray-500);
  margin: 0 0 24px;
}
.jpga-card__sub a { color: var(--red); text-decoration: underline; }

/* ---------- form elements ---------- */
.jpga-field { margin-bottom: 18px; }
.jpga-field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}
.jpga-field label .req { color: var(--red); }

.jpga-input-wrap {
  position: relative;
}
.jpga-input-wrap .jpga-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  font-size: 14px;
}
.jpga-field input[type="text"],
.jpga-field input[type="email"],
.jpga-field input[type="tel"],
.jpga-field input[type="number"],
.jpga-field select {
  width: 100%;
  padding: 11px 14px 11px 38px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: var(--dark);
}
.jpga-field.no-icon input,
.jpga-field.no-icon select { padding-left: 14px; }
.jpga-field input:focus,
.jpga-field select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(192,13,13,0.12);
}

.jpga-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.jpga-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 640px) {
  .jpga-grid-2, .jpga-grid-4 { grid-template-columns: 1fr; }
}

/* phone field: country-code select + number input side by side */
.jpga-phone-row {
  display: flex;
  gap: 8px;
}
.jpga-phone-country {
  flex: 0 0 150px;
  min-width: 0;
  padding: 11px 8px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 13px;
  background: #fff;
  color: var(--dark);
}
.jpga-phone-number {
  flex: 1;
  min-width: 0;
  padding: 11px 14px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 14px;
  background: #fff;
  color: var(--dark);
}
.jpga-phone-country:focus,
.jpga-phone-number:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(192,13,13,0.12);
}
@media (max-width: 480px) {
  .jpga-phone-row { flex-direction: column; }
  .jpga-phone-country { flex-basis: auto; width: 100%; }
}

.jpga-section-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--red);
  letter-spacing: .04em;
  margin: 26px 0 12px;
}
.jpga-section-label:first-child { margin-top: 0; }

/* choice tiles (location / dates / program type / yes-no) */
.jpga-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.jpga-choices--2col { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) { .jpga-choices { grid-template-columns: 1fr 1fr; } }

.jpga-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
}
.jpga-choice input { accent-color: var(--red); }
.jpga-choice:has(input:checked) {
  border-color: var(--red);
  background: #fdeeee;
  font-weight: 700;
}
.jpga-choice.is-checked {
  border-color: var(--red);
  background: #fdeeee;
  font-weight: 700;
}

/* ---------- notices (contact-only pricing / info callouts) ---------- */
.jpga-notice {
  background: #fdeeee;
  border: 1px solid #f6caca;
  color: var(--dark);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 22px;
}
.jpga-notice--muted {
  background: var(--gray-100);
  border-color: var(--gray-300);
  color: var(--gray-500);
}

/* ---------- package / tier choice tiles (richer than a plain 1-line tile) ---------- */
.jpga-choices--tiers .jpga-choice {
  align-items: flex-start;
  padding: 14px;
}
.jpga-choices--tiers .jpga-choice > span {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.jpga-choice__title { font-weight: 800; font-size: 13px; }
.jpga-choice__meta { color: var(--gray-500); font-size: 12px; font-weight: 400; }
.jpga-choice__price { color: var(--red); font-weight: 700; font-size: 12px; }

/* ---------- buttons ---------- */
.jpga-actions {
  margin-top: 30px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  border: none;
  cursor: pointer;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); }
.btn-outline {
  background: #fff;
  border: 1px solid var(--gray-300);
  color: var(--dark);
}
.btn-link {
  background: none;
  border: none;
  color: var(--gray-500);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
}

/* ---------- program cart table (Programs step / Review step) ---------- */
.jpga-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 24px;
  font-size: 13px;
}
.jpga-table th {
  text-align: left;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--gray-500);
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-300);
}
.jpga-table td {
  padding: 12px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.jpga-table .icon-cell { color: var(--red); }
.jpga-table input[type="number"] { width: 70px; padding: 8px; }
.jpga-table .delete-btn {
  color: var(--red);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

/* ---------- review blocks ---------- */
.jpga-review-block {
  border: 1px solid var(--gray-300);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 18px;
  background: #fff;
}
.jpga-review-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--red);
}
.jpga-review-block__head a { font-size: 12px; text-decoration: underline; color: var(--dark); }
.jpga-review-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  font-size: 13px;
  padding: 10px 0;
  border-top: 1px solid var(--gray-100);
}
.jpga-review-row:first-of-type { border-top: none; }
.jpga-review-row .label { display: block; color: var(--gray-500); font-size: 11px; }
.jpga-program-index {
  color: var(--red);
  font-weight: 800;
  font-size: 12px;
  margin-bottom: 4px;
}

/* ---------- payment summary ---------- */
.jpga-cost-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 13px;
}
.jpga-cost-line.total {
  font-weight: 800;
  border-top: 1px solid var(--gray-300);
}
.jpga-cost-line.deposit {
  color: var(--red);
  font-weight: 800;
}

/* ---------- confirmation ---------- */
.jpga-confirm {
  text-align: center;
  padding: 30px 0 10px;
}
.jpga-confirm__badge {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--red);
  color: var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin: 0 auto 12px;
}
.jpga-confirm h1 { margin: 0 0 4px; }
.jpga-confirm p { color: var(--gray-500); margin: 0 0 20px; }

.jpga-error { color: var(--red); font-size: 12px; margin-top: -12px; margin-bottom: 14px; }

/* ---------- table horizontal scroll on small screens ---------- */
.jpga-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.jpga-table-wrap .jpga-table { min-width: 480px; }

/* ================= RESPONSIVE ================= */

@media (max-width: 900px) {
  .jpga-wizard { max-width: 100%; }
}

@media (max-width: 768px) {
  .jpga-topbar__inner { flex-wrap: wrap; gap: 10px 16px; padding: 12px 16px; }
  .jpga-topnav { gap: 12px 16px; font-size: 12px; order: 3; width: 100%; justify-content: center; }
  .jpga-card { padding: 26px 20px; }
  .jpga-card__heading h1 { font-size: 19px; }
  .jpga-grid-4 { grid-template-columns: 1fr 1fr; }
  .jpga-review-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  
  .jpga-card { padding: 20px 16px; border-radius: 14px; }
  .jpga-card::before, .jpga-card::after { display: none; }

  /* step bar: keep circles + connecting line, drop labels to save space */
  .jpga-steps__label { font-size: 10px; }
  .jpga-steps__circle { width: 24px; height: 24px; font-size: 11px; }
  .jpga-steps__item:not(:last-child)::after { top: 12px; }

  .jpga-choices { grid-template-columns: 1fr; }
  .jpga-review-row { grid-template-columns: 1fr; gap: 8px; }

  .jpga-actions { flex-wrap: wrap; gap: 10px; }
  .btn { width: 100%; justify-content: center; }
  .btn-link { width: auto; }

  .jpga-table th, .jpga-table td { padding: 8px; font-size: 12px; }
}

@media (max-width: 400px) {
  .jpga-steps__label { display: none; }
  .jpga-card__heading { flex-wrap: wrap; }
}
