/* Modern Projects Section - Matching Website Color Scheme */

/* Projects Section Container */
.projects {
  padding: 60px 0;
  background: #040404;
  min-height: 100vh;
  position: relative;
}

/* Section Title */
.projects .section-title h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}

.projects .section-title p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 40px;
}

/* Projects Controls - Modern Glassmorphism with Dark Theme */
.projects-controls {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 30px;
  margin-bottom: 40px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Search Container */
.search-container {
  position: relative;
  margin-bottom: 24px;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.search-wrapper:focus-within {
  border-color: #18d26e;
  box-shadow: 0 0 0 3px rgba(24, 210, 110, 0.2);
  transform: translateY(-1px);
}

.search-icon {
  position: absolute;
  left: 16px;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s;
  font-size: 1.1rem;
  z-index: 1;
}

.search-wrapper:focus-within .search-icon {
  color: #18d26e;
}

#projectSearch {
  flex: 1;
  border: none !important;
  padding: 14px 14px 14px 48px !important;
  font-size: 0.95rem;
  background: transparent;
  box-shadow: none !important;
  outline: none;
  color: #fff;
}

#projectSearch::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

#clearSearch {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  padding: 8px 16px;
  transition: all 0.2s;
  cursor: pointer;
}

#clearSearch:hover {
  color: #ff4444;
  background: rgba(255, 68, 68, 0.1);
}

/* Filter Section */
.filter-section {
  margin-bottom: 24px;
}

.filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.filter-header strong {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

#clearFilters {
  padding: 6px 16px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.7);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  transition: all 0.2s;
  text-decoration: none;
  cursor: pointer;
}

#clearFilters:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #18d26e;
  border-color: #18d26e;
}

/* Category Filters - Modern Pills with Green Theme */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-filter {
  padding: 8px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.category-filter:hover {
  background: transparent;
  border-color: #18d26e;
  color: #18d26e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(24, 210, 110, 0.3);
}

.category-filter.active {
  background: #18d26e;
  color: #040404 !important;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(24, 210, 110, 0.5);
  font-weight: 600;
}

.category-filter.active:hover {
  transform: translateY(-2px) scale(1.02);
  background: #35e888;
}

/* Results Info - Modern Badge */
.results-info {
  display: inline-block;
  padding: 12px 20px;
  background: #18d26e;
  color: #040404;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(24, 210, 110, 0.4);
  border-left: none;
}

/* Project Cards - Modern Design with Dark Theme */
.projects .card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.projects .card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
  border-color: rgba(24, 210, 110, 0.5);
}

.projects .card-img-top {
  height: 220px;
  object-fit: cover;
  background: linear-gradient(135deg, #0a0a0a 0%, #18d26e 100%);
  transition: transform 0.4s;
}

.projects .card:hover .card-img-top {
  transform: scale(1.05);
}

.projects .card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.projects .card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
  line-height: 1.4;
}

.projects .card-text {
  font-size: 0.925rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 12px;
}

.projects .card-text.text-muted {
  color: rgba(255, 255, 255, 0.5) !important;
}

/* Description hover effect */
.projects .card .description-truncated {
  display: inline;
}

.projects .card .description-full {
  display: none;
}

.projects .card:hover .description-truncated {
  display: none;
}

.projects .card:hover .description-full {
  display: inline;
}

