/* ================= LAYOUT ================= */
.app-container {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 60px;
}

/* ================= LEFT PANEL ================= */
.mission-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* BUTTON */
.mission {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.7);
  padding: 12px;
  text-align: left;
  cursor: pointer;
  transition: 0.3s ease;
  position: relative;
}

/* ACTIVE STATE */
.mission.active {
  color: #fff;
  border-color: #fff;
}

/* LEFT LINE INDICATOR */
.mission::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 0%;
  width: 3px;
  background: linear-gradient(#006df0, #9600ff);
  transition: height 0.3s ease;
}

.mission.active::before {
  height: 100%;
}

/* ================= RIGHT SIDE ================= */
.mission-display {
  position: relative;
  min-height: 400px; /* prevents layout collapse */
}

/* ================= CONTENT (ANIMATION SYSTEM) ================= */
.mission-content {
  position: absolute;
  inset: 0;

  opacity: 0;
  transform: translateX(40px);

  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;

  will-change: transform, opacity; /* performance boost */
}

/* ACTIVE */
.mission-content.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  z-index: 2;
}

/* EXIT */
.mission-content.exit {
  opacity: 0;
  transform: translateX(-40px);
  z-index: 1;
}

/* ================= IMAGE ================= */
.mission-content img {
  width: 100%;
  margin-top: 20px;
  border: 1px solid rgba(255,255,255,0.2);
  transition: transform 0.5s ease;
}

.mission-content img {
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 600px;
  object-fit: cover;
}

/* subtle zoom on active */
.mission-content.active img {
  transform: scale(1.03);
}

/* ================= TEXT ================= */
.mission-content h2 {
  font-size: 28px;
}

.mission-content p {
  color: rgba(255,255,255,0.75);
  margin-top: 10px;
  line-height: 1.6;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 900px) {
  .app-container {
    grid-template-columns: 1fr;
  }

  .mission-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .mission {
    flex: 1 1 auto;
  }

  .mission-display {
    min-height: 500px;
  }
}