/* JP Apps Page v3.2 — clean grid, icons, search */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

.jp-apps-page {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #0a0a1a;
  position: relative;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.jp-apps-page *,
.jp-apps-page *::before,
.jp-apps-page *::after {
  box-sizing: border-box;
}

.jp-apps-sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(160, 200, 255, 0.55) 0%, transparent 55%),
    linear-gradient(180deg, #e4eeff 0%, #f0f5ff 40%, #f8faff 100%);
  pointer-events: none;
}

/* Header */
.jp-apps-header {
  position: relative;
  z-index: 2;
  padding: 36px 24px 12px;
}
.jp-apps-header-inner {
  max-width: 1080px;
  margin: 0 auto;
}

.jp-apps-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #5a6a8a;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 28px;
  transition: color 0.2s;
}
.jp-apps-back:hover { color: #0a0a1a; }

.jp-apps-eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #3b8bff;
  margin-bottom: 10px;
}

.jp-apps-hero-text h1 {
  font-size: clamp(1.85rem, 4.5vw, 2.85rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
  margin: 0 0 12px;
  color: #0a0a1a;
}

.jp-apps-hero-text p {
  color: #5a6a8a;
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 0 28px;
  line-height: 1.55;
}

/* Search */
.jp-apps-search-wrap {
  position: relative;
  max-width: 520px;
  display: flex;
  align-items: center;
}

.jp-apps-search {
  width: 100%;
  padding: 15px 52px 15px 20px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.9);
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 1rem;
  font-family: inherit;
  color: #0a0a1a;
  outline: none;
  box-shadow: 0 4px 24px rgba(59,139,255,0.08);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.jp-apps-search::placeholder { color: #8a9bb5; }
.jp-apps-search:focus {
  border-color: rgba(59,139,255,0.45);
  box-shadow: 0 4px 28px rgba(59,139,255,0.16);
}

.jp-apps-search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #4a9fff, #7b6cff);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 12px rgba(91,140,255,0.35);
}
.jp-apps-search-btn:hover {
  transform: translateY(-50%) scale(1.05);
}

.jp-apps-search-hint {
  margin: 10px 0 0;
  font-size: 0.8rem;
  color: #8a9bb5;
  max-width: 520px;
}

/* Tabs */
.jp-apps-tabs {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 8px;
  padding: 20px 24px 8px;
  max-width: 1080px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.jp-apps-tabs::-webkit-scrollbar { display: none; }

.jp-apps-tab {
  flex-shrink: 0;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.75);
  background: rgba(255,255,255,0.5);
  backdrop-filter: blur(12px);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: #5a6a8a;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.jp-tab-ico { font-size: 0.95em; }
.jp-apps-tab:hover {
  color: #0a0a1a;
  background: rgba(255,255,255,0.85);
}
.jp-apps-tab.is-active {
  background: linear-gradient(135deg, #4a9fff, #7b6cff);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(91,140,255,0.35);
}

/* Main */
.jp-apps-main {
  position: relative;
  z-index: 2;
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 24px 48px;
}

.jp-apps-section {
  margin-bottom: 40px;
}
.jp-apps-section[hidden] {
  display: none !important;
}

.jp-apps-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.2rem;
  font-weight: 750;
  margin: 0 0 16px;
  letter-spacing: -0.02em;
  color: #0a0a1a;
}
.jp-sec-ico { font-size: 1.15em; }
.jp-apps-section-title small {
  font-size: 0.72rem;
  font-weight: 600;
  color: #5a6a8a;
  background: rgba(0,0,0,0.05);
  padding: 2px 9px;
  border-radius: 999px;
}

/* Grid — fixed, no ghost cells */
.jp-apps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

@media (min-width: 900px) {
  .jp-apps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 560px) {
  .jp-apps-grid {
    grid-template-columns: 1fr;
  }
}

.jp-apps-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 16px;
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 16px;
  text-decoration: none;
  color: #0a0a1a;
  box-shadow: 0 2px 16px rgba(59,139,255,0.06);
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
  min-height: 88px;
}
.jp-apps-card[hidden],
.jp-apps-card[style*="display: none"] {
  display: none !important;
}
.jp-apps-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(59,139,255,0.14);
  border-color: rgba(59,139,255,0.28);
}

.jp-apps-card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(59,139,255,0.12), rgba(139,92,246,0.12));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  line-height: 1;
}

.jp-apps-card-body {
  flex: 1;
  min-width: 0;
}
.jp-apps-card-body h3 {
  font-size: 0.98rem;
  font-weight: 700;
  margin: 0 0 4px;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.jp-apps-card-body p {
  font-size: 0.82rem;
  color: #5a6a8a;
  line-height: 1.4;
  margin: 0;
}

.jp-apps-card-arrow {
  flex-shrink: 0;
  color: #3b8bff;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 0.2s, transform 0.2s;
  font-size: 1.05rem;
  margin-top: 10px;
}
.jp-apps-card:hover .jp-apps-card-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Empty state */
.jp-apps-empty {
  padding: 48px 20px;
}
.jp-apps-empty[hidden] { display: none !important; }
.jp-apps-empty-box {
  text-align: center;
  max-width: 320px;
  margin: 0 auto;
  padding: 36px 24px;
  background: rgba(255,255,255,0.6);
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.9);
}
.jp-apps-empty-ico { font-size: 2rem; display: block; margin-bottom: 12px; }
.jp-apps-empty-box p {
  color: #5a6a8a;
  margin: 0 0 16px;
}
.jp-apps-empty-btn {
  padding: 10px 20px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #4a9fff, #7b6cff);
  color: #fff;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

/* CTA */
.jp-apps-cta {
  position: relative;
  z-index: 2;
  padding: 12px 24px 72px;
}
.jp-apps-cta-box {
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
  padding: 40px 28px;
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 24px;
  box-shadow: 0 8px 32px rgba(59,139,255,0.1);
}
.jp-apps-cta-box h2 {
  font-size: 1.45rem;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}
.jp-apps-cta-box p {
  color: #5a6a8a;
  margin: 0 0 20px;
  font-size: 0.98rem;
}
.jp-apps-cta-btn {
  display: inline-flex;
  padding: 14px 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4a9fff, #7b6cff);
  color: #fff !important;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 24px rgba(91,140,255,0.4);
  transition: transform 0.2s;
}
.jp-apps-cta-btn:hover { transform: translateY(-2px); }

@media (max-width: 600px) {
  .jp-apps-header { padding-top: 24px; }
  .jp-apps-search-hint { font-size: 0.75rem; }
}
