/* quantum.css · partea 3/4 */
@media (max-width: 980px) {
  .site-header {
    height: 72px;
  }

  .primary-navigation {
    position: absolute;
    left: auto;
    top: 72px;
    right: 0;
    width: min(390px, calc(100vw - 34px));
    height: auto;
    padding: 12px;
    display: none;
    border-radius: 18px;
    background: rgba(255, 253, 245, 0.99);
    transform: none;
  }

  .primary-navigation.is-open {
    display: grid;
  }

  .primary-navigation a {
    width: 100%;
    min-height: 46px;
    justify-content: start;
    border-bottom: 0;
  }

  .home-hero {
    min-height: auto;
  }

  .hero-cosmos {
    min-height: 430px;
  }

  .trail-map {
    height: auto;
    padding: 75px 24px;
    display: grid;
    gap: 26px;
  }

  .trail-map::before {
    content: "";
    position: absolute;
    left: 61px;
    top: 58px;
    bottom: 58px;
    border-left: 4px dashed #72a267;
  }

  .trail-line {
    display: none;
  }

  .trail-stop,
  .trail-stop-1,
  .trail-stop-2,
  .trail-stop-3,
  .trail-stop-4 {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    width: 100%;
    flex-direction: row;
    text-align: left;
  }

  .trail-label-start { top: 20px; }
  .trail-label-finish { bottom: 19px; }

  .route-progress {
    width: calc(100% - 40px);
  }

  .route-progress > i {
    width: 22px;
  }

  .route-progress > a {
    min-width: auto;
  }
}

@media (max-width: 700px) {
  .header-inner {
    width: calc(100% - 34px);
  }

  .hero-copy h1 {
    font-size: clamp(3.15rem, 15vw, 4.45rem);
  }

  .section-heading h2 {
    font-size: 2.8rem;
  }

  .trail-section {
    width: calc(100% - 32px);
  }

  .trail-map {
    padding: 70px 15px;
  }

  .trail-map::before {
    left: 48px;
  }

  .trail-pin {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
  }

  .trail-stop-copy {
    padding: 15px;
  }

  .trail-stop-copy strong {
    font-size: 1.28rem;
  }

  .trail-stop-copy em {
    display: none;
  }

  .route-progress {
    min-height: 74px;
    padding: 9px;
    justify-content: space-between;
  }

  .route-progress > a {
    padding: 7px;
    display: grid;
    justify-items: center;
    gap: 3px;
    font-size: 0.58rem;
  }

  .route-progress > i {
    width: 12px;
  }

  .jungle-sun {
    width: 90px;
    height: 90px;
  }

  .compass-mark {
    right: 10%;
    width: 150px;
    height: 150px;
  }
}

