/**
 * Projects Page Styles
 * Custom animations and project card effects
 */

/* Line Clamp Utility */
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Project Card Animations */
.project-card {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }
.project-card:nth-child(6) { animation-delay: 0.6s; }

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

/* Modal Animations */
#projectModal {
  transition: opacity 0.3s ease;
}

#projectModal.show {
  opacity: 1;
}

#projectModal .modal-content {
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

#projectModal.show .modal-content {
  transform: scale(1);
}

/* Hide scrollbar but keep functionality */
.modal-content {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

.modal-content::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

/* Filter Button Transitions */
.filter-btn {
  transition: all 0.3s ease;
}

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

/* Project Card Hover Effects */
.project-card .project-image img {
  transition: transform 0.7s ease;
}

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

/* Responsive Adjustments */
@media (max-width: 768px) {
  .modal-content {
    margin: 20px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .filter-btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }

  #projectModal .btn-primary,
  #projectModal .btn-secondary {
    width: 100%;
  }
}

/* Print Styles */
@media print {
  .filter-btn,
  .sticky,
  #projectModal,
  button {
    display: none !important;
  }

  .project-card {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .shadow-lg,
  .shadow-2xl {
    box-shadow: none !important;
    border: 1px solid #e5e7eb;
  }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .project-card,
  #projectModal,
  .modal-content,
  .filter-btn,
  .project-image img {
    animation: none;
    transition: none;
  }

  .project-card:hover .project-image img {
    transform: none;
  }
}

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

  .bg-gradient-to-r,
  .bg-gradient-to-br {
    background: #fff !important;
    border: 2px solid #000;
  }

  .filter-btn.active {
    background: #000 !important;
    color: #fff !important;
    border-color: #000;
  }
}

/* Accessibility - Focus States */
.filter-btn:focus-visible,
.view-project-btn:focus-visible,
button:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

