/* Page: Home (index.html)
   Add homepage-only tweaks or experiments here. */

/* ─────────────────────────────────────────────────────────────
   Search Banner
   ───────────────────────────────────────────────────────────── */

.search-banner {
  background: linear-gradient(135deg, rgba(14, 165, 168, 0.08) 0%, rgba(159, 194, 107, 0.08) 50%, rgba(245, 158, 11, 0.06) 100%);
  border-top: 1px solid rgba(14, 165, 168, 0.15);
  border-bottom: 1px solid rgba(14, 165, 168, 0.15);
  padding: 1.5rem 0;
}

.search-banner .container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.search-banner-text {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 500;
}

.search-trigger {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  min-width: 320px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.search-trigger:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(14, 165, 168, 0.15);
  transform: translateY(-1px);
}

.search-trigger-icon {
  color: var(--muted);
  flex-shrink: 0;
}

.search-trigger-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.search-trigger-text {
  flex: 1;
  text-align: left;
  color: var(--muted);
  font-size: 0.9rem;
}

.search-trigger-shortcut {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.search-trigger-shortcut kbd {
  display: inline-block;
  padding: 0.2rem 0.45rem;
  font-size: 0.75rem;
  font-family: inherit;
  font-weight: 600;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  line-height: 1;
}

/* Search Modal */
.search-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  background: rgba(15, 23, 42, 0.6);
}
@supports (backdrop-filter: blur(4px)) {
  .search-modal { backdrop-filter: blur(4px); }
}

.search-modal.active {
  display: flex;
}

.search-modal-content {
  width: 100%;
  max-width: 600px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  animation: searchModalIn 0.15s ease-out;
}

@keyframes searchModalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.search-modal-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.search-modal-header svg {
  width: 20px;
  height: 20px;
  stroke: var(--muted);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.search-modal-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 1.1rem;
  color: var(--text);
  outline: none;
}

.search-modal-input::placeholder {
  color: var(--muted);
}

.search-modal-close {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid var(--border);
  border-radius: 0.3rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.search-modal-close:hover {
  background: rgba(148, 163, 184, 0.2);
}

.search-modal-results {
  max-height: 400px;
  overflow-y: auto;
  padding: 0.5rem;
}

.search-result-group {
  padding: 0.5rem 0;
}

.search-result-group-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 0.75rem;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--text);
  transition: background 0.12s ease;
}

.search-result-item:hover,
.search-result-item.active {
  background: rgba(14, 165, 168, 0.1);
}

.search-result-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 165, 168, 0.1);
  border-radius: 0.4rem;
  flex-shrink: 0;
}

.search-result-icon svg {
  width: 16px;
  height: 16px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
}

.search-result-text {
  flex: 1;
  min-width: 0;
}

.search-result-title {
  font-weight: 500;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-desc {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-no-results {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

.search-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted);
}

.search-modal-footer kbd {
  display: inline-block;
  padding: 0.15rem 0.35rem;
  font-size: 0.7rem;
  font-family: inherit;
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid var(--border);
  border-radius: 0.2rem;
  margin: 0 0.15rem;
}

/* Responsive */
@media (max-width: 640px) {
  .search-banner {
    padding: 1rem 0;
  }

  .search-banner .container {
    flex-direction: column;
    gap: 0.75rem;
  }

  .search-trigger {
    min-width: 100%;
    max-width: 360px;
  }

  .search-trigger-shortcut {
    display: none;
  }

  .search-modal {
    padding-top: 5vh;
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .search-modal-content {
    max-width: 100%;
  }
}

/* ─────────────────────────────────────────────────────────────
   Stats Bar Section
   ───────────────────────────────────────────────────────────── */

.stats-bar {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  padding: 2.5rem 0;
  margin-bottom: 1rem;
}

.stats-eyebrow {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #ffffff;
  margin-bottom: 1.25rem;
}

.stats-grid {
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
  min-width: 140px;
}

.stat-number {
  display: block;
  font-size: 3rem;
  font-weight: 800;
  color: #0ea5a8;
  background: linear-gradient(135deg, #0ea5a8 0%, #9fc26b 50%, #f59e0b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-target {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  color: #64748b;
  margin-top: 0.4rem;
  font-style: italic;
}

/* Light theme override for stats bar */
[data-theme="light"] .stats-bar {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .stat-label {
  color: #64748b;
}

[data-theme="light"] .stats-eyebrow {
  color: #94a3b8;
}

[data-theme="light"] .stat-target {
  color: #94a3b8;
}

/* Responsive adjustments for stats bar */
@media (max-width: 640px) {
  .stats-grid {
    gap: 2rem;
  }

  .stat-number {
    font-size: 2.25rem;
  }

  .stat-label {
    font-size: 0.8rem;
  }

  .stat {
    min-width: 100px;
  }

  .stat-target {
    font-size: 0.65rem;
  }
}

/* ─────────────────────────────────────────────────────────────
   Home Page Overrides for App Cards (from apps.css)
   ───────────────────────────────────────────────────────────── */

/* Override apps.css logo sizing - keep normal size on home page */
.home .site-header .brand .brand-logo {
  height: 36px;
}

@media (min-width: 1024px) {
  .home .site-header .brand .brand-logo {
    height: 42px;
  }
}

/* Application cards on home - slightly smaller icons for compact look */
#applications .app-card-icon {
  width: 56px;
  height: 56px;
  margin: 0;
}

#applications .app-card-icon svg {
  width: 36px;
  height: 36px;
}

#applications .app-card h3 {
  font-size: 1rem;
  padding: 0.25rem 0.65rem;
}

#applications .app-card p {
  font-size: 0.88rem;
}
