/**
 * project-fixes.css
 *
 * This file contains specific CSS fixes for the project visibility issues
 * to ensure projects are displayed correctly in all situations.
 */

/* Ensure project items have proper default visibility */
.project-item {
  display: block;
  visibility: visible;
  opacity: 1;
  height: auto;
  overflow: visible;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Only hide project items when both d-none class AND display:none style are applied */
.project-item.d-none[style*="display: none"] {
  display: none !important;
}

/* Proper styling for filtered project items */
.project-item {
  transform: scale(1);
}

/* Transitions for filtering */
.project-item.filtered-out {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}

/* Enhanced project card hover effects */
.project-card {
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(138, 43, 226, 0.15);
}

/* Light theme card styling */
[data-bs-theme="light"] .project-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

[data-bs-theme="light"] .project-card:hover {
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

/* Ensure projectsGrid has proper styling */
#projectsGrid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -0.75rem; /* Compensate for Bootstrap grid gutters */
  visibility: visible;
  opacity: 1;
}

/* Improve no results message visibility */
#noResults {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-align: center;
  padding: 3rem;
  margin-top: 2rem;
}

#noResults.d-none {
  display: none;
}

#noResults:not(.d-none) {
  display: block;
  opacity: 1;
}

/* Improve active filter badge styling */
#activeFilters .badge {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

#activeFilters .badge:hover {
  opacity: 0.8;
  transform: translateY(-2px);
}

/* Add smooth scrolling to improve navigation */
html {
  scroll-behavior: smooth;
}

/* Improve search box styling */
#projectSearch {
  background-color: rgba(138, 43, 226, 0.05);
  border: 1px solid rgba(138, 43, 226, 0.1);
  transition: all 0.3s ease;
}

#projectSearch:focus {
  background-color: rgba(138, 43, 226, 0.1);
  border-color: rgba(138, 43, 226, 0.3);
  box-shadow: 0 0 0 0.25rem rgba(138, 43, 226, 0.1);
}

/* Enhanced filter button styling */
.filter-buttons .btn {
  padding: 0.5rem 1rem;
  margin: 0.25rem;
  transition: all 0.3s ease;
}

.filter-buttons .btn:hover {
  transform: translateY(-2px);
}

.filter-buttons .btn.active {
  background-color: #8a2be2;
  border-color: #8a2be2;
  color: #fff;
}

[data-bs-theme="light"] .filter-buttons .btn {
  border-color: rgba(138, 43, 226, 0.3);
  color: rgba(138, 43, 226, 0.8);
}

/* Back to Top button styling */
#backToTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #8a2be2;
  color: white;
  border: none;
  opacity: 0;
  visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

#backToTopBtn.visible {
  opacity: 1;
  visibility: visible;
}

#backToTopBtn:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="light"] #backToTopBtn {
  background-color: #8a2be2;
  color: white;
}

/* Ensure technology tags are visible */
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: rgba(138, 43, 226, 0.1);
  color: #8a2be2;
  border-radius: 1rem;
  font-size: 0.8rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.tech-tag:hover {
  background-color: rgba(138, 43, 226, 0.2);
  transform: translateY(-2px);
}
