/* === Project Section === */
#projects {
  min-height: 80vh;
  height: auto;
  display: block;
}

/* Container holding all projects in a horizontal row */
.container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: auto;
}
/* Individual project styling */

.project-item {
  position: relative;
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: background 0.5s, color 0.5s, transform 0.5s;
  border-left: 1px solid #222;
}

.project-item .img-box { 
  max-width: 100%;
  position: relative;
  margin-bottom: 1.5px;
  align-items: flex-start;
}
.project-item .img-box img {
  margin-bottom: 2px;
  position: relative;
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.main { 
  opacity:1;
  z-index:1;
}
.wire {
  opacity:0;
  z-index:2;
  display: none;
}
.project-item:hover .main,
.project-item.active .main { 
  opacity:0;
  display: none;
  transform: scale(1.05) rotateY(10deg);
}
.project-item:hover .wire,
.project-item.active .wire{
  opacity:1;
  transform: scale(1.05) rotateY(0deg);
  display: block;
}
.project-item .number {
  position: absolute;
  top: 1rem;
  font-size: 1rem;
  color: #ff6000;
}

.project-item h2, .project-item h3 {
  margin-bottom: 0.5rem;
}

.project-item p {
  font-size: 0.9rem;
  color: #6d6a6a;
  max-width: auto;
  justify-items: center;
  min-height: 150px;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.5s ease-out, opacity 0.5s;
}
.project-item .view-btn {
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  background-color: #ff6000;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s, transform 0.2s;
  opacity: 0;
}
.view-btn:hover{
  background: transparent;
  color: #ff6600;
  border: 2px solid #ff6600;
  transform: scale(1.05);
}
.project-item:hover .view-btn,
.project-item.active .view-btn {
  opacity: 1;
}
.project-item:hover,
.project-item.active {
  background: #fff;
  color: #000;
  z-index: 2;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}


.project-item:hover p,
.project-item.active p {
  display: block;
  opacity: 1;
}
.project-item .number:hover,
.project-item.active .number {
  transform: scale(1.2);
}

/* Responsive Grid */
/* Mobile Phones (up to 600px) */
@media (max-width: 600px) {
  .container {
    grid-template-columns: repeat(1, auto);
  }
  .project-item .number {
    display: none;
  }
}

/* Tablets (601px to 900px) */
@media (min-width: 601px) and (max-width: 900px) {
  .container {
    grid-template-columns: repeat(2, 1fr); /* 2 columns */
  }
}

/* Laptops (901px to 1200px) */
@media (min-width: 901px) and (max-width: 1200px) {
  .container {
    grid-template-columns: repeat(3, 1fr); /* 3 columns */
    min-height: 80vh;
  }
}

/* Desktops (above 1200px) */
@media (min-width: 1201px) {
  .container {
    grid-template-columns: repeat(4, 1fr); /* 4 columns */
    min-height: 80vh;
  }
}

