/* projects.css -- Projects Page Styling - Enhanced modern design */

/* Base container styles */
.container {
  max-width: 1200px;
}

/* Improve visual hierarchy */
h1.text-center {
  font-weight: 700;
  color: #333;
  margin-bottom: 1rem;
}

p.lead {
  color: #555;
  max-width: 800px;
  margin: 0 auto 2.5rem;
}

/* Enhanced search bar styling */
.search-area {
  position: relative;
  margin: 0 auto 2rem;
  max-width: 800px;
}

.search-bar-wrapper {
  margin-bottom: 1.5rem;
}

/* Add a subtle accent underline to search area */
.search-area::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(to right, #6c5ce7, #a29bfe);
  border-radius: 3px;
}

/* Attractive input group styling */
.input-group {
  border-radius: 0.375rem;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid #d8d2e6;
  overflow: hidden;
}

.input-group:focus-within {
  box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.15);
  border-color: #6c5ce7;
}

.input-group-text {
  background-color: #f9f7ff;
  border-color: transparent;
  color: #6c5ce7;
}

#search-input {
  color: #333;
  background-color: #fff;
  font-weight: 400;
  border-color: transparent;
  padding: 0.75rem 1rem;
  height: auto;
}

#search-input::placeholder {
  color: #8a8a8a;
  opacity: 1;
  font-size: 0.95rem;
}

.search-icon {
  color: #6c5ce7;
}

#clear-search {
  background-color: transparent;
  color: #6c5ce7;
  border-color: transparent;
}

#clear-search:hover {
  background-color: rgba(108, 92, 231, 0.1);
  color: #5649c0;
}

/* Filter pills styling */
.filter-group {
  margin-bottom: 1.25rem;
}

.filter-label {
  font-weight: 500;
  color: #343a40;
  display: inline-block;
  margin-right: 0.75rem;
}

.filter-label i {
  color: #6c5ce7;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: #495057;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  user-select: none;
}

.filter-pill:hover {
  background-color: #f0e7ff;
  border-color: #d8d2e6;
  color: #6c5ce7;
  transform: translateY(-1px);
}

.filter-pill.active {
  background-color: #6c5ce7;
  color: white;
  border-color: #6c5ce7;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
  background-color: rgba(255, 255, 255, 0.3);
  border-radius: 0.25rem;
}

.filter-pill:not(.active) .count-badge {
  background-color: #e9ecef;
  color: #6c757d;
}

/* Active filters styling */
.active-filters {
  background-color: #f8f9fa;
  border-radius: 0.375rem;
  padding: 0.75rem 1.25rem;
  border: 1px solid #d8d2e6;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.3s ease-out;
}

.active-filters-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filters-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #495057;
}

.filters-label i {
  color: #6c5ce7;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 1;
}

.filter-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  background-color: #f0e7ff;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  color: #6c5ce7;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
}

.filter-tag:hover {
  background-color: #e2d9f3;
  transform: translateY(-2px);
}

.filter-tag i {
  margin-left: 0.5rem;
  font-size: 0.75rem;
}

/* Featured project styling */
.featured-project {
  position: relative;
  margin-bottom: 3rem;
}

.featured-tag {
  position: absolute;
  top: -0.75rem;
  left: 1.5rem;
  z-index: 1;
  background-color: #6c5ce7;
  color: #fff;
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.25rem;
  font-weight: 500;
  box-shadow: 0 3px 6px rgba(108, 92, 231, 0.2);
  animation: pulse 2s infinite;
}

.featured-card {
  border: 1px solid #dee2e6;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.featured-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(108, 92, 231, 0.15);
}

.featured-image {
  background-color: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
}

.image-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c5ce7;
  font-size: 4rem;
  padding: 2rem;
}

/* Project card styling */
.project-card {
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
  border: 1px solid #e9ecef;
  border-radius: 0.5rem;
  overflow: hidden;
  height: 100%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(108, 92, 231, 0.12);
  border-color: #d8d2e6;
}

/* Badge styling */
.badge {
  font-weight: 500;
  padding: 0.35em 0.65em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.7rem;
}

.badge.bg-primary {
  background-color: #6c5ce7 !important;
}

.badge.bg-secondary {
  background-color: #5b6d9d !important;
}

/* Tech tags styling */
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: auto;
}

.tech-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  background-color: #f0e7ff;
  border-radius: 1rem;
  font-size: 0.75rem;
  color: #6c5ce7;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  border: 1px solid #e2d9f3;
  font-weight: 500;
}

.tech-tag:hover {
  background-color: #6c5ce7;
  color: white;
  transform: translateY(-2px);
}

/* Button styling */
.btn-primary {
  background-color: #6c5ce7;
  border-color: #6c5ce7;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  transition: all 0.2s ease-in-out;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: #5649c0;
  border-color: #5649c0;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(108, 92, 231, 0.2);
}

.btn-outline-primary {
  color: #6c5ce7;
  border-color: #6c5ce7;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: #6c5ce7;
  border-color: #6c5ce7;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(108, 92, 231, 0.15);
}

