/* Tag Filters */
.tag-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 15px 0;
  justify-content: center;
}

.tag-filter {
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  border-radius: 30px;
  font-weight: 500;
  background-color: var(--white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.05);
  font-size: 14px;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.tag-filter::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--first-color), var(--first-color-alt));
  transition: width 0.3s ease;
  z-index: -1;
}

.tag-filter:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tag-filter:hover::before {
  width: 100%;
  animation: slideIn 0.5s ease forwards;
}

@keyframes slideIn {
  0% {
    width: 0%;
    opacity: 0.7;
  }
  100% {
    width: 100%;
    opacity: 1;
  }
}

.tag-filter.active {
  background-color: var(--dark-bg);
  color: var(--white);
  border-color: transparent;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.tag-filter.active::before {
  width: 100%;
}

.tag-filter:nth-child(1) {
  padding: 10px 30px;
}

/* Project Cards Grid Layout */
.project-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 25px;
  padding: 20px 0;
}

/* Card Styling */
.p-card {
  position: relative;
  background-color: var(--container-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.p-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.p-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--first-color), var(--first-color-alt));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.p-card:hover::before {
  transform: scaleX(1);
}

/* Card Image */
.p-card-img {
  position: relative;
  overflow: hidden;
  height: 180px;
}

.p-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.p-card:hover .p-card-img img {
  transform: scale(1.05);
}

/* Card Content */
.p-card-content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.p-heading {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--title-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.p-description {
  font-size: 0.9rem;
  color: var(--text-color);
  margin-bottom: 15px;
  line-height: 1.5;
}

/* Technology Stack */
.p-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 5px;
}

.p-tech {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 4px;
  background-color: var(--first-color-lighter);
  color: var(--first-color-dark);
  white-space: nowrap;
}

/* Tags */
.p-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 15px;
}

.p-tag {
  font-size: 0.7rem;
  padding: 3px 6px;
  border-radius: 4px;
  background-color: var(--container-color-alt);
  color: var(--text-color-light);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.p-tag:hover {
  background-color: var(--first-color-lighter);
  color: var(--first-color-dark);
}

/* Card Actions */
.p-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.p-card-link {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.p-card-link img {
  width: 16px;
  height: 16px;
}

.p-card-icons {
  display: flex;
  gap: 10px;
}

.p-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--dark-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.p-icon:hover img {
  transform: scale(1.2);
}
.p-icon img {
  filter: invert(1) brightness(10);
  width: 26px;
  height: 26px;
  transition: all 0.3s ease;
}

/* No Projects Message */
.no-projects {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  background-color: var(--container-color);
  border-radius: 12px;
  color: var(--text-color);
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
  .project-container {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }
}

@media screen and (max-width: 480px) {
  .project-container {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .p-card-content {
    min-height: 240px;
  }

  .p-card-img {
    height: 160px;
  }

  .p-card-actions {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }

  .p-card-icons {
    width: 100%;
    justify-content: flex-end;
  }

  .tag-filters {
    gap: 8px;
  }

  .tag-filter {
    font-size: 0.7rem;
    padding: 4px 10px;
  }
}
