/* ===========================================
   Projects Page CSS
   Page-specific styles for projects.html
   =========================================== */

/* ===========================================
   Container Reset (Override Theme Styles)
   =========================================== */
.projects-container,
.projects-container * {
  box-sizing: border-box;
}

.projects-container a {
  border-bottom: none;
}

.projects-container h3 {
  margin: 0;
}

.projects-container p {
  margin: 0;
}

.projects-container {
  max-width: 1200px;
  margin: -2.5rem auto 0 auto;
  padding: 2rem 0;
}

/* ===========================================
   Featured Section
   =========================================== */
.featured-section {
  margin-bottom: 3rem;
}

.featured-section h2,
.projects-section h2 {
  font-size: 2rem;
  color: #333;
  margin: 0 0 1.5rem 0;
  font-weight: 600;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.featured-badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.featured-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

.featured-context {
  font-size: 0.9rem;
  opacity: 0.85;
  margin-bottom: 0.75rem;
}

.featured-links {
  display: flex;
  gap: 0.5rem;
}

.featured-link-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: white !important;
  transition: transform 0.2s;
  text-decoration: none !important;
  padding: 0 !important;
  border: none !important;
}

.featured-link-btn:hover {
  transform: scale(1.15);
  color: white !important;
  text-decoration: none !important;
}

.featured-link-btn i {
  font-size: 0.9rem;
  line-height: 1;
}

/* ===========================================
   Filter Section (Projects Overrides)
   =========================================== */
.filter-section {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 1rem;
  background: #f8f9fa !important;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
}

.filter-section .filter-btn {
  padding: 0.6rem 1.2rem !important;
  border: none !important;
  background: #d1d5d9 !important;
  color: #333 !important;
  border-radius: 25px !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  transition: var(--transition);
  font-size: 0.9rem !important;
  font-weight: 500;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-family: inherit;
  line-height: 1.5;
}

.filter-section .filter-btn:hover {
  background: #b8bdc2 !important;
  color: #333 !important;
}

.filter-section .filter-btn:active {
  background: #a8adb2 !important;
}

.filter-section .filter-btn.active {
  background: var(--primary-color) !important;
  color: white !important;
}

.filter-section .filter-btn.active:hover {
  background: var(--primary-hover) !important;
}

/* ===========================================
   Projects Grid
   =========================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Override any theme card styling */
.projects-grid .project-card,
.projects-grid .project-card * {
  box-sizing: border-box;
}

/* ===========================================
   Project Card
   =========================================== */
.project-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--card-shadow-hover);
}

.card-image {
  position: relative;
  height: 260px;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-card:hover .card-image img {
  transform: scale(1.05);
}

/* ===========================================
   Card Badges
   =========================================== */
.card-badges {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  right: 0.75rem;
}

/* ===========================================
   Project Category Badge Colors
   =========================================== */
.badge-hackathon {
  background: rgba(0, 123, 255, 0.9);
  color: white;
}

.badge-class {
  background: rgba(40, 167, 69, 0.9);
  color: white;
}

.badge-personal {
  background: rgba(102, 16, 242, 0.9);
  color: white;
}

.badge-professional {
  background: rgba(23, 162, 184, 0.9);
  color: white;
}

/* Award badge */
.award-badge {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #333;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.award-badge i {
  font-size: 0.7rem;
}

/* ===========================================
   Card Content
   =========================================== */
.card-content {
  padding: 1.25rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #333;
  margin: 0 0 0.5rem 0;
  line-height: 1.4;
}

.project-context {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.5rem;
  font-style: italic;
}

.award-text {
  color: #DAA520;
  font-weight: 600;
  font-style: normal;
}

.card-description {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.5;
  margin: 0 0 1rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===========================================
   Project Link Buttons
   =========================================== */
.project-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.project-link-btn {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  border-radius: 50% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: white !important;
  transition: transform 0.2s, opacity 0.2s;
  text-decoration: none !important;
  padding: 0 !important;
  border: none !important;
}

.project-link-btn:hover {
  transform: scale(1.1);
  opacity: 0.9;
  color: white !important;
  text-decoration: none !important;
}

.project-link-btn i {
  font-size: 1rem;
  line-height: 1;
}

/* ===========================================
   No Projects Message
   =========================================== */
.no-projects {
  text-align: center;
  padding: 2rem;
  color: #666;
  font-size: 1rem;
}

/* ===========================================
   Projects Modal Extensions
   =========================================== */
.modal-body img {
  width: 100%;
  max-height: 250px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.modal-context {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
  font-style: italic;
}

.modal-context .award-text {
  color: #DAA520;
  font-weight: 600;
  font-style: normal;
}

.modal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.modal-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  color: white !important;
  text-decoration: none !important;
  font-size: 0.9rem;
  font-weight: 500;
  transition: opacity 0.2s, transform 0.2s;
}

.modal-link-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  color: white !important;
}

.modal-link-btn.github-btn {
  background: #333;
}

.modal-link-btn.devpost-btn {
  background: #003E54;
}

.modal-link-btn.demo-btn {
  background: #FF0000;
}

.modal-link-btn.news-btn {
  background: #6c757d;
}

.modal-link-btn.paper-btn {
  background: #B31B1B;
}

.modal-link-btn.blog-btn {
  background: #0077B5;
}

/* ===========================================
   Responsive - Tablet Range (max-width: 1024px)
   =========================================== */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .featured-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ===========================================
   Responsive - Tablet (max-width: 768px)
   =========================================== */
@media (max-width: 768px) {
  .projects-container {
    padding: 1rem;
  }

  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .featured-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }

  .filter-section {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* ===========================================
   Responsive - Mobile (max-width: 600px)
   =========================================== */
@media (max-width: 600px) {
  .projects-container {
    padding: 0.5rem;
  }

  /* Featured Section - 3 columns (same as projects grid) */
  .featured-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  .featured-section h2,
  .projects-section h2 {
    font-size: 1.3rem;
    margin: 0 0 1rem 0;
  }

  /* Hide badges on cards for cleaner look */
  .featured-grid .card-badges,
  .featured-badges {
    display: none;
  }

  /* Projects Grid - 3 columns */
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
  }

  /* Compact card styling */
  .project-card {
    border-radius: 8px;
  }

  .card-image {
    height: 70px;
  }

  /* Hide all badges on mobile */
  .card-badges {
    display: none;
  }

  /* Compact content area */
  .card-content {
    padding: 0.4rem;
  }

  .card-title {
    font-size: 0.65rem;
    line-height: 1.25;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Hide description on mobile, but show context */
  .card-description {
    display: none;
  }

  /* Compact context styling for mobile */
  .project-context {
    font-size: 0.55rem;
    line-height: 1.2;
    margin-top: 0.15rem;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .project-context .award-text {
    font-size: 0.55rem;
  }

  /* Hide link buttons on mobile */
  .project-links {
    display: none;
  }

  /* Filter buttons - centered */
  .filter-section {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.6rem;
    gap: 0.4rem;
  }

  .filter-section::-webkit-scrollbar {
    display: none;
  }

  .filter-section .filter-btn {
    font-size: 0.65rem !important;
    padding: 0.4rem 0.7rem !important;
    white-space: nowrap;
    flex-shrink: 0;
  }
}
