/* Resources page specific styles */

.resources-hero {
  background: var(--vp-c-bg-soft);
  padding: 4rem 1.5rem;
  text-align: center;
  margin-bottom: 3rem;
}

.search-section {
  margin-bottom: 2rem;
}

.search-box {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--vp-c-text-2);
}

.search-input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 3rem;
  background: var(--vp-c-bg-alt);
  border: 1px solid var(--vp-c-border);
  border-radius: 0.5rem;
  font-size: 1rem;
  color: var(--vp-c-text-1);
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--vp-c-brand-1);
  box-shadow: 0 0 0 3px rgba(34, 140, 244, 0.1);
}

.filters-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.625rem 1.25rem;
  border: 1px solid var(--vp-c-border);
  border-radius: 0.5rem;
  background: var(--vp-c-bg-alt);
  color: var(--vp-c-text-2);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  font-size: 0.9375rem;
}

.filter-btn:hover {
  border-color: var(--vp-c-brand-1);
  color: var(--vp-c-text-1);
}

.filter-btn.active {
  background: var(--vp-c-brand-1);
  border-color: var(--vp-c-brand-1);
  color: white;
}

.results-count {
  font-size: 0.875rem;
  color: var(--vp-c-text-2);
  margin: 0;
}

.loading-state {
  margin: 2rem 0;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.skeleton-card {
  background: var(--vp-c-bg-alt);
  border: 1px solid var(--vp-c-border);
  border-radius: 1rem;
  overflow: hidden;
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.skeleton-image {
  aspect-ratio: 2 / 1;
  background: var(--vp-c-bg-mute);
}

.skeleton-content {
  padding: 1.5rem;
}

.skeleton-line {
  height: 1rem;
  background: var(--vp-c-bg-mute);
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
}

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

.error-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--vp-c-text-2);
}

.error-state h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--vp-c-text-1);
  margin-bottom: 0.5rem;
}

.load-more-container {
  text-align: center;
  margin-top: 3rem;
  padding: 2rem;
}

.loading-more-indicator {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--vp-c-text-2);
  font-size: 0.9375rem;
}

.loading-more-indicator .spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--vp-c-border);
  border-top-color: var(--vp-c-brand-1);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Resource detail page styles */
.resource-page {
  padding: 2rem 1.5rem;
  min-height: calc(100vh - 200px);
}

.back-link {
  display: inline-flex;
  align-items: center;
  color: var(--vp-c-text-2);
  text-decoration: none;
  margin-bottom: 2rem;
  font-weight: 500;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--vp-c-brand-1);
}

.resource-detail {
  max-width: 1200px;
  margin: 0 auto;
}

.resource-header {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--vp-c-border);
}

.resource-image {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--vp-c-bg-alt);
  border: 1px solid var(--vp-c-border);
}

.resource-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.resource-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.resource-badge {
  display: inline-block;
  padding: 0.375rem 0.875rem;
  background: var(--vp-c-brand-1);
  color: white;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  width: fit-content;
}

.resource-info h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--vp-c-text-1);
  margin: 0;
  line-height: 1.2;
}

.resource-tagline {
  font-size: 1.25rem;
  color: var(--vp-c-text-2);
  margin: 0;
  line-height: 1.6;
}

.resource-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--vp-c-bg-soft);
  border-radius: 0.75rem;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--vp-c-text-1);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--vp-c-text-2);
}

.resource-actions {
  display: flex;
  gap: 1rem;
}

.resource-content {
  display: grid;
  gap: 2rem;
}

.resource-description,
.resource-version {
  padding: 2rem;
  background: var(--vp-c-bg-soft);
  border-radius: 0.75rem;
}

.resource-description h2,
.resource-version h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--vp-c-text-1);
  margin: 0 0 1rem 0;
}

.description-text {
  color: var(--vp-c-text-2);
  line-height: 1.8;
}

.description-text img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 1rem 0;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  aspect-ratio: auto;
  object-fit: contain;
}

.description-text a {
  display: block;
  margin: 1rem 0;
}

.description-text a img {
  display: block;
  margin: 0;
}

.description-text a {
  color: var(--vp-c-brand-1);
  text-decoration: none;
}

.description-text a:hover {
  text-decoration: underline;
}

.description-text ul,
.description-text ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.description-text li {
  margin: 0.5rem 0;
}

.description-text code {
  background: var(--vp-c-bg-alt);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.description-text pre {
  background: var(--vp-c-bg-alt);
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.description-text pre code {
  background: none;
  padding: 0;
}

.description-text blockquote {
  border-left: 4px solid var(--vp-c-brand-1);
  padding-left: 1rem;
  margin: 1rem 0;
  color: var(--vp-c-text-2);
  font-style: italic;
}

@media (max-width: 768px) {
  .filters-section {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .skeleton-grid {
    grid-template-columns: 1fr;
  }
  
  .resource-header {
    gap: 1.5rem;
  }
  
  .resource-info h1 {
    font-size: 2rem;
  }
  
  .resource-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .resource-actions {
    flex-direction: column;
  }
}

