/* =======================
   UNNS EMERGENCY RECOVERY
   ======================= */

/* Restore Cassiopeia container structure */
body, body.site {
    position: relative !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow-x: hidden !important;
}

/* Neutralize all broken body::after overrides */
body::after {
    content: "" !important;
    display: none !important;
}

/* Prevent duplicated global resets from overwriting layout */
html, body {
    max-width: 100vw !important;
    width: 100% !important;
}

/* ═══════════════════════════════════════════════════════════
   UNNS.tech — Full Aesthetic Integration (FORCEFUL VERSION)
   ═══════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────
   Primary Body Styles - FORCEFUL OVERRIDE
   ───────────────────────────────────────────────────────── */
body,
body.site {
  /* Background Image with Parallax - FORCED */
  background-image: url('https://unns.tech/images/background/unns_background_1.png') !important;
  background-size: cover !important;
  background-position: center center !important;
  background-attachment: scroll !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-color: #0a0e27 !important;
  
  /* Typography & Color */
  color: #d8d8e8 !important;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
  line-height: 1.7;
  
  /* Smooth page fade-in */
  animation: pageFadeIn 1s ease forwards;
}

@keyframes pageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Dark overlay for text contrast + subtle pulse effect */
body::before {
  content: "" !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background: radial-gradient(
    circle at center, 
    rgba(10, 14, 39, 0.3), 
    rgba(10, 14, 39, 0.6)
  ) !important;
  z-index: -1 !important;
  pointer-events: none !important;
  animation: substratePulse 12s ease-in-out infinite;
}

@keyframes substratePulse {
  0%, 100% { opacity: 0.95; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.1); }
}

/* ─────────────────────────────────────────────────────────
   Header Rebranding - FORCEFUL APPROACH
   ───────────────────────────────────────────────────────── */
.container-header,
header.header {
  background: rgba(15, 20, 50, 0.8) !important;
  border-bottom: 2px solid rgba(140, 150, 255, 0.3) !important;
  box-shadow: 0 0 30px rgba(100, 100, 255, 0.15) !important;
  backdrop-filter: blur(10px) !important;
  padding: 1.5rem 2rem !important;
}

/* HIDE original site title completely */
.container-header .site-title,
.header .site-title,
.site-title {
  visibility: hidden !important;
  position: relative !important;
  font-size: 0 !important;
}

/* ADD UNNS.tech as pseudo-element */
.container-header .site-title::before,
.header .site-title::before,
.site-title::before {
  content: "UNNS.tech" !important;
  visibility: visible !important;
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  font-size: 2.5rem !important;
  font-weight: 700 !important;
  color: #aab4ff !important;
  text-shadow: 0 0 25px rgba(170, 180, 255, 0.7), 
               0 0 50px rgba(170, 180, 255, 0.3) !important;
  letter-spacing: 0.15em !important;
  animation: titleGlow 4s ease-in-out infinite;
}

@keyframes titleGlow {
  0%, 100% { text-shadow: 0 0 20px rgba(170, 180, 255, 0.5), 0 0 40px rgba(170, 180, 255, 0.2); }
  50% { text-shadow: 0 0 30px rgba(170, 180, 255, 0.9), 0 0 60px rgba(170, 180, 255, 0.4); }
}

/* ─────────────────────────────────────────────────────────
   Breadcrumbs Enhancement
   ───────────────────────────────────────────────────────── */
.breadcrumb,
.breadcrumbs,
nav[aria-label="breadcrumb"] {
  background: rgba(20, 25, 60, 0.6) !important;
  padding: 0.8rem 1.5rem !important;
  border-radius: 8px !important;
  border: 1px solid rgba(140, 150, 255, 0.2) !important;
  margin: 1rem 0 !important;
  backdrop-filter: blur(6px) !important;
}

.breadcrumb-item,
.breadcrumbs span,
.breadcrumbs a,
.breadcrumb a {
  color: #b0b8ff !important;
  font-size: 0.95rem !important;
  text-shadow: 0 0 8px rgba(180, 180, 255, 0.3) !important;
}

.breadcrumb-item.active {
  color: #d0d4ff !important;
  font-weight: 500 !important;
}

.breadcrumb-item + .breadcrumb-item::before {
  color: #7080ff !important;
  content: "→" !important;
  padding: 0 0.5rem !important;
}

/* ─────────────────────────────────────────────────────────
   Content Container — Enhanced Contrast
   ───────────────────────────────────────────────────────── */
.container-fluid,
.container,
#sp-main-body,
.com-content,
main,
.container-component {
  background: rgba(8, 12, 35, 0.85) !important;
  backdrop-filter: blur(12px) !important;
  padding: 2.5rem !important;
  border-radius: 12px !important;
  box-shadow: 0 0 40px rgba(100, 100, 255, 0.15) !important;
  border: 1px solid rgba(140, 150, 255, 0.15) !important;
}

/* ─────────────────────────────────────────────────────────
   Sidebar — UNNS Dark Theme
   ───────────────────────────────────────────────────────── */
.sidebar,
aside,
#sidebar,
[class*="sidebar"],
.moduletable,
.well,
.card {
  background: rgba(15, 20, 50, 0.9) !important;
  border: 1px solid rgba(140, 150, 255, 0.3) !important;
  border-radius: 12px !important;
  padding: 1.5rem !important;
  box-shadow: 0 0 25px rgba(100, 80, 255, 0.2) !important;
  backdrop-filter: blur(10px) !important;
}

/* Sidebar headings */
.sidebar h3,
aside h3,
.moduletable h3,
.well h3,
.module-title,
.card-header {
  color: #aab4ff !important;
  font-size: 1.3rem !important;
  font-weight: 600 !important;
  text-shadow: 0 0 15px rgba(170, 180, 255, 0.5) !important;
  border-bottom: 2px solid rgba(140, 150, 255, 0.3) !important;
  padding-bottom: 0.5rem !important;
  margin-bottom: 1rem !important;
  background: transparent !important;
}

