/* =========================================================
   TRU ROWS — HELIX ISOLATION LAYER
   Purpose: detach TRU custom grids from Helix .row system
========================================================= */

/* --- global safeguard --- */
[class*="guide-grid"],
[class*="hypercorps-grid"],
[class*="journal-grid"],
[class*="fast-grid"] {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: stretch !important;
  gap: 40px;
  width: 100%;
  margin: 0 auto;
  padding: 0 2vw;
  box-sizing: border-box;
}

/* --- generic card behaviour --- */
[class*="guide-grid"] > [class*="card"],
[class*="hypercorps-grid"] > [class*="card"],
[class*="journal-grid"] > [class*="card"] {
  flex: 1 1 320px;
  max-width: 320px;
  text-align: center;
  box-sizing: border-box;
}

/* --- Helix .row neutralizer only inside custom modules --- */
.sp-module.row.guide-band,
.sp-module.row.hypercorps,
.sp-module.row.journal {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  --bs-gutter-x: 0 !important;
  --bs-gutter-y: 0 !important;
}
/* =========================================================
   HYPERCORPS — STRUCTURAL OVERRIDE  (Custom 1 fidelity)
   Kills Helix/Bootstrap .row flex inside Hypercorps module
========================================================= */

/* 1️⃣  Detach Helix rows only within this module  */
body .sp-module.row.hypercorps,
body .section-hex.row.hypercorps,
body .hypercorps .row {
  display: block !important;
  flex: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  --bs-gutter-x: 0 !important;
  --bs-gutter-y: 0 !important;
}

/* 2️⃣  Create the real grid context */
body .hypercorps > .row,
body .hypercorps .corp-grid {
  display: flex !important;
  flex-flow: row nowrap !important;
  justify-content: center !important;
  align-items: stretch !important;
  gap: 60px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 2vw;
  box-sizing: border-box;
}

/* 3️⃣  Ensure section background spans full width */
body #sp-hypercorps,
body .hypercorps {
  width: 100% !important;
  margin: 0 !important;
  padding: 100px 0 120px !important;
  background: linear-gradient(
      160deg,
      rgba(25,10,4,0.98) 0%,
      rgba(45,20,6,0.97) 40%,
      rgba(70,32,8,0.98) 80%,
      rgba(120,60,14,1) 100%
    ),
    url("/templates/visualin/images/backgrounds/honeycomb.svg") repeat;
  background-size: cover, 120px 104px;
  background-position: center;
  border-top: 1px solid rgba(255,214,92,0.25);
  border-bottom: 1px solid rgba(255,136,0,0.25);
  box-shadow: inset 0 0 60px rgba(255,140,40,0.12);
}
/* =========================================================
   PHASE 6.18 — GUIDE / STELLAR / TECH / PLANET SYSTEM ROW REBUILD
   Re-enables flex-row grid for all four major guide panels
========================================================= */

/* 1️⃣  Restore container & row structure */
.tru-guide,
.stellar-section,
.tech-section,
.planet-guide {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: stretch !important;
  gap: 28px !important;
  max-width: 1400px !important;
  margin: 0 auto 60px !important;
  background: var(--panel-bg);
  border-radius: 6px;
  padding: 40px 25px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
  z-index: 2;
}

/* 2️⃣  Section Headings */
.tru-guide > h1,
.stellar-section > h1,
.tech-section > h1,
.planet-guide > h1 {
  flex: 0 0 100%;
  max-width: 100%;
  text-align: center;
  color: var(--accent-gold);
  font-family: 'arial black', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 1.75rem;
  margin-bottom: 30px;
  border-bottom: 2px solid rgba(210,176,85,0.45);
  padding-bottom: 10px;
  text-shadow: 0 0 10px rgba(210,176,85,0.3);
}

/* 3️⃣  Section Cards */
.tru-guide > div,
.stellar-section > div,
.tech-section > div,
.planet-guide > div {
  flex: 0 1 calc(33.333% - 28px);
  max-width: calc(33.333% - 28px);
  background: rgba(20,20,30,0.8);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,0.6);
}

.tru-guide > div:hover,
.stellar-section > div:hover,
.tech-section > div:hover,
.planet-guide > div:hover {
  transform: translateY(-6px);
  box-shadow: 0 0 18px rgba(210,176,85,0.5);
}

/* 4️⃣  Responsive breakpoints */
@media (max-width: 1024px) {
  .tru-guide > div,
  .stellar-section > div,
  .tech-section > div,
  .planet-guide > div {
    flex: 0 1 calc(50% - 20px);
    max-width: calc(50% - 20px);
  }
}

@media (max-width: 600px) {
  .tru-guide > div,
  .stellar-section > div,
  .tech-section > div,
  .planet-guide > div {
    flex: 0 1 100%;
    max-width: 100%;
  }
}
