/* General Styles */
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background-color: #000;
  color: #fff;
}

.portfolio-page {
  padding: 60px 20px;
  background-color: #111;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.page-title {
  font-size: 3rem;
  color: #6cff64;
  text-align: center;
  margin-bottom: 30px;
}

.portfolio-subtitle {
  text-align: center;
  font-size: 1.2rem;
  color: #ccc;
  margin-bottom: 40px;
}

/* Portfolio Cards */
.portfolio-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.portfolio-card {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  margin: 30px; /* 30px margin all around */
  width: calc(33.333% - 60px); /* Adjust width considering margin */
  box-sizing: border-box;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 0 20px rgba(108, 255, 100, 0.3);
}

.portfolio-card video {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 15px;
}

.portfolio-card h3 {
  color: #6cff64;
  font-size: 1rem; /* Small title */
  margin-bottom: 8px;
}

.portfolio-card p {
  font-size: 11px; /* Smaller details */
  color: #ccc;
  margin-bottom: 15px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn {
  display: inline-block;
  padding: 8px 16px;
  background-color: #6cff64;
  color: #000;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #4df34a;
}

/* Overlay Modal */
.portfolio-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 30px; /* 30px outer margin */
  box-sizing: border-box;
}

.portfolio-popup {
  background: #1a1a1a;
  border-radius: 16px;
  padding: 20px;
  width: 100%;
  height: 100%;
  position: relative;
  transform: rotateY(90deg);
  opacity: 0;
  transition: transform 0.6s ease, opacity 0.6s ease;
  border:1px solid #ccc;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.portfolio-popup.show {
  transform: rotateY(0deg);
  opacity: 1;
}

.portfolio-popup video {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 15px;
  object-fit: cover;
  height: 40%;
}

.portfolio-popup h2 {
  color: #6cff64;
  font-size: 1rem; /* Small title */
  margin-bottom: 10px;
  text-align: center;
}

.portfolio-popup p {
  color: #ccc;
  font-size: 11px; /* Small details */
  line-height: 1.4;
  overflow-y: auto;
  padding-right: 10px;
  text-align: justify;
  margin-bottom: 15px;
  scrollbar-width: thin;
  scrollbar-color: #6cff64 #1a1a1a;
}

.portfolio-popup p::-webkit-scrollbar {
  width: 6px;
}
.portfolio-popup p::-webkit-scrollbar-track {
  background: #1a1a1a;
}
.portfolio-popup p::-webkit-scrollbar-thumb {
  background-color: #6cff64;
  border-radius: 10px;
}

.portfolio-popup .btn {
  margin-top: auto;
  padding: 8px 16px;
  background-color: #6cff64;
  color: #000;
  font-weight: bold;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.portfolio-popup .btn:hover {
  background-color: #4df34a;
}

.close-popup {
  position: absolute;
  top: 15px;
  right: 20px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}

/* Responsive Design */
@media (max-width: 992px) {
  .portfolio-card {
    width: calc(50% - 60px);
  }
}

@media (max-width: 600px) {
  .portfolio-card {
    width: calc(100% - 60px);
  }

  .portfolio-popup video {
    height: 150px;
  }
}
