/* ============================================================
   RobotX — Editorial Platform CSS
   Wired-style layout · Syne + Instrument Sans
   ============================================================ */

/* ─── TOKENS — LIGHT (default) ─── */
:root,
[data-theme="light"] {
  --rx-base: #ffffff;
  --rx-surface: #f5f5f7;
  --rx-surface-alt: #ebebef;
  --rx-border: #e0e0e4;
  --rx-border-hover: #c8c8cc;
  --rx-text: #111111;
  --rx-text-muted: #6b7280;
  --rx-accent: #0077b6;
  --rx-accent-dim: #0077b61a;
  --rx-accent-hover: #005a8a;
  --rx-signal: #e63356;
  --rx-radius: 2px;
  --rx-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --rx-glow: 0 0 20px #0077b611;
  --rx-card-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --rx-card-shadow-hover: 0 4px 12px rgba(0,0,0,0.1);
  --rx-header-bg: rgba(255, 255, 255, 0.92);
  --rx-font-display: 'Orbitron', sans-serif;
  --rx-font-body: 'Instrument Sans', system-ui, sans-serif;
  --rx-font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
}

/* ─── TOKENS — DARK ─── */
[data-theme="dark"] {
  --rx-base: #0a0a0a;
  --rx-surface: #111111;
  --rx-surface-alt: #1a1a1a;
  --rx-border: #2a2a2e;
  --rx-border-hover: #3a3a3e;
  --rx-text: #f0f0f0;
  --rx-text-muted: #9ca3af;
  --rx-accent: #00d4ff;
  --rx-accent-dim: #00d4ff33;
  --rx-accent-hover: #33ddff;
  --rx-signal: #ff3366;
  --rx-glow: 0 0 30px #00d4ff11;
  --rx-card-shadow: 0 1px 3px rgba(0,0,0,0.3);
  --rx-card-shadow-hover: 0 4px 12px rgba(0,0,0,0.5);
  --rx-header-bg: rgba(10, 10, 10, 0.92);
}

/* ─── RESET & BASE ─── */
* { box-sizing: border-box; }

/* Remove WP default block padding/margin */
.wp-site-blocks { padding-top: 0 !important; padding-bottom: 0 !important; }
.wp-site-blocks > .wp-block-template-part:first-child { margin-top: 0 !important; }
.wp-site-blocks > .wp-block-template-part:last-child { margin-bottom: 0 !important; }
body .is-layout-constrained > :first-child { margin-top: 0 !important; }
body .is-layout-constrained > :last-child { margin-bottom: 0 !important; }
.wp-site-blocks > * + * { margin-block-start: 0 !important; }

body {
  background: var(--rx-base) !important;
  color: var(--rx-text) !important;
  font-family: var(--rx-font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ─── DARK MODE OVERRIDES ─── */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] .wp-block-heading,
[data-theme="dark"] .wp-block-post-title,
[data-theme="dark"] .wp-block-post-title a {
  color: var(--rx-text) !important;
}

[data-theme="dark"] .wp-block-separator {
  background: var(--rx-border) !important;
  background-color: var(--rx-border) !important;
}

[data-theme="dark"] .has-text-color {
  color: var(--rx-text-muted) !important;
}

[data-theme="dark"] .has-surface-background-color {
  background-color: var(--rx-surface) !important;
}

[data-theme="dark"] .has-surface-alt-background-color {
  background-color: var(--rx-surface-alt) !important;
}

[data-theme="dark"] .has-base-background-color {
  background-color: var(--rx-base) !important;
}

[data-theme="dark"] .wp-block-code {
  background: var(--rx-surface) !important;
  color: var(--rx-accent) !important;
}

::selection {
  background: var(--rx-accent);
  color: var(--rx-base);
}

img {
  max-width: 100%;
  height: auto;
}

/* Featured images: always cover within their container */
.wp-block-post-featured-image a {
  display: block;
  width: 100%;
  height: 100%;
}

.wp-block-post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ═══════════════════════════════════════════
   TOPBAR
   ═══════════════════════════════════════════ */
.rxTopbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 120;
  height: var(--rx-topbar-h, 32px);
  background: #0a0e14;
  border-bottom: 1px solid rgba(0, 212, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.28s ease, opacity 0.22s ease;
  will-change: transform, opacity;
}

.rxTopbar__inner {
  max-width: 1400px;
  width: 100%;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rxTopbar__text {
  font-family: var(--rx-font-display);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #00d4ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0 6px rgba(0, 212, 255, 0.6), 0 0 20px rgba(0, 212, 255, 0.25);
  animation: rxGlowPulse 3s ease-in-out infinite;
}

.rxTopbar--hidden {
  transform: translateY(-100%);
  opacity: 0;
  z-index: -1;
}

/* Typewriter cursor */
.rxTopbar__text.rx-typing::after {
  content: '▌';
  display: inline;
  margin-left: 1px;
  animation: rxCursorBlink 0.6s step-end infinite;
}

footer .wp-block-navigation__container {
  flex-direction:column !important;
  align-items: flex-start;
      gap: 3px;
      padding-top: 3px!important;
}


footer .wp-block-navigation__container li a{
 font-size: 13px;
     text-transform: capitalize;
     font-family: "Instrument Sans", system-ui, sans-serif;
     font-weight: 400!important ;
     letter-spacing: 0;
}

/* Glow pulsing */
@keyframes rxGlowPulse {
  0%, 100% {
    text-shadow: 0 0 6px rgba(0, 212, 255, 0.6), 0 0 20px rgba(0, 212, 255, 0.25);
  }
  50% {
    text-shadow: 0 0 12px rgba(0, 212, 255, 0.9), 0 0 35px rgba(0, 212, 255, 0.5);
  }
}

/* Cursor blink */
@keyframes rxCursorBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@media (max-width: 600px) {
  .rxTopbar {
    height: auto;
    min-height: 34px;
    padding: 0.35rem 0;
  }
  .rxTopbar__text {
    font-size: 0.52rem;
    letter-spacing: 0.08em;
    white-space: normal;
    text-overflow: unset;
    text-align: center;
    line-height: 1.35;
  }
}

.admin-bar .rxTopbar {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .rxTopbar {
    top: 46px;
  }
}

/* ═══════════════════════════════════════════
   MOBILE SEARCH BAR (below header, mobile only)
   ═══════════════════════════════════════════ */
.rxMobileSearchBar {
  display: none;
  position: relative;
  background: var(--rx-header-bg);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid var(--rx-border);
  padding: 0.6rem 1rem;
  margin-top: 6px;
  justify-content: center;
  align-items: center;
}

.rxMobileSearchBar form {
  width: 100%;
  max-width: 480px;
}

.rxMobileSearchBar input {
  width: 100%;
  padding: 0.45rem 0.75rem;
  background: var(--rx-surface);
  border: 1px solid var(--rx-border);
  border-radius: var(--rx-radius);
  color: var(--rx-text);
  font-family: var(--rx-font-body);
  font-size: 0.8125rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.rxMobileSearchBar--hidden {
  transform: translateY(-10px);
  opacity: 0;
  pointer-events: none;
}

body.rx-menu-open .rxTopbar,
body.rx-menu-open .rxMobileSearchBar {
  opacity: 0 !important;
  pointer-events: none !important;
}

.rxMobileSearchBar input:focus {
  border-color: var(--rx-accent);
  box-shadow: var(--rx-glow);
}

.rxMobileSearchBar input::placeholder {
  color: var(--rx-text-muted);
}

/* ═══════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════ */
.rxHeader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--rx-header-bg);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-bottom: 1px solid var(--rx-border);
  transition: box-shadow 0.3s ease, padding 0.3s ease, transform 0.28s ease, top 0.2s ease;
  will-change: transform, top;
}

/* Force nav + logo on same row */
.rxHeader__left {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 2rem;
}

.rxHeader__left > .wp-block-navigation {
  flex-shrink: 0;
}

@media (min-width: 769px) {
  .rxHeader__left > .wp-block-navigation {
    margin-top: -2px;
  }
}

/* WP admin bar offset */
.admin-bar .rxHeader {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .rxHeader {
    top: 46px;
  }
}

/* Logo theme switching */
.rxHeader__logo {
  display: flex;
  align-items: center;
  text-decoration: none !important;
}

.rxHeader__logo .rxLogo {
  max-width: 150px;
  height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
}

.rxFooter__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none !important;
  margin-bottom: 1rem;
}

