/* Projects Page Styles */

/* Filter Section */
.filter-section {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding: 15px 0;
  height:fit-content;
  position: sticky;
  top: 85px;
  z-index: 100;
}
.filter-section .expanded {
  height: 500px;
}
.filter-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height:fit-content;
  justify-content: space-between;
  gap: 15px;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 20px;
  padding: 6px 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  flex: 1;
  max-width: 350px;
}

.search-box input {
  border: none;
  outline: none;
  background: transparent;
  flex: 1;
  padding: 6px;
  font-size: 13px;
}

.search-box button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.3s;
}

.search-box button:hover {
  background: rgba(0, 0, 0, 0.1);
}

.tech-stack-filters-container {
  position: relative;
  min-width: 250px;
}

.tech-stack-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.tech-stack-header span {
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Enhanced Tech Stack Filters */
.tech-stack-filters-container {
  position: relative;
  min-width: 250px;
}

.tech-stack-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.tech-stack-header span {
  font-size: 14px;
  font-weight: 600;
  color: #2c3e50;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(44, 62, 80, 0.05);
}

.toggle-btn:hover {
  background-color: rgba(44, 62, 80, 0.1);
}

.toggle-btn svg {
  transition: transform 0.3s ease;
  width: 16px;
  height: 16px;
}

.toggle-btn.collapsed svg {
  transform: rotate(-90deg);
}

.tech-stack-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
  padding: 12px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  margin-top: 8px;
}

.tech-stack-filters.collapsed {
  max-height: 0;
  padding: 0 12px;
  overflow: hidden;
  box-shadow: none;
  margin-top: 0;
}

.tech-filter {
  background: white;
  border: 1px solid #e0e3e7;
  border-radius: 20px;
  padding: 6px 14px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.3s;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  color: #2c3e50;
}

.tech-filter::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
}

.tech-filter:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: transparent;
  color: white;
}

.tech-filter:hover::before {
  opacity: 1;
}

.tech-filter.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.tech-filter-count {
  margin-left: 6px;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 6px;
  border-radius: 10px;
}

/* Scrollbar styling */
.tech-stack-filters::-webkit-scrollbar {
  width: 6px;
}

.tech-stack-filters::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.tech-stack-filters::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.tech-stack-filters::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* Dark mode styles */
body.dark .tech-stack-header span {
  color: #e0e3e7;
}

body.dark .tech-stack-filters {
  background: #2a2a2a;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.dark .tech-filter {
  background: #333;
  border-color: #444;
  color: #e0e3e7;
}

body.dark .tech-filter:hover {
  color: white;
}

body.dark .tech-filter.active {
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.5);
}

body.dark .tech-stack-filters::-webkit-scrollbar-track {
  background: #333;
}

body.dark .tech-stack-filters::-webkit-scrollbar-thumb {
  background: #555;
}

body.dark .tech-stack-filters::-webkit-scrollbar-thumb:hover {
  background: #666;
}

.show-more-container {
  display: flex;
  justify-content: center;
}

.show-more-btn {
  background: #2c3e50;
  color: white;
  border: none;
  border-radius: 25px;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(44, 62, 80, 0.2);
}

.show-more-btn:hover {
  background: #34495e;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(44, 62, 80, 0.3);
}

.show-more-btn:disabled {
  background: #95a5a6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.show-more-btn svg {
  transition: transform 0.3s;
}
body.dark .dropdown {
  background-color: #333;
  border: 1px solid #555;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

body.dark .dropdown a {
  color: #fff;
  border-bottom-color: #555;
}

body.dark .dropdown a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.show-more-btn:hover svg {
  transform: translateY(2px);
}

/* Projects Container */
.projects-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
  min-height: 60vh;
}

/* Show More Button Container */
.show-more-container {
  display: flex;
  justify-content: center;
  margin: 30px 0;
  padding: 20px 0;
}

.projects-container.grid-view {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}



/* Loading Spinner */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #2c3e50;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Project Card */
.project-card {
  background: white;
  border-radius: 20px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

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



.project-header {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 15px;
}

.main-content {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
  gap: 2rem;
  margin: 2rem;
  flex-wrap: wrap; 
}

.main-cards {
  background: linear-gradient(45deg, rgba(179, 180, 227, 0.6), rgba(124, 124, 194, 0.4), rgba(122, 141, 204, 0.2));
  padding: 1rem;
  font-weight: bold;
  color: #747474;
  border-radius: 25px;
  width: 15vw; 
  height: 7vh; 
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  box-shadow: 0 0 15px rgba(122, 141, 204, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.main-cards:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 25px rgba(122, 141, 204, 0.6);
}



.main i {
  font-size: 4rem;
  margin: 0.5rem;
  color: #6a6b6c;
  animation: float 1.5s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
  100% {
    transform: translateY(0);
  }
}

@media (max-width: 1024px) {
  .main-cards {
    width: 25vw;
    height: auto;
    padding: 1.5rem;
  }
}

@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
    align-items: center;
  }

  .main-cards {
    width: 60vw;
    height: auto;
    font-size: 0.9rem;
  }

  .main button {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }
}

