/* Float CanSat image right in project details */
.cansat-float-img {
  float: right;
  margin: 0 0 1em 2em;
  max-width: 280px;
  width: 40%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.pages {
  position: relative;
  min-height: 100vh;
}

.page {
  display: none;

  /* layout corect */
  position: relative;
  width: calc(100% - 320px);
  min-height: 100vh;
  margin: 0 160px;
  padding: 120px 0 40px;

  /* siguranță */
  overflow: visible;
}

.page.active {
  display: block;
}

/* Team profiles layout */
.team-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 16px;
}
.team-container {
  display: grid;
  grid-template-columns: 1fr; /* stack groups vertically */
  gap: 24px;
  margin-top: 16px;
}

.team-group {
  background: rgba(0,0,0,0.35);
  padding: 20px;
  border-radius: 10px;
}
.team-group {
  background: rgba(0,0,0,0.35);
  padding: 36px;
  border-radius: 12px;
}

.team-group h2 {
  margin: 0 0 12px 0;
  font-size: 20px;
  letter-spacing: 1px;
  color: #fff;
}

.team-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.team-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.team-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(255,255,255,0.03);
  padding: 10px;
  border-radius: 8px;
}
.team-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  background: rgba(255,255,255,0.03);
  padding: 20px;
  border-radius: 10px;
}

.team-card img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
  flex: 0 0 56px;
}
.team-card img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  flex: 0 0 180px;
}

.team-card .profile h3 {
  margin: 0;
  font-size: 14px;
  color: #fff;
}

.team-card .profile .role {
  margin: 2px 0 6px 0;
  font-size: 12px;
  color: #ccc;
  letter-spacing: 0.8px;
}

.team-card .profile .bio {
  margin: 0;
  font-size: 12px;
  color: #ddd;
  line-height: 1.3;
}

@media (max-width: 900px) {
  .team-container { grid-template-columns: 1fr; }
  .team-list { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.team-card .profile h3 {
  margin: 0;
  font-size: 17px;
  color: #fff;
}
.team-card .profile .role {
  margin: 5px 0 10px 0;
  font-size: 14px;
  color: #ccc;
  letter-spacing: 0.8px;
}
.team-card .profile .bio {
  margin: 0;
  font-size: 14px;
  color: #ddd;
  line-height: 1.5;
}
}
.team-card img { width: 64px; height: 64px; flex: 0 0 64px; }
.team-card { padding: 12px; gap: 12px; }
}

/* Incoming starts off-screen right, rotated slightly */
.page.incoming {
  visibility: visible;
  pointer-events: none;
  opacity: 0;
  transform: translateX(110%) rotateY(-18deg);
  transform-origin: right center;
}

/* Outgoing moves left and rotates away */
.page.outgoing {
  pointer-events: none;
  opacity: 0;
  transform: translateX(-30%) rotateY(14deg);
  transform-origin: left center;
}

/* Project cards use the same background as contact page text boxes */
.project-card {
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  padding: 40px 48px 40px 52px;
  box-shadow: 0 16px 32px rgba(0,0,0,0.45);
  margin: 1.8em 1.2em;
  max-width: 100%;
  color: #fff;
}
.project-card:hover {
  box-shadow: 0 24px 48px rgba(0,0,0,0.55);
  transform: translateY(-4px) scale(1.01);
}