/* No results styling */
#no-results {
  padding: 3rem 1rem;
  background-color: #f8f9fa;
  border-radius: 0.5rem;
  border: 1px solid #e9ecef;
}

.no-results-icon {
  width: 5rem;
  height: 5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  background-color: #f0e7ff;
  border-radius: 50%;
  font-size: 2rem;
  color: #6c5ce7;
  margin-bottom: 1.5rem;
}

/* Scroll to top button */
.scroll-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1050; /* Higher z-index to ensure it's above other elements */
  background-color: #6c5ce7;
  color: white;
  box-shadow: 0 4px 10px rgba(108, 92, 231, 0.25);
}

.scroll-top-btn:hover {
  background-color: #5649c0;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(108, 92, 231, 0.3);
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

/* Make sure there's only one back-to-top button visible */
.back-to-top {
  display: none !important; /* Hide any secondary back-to-top buttons */
}

/* Skeleton loading animation */
.skeleton-header,
.skeleton-title,
.skeleton-text,
.skeleton-tags,
.skeleton-footer {
  background-color: #e9ecef;
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
  animation: pulse-bg 1.5s infinite;
}

.skeleton-header {
  height: 1.5rem;
  width: 50%;
}

.skeleton-title {
  height: 1.25rem;
  width: 80%;
}

.skeleton-text {
  height: 1rem;
  width: 100%;
}

.skeleton-tags {
  height: 1.5rem;
  margin-top: 1rem;
}

.skeleton-footer {
  height: 2rem;
  margin-bottom: 0;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(108, 92, 231, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(108, 92, 231, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(108, 92, 231, 0);
  }
}

@keyframes pulse-bg {
  0% {
    opacity: 0.6;
    background-color: #e9ecef;
  }
  50% {
    opacity: 1;
    background-color: #f8f9fa;
  }
  100% {
    opacity: 0.6;
    background-color: #e9ecef;
  }
}

/* Card animations */
.project-item {
  animation: fadeInUp 0.4s ease-out forwards;
  animation-delay: calc(var(--index, 0) * 0.1s);
  opacity: 0;
}

/* Dark mode adaptations */
@media (prefers-color-scheme: dark) {
  .filter-pill {
    background-color: #2d2b3a;
    border-color: #444;
    color: #e2e8f0;
  }

  .filter-pill:hover {
    background-color: #373451;
    border-color: #5649c0;
    color: #a29bfe;
  }

  .filter-pill.active {
    background-color: #5649c0;
    color: white;
    border-color: #5649c0;
  }

  .filter-pill:not(.active) .count-badge {
    background-color: #444;
    color: #cbd5e0;
  }

  .active-filters {
    background-color: #2d2b3a;
    border-color: #444;
  }

  .filters-label {
    color: #e2e8f0;
  }

  .filter-tag {
    background-color: #373451;
    color: #a29bfe;
  }

  .filter-tag:hover {
    background-color: #464069;
  }

  .featured-card,
  .project-card {
    background-color: #2d2b3a;
    border-color: #444;
  }

  .card-footer {
    background-color: #272636 !important;
    border-color: #444 !important;
  }

  .tech-tag {
    background-color: #373451;
    color: #a29bfe;
    border-color: #464069;
  }

  .tech-tag:hover {
    background-color: #5649c0;
    color: white;
  }

  .input-group {
    border-color: #444;
  }

  .input-group-text {
    background-color: #2d2b3a;
    color: #a29bfe;
  }

  #search-input {
    background-color: #2d2b3a;
    color: #e2e8f0;
  }

  #no-results {
    background-color: #2d2b3a;
    border-color: #444;
  }

  h1.text-center {
    color: #e2e8f0;
  }

  p.lead {
    color: #cbd5e0;
  }

  .btn-outline-primary {
    color: #a29bfe;
    border-color: #a29bfe;
  }

  .btn-outline-primary:hover {
    background-color: #5649c0;
    border-color: #5649c0;
    color: white;
  }

  .skeleton-header,
  .skeleton-title,
  .skeleton-text,
  .skeleton-tags,
  .skeleton-footer {
    background-color: #373451;
  }

  @keyframes pulse-bg {
    0% {
      opacity: 0.6;
      background-color: #373451;
    }
    50% {
      opacity: 1;
      background-color: #464069;
    }
    100% {
      opacity: 0.6;
      background-color: #373451;
    }
  }
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
  .filter-pills {
    gap: 0.375rem;
  }

  .filter-pill {
    padding: 0.25rem 0.5rem;
    font-size: 0.8125rem;
  }

  .featured-tag {
    left: 1rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.8125rem;
  }

  .tech-tags {
    gap: 0.375rem;
  }

  .tech-tag {
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
  }

  .active-filters-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-tags {
    margin-bottom: 0.5rem;
  }

  .featured-image {
    min-height: 200px;
  }
}

/* Tablet adjustments */
@media (min-width: 768px) and (max-width: 991.98px) {
  .container {
    max-width: 95%;
  }

  .project-card {
    min-height: 340px;
  }
}
