:root {
  --white: #ffffff;
  --navy: #1f3d64;
  --ink: #1a202c;
  --teal: #49bbbd;
  --rose: #c37f80;
  --nav-rule: #e3cbcb;
  --footer-rule: #feece9;
  --muted: #5b5b5b;
  --pending-bg: #e7e9ee;
  --pending-ink: #5b6472;
  --radius-lg: 16px;
  --radius-md: 11px;
  --shadow-card: 0 4px 5px rgba(0, 0, 0, 0.22);
  --shadow-btn: 0 3px 5px rgba(0, 0, 0, 0.18);
  --shadow-btn-hover: 0 5px 9px rgba(0, 0, 0, 0.21);
  --font: "Rubik", "Heebo", "Assistant", sans-serif;
  --font-email: "Plus Jakarta Sans", "Rubik", sans-serif;
  --content: 73.75rem; /* ~1180px */
  --text-h1: clamp(2rem, 1.15rem + 2.6vw, 2.625rem);
  --text-h2: clamp(1.5rem, 1.05rem + 1.6vw, 1.875rem);
  --text-h3: clamp(1.25rem, 1.05rem + 0.55vw, 1.3125rem);
  --text-h4: clamp(1.0625rem, 0.98rem + 0.35vw, 1.25rem);
  --text-lead: 1rem;
  --text-body: 1rem;
  --lh-heading: 1.2;
  --lh-body: 1.7;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-body);
  line-height: var(--lh-body);
  color: var(--navy);
  background: var(--white);
  position: relative;
  overflow-x: hidden;
}

/* Decorative background — scrolls naturally with the page content */
.page-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background-image: url("../assets/home/homeBG.png");
  background-repeat: no-repeat;
  background-position: top center;
  background-size: cover;
  background-attachment: scroll;
}

.site-header,
.ata-onboarding-nav,
.site-footer {
  position: relative;
  z-index: 1;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* ===================================================================
   Header + Footer — copied from the homepage (index.html / style.css)
   so both pages look and behave identically.
   =================================================================== */

.site-header {
  background: var(--white);
  border-bottom: 0.625rem solid var(--nav-rule);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2.5rem;
  max-width: var(--content);
  margin: 0 auto;
  padding: 1.5rem 1.5rem;
}

.logo {
  flex-shrink: 0;
}

.logo img {
  width: 10.25rem;
  object-fit: contain;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2.5rem;
}

.main-nav a {
  width: fit-content;
  max-width: 100%;
  font-weight: 700;
  font-size: var(--text-body);
  padding: 0.75rem 0;
  white-space: nowrap;
  color: var(--teal);
  letter-spacing: -0.01em;
}

.main-nav a:hover {
  text-decoration: underline;
  text-underline-offset: 0.4rem;
}

/* Active page indicator — used in both the header and footer nav */
.active-nav-link {
  position: relative;
  color: #c37f80 !important;
  font-weight: 800;
}

.main-nav a.active-nav-link:hover,
.main-nav a.active-nav-link:focus-visible,
.footer-nav a.active-nav-link:hover,
.footer-nav a.active-nav-link:focus-visible {
  text-decoration: none;
}

.main-nav .active-nav-link::after,
.footer-nav .active-nav-link::after {
  content: "";
  position: absolute;
  right: 0;
  left: 0;
  bottom: 0.4rem;
  height: 0.125rem;
  background: #c37f80;
  border-radius: 999px;
}

.footer-nav .active-nav-link::after {
  bottom: -0.2rem;
}

.nav-toggle,
.nav-toggle-btn {
  display: none;
}

/* Layout: footer */
.site-footer {
  background: var(--white);
  border-top: 0.625rem solid var(--footer-rule);
  padding: 3rem 3rem 1.25rem;
}

.footer-grid {
  max-width: var(--content);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(16rem, 1.2fr) auto minmax(14rem, 1fr);
  gap: 2.5rem 3rem;
  align-items: start;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.footer-brand img {
  width: 12.5rem;
  object-fit: contain;
}

.footer-tagline {
  font-weight: 700;
  font-size: var(--text-body);
  letter-spacing: -0.02em;
  color: var(--teal);
}

.footer-support {
  font-weight: 700;
  font-size: var(--text-body);
  letter-spacing: -0.02em;
  max-width: 25rem;
}

.footer-email {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-email);
  font-weight: 700;
  font-size: var(--text-body);
  letter-spacing: -0.02em;
  direction: ltr;
  color: var(--navy);
  cursor: pointer;
}

.footer-email svg,
.footer-email img,
.footer-email-icon {
  width: 1.25rem;
  height: auto;
  flex-shrink: 0;
}

.footer-email:hover,
.footer-email:focus-visible {
  color: var(--teal);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.6rem;
  padding-top: 0.5rem;
}

.footer-nav a {
  width: fit-content;
  max-width: 100%;
  font-weight: 700;
  font-size: var(--text-body);
  letter-spacing: -0.02em;
  color: var(--teal);
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 0.4rem;
}

.footer-partners {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-partners img {
  width: auto;
  height: 4.75rem;
  max-width: 100%;
  object-fit: contain;
  flex-shrink: 0;
  background: transparent;
}

.footer-partners img.logo-mofet {
  height: 5rem;
}

.footer-partners img.logo-hinuch {
  height: 6rem;
}

.footer-partners img.logo-leon {
  height: 6.5rem;
}

@media (max-width: 64rem) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-partners {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
}

@media (max-width: 51.25rem) {
  .header-inner {
    flex-wrap: wrap;
  }

  .nav-toggle-btn {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0.75rem;
    margin-inline-start: auto;
  }

  .nav-toggle-btn span {
    display: block;
    width: 1.375rem;
    height: 0.2rem;
    background: var(--teal);
    border-radius: 2px;
  }

  .main-nav {
    display: none;
    width: 100%;
    max-height: calc(100dvh - 5.5rem);
    overflow-y: auto;
  }

  .nav-toggle:checked ~ .main-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 47.9375rem) {
  .header-inner {
    flex-wrap: wrap;
    padding: 1rem;
    gap: 0.75rem;
  }

  .logo img {
    width: 8.25rem;
  }

  .nav-toggle-btn {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.75rem;
    margin-inline-start: auto;
  }

  .nav-toggle-btn span {
    display: block;
    width: 1.375rem;
    height: 0.2rem;
    background: var(--teal);
    border-radius: 2px;
  }

  .main-nav {
    display: none;
    width: 100%;
  }

  .nav-toggle:checked ~ .main-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    order: 4;
  }

  .site-footer {
    padding: 2rem 1.25rem 1.25rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 0.75rem 1rem;
    width: 100%;
    padding-top: 0;
    text-align: right;
  }

  .footer-nav a,
  .footer-nav .about-nav-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    justify-self: start;
    width: fit-content;
    max-width: 100%;
    min-height: 2.75rem;
    margin: 0;
    padding: 0.35rem 0;
    line-height: 1.45;
    box-sizing: border-box;
  }

  .footer-brand img {
    width: 10.25rem;
  }

  .footer-partners {
    justify-content: flex-start;
    gap: 1.5rem;
  }

  .footer-partners img {
    height: 3.5rem;
  }

  .footer-partners img.logo-mofet {
    height: 3.75rem;
  }

  .footer-partners img.logo-hinuch {
    height: 4.5rem;
  }

  .footer-partners img.logo-leon {
    height: 5rem;
  }
}

