/**
 * 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;
}

.badge-status {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.65rem;
}
.badge-live { background: rgba(52, 199, 89, 0.18); color: #248a3d; }
.badge-pilot { background: rgba(255, 149, 0, 0.18); color: #c93400; }
.badge-planned { background: rgba(142, 142, 147, 0.18); color: #636366; }
html[data-theme="dark"] .badge-live { color: #34c759; }
html[data-theme="dark"] .badge-pilot { color: #ff9f0a; }
html[data-theme="dark"] .badge-planned { color: #aeaeb2; }

.hero-investor-lens {
  margin-top: 2rem;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  padding: 1.25rem 1.5rem;
  border-radius: 14px;
  background: rgba(102, 126, 234, 0.12);
  border: 1px solid rgba(102, 126, 234, 0.28);
  text-align: left;
}
.hero-investor-kicker {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #818cf8;
  margin-bottom: 0.5rem;
}
.hero-investor-lens p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.75rem;
  text-align: left;
}
.hero-investor-lens .btn { margin-top: 0.25rem; }

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

.article-page .container {
  max-width: 960px;
}

.article-page .breadcrumb {
  text-align: center;
}

.article-page .article-content {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.article-page .article-content h2,
.article-page .article-content h3 {
  text-align: center;
}

.article-page .article-content ul,
.article-page .article-content ol {
  display: inline-block;
  text-align: left;
  margin: 1rem auto 1.25rem;
  padding-left: 1.35rem;
}

.article-page .article-content li {
  margin-bottom: 0.65rem;
}

.article-page .article-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem !important;
}

.article-page .article-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.article-page .article-header h1 {
  max-width: 900px;
}

.article-page .article-meta {
  justify-content: center;
}

.article-header-image {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  margin: 0 auto 1.5rem;
}

.article-header-image svg {
  width: 48px;
  height: 48px;
}

/* Related scenarios — centered, larger cards */
.article-related {
  margin: 3.5rem auto 2.5rem;
  padding: 2.5rem 1.25rem 2rem;
  max-width: 960px;
  text-align: center;
  border-radius: var(--radius, 16px);
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-secondary, #f5f5f7) 88%, transparent);
}

.article-related > h2 {
  margin: 0 0 1.75rem;
  font-size: clamp(1.5rem, 3vw, 1.875rem);
  text-align: center;
}

.article-related .related-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 1.25rem;
  margin: 0 auto;
  max-width: 900px;
}

.article-related .related-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
  width: min(100%, 280px);
  min-height: 168px;
  padding: 1.5rem 1.25rem;
  text-align: center;
  text-decoration: none;
  color: inherit;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-glass, rgba(255, 255, 255, 0.72));
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.article-related .related-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.article-related .related-card .card-image {
  width: 52px;
  height: 52px;
  margin-bottom: 0;
}

.article-related .related-card .card-image svg {
  width: 26px;
  height: 26px;
}

.article-related .related-card-num {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--accent);
  text-transform: uppercase;
}

.article-related .related-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-primary);
}

html[data-theme="dark"] .article-related {
  background: color-mix(in srgb, var(--bg-secondary, #12121a) 92%, transparent);
}

html[data-theme="dark"] .article-related .related-card:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

/* 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;
}

.filter-chips-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  touch-action: pan-x;
  scrollbar-width: none;
}

.filter-chips-scroll::-webkit-scrollbar {
  display: none;
}

.filter-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: nowrap;
  width: max-content;
  min-width: 100%;
}

.chip {
  padding: 0.5rem 1rem;
  border-radius: 980px;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.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;
  }
}

/* === AINNA CROSS-LINK: category card -> demo button === */
.scenario-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.scenario-card-wrap .scenario-card {
  flex: 1 1 auto;
}
.scenario-card-demo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #f472b6;
  background: rgba(244, 114, 182, 0.08);
  border: 1px solid rgba(244, 114, 182, 0.3);
  border-radius: 6px;
  padding: 0.35rem 0.7rem;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.scenario-card-demo:hover {
  background: rgba(244, 114, 182, 0.18);
  border-color: rgba(244, 114, 182, 0.6);
  transform: translateY(-1px);
}

/* === Category page: scenario index button list (bawah article) === */
.scenario-index {
  max-width: 960px;
  margin: 0 auto 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-glass-strong, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 14px;
}
.scenario-index-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 0 0 0.9rem;
}
.scenario-index-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.scenario-index-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-primary);
  background: rgba(123, 159, 212, 0.1);
  border: 1px solid rgba(123, 159, 212, 0.28);
  border-radius: 99px;
  padding: 0.4rem 0.85rem;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
  max-width: 100%;
}
.scenario-index-btn:hover {
  background: rgba(123, 159, 212, 0.22);
  border-color: rgba(123, 159, 212, 0.55);
  transform: translateY(-1px);
}
.scenario-index-num {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-deep, #5A7FAD);
}
.scenario-index-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.scenario-index-demo {
  font-size: 0.7rem;
  line-height: 1;
}
/* === AINNA NeuralOps fix: article-content rapi (override center alignment) === */
.article-page .article-content {
  text-align: left !important;
}
.article-page .article-content h2,
.article-page .article-content h3 {
  text-align: left !important;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border, #e2e8f0);
}
.article-page .article-content h2:first-of-type,
.article-page .article-content h3:first-of-type {
  border-top: none;
  margin-top: 1.5rem;
  padding-top: 0;
}
.article-page .article-content p {
  text-align: left !important;
  line-height: 1.75;
  margin: 1rem 0;
}
.article-page .article-content ul,
.article-page .article-content ol {
  display: block !important;
  text-align: left !important;
  margin: 1rem 0 1.25rem;
  padding-left: 1.5rem;
}
.article-page .article-content li {
  margin-bottom: 0.65rem;
  line-height: 1.6;
}
.article-page .article-content blockquote {
  border-left: 3px solid var(--accent, #22d3ee);
  padding-left: 1rem;
  margin: 1.25rem 0;
  color: var(--text-dim, #6b7a90);
}
/* === end AINNA NeuralOps fix === */

/* === AINNA NeuralOps fix: article figure styling === */
.article-page .article-content .article-figure {
  margin: 2rem auto;
  max-width: 100%;
  text-align: center;
}
.article-page .article-content .article-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border, #e2e8f0);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.article-page .article-content .article-figure figcaption {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-dim, #6b7a90);
  font-style: italic;
  text-align: center;
}
/* === end AINNA NeuralOps figure fix === */
