* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #ffffff;
  color: #000;
  padding: 40px 20px;
}

#portfolio {
  max-width: 1400px;
  margin: auto;
  padding-bottom: 100px;
  margin-top:100px ;/* ✅ Add this */
}


h2 {
  text-align: center;
  font-size: 3rem;
  color: #0d83fd;
  font-weight: 900;
  margin-bottom: 60px;
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
}

h2::after {
  content: "";
  width: 60px;
  height: 4px;
  background: #0d83fd;
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

.portfolio-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: center;
  height: 100%;
  
}

.portfolio-item {
  flex: 1 1 calc(25% - 30px);
  max-width: 300px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible; /* allow popup to show but contain layout */
}
.portfolio-item {
  position: relative;
  flex: 1 1 calc(25% - 30px);
  max-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: visible;
  margin-bottom: 80px; /* ✅ Add this line */
}


.portfolio-item:hover {
  z-index: 99; /* bring to front when hovered */
}




.card {
  background: #ffffff;
  border-radius: 20px;
  padding: 25px;
  width: 100%;
  min-height: 280px;       /* 🔧 uniform height */
  max-height: 280px;       /* 🔧 prevents stretching */
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  text-align: center;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center; /* 🔧 vertically center content */
}


.card img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #0d83fd;
  margin-bottom: 15px;
}

.portfolio-text p {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.portfolio-text p strong {
  color: #0d83fd;
  font-size: 1.2rem;
}

.portfolio-desc {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #f0f8ff;
  border-top: 3px solid #0d83fd;
  padding: 15px;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  z-index: 999; /* ensure on top of everything else */
}
.portfolio-desc p {
  font-size: 1rem;
  color: #333;
  text-align: center;
}

@media (max-width: 1200px) {
  .portfolio-item {
    flex: 1 1 calc(33.33% - 30px);
  }
}

@media (max-width: 800px) {
  .portfolio-item {
    flex: 1 1 calc(50% - 30px);
  }
}

@media (max-width: 500px) {
  .portfolio-item {
    flex: 1 1 100%;
  }

  h2 {
    font-size: 2.5rem;
  }

  .card img {
    width: 100px;
    height: 100px;
  }
}
.footer{
    top: 150%;
    
}
}
