/* ===================================================================
   Unit 2 — Page 2: קהל היעד ומסגרות התוכנית
   Global tokens, header, footer, and sequential nav from theme.css.
   =================================================================== */

:root {
  --ata-green: #a9d48f;
  --ata-green-fill: #ddefd6;
  --ata-knob-ring: #f7b8b0;
  --ata-pink-head: #ebc0db;
  --ata-blue-head: #b9e4ed;
  --ata-knob-size: 2.75rem;
}

.ata-unit-page {
  max-width: var(--content);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.ata-unit-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  width: 100%;
  margin: 0 0 1.25rem;
  padding: 0;
  font-size: var(--text-h1);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-align: right;
}

.ata-unit-title-index,
.ata-unit-title-name {
  color: var(--teal);
}

.ata-unit-title-divider {
  color: var(--rose);
  padding: 0 0.625rem;
}

#athalta-audience-page {
  width: 100%;
  direction: rtl;
  text-align: right;
  color: var(--navy);
}

.ata-page-heading {
  width: 100%;
  margin: 0 0 0.5rem;
  color: var(--teal);
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  direction: rtl;
  text-align: right;
}

.ata-subheading {
  width: 100%;
  margin: 0 0 0.85rem;
  color: var(--teal);
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
  direction: rtl;
  text-align: right;
}

.ata-prose,
.ata-note-text,
.ata-frameworks-lead {
  width: 100%;
  max-width: var(--prose-measure);
  margin: 0;
  color: var(--navy);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: -0.02em;
  direction: rtl;
  text-align: right;
  text-wrap: pretty;
}

.ata-instruction {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  width: max-content;
  max-width: 100%;
  margin: 1rem 0 0;
  margin-inline-end: auto;
  color: var(--teal);
  font-size: var(--text-body);
  font-weight: 700;
  line-height: 1.5;
  direction: rtl;
  text-align: right;
}

.ata-click-icon {
  display: block;
  width: 3.125rem;
  height: auto;
  flex-shrink: 0;
  object-fit: contain;
}

.ata-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.ata-interactive {
  width: 100%;
  max-width: var(--prose-measure);
  margin: 1.5rem 0 0 auto;
  margin-right: 0;
  font-size: var(--text-body);
}

.ata-track {
  position: relative;
  direction: ltr;
  width: 100%;
  height: 3.25rem;
  margin: 0;
  cursor: pointer;
}

.ata-track-fill {
  position: absolute;
  top: 50%;
  right: 0;
  left: 0;
  height: 0.55rem;
  border: 0.125rem solid var(--ata-green);
  border-radius: 50px;
  background: var(--ata-green-fill);
  transform: translateY(-50%);
  pointer-events: none;
}