.rxFooter__logo .rxLogo {
  height: 17px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Light theme: show dark logo, hide light logo */
.rxLogo--light { display: none !important; }
.rxLogo--dark { display: block !important; }

/* Dark theme: show light logo, hide dark logo */
[data-theme="dark"] .rxLogo--light { display: block !important; }
[data-theme="dark"] .rxLogo--dark { display: none !important; }

.rxHeader__brand a {
  text-decoration: none !important;
}

/* Navigation */
.wp-block-navigation a {
  text-decoration: none !important;
  color: var(--rx-text-muted) !important;
  position: relative;
  transition: var(--rx-transition);
  font-weight: 700 !important;
}

.wp-block-navigation a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--rx-accent);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wp-block-navigation a:hover {
  color: var(--rx-text) !important;
}

/* Active nav link */
.wp-block-navigation-item.current-menu-item > a,
.wp-block-navigation-item.current_page_item > a {
  color: var(--rx-accent) !important;
}

.wp-block-navigation-item.current-menu-item > a::after,
.wp-block-navigation-item.current_page_item > a::after {
  width: 100%;
}

.wp-block-navigation a:hover::after {
  width: 100%;
}

/* ─── SEARCH TOGGLE ─── */
.rxSearch {
  display: flex;
  align-items: center;
  position: relative;
}

.rxSearch__toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: none;
  color: var(--rx-text-muted);
  cursor: pointer;
  transition: var(--rx-transition);
  flex-shrink: 0;
  border-radius: 50%;
}

.rxSearch__toggle:hover {
  color: var(--rx-accent);
  background: var(--rx-accent-dim);
}

.rxSearch__form {
  overflow: hidden;
  width: 0;
  opacity: 0;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.rxSearch.is-open .rxSearch__form {
  width: 220px;
  opacity: 1;
}

.rxSearch__input {
  width: 100%;
  padding: 0.4rem 0.75rem;
  background: var(--rx-surface);
  border: 1px solid var(--rx-border);
  border-radius: var(--rx-radius);
  color: var(--rx-text);
  font-family: var(--rx-font-body);
  font-size: 0.8125rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.rxSearch__input:focus {
  border-color: var(--rx-accent);
  box-shadow: var(--rx-glow);
}

.rxSearch__input::placeholder {
  color: var(--rx-text-muted);
}

/* ─── THEME TOGGLE (no border) ─── */
.rxThemeToggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--rx-text-muted);
  cursor: pointer;
  transition: var(--rx-transition);
  flex-shrink: 0;
}

.rxThemeToggle:hover {
  color: var(--rx-accent);
  background: var(--rx-accent-dim);
}

.rxThemeToggle__sun { display: none; }
.rxThemeToggle__moon { display: block; }
[data-theme="dark"] .rxThemeToggle__sun { display: block; }
[data-theme="dark"] .rxThemeToggle__moon { display: none; }

/* ═══════════════════════════════════════════
   MOBILE NAV OVERLAY
   ═══════════════════════════════════════════ */

/* Hamburger button */
.wp-block-navigation__responsive-container-open {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent !important;
  border: none !important;
  color: var(--rx-text) !important;
  cursor: pointer;
  padding: 6px;
  margin: 0;
}

.wp-block-navigation__responsive-container-open svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Overlay container */
.wp-block-navigation__responsive-container.is-menu-open {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100dvh !important;
  background: var(--rx-base) !important;
  z-index: 9999 !important;
  display: flex !important;
  flex-direction: column;
  padding: 0 !important;
  overflow-y: auto;
  animation: rxMenuSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes rxMenuSlideIn {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Close button */
.wp-block-navigation__responsive-container-close {
  position: absolute !important;
  top: 1rem;
  right: 1rem;
  background: transparent !important;
  border: none !important;
  color: var(--rx-text) !important;
  cursor: pointer;
  padding: 8px;
  z-index: 10;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--rx-transition);
}

.wp-block-navigation__responsive-container-close:hover {
  background: var(--rx-surface) !important;
  color: var(--rx-accent) !important;
}

.wp-block-navigation__responsive-container-close svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Dialog inside overlay — full width */
.wp-block-navigation__responsive-dialog {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  flex: 1;
  padding: 6px 0 0;
  min-height: 100%;
  width: 100%;
}

/* Nav links in overlay — big, editorial */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
  width: 100%;
  border-bottom: 1px solid var(--rx-border);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:first-child {
  border-top: 1px solid var(--rx-border);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a {
  display: block;
  padding: 1.25rem 1rem;
  font-family: var(--rx-font-display) !important;
  font-size: clamp(1.25rem, 5vw, 1.75rem) !important;
  font-weight: 400 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  color: var(--rx-text) !important;
  text-decoration: none !important;
  transition: color 0.2s ease, transform 0.2s ease;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a::after {
  display: none !important;
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a:hover {
  color: var(--rx-accent) !important;
  transform: none;
}

/* Override WP overlay defaults that break layout */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  flex: 1;
}

/* Mobile extras injected by JS: search + theme */
.rxMobileExtras {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  margin-top: auto;
  padding: 2rem 0;
}

.rxMobileSearch {
  width: 100%;
}

.rxMobileSearch input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--rx-surface);
  border: 1px solid var(--rx-border);
  border-radius: var(--rx-radius);
  color: var(--rx-text);
  font-family: var(--rx-font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.rxMobileSearch input:focus {
  border-color: var(--rx-accent);
  box-shadow: var(--rx-glow);
}

.rxMobileSearch input::placeholder {
  color: var(--rx-text-muted);
}

.rxMobileActions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.rxMobileThemeToggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--rx-surface);
  border: 1px solid var(--rx-border);
  border-radius: var(--rx-radius);
  color: var(--rx-text-muted);
  font-family: var(--rx-font-body);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: var(--rx-transition);
}

.rxMobileThemeToggle:hover {
  color: var(--rx-accent);
  border-color: var(--rx-accent);
}

.rxMobileThemeToggle__sun { display: none; }
.rxMobileThemeToggle__moon { display: block; }
[data-theme="dark"] .rxMobileThemeToggle__sun { display: block; }
[data-theme="dark"] .rxMobileThemeToggle__moon { display: none; }

/* Header scrolled */
.rxHeader--scrolled {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  box-shadow: var(--rx-card-shadow);
}

.rxHeader--hidden {
  transform: translateY(calc(-100% - 2px));
}

/* ═══════════════════════════════════════════
   WIRED 3-COLUMN HERO
   ═══════════════════════════════════════════ */
.rxWiredHero__cols {
  border-top: 1px solid var(--rx-text);
}

.rxWiredHero__cols > .wp-block-column {
  padding-top: 1.5rem;
}

/* Sidebar columns: left/right dividers */
.rxWiredHero__left {
  border-right: 1px solid var(--rx-border);
  padding-right: 1.5rem;
}

.rxWiredHero__right {
  border-left: 1px solid var(--rx-border);
  padding-left: 1.5rem;
}

.rxWiredHero__center {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Side cards */
.rxSideCard {
  padding-bottom: 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--rx-border);
}

.rxSideList .wp-block-post:last-child .rxSideCard {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.rxSideCard .wp-block-post-featured-image {
  overflow: hidden;
}

.rxSideCard .wp-block-post-featured-image img {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  width: 100%;
}

.rxSideCard:hover .wp-block-post-featured-image img {
  transform: scale(1.03);
}

.rxSideCard .wp-block-post-title a {
  text-decoration: none !important;
  color: var(--rx-text) !important;
  transition: var(--rx-transition);
}

.rxSideCard .wp-block-post-title a:hover {
  color: var(--rx-accent) !important;
}

/* Center lead */
.rxCenterLead__card .wp-block-post-featured-image {
  overflow: hidden;
}

.rxCenterLead__card .wp-block-post-featured-image img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  width: 100%;
}

.rxCenterLead__card:hover .wp-block-post-featured-image img {
  transform: scale(1.02);
}

.rxCenterLead__card .wp-block-post-title a {
  text-decoration: none !important;
  color: var(--rx-text) !important;
  transition: var(--rx-transition);
}

.rxCenterLead__card .wp-block-post-title a:hover {
  color: var(--rx-accent) !important;
}

/* Accent line separator */
.rxAccentLine {
  width: 60px !important;
  height: 3px !important;
  background: var(--rx-accent) !important;
  border: none !important;
  opacity: 1 !important;
}

/* ═══════════════════════════════════════════
   STORYSTREAM
   ═══════════════════════════════════════════ */
.rxStreamItem {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rx-border);
  gap: 1.5rem !important;
}

