/* =====================================================================
   #GROWWITHJARO POPUP – styles
   Everything is prefixed "gwj-" so it doesn't affect the rest of your page.
   Colours and fonts are set once below.
   ===================================================================== */
.gwj-popup {
  --gwj-red: #F24B01;          /* buttons */
  --gwj-red-dark: #b73700;     /* button hover */
  --gwj-jaro: #31396a;         /* Jaro Education blue */
  --gwj-jaro-light: #eef0f8;   /* soft Jaro blue */
  --gwj-ink: #121316;          /* headings */
  --gwj-text: #4b4d53;         /* body text */
  --gwj-muted: #74767c;        /* small print */
  --gwj-line: #e2e1dd;         /* borders */
  --gwj-mist: #f3f2ef;         /* light grey */
  --gwj-font: Manrope, "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --gwj-font-head: Fraunces, Georgia, "Times New Roman", serif;
}

/* Hide everything inside the popup that is marked hidden */
.gwj-popup [hidden], .gwj-popup[hidden] { display: none !important; }

/* ---- Layer + dark backdrop ---- */
.gwj-popup {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 20px calc(20px + env(safe-area-inset-bottom, 0px));
  font-family: var(--gwj-font); color: var(--gwj-text); line-height: 1.5;
  transform: scale(1);
}
.gwj-popup *, .gwj-popup *::before, .gwj-popup *::after { box-sizing: border-box; }
.gwj-popup p, .gwj-popup h2, .gwj-popup ul { margin: 0; }
.gwj-backdrop { position: absolute; inset: 0; background: rgba(20, 8, 10, .72); animation: gwj-fade .2s ease-out; }
body.gwj-no-scroll { overflow: hidden; }

/* ---- Box: campus panel (left) + content (right) ---- */
/* INCREASED overall popup dimensions: 440px side panel + 540px main section = 980px total width */
.gwj-box {
  position: relative; display: grid; grid-template-columns: 440px 540px;
  max-width: 95vw; max-height: 92vh; overflow: auto;
  border-radius: 16px; background: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
  animation: gwj-pop .25s ease-out;
}
.gwj-box:focus { outline: none; }
.gwj-close {
  position: absolute; top: 16px; right: 16px; z-index: 3;
  display: grid; place-items: center; width: 42px; height: 42px;
  border: 0; border-radius: 50%; background: var(--gwj-mist); color: var(--gwj-ink); cursor: pointer;
}
.gwj-close:hover { background: var(--gwj-line); }

