/* ===================================================================
   Unit 3 — Page 1: הקמת חממות אתחלתא
   Global tokens, header, footer, and sequential nav from theme.css.
   =================================================================== */

:root {
  --agr-ice: #ccebec;
  --agr-num-size: 2.5rem;
}

.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-greenhouse-roadmap {
  width: 100%;
  direction: rtl;
  text-align: right;
  color: var(--navy);
}

.agr-opening {
  width: 100%;
  margin: 0 0 1.5rem;
}

.agr-main-heading {
  width: 100%;
  margin: 0 0 0.5rem;
  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;
}

.agr-subheading {
  width: 100%;
  margin: 0 0 0.35rem;
  color: var(--teal);
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
  direction: rtl;
  text-align: right;
}

.agr-intro {
  width: 100%;
  max-width: var(--prose-measure);
  margin: 0;
  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;
}

.agr-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: var(--lh-body);
  direction: rtl;
  text-align: right;
}

.agr-click-icon {
  display: block;
  width: 2.25rem;
  height: auto;
  flex-shrink: 0;
  object-fit: contain;
}

.agr-roadmap {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 1.25rem 0 4rem;
  padding: 1.5rem 3.5rem 3.5rem;
}

.agr-map,
#athalta-roadmap-canvas {
  position: relative;
  width: min(100%, 34rem);
  max-height: 30rem;
  margin: 0 auto;
  overflow: visible;
}

.agr-road {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 30rem;
  z-index: 0;
  pointer-events: none;
  object-fit: contain;
  -webkit-mask-image: linear-gradient(
    to left,
    #000 78%,
    #000 86%,
    transparent 96%
  );
  mask-image: linear-gradient(to left, #000 78%, #000 86%, transparent 96%);
}

.agr-step {
  --cx: 50%;
  --cy: 50%;
  position: absolute;
  z-index: 2;
  top: var(--cy);
  left: var(--cx);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: max-content;
  min-width: 0;
  max-width: 12.25rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--navy);
  text-align: center;
  cursor: pointer;
  appearance: none;
  transform: translate(-50%, calc(var(--agr-num-size) / -2));
  filter: drop-shadow(0 0.2rem 0.2rem rgba(0, 0, 0, 0.18));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.agr-step:hover {
  transform: translate(-50%, calc(var(--agr-num-size) / -2 - 0.12rem));
}

.agr-step:focus-visible {
  border-radius: 1rem;
}

.agr-step-1 {
  --cx: 90%;
  --cy: 0.8%;
}

.agr-step-2 {
  --cx: 54%;
  --cy: 1.2%;
}

.agr-step-3 {
  --cx: 17%;
  --cy: 16%;
}

.agr-step-4 {
  --cx: 60%;
  --cy: 36%;
}

.agr-step-5 {
  --cx: 93.5%;
  --cy: 56%;
}

.agr-step-6 {
  --cx: 80%;
  --cy: 86%;
}

.agr-step-7 {
  --cx: 48%;
  --cy: 96%;
}

.agr-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--agr-num-size);
  min-height: var(--agr-num-size);
  margin: 0 auto 0.25rem;
  padding: 0.25rem;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  background: var(--agr-ice);
  color: var(--navy);
  font-size: var(--text-h3);
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  box-sizing: border-box;
  transition: background 0.3s ease;
}

.agr-label {
  display: block;
  width: max-content;
  max-width: 12.25rem;
  padding: 0.4rem 0.7rem;
  border-radius: 0.65rem;
  background: var(--agr-ice);
  color: var(--navy);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
  text-align: center;
  box-sizing: border-box;
  transition: background 0.3s ease;
}

.agr-step.is-active .agr-num,
.agr-step.is-active .agr-label {
  background: var(--teal);
}

.agr-check {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  margin-left: calc(var(--agr-num-size) / 2 - 0.35rem);
  border-radius: 50%;
  background: var(--teal);
  color: var(--navy);
  box-shadow: 0 0.125rem 0.2rem rgba(0, 0, 0, 0.16);
}

.agr-check[hidden] {
  display: none;
}

.agr-check svg {
  display: block;
  width: 0.85rem;
  height: auto;
}

