/* ===================================================================
   Unit 4 — Page 1: עקרונות לכתיבת סילבוס
   Global tokens, header, footer, and sequential nav 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;
}

#athalta-syllabus-page {
  width: 100%;
  direction: rtl;
  text-align: right;
  color: var(--navy);
}

.as-opening {
  width: 100%;
  margin: 0 0 2rem;
}

.as-main-heading {
  width: 100%;
  margin: 0 0 0.75rem;
  padding: 0;
  color: var(--teal);
  font-size: var(--text-h2);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  direction: rtl;
  text-align: right;
}

.as-intro {
  width: 100%;
  max-width: var(--prose-measure);
  margin: 0 0 0.75rem;
  color: var(--navy);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: var(--lh-body);
  letter-spacing: -0.02em;
  direction: rtl;
  text-align: right;
  text-wrap: pretty;
}

.as-intro strong {
  font-weight: 700;
}

.as-intro-lead {
  margin-top: 1rem;
  margin-bottom: 0;
}

.as-video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 30rem));
  align-items: stretch;
  gap: 1.75rem;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  margin-inline-end: auto;
}

.as-video-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0.75rem;
  min-width: 0;
  margin: 0;
  padding: 0.85rem 0.85rem 0.9rem;
  border: 0.25rem solid #49bbbd;
  border-radius: 1rem;
  background: #ffffff;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

.as-video-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  margin: 0;
  font-size: inherit;
  font-weight: 700;
  text-align: center;
  direction: rtl;
}

.as-video-kicker {
  display: block;
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em;
  background: none;
}

.as-video-name {
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin: 0;
  padding: 0.28rem 0.65rem;
  border-radius: 0.55rem;
  background: #ccebec;
  color: var(--navy);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em;
  text-align: center;
  box-sizing: border-box;
}

.as-video-frame {
  position: relative;
  z-index: 2;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: visible;
  border-radius: 0.5rem;
  pointer-events: auto;
  touch-action: manipulation;
}

.as-video-frame iframe {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 10rem;
  border: 0;
  border-radius: 0.5rem;
  pointer-events: auto;
  touch-action: manipulation;
}

.as-video-play {
  display: none;
}

@media (max-width: 768px) {
  body:has(#athalta-syllabus-page) main {
    overflow: visible;
  }

  .as-video-grid {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .as-video-card,
  .as-video-frame,
  .as-video-frame iframe,
  .as-video-play {
    position: relative;
    z-index: 3;
    pointer-events: auto;
    touch-action: manipulation;
  }

  .as-video-frame {
    overflow: visible;
  }

  .as-video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .as-video-play {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    cursor: pointer;
  }

  .as-video-frame.is-playing .as-video-play {
    display: none;
    pointer-events: none;
  }

  .as-video-play:focus-visible {
    outline: 2px solid var(--teal);
    outline-offset: 2px;
  }
}

html,
body {
  background-color: #ffffff;
  background-image: none;
}

.page-bg {
  display: none;
  background-image: none;
}

.u4p1-canvas {
  position: relative;
  width: 100%;
  overflow-x: hidden;
  background-color: #ffffff;
  background-image: none;
}

.u4p1-pipes {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.u4p1-pipe {
  position: absolute;
  z-index: 0;
  display: block;
  height: auto;
  max-width: 18.75rem;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  flex-shrink: 0;
}

.u4p1-pipe-a {
  top: 0.5rem;
  bottom: auto;
  left: -0.5rem;
  right: auto;
  width: 12rem;
  transform: none;
}

.u4p1-pipe-b {
  bottom: 6.5rem;
  top: auto;
  right: -0.5rem;
  left: auto;
  width: 12rem;
  transform: none;
}

.site-header,
.site-footer {
  position: relative;
  z-index: 10;
  background-color: #ffffff;
  background-image: none;
}

@media (max-width: 768px) {
  .u4p1-pipe-a {
  top: 0.34rem;
  bottom: auto;
  left: -0.34rem;
  right: auto;
  width: 8.16rem;
  transform: none;
}

  .u4p1-pipe-b {
  bottom: 4.42rem;
  top: auto;
  right: -0.34rem;
  left: auto;
  width: 8.16rem;
  transform: none;
}
}
