/* שאלון אפיון גן פרא — עיצוב. טוקנים זהים לאתר (עצמאי, לא טוען shared.css). */

@font-face {
  font-family: "Alef";
  src:
    url("../../fonts/Alef_Regular.woff2") format("woff2"),
    url("../../fonts/Alef_Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Alef";
  src:
    url("../../fonts/Alef-Bold.woff2") format("woff2"),
    url("../../fonts/Alef-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TelAviv";
  src:
    url("../../fonts/TelAviv-BrutalistLight.woff2") format("woff2"),
    url("../../fonts/TelAviv-BrutalistLight.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TelAviv";
  src:
    url("../../fonts/TelAviv-BrutalistRegular.woff2") format("woff2"),
    url("../../fonts/TelAviv-BrutalistRegular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "TelAviv";
  src:
    url("../../fonts/TelAviv-BrutalistBold.woff2") format("woff2"),
    url("../../fonts/TelAviv-BrutalistBold.ttf") format("truetype");
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

:root {
  --green-dark: #1b3024;
  --green-mid: #253d2c;
  --green-accent: #c4623a;
  --green-pale: #faf0eb;
  --cream: #f9f9f7;
  --cream-dark: #f0f0ec;
  --white: #ffffff;
  --text: #1a1a1a;
  --text-mid: #444;
  --text-light: #5c5c5c;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 36px rgba(0, 0, 0, 0.12);
}

html {
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: "Alef", sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---- בר עליון ---- */
.q-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}
.q-logo {
  font-family: "TelAviv", sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--green-dark);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.q-back,
.q-top-spacer {
  width: 44px;
  height: 44px;
}
.q-back {
  border: 1px solid var(--cream-dark);
  background: var(--white);
  border-radius: 50%;
  font-size: 1.2rem;
  color: var(--green-dark);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    border-color 0.2s,
    transform 0.2s;
}
.q-back:hover {
  border-color: var(--green-accent);
  transform: translateX(2px);
}
.q-back:focus-visible,
.q-logo:focus-visible {
  outline: 2px solid var(--green-accent);
  outline-offset: 2px;
}

/* ---- progress ---- */
.q-progress {
  height: 3px;
  background: var(--cream-dark);
  max-width: 720px;
  width: calc(100% - 40px);
  margin: 0 auto;
  border-radius: 2px;
  overflow: hidden;
}
.q-progress-fill {
  height: 100%;
  width: 0;
  background: var(--green-accent);
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---- מסך ---- */
.q-screen {
  flex: 1;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: 28px 20px 96px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.q-step {
  animation: qSlideIn 0.38s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes qSlideIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.q-title {
  font-family: "TelAviv", sans-serif;
  font-weight: 700;
  font-size: clamp(1.4rem, 5.4vw, 1.9rem);
  color: var(--green-dark);
  line-height: 1.25;
  margin-bottom: 8px;
}
.q-title:focus {
  outline: none;
}
.q-subtitle {
  color: var(--text-mid);
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 24px;
}

/* ---- כרטיסי בחירה ---- */
.q-options {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, 1fr);
}
.q-options.cols-1 {
  grid-template-columns: 1fr;
}
@media (max-width: 540px) {
  .q-options.narrow-1 {
    grid-template-columns: 1fr;
  }
}

.opt-card {
  position: relative;
  text-align: right;
  font-family: inherit;
  background: var(--white);
  border: 2px solid transparent;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition:
    border-color 0.18s,
    background 0.18s,
    transform 0.18s,
    box-shadow 0.18s;
  min-height: 64px;
}
.opt-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.opt-card:focus-visible {
  outline: 2px solid var(--green-accent);
  outline-offset: 2px;
}
.opt-card.selected {
  border-color: var(--green-accent);
  background: var(--green-pale);
  animation: qPick 0.15s ease-out;
}
@keyframes qPick {
  from {
    transform: scale(0.98);
  }
  to {
    transform: scale(1);
  }
}
.opt-card .opt-check {
  position: absolute;
  top: 10px;
  left: 12px;
  font-weight: 700;
  color: var(--green-accent);
  opacity: 0;
  transition: opacity 0.15s;
}
.opt-card.selected .opt-check {
  opacity: 1;
}
.opt-card img {
  width: 100%;
  height: 96px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 4px;
}
.opt-card .opt-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.opt-card .opt-label {
  font-weight: 700;
  color: var(--text);
  font-size: 1.02rem;
}
.opt-card .opt-sub {
  color: var(--text-light);
  font-size: 0.86rem;
  line-height: 1.4;
}

/* ---- chips ---- */
.q-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chip {
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--text);
  background: var(--white);
  border: 1.5px solid var(--cream-dark);
  border-radius: 999px;
  padding: 11px 18px;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
  min-height: 44px;
}
.chip:focus-visible {
  outline: 2px solid var(--green-accent);
  outline-offset: 2px;
}
.chip.selected {
  border-color: var(--green-accent);
  background: var(--green-pale);
  font-weight: 700;
}
.q-chips-hint {
  color: var(--text-light);
  font-size: 0.85rem;
  margin-top: 10px;
}

/* ---- stepper ---- */
.q-stepper-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 8px;
}
.q-stepper-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--cream-dark);
  background: var(--white);
  font-size: 1.4rem;
  color: var(--green-dark);
  cursor: pointer;
  transition: border-color 0.15s;
}
.q-stepper-btn:hover,
.q-stepper-btn:focus-visible {
  border-color: var(--green-accent);
}
.q-stepper-val {
  min-width: 110px;
  text-align: center;
  font-family: "TelAviv", sans-serif;
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--green-dark);
}
.q-stepper-val small {
  display: block;
  font-family: "Alef";
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ---- inputs ---- */
.q-field {
  margin-bottom: 16px;
  text-align: right;
}
.q-field label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: var(--text);
}
.q-input,
.q-textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--white);
  border: 1.5px solid var(--cream-dark);
  border-radius: 12px;
  padding: 14px 16px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.q-textarea {
  min-height: 110px;
  resize: vertical;
}
.q-input:focus,
.q-textarea:focus {
  outline: none;
  border-color: var(--green-accent);
  box-shadow: 0 0 0 3px rgba(196, 98, 58, 0.12);
}
.q-error {
  color: #b3261e;
  font-size: 0.86rem;
  margin-top: 6px;
  display: none;
}
.q-field.has-error .q-error {
  display: block;
}
.q-field.has-error .q-input {
  border-color: #b3261e;
}

/* honeypot — מוסתר גם ויזואלית וגם מ-tab */
.hp-field {
  position: absolute;
  right: -9999px;
  top: -9999px;
  height: 1px;
  width: 1px;
  overflow: hidden;
}

/* ---- כפתורים ---- */
.q-actions {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}
.btn-primary {
  font-family: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  background: var(--green-dark);
  color: var(--cream);
  border: none;
  border-radius: 999px;
  padding: 16px 32px;
  cursor: pointer;
  transition:
    transform 0.18s,
    box-shadow 0.18s,
    background 0.18s,
    opacity 0.18s;
  min-height: 52px;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  background: var(--green-mid);
}
.btn-primary:focus-visible {
  outline: 2px solid var(--green-accent);
  outline-offset: 3px;
}
.btn-primary:disabled {
  opacity: 0.45;
  cursor: default;
}
.btn-wa {
  background: #25d366;
  color: #fff;
  text-decoration: none;
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  border-radius: 999px;
  padding: 16px 32px;
  display: block;
  min-height: 52px;
  transition:
    transform 0.18s,
    box-shadow 0.18s;
}
.btn-wa:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.q-skip {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  align-self: center;
  padding: 8px;
}
.q-skip:hover {
  color: var(--green-accent);
}
.q-skip:focus-visible {
  outline: 2px solid var(--green-accent);
  outline-offset: 2px;
  border-radius: 6px;
}
.q-trust {
  text-align: center;
  color: var(--text-light);
  font-size: 0.85rem;
  margin-top: 12px;
  line-height: 1.5;
}

/* ---- מסך פתיחה / info ---- */
.q-info {
  text-align: center;
  padding-top: 6vh;
}
.q-info .q-title {
  font-size: clamp(1.7rem, 7vw, 2.4rem);
  margin-bottom: 14px;
}
.q-info .q-subtitle {
  max-width: 460px;
  margin: 0 auto 28px;
}
.q-info .q-actions {
  max-width: 340px;
  margin: 28px auto 0;
}

/* ---- composite (גישה ולוגיסטיקה) ---- */
.q-group {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  margin-bottom: 14px;
}
.q-group-label {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 10px;
}
.q-seg {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.q-seg .chip {
  flex: 1;
  text-align: center;
  min-width: 70px;
}

/* ---- upload ---- */
.q-upload-zone {
  border: 2px dashed var(--cream-dark);
  border-radius: var(--radius);
  background: var(--white);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
}
.q-upload-zone:hover,
.q-upload-zone:focus-visible {
  border-color: var(--green-accent);
  background: var(--green-pale);
}
.q-upload-zone .up-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 8px;
}
.q-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}
.q-thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--cream-dark);
  aspect-ratio: 1;
}
.q-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.q-thumb .th-pdf {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--green-dark);
}
.q-thumb .th-x {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.q-thumb .th-progress {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
}
.q-thumb .th-progress::after {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid var(--green-accent);
  border-top-color: transparent;
  animation: qSpin 0.8s linear infinite;
}
.q-thumb.failed {
  outline: 2px solid #b3261e;
}
@keyframes qSpin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- תוצאה ---- */
.q-result-block {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  margin-bottom: 16px;
  opacity: 0;
}
.q-result-block.revealed {
  animation: qSlideIn 0.4s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.q-result-hero img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 14px;
  background: var(--cream-dark);
}
.q-profile-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.q-profile-chips span {
  background: var(--green-pale);
  color: var(--green-dark);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.88rem;
  font-weight: 700;
}
.q-band {
  text-align: center;
  background: var(--green-dark);
  color: var(--cream);
}
.q-band .band-label {
  font-size: 0.9rem;
  opacity: 0.85;
  margin-bottom: 6px;
}
.q-band .band-name {
  font-family: "TelAviv", sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  margin-bottom: 4px;
}
.q-band .band-range {
  font-size: 1.25rem;
  font-weight: 700;
  color: #e8c4b0;
  margin-bottom: 10px;
}
.q-band .band-note {
  font-size: 0.83rem;
  opacity: 0.75;
  line-height: 1.5;
}
.q-next-steps {
  counter-reset: step;
}
.q-next-steps li {
  list-style: none;
  counter-increment: step;
  position: relative;
  padding-right: 44px;
  margin-bottom: 14px;
  line-height: 1.5;
}
.q-next-steps li::before {
  content: counter(step);
  position: absolute;
  right: 0;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green-pale);
  color: var(--green-accent);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- sticky CTA (מובייל) ---- */
.q-sticky {
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 50;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1);
}
.q-sticky .btn-wa {
  margin: 0 auto;
  max-width: 480px;
}
@media (min-width: 768px) {
  .q-sticky {
    display: none;
  }
}

/* ---- loading dots (בזמן שליחה אמיתית) ---- */
.q-dots {
  display: inline-flex;
  gap: 5px;
  vertical-align: middle;
}
.q-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  animation: qBounce 1.2s infinite;
}
.q-dots i:nth-child(2) {
  animation-delay: 0.2s;
}
.q-dots i:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes qBounce {
  0%,
  60%,
  100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .q-result-block {
    opacity: 1;
  }
}