@media (max-width: 440px) {
  .brand {
    gap: 7px;
    letter-spacing: 0.07em;
  }

  .brand-mark {
    transform: scale(0.82);
  }

  .trail-stop {
    gap: 9px;
  }

  .trail-map::before {
    left: 43px;
  }

  .route-progress > i {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .trail-stop {
    transition: none;
  }
}

/* Două domenii principale pe pagina de pornire */

.trail-map-two {
  height: 570px;
}

.trail-map-two .trail-stop-1 {
  left: 6%;
  top: 72px;
}

.trail-map-two .trail-stop-2 {
  right: 6%;
  top: 310px;
}

.home-tools {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.home-tools a {
  min-height: 92px;
  padding: 19px 21px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 13px;
  align-items: center;
  border: 1px solid rgba(23, 75, 60, 0.15);
  border-radius: 18px;
  background: rgba(255, 253, 245, 0.86);
  box-shadow: 0 10px 26px rgba(33, 77, 59, 0.06);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.home-tools a:hover {
  transform: translateY(-4px);
  border-color: var(--j-lagoon);
  box-shadow: 0 15px 30px rgba(33, 77, 59, 0.1);
}

.home-tools a > span {
  grid-row: 1 / 3;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--j-forest-deep);
  background: var(--j-sun);
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.66rem;
  font-weight: 900;
}

.home-tools strong {
  align-self: end;
  color: var(--j-forest-deep);
  font-family: var(--serif);
  font-size: 1.25rem;
}

.home-tools small {
  align-self: start;
  color: var(--j-muted);
  font-size: 0.7rem;
}

/* Selectoarele de capitole */

.chapter-selector-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.chapter-selector-list button {
  min-height: 78px;
  padding: 13px 16px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 12px;
  align-items: center;
  text-align: left;
  color: var(--j-ink);
  border: 1px solid rgba(23, 75, 60, 0.16);
  border-radius: 17px;
  background: var(--j-paper);
  box-shadow: 0 8px 22px rgba(32, 77, 59, 0.06);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.chapter-selector-list button:hover,
.chapter-selector-list button.active {
  color: var(--j-forest-deep);
  border-color: #7ebc3c;
  background: #ecf8d5;
  transform: translateY(-3px);
}

.chapter-selector-list button i {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--j-forest);
  background: #e5f0ce;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.65rem;
  font-style: normal;
  font-weight: 900;
}

.chapter-selector-list button span {
  font-weight: 780;
  line-height: 1.25;
}

.chapter-selector-list button small {
  color: var(--j-muted);
  font-size: 0.64rem;
  white-space: nowrap;
}

/* Harta verticală cu 10 lecții */

.chapter-map-section {
  position: relative;
  padding: 95px max(40px, calc((100vw - 1360px) / 2));
  color: var(--j-ink);
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 200, 63, 0.19), transparent 20rem),
    radial-gradient(circle at 94% 22%, rgba(101, 200, 239, 0.18), transparent 25rem),
    #eef4df;
}

.chapter-map-heading {
  max-width: 1360px;
  margin: 0 auto 32px;
  display: grid;
  grid-template-columns: 1fr minmax(260px, 340px);
  gap: 60px;
  align-items: end;
}

.chapter-map-heading h2 {
  margin: 0;
  color: var(--j-forest-deep);
  font-family: var(--serif);
  font-size: clamp(2.8rem, 4.5vw, 5.4rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.chapter-map-heading > div:first-child > p:last-child {
  max-width: 620px;
  margin: 20px 0 0;
  color: var(--j-muted);
  line-height: 1.65;
}

.domain-map-progress {
  padding: 20px;
  border: 1px solid rgba(23, 75, 60, 0.16);
  border-radius: 18px;
  background: rgba(255, 253, 245, 0.88);
}

.domain-map-progress > span {
  display: block;
  color: var(--j-muted);
  font-size: 0.7rem;
}

.domain-map-progress > strong {
  display: block;
  margin: 5px 0 13px;
  color: var(--j-forest-deep);
  font-family: var(--serif);
  font-size: 1.8rem;
}

.chapter-map-card {
  max-width: 1080px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(23, 75, 60, 0.15);
  border-radius: 34px;
  background:
    repeating-radial-gradient(ellipse at 50% 45%, transparent 0 46px, rgba(23, 75, 60, 0.047) 47px 48px, transparent 49px 72px),
    #fbf5df;
  box-shadow: 0 24px 58px rgba(33, 77, 59, 0.1);
}

.active-chapter-header {
  padding: 32px 38px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  border-bottom: 1px solid rgba(23, 75, 60, 0.13);
  background: rgba(255, 253, 245, 0.88);
}

.active-chapter-header > div:first-child > span {
  color: #19796a;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.active-chapter-header h3 {
  margin: 7px 0 8px;
  color: var(--j-forest-deep);
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4vw, 4rem);
  font-weight: 400;
  line-height: 1;
}

.active-chapter-header p {
  max-width: 650px;
  margin: 0;
  color: var(--j-muted);
  line-height: 1.55;
}

.chapter-score {
  min-width: 130px;
  text-align: right;
}

.chapter-score strong {
  display: block;
  color: var(--j-coral);
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 400;
}

.chapter-score span {
  color: var(--j-muted);
  font-size: 0.68rem;
}

.chapter-map-legend {
  padding: 18px 38px;
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  border-bottom: 1px solid rgba(23, 75, 60, 0.11);
  background: rgba(255, 253, 245, 0.64);
}

.chapter-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--j-muted);
  font-size: 0.68rem;
}

.chapter-map-legend i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.legend-done { background: var(--j-lime); }