.rxStream__list .wp-block-post:first-child .rxStreamItem {
  padding-top: 0;
}

.rxStream__list .wp-block-post:last-child .rxStreamItem {
  border-bottom: none;
}

.rxStreamItem__text {
  flex: 1;
  min-width: 0;
}

.rxStreamItem__thumb {
  flex-shrink: 0 !important;
  overflow: hidden;
}

.rxStreamItem__thumb img {
  width: 180px !important;
  height: 120px !important;
  object-fit: cover;
  display: block;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.rxStreamItem:hover .rxStreamItem__thumb img {
  transform: scale(1.05);
}

.rxStreamItem .wp-block-post-title a {
  text-decoration: none !important;
  color: var(--rx-text) !important;
  transition: var(--rx-transition);
}

.rxStreamItem .wp-block-post-title a:hover {
  color: var(--rx-accent) !important;
}

/* ═══════════════════════════════════════════
   CATEGORY BLOCKS
   ═══════════════════════════════════════════ */
.rxCatBlock {
  border-top: 3px solid var(--rx-accent);
  padding-top: 1rem;
}

.rxCatItem {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rx-border);
}

.rxCatBlock__list .wp-block-post:last-child .rxCatItem {
  border-bottom: none;
}

.rxCatItem .wp-block-post-title a {
  text-decoration: none !important;
  color: var(--rx-text) !important;
  transition: var(--rx-transition);
}

.rxCatItem .wp-block-post-title a:hover {
  color: var(--rx-accent) !important;
}

/* ═══════════════════════════════════════════
   SINGLE ARTICLE
   ═══════════════════════════════════════════ */
.rxSingle__header {
  text-align: center;
}

.rxSingle__meta {
  align-items: center !important;
  text-align: center;
}

.rxSingle__hero .wp-block-post-featured-image {
  overflow: hidden;
}

.rxSingle__hero .wp-block-post-featured-image img {
  width: 100%;
  display: block;
}

/* Sidebar sticky */
.rxSingle__sidebar {
  position: sticky;
  top: 80px;
  align-self: flex-start;
}

.rxSidebar[data-sticky] {
  position: static;
}

.rxSidebar__title {
  font-family: var(--rx-font-display);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rx-accent);
  margin: 0 0 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--rx-accent);
}

.rxSidebar__item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rx-border);
}

.rxSidebar__articles .wp-block-post:last-child .rxSidebar__item {
  border-bottom: none;
}

.rxSidebar__item .wp-block-post-title a {
  text-decoration: none !important;
  color: var(--rx-text) !important;
  transition: var(--rx-transition);
}

.rxSidebar__item .wp-block-post-title a:hover {
  color: var(--rx-accent) !important;
}

/* Article content */
.rxSingle__content {
  font-size: 1.0625rem;
  line-height: 1.8;
}

.rxSingle__content p {
  color: var(--rx-text);
  margin-bottom: 1.5rem;
}

.rxSingle__content h2 {
  font-family: var(--rx-font-display);
  font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.02em;
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: var(--rx-text);
  position: relative;
  padding-left: 1rem;
}

.rxSingle__content h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.2em;
  bottom: 0.2em;
  width: 3px;
  background: var(--rx-accent);
  border-radius: 2px;
}

.rxSingle__content h3 {
  font-family: var(--rx-font-display);
  font-weight: 400;
  font-size: 1.375rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  color: var(--rx-text);
}

