/* Projects Styles */

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  animation: fadeIn 0.8s ease-out 0.1s both;
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: white;
}

.breadcrumb-separator {
  color: rgba(255, 255, 255, 0.6);
}

/* Projects Search */
.projects-search {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.search-box {
  position: relative;
  width: 100%;
  max-width: 400px;
}

.search-box i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 1rem;
}

.search-box input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 2px solid var(--border-color);
  border-radius: 50px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.search-box input::placeholder {
  color: var(--text-secondary);
}

.clear-btn {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.25rem;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.clear-btn:hover {
  background: var(--border-color);
  color: var(--text-primary);
}

/* Projects Filter */
.projects-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 3rem;
  animation: fadeInUp 0.8s ease-out 0.3s both;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-primary);
  border: 2px solid var(--border-color);
  border-radius: 50px;
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  transition: left 0.6s ease;
}

.filter-btn:hover::before {
  left: 100%;
}

.filter-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border-color: var(--primary-color);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.filter-btn.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Count Badge for Filter Buttons */
.filter-btn .count {
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.filter-btn.active .count {
  background: rgba(255, 255, 255, 0.3);
}

/* Projects Grid */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.projects-quick-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

/* Project Cards */
.project-card {
  background: var(--bg-primary);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
  position: relative;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2);
  border-color: var(--primary-color);
}

.project-image-container {
  position: relative;
  height: 250px;
  overflow: hidden;
  background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
}

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

.project-card:hover .project-image-container img {
  transform: scale(1.1);
}

.project-category {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(102, 126, 234, 0.9);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: capitalize;
  backdrop-filter: blur(10px);
}

.project-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
  font-size: 0.95rem;
}

.project-meta {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.project-meta small {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.project-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  text-decoration: none;
  border-radius: 25px;
  transition: all 0.3s ease;
  font-weight: 500;
  position: relative;
  overflow: hidden;
  min-width: 90px;
  justify-content: center;
}

.project-link:nth-child(1) {
  color: #333;
  border: 1px solid #333;
}

.project-link:nth-child(1):hover {
  background: #333;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.project-link:nth-child(2) {
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.project-link:nth-child(2):hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.project-link:nth-child(3) {
  color: var(--accent-color);
  border: 1px solid var(--accent-color);
}

.project-link:nth-child(3):hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(252, 165, 165, 0.3);
}

/* Demo Status Indicators */
.demo-status {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  backdrop-filter: blur(10px);
  z-index: 2;
}

.demo-status.online {
  background: rgba(76, 175, 80, 0.9);
  color: white;
}

.demo-status.offline {
  background: rgba(244, 67, 54, 0.9);
  color: white;
}

.demo-status.checking {
  background: rgba(102, 126, 234, 0.9);
  color: white;
}

.demo-status i {
  font-size: 0.8rem;
}

.demo-status.checking i {
  animation: spin 1s linear infinite;
}

/* Demo Status Info in Modal */
.demo-status-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
}

.demo-status-info i.fa-check-circle {
  color: #4CAF50;
}

.demo-status-info i.fa-exclamation-triangle {
  color: #FF9800;
}

/* Enhanced Project Links */
.project-link.demo-available {
  color: #4CAF50;
  border-color: #4CAF50;
}

.project-link.demo-available:hover {
  background: #4CAF50;
  color: white;
  box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.project-link.demo-unavailable {
  color: #FF9800;
  border-color: #FF9800;
  position: relative;
}

.project-link.demo-unavailable:hover {
  background: #FF9800;
  color: white;
  box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.project-link.demo-unavailable::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 2px,
    rgba(255, 152, 0, 0.1) 2px,
    rgba(255, 152, 0, 0.1) 4px
  );
  pointer-events: none;
}

/* Page Actions */
.page-actions {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 4rem;
  flex-wrap: wrap;
}

/* Loading State */
.projects-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 300px;
  font-size: 1.1rem;
  color: var(--text-secondary);
}

.projects-loading::before {
  content: '';
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 1rem;
}

/* Empty State */
.projects-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}

.projects-empty i {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: var(--border-color);
}

.projects-empty h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

/* Project Share Button */
.project-share-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.project-share-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.project-share-btn i {
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

[data-theme="dark"] .project-share-btn {
  background: rgba(31, 41, 55, 0.9);
  color: white;
}

[data-theme="dark"] .project-share-btn:hover {
  background: var(--primary-color);
}

/* Enhanced Share Button at Bottom */
.project-share-link {
  position: relative;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white !important;
  border-color: var(--primary-color);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  overflow: hidden;
}

.project-share-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.project-share-link:hover::before {
  left: 100%;
}

.project-share-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.project-share-link i {
  font-size: 0.9rem;
  margin-right: 0.5rem;
}

/* Share Modal */
.share-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease-out;
}

.share-modal-content {
  background: var(--bg-primary);
  border-radius: 20px;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideInUp 0.4s ease-out;
}

.share-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.share-modal-header h3 {
  color: var(--text-primary);
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
}

.share-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 0.5rem;
  border-radius: 50%;
}

.share-modal-close:hover {
  color: var(--primary-color);
  background: rgba(102, 126, 234, 0.1);
}

.share-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.share-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  color: var(--text-secondary);
}

.share-option:hover {
  border-color: var(--primary-color);
  background: rgba(102, 126, 234, 0.05);
  transform: translateY(-2px);
}

.share-option i {
  font-size: 1.8rem;
  margin-bottom: 0.25rem;
}

.share-option span {
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
}

.share-option.facebook i { color: #1877f2; }
.share-option.twitter i { color: #1da1f2; }
.share-option.linkedin i { color: #0077b5; }
.share-option.whatsapp i { color: #25d366; }
.share-option.telegram i { color: #0088cc; }
.share-option.copy i { color: #666; }

.share-text-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.share-text-content h4 {
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
}

.share-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.share-links a {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.share-links a:hover {
  border-bottom-color: var(--primary-color);
}

.share-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.share-btn {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.share-btn-primary {
  background: var(--primary-color);
  color: white;
}

.share-btn-primary:hover {
  background: var(--accent-color);
  transform: translateY(-1px);
}

.share-btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.share-btn-secondary:hover {
  background: var(--border-color);
  transform: translateY(-1px);
}

/* Animation for share button */
.animated-pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .share-modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .share-options {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    
    .share-option {
        padding: 0.75rem;
    }
    
    .share-option i {
        font-size: 1.5rem;
    }
    
    .share-actions {
        flex-direction: column;
    }
}

/* Responsive Projects */
@media (max-width: 768px) {
  .projects-filter {
    gap: 0.5rem;
  }
  
  .filter-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.85rem;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .page-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .page-actions .btn {
    width: 100%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  
  .project-content {
    padding: 1.2rem;
  }
  
  .project-title {
    font-size: 1.2rem;
  }
  
  .project-links {
    gap: 0.3rem;
  }
  
  .project-link {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
  
  .featured-project-card {
    padding: 2rem 1rem;
  }
}

@media (max-width: 768px) {
  .project-links {
    gap: 0.3rem;
    justify-content: center;
  }
  
  .project-link {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    min-width: 80px;
  }
  
  .project-link i {
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .project-links {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .project-link {
    width: 100%;
    justify-content: center;
  }
}