.ata-knob {
  position: absolute;
  top: 50%;
  left: 0;
  z-index: 3;
  display: block;
  width: var(--ata-knob-size);
  height: var(--ata-knob-size);
  margin: 0;
  padding: 0;
  border: 0.2rem solid var(--ata-knob-ring);
  border-radius: 50%;
  background: var(--ata-green);
  box-shadow: 0 0.15rem 0.4rem rgba(0, 0, 0, 0.12);
  cursor: pointer;
  appearance: none;
  transform: translateY(-50%);
  transition: left 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.ata-track.is-intern .ata-knob {
  left: calc(100% - var(--ata-knob-size));
}

.ata-track.is-teacher .ata-knob {
  left: 0;
}

.ata-knob:hover {
  transform: translateY(-50%) scale(1.06);
}

.ata-plants-row {
  display: flex;
  direction: ltr;
  justify-content: space-between;
  align-items: flex-end;
  width: 100%;
  margin-top: 0.15rem;
}

.ata-plant-side {
  display: flex;
  justify-content: center;
  width: 8.5rem;
  margin: 0;
  padding: 0.35rem;
  border: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
  transition: transform 0.3s ease;
}

.ata-plant-side:hover {
  transform: translateY(-0.15rem);
}

.ata-plant-side:focus-visible {
  border-radius: 0.75rem;
}

.ata-plant-image {
  display: block;
  width: 7.25rem;
  max-width: 100%;
  height: auto;
  flex-shrink: 0;
  object-fit: contain;
  opacity: 0.32;
  filter: saturate(0.75);
  transform: scale(0.96);
  transition: opacity 0.35s ease, filter 0.35s ease, transform 0.35s ease;
}

.ata-plant-side.is-active .ata-plant-image {
  opacity: 1;
  filter: none;
  transform: scale(1.04);
}

.ata-info-card {
  width: 100%;
  max-width: 26.5rem;
  margin: 0.75rem 0 0 auto;
  padding: 1.15rem 1.2rem 1.2rem;
  background: var(--white);
  border: 0.28rem solid var(--ata-green);
  border-radius: 0.625rem;
  box-shadow: 0 0.25rem 0.35rem rgba(0, 0, 0, 0.18);
  transition: margin 0.4s ease, opacity 0.25s ease, transform 0.4s ease;
}

.ata-info-card.is-intern {
  margin: 0.75rem 0 0 auto;
}

.ata-info-card.is-teacher {
  margin: 0.75rem auto 0 0;
}

.ata-card-title {
  display: inline-flex;
  max-width: 100%;
  margin: 0 0 0.65rem auto;
  padding: 0.2rem 0.65rem;
  border-radius: 0.55rem;
  background: var(--ata-green);
  color: var(--navy);
  font-size: var(--text-body);
  font-weight: 700;
  line-height: 1.45;
  text-align: right;
}

.ata-card-body {
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  letter-spacing: -0.02em;
  text-align: right;
}

@keyframes ataCardFade {
  from {
    opacity: 0.4;
    transform: translateY(0.4rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ata-info-card.is-changing {
  animation: ataCardFade 0.35s ease;
}

.ata-notes {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  margin: 1.25rem 0 1.5rem;
}

.ata-note-row + .ata-note-row {
  margin-top: -1.5rem;
}

.ata-note-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  direction: rtl;
}

.ata-note-icon {
  display: block;
  width: 4.5rem;
  height: auto;
  max-width: 4.5rem;
  flex-shrink: 0;
  object-fit: contain;
}

.ata-note-icon-circles {
  width: 5rem;
  max-width: 5rem;
}

.ata-frameworks-section {
  width: 100%;
  text-align: right;
}

.ata-frameworks-intro {
  width: 100%;
  text-align: right;
}

.ata-frameworks-lead {
  margin-bottom: 0.75rem;
}

.ata-framework-cards {
  display: flex;
  direction: rtl;
  align-items: stretch;
  gap: 1.75rem;
  width: 100%;
}

.ata-framework-card {
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  min-width: 0;
  overflow: visible;
  background: var(--white);
  border: 0.0625rem solid #f0e8ee;
  border-radius: 1.25rem;
  box-shadow:
    0 0.7rem 1.6rem rgba(31, 61, 100, 0.14),
    0 0.15rem 0.5rem rgba(31, 61, 100, 0.07);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ata-framework-blue {
  border-color: #e5f0f3;
}

.ata-framework-card.reveal-on-scroll {
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out,
    box-shadow 0.3s ease;
}

.ata-framework-cards > .reveal-on-scroll:nth-child(1) {
  transition-delay: 0.12s, 0.12s, 0s;
}

.ata-framework-cards > .reveal-on-scroll:nth-child(2) {
  transition-delay: 0.28s, 0.28s, 0s;
}

.ata-framework-card.reveal-on-scroll.is-visible:hover {
  transform: translateY(-0.18rem);
  transition:
    opacity 0.8s ease-out,
    transform 0.3s ease,
    box-shadow 0.3s ease;
  box-shadow:
    0 0.9rem 2rem rgba(31, 61, 100, 0.18),
    0 0.2rem 0.6rem rgba(31, 61, 100, 0.09);
}

.ata-framework-header {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 4.25rem;
  padding: 0.85rem 1.1rem;
  border-radius: 1.15rem 1.15rem 0 0;
}

.ata-framework-pink .ata-framework-header {
  background: var(--ata-pink-head);
}

.ata-framework-blue .ata-framework-header {
  background: var(--ata-blue-head);
}

.ata-framework-title {
  margin: 0;
  color: var(--navy);
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}

.ata-framework-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.15rem 1.15rem 1.25rem;
}

.ata-framework-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  direction: rtl;
}

.ata-framework-icon-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.75rem;
  min-width: 3.75rem;
  height: auto;
  min-height: 3.75rem;
  padding: 0.1rem;
  overflow: visible;
  flex-shrink: 0;
}

.ata-framework-icon {
  display: block;
  width: 3.4rem;
  height: auto;
  max-width: 100%;
  flex-shrink: 0;
  object-fit: contain;
}

.ata-framework-text {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
  text-align: right;
}

.ata-framework-text strong {
  font-weight: 700;
}

@media (max-width: 64rem) {
  .ata-framework-cards {
    flex-direction: column;
    gap: 1.25rem;
  }
}

@media (max-width: 60rem) {
  .ata-note-row + .ata-note-row {
    margin-top: 0.75rem;
  }
}

@media (max-width: 47.9375rem) {
  .ata-prose,
  .ata-note-text,
  .ata-instruction,
  .ata-frameworks-lead {
    font-size: 1rem;
  }

  .ata-track {
    width: 100%;
    height: 2.85rem;
  }

  .ata-plant-side {
    width: 6.5rem;
  }

  .ata-plant-image {
    width: 5.75rem;
  }

  .ata-info-card {
    max-width: 100%;
    margin-inline-start: 0;
    margin-inline-end: 0;
  }

  .ata-note-row {
    gap: 0.65rem;
  }

  .ata-note-icon,
  .ata-note-icon-circles {
    width: 3.75rem;
    max-width: 3.75rem;
  }

  .ata-framework-icon-slot {
    width: 3.25rem;
    min-width: 3.25rem;
    min-height: 3.25rem;
  }

  .ata-framework-icon {
    width: 2.95rem;
  }

  .ata-framework-row {
    align-items: flex-start;
    gap: 0.7rem;
  }

  .ata-framework-title {
    font-size: 1.25rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ata-knob,
  .ata-plant-image,
  .ata-info-card,
  .ata-framework-card,
  .ata-plant-side {
    transition: none;
  }

  .ata-info-card.is-changing {
    animation: none;
  }
}

html,
body {
  background-color: #ffffff;
  background-image: none;
}

.page-bg {
  display: none;
  background-image: none;
}

.u2p2-canvas {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow-x: hidden;
  background-color: #ffffff;
  background-image: none;
}

.u2p2-pipes {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.u2p2-pipe {
  position: absolute;
  z-index: 0;
  display: block;
  height: auto;
  max-width: none;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  flex-shrink: 0;
}

.u2p2-pipe-side {
  top: 0.4rem;
  left: -0.4rem;
  width: 10rem;
}

.u2p2-pipe-lower {
  right: -5.5rem;
  bottom: -0.55rem;
  width: 12rem;
  transform: scaleX(-1);
}

.site-header,
.site-footer {
  position: relative;
  z-index: 10;
  background-color: #ffffff;
  background-image: none;
}

.ata-unit-title,
.ata-audience-section,
.ata-interactive,
.ata-plants-row,
.ata-info-card,
.ata-notes,
.ata-frameworks-section,
.ata-framework-card,
.ata-sequential-nav,
.ata-nav-prev,
.ata-nav-next {
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .u2p2-pipe-side {
    top: 0.25rem;
    left: -0.75rem;
    width: 7rem;
  }

  .u2p2-pipe-lower {
    right: -0.4rem;
    bottom: 0.25rem;
    width: 8rem;
    transform: scaleX(-1);
  }
}