/* Sidebar menu items */
.sidebar ul,
aside ul,
.moduletable ul,
.menu,
.nav {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.sidebar li,
aside li,
.moduletable li,
.menu li,
.nav-item {
  margin: 0.5rem 0 !important;
}

.sidebar a,
aside a,
.moduletable a,
.menu a,
.nav-link {
  color: #90a0ff !important;
  text-decoration: none !important;
  display: block !important;
  padding: 0.6rem 1rem !important;
  border-radius: 6px !important;
  transition: all 0.3s ease !important;
  border-left: 3px solid transparent !important;
}

.sidebar a:hover,
aside a:hover,
.moduletable a:hover,
.menu a:hover,
.nav-link:hover {
  background: rgba(160, 130, 255, 0.15) !important;
  border-left-color: #aab4ff !important;
  color: #ffc0ff !important;
  text-shadow: 0 0 10px rgba(255, 180, 255, 0.5) !important;
  transform: translateX(5px) !important;
}

.sidebar a.active,
.sidebar a.current,
.menu .active > a,
.nav-link.active {
  background: rgba(140, 150, 255, 0.2) !important;
  border-left-color: #aab4ff !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

/* ─────────────────────────────────────────────────────────
   Typography & Headings
   ───────────────────────────────────────────────────────── */
h1 {
  color: #c0caff !important;
  text-shadow: 0 0 20px rgba(180, 180, 255, 0.5) !important;
  font-size: 2.5rem !important;
  margin-bottom: 1.5rem !important;
}

h2, h3 {
  color: #aab4ff !important;
  text-shadow: 0 0 15px rgba(160, 160, 255, 0.4) !important;
  letter-spacing: 0.03em !important;
  margin-top: 2rem !important;
  margin-bottom: 1rem !important;
  animation: fadeInHeading 2s ease forwards;
}

h2 {
  font-size: 2rem !important;
  border-bottom: 2px solid rgba(140, 150, 255, 0.2) !important;
  padding-bottom: 0.5rem !important;
}

h3 {
  font-size: 1.5rem !important;
}

@keyframes fadeInHeading {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────────────────────────
   Paragraphs
   ───────────────────────────────────────────────────────── */
p {
  margin: 1rem 0 !important;
  opacity: 0.95;
  transition: opacity 0.3s ease;
  line-height: 1.8 !important;
}

p:hover {
  opacity: 1;
}

/* ─────────────────────────────────────────────────────────
   Article Containers
   ───────────────────────────────────────────────────────── */
article[class^="unns-"],
.item-page,
article,
.blog-item {
  background: rgba(20, 25, 60, 0.5) !important;
  border: 1px solid rgba(140, 150, 255, 0.25) !important;
  border-radius: 12px !important;
  padding: 2.5rem !important;
  margin-bottom: 2rem !important;
  box-shadow: 0 0 25px rgba(100, 100, 255, 0.2) !important;
  animation: fadeInBox 1.2s ease forwards;
}

@keyframes fadeInBox {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─────────────────────────────────────────────────────────
   Blockquotes
   ───────────────────────────────────────────────────────── */
blockquote {
  border-left: 4px solid rgba(255, 128, 192, 0.6) !important;
  margin: 1.5rem 0 !important;
  padding: 1rem 1.5rem !important;
  font-style: italic !important;
  color: #ffb3ff !important;
  background: rgba(255, 128, 192, 0.05) !important;
  border-radius: 6px !important;
  text-shadow: 0 0 12px rgba(255, 160, 240, 0.3) !important;
  animation: pulseGlow 6s ease-in-out infinite;
}

@keyframes pulseGlow {
  0%, 100% { text-shadow: 0 0 8px rgba(255, 160, 240, 0.2); }
  50% { text-shadow: 0 0 14px rgba(255, 160, 240, 0.5); }
}

/* ─────────────────────────────────────────────────────────
   Tables — High Contrast & UNNS Aesthetic
   ───────────────────────────────────────────────────────── */
table,
table.table {
  width: 100% !important;
  border-collapse: collapse !important;
  margin: 2rem 0 !important;
  background: rgba(10, 15, 45, 0.85) !important;
  color: #e0e4ff !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  box-shadow: 0 0 20px rgba(100, 80, 255, 0.25) !important;
  border: 1px solid rgba(120, 140, 255, 0.35) !important;
}

table th,
table.table th {
  background: rgba(70, 80, 160, 0.7) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  text-align: left !important;
  padding: 1rem 1.5rem !important;
  border-bottom: 2px solid rgba(140, 150, 255, 0.4) !important;
  text-shadow: 0 0 10px rgba(180, 140, 255, 0.7) !important;
}

table td,
table.table td {
  padding: 0.9rem 1.5rem !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #e0e4ff !important;
  background: rgba(0, 0, 0, 0.3) !important;
}

table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.08) !important;
}

table tr:hover td {
  background: rgba(160, 130, 255, 0.25) !important;
  transition: background 0.3s ease;
}

table a {
  color: #bbaaff !important;
  text-decoration: none !important;
  transition: color 0.2s ease;
}

table a:hover {
  color: #ffffff !important;
  text-shadow: 0 0 10px rgba(200, 150, 255, 0.9) !important;
}

/* ─────────────────────────────────────────────────────────
   Links
   ───────────────────────────────────────────────────────── */
a {
  color: #90a0ff !important;
  text-decoration: none !important;
  transition: color 0.3s ease, text-shadow 0.3s ease !important;
}

a:hover {
  color: #ffc0ff !important;
  text-shadow: 0 0 8px rgba(255, 180, 255, 0.5) !important;
}

/* ─────────────────────────────────────────────────────────
   Code & Pre Blocks
   ───────────────────────────────────────────────────────── */
code {
  background: rgba(140, 150, 255, 0.15) !important;
  color: #ffc0ff !important;
  padding: 0.2em 0.5em !important;
  border-radius: 4px !important;
  font-family: 'Courier New', monospace !important;
  font-size: 0.9em !important;
}

pre {
  background: rgba(10, 15, 40, 0.8) !important;
  border: 1px solid rgba(140, 150, 255, 0.3) !important;
  border-radius: 8px !important;
  padding: 1.5rem !important;
  overflow-x: auto !important;
  color: #d0d4ff !important;
  box-shadow: 0 0 15px rgba(100, 80, 255, 0.15) !important;
}

pre code {
  background: none !important;
  padding: 0 !important;
}

/* ─────────────────────────────────────────────────────────
   Buttons & Forms
   ───────────────────────────────────────────────────────── */
button,
.btn,
input[type="submit"],
input[type="button"] {
  background: rgba(70, 80, 160, 0.6) !important;
  color: #ffffff !important;
  border: 1px solid rgba(140, 150, 255, 0.4) !important;
  padding: 0.7rem 1.5rem !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  text-shadow: 0 0 6px rgba(180, 140, 255, 0.4) !important;
}

button:hover,
.btn:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  background: rgba(100, 110, 200, 0.7) !important;
  box-shadow: 0 0 15px rgba(140, 150, 255, 0.5) !important;
  transform: translateY(-2px) !important;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  background: rgba(20, 25, 60, 0.7) !important;
  border: 1px solid rgba(140, 150, 255, 0.3) !important;
  color: #d8d8e8 !important;
  padding: 0.7rem !important;
  border-radius: 6px !important;
  transition: border-color 0.3s ease !important;
}

input:focus,
textarea:focus,
select:focus {
  outline: none !important;
  border-color: rgba(140, 150, 255, 0.6) !important;
  box-shadow: 0 0 12px rgba(140, 150, 255, 0.3) !important;
}

/* ═══════════════════════════════════════════════════════════
   MOBILE LAYOUT OPTIMIZATION - FULL WIDTH FIX
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    /* Remove side padding - use full width */
    body,
    body.site {
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Logo - compact but visible */
    .unns-logo {
        height: 60px !important;
    }
    
    /* Header - full width, no side margins */
    .container-header {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    /* Main containers - minimal side padding */
    .site-grid,
    .container-fluid,
    .container,
    #sp-main-body,
    .com-content,
    main,
    .container-component {
        width: 100% !important;
        max-width: 100% !important;
        padding: 1rem 0.75rem !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }
    
    /* Breadcrumbs - full width */
    .breadcrumb,
    .breadcrumbs,
    nav[aria-label="breadcrumb"] {
        margin: 0.5rem 0.75rem !important;
        padding: 0.5rem 1rem !important;
        font-size: 0.85rem !important;
        width: calc(100% - 1.5rem) !important;
    }
    
    /* Articles - full width with minimal padding */
    article[class^="unns-"],
    .item-page,
    article,
    .blog-item {
        padding: 1.25rem 0.75rem !important;
        margin: 0.5rem 0.75rem !important;
        width: calc(100% - 1.5rem) !important;
        border-radius: 8px !important;
    }
    
    /* Sidebar - stack below content, full width */
    .sidebar,
    aside,
    .moduletable {
        width: calc(100% - 1.5rem) !important;
        margin: 1rem 0.75rem !important;
        padding: 1rem !important;
    }
    
    /* Reduce heading sizes for mobile */
    h1 {
        font-size: 1.75rem !important;
        margin-bottom: 1rem !important;
    }
    
    h2 {
        font-size: 1.4rem !important;
        margin-top: 1.25rem !important;
    }
    
    h3 {
        font-size: 1.15rem !important;
    }
    
    /* Tables - horizontal scroll if needed */
    table,
    table.table {
        display: block !important;
        overflow-x: auto !important;
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    /* Even smaller logo on phones */
    .unns-logo {
        height: 50px !important;
    }
    
    /* Ultra-minimal padding on phones */
    .container-fluid,
    .container,
    #sp-main-body,
    .com-content,
    main,
    .container-component {
        padding: 0.75rem 0.5rem !important;
    }
    
    article[class^="unns-"],
    .item-page,
    article {
        padding: 1rem 0.5rem !important;
        margin: 0.5rem 0.5rem !important;
        width: calc(100% - 1rem) !important;
    }
    
    /* Breadcrumbs even more compact */
    .breadcrumb,
    .breadcrumbs {
        margin: 0.5rem 0.5rem !important;
        padding: 0.4rem 0.75rem !important;
        width: calc(100% - 1rem) !important;
    }
    
    /* Smaller fonts */
    body,
    body.site {
        font-size: 0.95rem !important;
    }
    
    h1 {
        font-size: 1.5rem !important;
    }
    
    h2 {
        font-size: 1.25rem !important;
    }
    
    h3 {
        font-size: 1.1rem !important;
    }
}
/* ═══════════════════════════════════════════════════════════
   UNNS.tech — Article Content Visibility Fix
   ═══════════════════════════════════════════════════════════
   
   Add this to the END of your user.css file
*/

/* ─────────────────────────────────────────────────────────
   Force Article Content Visibility
   ───────────────────────────────────────────────────────── */

/* Main article body */
.item-page,
.blog-item,
article.item,
.com-content article {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Article text content */
.item-page p,
.item-page div,
.blog-item p,
.blog-item div,
article p,
article div,
.article-body,
.article-content,
.item-text {
    color: #d8d8e8 !important;
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
}

/* Article intro text */
.item-intro,
.intro-text {
    color: #d8d8e8 !important;
    opacity: 1 !important;
    display: block !important;
}

/* Article full text */
.item-fulltext,
.full-text {
    color: #d8d8e8 !important;
    opacity: 1 !important;
    display: block !important;
}

/* Read more links */
.readmore,
.btn-readmore,
a.readmore {
    color: #90a0ff !important;
    display: inline-block !important;
    visibility: visible !important;
    padding: 0.5rem 1rem !important;
    background: rgba(70, 80, 160, 0.3) !important;
    border: 1px solid rgba(140, 150, 255, 0.3) !important;
    border-radius: 6px !important;
    margin-top: 1rem !important;
    text-decoration: none !important;
}

.readmore:hover,
.btn-readmore:hover {
    background: rgba(100, 110, 200, 0.5) !important;
    color: #ffc0ff !important;
}

/* ─────────────────────────────────────────────────────────
   Pagination Visibility
   ───────────────────────────────────────────────────────── */

/* Pagination container */
.pagination,
.com-content .pagination,
nav.pagination {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 2rem 0 !important;
    padding: 1rem !important;
    background: rgba(20, 25, 60, 0.6) !important;
    border-radius: 8px !important;
    border: 1px solid rgba(140, 150, 255, 0.2) !important;
    justify-content: center !important;
    gap: 0.5rem !important;
}

/* Pagination links */
.pagination li,
.pagination .page-item {
    list-style: none !important;
    display: inline-block !important;
    margin: 0 0.25rem !important;
}

.pagination a,
.pagination .page-link {
    color: #90a0ff !important;
    background: rgba(70, 80, 160, 0.4) !important;
    border: 1px solid rgba(140, 150, 255, 0.3) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    display: block !important;
    transition: all 0.3s ease !important;
}

.pagination a:hover,
.pagination .page-link:hover {
    background: rgba(100, 110, 200, 0.6) !important;
    color: #ffc0ff !important;
    box-shadow: 0 0 12px rgba(140, 150, 255, 0.4) !important;
}

/* Active/current page */
.pagination .active a,
.pagination .page-item.active .page-link {
    background: rgba(140, 150, 255, 0.6) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* Disabled pagination links */
.pagination .disabled a,
.pagination .page-item.disabled .page-link {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
}

/* ─────────────────────────────────────────────────────────
   Article Info (metadata)
   ───────────────────────────────────────────────────────── */

.article-info,
.item-info,
.article-details {
    color: #b0b8ff !important;
    opacity: 0.8 !important;
    font-size: 0.9rem !important;
    margin: 1rem 0 !important;
    display: block !important;
}

.article-info dd,
.item-info dd {
    color: #b0b8ff !important;
    display: inline !important;
    margin: 0 0.5rem 0 0 !important;
}

/* Category tags */
.article-info .category-name,
.item-category {
    color: #aab4ff !important;
    background: rgba(140, 150, 255, 0.15) !important;
    padding: 0.2rem 0.6rem !important;
    border-radius: 4px !important;
}

/* ─────────────────────────────────────────────────────────
   Blog Layout Specific
   ───────────────────────────────────────────────────────── */

.blog .items-leading,
.blog .items-row {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.blog .item {
    margin-bottom: 2rem !important;
}

/* ─────────────────────────────────────────────────────────
   Article Images
   ───────────────────────────────────────────────────────── */

.item-page img,
article img,
.article-image,
.item-image {
    display: block !important;
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    margin: 1rem 0 !important;
    opacity: 1 !important;
}

/* ─────────────────────────────────────────────────────────
   Lists within articles
   ───────────────────────────────────────────────────────── */

.item-page ul,
.item-page ol,
article ul,
article ol {
    color: #d8d8e8 !important;
    opacity: 1 !important;
    margin: 1rem 0 !important;
    padding-left: 2rem !important;
}

.item-page li,
article li {
    color: #d8d8e8 !important;
    margin: 0.5rem 0 !important;
}
/* ═══════════════════════════════════════════════════════════
   UNNS Banner Logo - Full Width Header
   ═══════════════════════════════════════════════════════════ */

.unns-logo {
    width: 100% !important;
    max-width: 100% !important;
    height: 120px !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    border-radius: 0 !important;
    filter: brightness(1.1) drop-shadow(0 0 20px rgba(170, 180, 255, 0.3));
    transition: all 0.4s ease !important;
}

.unns-logo:hover {
    filter: brightness(1.2) drop-shadow(0 0 30px rgba(170, 180, 255, 0.5));
}

/* Make logo container full width */
.navbar-brand {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
}

.brand-logo {
    width: 100% !important;
    display: block !important;
    line-height: 0 !important;
}

/* Adjust header container for full-width logo */
.container-header {
    padding: 0 !important;
}

.container-header .grid-child {
    width: 100% !important;
    max-width: 100% !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .unns-logo {
        height: 80px !important;
    }
}

@media (max-width: 480px) {
    .unns-logo {
        height: 60px !important;
    }
}
/* ═══════════════════════════════════════════════════════════
   MOBILE - ABSOLUTE FULL WIDTH (NUCLEAR OPTION)
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    /* Kill the wrapper constraints */
    .wrapper-static,
    .wrapper-fluid {
        max-width: none !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Remove ALL padding and margins from body/html */
    html,
    body,
    body.site {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Force site-grid to full width */
    .site-grid {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
    }
    
    /* Logo banner - absolutely full width */
    .container-header {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .navbar-brand,
    .brand-logo {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .unns-logo {
        height: 60px !important;
        width: 100% !important;
        margin: 0 !important;
    }
    
    /* ALL grid children - full width */
    .grid-child,
    .container-component,
    .container-fluid,
    .container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0.75rem !important;
        box-sizing: border-box !important;
    }
    
    /* Main content area */
    #sp-main-body,
    .com-content,
    main {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0.5rem !important;
        margin: 0 !important;
    }
    
    /* Breadcrumbs - edge to edge */
    .breadcrumb,
    .breadcrumbs,
    nav[aria-label="breadcrumb"] {
        width: 100% !important;
        margin: 0 !important;
        padding: 0.5rem 0.75rem !important;
        border-radius: 0 !important;
    }
    
    /* Articles */
    article[class^="unns-"],
    .item-page,
    article,
    .blog-item {
        width: 100% !important;
        margin: 0.5rem 0 !important;
        padding: 1rem 0.75rem !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
    }
    
    /* Sidebar - full width when stacked */
    .sidebar,
    aside,
    .moduletable,
    .container-sidebar-right,
    .container-sidebar-left {
        width: 100% !important;
        margin: 0.5rem 0 !important;
        padding: 1rem !important;
        box-sizing: border-box !important;
    }
    
    /* Text elements need internal padding */
    h1, h2, h3 {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    p {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
    
    /* Reduce heading sizes */
    h1 { font-size: 1.75rem !important; }
    h2 { font-size: 1.4rem !important; }
    h3 { font-size: 1.15rem !important; }
}

@media (max-width: 480px) {
    .unns-logo {
        height: 50px !important;
    }
    
    h1 { font-size: 1.5rem !important; }
    h2 { font-size: 1.25rem !important; }
    h3 { font-size: 1.1rem !important; }
}
/* =========================================================
   UNNS.tech — Phase 2 Visual Refinements (Add-on)
   ========================================================= */

/* 1. Extra blending depth for background */
body,
body.site {
  background-blend-mode: overlay !important;
}

/* 2. Sidebar polish (adds inner depth and spacing) */
.sidebar,
aside,
#sidebar,
[class*="sidebar"],
.moduletable {
  box-shadow: inset 0 0 20px rgba(0, 0, 60, 0.3) !important;
  padding: 1.25rem !important;
}

/* 3. Menu hover and active glow refinement */
.mod-menu a:hover,
.menu a:hover,
.nav-link:hover,
.sidebar a:hover {
  color: #b0b8ff !important;
  text-shadow: 0 0 6px #7080ff !important;
}

.mod-menu .current,
.menu .active > a,
.nav-link.active {
  color: #ffffff !important;
  text-shadow: 0 0 10px rgba(160, 180, 255, 0.8) !important;
}

/* 4. Breadcrumb glow upgrade */
.breadcrumb,
nav[aria-label="breadcrumb"] {
  box-shadow: 0 0 10px rgba(0, 40, 255, 0.25) !important;
  border: 1px solid rgba(140, 150, 255, 0.25) !important;
}
/* ═══════════════════════════════════════════════════════════
   UNNS Breadcrumb Customization - Symbol Version
   ═══════════════════════════════════════════════════════════ */

/* Hide original "You are here:" text */
.breadcrumb .page-header,
.breadcrumbs .page-header,
.breadcrumb > span:first-child,
.breadcrumbs > span:first-child {
    display: none !important;
}

/* Add custom UNNS breadcrumb prefix with symbol */
.breadcrumb::before,
.breadcrumbs::before,
nav[aria-label="breadcrumb"]::before {
    content: "∿ Path:" !important;
    color: #aab4ff !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    margin-right: 0.75rem !important;
    text-shadow: 0 0 10px rgba(170, 180, 255, 0.4) !important;
    letter-spacing: 0.05em !important;
}

/* Ensure breadcrumb displays inline properly */
.breadcrumb,
.breadcrumbs,
nav[aria-label="breadcrumb"] {
    display: flex !important;
    align-items: center !important;
}
/* ═══════════════════════════════════════════════════════════
   UNNS.tech - Animated Background Symbols
   Floating mathematical glyphs, spirals, and recursive patterns
   ═══════════════════════════════════════════════════════════
   
   Add this to the END of your user.css file
*/

/* ─────────────────────────────────────────────────────────
   Floating Symbols Container
   ───────────────────────────────────────────────────────── */

body::after {
    content: "" !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 0 !important;
    overflow: hidden !important;
}

/* ─────────────────────────────────────────────────────────
   Individual Floating Symbols
   ───────────────────────────────────────────────────────── */

/* Symbol 1: Operator XII ⊗ - Slow drift right */
body::after {
    content: "⊗" !important;
    font-size: 4rem !important;
    color: rgba(170, 180, 255, 0.15) !important;
    position: fixed !important;
    top: 15% !important;
    left: -10% !important;
    animation: floatRight1 45s linear infinite !important;
    text-shadow: 0 0 30px rgba(170, 180, 255, 0.3) !important;
}

@keyframes floatRight1 {
    0% {
        left: -10%;
        opacity: 0;
    }
    10% {
        opacity: 0.15;
    }
    90% {
        opacity: 0.15;
    }
    100% {
        left: 110%;
        opacity: 0;
    }
}

/* We need multiple elements, so let's use a different approach */
/* Creating floating symbol layers using data attributes */

/* ─────────────────────────────────────────────────────────
   Alternative: Multiple Symbol Layers
   ───────────────────────────────────────────────────────── */

/* Add a container for floating symbols */
.unns-floating-symbols {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 0 !important;
    overflow: hidden !important;
}

/* Individual floating symbols */
.unns-float {
    position: absolute !important;
    font-size: 3rem !important;
    opacity: 0 !important;
    pointer-events: none !important;
    font-family: 'Segoe UI Symbol', 'Apple Symbols', sans-serif !important;
    text-shadow: 0 0 20px currentColor !important;
}

/* Different animation patterns */
.unns-float-1 {
    top: 10% !important;
    left: -10% !important;
    color: rgba(170, 180, 255, 0.2) !important;
    animation: drift1 40s linear infinite !important;
    animation-delay: 0s !important;
}

.unns-float-2 {
    top: 60% !important;
    left: -10% !important;
    color: rgba(140, 150, 255, 0.15) !important;
    animation: drift2 55s linear infinite !important;
    animation-delay: 8s !important;
    font-size: 2.5rem !important;
}

.unns-float-3 {
    top: 35% !important;
    left: -10% !important;
    color: rgba(180, 160, 255, 0.18) !important;
    animation: drift3 48s linear infinite !important;
    animation-delay: 16s !important;
    font-size: 4rem !important;
}

.unns-float-4 {
    top: 80% !important;
    left: -10% !important;
    color: rgba(160, 170, 255, 0.12) !important;
    animation: drift1 62s linear infinite !important;
    animation-delay: 24s !important;
    font-size: 3.5rem !important;
}

.unns-float-5 {
    top: 25% !important;
    left: -10% !important;
    color: rgba(150, 180, 255, 0.16) !important;
    animation: drift2 38s linear infinite !important;
    animation-delay: 32s !important;
}

.unns-float-6 {
    top: 50% !important;
    left: -10% !important;
    color: rgba(170, 150, 255, 0.14) !important;
    animation: drift3 70s linear infinite !important;
    animation-delay: 5s !important;
    font-size: 2.8rem !important;
}

.unns-float-7 {
    top: 70% !important;
    left: -10% !important;
    color: rgba(140, 170, 255, 0.13) !important;
    animation: drift1 52s linear infinite !important;
    animation-delay: 12s !important;
}

.unns-float-8 {
    top: 40% !important;
    left: -10% !important;
    color: rgba(180, 170, 255, 0.17) !important;
    animation: drift2 44s linear infinite !important;
    animation-delay: 20s !important;
    font-size: 3.2rem !important;
}

/* ─────────────────────────────────────────────────────────
   Animation Keyframes - Different Drift Patterns
   ───────────────────────────────────────────────────────── */

/* Straight horizontal drift */
@keyframes drift1 {
    0% {
        left: -10%;
        opacity: 0;
        transform: translateY(0) rotate(0deg);
    }
    5% {
        opacity: 0.2;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
    95% {
        opacity: 0.2;
    }
    100% {
        left: 110%;
        opacity: 0;
        transform: translateY(0) rotate(360deg);
    }
}

/* Wavy horizontal drift */
@keyframes drift2 {
    0% {
        left: -10%;
        opacity: 0;
        transform: translateY(0) rotate(0deg);
    }
    5% {
        opacity: 0.18;
    }
    25% {
        transform: translateY(-40px) rotate(90deg);
    }
    50% {
        transform: translateY(0) rotate(180deg);
    }
    75% {
        transform: translateY(40px) rotate(270deg);
    }
    95% {
        opacity: 0.18;
    }
    100% {
        left: 110%;
        opacity: 0;
        transform: translateY(0) rotate(360deg);
    }
}

/* Spiral drift with larger wave */
@keyframes drift3 {
    0% {
        left: -10%;
        opacity: 0;
        transform: translateY(0) scale(0.8) rotate(0deg);
    }
    5% {
        opacity: 0.15;
    }
    20% {
        transform: translateY(-60px) scale(1) rotate(72deg);
    }
    40% {
        transform: translateY(30px) scale(1.2) rotate(144deg);
    }
    60% {
        transform: translateY(-30px) scale(1) rotate(216deg);
    }
    80% {
        transform: translateY(60px) scale(0.9) rotate(288deg);
    }
    95% {
        opacity: 0.15;
    }
    100% {
        left: 110%;
        opacity: 0;
        transform: translateY(0) scale(0.8) rotate(360deg);
    }
}

/* ─────────────────────────────────────────────────────────
   Spiral Path Animation (Circular motion)
   ───────────────────────────────────────────────────────── */

.unns-spiral {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 100px !important;
    height: 100px !important;
    pointer-events: none !important;
    animation: spiral 30s linear infinite !important;
}

.unns-spiral::before {
    content: "∿" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    font-size: 2rem !important;
    color: rgba(255, 180, 255, 0.15) !important;
    text-shadow: 0 0 20px rgba(255, 180, 255, 0.3) !important;
}

@keyframes spiral {
    0% {
        transform: translate(-50%, -50%) rotate(0deg) translateX(300px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.2;
    }
    90% {
        opacity: 0.2;
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg) translateX(300px) rotate(-360deg);
        opacity: 0;
    }
}

/* ─────────────────────────────────────────────────────────
   Mobile Optimization - Reduce animations on small screens
   ───────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .unns-float {
        font-size: 2rem !important;
    }
    
    /* Hide some symbols on mobile for performance */
    .unns-float-4,
    .unns-float-6,
    .unns-float-8 {
        display: none !important;
    }
}

@media (max-width: 480px) {
    /* Further reduce on very small screens */
    .unns-float-3,
    .unns-float-5,
    .unns-float-7 {
        display: none !important;
    }
}

/* ─────────────────────────────────────────────────────────
   Performance: Reduce motion for users who prefer it
   ───────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .unns-float,
    .unns-spiral {
        animation: none !important;
        display: none !important;
    }
}
/* ═══════════════════════════════════════════════════════════
   Fix Body Height - Remove White Space at Bottom
   ═══════════════════════════════════════════════════════════ */

html,
body,
body.site {
    min-height: 100vh !important;
    height: auto !important;
}

/* Ensure site grid expands to fill screen */
.site-grid {
    min-height: calc(100vh - 120px) !important; /* 120px accounts for header */
}

/* Remove white backgrounds */
.wrapper-static,
.wrapper-fluid,
.container-component {
    background: transparent !important;
}

/* Ensure main content area is transparent */
main {
    background: transparent !important;
}

/* Footer styling */
.container-footer,
footer.footer {
    background: rgba(10, 14, 35, 0.9) !important;
    border-top: 2px solid rgba(140, 150, 255, 0.3) !important;
    margin-top: 2rem !important;
}

/* Fix article container */
.item-page {
    background: rgba(20, 25, 60, 0.8) !important;
    min-height: auto !important;
}
/* ═══════════════════════════════════════════════════════════
   AGGRESSIVE White Space Fix - Add to END of user.css
   ═══════════════════════════════════════════════════════════ */

/* Force everything to be transparent and extend to viewport */
* {
    box-sizing: border-box !important;
}

html {
    min-height: 100vh !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

body {
    min-height: 100vh !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

/* Remove white backgrounds from ALL major containers */
.wrapper-static,
.wrapper-fluid,
.site-grid,
.container-component,
.grid-child,
#sp-main-body,
main,
.item-page,
article,
.blog,
.category-list {
    background: transparent !important;
    background-color: transparent !important;
}

/* Ensure site grid fills space */
body.site {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
}

.site-grid {
    flex: 1 1 auto !important;
    min-height: 100% !important;
}

/* Make sure component container fills available space */
.container-component {
    min-height: 50vh !important;
    padding-bottom: 3rem !important;
}

/* Footer styling */
.container-footer,
footer,
footer.footer {
    background: rgba(10, 14, 35, 0.95) !important;
    border-top: 2px solid rgba(140, 150, 255, 0.3) !important;
    margin-top: auto !important;
    flex-shrink: 0 !important;
}

/* Ensure no element has white background */
div[style*="background: white"],
div[style*="background-color: white"],
div[style*="background: #fff"],
div[style*="background-color: #fff"] {
    background: transparent !important;
    background-color: transparent !important;
}

/* Override any inline white backgrounds */
*[style*="background: white"],
*[style*="background-color: white"],
*[style*="background: #fff"],
*[style*="background-color: #fff"],
*[style*="background: #ffffff"],
*[style*="background-color: #ffffff"] {
    background: transparent !important;
    background-color: transparent !important;
}
/* --- UNNS CEREMONIAL GATE BUTTON (OVERRIDE) --- */
.gate-container-simple {
    text-align: center;
    padding: 40px 0;
}
.gate-button-simple {
    /* Base Button Styling */
    background-color: transparent;
    border: 2px solid #9966ff; 
    color: #ccffff;
    padding: 15px 40px;
    font-size: 1.4em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px #9966ff, inset 0 0 5px #9966ff;
    border-radius: 50px;
    text-decoration: none; 
    display: inline-block;
    font-family: Arial, sans-serif;
    letter-spacing: 1px;
}
.gate-button-simple:hover {
    /* Hover Effect */
    background-color: #9966ff33; 
    box-shadow: 0 0 25px #ff00cc, inset 0 0 12px #ff00cc; 
    color: #ffffff;
}
.symbol-inf {
    font-family: 'Times New Roman', serif;
    font-size: 1.2em;
}

/* --- AGGRESSIVE VERTICAL OFFSET FIX --- */

/* 1. Reset the padding on the main Joomla content wrapper */
.item-page {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* 2. Target the first major heading (H1) and force it UP */
/* This is the most direct way to counteract template padding */
.item-page h1:first-child {
    margin-top: -40px !important; 
    padding-top: 0 !important;
    /* Adjust -40px until the title sits perfectly */
}

/* UNNS iframe visual embeds */
.unns-frame {
  position: relative;
  width: 100%;
  max-width: 900px;
  margin: 1.5em auto 2em auto;
  height: 90vh; /* fills 90% of viewport height */
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 0 25px rgba(150,150,255,0.25);
}

.unns-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* --- UNNS Embedded Visual Panels --- */
.unns-frame {
  position: relative;
  display: block;
  width: 100%;
  max-width: 920px;         /* slightly wider to align with UNNS cards */
  margin: 1.5em auto 2em auto;
  height: 95vh;             /* fills most of the viewport */
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 0 35px rgba(160,160,255,0.25);
  background: rgba(10,10,30,0.3);
}

.unns-frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
}

/* Prevent Joomla article container from clipping embedded content */
.com-content-article__body {
  overflow: visible !important;
}

.unns-frame {
  position: relative;
  width: 100%;
  max-width: 920px;
  margin: 1.5em auto 2em;
  height: 95vh;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 0 35px rgba(160,160,255,0.25);
  background: rgba(10,10,30,0.3);
}
.unns-frame iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: none;
}

.unns-frame {
  position: relative;
  display: block;
  max-width: 900px;
  margin: 20px auto 40px auto;
  border: none;
  overflow: visible;
  z-index: 5;
}

.unns-frame iframe {
  width: 100%;
  height: 7400px;
  border: none;
  display: block;
  pointer-events: auto !important;
  position: relative;
  z-index: 10;
}

/* Prevent any overlays from blocking clicks */
.article-content,
.com-content-article,
body,
#content {
  pointer-events: auto !important;
  z-index: 1;
}
/* === Global iframe offset fix for preview & embeds === */
iframe {
  margin-top: 0 !important;
  top: 0 !important;
  transform: none !important;
  position: static !important;
}

/* Prevent preview wrappers from applying ghost offsets */
body.preview-frame,
body[data-preview="true"],
.sppb-editor-preview iframe,
#preview-frame,
[data-preview-frame] iframe {
  margin-top: 0 !important;
  padding-top: 0 !important;
  transform: none !important;
  top: 0 !important;
}
/* ───────────────────────────────────────────────────────────────
   Cassiopeia — Global iframe normalization + responsive sizing
   ─────────────────────────────────────────────────────────────── */

/* 1) Reset any editor/preview offsets and enforce reliable defaults */
iframe {
  width: 100% !important;
  max-width: 100%;
  height: 520px !important;          /* default; JS will upscale if allowed */
  border: none;
  display: block;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  top: 0 !important;
  position: static !important;
}

/* 2) Centered wrapper you can reuse anywhere */
.iframe-container {
  position: relative;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;                     /* centers the block in Cassiopeia */
  text-align: center;                 /* (optional) for captions inside */
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(180deg,#0a0e27 0%, #121633 100%);
  box-shadow: 0 0 24px rgba(0,255,255,.08);
}

.iframe-container iframe {
  height: 100%;
  min-height: 75vh;                   /* good default for apps; overridden by JS when possible */
}

/* 3) Responsive min-heights (tweak to taste) */
@media (max-width: 1200px) {
  .iframe-container iframe { min-height: 78vh; }
}
@media (max-width: 900px) {
  .iframe-container iframe { min-height: 82vh; }
}
@media (max-width: 600px) {
  .iframe-container iframe { min-height: 88vh; }
}

/* 4) Neutralize common preview wrappers that push content downward */
body.preview-frame,
body[data-preview="true"],
div[id*="preview"] iframe,
div[class*="preview"] iframe,
#preview-frame,
[data-preview-frame] iframe {
  margin-top: 0 !important;
  padding-top: 0 !important;
  transform: none !important;
  top: 0 !important;
}

/* 5) Optional “fade-in when loaded” polish */
.iframe-container iframe { opacity: 0; transition: opacity .6s ease; }
.iframe-container iframe.is-loaded { opacity: 1; }
/* ════════════════════════════════════════════════════════════
   UNNS.tech – Universal Math Rendering & Equation Display
   Mobile + Desktop consistency for inline and block math
   ──────────────────────────────────────────────────────────── */

@import url('https://cdn.jsdelivr.net/npm/@fontsource/iosevka-math/index.css');

/* Base style for inline math */
.math-inline, code.math-inline, kbd.math-inline {
  font-family: 'Iosevka Math', 'Noto Sans Math', 'DejaVu Sans Mono', monospace !important;
  font-size: 0.97em;
  letter-spacing: 0.03em;
  display: inline-block;
  line-height: 1.4;
  color: #bde8ff;
  background: transparent !important;
  vertical-align: middle;
  white-space: normal;
  transform: scale(1.04);
  transform-origin: bottom left;
}

/* Code/console blocks remain clean */
pre, code {
  font-family: 'Iosevka', monospace;
  font-size: 0.9em;
  line-height: 1.5;
  color: #9fdcff;
  background: rgba(0, 10, 30, 0.4);
  border-radius: 6px;
  padding: 4px 6px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* MathJax global style */
mjx-container[jax="CHTML"] {
  font-size: 105% !important;
  line-height: 1.4 !important;
  color: #c8f4ff !important;
}
mjx-math, mjx-mi, mjx-mo, mjx-mn, mjx-mtext {
  font-family: 'Iosevka Math', 'Noto Sans Math', sans-serif !important;
}

/* Prevent overflow on mobile */
@media (max-width: 600px) {
  .math-inline {
    font-size: 1.1em;
    letter-spacing: 0.04em;
    transform: scale(1.08);
  }
  mjx-container[jax="CHTML"] {
    font-size: 115% !important;
  }
  pre, code {
    font-size: 0.95em;
    overflow-x: auto;
  }
}

/* Optional: highlight math constants in articles */
span.constant, .math-highlight {
  color: #00ffff;
  text-shadow: 0 0 5px #00ffff, 0 0 15px #0044ff;
}
/* Fix overlapping article titles and breadcrumbs on mobile */
.item-page .page-header h2 {
  margin-bottom: 1rem !important;
  padding-top: 0.5rem !important;
  line-height: 1.25 !important;
  text-align: center;
  z-index: 2 !important;
}

.pathway, .breadcrumb {
  margin-bottom: 1rem !important;
  z-index: 1 !important;
  position: relative;
}
/* --- Fix overlapping article titles and breadcrumbs on mobile --- */
@media (max-width: 768px) {
  .page-header h2, .page-header h1 {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    padding: 0.5rem 1rem !important;
    line-height: 1.25 !important;
    text-align: center !important;
    display: block !important;
    position: relative;
    z-index: 2 !important;
  }

  .breadcrumb, .pathway {
    margin-bottom: 1rem !important;
    position: relative;
    z-index: 1;
  }
}
/* ──────────────────────────────────────────────
   UNNS.tech — MathJax Mobile Compatibility Fix
   ────────────────────────────────────────────── */

mjx-container[jax="CHTML"] {
  overflow-x: auto !important;
  overflow-y: hidden !important;
  display: block !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  text-align: center !important;
  font-size: 1.05em !important;
  line-height: 1.4em !important;
  color: #cfe9ff !important;
  text-shadow: 0 0 3px #00ffff88, 0 0 8px #8844ff77;
}

/* Make math wrap gracefully instead of clipping */
@media (max-width: 768px) {
  mjx-container[jax="CHTML"] {
    white-space: normal !important;
    text-align: left !important;
    font-size: 1.15em !important;
    padding: 0.25rem 0 !important;
    overflow-x: visible !important;
  }
  mjx-container mjx-math {
    display: inline-block !important;
    overflow-x: visible !important;
  }
}

/* Prevent Joomla article container from clipping MathJax */
.article-body, .item-page, .com-content-article__body {
  overflow: visible !important;
}
a[href*="tau-field"] {
  color: #44e3ff !important;
  text-shadow: 0 0 10px #44e3ff, 0 0 20px #8844ff;
}
a[href*="tau-field"]:hover {
  color: #ffffff !important;
  text-shadow: 0 0 15px #00ffff, 0 0 30px #8844ff;
}
body[class*="tau-field"] .item-page h1,
body[class*="tau-field"] .page-header h2 {
  color: #44e3ff !important;
  text-shadow: 0 0 12px #44e3ff, 0 0 25px #8844ff;
}
/* ============================================================
   UNNS.tech Styling — Joomla-Safe Version (No aside/nav/header)
   ============================================================ */

:root {
  --unns-bg: #0a0e27;
  --unns-bg-soft: #11152f;
  --unns-fg: #d8d8e8;
  --unns-muted: #a1a4c5;
  --unns-phi: #60a5fa;
  --unns-psi: #a855f7;
  --unns-tau: #22d3ee;
  --unns-accent: #f97316;
  --unns-border: rgba(148,163,184,0.25);
  --unns-card: rgba(11, 16, 40, 0.92);
}

/* Page wrapper */
.unns-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--unns-fg);
}

/* -----------------------------------------------------------
   HERO HEADER
   ----------------------------------------------------------- */
.unns-hero {
  background: radial-gradient(circle at 20% 0%, #1e2642 0%, #0a0e27 60%, #020617 100%);
  padding: 2.8rem 2rem;
  border-radius: 1.4rem;
  border: 1px solid var(--unns-border);
  position: relative;
  overflow: hidden;
  margin-bottom: 2.4rem;
  box-shadow: 0 40px 80px rgba(0,0,0,0.35);
}

.unns-hero::before {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(circle at 0% 0%, rgba(96,165,250,0.22), transparent 60%),
    radial-gradient(circle at 90% 20%, rgba(168,85,247,0.25), transparent 60%),
    radial-gradient(circle at 50% 100%, rgba(34,211,238,0.18), transparent 60%);
  opacity: 0.9;
}

.unns-hero-inner {
  position: relative;
  z-index: 2;
}

/* Eyebrow */
.unns-eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  color: var(--unns-muted);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

/* Title */
.unns-title {
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  margin: 0 0 0.6rem;
  font-weight: 600;
  color: var(--unns-fg);
}

.unns-title .highlight {
  background: linear-gradient(90deg, var(--unns-phi), var(--unns-psi), var(--unns-tau));
  -webkit-background-clip: text;
  color: transparent;
}

/* Subtitle */
.unns-subtitle {
  font-size: 0.98rem;
  color: var(--unns-muted);
  max-width: 720px;
  line-height: 1.6;
}

/* Badges */
.unns-badges {
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--unns-border);
  color: var(--unns-muted);
}

.badge-foundations { border-color: var(--unns-phi); color: var(--unns-phi); }
.badge-taufield    { border-color: var(--unns-tau); color: var(--unns-tau); }
.badge-operator    { border-color: var(--unns-psi); color: var(--unns-psi); }
.badge-status      { border-color: var(--unns-accent); color: var(--unns-accent); }

/* Abstract box */
.unns-abstract {
  margin-top: 1.3rem;
  padding: 1rem 1.1rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--unns-border);
  border-radius: 1rem;
  font-size: 0.92rem;
  color: var(--unns-muted);
  line-height: 1.55;
}

.unns-abstract strong {
  color: var(--unns-fg);
}

/* -----------------------------------------------------------
   ARTICLE BODY
   ----------------------------------------------------------- */

.unns-layout {
  margin-top: 1.5rem;
}

.unns-article {
  background: var(--unns-card);
  padding: 2rem 1.8rem;
  border-radius: 1.3rem;
  border: 1px solid var(--unns-border);
  box-shadow: 0 30px 70px rgba(0,0,0,0.4);
}

.unns-article h2 {
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  font-size: 1.35rem;
  color: var(--unns-fg);
}

.unns-article h3 {
  margin-top: 1.2rem;
  margin-bottom: 0.5rem;
  font-size: 1.08rem;
  color: var(--unns-phi);
}

.unns-article p {
  font-size: 0.94rem;
  margin: 0.45rem 0 0.8rem;
  line-height: 1.7;
}

/* Lists */
.unns-article ul {
  padding-left: 1.3rem;
  margin-top: 0.4rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  color: var(--unns-fg);
}

.unns-article li {
  margin: 0.35rem 0;
}

/* Horizontal rule */
.unns-article hr {
  border: none;
  border-top: 1px solid var(--unns-border);
  margin: 2rem 0 1.7rem;
}

/* Key claim / highlight */
.key-claim {
  padding: 1rem 1.1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(96,165,250,0.4);
  background: radial-gradient(circle at top right,
              rgba(168,85,247,0.25), rgba(10,14,39,0.9));
  color: var(--unns-fg);
  font-size: 0.95rem;
  margin: 1.3rem 0 1.6rem;
}

/* Inline monospace equations */
.eq {
  font-family: Consolas, "SF Mono", monospace;
  background: rgba(255,255,255,0.05);
  padding: 0.15rem 0.3rem;
  border-radius: 0.3rem;
  font-size: 0.9rem;
}

/* -----------------------------------------------------------
   SVG containers (safe for Joomla)
   ----------------------------------------------------------- */

.unns-figure {
  margin: 1.2rem 0 1.6rem;
  text-align: center;
}

.unns-flow-svg,
svg {
  max-width: 100%;
  height: auto;
}

/* Recursion flux diagrams */
.svg-container {
  margin: 1.6rem 0 2rem;
  text-align: center;
}

/* -----------------------------------------------------------
   Footer area inside content
   ----------------------------------------------------------- */
.unns-meta-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--unns-border);
  font-size: 0.82rem;
  color: var(--unns-muted);
}

/* Make links match UNNS theme */
a {
  color: var(--unns-tau);
}
a:hover {
  color: var(--unns-phi);
}
/* ============================================================
   UNNS.tech CODE BLOCK THEME (Joomla-safe)
   ============================================================ */

.unns-code {
  background: rgba(10, 14, 39, 0.92);
  border: 1px solid rgba(148,163,184,0.25);
  padding: 1rem 1.2rem;
  margin: 1.4rem 0;
  border-radius: 0.9rem;
  color: #e5e9f0;
  font-family: "Fira Code", Consolas, Menlo, monospace;
  font-size: 0.9rem;
  line-height: 1.55;
  overflow-x: auto;
  white-space: pre;
}

/* Soft glow on hover */
.unns-code:hover {
  border-color: #22d3ee;
  box-shadow: 0 0 20px rgba(34,211,238,0.25);
  transition: 0.2s ease-in-out;
}

/* Inline code */
.unns-inline {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 0.1rem 0.35rem;
  border-radius: 0.4rem;
  font-family: Consolas, monospace;
  font-size: 0.9rem;
}

/* ================= COLOR HIGHLIGHTS ================= */

/* Φ geometric constructs */
.unns-phi {
  color: #60a5fa; /* blue */
}

/* Ψ spectral constructs */
.unns-psi {
  color: #a855f7; /* purple */
}

/* τ coupling constructs */
.unns-tau {
  color: #22d3ee; /* cyan */
}

/* Operators (XII, Σ, Δ, etc.) */
.unns-op {
  color: #f97316; /* orange */
  font-weight: bold;
}

/* Comments */
.unns-comment {
  color: #6b7280;
  font-style: italic;
}

/* Constants or reserved words */
.unns-const {
  color: #facc15; /* gold */
}

/* Highlighted rules */
.unns-rule {
  background: rgba(249,115,22,0.15);
  border-left: 3px solid #f97316;
  padding-left: 0.5rem;
}
/* ============================================================
   UNIVERSAL UNNS.tech ARTICLE TEMPLATE STYLING
   ============================================================ */

:root {
  --unns-bg: #0a0e27;
  --unns-bg-soft: #11152f;
  --unns-fg: #d8d8e8;
  --unns-muted: #a1a4c5;
  --unns-phi: #60a5fa;
  --unns-psi: #a855f7;
  --unns-tau: #22d3ee;
  --unns-accent: #f97316;
  --unns-border: rgba(148,163,184,0.25);
  --unns-card: rgba(11,16,40,0.92);
}

/* Page wrapper */
.unns-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2.2rem 1.5rem 4rem;
  color: var(--unns-fg);
  font-family: system-ui, "Segoe UI", sans-serif;
}

/* -----------------------------------------------------------
   HERO HEADER
   ----------------------------------------------------------- */
.unns-hero {
  background: radial-gradient(circle at 20% 0%, #1e2642 0%, #0a0e27 60%, #020617 100%);
  padding: 2.8rem 2rem;
  border-radius: 1.4rem;
  border: 1px solid var(--unns-border);
  margin-bottom: 2.4rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,0.35);
}

.unns-hero::before {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(circle at 0% 0%, rgba(96,165,250,0.22), transparent 60%),
    radial-gradient(circle at 90% 20%, rgba(168,85,247,0.25), transparent 60%),
    radial-gradient(circle at 50% 100%, rgba(34,211,238,0.22), transparent 60%);
  opacity: 0.85;
}

.unns-hero-inner {
  position: relative;
  z-index: 2;
}

.unns-eyebrow {
  font-size: 0.85rem;
  color: var(--unns-muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-bottom: 0.8rem;
}

/* Title */
.unns-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 600;
  margin: 0 0 0.6rem;
  color: var(--unns-fg);
}

.unns-title .highlight {
  background: linear-gradient(90deg, var(--unns-phi), var(--unns-psi), var(--unns-tau));
  -webkit-background-clip: text;
  color: transparent;
}

.unns-subtitle {
  font-size: 1rem;
  color: var(--unns-muted);
  max-width: 720px;
  line-height: 1.6;
}

/* Badges */
.unns-badges {
  margin-top: 1.2rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.badge {
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--unns-border);
}

.badge-foundations { border-color: var(--unns-phi); color: var(--unns-phi); }
.badge-theory      { border-color: var(--unns-tau); color: var(--unns-tau); }
.badge-lab         { border-color: var(--unns-psi); color: var(--unns-psi); }
.badge-status      { border-color: var(--unns-accent); color: var(--unns-accent); }

/* Abstract */
.unns-abstract {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--unns-border);
  border-radius: 1rem;
  padding: 1rem 1.2rem;
  margin-top: 1.3rem;
  font-size: 0.93rem;
  color: var(--unns-muted);
}

/* -----------------------------------------------------------
   ARTICLE BODY
   ----------------------------------------------------------- */
.unns-article {
  background: var(--unns-card);
  padding: 2.2rem 2rem;
  border-radius: 1.3rem;
  border: 1px solid var(--unns-border);
  box-shadow: 0 30px 70px rgba(0,0,0,0.4);
}

.unns-article h2 {
  margin-top: 2.2rem;
  margin-bottom: 0.8rem;
  font-size: 1.4rem;
}

.unns-article h3 {
  font-size: 1.15rem;
  margin-top: 1.4rem;
  color: var(--unns-phi);
}

.unns-article p {
  margin: 0.5rem 0 0.9rem;
  line-height: 1.7;
  font-size: 0.95rem;
}

.unns-article hr {
  border: none;
  border-top: 1px solid var(--unns-border);
  margin: 2rem 0;
}

/* List styling */
.unns-article ul {
  padding-left: 1.4rem;
  font-size: 0.95rem;
}

/* Inline equations */
.eq {
  font-family: Consolas, monospace;
  background: rgba(255,255,255,0.05);
  padding: 0.15rem 0.35rem;
  border-radius: 0.3rem;
}

/* Code blocks */
.unns-code {
  background: rgba(10,14,39,0.92);
  border: 1px solid var(--unns-border);
  padding: 1rem 1.2rem;
  border-radius: 0.9rem;
  font-family: "Fira Code", Consolas, monospace;
  white-space: pre;
  overflow-x: auto;
  margin: 1.4rem 0;
}

/* Key claim */
.key-claim {
  background: radial-gradient(circle at top right,
              rgba(168,85,247,0.22), rgba(10,14,39,0.9));
  border: 1px solid rgba(96,165,250,0.35);
  padding: 1rem 1.2rem;
  border-radius: 0.9rem;
  margin: 1.3rem 0 1.6rem;
}

.unns-figure, .svg-container {
  text-align: center;
  margin: 1.5rem 0 1.8rem;
}

.unns-flow-svg, svg {
  max-width: 100%;
  height: auto;
}

/* Footer */
.unns-meta-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  font-size: 0.82rem;
  color: var(--unns-muted);
  border-top: 1px solid var(--unns-border);
}
/* Prevent UNNS.tech layout from narrowing while scrolling */
body, .site, #wrapper, #t3-wrapper {
    max-width: 100vw !important;
    width: 100vw !important;
    overflow-x: hidden !important;
}

/* Prevent inner containers from shrinking due to flexbox */
.t3-mainbody, .t3-content, .container, .row, .col {
    flex-shrink: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}
/* ===========================================================
   UNNS.tech — FIX: Prevent layout narrowing on scroll
   =========================================================== */

html, body, body.site {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* Prevent any container from shrinking when body is flex */
body.site > * {
    flex-shrink: 0 !important;
}

/* Critical: Cassiopeia / grid containers */
.container,
.container-fluid,
.site-grid,
.wrapper-fluid,
.wrapper-static,
#sp-main-body,
main,
.com-content,
.container-component,
.grid-child {
    width: 100% !important;
    max-width: 100% !important;
    flex-shrink: 0 !important;
}

/* Prevent scroll-induced compression (caused by animations + shadows) */
* {
    max-width: 100% !important;
}
/* ===================================================================================
   UNNS.tech – Fix Narrowing on Scroll (Freeze Background Pseudo-layers)
   =================================================================================== */

/* Freeze all "::before" and "::after" layers to prevent layout reflow */
body::before,
body::after {
    will-change: opacity, transform !important;
    contain: strict !important;
    pointer-events: none !important;
}

/* Strong isolation */
body::before,
body::after {
    isolation: isolate !important;
    transform: translateZ(0) !important;   /* prevents reflow */
}

/* Prevent pseudo-elements from affecting viewport width */
body::after,
body::before {
    max-width: 100vw !important;
    overflow: hidden !important;
    left: 0 !important;
}

/* Force the layout NOT to react to animated fixed layers */
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
}
/* UNNS Library – buttons, badges, layout */

.unns-gradient {
  background: linear-gradient(90deg, #00f5ff, #b844ff, #ff006e);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.unns-lead {
  font-size: 1.05rem;
  color: #e2e4ff;
  max-width: 900px;
  margin-bottom: 1.5rem;
}

.unns-badge-row {
  margin-bottom: 0.75rem;
}

.unns-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.65rem;
  margin-right: 0.35rem;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(5,8,22,0.75);
  color: #f4f4ff;
}

.unns-badge-phase {
  border-color: rgba(0,245,255,0.6);
  color: #aef9ff;
}

.unns-badge-mode {
  border-color: rgba(184,68,255,0.6);
  color: #f1dcff;
}

.unns-badge-ton {
  border-color: rgba(255,0,110,0.7);
  color: #ffd5e8;
}

.unns-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  font-size: 0.95rem;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 0.6rem;
  margin-bottom: 0.5rem;
}

.unns-button-primary {
  background: linear-gradient(135deg, #00f5ff, #b844ff);
  color: #050816;
  font-weight: 600;
  box-shadow: 0 0 18px rgba(0,245,255,0.35);
}

.unns-button-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(0,245,255,0.5);
}

.unns-button-ghost {
  background: rgba(5,8,22,0.6);
  border-color: rgba(255,255,255,0.25);
  color: #e2e4ff;
}

.unns-button-ghost:hover {
  border-color: #00f5ff;
  color: #ffffff;
}

.unns-library-cta {
  margin: 1.5rem 0 2rem;
}

.unns-divider {
  border: 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  margin: 2rem 0;
}

.unns-list {
  padding-left: 1.2rem;
}

.unns-list li {
  margin: 0.25rem 0;
}

.unns-code-block {
  background: rgba(0,0,0,0.45);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  overflow-x: auto;
  border: 1px solid rgba(0,245,255,0.2);
}

.unns-inline-link {
  font-family: Consolas, Menlo, monospace;
  font-size: 0.82rem;
  color: #aef9ff;
}

.unns-library-frame {
  width: 100%;
  max-width: 1600px;
  height: 80vh;
  min-height: 540px;
  margin: 0 auto 1rem;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(0,0,0,0.45);
  background: rgba(5,8,22,0.95);
}