/* Category Badges - Green Theme Variations */
.badge-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.projects .badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Green theme variations */
.badge-creative { background: #18d26e; color: #040404; }
.badge-expert { background: #35e888; color: #040404; }
.badge-ai { background: #52f0a5; color: #040404; }
.badge-automation { background: #15b85a; color: #fff; }
.badge-web { background: #13a052; color: #fff; }
.badge-mobile { background: #63eda3; color: #040404; }
.badge-bot { background: #18d26e; color: #040404; }
.badge-iot { background: #2ee07a; color: #040404; }
.badge-security { background: #ff6b6b; color: #fff; }
.badge-uncommon { background: #4df593; color: #040404; }
.badge-novice { background: rgba(24, 210, 110, 0.3); color: #18d26e; border: 1px solid #18d26e; }
.badge-in-progress { background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.7); border: 1px solid rgba(255, 255, 255, 0.2); }
.badge-abandoned { background: #dc3545; color: #fff; }

.projects .badge:not([class*="badge-"]) {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

/* Buttons - Green Theme */
.projects .btn-primary {
  background: #18d26e;
  border: none;
  padding: 10px 24px;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(24, 210, 110, 0.4);
  color: #040404;
}

.projects .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(24, 210, 110, 0.5);
  background: #35e888;
  color: #040404;
}

.projects .btn-outline-secondary {
  border: 2px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.8);
  padding: 10px 16px;
  border-radius: 10px;
  transition: all 0.3s;
  background: rgba(255, 255, 255, 0.05);
}

.projects .btn-outline-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #18d26e;
  color: #18d26e;
  transform: scale(1.05);
}

/* Pagination - Green Theme */
.pagination {
  gap: 8px;
}

.pagination .page-item {
  margin: 0;
}

.pagination .page-link {
  border: 2px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0 2px;
  background: rgba(255, 255, 255, 0.05);
}

.pagination .page-link:hover {
  background: #18d26e;
  color: #040404;
  border-color: transparent;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(24, 210, 110, 0.4);
}

.pagination .page-item.active .page-link {
  background: #18d26e;
  border-color: transparent;
  color: #040404;
  box-shadow: 0 4px 15px rgba(24, 210, 110, 0.5);
}

.pagination .page-item.disabled .page-link {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.3);
  cursor: not-allowed;
}

/* Loading State */
.projects .spinner-border {
  width: 4rem;
  height: 4rem;
  border-width: 4px;
  color: #18d26e;
}

/* Empty State */
.empty-state {
  padding: 80px 20px;
  text-align: center;
}

.empty-state i {
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.2);
  margin-bottom: 20px;
  display: block;
}

.empty-state p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 24px;
}

.empty-state .btn {
  background: #18d26e;
  border: none;
  padding: 12px 32px;
  font-weight: 600;
  border-radius: 10px;
  color: #040404;
  transition: all 0.3s;
}

.empty-state .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(24, 210, 110, 0.5);
  background: #35e888;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.projects .card {
  animation: fadeInUp 0.6s ease-out backwards;
}

.projects .card:nth-child(1) { animation-delay: 0.1s; }
.projects .card:nth-child(2) { animation-delay: 0.2s; }
.projects .card:nth-child(3) { animation-delay: 0.3s; }
.projects .card:nth-child(4) { animation-delay: 0.1s; }
.projects .card:nth-child(5) { animation-delay: 0.2s; }
.projects .card:nth-child(6) { animation-delay: 0.3s; }
.projects .card:nth-child(7) { animation-delay: 0.1s; }
.projects .card:nth-child(8) { animation-delay: 0.2s; }
.projects .card:nth-child(9) { animation-delay: 0.3s; }

.projects-controls {
  animation: slideInRight 0.8s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
  .projects {
    padding: 40px 0;
  }

  .projects .section-title h2 {
    font-size: 2rem;
  }

  .projects-controls {
    padding: 20px;
    border-radius: 12px;
  }

  .category-filters {
    justify-content: center;
  }

  .filter-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }

  #clearFilters {
    width: 100%;
  }

  .projects .card-img-top {
    height: 180px;
  }

  .projects .card-body {
    padding: 20px;
  }

  .pagination .page-link {
    padding: 8px 12px;
    font-size: 0.875rem;
  }

  .results-info {
    font-size: 0.85rem;
    padding: 10px 16px;
  }
}

@media (max-width: 576px) {
  .category-filter {
    font-size: 0.8rem;
    padding: 6px 16px;
  }

  #projectSearch {
    font-size: 0.875rem;
  }

  .projects .card-title {
    font-size: 1.1rem;
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus States for Accessibility */
.category-filter:focus,
.pagination .page-link:focus,
#projectSearch:focus,
#clearSearch:focus {
  outline: 2px solid #18d26e;
  outline-offset: 2px;
}
