/* Reset בסיסי + RTL */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg, #FFFDF7);
  color: var(--ink, #232323);
  font-family: 'Heebo', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.6;
  direction: rtl;
  text-align: right;
  overflow-x: hidden;
  /* <--- התיקון לגלילה האופקית */
}

/* צבעים */
:root {
  --bg: #FFFDF7;
  --ink: #232323;
  --muted: #6A6A6A;
  --sun-1: #FFF6D9;
  --sun-2: #FFE29A;
  --sun-3: #FFB347;
  --gold: #FFC247;
  --accent: #FF8A3D;
  --ok: #2e7d32;
  --err: #c62828;
  --card: #FFFFFF;
  --ring: rgba(255, 153, 0, 0.35);
  --shadow: 0 8px 28px rgba(0, 0, 0, .08);
}

/* קונטיינר */
.container {
  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* הירו */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sun-1) 0%, var(--sun-2) 40%, var(--sun-3) 100%);
  padding: 80px 0 96px;
}

.hero .sun {
  position: absolute;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #FFE9A8 0%, rgba(255, 255, 255, 0) 60%);
  top: -180px;
  inset-inline-end: -120px;
  pointer-events: none;
  opacity: 0.6;
  z-index: 0;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
  color: #9b6200;
  margin: 0 0 8px;
  font-size: 12px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4.2vw, 44px);
  line-height: 1.15;
}

.subtitle {
  margin: 0 0 16px;
  font-size: 18px;
  color: #7b4a00;
}

.hero-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.tag {
  background: rgba(255, 255, 255, .55);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 14px;
}

.main {
  margin-top: -40px;
  position: relative;
  /* <--- התיקון להסתרה (שלב 1) */
  z-index: 2;
  /* <--- התיקון להסתרה (שלב 2) */
}

/* כרטיס פתיח */
.intro {
  margin-bottom: 16px;
}

.intro-card {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.intro-card h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.intro-card ul {
  margin: 0 8px 8px 0;
  padding-inline-start: 20px;
}

.intro-card .note {
  color: var(--muted);
  margin-top: 8px;
  font-size: 14px;
}

/* טופס */
.form-section {
  margin: 18px 0 32px;
  display: flex;
  justify-content: center;
}

.form-card {
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 22px;
  width: 100%;
}

.form-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 760px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .field--wide {
    grid-column: 1 / -1;
  }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-weight: 600;
  font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #ead6b4;
  border-radius: 12px;
  background: #fffdf9;
  outline: none;
  font-size: 16px;
  color: var(--ink);
  transition: border .15s, box-shadow .15s, background .15s;
  text-align: right;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--ring);
  background: #fff;
}

.hint {
  font-size: 12px;
  color: var(--muted);
}

.error {
  display: block;
  font-size: 12px;
  color: var(--err);
  min-height: 16px;
}

.hp-wrapper {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* חברים */
.friends {
  margin-top: 14px;
  border: none;
  padding: 0;
}

.friends legend {
  font-weight: 800;
  margin-bottom: 8px;
  font-size: 16px;
}

/* מועדים */
.timeslots {
  margin-top: 10px;
  border: none;
  padding: 0;
}

.timeslots legend {
  font-weight: 800;
  margin-bottom: 8px;
  font-size: 16px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.switch input {
  display: none;
}

.switch-ui {
  width: 40px;
  height: 24px;
  background: #e9e1cf;
  border-radius: 999px;
  position: relative;
  transition: background .2s;
}

.switch-ui::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  top: 2px;
  inset-inline-start: 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
  transition: inset-inline-start .2s;
}

.switch input:checked+.switch-ui {
  background: linear-gradient(90deg, var(--gold), var(--accent));
}

.switch input:checked+.switch-ui::after {
  inset-inline-start: calc(100% - 22px);
}

.switch-label {
  font-size: 14px;
}

.friends-wrap {
  margin-top: 12px;
  border: 1px dashed #f0c987;
  border-radius: 14px;
  padding: 12px;
  background: #fffaf0;
}

.friends-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.friends-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.friend {
  position: relative;
  border: 1px solid #ffe1ad;
  border-inline-start: 4px solid var(--gold);
  border-radius: 12px;
  padding: 12px;
  padding-inline-end: 44px;
  background: #fffef8;
}

.friend-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 760px) {
  .friend-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.btn-icon {
  appearance: none;
  border: none;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  color: #1d1302;
  font-weight: 700;
  border-radius: 999px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(255, 152, 0, .25);
}

.btn-icon:disabled {
  opacity: .6;
  cursor: not-allowed;
}

.add-friend span {
  font-size: 20px;
  line-height: 1;
}

.remove-friend {
  position: absolute;
  inset-inline-end: 8px;
  top: 8px;
  color: #431f00;
}

.checks {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.check input {
  display: none;
}

.check-ui {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 1.5px solid #e2b770;
  background: #fff9ef;
  position: relative;
  margin-top: 2px;
}

.check input:checked+.check-ui {
  background: linear-gradient(135deg, var(--gold), var(--accent));
  border-color: transparent;
}

.check input:checked+.check-ui::after {
  content: '✓';
  position: absolute;
  color: #2d1a00;
  font-size: 14px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
}

.timeslots .checks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.timeslots .check {
  align-items: stretch;
}

.timeslots .check .check-ui {
  display: none;
}

.timeslots .check span:last-child {
  display: block;
  width: 100%;
  border: 1.5px solid #f1d5a4;
  background: #fffef8;
  border-radius: 12px;
  padding: 12px 14px;
  line-height: 3;
  transition: border .15s, box-shadow .15s, background .15s, transform .06s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .03);
}

.timeslots .check span:last-child:hover {
  border-color: var(--gold);
}

.timeslots .check input:checked+.check-ui+span {
  background: linear-gradient(180deg, #FFF7E5, #FFF1D0);
  border-color: var(--gold);
  box-shadow: 0 6px 16px rgba(255, 152, 0, .18);
}

.timeslots .check input:focus-visible+.check-ui+span {
  box-shadow: 0 0 0 4px var(--ring), 0 2px 8px rgba(0, 0, 0, .03);
  border-color: var(--gold);
}

.human-check {
  margin-top: 12px;
}

.human-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.cf-turnstile{
  display:block;
  box-sizing:border-box;
  width:100%;
  max-width:320px;
  margin-inline:auto;
}

.btn-primary {
  margin-top: 14px;
  appearance: none;
  border: none;
  cursor: pointer;
  padding: 14px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gold), var(--accent));
  color: #1a1203;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 10px 22px rgba(255, 152, 0, .28);
  transition: transform .06s ease, filter .2s;
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary:disabled {
  opacity: .7;
  cursor: not-allowed;
}

.secure-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.form-status {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
  min-height: 18px;
}

.form-status.ok {
  color: var(--ok);
}

/* FAQ + פוטר */
.faq {
  margin-bottom: 36px;
}

.faq details {
  background: #fff;
  border: 1px solid #f1d5a4;
  border-radius: 12px;
  padding: 10px 12px;
  margin: 10px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
}

.faq p {
  margin: 8px 0 0;
  color: var(--muted);
}

.footer {
  background: #FFF7E5;
  border-top: 1px solid #F5E2BD;
  padding: 22px 0;
  color: #5b3b00;
}

.footer .mini {
  font-size: 12px;
  color: #7a5a1f;
}