/* demo.nextsoftware.dev — Cassiopeia child. Pages run inside the demo shell's frame (the bar on top
   is the header and the navigation), so the template shows content only. */
:root {
  --cassiopeia-color-primary: #1e40af;
  --cassiopeia-color-link: #1e40af;
  --cassiopeia-color-hover: #1e3a8a;
  --cassiopeia-font-family-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --cassiopeia-font-family-headings: var(--cassiopeia-font-family-body);
  --cassiopeia-font-weight-headings: 700;
}
body { background: #f6f8fc; color: #0f172a; }

/* The demo shell's bar is the header: the template's own header is not shown. */
.container-header { display: none !important; }
.container-nav, .container-banner, .container-breadcrumbs, .container-top-a, .container-top-b { display: none !important; }
/* The product on a white card: up to 1440px wide, centred, with room around and inside it. */
.site-grid {
  width: 100%; max-width: 1440px; margin: 0 auto; padding: 24px 8px 40px; box-sizing: border-box; /* + the grid gap (1em) at the sides */
  grid-template-columns: [full-start] 0 [main-start] repeat(4, minmax(0, 1fr)) [main-end] 0 [full-end] !important;
}
.site-grid > .grid-child { max-width: none; }
.site-grid > .container-component {
  background: #fff; border: 1px solid #e5e9f0; border-radius: 16px; padding: 32px 36px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
main { margin-top: 0; }
@media (max-width: 767px) {
  .site-grid { padding: 12px 0 24px; column-gap: 10px !important; }
  .site-grid > .container-component { padding: 18px 16px; border-radius: 12px; }
}
.footer { display: none; }

/* ---- home: the product gallery ({nsd_gallery}) */
.nsd-lead { font-size: 1.1rem; color: #475569; max-width: 720px; margin: .25rem 0 2rem; line-height: 1.6; }
.item-page h1, .com-content-article h1 { letter-spacing: -.02em; }
.nsd-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin: 0 0 3rem; padding: 0; list-style: none; }
.nsd-gallery li { display: flex; gap: 16px; align-items: flex-start; padding: 20px; background: #fff; border: 1px solid #e5e9f0; border-radius: 14px; transition: border-color .15s, box-shadow .15s; }
.nsd-gallery li:hover { border-color: #c7d6fb; box-shadow: 0 10px 28px -18px rgba(30, 64, 175, .45); }
.nsd-g-icon { width: 48px; height: 48px; border-radius: 12px; flex: none; }
.nsd-g-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.nsd-g-cat { font-size: .72rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: #94a3b8; }
.nsd-g-body h2 { font-size: 1.05rem; font-weight: 650; margin: 0; }
.nsd-g-body p { margin: 0; color: #64748b; font-size: .93rem; }
.nsd-g-actions { display: flex; gap: 8px; margin-top: 12px; }
.nsd-g-actions a { font-size: .88rem; font-weight: 600; padding: 7px 14px; border-radius: 9px; text-decoration: none; }
.nsd-g-try { background: #2563eb; color: #fff !important; }
.nsd-g-try:hover { background: #1d4ed8; }
.nsd-g-admin { color: #1e40af; background: #eff4ff; }
.nsd-g-admin:hover { background: #dbe6ff; }

/* ---- dark mode: html.nsd-dark, set in the frame by the demo's head script from the bar's theme
   (auto = the device). The page and the card go dark; a product's own light-only parts stay as they are. */
html.nsd-dark { color-scheme: dark; --cassiopeia-color-link: #93c5fd; --cassiopeia-color-hover: #bfdbfe; }
.nsd-dark body { background: #070b14; color: #e2e8f0; }
.nsd-dark .site-grid > .container-component { background: #0f1626; border-color: #243044; box-shadow: none; }
.nsd-dark h1, .nsd-dark h2, .nsd-dark h3, .nsd-dark h4 { color: #f1f5f9; }
.nsd-dark a:not([class]) { color: var(--cassiopeia-color-link); }
.nsd-dark .nsd-lead, .nsd-dark .nsd-g-body p { color: #94a3b8; }
.nsd-dark .nsd-gallery li { background: #111a2b; border-color: #243044; }
.nsd-dark .nsd-gallery li:hover { border-color: #3b5bab; box-shadow: 0 10px 28px -18px rgba(0, 0, 0, .8); }
.nsd-dark .nsd-g-admin { color: #93c5fd; background: rgba(59, 130, 246, .16); }
.nsd-dark .nsd-g-admin:hover { background: rgba(59, 130, 246, .26); }
.nsd-dark code { color: #f0abfc; }
