/* Projects Page Styles */
/* REMIDATROA 2025 GETKIRBY CMS - FULLCUSTOM V1.0.0 */

/* Sticky Navigation */
.projects-nav-sticky {
  position: relative;
  top: 10px;
  z-index: 40;
  border-radius: 10px;
  transition: all 0.3s ease;
}

/* Hide pagination container visually but keep it accessible for Infinite Ajax Scroll */
.pagination-container {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* Infinite Scroll Loading */
.ias-spinner-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 0;
}

.ias-spinner {
  text-align: center;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.ias-spinner .spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid #3f54ff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s ease-in-out infinite;
}

.ias-spinner p {
  color: #3f54ff;
  font-weight: 600;
  margin: 0;
  font-size: 16px;
}

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

/* Toggle elements */
.custom-toggle-bg {
  transition: background-color 0.2s ease-in-out;
  border-radius: 100px;
}

.custom-toggle-dot {
  transition: transform 0.2s ease-in-out;
  border-radius: 100px;
}

/* Accordion Styles */
.accordion {
  position: relative;
  border: 2px solid #ddd;
  border-radius: 100px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  margin: 0;
  width: 260px;
}

.accordion-header {
  padding: 0.5rem 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 16px;
  font-weight: 600;
  transition: background-color 0.2s ease;
  border-radius: 100px;
}

.accordion-header:hover {
  background: #a8a8a84d;
  border-radius: 100px;
}

.arrow {
  transition: transform 0.3s ease;
  font-size: 14px;
  color: white;
}

.accordion-checkbox {
  display: none;
}

.accordion-content {
  position: absolute;
  top: 42px;
  left: 0;
  background-color: #080c26;
  max-height: 0;
  overflow-y: scroll;
  transition: max-height 0.3s ease;
  z-index: 20;
  border-radius: 20px;
}

.accordion-checkbox:checked + .accordion-header + .accordion-content {
  max-height: 310px;
}

.accordion-checkbox:checked + .accordion-header .arrow {
  transform: rotate(180deg);
}

.tags-container {
  padding: 20px;
}
@media screen and (min-width: 844px) {
  .projects-nav-sticky {
    position: sticky;
    border-radius: 50px;
  }
}

/* Scrollbar styles for accordion */
.accordion-content::-webkit-scrollbar {
  width: 10px;
}

.accordion-content::-webkit-scrollbar-track {
  background: #888;
}

.accordion-content::-webkit-scrollbar-thumb {
  background: #f1f1f1;
}

.accordion-content::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* General scrollbar styles */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #888;
}

::-webkit-scrollbar-thumb {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Project items responsive behavior */
#projects-container {
  min-height: 800px; /* Ensure minimum height for proper scroll detection */
  padding-bottom: 100px; /* Extra space at bottom for smooth infinite scroll trigger */
  position: relative;
  /* Grid properties are now in the HTML class */
}

.project-item {
  /* Grid item properties */
  position: relative;
  z-index: 1;
  /* Remove margin-bottom as grid gap handles spacing */
}

/* Pagination styles */
.pagination-link {
  transition: all 0.2s ease;
}

.pagination-link:hover {
  transform: translateY(-1px);
}

/* Loading states */
.projects-loading {
  opacity: 0.7;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Visual feedback for scroll trigger */
.scroll-trigger-indicator {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #3f54ff;
  color: white;
  padding: 10px 15px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(63, 84, 255, 0.3);
  backdrop-filter: blur(10px);
}

.scroll-trigger-indicator.show {
  opacity: 1;
  transform: translateY(0);
}

/* Different styling when showing page info vs loading info */
.scroll-trigger-indicator.page-indicator {
  background: rgba(63, 84, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.scroll-trigger-indicator.loading-indicator {
  background: #3f54ff;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    background: #3f54ff;
  }
  50% {
    background: #6576ff;
  }
}

/* Special styling for end-of-content message */
.scroll-trigger-indicator.end-content {
  background: rgba(76, 175, 80, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* URL update notification styling */
.scroll-trigger-indicator.url-update {
  background: rgba(255, 193, 7, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #000;
  font-weight: 700;
}

/* Enhanced styling for filtered state indicators */
.scroll-trigger-indicator:has-text("filtered") {
  border-left: 4px solid #ff6b35;
}

/* Alternative approach for filtered indicators */
.scroll-trigger-indicator.filtered-state {
  background: linear-gradient(
    135deg,
    rgba(63, 84, 255, 0.9) 0%,
    rgba(255, 107, 53, 0.9) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Debug: Grid visualization (remove in production) */
#projects-container.grid {
  /* Ensure grid properties are applied */
  display: grid !important;
}

/* Ensure project items behave correctly in grid */
.project-item {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
