/* Projects Page Specific Styles */
.ongoing-projects {
  padding: 80px 0;
  background-color: var(--bg-color);
}

.ongoing-projects .section-title {
  margin-bottom: 60px;
  text-align: center;
}

.ongoing-projects .section-title h6 {
  color: var(--secondary-text-color);
  font-size: 13px;
  font-weight: 300;
  margin-bottom: 10px;
  letter-spacing: 7px;
  font-family: "Oswald", sans-serif;
}

.ongoing-projects .section-title h2 {
  font-size: 40px;
  font-weight: 400;
  letter-spacing: 10px;
  color: var(--secondary-text-color);
  font-family: "Oswald", sans-serif;
}

/* Custom project card wrapper */
.project-card-wrapper {
  display: flex;
  height: 100%;
  margin-bottom: 30px;
}

.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: all 0.5s;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-10px);
}

/* Fixed aspect ratio container for images */
.project-card .project-img {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding-bottom: 75%; /* Fixed aspect ratio */
  background-color: #000;
}

.project-card .project-img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 1s ease;
}

.project-card:hover .project-img img {
  transform: scale(1.1);
  filter: brightness(70%);
}

/* Image overlay for consistent appearance */
.project-card .project-img::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 70%, rgba(0,0,0,0.5) 100%);
  pointer-events: none;
}

.project-card .project-info {
  position: relative;
  padding: 25px;
  background-color: #ffffff;
  border-bottom: 3px solid var(--secondary-text-color);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-card .project-info h5 {
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--secondary-text-color);
  letter-spacing: 2px;
  font-family: "Oswald", sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  cursor: default;
}

.project-card .project-info h5:hover::after {
  content: attr(title);
  position: absolute;
  left: 0;
  top: -40px;
  background: rgba(0, 0, 0, 0.8);
  color: var(--secondary-text-color);
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 16px;
  white-space: normal;
  z-index: 10;
  width: 100%;
  max-width: 300px;
}

.project-card .project-info p {
  margin-bottom: 15px;
  color: var(--primary-text-color);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: relative;
  cursor: default;
  font-size: 14px;
  line-height: 1.5;
  height: 42px; /* Fixed height for description (2 lines) */
}

.project-card .project-info p:hover::after {
  content: attr(title);
  position: absolute;
  left: 0;
  top: 100%;
  background: rgba(0, 0, 0, 0.8);
  color: var(--secondary-text-color);
  padding: 10px;
  border-radius: 5px;
  font-size: 14px;
  white-space: normal;
  z-index: 10;
  width: 100%;
  max-width: 300px;
}

/* Improved project details layout */
.project-card .project-details {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.project-card .project-details .detail {
  flex: 1;
  padding: 0 5px;
}

.project-card .project-details .detail span {
  display: block;
  font-size: 12px;
  color: var(--secondary-text-color);
  margin-bottom: 5px;
  letter-spacing: 1px;
  font-family: "Oswald", sans-serif;
}

.project-card .project-details .detail p {
  font-size: 14px;
  margin-bottom: 0;
  color: var(--secondary-text-color);
  height: auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-card .status-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: var(--secondary-text-color);
  color: var(--bg-color);
  padding: 0px 8px;
  font-size: 11px;
  letter-spacing: 2px;
  border-radius: 30px;
  font-family: "Oswald", sans-serif;
  z-index: 2;
}

/* Override single-project-view to match other cards */
.single-project-view .project-card {
  width: 100%;
}

.single-project-view .project-img {
  padding-bottom: 75%; /* Same aspect ratio as other cards */
}

/* Responsive adjustments */
@media (min-width: 992px) {
  .project-card-row {
    display: flex;
    flex-wrap: wrap;
  }
  
  .project-card-col {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    padding: 0 15px;
    display: flex;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .project-card-col {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 15px;
    display: flex;
  }
}

@media (max-width: 767px) {
  .project-card-col {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 15px;
    display: flex;
  }
  
  .project-card {
    margin-left: auto;
    margin-right: auto;
  }
}
