html, body {
  height: 100%;
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main,
.project-section {
  flex-grow: 1;
}

.project-section {
  min-height: 50vh; /* Adjust to taste */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.project-container {
  max-width: 1400px;
  margin: 0 auto;
  text-align: center;
}

.back-link {
  text-align: left;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.back-link a {
  color: #d7d7d7;
}

.back-link a:hover {
  color: #ffffff;
}

.project-title {
  font-size: 3.5rem;
  font-weight: bold;
  margin-bottom: 10px;
}

.project-description {
  font-size: 1.1rem;
  margin-bottom: 40px;
  color: #cccccc;
}

.project-images {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.project-images img {
  width: 100%;
  max-width: 600px;
  border-radius: 6px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
}

.project-images img:hover {
  transform: scale(1.03);
}

.project-gallery-thumb {
  cursor: zoom-in;
}

dialog#img-dialog {
  border: none;
  border-radius: 8px;
  padding: 0;
  max-width: 95vw;
  max-height: 90vh;
  background: transparent;
}

dialog#img-dialog::backdrop {
  background: rgba(0, 0, 0, 0.85);
}

dialog#img-dialog img {
  display: block;
  max-width: 95vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 8px;
}

a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: #cccccc;
}

@media (max-width: 600px) {
  .project-title {
    font-size: 1.8rem;
  }

  .project-description {
    font-size: 1rem;
    margin-bottom: 30px;
  }

  .project-images {
    gap: 15px;
  }

  dialog#img-dialog {
    max-width: 95vw;
    max-height: 80vh;
  }

  dialog#img-dialog img {
    width: 100%;
    height: auto;
  }
}

.project-details-card {
  background-color: rgba(82, 82, 82, 0.6); /* soft black */
  color: #eee;
  max-width: 1000px;
  margin: 30px auto 0;
  padding: 20px 25px;
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.4);
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
}

@media (max-width: 768px) {
  .project-images img {
    max-width: 100%;
    width: 100%;
    padding: 0 15px; /* adds spacing on the sides */
    box-sizing: border-box;
  }

  .project-details-card {
    margin: 15px auto 0;
    padding: 15px 18px;
    font-size: 14.5px;
    border-radius: 8px;
    width: calc(100% - 30px); /* same 15px padding on each side */
    box-sizing: border-box;
  }
}