.agr-house {
  position: absolute;
  z-index: 1;
  left: 6%;
  top: 95%;
  width: 8.75rem;
  max-width: 28%;
  height: auto;
  flex-shrink: 0;
  object-fit: contain;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.agr-modal {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.agr-modal[hidden] {
  display: none;
}

.agr-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(31, 61, 100, 0.35);
  cursor: pointer;
}

.agr-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(56rem, 100%);
  max-height: calc(100vh - 2.5rem);
  overflow: auto;
  padding: 1.75rem 2rem;
  border: 0.3rem solid var(--teal);
  border-radius: 0.625rem;
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow);
  direction: rtl;
  text-align: right;
}

.agr-modal:not([hidden]) .agr-modal-dialog {
  animation: agrDialogIn 0.38s ease;
}

@keyframes agrDialogIn {
  from {
    opacity: 0;
    transform: translateY(0.85rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.agr-modal-close {
  position: absolute;
  top: 0.45rem;
  left: 0.6rem;
  right: auto;
  margin: 0;
  padding: 0.15rem 0.4rem;
  border: 0;
  background: transparent;
  color: #111;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.3s ease;
}

.agr-modal-close:hover {
  color: var(--navy);
}

.agr-modal-close:focus-visible {
  border-radius: 0.25rem;
}

.agr-modal-title {
  display: inline-flex;
  max-width: calc(100% - 2.5rem);
  margin: 0 0 1rem auto;
  padding: 0.35rem 0.75rem;
  border-radius: 0.7rem;
  background: var(--agr-ice);
  color: var(--navy);
  font-size: var(--text-h3);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.02em;
  text-align: right;
}

.agr-modal-body {
  color: var(--navy);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: var(--lh-body);
  letter-spacing: -0.02em;
}

.agr-modal-body p {
  margin: 0 0 0.75rem;
}

.agr-modal-body p:last-child {
  margin-bottom: 0;
}

.agr-modal-sub {
  margin: 0.9rem 0 0.3rem;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.agr-modal-body ul {
  margin: 0.3rem 0 0;
  padding: 0 1.5rem 0 0;
  text-align: right;
}

.agr-modal-body li {
  margin: 0 0 0.35rem;
}

.agr-modal-note {
  margin: 0.75rem 0 0;
}

.agr-modal-note a {
  color: var(--navy);
  text-decoration: underline;
  text-underline-offset: 0.2rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.agr-modal-note a:hover {
  color: var(--teal);
}

body.agr-modal-open {
  overflow: hidden;
}

@media (max-width: 70rem) {
  .agr-modal-dialog {
    padding: 1.5rem 1.25rem;
  }
}

@media (max-width: 52rem) {
  .agr-road {
    display: none;
  }

  .agr-roadmap {
    margin-bottom: 2rem;
    padding: 0.5rem 0 1rem;
  }

  .agr-map,
  #athalta-roadmap-canvas {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-height: none;
    gap: 1.25rem;
  }

  .agr-step,
  .agr-step-1,
  .agr-step-2,
  .agr-step-3,
  .agr-step-4,
  .agr-step-5,
  .agr-step-6,
  .agr-step-7 {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    min-width: 0;
    max-width: 20rem;
    transform: none;
  }

  .agr-step:hover {
    transform: translateY(-0.12rem);
  }

  .agr-house {
    position: relative;
    top: auto;
    left: auto;
    bottom: auto;
    width: 11rem;
    max-width: 70%;
    transform: none;
  }
}

html,
body {
  background-color: #ffffff;
  background-image: none;
}

.page-bg {
  display: none;
  background-image: none;
}

.u3p1-canvas {
  position: relative;
  width: 100%;
  overflow-x: hidden;
  background-color: #ffffff;
  background-image: none;
}

.u3p1-pipes {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.u3p1-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;
}

.u3p1-pipe-side {
  top: 6.15rem;
  left: -0.385rem;
  width: 9.1rem;
}

.u3p1-pipe-corner {
  right: -1.4rem;
  bottom: 7.6rem;
  width: 12.6rem;
}

.site-header,
.site-footer {
  position: relative;
  z-index: 10;
  background-color: #ffffff;
  background-image: none;
}

.ata-unit-title,
.agr-opening,
.agr-roadmap,
.ata-sequential-nav,
.ata-nav-prev,
.ata-nav-next {
  position: relative;
  z-index: 1;
}

@media (max-width: 768px) {
  .u3p1-pipe-side {
    top: 0.25rem;
    left: -1.05rem;
    width: 5.95rem;
  }

  .u3p1-pipe-corner {
    right: -1.4rem;
    bottom: 0.4rem;
    width: 7.7rem;
  }
}
