/* ===== Project Card Styles ===== */

h3, h3.project-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: #27374D;
  margin: 0 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(157, 178, 191, 0.6);
  display: inline-block;
}

.project {
  background: rgba(157, 178, 191, 0.15);
  border-radius: 12px;
  padding: 28px;
  border: 1px solid rgba(157, 178, 191, 0.25);
  transition: box-shadow 0.3s ease;
}
.project:hover {
  box-shadow: 0 4px 24px rgba(39, 55, 77, 0.08);
}

/* Two-column grid for text + image */
.project-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
  margin-bottom: 16px;
}

/* Image gallery rows */
.project-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.project-gallery.gallery-three {
  grid-template-columns: 1fr 1fr 1fr;
}

/* Project images */
.project-display-img {
  width: 100%;
  border: 1px solid rgba(39, 55, 77, 0.15);
  border-radius: 8px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: default;
}
.project-display-img:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

/* Project text */
.project-text {
  color: #27374D;
}
.project-text p {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.7;
}
.project-text a {
  color: #27374D;
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: #9DB2BF;
  text-underline-offset: 2px;
  transition: text-decoration-color 0.2s ease;
}
.project-text a:hover {
  text-decoration-color: #27374D;
}

/* Solo centered layouts */
.solo-image {
  width: 80%;
  margin: 0 auto 24px;
  display: block;
}

.solo-txt {
  width: 75%;
  margin: 0 auto 24px;
}

/* ----- Specific project layouts ----- */
.carGame2d-images-display {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  position: relative;
  height: 100%;
}
.carGame2d-images-display img:nth-child(1) {
  grid-column: 1; grid-row: 1;
  width: 110%; align-self: start; justify-self: start;
}
.carGame2d-images-display img:nth-child(2) {
  grid-column: 1 / 3; grid-row: 1 / 3;
  width: 60%; align-self: end; justify-self: end;
  margin-top: -50px;
}
.carGame2d-images-display img:nth-child(3) {
  grid-column: 2; grid-row: 1;
  width: 30%; align-self: start; justify-self: end;
  border: none;
}
.carGame2d-images-display img:nth-child(4) {
  grid-column: 2; grid-row: 1;
  width: 40%; align-self: center; justify-self: center;
  margin-top: 50px; border: none;
}

#nestor-logo-and-text { margin-top: 10%; height: 100%; }
.nestor-logo { margin-top: 10%; border: none; width: 50%; }
#project-kodi { grid-template-columns: 1fr 3fr; }

/* ----- Responsive ----- */
@media (max-width: 768px) {
  .project { padding: 18px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-gallery { grid-template-columns: 1fr; }
  .project-gallery.gallery-three { grid-template-columns: 1fr 1fr; }
  .solo-image { width: 100%; }
  .solo-txt { width: 100%; }
  #project-kodi { grid-template-columns: 1fr; }
}