.rxSingle__content a {
  color: var(--rx-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: var(--rx-transition);
}

.rxSingle__content a:hover {
  color: var(--rx-accent-hover);
}

.rxSingle__content blockquote {
  border-left: 3px solid var(--rx-accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--rx-text-muted);
}

.rxSingle__content pre,
.rxSingle__content code {
  font-family: var(--rx-font-mono);
  background: var(--rx-surface);
  border: 1px solid var(--rx-border);
  border-radius: var(--rx-radius);
}

.rxSingle__content code {
  padding: 0.15em 0.4em;
  font-size: 0.875em;
  color: var(--rx-accent);
}

.rxSingle__content pre {
  padding: 1.5rem;
  overflow-x: auto;
}

.rxSingle__content pre code {
  padding: 0;
  border: none;
  background: transparent;
}

.rxSingle__content ul,
.rxSingle__content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.rxSingle__content li {
  margin-bottom: 0.5rem;
}

.rxSingle__content ul li::marker {
  color: var(--rx-accent);
}

.rxSingle__content figure {
  margin: 2rem 0;
}

.rxSingle__content figcaption {
  font-size: 0.8125rem;
  color: var(--rx-text-muted);
  margin-top: 0.5rem;
  font-family: var(--rx-font-mono);
}

.rxSingle__content img {
  border-radius: var(--rx-radius);
}

/* ═══════════════════════════════════════════
   ARTICLE CARDS (generic)
   ═══════════════════════════════════════════ */
.rxCard .wp-block-post-featured-image {
  overflow: hidden;
  border-radius: var(--rx-radius);
  box-shadow: var(--rx-card-shadow);
}

.rxCard .wp-block-post-featured-image img {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  width: 100%;
}

.rxCard:hover .wp-block-post-featured-image img {
  transform: scale(1.04);
}

.rxCard:hover .wp-block-post-featured-image {
  box-shadow: var(--rx-card-shadow-hover);
}

.rxCard .wp-block-post-title a {
  text-decoration: none !important;
  color: var(--rx-text) !important;
  transition: var(--rx-transition);
}

.rxCard .wp-block-post-title a:hover {
  color: var(--rx-accent) !important;
}

/* Category term links */
.wp-block-post-terms a {
  text-decoration: none !important;
  color: var(--rx-accent) !important;
  transition: var(--rx-transition);
}

.wp-block-post-terms a:hover {
  color: var(--rx-accent-hover) !important;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.rxFooter {
  --rx-base: #0a0a0a;
  --rx-surface: #111111;
  --rx-surface-alt: #1a1a1a;
  --rx-border: #2a2a2e;
  --rx-border-hover: #3a3a3e;
  --rx-text: #f0f0f0;
  --rx-text-muted: #9ca3af;
  --rx-accent: #00d4ff;
  --rx-accent-dim: #00d4ff33;
  --rx-accent-hover: #33ddff;
  background: var(--rx-surface) !important;
  color: var(--rx-text) !important;
}

.rxFooter .has-text-color,
.rxFooter .has-text-muted-color,
.rxFooter h4 {
  color: inherit !important;
}

.rxFooter .has-text-muted-color {
  color: var(--rx-text-muted) !important;
}

.rxFooter h4.wp-block-heading {
  color: var(--rx-text) !important;
}

.rxFooter .rxLogo--dark { display: none !important; }
.rxFooter .rxLogo--light { display: block !important; }

.rxFooter__logo img {
  height: 17px !important;
  width: auto !important;
  object-fit: contain;
  display: block;
}

.rxFooter__nav {
  list-style: none !important;
  padding-left: 0 !important;
}

.rxFooter__nav li {
  padding: 0.15rem 0;
  transition: var(--rx-transition);
  cursor: pointer;
  color: var(--rx-text-muted);
}

.rxFooter__nav li:hover {
  color: var(--rx-text);
}

/* Social links */
.rxFooter__social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.rxFooter__socialLink {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--rx-text-muted);
  background: var(--rx-surface-alt);
  transition: var(--rx-transition);
  text-decoration: none !important;
}

.rxFooter__socialLink:hover {
  color: var(--rx-accent);
  background: var(--rx-accent-dim);
}

/* ═══════════════════════════════════════════
   SEPARATOR / PAGINATION
   ═══════════════════════════════════════════ */
.wp-block-separator {
  border: none !important;
  height: 1px !important;
  background: var(--rx-border) !important;
  opacity: 1 !important;
}

.wp-block-query-pagination {
  gap: 0.5rem;
}

.wp-block-query-pagination a,
.wp-block-query-pagination .current {
  font-family: var(--rx-font-mono) !important;
  font-size: 0.8125rem !important;
  padding: 0.5rem 1rem !important;
  border: 1px solid var(--rx-border) !important;
  border-radius: var(--rx-radius) !important;
  text-decoration: none !important;
  color: var(--rx-text-muted) !important;
  transition: var(--rx-transition);
}

.wp-block-query-pagination a:hover {
  border-color: var(--rx-accent) !important;
  color: var(--rx-accent) !important;
}

.wp-block-query-pagination .current {
  background: var(--rx-accent) !important;
  color: #fff !important;
  border-color: var(--rx-accent) !important;
}

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */
@keyframes rxFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.rxSideCard,
.rxCenterLead__card,
.rxStreamItem,
.rxCatBlock,
.rxCard {
  animation: rxFadeUp 0.5s ease both;
}

.rxSideCard:nth-child(2) { animation-delay: 0.1s; }
.rxCatBlock:nth-child(2) { animation-delay: 0.1s; }
.rxCatBlock:nth-child(3) { animation-delay: 0.2s; }

/* JS reveal */
.rx-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.rx-reveal.rx-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reading progress bar */
.rx-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--rx-accent);
  z-index: 9998;
  transition: width 0.1s linear;
  pointer-events: none;
  overflow: visible;
}

.rx-progress::before {
  content: '';
  position: absolute;
  right: -8px;
  top: 50%;
  width: 13px;
  height: 13px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--rx-accent) 75%, white) 0%, var(--rx-accent) 35%, transparent 75%);
  filter: blur(0.9px);
  opacity: 0.82;
}

.rx-progress::after {
  content: '';
  position: absolute;
  right: -13px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.22) 0%, color-mix(in srgb, var(--rx-accent) 45%, transparent) 40%, transparent 72%);
  filter: blur(2.4px);
  opacity: 0.72;
}

/* ═══════════════════════════════════════════
   BLOCK COLOR OVERRIDES
   ═══════════════════════════════════════════ */
.has-base-background-color { background-color: var(--rx-base) !important; }
.has-surface-background-color { background-color: var(--rx-surface) !important; }
.has-text-color.has-text-color { color: var(--rx-text) !important; }
.has-text-muted-color.has-text-muted-color { color: var(--rx-text-muted) !important; }
.has-accent-color.has-accent-color { color: var(--rx-accent) !important; }

/* ═══════════════════════════════════════════
   NO-IMAGE FALLBACK
   ═══════════════════════════════════════════ */
.wp-block-post-featured-image {
  background: var(--rx-surface);
}