a {
  color: inherit;
  text-decoration: none;
}

a,
.ata-unit-card {
  cursor: default;
}

.ata-unit-link {
  cursor: pointer;
  transition: all 0.3s ease;
}

h1,
h3,
p {
  margin: 0;
}

h1 {
  font-size: var(--text-h1);
  font-weight: 700;
  line-height: var(--lh-heading);
}

h3 {
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: var(--lh-heading);
}

p {
  font-size: var(--text-body);
  line-height: var(--lh-body);
}

/* Accessible, visually hidden helper text */
.ata-nav-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Page shell */
.ata-onboarding-nav {
  max-width: var(--content);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 6rem;
}

.page-title {
  font-size: var(--text-h1);
  line-height: var(--lh-heading);
  font-weight: 700;
  color: var(--teal);
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.ata-nav-intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  max-width: 47em;
  margin: 0 0 2.5rem;
  color: var(--teal);
  font-weight: 700;
  line-height: 1.6;
  letter-spacing: -0.02em;
  text-align: right;
  text-wrap: pretty;
}

.ata-nav-intro p {
  margin: 0;
}

.ata-nav-intro-pick {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  width: max-content;
  max-width: 100%;
  margin-bottom: 0;
  direction: rtl;
}

.ata-nav-click {
  display: block;
  width: 3.125rem;
  height: auto;
  flex-shrink: 0;
  object-fit: contain;
  background: transparent;
}

/* Units grid */
.ata-units-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.875rem;
  align-items: stretch;
}

/* Unit card */
.ata-unit-card {
  --ata-main: #add594;
  --ata-light: #ecf7ea;

  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid rgba(31, 61, 100, 0.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
  text-align: right;
  transition: all 0.3s ease;
}

/* Unit pastel themes */
.ata-unit-1 {
  --ata-main: #add594;
  --ata-light: #ecf7ea;
}

.ata-unit-2 {
  --ata-main: #ffee81;
  --ata-light: #fdfad9;
}

.ata-unit-3 {
  --ata-main: #f79897;
  --ata-light: #feece9;
}

.ata-unit-4 {
  --ata-main: #eabfd9;
  --ata-light: #fef2f6;
}

.ata-unit-5 {
  --ata-main: #b8e4ee;
  --ata-light: #f0f8fc;
}

.ata-unit-6 {
  --ata-main: #f59ec4;
  --ata-light: #fdecf4;
}

.ata-unit-7 {
  --ata-main: #c37f80;
  --ata-light: #f7ecec;
}

.ata-unit-heading-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.9375rem;
  width: 100%;
  margin-top: 55px !important;
  margin-bottom: 1.25rem;
}

