/* Public page and login page. These two pages are translated and must work right-to-left. */

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 18px; flex-wrap: wrap; }
.top-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.langs { display: flex; flex-wrap: wrap; gap: 6px; }
.langs button { border: 1.5px solid transparent; background: transparent; border-radius: 999px; padding: 5px 12px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--midnight); min-height: 34px; }
.langs button:hover { border-color: var(--midnight); }
.langs button[aria-pressed='true'] { background: var(--midnight); color: var(--sand); }

.hero { padding-block: 48px 64px; display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 32px; align-items: center; }
.hero h1 { font-size: clamp(38px, 6.2vw, 68px); line-height: 1.06; font-weight: 800; letter-spacing: -0.025em; }
[dir='rtl'] .hero h1 { letter-spacing: 0; line-height: 1.35; font-weight: 700; }
.hero p { font-size: clamp(18px, 2.1vw, 21px); color: var(--slate); margin: 22px 0 30px; max-width: 34em; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-art { display: flex; justify-content: center; }
.hero-art svg { width: min(100%, 300px); height: auto; color: var(--coral); }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-bottom: 64px; }
.fact { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 24px; }
.fact h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; margin-bottom: 8px; }
[dir='rtl'] .fact h3, [dir='rtl'] .step h3, [dir='rtl'] h2 { letter-spacing: 0; font-weight: 700; }
.fact p { color: var(--slate); font-size: 16px; }

.how { padding-bottom: 72px; }
h2 { font-size: clamp(26px, 3.6vw, 36px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 26px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; list-style: none; margin: 0; padding: 0; counter-reset: step; }
.step { counter-increment: step; border-top: 3px solid var(--midnight); padding-top: 16px; }
.step::before { content: counter(step); display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 50%; background: var(--midnight); color: var(--sand); font-weight: 800; font-size: 15px; margin-bottom: 12px; font-family: 'Manrope', sans-serif; }
.step h3 { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.step p { color: var(--slate); font-size: 16px; }

/* 4-step "How it works": two by two on wide screens, one column on phones. */
.steps-4 { grid-template-columns: repeat(4, 1fr); }

/* "Ask for a place" form */
.request-band { background: var(--mist); padding: 64px 0 72px; }
.request-wrap { max-width: 760px; }
.request-head p { color: var(--slate); font-size: 18px; margin-bottom: 26px; }
.request-head h2 { margin-bottom: 10px; }
.request-form { background: var(--white); border: 1px solid #C9DAD8; border-radius: 18px; padding: 28px 26px; }
.request-form fieldset { border: 0; margin: 0 0 10px; padding: 0; min-width: 0; }
.request-form legend { float: left; width: 100%; font-size: 18px; font-weight: 800; padding: 0; margin-bottom: 12px; }
[dir='rtl'] .request-form legend { float: right; }
.request-form legend + * { clear: both; }
[dir='rtl'] .request-form legend { font-weight: 700; }
.request-form fieldset + fieldset { border-top: 1px solid var(--line); padding-top: 22px; }
.req-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.request-form .field small.hint { display: block; margin-top: 5px; }
.request-form .field > span small { font-weight: 600; color: var(--slate); }
.req-note { margin: -4px 0 14px; }
/* Teacher preferences: tap-to-choose buttons ("chips"). */
.pref { margin-bottom: 18px; border: 0; }
.pref-label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 8px 16px; border: 1.5px solid #C9C0B1; border-radius: 999px; background: var(--white); font-size: 15px; font-weight: 600; cursor: pointer; user-select: none; }
.chip:hover { border-color: var(--midnight); }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.chip img { height: 14px; width: auto; border-radius: 2px; box-shadow: 0 0 0 1px rgba(20, 38, 58, 0.15); flex: none; }
.chip:has(input:checked) { border-color: var(--turquoise); background: #E2F0EF; box-shadow: inset 0 0 0 1px var(--turquoise); }
.chip input:checked ~ span { font-weight: 800; }
.chip:has(input:focus-visible) { outline: 3px solid var(--turquoise); outline-offset: 2px; }
.request-form input[dir='ltr'], .request-form select[dir='ltr'] { text-align: left; }
.consent { display: flex; gap: 12px; align-items: flex-start; margin: 8px 0 18px; font-size: 15px; color: var(--slate); cursor: pointer; }
.consent input { width: 22px; height: 22px; flex: none; margin-top: 2px; accent-color: var(--turquoise); }
.request-form .error { margin: 0 0 14px; }
.request-form .field-error { display: block; margin: 6px 0 0; font-size: 14px; }
.request-form [aria-invalid='true'] { border-color: var(--danger); }
.request-done { background: var(--white); border: 1px solid #C9DAD8; border-left: 6px solid var(--turquoise); border-radius: 18px; padding: 28px 26px; }
[dir='rtl'] .request-done { border-left-width: 1px; border-right: 6px solid var(--turquoise); }
.request-done h3 { font-size: 22px; font-weight: 800; margin-bottom: 6px; }
.request-done p { color: var(--slate); }
/* "Contact us" form */
.contact-wrap { max-width: 760px; padding-block: 64px 72px; }
.contact-privacy { margin: 0 0 14px; }
/* The spam trap: clipped to nothing and hidden from assistive tools (aria-hidden). No offset, so right-to-left pages do not scroll sideways. */
.trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }

.band { background: var(--midnight); color: var(--sand); padding: 64px 0; }
.band h2 { margin-bottom: 12px; }
.band p { color: #C9D5DC; font-size: 19px; max-width: 32em; margin-bottom: 26px; }

.foot { padding-block: 26px 34px; font-size: 14px; color: var(--slate); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* Login */
.login-page { min-height: 100vh; display: flex; flex-direction: column; }
.login-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 24px 20px 56px; }
.login-card { width: 100%; max-width: 420px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 32px 28px; }
.login-card h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 20px; }
[dir='rtl'] .login-card h1 { letter-spacing: 0; font-weight: 700; }
.login-card input { direction: ltr; text-align: left; font-family: 'Manrope', sans-serif; }
.login-card .btn { width: 100%; margin-top: 4px; }
.login-card .error { margin: 0 0 14px; }
.login-card .hint { margin-top: 18px; }
.login-back { display: inline-block; margin-top: 18px; font-size: 15px; font-weight: 600; }

/* 404 */
.lost { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.lost h1 { font-size: 34px; font-weight: 800; margin: 22px 0 10px; }
.lost p { color: var(--slate); margin-bottom: 22px; }

@media (max-width: 1000px) and (min-width: 821px) {
  .steps-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-block: 28px 48px; }
  .hero-art { display: none; }
  .facts, .steps, .steps-4, .req-grid { grid-template-columns: 1fr; }
  .request-band { padding: 48px 0 52px; }
  .contact-wrap { padding-block: 48px 52px; }
  .request-form, .request-done { padding: 22px 18px; }
  .facts { padding-bottom: 48px; }
  .how { padding-bottom: 52px; }
  .band { padding: 48px 0; }
}