.wp-block-post-featured-image:empty::after {
  content: '◆';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 16/10;
  font-size: 2rem;
  color: var(--rx-border);
  font-family: var(--rx-font-display);
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

/* Tablet */
@media (max-width: 1024px) {
  /* Hero: stack 3 columns */
  .rxWiredHero__cols {
    flex-direction: column !important;
  }

  .rxWiredHero__cols > .wp-block-column {
    flex-basis: 100% !important;
  }

  .rxWiredHero__left,
  .rxWiredHero__right {
    border-left: none;
    border-right: none;
    padding-left: 0;
    padding-right: 0;
    border-bottom: 1px solid var(--rx-border);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .rxWiredHero__center {
    padding-left: 0;
    padding-right: 0;
  }

  /* Side lists: horizontal on tablet */
  .rxSideList .wp-block-post-template {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .rxSideCard {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
  }

  /* Category blocks stack */
  .rxCatSections .wp-block-columns {
    flex-direction: column !important;
  }

  /* Single article: stack sidebar below */
  .rxSingle__cols {
    flex-direction: column !important;
  }

  .rxSingle__cols > .wp-block-column {
    flex-basis: 100% !important;
  }

  .rxSingle__sidebar,
  .rxSidebar[data-sticky] {
    position: static;
    top: auto;
    align-self: auto;
  }

  /* Grid tweaks */
  .wp-block-post-template.is-layout-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .rxSideList .wp-block-post-template {
    grid-template-columns: 1fr !important;
  }

  .rxRelatedGrid .wp-block-post-template {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .rxFooter .wp-block-columns {
    flex-direction: column !important;
    gap: 2rem !important;
  }

  .rxFooter .wp-block-column {
    flex-basis: 100% !important;
  }

  .rxHeader__left {
    flex: 1 1 100% !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
    gap: 0.5rem !important;
  }

  .rxHeader__left .wp-block-navigation__responsive-container-open {
    margin-left: auto;
  }

  /* Hide desktop actions on mobile — search + theme toggle live in overlay */
  .rxHeader__actions {
    display: none !important;
  }

  .rxMobileSearchBar {
    display: flex !important;
    position: fixed;
    left: 0;
    right: 0;
    z-index: 110;
    margin-top: 0;
  }

  .wp-block-navigation__responsive-dialog {
    padding: 70px 0 0 !important;
  }

  .wp-block-navigation a {
    text-align: center;
    width: 100%;
  }

  .rxHeader__logo .rxLogo {
    max-height: 42px !important;
  }

  /* Wired hero on mobile */
  .rxWiredHero__lead h2 {
    font-size: clamp(1.5rem, 6vw, 2rem) !important;
  }

  /* Single article */
  .rxSingle__header h1 {
    font-size: clamp(1.5rem, 6vw, 2.25rem) !important;
  }

  /* Single meta: stack vertically on mobile */
  .rxSingle__header .is-content-justification-center.is-layout-flex {
    flex-direction: column !important;
    gap: 0.5rem !important;
  }

  .rxSingle__header .wp-block-post-author-name {
    font-size: 0.625rem !important;
  }

  .rxSingle__hero img {
    aspect-ratio: 16/9 !important;
  }

  /* Footer compact */
  .rxFooter {
    padding: 2rem 1rem !important;
  }

  .rxFooter__social a {
    width: 40px;
    height: 40px;
  }

}

@media (max-width: 480px) {
  body {
    font-size: 0.9375rem;
  }

  .rxHeader {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .rxHeader__logo .rxLogo {
    max-height: 30px !important;
  }

  /* Category section titles */
  .rxCatBlock h3 {
    font-size: 1.125rem !important;
  }

  /* Stream items */
  .rxStreamItem {
    gap: 0.75rem !important;
            flex-direction: column;
        align-items: flex-start;
  }

  .rxStreamItem__thumb{
        width: 100% !important;
    height: auto !important;
    object-fit: cover;
  }

  .rxStreamItem__thumb img {
    width: 100% !important;
    height: auto !important;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
  .rxStreamItem__title {
    font-size: 0.875rem !important;
  }

  /* Single article body */
  .rxSingle__content {
    font-size: 1rem !important;
  }

  /* Sidebar padding */
  .rxSidebar {
    padding: 1.25rem !important;
  }

  /* Related articles */
  .rxRelated {
    padding: 2rem 0 !important;
  }
}

/* Grid gap */
.wp-block-post-template.is-layout-grid {
  gap: 2rem !important;
}

@media (max-width: 640px) {
  .wp-block-post-template.is-layout-grid {
    grid-template-columns: 1fr !important;
  }
}

/* ═══════════════════════════════════════════
   ABOUT SECTION  (Perché Robotx)
   ═══════════════════════════════════════════ */
.rxAbout {
  --rx-about-home-radius: 20px;
  --rx-robot-hero-img: url('/wp-content/themes/robotx-child/assets/images/robot-black.png');
  position: relative;
  background: var(--rx-base);
}

.rxAbout::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--rx-border);
}

.home .rxAbout::after {
  content: none;
}

.home .rxAbout > * {
  position: relative;
  z-index: 1;
}

.rxAbout .wp-block-columns {
  align-items: stretch;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

.rxAbout .wp-block-column:first-child {
  padding: clamp(1.25rem, 2.2vw, 2rem) !important;
  text-align: center;
  flex-basis: 100% !important;
}

.rxAbout .wp-block-column:last-child {
  background: transparent;
  padding: clamp(0.8rem, 1.2vw, 1.15rem) !important;
  display: none !important;
}

.rxAbout .wp-block-heading {
  font-family: var(--rx-font-body) !important;
  font-weight: 700 !important;
  letter-spacing: -0.03em !important;
}

.rxAbout .wp-block-buttons {
  margin-top: 1.25rem !important;
  justify-content: center;
}

/* Unified button system */
.wp-block-buttons {
  gap: 0.72rem;
}

.wp-block-button .wp-block-button__link {
  border-radius: 999px !important;
  border: 1px solid transparent;
  font-family: var(--wp--preset--font-family--mono) !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  padding: 0.78rem 1.45rem !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link {
  background: linear-gradient(120deg, #0048ff 0%, #1683ff 44%, #4dc0ff 100%) !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(24, 120, 255, 0.34);
}

.wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 12px 28px rgba(34, 136, 255, 0.4);
}

.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent !important;
  color: var(--rx-text) !important;
  border-color: var(--rx-border) !important;
  box-shadow: none !important;
}

[data-theme="dark"] .wp-block-button.is-style-outline .wp-block-button__link {
  border-color: color-mix(in srgb, var(--rx-border) 84%, #fff 16%) !important;
}

.rxAbout .wp-block-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: grayscale(10%) contrast(1.04);
  transition: filter 0.35s ease, transform 0.35s ease;
}
.rxAbout .wp-block-image img:hover {
  filter: grayscale(0) contrast(1);
  transform: scale(1.015);
}

[data-theme="dark"] .rxAbout .wp-block-columns {
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
}

[data-theme="dark"] .rxAbout {
  --rx-robot-hero-img: url('/wp-content/themes/robotx-child/assets/images/robot-white.png');
}

/* Front page: tighten gap under header before first hero section */
.home .rxHome > .wp-block-separator:first-child {
  margin-top: 0 !important;
  margin-bottom: 0.5rem !important;
}

.home .rxHome > .rxAbout {
  padding-top: 1.75rem !important;
}

/* Safety: if WP/editor injects a nested rxHome wrapper, flatten it */
.home .rxHome > .wp-block-group.rxHome {
  margin: 0 !important;
  padding: 0 !important;
}

/* Home: restore comfortable side gutters after hero block */
.home .rxHome > .rxStream,
.home .rxHome > .rxCatSections,
.home .rxHome > .rxTopics,
.home .rxHome > .rxQuote,
.home .rxHome > .rxWiredHero {
  padding-left: clamp(1rem, 2vw, 1.5rem) !important;
  padding-right: clamp(1rem, 2vw, 1.5rem) !important;
}

/* Center title + excerpt only inside About page layout */
.rxAboutPage .wp-block-post-title,
.rxAboutPage .wp-block-post-excerpt {
  text-align: center !important;
  margin-left: auto;
  margin-right: auto;
}

.rxAboutPage .wp-block-post-excerpt {
  max-width: 74ch;
}

@media (max-width: 768px) {
  .rxAbout .wp-block-columns {
    flex-direction: column-reverse !important;
    border-radius: 16px;
  }
  .rxAbout .wp-block-column {
    flex-basis: 100% !important;
    padding: 1rem !important;
  }
  .rxAbout .wp-block-image {
    margin-bottom: 1.5rem;
    min-height: 220px;
  }
}

/* ═══════════════════════════════════════════
   TOPICS GRID  (Di cosa parliamo)
   ═══════════════════════════════════════════ */
.rxTopics__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.rxTopicCard {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  background: var(--rx-surface);
  border: 1px solid var(--rx-border);
  border-radius: 2px;
  text-decoration: none;
  color: inherit;
  position: relative;
  cursor: pointer;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
/* Reset WordPress block-group spacing inside grid & cards */
.rxTopics__grid.wp-block-group > *,
.rxTopicCard.wp-block-group > * {
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
}
.rxTopicCard__title a {
  text-decoration: none;
  color: inherit;
}
.rxTopicCard__title a::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
}
.rxTopicCard:hover {
  border-color: var(--rx-accent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
[data-theme="dark"] .rxTopicCard:hover {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.rxTopicCard__icon {
  width: 1.8rem;
  height: 1.8rem;
  margin-bottom: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rx-accent);
}

.rxTopicCard__icon svg {
  width: 100%;
  height: 100%;
  display: block;
  stroke: currentColor;
  fill: none;
}

.rxTopicCard__title {
  font-family: var(--wp--preset--font-family--display, 'Orbitron', sans-serif);
  font-size: 1.0625rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem 0;
  color: var(--rx-text);
}

.rxTopicCard__desc {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--rx-text-muted);
  margin: 0;
  flex: 1;
}

@media (max-width: 1024px) {
  .rxTopics__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .rxTopics__grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .rxTopicCard {
    padding: 1.25rem;
  }
}

/* ═══════════════════════════════════════════
   QUOTE SECTION
   ═══════════════════════════════════════════ */
.rxQuote__figure {
  text-align: center;
  margin: 0;
}
/* Reset native wp-block-quote defaults */
.rxQuote__figure.wp-block-quote {
  border: none;
  padding: 0;
  quotes: none;
}
.rxQuote__text {
  font-family: var(--wp--preset--font-family--display, 'Orbitron', sans-serif);
  font-size: clamp(1.25rem, 3vw, 1.875rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.45;
  letter-spacing: -0.02em;
  color: var(--rx-text);
  border: none;
  margin: 0 0 1.5rem 0;
  padding: 0;
  quotes: none;
}
.rxQuote__figure cite {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-family: var(--wp--preset--font-family--mono, 'JetBrains Mono', monospace);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rx-text-muted);
  font-style: normal;
}
.rxQuote__figure cite strong {
  color: var(--rx-accent);
  font-weight: 700;
}

/* ═══════════════════════════════════════════
   H1/H2 LASER IN-VIEW EFFECT
   ═══════════════════════════════════════════ */
.rxHeadingLaser {
  position: relative;
  transition: text-shadow 0.25s ease;
}

.rxHeadingLaser::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -0.08em;
  height: 2px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, transparent 0%, var(--rx-accent) 18%, #ffffff 52%, var(--rx-accent) 82%, transparent 100%);
  opacity: 0;
  filter: blur(0.2px);
}

.rxHeadingLaser.is-inview {
  animation: rxHeadingGlowFast 0.75s ease-out 1;
}

.rxHeadingLaser.is-inview::after {
  opacity: 1;
  animation: rxHeadingLineFast 0.65s cubic-bezier(0.16, 1, 0.3, 1) 1 forwards;
}

@keyframes rxHeadingGlowFast {
  0% {
    text-shadow: 0 0 0 rgba(0, 212, 255, 0);
  }
  40% {
    text-shadow: 0 0 10px color-mix(in srgb, var(--rx-accent) 70%, transparent), 0 0 20px color-mix(in srgb, var(--rx-accent) 35%, transparent);
  }
  100% {
    text-shadow: 0 0 0 rgba(0, 212, 255, 0);
  }
}

@keyframes rxHeadingLineFast {
  0% {
    transform: scaleX(0);
    opacity: 0.2;
  }
  70% {
    transform: scaleX(1);
    opacity: 0.95;
  }
  100% {
    transform: scaleX(1);
    opacity: 0.45;
  }
}

/* ═══════════════════════════════════════════
   CATEGORY PAGE — SIDEBAR LAYOUT
   ═══════════════════════════════════════════ */
.rxCategory__body {
  align-items: flex-start;
}

.rxCategory__sidebar {
  border-left: 1px solid var(--rx-border);
  padding-left: 2rem !important;
}

.rxCategory__sidebar .rxSidebar__articles {
  margin-top: -0.75rem;
}

@media (max-width: 768px) {
  .rxCategory__body {
    flex-direction: column !important;
  }
  .rxCategory__body > .wp-block-column {
    flex-basis: 100% !important;
  }
  .rxCategory__sidebar {
    border-left: none;
    border-top: 1px solid var(--rx-border);
    padding-left: 0 !important;
    padding-top: 2rem;
    margin-top: 1rem;
  }
  .rxCategory__sidebar .rxSidebar[data-sticky] {
    position: static;
  }
}

/* ═══════════════════════════════════════════
   ABOUT PAGE (Chi Siamo / Il Progetto)
   ═══════════════════════════════════════════ */
.rxAboutPage {
  --rx-about-radius: 20px;
  --rx-about-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
  --rx-robot-hero-img: url('/wp-content/themes/robotx-child/assets/images/robot-black.png');
}

.rxAboutPage__hero {
  position: relative;
  text-align: center;
  background: var(--rx-base);
}

.rxAboutPage__hero::before {
  content: none;
}

.rxAboutPage__hero::after {
  content: '';
  position: absolute;
  left: 2rem;
  right: 2rem;
  bottom: 0;
  height: 1px;
  background: var(--rx-border);
}

.rxAboutPage__hero > * {
  position: relative;
  z-index: 1;
}

.rxAboutPage__hero .wp-block-post-title {
  font-family: var(--rx-font-body) !important;
  font-weight: 700 !important;
  letter-spacing: -0.035em !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.rxAboutPage__hero > p:last-child {
  max-width: 74ch;
  margin-left: auto;
  margin-right: auto;
}

.rxAboutPage__kpiCard {
  border: 1px solid var(--rx-border);
  background: color-mix(in srgb, var(--rx-surface) 88%, #fff 12%);
  border-radius: var(--rx-about-radius);
  box-shadow: var(--rx-about-shadow);
  padding: 1.15rem 1.2rem;
  min-height: 100%;
}

.rxAboutPage__icon {
  width: 1.45rem;
  height: 1.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rx-accent);
  margin-bottom: 0.7rem;
}

.rxAboutPage__icon svg,
.rxAboutPage__listIcon svg,
.rxAboutPage__ctaIcon svg {
  width: 100%;
  height: 100%;
  display: block;
  stroke: currentColor;
  fill: none;
}

.rxAboutPage__kpiCard p:first-child {
  font-family: var(--rx-font-body) !important;
  font-size: clamp(1.1rem, 2vw, 1.35rem) !important;
  font-weight: 700 !important;
  letter-spacing: -0.015em !important;
}

.rxAboutPage__body .wp-block-columns {
  align-items: stretch;
}

.rxAboutPage__contentCard {
  border: 1px solid var(--rx-border);
  background: var(--rx-base);
  border-radius: var(--rx-about-radius);
  box-shadow: var(--rx-about-shadow);
  padding: clamp(1.25rem, 2vw, 2rem);
}

.rxAboutPage__contentCard p {
  font-size: 1.02rem;
  line-height: 1.82;
  color: var(--rx-text-muted);
  max-width: 70ch;
  margin-left: auto;
  margin-right: auto;
}

.rxAboutPage__contentCard > * + * {
  margin-top: 0.95rem;
}

.rxAboutPage__contentCard h2,
.rxAboutPage__contentCard h3 {
  font-family: var(--rx-font-body);
  color: var(--rx-text);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.rxAboutPage__sideCard {
  border: 1px solid var(--rx-border);
  background: color-mix(in srgb, var(--rx-surface) 92%, #fff 8%);
  border-radius: var(--rx-about-radius);
  box-shadow: var(--rx-about-shadow);
  padding: 1.25rem 1.15rem;
  position: sticky;
  top: 120px;
}

.rxAboutPage__sideCard .wp-block-heading {
  font-family: var(--rx-font-body) !important;
  font-weight: 700 !important;
}

.rxAboutPage__list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.rxAboutPage__list li {
  display: grid;
  grid-template-columns: 1.05rem 1fr;
  align-items: start;
  gap: 0.55rem;
}

.rxAboutPage__listIcon {
  width: 1.05rem;
  height: 1.05rem;
  color: var(--rx-accent);
  margin-top: 0.2rem;
}

.rxAboutPage__cta {
  border: 1px solid var(--rx-border);
  border-radius: var(--rx-about-radius);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--rx-surface) 86%, #fff 14%), var(--rx-surface));
  box-shadow: var(--rx-about-shadow);
  padding: 1.35rem 1.4rem;
}

.rxAboutPage__ctaIcon {
  width: 0.72rem;
  height: 0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rx-accent);
  margin-top: 0.1rem;
}

.rxAboutPage__cta .wp-block-heading {
  font-family: var(--rx-font-body) !important;
  font-weight: 700 !important;
  letter-spacing: -0.025em !important;
}

.rxAboutPage__cta .wp-block-button__link {
  border-radius: 999px !important;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--rx-accent) 30%, transparent);
}

/* Il Progetto: layout refinement (Google AI Studio-inspired balance) */
.rxProjectPage .rxAboutPage__kpiWrap,
.rxProjectPage .rxAboutPage__body,
.rxProjectPage .rxAboutPage__ctaWrap {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
}

.rxProjectPage .rxAboutPage__kpi {
  gap: 1.15rem !important;
}

.rxProjectPage .rxAboutPage__kpiCard {
  padding: 1.35rem 1.35rem 1.2rem;
  border-radius: 18px;
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--rx-surface) 95%, #fff 5%),
    color-mix(in srgb, var(--rx-surface) 90%, #eef4ff 10%)
  );
}

.rxProjectPage .rxAboutPage__kpiCard p:first-of-type {
  font-size: clamp(1.06rem, 1.7vw, 1.22rem) !important;
  letter-spacing: -0.018em !important;
  margin-bottom: 0.35rem;
}

.rxProjectPage .rxAboutPage__kpiCard p:last-of-type {
  font-size: 0.83rem !important;
  line-height: 1.58;
}

.rxProjectPage .rxAboutPage__body .wp-block-columns {
  gap: 2.5rem !important;
  align-items: flex-start;
}

.rxProjectPage .rxAboutPage__contentCard {
  border-radius: 22px;
  padding: clamp(1.55rem, 2.35vw, 2.5rem);
  background: color-mix(in srgb, var(--rx-base) 96%, #fff 4%);
}

.rxProjectPage .rxAboutPage__contentCard > * {
  max-width: 74ch;
  margin-left: 0;
  margin-right: 0;
}

.rxProjectPage .rxAboutPage__contentCard p {
  font-size: 1.03rem;
  line-height: 1.88;
  color: var(--rx-text-muted);
}

.rxProjectPage .rxAboutPage__contentCard p:first-of-type {
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  line-height: 1.82;
  color: var(--rx-text);
}

.rxProjectPage .rxAboutPage__contentCard h2,
.rxProjectPage .rxAboutPage__contentCard h3 {
  font-family: var(--rx-font-body);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.2;
  margin-top: 1.4rem;
}

.rxProjectPage .rxAboutPage__sideCard {
  border-radius: 22px;
  padding: 1.35rem 1.2rem;
  background: linear-gradient(
    175deg,
    color-mix(in srgb, var(--rx-surface) 95%, #fff 5%),
    color-mix(in srgb, var(--rx-surface) 88%, #ecf3ff 12%)
  );
  box-shadow: 0 10px 30px rgba(8, 20, 38, 0.08);
}

.rxProjectPage .rxAboutPage__list {
  display: grid;
  gap: 0.72rem;
}

.rxProjectPage .rxAboutPage__list li {
  gap: 0.6rem;
  padding-bottom: 0.62rem;
  border-bottom: 1px solid color-mix(in srgb, var(--rx-border) 85%, transparent);
}

.rxProjectPage .rxAboutPage__list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.rxProjectPage .rxAboutPage__cta {
  border-radius: 22px;
  padding: 1.5rem 1.6rem;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--rx-surface) 92%, #fff 8%),
    color-mix(in srgb, var(--rx-surface) 84%, #edf4ff 16%)
  );
}

.rxProjectPage .rxAboutPage__cta .wp-block-heading {
  max-width: 24ch;
  line-height: 1.12;
}

/* Chi Siamo: card layout refinement */
.rxWhoPage .rxAboutPage__kpiWrap,
.rxWhoPage .rxAboutPage__body,
.rxWhoPage .rxAboutPage__ctaWrap {
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
}

.rxWhoPage .rxAboutPage__kpi {
  gap: 1.2rem !important;
}

.rxWhoPage .rxAboutPage__kpiCard,
.rxWhoPage .rxAboutPage__contentCard,
.rxWhoPage .rxAboutPage__sideCard,
.rxWhoPage .rxAboutPage__cta {
  border-radius: 30px;
  border: 1px solid rgba(65, 118, 236, 0.28);
  background:
    radial-gradient(120% 130% at 85% 18%, rgba(47, 125, 255, 0.23), transparent 48%),
    linear-gradient(120deg, rgba(6, 14, 46, 0.98), rgba(5, 10, 34, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(154, 193, 255, 0.14),
    0 18px 50px rgba(4, 8, 28, 0.46);
}

.rxWhoPage .rxAboutPage__kpiCard {
  padding: 1.5rem 1.4rem 1.3rem;
}

.rxWhoPage .rxAboutPage__contentCard {
  padding: clamp(1.55rem, 2.5vw, 2.8rem);
}

.rxWhoPage .rxAboutPage__sideCard {
  padding: 1.45rem 1.25rem;
}

.rxWhoPage .rxAboutPage__cta {
  padding: 1.55rem 1.7rem;
}

.rxWhoPage .rxAboutPage__kpiCard p,
.rxWhoPage .rxAboutPage__contentCard p,
.rxWhoPage .rxAboutPage__contentCard h2,
.rxWhoPage .rxAboutPage__contentCard h3,
.rxWhoPage .rxAboutPage__sideCard .wp-block-heading,
.rxWhoPage .rxAboutPage__list li,
.rxWhoPage .rxAboutPage__cta .wp-block-heading {
  color: #f4f8ff !important;
}

.rxWhoPage .rxAboutPage__kpiCard p:last-child,
.rxWhoPage .rxAboutPage__contentCard p,
.rxWhoPage .rxAboutPage__list li {
  color: rgba(224, 235, 255, 0.85) !important;
}

.rxWhoPage .rxAboutPage__icon,
.rxWhoPage .rxAboutPage__listIcon,
.rxWhoPage .rxAboutPage__ctaIcon {
  color: #7fc0ff;
}

.rxWhoPage .rxAboutPage__list li {
  border-bottom: 1px solid rgba(130, 169, 255, 0.25);
  padding-bottom: 0.62rem;
}

.rxWhoPage .rxAboutPage__list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

[data-theme="dark"] .rxProjectPage .rxAboutPage__kpiCard,
[data-theme="dark"] .rxProjectPage .rxAboutPage__sideCard,
[data-theme="dark"] .rxProjectPage .rxAboutPage__cta {
  background: linear-gradient(
    150deg,
    color-mix(in srgb, var(--rx-surface) 93%, #0c1018 7%),
    color-mix(in srgb, var(--rx-surface) 84%, #0d1828 16%)
  );
}

[data-theme="dark"] .rxAboutPage {
  --rx-about-shadow: 0 8px 26px rgba(0, 0, 0, 0.35);
  --rx-robot-hero-img: url('/wp-content/themes/robotx-child/assets/images/robot-white.png');
}

[data-theme="dark"] .rxAboutPage__kpiCard,
[data-theme="dark"] .rxAboutPage__sideCard,
[data-theme="dark"] .rxAboutPage__cta {
  background: color-mix(in srgb, var(--rx-surface) 94%, #111 6%);
}

/* Hero visual image section (full screen) */
.rxHeroVisual {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  height: 100vh;
  min-height: 540px;
  max-height: 1080px;
  --rx-hero-translate-x: 0px;
  --rx-hero-translate-y: 0px;
  --rx-hero-rotate: -0.25deg;
}

.rxHeroVisual::after {
  content: '';
  position: absolute;
  inset: -4%;
  z-index: -1;
  background-image: url('/wp-content/themes/robotx-child/assets/images/Gemini_Generated_Image_e68jjle68jjle68j.jpg');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  transform: translate3d(var(--rx-hero-translate-x), var(--rx-hero-translate-y), 0) rotate(var(--rx-hero-rotate)) scale(1.045);
  transform-origin: 50% 50%;
  will-change: transform;
}

.rxHeroVisual--home {
  position: relative;
  display: grid;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
}

.rxHeroVisual--home::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 520px at 12% 8%, rgba(0, 65, 140, 0.32), transparent 60%),
    linear-gradient(115deg, rgba(4, 10, 20, 0.72) 0%, rgba(5, 14, 28, 0.52) 45%, rgba(6, 16, 30, 0.2) 100%);
  z-index: 0;
  pointer-events: none;
}

.rxHeroVisual--home .rxHeroOverlay {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.rxHeroVisual--home .wp-block-buttons {
  justify-content: center;
}

.rxHeroVisual--home .rxHeroOverlay__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  color: #9fd1ff !important;
}

/* Image heroes: keep overlay text white on both light/dark themes */
.rxHeroVisual .rxHeroOverlay__title,
.rxHeroVisual .rxHeroOverlay__desc,
.rxHeroVisual .rxHeroOverlay__meta {
  color: #fff !important;
}

.rxHeroVisual--home .rxHeroOverlay__kicker::before {
  content: '';
  width: 1.7rem;
  height: 1px;
  background: currentColor;
  opacity: 0.85;
}

.rxHeroVisual--home .rxHeroOverlay__title,
.rxHeroVisual--home .rxHeroOverlay__desc {
  text-wrap: balance;
}

.rxHeroVisual--home .rxHeroOverlay__title {
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.rxHeroVisual--home .rxHeroOverlay__desc {
  max-width: 58ch;
  margin-left: auto;
  margin-right: auto;
  color: rgba(243, 247, 255, 0.94) !important;
}

.rxHeroVisual--home .wp-block-button__link {
  border-radius: 999px !important;
  border: 1px solid rgba(123, 190, 255, 0.52);
  background: linear-gradient(120deg, #0057ff 0%, #1698ff 48%, #57cbff 100%) !important;
  backdrop-filter: blur(8px);
  color: #f7fbff !important;
  box-shadow: 0 12px 28px rgba(20, 115, 255, 0.42);
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.rxHeroVisual--home .wp-block-button__link:hover {
  transform: translateY(-1px) scale(1.01);
  background: linear-gradient(120deg, #0a63ff 0%, #24a0ff 48%, #6ad2ff 100%) !important;
  border-color: rgba(158, 215, 255, 0.66);
  box-shadow: 0 14px 30px rgba(34, 128, 255, 0.48);
}

.rxHeroVisual--page {
  position: relative;
  display: grid;
  align-items: end;
  isolation: isolate;
  overflow: hidden;
}

.rxHeroVisual--page::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(8, 12, 20, 0.3) 0%, rgba(8, 12, 20, 0.06) 20%, rgba(8, 12, 20, 0.08) 56%, rgba(8, 12, 20, 0.72) 100%),
    radial-gradient(920px 380px at 16% 94%, rgba(8, 16, 28, 0.45), transparent 60%);
}

.rxHeroVisual--page .rxHeroOverlay__meta {
  position: absolute;
  top: 1.4rem;
  right: 1.5rem;
  z-index: 2;
  margin: 0;
  opacity: 0.8;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.32);
}

.rxHeroVisual--page .rxHeroOverlay--page {
  position: relative;
  z-index: 2;
  margin-left: 0 !important;
  margin-right: auto !important;
  padding: clamp(1.2rem, 3vw, 2rem) clamp(1.2rem, 3vw, 2rem) clamp(1.8rem, 4vw, 2.7rem);
}

.rxHeroVisual--page .rxHeroOverlay__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.95;
}

.rxHeroVisual--page .rxHeroOverlay__kicker::before {
  content: '';
  width: 1.55rem;
  height: 1px;
  background: currentColor;
  opacity: 0.8;
}

.rxHeroVisual--page .rxHeroOverlay__title {
  margin-left: 0 !important;
  margin-right: 0 !important;
  text-wrap: balance;
  text-shadow: 0 14px 36px rgba(0, 0, 0, 0.45);
}

.rxHeroVisual--page .rxHeroOverlay__desc {
  margin-left: 0 !important;
  margin-right: 0 !important;
  max-width: 56ch;
  color: rgba(245, 248, 255, 0.96) !important;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.38);
}

@media (max-width: 1024px) {
  .rxAboutPage__kpi {
    flex-wrap: wrap !important;
  }
}

@media (max-width: 900px) {
  .rxAboutPage__sideCard {
    position: static;
    top: auto;
  }

  .rxProjectPage .rxAboutPage__body .wp-block-columns {
    gap: 1.3rem !important;
  }
}

@media (max-width: 600px) {
  .rxAboutPage__hero,
  .rxAboutPage__kpiWrap,
  .rxAboutPage__body,
  .rxAboutPage__ctaWrap {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .rxAboutPage__contentCard {
    padding: 1.25rem;
  }

  .home .rxAbout::after,
  .rxAboutPage__hero::before {
    content: none;
  }

  .rxAboutPage__cta {
    padding: 1rem 1rem 1.15rem;
    gap: 0.8rem !important;
  }

  .rxHeroVisual {
    min-height: 500px;
    --rx-hero-rotate: -0.15deg;
  }

  .rxHeroVisual--home {
    align-items: end;
  }

  .rxHeroVisual--home .rxHeroOverlay {
    text-align: left;
    padding-bottom: 1.2rem;
  }

  .rxHeroVisual--home .rxHeroOverlay__desc {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
  }

  .rxHeroVisual--home .rxHeroOverlay__kicker::before {
    width: 1.3rem;
  }

  .rxHeroVisual--page .rxHeroOverlay__meta {
    top: 1rem;
    right: 1rem;
    font-size: 0.66rem !important;
  }

  .rxHeroVisual--page .rxHeroOverlay--page {
    padding: 1rem 1rem 1.35rem;
  }

  .rxHeroVisual--page .rxHeroOverlay__kicker::before {
    width: 1.2rem;
  }

  .rxHeroVisual--page .rxHeroOverlay__desc {
    max-width: 100%;
    font-size: 0.98rem !important;
    line-height: 1.6 !important;
  }

  .rxProjectPage .rxAboutPage__contentCard {
    border-radius: 16px;
    padding: 1.1rem;
  }

  .rxProjectPage .rxAboutPage__sideCard,
  .rxProjectPage .rxAboutPage__cta,
  .rxProjectPage .rxAboutPage__kpiCard {
    border-radius: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rxHeroVisual::after {
    transform: none !important;
    transition: none !important;
  }
}

/* ═══════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--rx-base); }
::-webkit-scrollbar-thumb { background: var(--rx-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--rx-text-muted); }

/* ═══════════════════════════════════════════
   FOCUS / PRINT
   ═══════════════════════════════════════════ */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--rx-accent);
  outline-offset: 2px;
}

@media print {
  .rxHeader, .rxFooter, .rxRelated, .rxThemeToggle, .rx-progress { display: none !important; }
  body { background: white !important; color: black !important; }
}
