/* ===================================================================
   Unit 1 — Page 4: אתגרי כניסה לתפקיד חינוך הכיתה
   Page layout + carousel. Global tokens, header, footer, and sequential
   nav come from theme.css.
   =================================================================== */

.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;
}

.ac4-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

#athalta-challenges-v4 {
  position: relative;
  width: 100%;
  overflow: hidden;
  color: var(--navy);
}

#athalta-challenges-v4::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: -3.5rem;
  top: 19rem;
  width: 11.75rem;
  height: 50rem;
  border-right: 1.125rem solid #f7f3fb;
  border-bottom: 1.125rem solid #f7f3fb;
  border-radius: 0 0 2.75rem 0;
  pointer-events: none;
}

#athalta-challenges-v4::after {
  content: "";
  position: absolute;
  z-index: 0;
  right: -5rem;
  top: 59rem;
  width: 11.5rem;
  height: 25rem;
  border-left: 1.125rem solid #f0f8fc;
  border-top: 1.125rem solid #f0f8fc;
  border-radius: 2.75rem 0 0 0;
  pointer-events: none;
}

.ac4-inner {
  position: relative;
  z-index: 2;
  width: 100%;
}

.ac4-main-heading {
  width: 100%;
  margin: 0 0 0.25rem;
  color: var(--teal);
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em;
  text-align: right;
}

.ac4-opening-text,
.ac4-carousel-intro {
  max-width: var(--prose-measure);
  text-wrap: pretty;
}

.ac4-opening-text,
.ac4-carousel-intro,
.ac4-card-intro,
.ac4-explanation {
  width: 100%;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.02em;
  text-align: right;
}

.ac4-opening-text + .ac4-opening-text {
  margin-top: 1rem;
}

.ac4-carousel-section {
  position: relative;
  z-index: 3;
  width: 100%;
  margin-top: 1.75rem;
}

.ac4-reveal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  text-align: right;
}

.ac4-carousel-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: max-content;
  max-width: 100%;
}

.ac4-subheading {
  margin: 0 0 0.125rem;
  color: var(--teal);
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.4;
  text-align: right;
}

.ac4-carousel-intro {
  margin: 0 0 0.85rem;
}

.ac4-click-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  width: 100%;
  max-width: var(--prose-measure);
  margin: 0 0 1.25rem;
}

.ac4-click-icon {
  display: block;
  width: 3.5rem;
  height: auto;
  flex-shrink: 0;
  object-fit: contain;
}

.ac4-click-text {
  margin: 0;
  color: var(--teal);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.02em;
  text-align: right;
}

.ac4-carousel {
  display: grid;
  grid-template-columns: auto minmax(0, 33.75rem) auto;
  align-items: center;
  column-gap: 0.35rem;
  row-gap: 0.5rem;
  width: max-content;
  max-width: 100%;
  margin-inline: 0;
  justify-content: start;
  min-height: 0;
}

.ac4-controls {
  display: contents;
}

.ac4-viewport {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  max-width: 33.75rem;
  min-width: 0;
  min-height: 26.5rem;
}

.ac4-arrow-prev {
  grid-column: 1;
  grid-row: 1;
}

.ac4-arrow-next {
  grid-column: 3;
  grid-row: 1;
}

.ac4-slide {
  display: none;
  width: 100%;
  min-height: 0;
}

.ac4-slide.is-active {
  display: block;
  animation: ac4Fade 0.28s ease;
}

@keyframes ac4Fade {
  from {
    opacity: 0;
    transform: translateY(0.4rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ac4-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 28rem;
  overflow: hidden;
  background: var(--white);
  border-radius: 0.625rem;
  box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.06);
}

.ac4-card-header {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.65rem 1.25rem;
}

.ac4-theme-blue .ac4-card-header {
  background: var(--sky);
}

.ac4-theme-peach .ac4-card-header {
  background: #f6938f;
}

.ac4-theme-yellow .ac4-card-header {
  background: var(--yellow);
}

.ac4-theme-pink .ac4-card-header {
  background: #f697bf;
}

.ac4-card-title {
  width: 100%;
  margin: 0;
  color: var(--navy);
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
}

.ac4-card-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  padding: 1.35rem 1.5rem 1.85rem;
}

.ac4-quote-area {
  position: relative;
  width: 100%;
  min-height: 8.5rem;
  margin: 0.5rem auto 0;
  padding: 3rem 1.75rem 2.5rem;
}

.ac4-quote-image {
  position: absolute;
  z-index: 1;
  display: block;
  width: 2.5rem;
  height: auto;
  max-width: 22%;
  flex-shrink: 0;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.ac4-quote-top {
  top: 0;
  right: 0;
}

.ac4-quote-bottom {
  left: 0;
  bottom: 0;
  transform: rotate(180deg);
}

.ac4-quote-text {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--navy);
  background: transparent;
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1.55;
  letter-spacing: -0.02em;
  text-align: right;
}

.ac4-explanation {
  width: 100%;
  max-width: none;
  margin-top: auto;
  padding-top: 0.75rem;
  text-align: right;
}

.ac4-explanation strong {
  font-weight: 700;
}

.ac4-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 20;
  padding: 0.5rem;
  background: transparent;
  cursor: pointer;
}

