/* ============================================================
   NGS STORE — CATEGORY & TAG ARCHIVE STYLES
   Modern Software Catalog Grid with Dark/Light Support
   ============================================================ */

.archive-hero {
  padding: 3.5rem 0 2.5rem;
  background: var(--bg-surface, #f8fafc);
  border-bottom: 1px solid var(--border, #e2e8f0);
  text-align: center;
}

[data-theme="dark"] .archive-hero {
  background: #0b1322;
  border-bottom-color: #1e293b;
}

.archive-icon {
  font-size: 2.75rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.archive-title {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--text-main, #0f172a);
  letter-spacing: -0.025em;
  margin-bottom: 0.5rem;
}

[data-theme="dark"] .archive-title {
  color: #f8fafc;
}

.archive-desc {
  font-size: 1.125rem;
  color: var(--text-sub, #64748b);
  max-width: 650px;
  margin: 0 auto 1.25rem;
  line-height: 1.55;
}

[data-theme="dark"] .archive-desc {
  color: #94a3b8;
}

.archive-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #059669;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
}

[data-theme="dark"] .archive-count-pill {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.archive-content {
  padding: 3rem 0 5rem;
  max-width: 1280px;
  margin: 0 auto;
}

/* ============================================================
   APPLICATIONS GRID
   ============================================================ */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.75rem;
}

@media (max-width: 768px) {
  .app-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* ============================================================
   APPLICATION CARD
   ============================================================ */
.app-card {
  background: #ffffff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

[data-theme="dark"] .app-card {
  background: #0f172a;
  border-color: #1e293b;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  border-color: #cbd5e1;
}

[data-theme="dark"] .app-card:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
  border-color: #334155;
}

.card-link-wrapper {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none !important;
  color: inherit;
}

/* Preview Banner */
.card-preview-banner {
  width: 100%;
  height: 185px;
  overflow: hidden;
  background: #0b1322;
  position: relative;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

[data-theme="dark"] .card-preview-banner {
  border-bottom-color: #1e293b;
}

.card-preview-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-card:hover .card-preview-banner img {
  transform: scale(1.04);
}

/* Content Container */
.card-content-inner {
  padding: 1.35rem 1.4rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Header Row: Icon & Tag Pills */
.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.card-app-icon {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  background: #ffffff;
}

[data-theme="dark"] .card-app-icon {
  background: #1e293b;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.card-tags-top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill-category {
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.1);
  color: #0284c7;
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  letter-spacing: 0.01em;
}

[data-theme="dark"] .pill-category {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
}

.pill-rating {
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(245, 158, 11, 0.1);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
}

[data-theme="dark"] .pill-rating {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
}

/* Card Body */
.card-body {
  flex: 1;
  margin-bottom: 1.15rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-main, #0f172a);
  margin: 0 0 0.45rem;
  line-height: 1.35;
  letter-spacing: -0.015em;
  transition: color 0.2s ease;
}

[data-theme="dark"] .card-title {
  color: #f8fafc;
}

.app-card:hover .card-title {
  color: #0284c7;
}

[data-theme="dark"] .app-card:hover .card-title {
  color: #38bdf8;
}

.card-excerpt {
  font-size: 0.86rem;
  color: var(--text-sub, #64748b);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.7em;
}

[data-theme="dark"] .card-excerpt {
  color: #94a3b8;
}

/* Footer Row: Specs & CTA */
.card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--border, #e2e8f0);
  margin-top: auto;
}

[data-theme="dark"] .card-footer-row {
  border-top-color: #1e293b;
}

.card-specs-list {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  font-size: 0.76rem;
}

.card-spec-item {
  background: #f1f5f9;
  color: #475569;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  font-weight: 600;
  border: 1px solid #e2e8f0;
}

[data-theme="dark"] .card-spec-item {
  background: #1e293b;
  color: #cbd5e1;
  border-color: #334155;
}

.card-action-arrow {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #0284c7;
  font-weight: 700;
  font-size: 0.82rem;
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

[data-theme="dark"] .card-action-arrow {
  color: #38bdf8;
}

.app-card:hover .card-action-arrow {
  transform: translateX(4px);
  color: #0369a1;
}

[data-theme="dark"] .app-card:hover .card-action-arrow {
  color: #7dd3fc;
}

.card-action-arrow svg {
  display: block;
  transition: transform 0.2s ease;
}

.app-card:hover .card-action-arrow svg {
  transform: translateX(2px);
}
