/*
Theme Name: Nexora Cyberpunk
Theme URI: https://example.com/nexora-cyberpunk
Author: Digital Artifex
Description: A dark neon cyberpunk Full Site Editing block theme with UsersWP styling and an arbitrary-block background container.
Version: 2.0.24
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nexora-cyberpunk
Tags: block-patterns, block-styles, full-site-editing, dark, custom-colors, editor-style, wide-blocks
*/

:root {
  --nx-bg: #07101e;
  --nx-bg-deep: #030813;
  --nx-surface: #0b1628;
  --nx-surface-2: #101d33;
  --nx-surface-3: #14243e;
  --nx-border: rgba(26, 218, 255, .28);
  --nx-border-strong: rgba(26, 218, 255, .62);
  --nx-cyan: #16ddff;
  --nx-cyan-soft: #7beeff;
  --nx-magenta: #ff42df;
  --nx-purple: #9d63ff;
  --nx-green: #41f59a;
  --nx-danger: #ff4b77;
  --nx-text: #f4f7ff;
  --nx-muted: #94a8c1;
  /* Standard WordPress palette aliases. */
  --nx-primary: #16ddff;
  --nx-base: #07101e;
  --nx-secondary: #ff42df;
  --nx-secondary-bg: #101d33;
  --nx-accent: #9d63ff;
  --nx-accent-1: #7beeff;
  --nx-accent-2: #41f59a;
  --nx-accent-3: #ff4b77;
  --nx-accent-4: #94a8c1;
  --nx-accent-5: #39ff14;
  --nx-neon-green: #39ff14;
  --nx-shadow: 0 0 24px rgba(22,221,255,.12), 0 0 54px rgba(157,99,255,.08);
  --nx-radius: 16px;
  --nx-radius-sm: 10px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 20% 15%, rgba(22,221,255,.10), transparent 30%),
    radial-gradient(circle at 82% 10%, rgba(255,66,223,.09), transparent 26%),
    linear-gradient(180deg, var(--nx-bg-deep) 0%, var(--nx-bg) 35%, #050c17 100%);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  background-image:
    linear-gradient(rgba(22,221,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22,221,255,.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 75%);
  z-index: -1;
}
::selection { color:#03101c; background:var(--nx-cyan); }

/* Shared neon panel language */
.nx-panel,
.is-style-nexora-panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(16,29,51,.96), rgba(8,18,34,.96));
  border: 1px solid var(--nx-border);
  border-radius: var(--nx-radius);
  box-shadow: var(--nx-shadow);
}
.is-style-nexora-panel > :first-child { margin-top: 0; }
.is-style-nexora-panel > :last-child { margin-bottom: 0; }

.is-style-neon-outline {
  border: 1px solid var(--nx-border-strong);
  border-radius: var(--nx-radius);
  box-shadow: 0 0 24px rgba(22,221,255,.13), inset 0 0 24px rgba(22,221,255,.04);
}

.is-style-neon-gradient-text,
.is-style-neon-gradient-text-vertical {
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.is-style-neon-gradient-text {
  background-image: linear-gradient(90deg, var(--nx-magenta), var(--nx-purple), var(--nx-cyan));
}
.is-style-neon-gradient-text-vertical {
  background-image: linear-gradient(180deg, var(--nx-magenta), var(--nx-purple), var(--nx-cyan));
}

/* Let explicitly colored heading/title links follow the block's selected text color. */
.wp-block-heading.has-text-color a,
.wp-block-post-title.has-text-color a,
.wp-block-site-title.has-text-color a {
  color: inherit;
}

.is-style-cyber-grid {
  background-image:
    linear-gradient(rgba(22,221,255,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22,221,255,.07) 1px, transparent 1px);
  background-size: 34px 34px;
}

/* Header / navigation */
.nx-site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  backdrop-filter: blur(18px) saturate(140%);
  background: rgba(3,8,19,.84);
  border-bottom: 1px solid rgba(22,221,255,.16);
}
.admin-bar .nx-site-header { top: 32px; }
.nx-site-header .wp-block-site-title a {
  color: var(--nx-text);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-weight: 900;
}
.nx-site-header .wp-block-navigation-item__content { font-weight: 700; }
.nx-site-header .wp-block-navigation-item__content:hover,
.nx-site-header .current-menu-item > .wp-block-navigation-item__content {
  color: var(--nx-cyan);
  text-shadow: 0 0 14px rgba(22,221,255,.6);
}