.ac4-arrow-image {
  display: block;
  width: 2.5rem;
  height: auto;
  flex-shrink: 0;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.ac4-arrow-image-prev {
  transform: scaleX(-1);
}

.ac4-arrow:not(.is-hidden):hover .ac4-arrow-image,
.ac4-arrow:not(.is-hidden):focus-visible .ac4-arrow-image {
  transform: scale(1.08);
}

.ac4-arrow-prev:not(.is-hidden):hover .ac4-arrow-image-prev,
.ac4-arrow-prev:not(.is-hidden):focus-visible .ac4-arrow-image-prev {
  transform: scaleX(-1) scale(1.08);
}

.ac4-arrow:focus-visible {
  border-radius: 0.75rem;
}

.ac4-arrow.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.ac4-indicators {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  grid-column: 1 / -1;
  grid-row: 2;
  gap: 0.625rem;
  width: 100%;
  max-width: 100%;
  margin: 1.15rem 0 0;
}

.ac4-indicator {
  display: block;
  width: 3.125rem;
  height: 0.375rem;
  min-width: 3.125rem;
  flex: 0 0 3.125rem;
  border-radius: 1.25rem;
  background: rgba(195, 127, 128, 0.3);
  cursor: pointer;
}

.ac4-indicator.is-active {
  background: var(--rose);
}

@media (prefers-reduced-motion: reduce) {
  .ac4-slide.is-active {
    animation: none;
  }
}

@media (max-width: 59.375rem) {
  .ac4-carousel {
    grid-template-columns: auto minmax(0, 33.75rem) auto;
    width: max-content;
    max-width: 100%;
  }

  .ac4-viewport {
    max-width: 33.75rem;
  }

  .ac4-arrow-image {
    width: 2.25rem;
  }

  .ac4-card-title {
    font-size: var(--text-h3);
  }

  .ac4-quote-text {
    font-size: 1.125rem;
  }
}

@media (max-width: 43.75rem) {
  #athalta-challenges-v4 {
    overflow: visible;
  }

  #athalta-challenges-v4::before,
  #athalta-challenges-v4::after {
    display: none;
  }

  .ac4-main-heading {
    font-size: 1.375rem;
  }

  .ac4-opening-text,
  .ac4-carousel-intro,
  .ac4-card-intro,
  .ac4-explanation {
    font-size: 1rem;
  }

  .ac4-opening-text + .ac4-opening-text {
    margin-top: 0.75rem;
  }

  .ac4-carousel-section {
    margin-top: 1.5rem;
  }

  .ac4-subheading {
    font-size: 1.25rem;
  }

  .ac4-carousel-intro {
    margin-bottom: 1.5rem;
  }

  .ac4-carousel-block {
    width: 100%;
  }

  .ac4-viewport {
    max-width: 100%;
    min-height: 0;
  }

  .ac4-card {
    min-height: 0;
  }

  .ac4-card-header {
    padding: 0.55rem 0.85rem;
  }

  .ac4-card-title {
    font-size: 1.25rem;
  }

  .ac4-card-body {
    padding: 1rem 1rem 1.25rem;
  }

  .ac4-quote-area {
    min-height: 0;
    padding: 2.25rem 1.75rem 1.75rem;
  }

  .ac4-quote-image {
    width: 2rem;
  }

  .ac4-quote-text {
    font-size: 1.125rem;
  }

  .ac4-explanation {
    max-width: none;
    text-align: right;
  }

  .ac4-indicators {
    margin-top: 1.125rem;
  }
}

@media (max-width: 768px) {
  .ac4-carousel {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0;
  }

  .ac4-viewport {
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    max-width: 100%;
  }

  .ac4-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    width: 100%;
    margin-top: 0.9375rem;
  }

  .ac4-arrow-prev,
  .ac4-arrow-next {
    position: static;
    top: auto;
    right: auto;
    bottom: auto;
    left: auto;
    grid-column: auto;
    grid-row: auto;
    transform: none;
    justify-self: center;
  }

  .ac4-arrow-image {
    width: 1.5rem;
  }

  .ac4-indicators {
    grid-column: auto;
    grid-row: auto;
    width: auto;
    margin: 0;
  }
}

@media (max-width: 30rem) {
  .ac4-card-body {
    padding-inline: 0.875rem;
  }

  .ac4-quote-area {
    padding-inline: 2rem;
  }

  .ac4-indicators {
    gap: 0.45rem;
  }

  .ac4-indicator {
    width: 2.125rem;
    min-width: 2.125rem;
    flex-basis: 2.125rem;
  }
}

html,
body {
  background-color: #ffffff;
  background-image: none;
}

.page-bg {
  display: none;
  background-image: none;
}

#athalta-challenges-v4::before,
#athalta-challenges-v4::after {
  display: none;
}

.u1p4-canvas {
  position: relative;
  z-index: 1;
  width: 100%;
  overflow-x: hidden;
  background-color: #ffffff;
  background-image: none;
}

.u1p4-pipes {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.u1p4-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;
}

.u1p4-pipe-side {
  top: 0.5rem;
  left: -3.6rem;
  width: 16rem;
}

.u1p4-pipe-corner {
  right: 0;
  bottom: 1rem;
  width: 6.5rem;
}

.site-header,
.site-footer {
  position: relative;
  z-index: 10;
  background-color: #ffffff;
  background-image: none;
}

.ata-unit-title,
.ata-sequential-nav,
.ata-nav-prev,
.ata-nav-next {
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .u1p4-pipe-side {
    top: 0.35rem;
    left: -6rem;
    width: 10rem;
  }

  .u1p4-pipe-corner {
    right: -1rem;
    bottom: 0.35rem;
    width: 6rem;
  }
}
