/**
 * NeuralOps Scenario Library — layout extras (PROTECTED — build_site.py must NOT touch)
 * Pairs with style.generated.css + sections/*.php + assets/js/main.js
 * ainna-theme-lock: neuralops-scenario-v1
 */

/* Hero with background image */
.hero {
  position: relative;
  min-height: clamp(520px, 72vh, 760px);
  display: flex;
  align-items: center;
  text-align: center;
  padding: calc(var(--nav-height) + 3rem) 0 4rem;
  background: #0a1628;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.72) 100%);
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero .hero-badge,
.hero h1,
.hero p,
.hero-cta,
.hero-stats {
  color: #fff;
}

.hero p {
  color: rgba(255, 255, 255, 0.86);
}

.hero-stat span {
  color: rgba(255, 255, 255, 0.72);
}

/* Nav + unified theme toggle */
.site-nav .nav-actions {
  gap: 0.65rem;
}

.site-nav button.ainna-theme-switch.theme-toggle {
  position: static !important;
  width: auto !important;
  height: auto !important;
  min-width: 0;
  border-radius: 999px !important;
}

.nav-link-scenario {
  color: var(--accent) !important;
  font-weight: 600;
}

/* Featured cards */
.featured-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.featured-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
}

.card-image {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-image svg {
  width: 22px;
  height: 22px;
}

.scenario-card .card-image {
  margin-bottom: 0.75rem;
}

/* Scenario library sticky toolbar */
#scenarios {
  scroll-margin-top: calc(var(--nav-height) + 12px);
}

.library-sticky-toolbar {
  position: sticky;
  top: var(--nav-height);
  z-index: 50;
  margin-bottom: 1.25rem;
  padding: 1rem 0 0.75rem;
  background: color-mix(in srgb, var(--bg-primary) 92%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.library-sticky-toolbar.reveal {
  opacity: 1;
  transform: none;
}

.library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.library-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.library-meta #scenario-result-count {
  font-weight: 700;
  color: var(--accent);
}

.library-cards-panel {
  padding-bottom: 1rem;
}

/* Category groups */
.category-group {
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-secondary);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.category-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border: none;
  background: var(--bg-glass);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: background var(--transition);
}

.category-header:hover {
  background: var(--accent-soft);
}

.category-header-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.category-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.category-icon svg {
  width: 20px;
  height: 20px;
}

.category-name {
  font-size: 1rem;
  font-weight: 700;
}

.category-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.category-arrow {
  font-size: 1.1rem;
  color: var(--text-muted);
  transition: transform var(--transition);
}

.category-arrow.open {
  transform: rotate(180deg);
}

.category-body {
  padding: 1rem 1.25rem 1.25rem;
}

.category-body.collapsed {
  display: none;
}

.category-body .scenario-grid {
  margin-top: 0;
}

#scenario-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Demo / NCC badges & buttons */
.badge-demo-link,
.badge-ncc-link {
  text-decoration: none;
}

.badge-demo-link {
  background: #dc2626;
  color: #fff !important;
}

.badge-ncc-link {
  background: #7c3aed;
  color: #fff !important;
}

.btn-ncc {
  background: #7c3aed;
  color: #fff;
  border: 1px solid #7c3aed;
}

.btn-ncc:hover {
  background: #6d28d9;
  border-color: #6d28d9;
  color: #fff;
}

.modal-extra-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  width: 100%;
  margin-bottom: 0.75rem;
}

.modal-header {
  flex-wrap: wrap;
  gap: 1rem;
}

.modal-header-image {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-header-image svg {
  width: 28px;
  height: 28px;
}

.modal-header-content {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.library-cards-panel .no-results {
  display: none;
  margin-top: 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
}

.library-cards-panel .no-results.visible {
  display: block;
}

@media (max-width: 768px) {
  .library-sticky-toolbar {
    top: calc(var(--nav-height) - 2px);
  }

  .library-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .category-header {
    padding: 0.875rem 1rem;
  }

  .category-body {
    padding: 0.75rem 1rem 1rem;
  }
}