/* Projects Page Specific Styles */

/* Navigation active state for projects page */
#navbar {
  background: rgba(33, 37, 41, 0.95);
  backdrop-filter: blur(10px);
}

/* Project Controls */
.view-btn {
  background: white;
  color: #6b7280;
  border: none;
}

.view-btn.active {
  background: #a61e32;
  color: white;
}

.view-btn:hover:not(.active) {
  background: #f3f4f6;
  color: #374151;
}

/* Project Grid Styles */
.project-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.project-card .project-image {
  position: relative;
  overflow: hidden;
  height: 200px;
}

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

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

.project-card .project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.project-card:hover .project-overlay {
  background: rgba(0, 0, 0, 0.4);
}

.project-card .project-overlay .overlay-content {
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.project-card:hover .project-overlay .overlay-content {
  opacity: 1;
  transform: translateY(0);
}

.project-card .project-content {
  padding: 1.5rem;
}

.project-card .project-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: #a61e32;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  z-index: 10;
}

.project-card .project-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.project-card:hover .project-title {
  color: #a61e32;
}

.project-card .project-description {
  color: #6b7280;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.project-card .project-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: #9ca3af;
}

.project-card .project-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.project-card .project-features {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f3f4f6;
}

.project-card .project-features h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.project-card .project-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-card .project-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

/* List View Styles */
.projects-list .project-card {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.projects-list .project-image {
  width: 200px;
  height: 120px;
  flex-shrink: 0;
}

.projects-list .project-content {
  flex: 1;
  padding: 1rem;
}

.projects-list .project-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.projects-list .project-description {
  font-size: 1rem;
  margin-bottom: 0.75rem;
}

.projects-list .project-meta {
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.projects-list .project-features {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
}

/* Modal Styles */
#project-modal {
  animation: fadeIn 0.3s ease-out;
}

#project-modal .bg-white {
  animation: slideInUp 0.3s ease-out;
}

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

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

.modal-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.modal-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.modal-feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #f9fafb;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #374151;
}

/* Search and Filter Styles */
#project-search:focus {
  ring: 2px solid #a61e32;
  border-color: #a61e32;
}

#category-filter:focus,
#location-filter:focus,
#sort-filter:focus {
  ring: 2px solid #a61e32;
  border-color: #a61e32;
}

/* Loading States */
.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.project-card.loading .project-image {
  background: #f3f4f6;
  height: 200px;
}

.project-card.loading .project-content {
  padding: 1.5rem;
}

.project-card.loading .skeleton-line {
  background: #e5e7eb;
  height: 1rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.project-card.loading .skeleton-line.short {
  width: 60%;
}

.project-card.loading .skeleton-line.medium {
  width: 80%;
}

/* Responsive Design */
@media (max-width: 768px) {
  .projects-list .project-card {
    flex-direction: column;
    align-items: stretch;
  }
  
  .projects-list .project-image {
    width: 100%;
    height: 200px;
  }
  
  .project-card .project-content {
    padding: 1rem;
  }
  
  .project-card .project-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .modal-features-grid {
    grid-template-columns: 1fr;
  }
}

/* Filter Animation */
.project-card.filter-out {
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.3s ease;
}

.project-card.filter-in {
  opacity: 1;
  transform: scale(1);
  transition: all 0.3s ease;
}

/* No Results State */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  color: #6b7280;
}

.no-results .no-results-icon {
  width: 4rem;
  height: 4rem;
  color: #d1d5db;
  margin: 0 auto 1rem;
}

.no-results h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

.no-results p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.no-results button {
  background: #a61e32;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.3s ease;
}

.no-results button:hover {
  background: #1e4767;
}

/* Enhanced Button Styles for Projects Page */
.btn-primary {
  background: linear-gradient(135deg, #a61e32, #8b1638);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #1e4767, #153854);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(166, 30, 50, 0.3);
}

.btn-secondary {
  background: transparent;
  color: #a61e32;
  border: 2px solid #a61e32;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #a61e32;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(166, 30, 50, 0.3);
}

/* Enhanced Hover Effects */
.project-card {
  position: relative;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(166, 30, 50, 0.05), rgba(30, 71, 103, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
  pointer-events: none;
}

.project-card:hover::before {
  opacity: 1;
}

/* Custom Scrollbar for Modal */
#project-modal .overflow-y-auto::-webkit-scrollbar {
  width: 6px;
}

#project-modal .overflow-y-auto::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

#project-modal .overflow-y-auto::-webkit-scrollbar-thumb {
  background: #a61e32;
  border-radius: 3px;
}

#project-modal .overflow-y-auto::-webkit-scrollbar-thumb:hover {
  background: #1e4767;
}

/* Results Counter Animation */
#results-count {
  transition: all 0.3s ease;
}

#results-count.updating {
  opacity: 0.5;
  transform: translateY(2px);
}

/* Load More Button States */
#load-more {
  position: relative;
}

#load-more.loading {
  opacity: 0.7;
  pointer-events: none;
}

#load-more.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 1rem;
  height: 1rem;
  margin: -0.5rem 0 0 -0.5rem;
  border: 2px solid transparent;
  border-top: 2px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Improved Focus States */
.project-card:focus {
  outline: 2px solid #a61e32;
  outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #a61e32;
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .project-card {
    border: 2px solid #000;
  }
  
  .project-category {
    border: 1px solid #000;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .project-card,
  .project-card .project-image img,
  .project-card .project-overlay,
  .project-card .project-overlay .overlay-content,
  .btn-primary,
  .btn-secondary {
    transition: none !important;
    animation: none !important;
  }
  
  .project-card:hover {
    transform: none !important;
  }
}