.legend-current { background: var(--j-sun); }

.legend-locked { background: #cbd1c5; }

.chapter-status {
  min-height: 20px;
  margin: 18px 38px 0;
  color: #4f6a60;
  font-size: 0.72rem;
}

.chapter-trail {
  position: relative;
  height: 1280px;
  margin: 0 42px 34px;
}

.chapter-trail-line {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 1220px;
}

.chapter-trail-line path {
  fill: none;
  stroke: #619565;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 8 13;
}

.chapter-lesson-node {
  position: absolute;
  z-index: 2;
  left: var(--node-x);
  top: var(--node-y);
  width: 88px;
  height: 88px;
  color: inherit;
  transform: translateX(-50%);
}

.lesson-bubble {
  position: relative;
  z-index: 2;
  width: 88px;
  height: 88px;
  display: grid;
  place-items: center;
  border: 6px solid white;
  border-radius: 50%;
  color: var(--j-forest-deep);
  background: #d9ded4;
  box-shadow: 0 10px 24px rgba(24, 73, 56, 0.2);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.chapter-lesson-node:hover .lesson-bubble {
  transform: scale(1.07);
  box-shadow: 0 15px 31px rgba(24, 73, 56, 0.25);
}

.lesson-bubble b,
.lesson-bubble i {
  grid-area: 1 / 1;
}

.lesson-bubble b {
  margin-top: -14px;
  font-family: var(--font-geist-mono), monospace;
  font-size: 1rem;
}

.lesson-bubble i {
  margin-top: 28px;
  font-size: 0.73rem;
  font-style: normal;
}

.chapter-lesson-node.done .lesson-bubble {
  background: var(--j-lime);
}

.chapter-lesson-node.current .lesson-bubble {
  background: var(--j-sun);
  animation: trail-pulse 1.9s ease-in-out infinite;
}

.chapter-lesson-node.locked {
  cursor: not-allowed;
}

.chapter-lesson-node.locked .lesson-bubble,
.chapter-lesson-node.locked .lesson-node-card {
  opacity: 0.62;
}

.lesson-node-card {
  position: absolute;
  top: 50%;
  width: 250px;
  padding: 13px 15px;
  display: grid;
  border: 1px solid rgba(23, 75, 60, 0.14);
  border-radius: 15px;
  background: rgba(255, 253, 245, 0.92);
  box-shadow: 0 9px 20px rgba(33, 77, 59, 0.08);
  transform: translateY(-50%);
}

.node-card-right .lesson-node-card {
  left: 105px;
  text-align: left;
}

.node-card-left .lesson-node-card {
  right: 105px;
  text-align: right;
}

.lesson-node-card small {
  color: #19796a;
  font-family: var(--font-geist-mono), monospace;
  font-size: 0.54rem;
  font-weight: 900;
  letter-spacing: 0.11em;
}

.lesson-node-card strong {
  margin-top: 4px;
  color: var(--j-forest-deep);
  font-family: var(--serif);
  font-size: 1.12rem;
  line-height: 1.12;
}

.lesson-node-card em {
  margin-top: 5px;
  color: var(--j-muted);
  font-size: 0.61rem;
  font-style: normal;
}

.chapter-finish-flag {
  position: absolute;
  z-index: 3;
  left: 76%;
  bottom: 10px;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border: 5px solid white;
  border-radius: 50%;
  color: white;
  background: var(--j-coral);
  box-shadow: 0 10px 24px rgba(24, 73, 56, 0.18);
  font-size: 1.3rem;
}

@keyframes trail-pulse {
  0%, 100% { box-shadow: 0 10px 24px rgba(24, 73, 56, 0.2), 0 0 0 0 rgba(255, 200, 63, 0.35); }
  50% { box-shadow: 0 10px 24px rgba(24, 73, 56, 0.2), 0 0 0 12px rgba(255, 200, 63, 0); }
}

/* Pagina-schelet pentru fiecare lecție */

.lesson-page-hero {
  width: min(100% - 80px, 1360px);
  min-height: 470px;
  margin: 0 auto;
  padding: 80px 0 70px;
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 80px;
  align-items: end;
}