/* Navigation submenus */
.nx-site-header .wp-block-navigation__submenu-container {
  background: var(--wp--preset--color--surface) !important;
  color: #fff !important;
}
.nx-site-header .wp-block-navigation__submenu-container .wp-block-navigation-item,
.nx-site-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
  color: #fff !important;
}
.nx-site-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover,
.nx-site-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus,
.nx-site-header .wp-block-navigation__submenu-container .current-menu-item > .wp-block-navigation-item__content {
  color: var(--wp--preset--color--primary) !important;
  text-shadow: none;
}

/* Buttons — match the Komplex Pack Viewer action buttons. */
.wp-element-button:not(.no-decoration),
.wp-block-button__link:not(.no-decoration),
button:not(.no-decoration),
input[type="submit"]:not(.no-decoration) {
  appearance: none;
  box-sizing: border-box;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--wp--preset--color--contrast-2, #3a3f47);
  border-radius: 8px;
  background: var(--wp--preset--color--base-2, #16191f);
  color: var(--wp--preset--color--contrast, #f5f7fb);
  text-decoration: none !important;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease, filter .18s ease;
}
.wp-element-button:not(.no-decoration):hover,
.wp-element-button:not(.no-decoration):focus-visible,
.wp-block-button__link:not(.no-decoration):hover,
.wp-block-button__link:not(.no-decoration):focus-visible,
button:not(.no-decoration):hover,
button:not(.no-decoration):focus-visible,
input[type="submit"]:not(.no-decoration):hover,
input[type="submit"]:not(.no-decoration):focus-visible {
  border-color: var(--wp--preset--color--primary, #7d5cff);
  color: var(--wp--preset--color--contrast, #f5f7fb);
  text-decoration: none !important;
  filter: brightness(1.08);
  transform: none;
}

/* Gutenberg style matching .kpv-download-komplex. */
.wp-block-button.is-style-komplex-download .wp-block-button__link,
.is-style-komplex-download .wp-block-button__link {
  background: var(--wp--preset--color--primary, #7d5cff);
  border-color: var(--wp--preset--color--primary, #7d5cff);
  color: var(--wp--preset--color--contrast, #f5f7fb);
}

/* Existing Nexora primary style remains available. */
.is-style-nexora-primary .wp-block-button__link {
  color:#041019;
  border:0;
  background: linear-gradient(90deg,var(--nx-magenta),var(--nx-cyan));
}
.is-style-nexora-primary .wp-block-button__link:hover {
  border: 0;
}

/* Forms */
input:not([type="checkbox"]):not([type="radio"]), select, textarea {
  color: var(--nx-text);
  background: #081426;
  border: 1px solid rgba(132,174,213,.30);
  border-radius: 10px;
  padding: .72rem .85rem;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--nx-cyan);
  box-shadow: 0 0 0 3px rgba(22,221,255,.11);
}

/* Posts / query loops */
.wp-block-query .wp-block-post-template {
  gap: clamp(1.15rem, 2vw, 2rem);
}

/* Every post-template item becomes a Nexora cyberpunk card, including user-created Query Loops. */
.wp-block-query .wp-block-post-template > li {
  --nx-query-card-padding: clamp(1rem, 2vw, 1.5rem);
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-width: 0;
  height: 100%;
  padding: var(--nx-query-card-padding);
  background:
    radial-gradient(circle at 100% 0%, rgba(157,99,255,.12), transparent 34%),
    linear-gradient(155deg, rgba(16,29,51,.97), rgba(5,13,25,.98));
  border: 1px solid rgba(22,221,255,.24);
  border-radius: 18px;
  box-shadow: 0 14px 38px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.025);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.wp-block-query .wp-block-post-template > li::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, var(--nx-cyan), var(--nx-purple) 50%, var(--nx-magenta));
  box-shadow: 0 0 16px rgba(22,221,255,.32);
  pointer-events: none;
}
.wp-block-query .wp-block-post-template > li::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 180px;
  height: 180px;
  right: -75px;
  bottom: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(57,255,20,.08), transparent 68%);
  pointer-events: none;
}
.wp-block-query .wp-block-post-template > li:hover {
  transform: translateY(-4px);
  border-color: rgba(57,255,20,.55);
  box-shadow:
    0 18px 46px rgba(0,0,0,.34),
    0 0 26px rgba(22,221,255,.12),
    0 0 34px rgba(57,255,20,.08);
}
.wp-block-query .wp-block-post-template > li > * {
  position: relative;
  z-index: 1;
}

/* Featured images become a full-bleed card header when present. */
.wp-block-query .wp-block-post-template > li > .wp-block-post-featured-image:first-child {
  width: auto;
  max-width: none;
  margin:
    calc(var(--nx-query-card-padding) * -1)
    calc(var(--nx-query-card-padding) * -1)
    1.15rem;
}
.wp-block-query .wp-block-post-template > li > .wp-block-post-featured-image:first-child a {
  display: block;
}
.wp-block-query .wp-block-post-template > li > .wp-block-post-featured-image:first-child img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(.92) contrast(1.04);
  transition: transform .28s ease, filter .28s ease;
}
.wp-block-query .wp-block-post-template > li:hover > .wp-block-post-featured-image:first-child img {
  transform: scale(1.025);
  filter: saturate(1.08) contrast(1.06);
}

.wp-block-query .wp-block-post-title {
  margin-top: .15rem;
  margin-bottom: .55rem;
  line-height: 1.08;
}
.wp-block-query .wp-block-post-title a {
  color: var(--nx-text);
  text-decoration: none;
  transition: color .18s ease, text-shadow .18s ease;
}
.wp-block-query .wp-block-post-title a:hover {
  color: var(--nx-cyan-soft);
  text-shadow: 0 0 16px rgba(22,221,255,.25);
}
.wp-block-query .wp-block-post-date,
.wp-block-query .wp-block-post-author-name,
.wp-block-query .wp-block-post-terms {
  color: var(--nx-muted);
  font-size: .78rem;
  font-weight: 750;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.wp-block-query .wp-block-post-excerpt {
  color: #bac7d9;
}
.wp-block-query .wp-block-post-excerpt__more-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .55rem;
  color: var(--nx-neon-green);
  font-weight: 800;
  text-decoration: none;
  text-shadow: 0 0 12px rgba(57,255,20,.18);
}
.wp-block-query .wp-block-post-excerpt__more-link::after {
  content: "→";
  transition: transform .18s ease;
}
.wp-block-query .wp-block-post-excerpt__more-link:hover::after {
  transform: translateX(4px);
}

/* Existing explicit card class remains available for Groups and older templates. */
.nx-query-card {
  height: 100%;
  padding: clamp(20px,3vw,32px);
  background: linear-gradient(180deg,rgba(16,29,51,.95),rgba(8,18,34,.95));
  border: 1px solid rgba(22,221,255,.18);
  border-radius: var(--nx-radius);
}
.nx-query-card:hover {
  border-color: rgba(57,255,20,.52);
  box-shadow: var(--nx-shadow);
}

/* Query pagination matches the card system. */
.wp-block-query-pagination {
  gap: .5rem;
  margin-top: clamp(1.25rem, 3vw, 2rem);
}
.wp-block-query-pagination a,
.wp-block-query-pagination .page-numbers {
  min-width: 2.35rem;
  padding: .45rem .7rem;
  border: 1px solid rgba(22,221,255,.22);
  border-radius: 8px;
  background: rgba(16,29,51,.72);
  color: var(--nx-text);
  text-align: center;
  text-decoration: none;
}
.wp-block-query-pagination a:hover,
.wp-block-query-pagination .page-numbers.current {
  border-color: var(--nx-neon-green);
  color: var(--nx-neon-green);
  box-shadow: 0 0 16px rgba(57,255,20,.10);
}

/* Hero pattern helpers */
.nx-hero-shell { min-height: clamp(520px, 72vh, 760px); }
.nx-hero-title {
  font-weight: 900;
  line-height: .9;
  letter-spacing: -.045em;
  text-transform: uppercase;
  text-shadow: 0 0 28px rgba(22,221,255,.06);
}
.nx-kicker {
  color: var(--nx-magenta);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 800;
  font-size: .78rem;
}

/* Nexora arbitrary block background system */
.wp-block-nexora-background-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 180px;
}
.wp-block-nexora-background-section > .wp-block-nexora-background-layer {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.wp-block-nexora-background-layer > * {
  width: 100%;
  max-width: none !important;
}
.wp-block-nexora-background-layer > .wp-block-image,
.wp-block-nexora-background-layer > .wp-block-video,
.wp-block-nexora-background-layer > .wp-block-cover,
.wp-block-nexora-background-layer > figure {
  height: 100%;
  margin: 0;
}
.wp-block-nexora-background-layer img,
.wp-block-nexora-background-layer video,
.wp-block-nexora-background-layer .wp-block-cover__image-background,
.wp-block-nexora-background-layer .wp-block-cover__video-background {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wp-block-nexora-background-section > .wp-block-nexora-content-layer {
  position: relative;
  z-index: 1;
}

/* Core blocks */
.wp-block-quote {
  border-left: 3px solid var(--nx-magenta);
  padding-left: 1.25rem;
  background: rgba(255,66,223,.04);
}
.wp-block-code, pre {
  background:#030913;
  border:1px solid rgba(22,221,255,.18);
  border-radius:8px;
}
.wp-block-separator { border-color: rgba(22,221,255,.18); }
.wp-block-table td, .wp-block-table th { border-color: rgba(22,221,255,.18); }

/* Footer */
.nx-site-footer {
  border-top: 1px solid rgba(22,221,255,.15);
  background: rgba(3,8,19,.65);
}

@media (max-width: 782px) {
  .admin-bar .nx-site-header { top: 46px; }
  .nx-site-header { position: relative; top: auto; }
  .nx-hero-shell { min-height: 460px; }
}

/* 2.0.13 — Gutenberg Default heading/paragraph solid text colors.
 * Explicitly honor WordPress palette classes and reset WebKit text fill when
 * the neon gradient block styles are not selected. This keeps Default style
 * text colors reliable in Chromium/Gutenberg and on the frontend. */
.wp-block-heading.has-text-color:not(.is-style-neon-gradient-text):not(.is-style-neon-gradient-text-vertical),
.wp-block-paragraph.has-text-color {
  -webkit-text-fill-color: currentColor;
}

.wp-block-heading.has-primary-color,
.wp-block-paragraph.has-primary-color { color: var(--wp--preset--color--primary) !important; }
.wp-block-heading.has-base-color,
.wp-block-paragraph.has-base-color { color: var(--wp--preset--color--base) !important; }
.wp-block-heading.has-secondary-color,
.wp-block-paragraph.has-secondary-color { color: var(--wp--preset--color--secondary) !important; }
.wp-block-heading.has-secondary-bg-color,
.wp-block-paragraph.has-secondary-bg-color { color: var(--wp--preset--color--secondary-bg) !important; }
.wp-block-heading.has-accent-color,
.wp-block-paragraph.has-accent-color { color: var(--wp--preset--color--accent) !important; }
.wp-block-heading.has-accent-1-color,
.wp-block-paragraph.has-accent-1-color { color: var(--wp--preset--color--accent-1) !important; }
.wp-block-heading.has-accent-2-color,
.wp-block-paragraph.has-accent-2-color { color: var(--wp--preset--color--accent-2) !important; }
.wp-block-heading.has-accent-3-color,
.wp-block-paragraph.has-accent-3-color { color: var(--wp--preset--color--accent-3) !important; }
.wp-block-heading.has-accent-4-color,
.wp-block-paragraph.has-accent-4-color { color: var(--wp--preset--color--accent-4) !important; }
.wp-block-heading.has-accent-5-color,
.wp-block-paragraph.has-accent-5-color { color: var(--wp--preset--color--accent-5) !important; }
.wp-block-heading.has-contrast-color,
.wp-block-paragraph.has-contrast-color { color: var(--wp--preset--color--contrast) !important; }
.wp-block-heading.has-void-color,
.wp-block-paragraph.has-void-color { color: var(--wp--preset--color--void) !important; }
.wp-block-heading.has-deep-void-color,
.wp-block-paragraph.has-deep-void-color { color: var(--wp--preset--color--deep-void) !important; }
.wp-block-heading.has-surface-color,
.wp-block-paragraph.has-surface-color { color: var(--wp--preset--color--surface) !important; }
.wp-block-heading.has-surface-2-color,
.wp-block-paragraph.has-surface-2-color { color: var(--wp--preset--color--surface-2) !important; }
.wp-block-heading.has-cyan-color,
.wp-block-paragraph.has-cyan-color { color: var(--wp--preset--color--cyan) !important; }
.wp-block-heading.has-cyan-soft-color,
.wp-block-paragraph.has-cyan-soft-color { color: var(--wp--preset--color--cyan-soft) !important; }
.wp-block-heading.has-magenta-color,
.wp-block-paragraph.has-magenta-color { color: var(--wp--preset--color--magenta) !important; }
.wp-block-heading.has-purple-color,
.wp-block-paragraph.has-purple-color { color: var(--wp--preset--color--purple) !important; }
.wp-block-heading.has-green-color,
.wp-block-paragraph.has-green-color { color: var(--wp--preset--color--green) !important; }
.wp-block-heading.has-danger-color,
.wp-block-paragraph.has-danger-color { color: var(--wp--preset--color--danger) !important; }
.wp-block-heading.has-text-color:not(.is-style-neon-gradient-text):not(.is-style-neon-gradient-text-vertical) a {
  color: inherit !important;
  -webkit-text-fill-color: currentColor;
}