@media (max-width: 480px) {
  .main-cards {
    width: 80vw;
    font-size: 0.85rem;
    padding: 1rem;
  }

  .main button {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}


.project-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  font-weight: bold;
  flex-shrink: 0;
}

.project-info {
  flex: 1;
}

.project-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 8px;
  line-height: 1.3;
}

.project-description {
  color: #666;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.project-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.project-admin {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #666;
}

.admin-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: #666;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 15px;
}

.tech-tag {
  background: #f8f9fa;
  color: #495057;
  padding: 4px 12px;
  border-radius: 15px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid #e9ecef;
}

.project-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.project-link {
  background: #2c3e50;
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.project-link:hover {
  background: #34495e;
  transform: translateY(-1px);
}

.github-stats {
  display: flex;
  gap: 15px;
  font-size: 12px;
  color: #666;
  margin-top: 10px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Back to Top Button */
.back-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: #2c3e50;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top-btn:hover {
  background: #34495e;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* API Status */
.api-status {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #666;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #27ae60;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Dark Mode Styles */
body.dark .filter-section {
  background: rgba(42, 42, 42, 0.8);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

body.dark .search-box {
  background: #333;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

body.dark .search-box input {
  color: white;
}

body.dark .search-box input::placeholder {
  color: #aaa;
}

body.dark .tech-filter {
  background: #333;
  border-color: #555;
  color: white;
}

body.dark .tech-filter:hover {
  background: #444;
}

body.dark .tech-filter.active {
  background: #2c3e50;
}

body.dark .tech-stack-header {
  color: #aaa;
}

body.dark .toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

body.dark .show-more-btn {
  background: #2c3e50;
  box-shadow: 0 4px 15px rgba(44, 62, 80, 0.4);
}

body.dark .show-more-btn:hover {
  background: #34495e;
  box-shadow: 0 6px 20px rgba(44, 62, 80, 0.5);
}

body.dark .back-to-top-btn {
  background: #2c3e50;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

body.dark .back-to-top-btn:hover {
  background: #34495e;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

body.dark .project-card {
  background: #2a2a2a;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark .project-title {
  color: white;
}

body.dark .project-description {
  color: #bbb;
}

body.dark .project-admin {
  color: #aaa;
}

body.dark .admin-avatar {
  background: #444;
  color: #ccc;
}

body.dark .tech-tag {
  background: #333;
  color: #ccc;
  border-color: #555;
}

body.dark .github-stats {
  color: #aaa;
}

body.dark .api-status {
  background: rgba(42, 42, 42, 0.9);
  border-top-color: rgba(255, 255, 255, 0.1);
  color: #aaa;
}

/* Error and No Results States */
.error-message, .no-results {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.error-message h3, .no-results h3 {
  color: #2c3e50;
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.error-message p, .no-results p {
  font-size: 16px;
  line-height: 1.6;
}

body.dark .error-message h3, body.dark .no-results h3 {
  color: white;
}

body.dark .error-message, body.dark .no-results {
  color: #aaa;
}

/* Responsive Design */
@media (max-width: 768px) {
  .filter-section {
    padding: 8px 0;
  }
  
  .filter-container {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .search-box {
    max-width: none;
  }
  
  .tech-stack-filters-container {
    width: 100%;
  }
  
  .tech-stack-filters {
    justify-content: center;
    max-height: 50px;
  }
  
  .show-more-container {
    justify-content: center;
  }
  
  .projects-container.grid-view {
    grid-template-columns: 1fr;
  }
  

  
  .api-status {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .filter-section {
    padding: 6px 0;
  }
  
  .filter-container {
    gap: 8px;
  }
  
  .tech-stack-filters {
    max-height: 40px;
  }
  
  .tech-stack-header {
    font-size: 11px;
  }
  
  .tech-filter {
    padding: 3px 8px;
    font-size: 10px;
  }
  
  .project-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  
  .project-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .project-link {
    justify-content: center;
  }
  
  .back-to-top-btn {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

/* Comment + Like styles */
.interaction-section {
  margin-top: 10px;
  padding: 10px;
  border-top: 1px solid #ddd;
}

.like-btn, .fav-btn {
  cursor: pointer;
  margin-right: 10px;
  color: #555;
}

.like-btn.liked { 
  color: #e63946; 
}

.fav-btn.favorited { 
  color: #facc15; 
}

.comments { 
  margin-top: 10px; 
}

.comment {
  background: #f5f5f5;
  padding: 5px 8px;
  margin: 4px 0;
  border-radius: 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comment-actions button {
  margin-left: 5px;
  cursor: pointer;
  font-size: 12px;
}

.comment-input {
  display: flex;
  margin-top: 8px;
}

.comment-input input {
  flex: 1;
  padding: 5px;
}

.comment-input button {
  padding: 5px 8px;
}

/* MAIN SECTION CARDS */
.main-cards {
  padding: 15px 30px;
  border-radius: 50px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
  cursor: pointer;
}

.main-cards:hover {
  transform: translateY(-5px) scale(1.03); /* Slight lift and scale */
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); /* Stronger shadow */
  filter: brightness(1.05); /* Slight brightness boost */
}

/* SHOW MORE BUTTON */
.show-more-btn {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.show-more-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

/* BACK TO TOP BUTTON */
#scrollTopBtn {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#scrollTopBtn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* FILTER TECH STACK TOGGLE BUTTON */
.toggle-btn {
  transition: transform 0.3s ease, color 0.3s ease;
}

.toggle-btn:hover {
  transform: rotate(15deg);
}

/* PROJECTS CONTAINER CARDS (if dynamically loaded) */
.project-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
}

.project-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  filter: brightness(1.05);
}

/* ADD SUBTLE ANIMATION TO LOADING SPINNER */
.loading-spinner .spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg);}
  100% { transform: rotate(360deg);}
}

/* GENERAL LINK STYLES */
a {
  color: inherit; /* Keep default color */
  text-decoration: none;
  transition: color 0.3s ease, transform 0.2s ease;
}

/* HOVER EFFECT */
a:hover {
  color: #9370DB; /* Slight highlight on hover */
  transform: scale(1.05); /* Subtle grow effect */
}

/* ACTIVE / CLICK EFFECT */
a:active {
  color: #87CEEB; /* Slight color change when clicked */
  transform: scale(0.98); /* Slight shrink effect for click */
}

/* NAVBAR LINKS */
.nav-links a {
  padding: 5px 10px;
  border-radius: 5px;
  transition: background 0.3s ease, color 0.3s ease;
}

.nav-links a:hover {
  background: rgba(147, 112, 219, 0.1); /* subtle background highlight */
  color: #9370DB;
}

.nav-links a:active {
  background: rgba(135, 206, 235, 0.2); /* subtle active background */
  color: #87CEEB;
}

/* DROPDOWN LINKS */
.dropdown a {
  display: block;
  padding: 8px 15px;
  transition: background 0.3s ease, color 0.3s ease;
}

.dropdown a:hover {
  background-color: rgba(147, 112, 219, 0.15);
  color: #9370DB;
}

.dropdown a:active {
  background-color: rgba(135, 206, 235, 0.2);
  color: #87CEEB;
}

/* FOOTER LINKS */
.footer a {
  color: #fff;
  transition: color 0.3s ease, transform 0.2s ease;
}

.footer a:hover {
  color: #87CEEB; /* subtle highlight */
  transform: scale(1.05);
}

.footer a:active {
  color: #9370DB;
  transform: scale(0.98);
}

/* Resource Hub Styles */
.resource-hub {
  margin: 30px auto;
  padding: 20px;
  max-width: 900px;
  border: 2px solid #ddd;
  border-radius: 15px;
  background: #f9f9f9;
}

.resource-hub h2 {
  text-align: center;
  margin-bottom: 20px;
}

.resource-input {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.resource-input input {
  flex: 1;
  padding: 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
}

.resource-input button {
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 5px;
  background: #9370db;
  color: white;
  border: none;
  transition: background 0.3s ease;
}

.resource-input button:hover {
  background: #7a52c4;
}

.resources-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.resource-card {
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  width: calc(33% - 10px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 150px;
}

.resource-card .text-content {
  flex: 1;
  text-align: justify;
  margin-bottom: 10px;
}

.resource-card button {
  align-self: flex-end;
  background: #e63946;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  padding: 5px 10px;
  transition: background 0.3s ease;
}

.resource-card button:hover {
  background: #c12c3b;
}

@media (max-width: 768px) {
  .resource-card {
    width: calc(50% - 10px);
  }
}

@media (max-width: 480px) {
  .resource-card {
    width: 100%;
  }
} 