/* Project Section with Unique Class Names */
.proj-section {
  padding: 80px 0;
  background: var(--bg-black-900);
}

.proj-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
  /* Add padding to account for sidebar */
  padding-left: 270px; /* Adjust this value based on your sidebar width */
}

.proj-section-header {
  text-align: center;
  margin-bottom: 50px;
}

.proj-section-title {
  font-size: 2.5rem;
  color: var(--text-black-900);
  position: relative;
  display: inline-block;
}

.proj-section-title::after {
  content: "";
  position: absolute;
  width: 60px;
  height: 3px;
  background: var(--skin-color);
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.proj-section-divider {
  height: 4px;
  width: 80px;
  background-color: var(--skin-color);
  margin: 15px auto 0;
}

.proj-section-subtitle {
  color: var(--text-black-700);
  font-size: 2rem;
  margin-top: 15px;
}

.proj-grid {
  display: grid;
  /* Changed to specifically have 2 columns instead of auto-fill */
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.proj-card {
  background: var(--bg-black-100);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
  border: 1px solid var(--bg-black-50);
  min-width: 280px; /* Ensure cards have a minimum width */
  display: flex;
  flex-direction: column; /* Make card a flex container with column direction */
  height: 100%; /* Ensure all cards have the same height */
}

.proj-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

/* Project Image Styles */
.proj-image-container {
  width: 100%;
  height: 200px;
  overflow: hidden;
  position: relative;
}

.proj-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.proj-card:hover .proj-image-container img {
  transform: scale(1.05);
}

.proj-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: rgba(79, 70, 229, 0.1);
  border-bottom: 1px solid var(--bg-black-50);
}

.proj-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--skin-color);
  color: white;
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.proj-card:hover .proj-icon {
  transform: rotate(360deg);
}

.proj-links {
  display: flex;
  gap: 15px;
}

.proj-github-link,
.proj-live-demo {
  color: var(--text-black-700);
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.proj-github-link:hover {
  color: var(--skin-color);
  transform: scale(1.1);
}

.proj-live-demo:hover {
  color: var(--skin-color);
  transform: scale(1.1);
}

.proj-card-body {
  padding: 25px;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Allow body to grow and fill space */
}

.proj-title {
  font-size: 1.3rem;
  color: var(--text-black-900);
  margin-bottom: 15px;
  font-weight: 600;
}

.proj-desc {
  color: var(--text-black-700);
  line-height: 1.6;
  margin-bottom: 20px;
  font-size: 0.95rem;
  flex-grow: 1; /* Allow description to take up available space */
}

.proj-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
  max-height: 70px;
  padding: 10px 0;
  margin-top: auto; /* Push to bottom of flex container */
  border-top: 1px solid var(--bg-black-50); /* Optional: adds a subtle separator */
}

.proj-tech-tag {
  background: var(--bg-black-50);
  color: var(--skin-color);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.proj-tech-tag:hover {
  background: var(--skin-color);
  color: white;
  transform: translateY(-2px);
}

/* Animations */
.proj-card {
  opacity: 0;
  transform: translateY(30px);
  animation: proj-fadeInUp 0.7s forwards;
}

@keyframes proj-fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.proj-card:nth-child(1) {
  animation-delay: 0.1s;
}
.proj-card:nth-child(2) {
  animation-delay: 0.25s;
}
.proj-card:nth-child(3) {
  animation-delay: 0.4s;
}
.proj-card:nth-child(4) {
  animation-delay: 0.55s;
}

/* Image hover effect */
.proj-image-container::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.proj-card:hover .proj-image-container::after {
  opacity: 1;
}

/* Responsive */
/* Large screens with sidebar (adjust breakpoints as needed) */
@media (max-width: 1200px) {
  .proj-container {
    padding-left: 260px; /* Adjust based on sidebar width */
  }
}

/* Medium screens */
@media (max-width: 991px) {
  .proj-container {
    padding-left: 240px; /* Slightly reduced sidebar padding */
  }

  .proj-grid {
    gap: 20px; /* Reduce gap slightly */
  }
}

/* Small screens - tablets */
@media (max-width: 768px) {
  .proj-container {
    padding-left: 15px; /* Reset padding for mobile where sidebar may be hidden/collapsed */
  }

  .proj-grid {
    grid-template-columns: 1fr; /* One column for mobile */
    max-width: 500px;
    margin: 0 auto;
  }

  .proj-section-title {
    font-size: 2rem;
  }

  .proj-image-container {
    height: 220px;
  }
}

/* For extra small devices */
@media (max-width: 480px) {
  .proj-image-container {
    height: 180px;
  }

  .proj-card-body {
    padding: 20px 15px;
  }
}

/* Specific media query for devices where sidebar is collapsed but screen is still wide enough for 2 columns */
@media (min-width: 769px) and (max-width: 991px) {
  .sidebar-collapsed .proj-container {
    padding-left: 80px; /* Adjust based on your collapsed sidebar width */
  }
}
