/* Neurova flipbook gallery + viewer. Uses --brand-* vars injected by the theme,
   with orange fallbacks so it also works standalone. */
.nf-wrap { --nfb: var(--brand-500, 249 115 22); max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }

/* Tabs */
.nf-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-bottom: 2.5rem; }
.nf-tab {
  cursor: pointer; border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03); color: #a3a3a3;
  padding: 0.55rem 1.15rem; border-radius: 999px; font-size: 0.85rem; font-weight: 500;
  transition: all 0.25s ease;
}
.nf-tab:hover { color: #fff; border-color: rgb(var(--nfb) / 0.4); }
.nf-tab.is-active { color: #fff; background: linear-gradient(135deg, rgb(var(--nfb)), rgb(var(--brand-600, 234 88 12))); border-color: transparent; }

/* Grid */
.nf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1.5rem; }
.nf-card {
  cursor: pointer; text-align: left; padding: 0; border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.025); border-radius: 1rem; overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1), border-color 0.4s, box-shadow 0.4s;
  display: flex; flex-direction: column;
}
.nf-card:hover { transform: translateY(-6px); border-color: rgb(var(--nfb) / 0.3); box-shadow: 0 20px 45px -12px rgba(0,0,0,0.6), 0 0 25px rgb(var(--nfb) / 0.08); }
.nf-thumb { display: block; aspect-ratio: 1/1; overflow: hidden; background: #0a0a0a; }
.nf-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.nf-card:hover .nf-thumb img { transform: scale(1.06); }
.nf-title { display: block; padding: 0.85rem 1rem; font-size: 0.9rem; font-weight: 600; color: #fff; }
.nf-card.is-hidden { display: none; }

/* Modal */
.nf-modal { position: fixed; inset: 0; z-index: 100000; display: none; align-items: center; justify-content: center; }
.nf-modal.is-open { display: flex; }
.nf-modal-bg { position: absolute; inset: 0; background: rgba(0,0,0,0.85); backdrop-filter: blur(6px); }
.nf-modal-inner {
  position: relative; z-index: 1; width: min(96vw, 1100px); max-height: 94vh;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.nf-modal-head { display: flex; align-items: center; justify-content: space-between; color: #fff; }
.nf-modal-title { font-weight: 600; font-size: 1rem; }
.nf-close { background: none; border: none; color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; opacity: 0.8; }
.nf-close:hover { opacity: 1; }

.nf-stage { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; min-height: 0; }
.nf-loading { position: absolute; color: #a3a3a3; font-size: 0.9rem; }
.nf-book { margin: 0 auto; } /* width set inline to a single page so the book stays "closed" */
.nf-book .stf__parent { margin: 0 auto; box-shadow: 0 10px 40px rgba(0,0,0,0.5); }

.nf-controls { display: flex; align-items: center; justify-content: center; gap: 1.25rem; }
.nf-btn {
  cursor: pointer; border: 1px solid rgb(var(--nfb) / 0.35); background: rgb(var(--nfb) / 0.08);
  color: #fff; padding: 0.55rem 1.1rem; border-radius: 999px; font-size: 0.85rem; font-weight: 500;
  transition: all 0.25s ease;
}
.nf-btn:hover:not(:disabled) { background: rgb(var(--nfb) / 0.18); border-color: rgb(var(--nfb) / 0.6); }
.nf-btn:disabled { opacity: 0.4; cursor: default; }
.nf-page { color: #a3a3a3; font-size: 0.8rem; min-width: 70px; text-align: center; }

body.nf-lock { overflow: hidden; }