/* ---- Left panel ---- */
.gwj-side { position: relative; overflow: hidden; background: #3a1215; color: #fff; }
.gwj-side-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 40% 50%; }
.gwj-side::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(30, 8, 10, .55) 0%, rgba(30, 8, 10, .92) 70%); }
.gwj-side-copy { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; padding: 40px 36px; }
.gwj-side-title { font-size: 30px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.gwj-side-list { display: grid; gap: 14px; margin-top: 22px; padding: 0; list-style: none; }
.gwj-side-list li { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; line-height: 1.4; color: #f0e4e4; }
.gwj-side-list li::before {
  content: ""; flex: 0 0 22px; height: 22px; border-radius: 50%;
  background: var(--gwj-red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
}
/* White Jaro card – step 2 only */
.gwj-side-card { display: none; margin-top: 24px; padding: 18px 20px; border-radius: 12px; background: #fff; color: var(--gwj-text); font-size: 14px; line-height: 1.5; }
.gwj-popup[data-step="form"] .gwj-side-card { display: block; }
.gwj-side-card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.gwj-side-card-top img { width: 110px; height: auto; }
.gwj-side-card b { color: var(--gwj-jaro); font-size: 17px; }

/* ---- Right side ---- */
.gwj-main { display: flex; flex-direction: column; justify-content: center; padding: 48px 44px 36px; }
.gwj-tag {
  display: inline-block; padding: 6px 14px; border-radius: 6px;
  background: var(--gwj-jaro); color: #fff; font-size: 14px; font-weight: 800; line-height: 1.3;
}

/* Step switch: data-step="intro" or "form" on .gwj-popup */
.gwj-popup[data-step="intro"] .gwj-form-step,
.gwj-popup[data-step="form"] .gwj-intro { display: none; }

/* Step 1 */
.gwj-logo { width: 150px; height: auto; margin-bottom: 20px; }
.gwj-head { margin-top: 12px; color: var(--gwj-jaro); font-family: var(--gwj-font-head); font-size: 38px; font-weight: 700; line-height: 1.15; }
.gwj-text { margin-top: 12px; font-size: 17px; line-height: 1.5; }
.gwj-date { margin-top: 14px; color: var(--gwj-muted); font-size: 15px; font-weight: 600; }
.gwj-date b { color: var(--gwj-ink); }
.gwj-by {
  margin-top: 18px; padding: 12px 16px; border-left: 4px solid var(--gwj-jaro); border-radius: 0 8px 8px 0;
  background: var(--gwj-jaro-light); color: var(--gwj-jaro); font-size: 14px; font-weight: 600; line-height: 1.5;
}
.gwj-intro .gwj-btn { margin-top: 24px; }

/* Step 2 */
.gwj-mini { display: none; }   /* phones only, see bottom */
.gwj-form-title { padding-right: 40px; color: var(--gwj-ink); font-family: var(--gwj-font-head); font-size: 32px; font-weight: 600; line-height: 1.15; }
.gwj-form-sub { margin-top: 8px; font-size: 16px; }
.gwj-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.gwj-field { display: grid; gap: 6px; min-width: 0; }
.gwj-field > span:first-child { color: var(--gwj-ink); font-size: 14px; font-weight: 600; }
.gwj-field input, .gwj-field select, .gwj-phone, .gwj-otp {
  width: 100%; height: 48px; padding: 0 14px;
  border: 1.5px solid #d6d6db; border-radius: 8px; background: #fff;
  color: var(--gwj-ink); font: 400 15px var(--gwj-font);
}
.gwj-field select {
  appearance: none; padding-right: 36px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23121316' stroke-width='1.6'/%3E%3C/svg%3E") right 14px center / 14px no-repeat;
}
.gwj-field input:focus, .gwj-field select:focus, .gwj-phone:focus-within, .gwj-otp:focus-within {
  outline: none; border-color: var(--gwj-red); box-shadow: 0 0 0 3px rgba(224, 23, 31, .14);
}
.gwj-field.is-invalid input, .gwj-field.is-invalid select, .gwj-field.is-invalid .gwj-phone, .gwj-field.is-invalid .gwj-otp { border-color: var(--gwj-red); }
.gwj-phone, .gwj-otp { display: flex; align-items: center; padding: 0; overflow: hidden; }
.gwj-phone em { padding: 0 10px 0 12px; border-right: 1px solid #e0e0e4; color: var(--gwj-muted); font-size: 14px; font-style: normal; }
.gwj-field .gwj-phone input, .gwj-field .gwj-otp input { flex: 1; min-width: 0; height: 100%; border: 0; box-shadow: none; background: transparent; }
.gwj-field .gwj-otp input:disabled { cursor: not-allowed; }
.gwj-otp-btn {
  flex: 0 0 auto; height: 34px; margin-right: 6px; padding: 0 12px;
  border: 0; border-radius: 8px; background: #fdebec; color: var(--gwj-red);
  font: 700 13.5px var(--gwj-font); white-space: nowrap; cursor: pointer;
}
.gwj-otp-btn:disabled { background: var(--gwj-mist); color: #8c8c94; cursor: default; }
.gwj-otp-note { margin-top: 10px; color: #1f7a45; font-size: 13.5px; }
.gwj-otp-note.is-error { color: #8a1a1f; }
.gwj-consent { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0; font-size: 13px; line-height: 1.5; }
.gwj-consent input { flex: 0 0 auto; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--gwj-red); }
.gwj-consent a { color: inherit; }
.gwj-status { margin-top: 14px; padding: 14px; border-radius: 8px; background: #fff3f3; color: #8a1a1f; font-size: 14px; }
.gwj-status.is-success { background: #e9f6ee; color: #1f6b3d; }

/* Buttons */
.gwj-btn {
  display: inline-flex; align-items: center; justify-content: center; height: 58px; padding: 0 32px;
  border: 0; border-radius: 8px; background: var(--gwj-red); color: #fff;
  font: 700 17px var(--gwj-font); cursor: pointer; transition: background .2s;
}
.gwj-btn:hover { background: var(--gwj-red-dark); }
.gwj-btn:disabled { opacity: .6; cursor: default; }
.gwj-btn-block { width: 100%; }

/* Note under both steps */
.gwj-note { margin-top: 14px; color: var(--gwj-muted); font-size: 12.5px; line-height: 1.45; }

.gwj-existing-form-row { display: flex; gap: 14px; }
.gwj-existing-form-row > div { flex: 1 1 0; min-width: 0; }
.gwj-existing-form-row label { display: block; margin-bottom: 6px; }
.gwj-existing-form-row input, .gwj-existing-form-row select { width: 100%; }

/* ---- Tablets and phones: no campus panel ---- */
@media (max-width: 900px) {
  .gwj-box { grid-template-columns: minmax(0, 1fr); width: 100%; max-width: 520px; }
  .gwj-side { display: none; }
  .gwj-main { padding: 36px 28px 28px; }
  /* Step 2: compact Jaro header above the form */
  .gwj-mini {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px;
    margin: -36px -28px 22px; padding: 24px 60px 18px 28px;
    border-bottom: 1px solid #dfe2f0; background: var(--gwj-jaro-light);
  }
  .gwj-mini img { width: 125px; height: auto; }
  .gwj-mini p { width: 100%; color: var(--gwj-jaro); font-family: var(--gwj-font-head); font-size: 22px; font-weight: 600; }
}
@media (max-width: 600px) {
  .gwj-popup { padding: 12px; }
  .gwj-main { padding: 28px 20px 20px; }
  .gwj-mini { margin: -28px -20px 18px; padding: 20px 52px 16px 20px; }
  .gwj-head { font-size: 28px; }
  .gwj-form-title { font-size: 24px; }
}
@media (max-width: 380px) {
  .gwj-existing-form-row { flex-direction: column; }
  .gwj-existing-form-row > div { width: 100%; }
}
@media (max-width: 360px) { .gwj-fields { grid-template-columns: 1fr; } }
/* Short screens: tighter form */
@media (max-height: 680px) and (max-width: 600px) {
  .gwj-form-sub { display: none; }
  .gwj-fields { gap: 10px; margin-top: 14px; }
  .gwj-consent { margin: 12px 0; }
}

@keyframes gwj-fade { from { opacity: 0; } }
@keyframes gwj-pop  { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .gwj-backdrop, .gwj-box { animation: none; } }

/* ---- Demo page only ---- */
.demo { max-width: 640px; margin: 80px auto; padding: 0 20px; font-family: Manrope, system-ui, sans-serif; color: #121316; }
.demo h1 { font-size: 28px; }
.demo-btn { margin: 8px 8px 0 0; padding: 12px 18px; border: 0; border-radius: 6px; background: #121316; color: #fff; font: 700 14px Manrope, system-ui, sans-serif; cursor: pointer; }