body {
  font-family: Arial, sans-serif;
  background-color: #f5f5f5;
}

.project-container {
  width: 90%;
  margin: 0 auto;
  padding: 1.25rem 0;
  box-sizing: border-box;
}

.project-container header {
  display: block;
  padding: 1.25rem 0;
}

.project-container header h1 {
  margin: 0;
  font-size: 2rem;
  text-align: left;
}

.project-container nav {
  margin-top: 0.625rem;
  text-align: left;
}

.project-container nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 1rem;
  margin: 0;
  overflow-x: auto;
}

.project-container nav ul li {
  cursor: pointer;
  color: #888;
  padding: 0.3125rem 0.625rem;
  white-space: nowrap;
  transition: color 0.3s, border-bottom 0.3s;
}

.project-container nav ul li.active,
.project-container nav ul li:hover {
  color: #000;
  border-bottom: 2px solid #007bff;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.project-card {
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.3s;
  padding: 1rem;
}

.project-card:hover {
  transform: scale(1.05);
}

/* Ensure all project images have consistent sizing */
.project-card img {
  width: 100%;
  height: 12.5rem; /* Fixed height to ensure all images are consistent */
  object-fit: cover; /* Ensures image covers the area while maintaining aspect ratio */
  border-radius: 10px;
}

.project-info {
  padding: 1rem;
}

.project-info p {
  margin: 0;
  color: #888;
}

.project-info h3 {
  margin-top: 0.3125rem;
}

.hidden {
  display: none;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  padding-top: 3.75rem;
  animation: fadeIn 0.5s;
}

.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 2rem;
  border: 1px solid #888;
  width: 80%;
  max-width: 800px;
  max-height: 80vh;
  border-radius: 10px;
  position: relative;
  box-sizing: border-box;
  overflow-y: auto;
  animation: slideIn 0.5s;
}

/* Image inside modal */
.modal-content img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

.modal-content::-webkit-scrollbar {
  width: 8px;
}

.modal-content::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
  background-color: #555;
}

.close {
  color: #aaa;
  float: right;
  font-size: 1.75rem;
  font-weight: bold;
  transition: color 0.3s;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: translateY(-20%);
  }
  to {
    transform: translateY(0);
  }
}

/* Specific colors for different project cards */
.project-card:nth-child(1) {
  background-color: #f9ebd2;
}

.project-card:nth-child(2) {
  background-color: #e5d9f2;
}

.project-card:nth-child(3) {
  background-color: #d2f9e9;
}

.project-card:nth-child(4) {
  background-color: #f2d9d9;
}

.project-card:nth-child(5) {
  background-color: #d9eaf2;
}

.project-card:nth-child(6) {
  background-color: #f2e5d9;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 48rem) {
  .left-container {
    display: none;
  }

  .project-container nav ul {
    gap: 0.3125rem;
  }

  .project-container nav ul li {
    padding: 0.3125rem;
    font-size: 0.875rem;
  }
}