/* Floating pin icon — detached from the heading row flow */
.ata-unit-icon {
  position: absolute !important;
  top: 24px !important;
  right: 24px !important;
  width: 48px !important;
  height: 48px !important;
  object-fit: contain;
  background: transparent;
  user-select: none;
  pointer-events: none;
}

.ata-unit-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.25rem 1rem;
  background: var(--ata-main);
  border-radius: 16px;
  color: var(--navy);
  font-weight: 700;
  font-size: 1.25rem;
  white-space: nowrap;
}

.ata-unit-title {
  width: 100%;
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.02em;
  text-align: right;
  margin-bottom: 35px !important;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* Status badge — silently reflects localStorage progress */
.ata-unit-status {
  position: absolute !important;
  top: 24px !important;
  left: 24px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.2rem 0.65rem;
  border: 1px solid rgba(31, 61, 100, 0.08);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  background: var(--pending-bg);
  color: var(--pending-ink);
}

.ata-unit-status.is-completed {
  background: var(--ata-light);
  color: var(--navy);
  border-color: transparent;
}

/* Unit link button — matches the home page's "btn-learn" style:
   an overall pill with a small inset circular bubble for the arrow. */
.ata-unit-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  margin-top: auto !important;
  width: fit-content;
  max-width: 100%;
  gap: 0.75rem;
  padding: 0.25rem 0.75rem 0.25rem 0.25rem;
  background: var(--ata-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-btn);
  color: var(--navy);
  font-weight: 700;
  font-size: var(--text-body);
  line-height: var(--lh-heading);
  letter-spacing: -0.15px;
}

.ata-unit-link:hover,
.ata-unit-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-btn-hover);
}

.ata-unit-link-text {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0.25rem;
  white-space: nowrap;
}

.ata-unit-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0.75rem;
  background: var(--ata-main);
  border-radius: var(--radius-lg);
  pointer-events: none;
}

.ata-unit-arrow img {
  width: 1.75rem;
  height: auto;
  flex-shrink: 0;
  object-fit: contain;
  background: transparent;
}

/* Sequential navigation (Prev/Next) — reusable component for the bottom
   of the content area. Currently only the "Back to home" (Prev) link is
   needed on this hub page; a "Next" link can be added as a second child
   and justify-content: space-between will place it on the opposite side. */
.ata-sequential-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 3rem;
}

.ata-nav-prev {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.125rem;
  transition: opacity 0.3s ease;
}

.ata-nav-prev:hover,
.ata-nav-prev:focus-visible {
  opacity: 0.75;
}

.ata-nav-prev-text {
  color: var(--navy);
}

.ata-nav-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rose);
  transition: transform 0.3s ease;
}

.ata-nav-prev:hover .ata-nav-arrow,
.ata-nav-prev:focus-visible .ata-nav-arrow {
  transform: translateX(3px);
}

/* Tablet */
@media (max-width: 59.375rem) {
  :root {
    --text-h2: 1.75rem;
    --text-h3: 1.25rem;
  }

  .ata-units-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.75rem 1.5rem;
  }

  .ata-unit-7 {
    grid-column: 1 / -1;
    max-width: none;
  }

  .ata-unit-number {
    font-size: 1.125rem;
  }
}

/* Mobile */
@media (max-width: 40.625rem) {
  :root {
    --text-h1: 2rem;
    --text-h2: 1.5rem;
    --text-h3: 1.25rem;
    --text-lead: 1rem;
  }

  .ata-onboarding-nav {
    padding: 2rem 1rem 4rem;
  }

  .ata-units-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .ata-unit-card {
    max-width: 26.875rem;
    margin: 0 auto;
    width: 100%;
    padding: 1.25rem;
  }

  .ata-unit-7 {
    grid-column: auto;
  }

  .ata-unit-number {
    font-size: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* Keyboard focus: one turquoise ring on every interactive control. */
:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid #49BBBD;
  outline-offset: 2px;
}

@media (max-width: 47.9375rem) {
  .ata-nav-click {
    width: 2.5rem;
  }

  .ata-nav-prev-text,
  .ata-nav-next-text {
    font-size: 0;
    line-height: 1;
  }

  .ata-nav-prev-text::after,
  .ata-nav-next-text::after {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--navy);
    white-space: nowrap;
  }

  .ata-nav-prev-text::after {
    content: "אחורה";
  }

  .ata-nav-next-text::after {
    content: "קדימה";
  }
}
