/* =========================================================
   Nexus Five Pillars (Merged CSS)
   Use this for ALL pillar pages.
   ========================================================= */

:root{
  --bg:#0B0C10;
  --bg2:#090A0D;
  --text:#EDEDED;
  --muted:#A9ABB3;
  --shadow: 0 18px 60px rgba(0,0,0,.55);
  --cardbg: rgba(10,11,14,.72);
  --line: rgba(255,255,255,0.08);
  --radius: 20px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

/* reset */
*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:
    radial-gradient(1200px 900px at 20% 10%, rgba(201,167,109,.08), transparent 55%),
    radial-gradient(1200px 900px at 80% 20%, rgba(160,200,255,.06), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  overflow-x:hidden;
}
img{ display:block; max-width:100%; }

/* =========================================================
   Pillar page layout
   ========================================================= */

body.pillar-page{
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:24px;
}

.pillar-accent{
  position:fixed;
  inset:-40vh -40vw auto -40vw;
  height:55vh;
  pointer-events:none;
  z-index:0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.12), transparent 60%);
}

.pillar-card{
  width:min(520px,92vw);
  border-radius:var(--radius);
  border:1px solid var(--line);
  background:var(--cardbg);
  box-shadow:var(--shadow);
  overflow:hidden;
  position:relative;
  z-index:1;
}

/* Pillar link list layout */
.pillar-links {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 18px 120px; /* bottom padding keeps it clear of your bottom nav */
}

.pillar-links .links-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

/* card */
.link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(10px);
}

.link-card:hover {
  background: rgba(0, 0, 0, 0.26);
  border-color: rgba(255,255,255,0.18);
}

.link-thumb {
  width: 92px;
  height: 92px;
  flex: 0 0 92px;
  border-radius: 12px;
  object-fit: cover;    /* key: prevents distortion */
  object-position: center;
  background: rgba(255,255,255,0.08);
}

.link-meta {
  min-width: 0;
}

.link-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  color: rgba(255,255,255,0.92);
}

.link-sub {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(255,255,255,0.65);
  word-break: break-word;
}

/* Optional: 2-column on wide screens */
@media (min-width: 900px) {
  .pillar-links .links-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Pillar link list layout */
.pillar-links {
  max-width: 980px;
  margin: 0 auto;
  padding: 24px 18px 120px; /* bottom padding keeps it clear of your bottom nav */
}

.pillar-links .links-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

/* card */
.link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  text-decoration: none;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(10px);
}

.link-card:hover {
  background: rgba(0, 0, 0, 0.26);
  border-color: rgba(255,255,255,0.18);
}

.link-thumb {
  width: 92px;
  height: 92px;
  flex: 0 0 92px;
  border-radius: 12px;
  object-fit: cover;    /* key: prevents distortion */
  object-position: center;
  background: rgba(255,255,255,0.08);
}

.link-meta {
  min-width: 0;
}

.link-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  color: rgba(255,255,255,0.92);
}

.link-sub {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.35;
  color: rgba(255,255,255,0.65);
  word-break: break-word;
}

/* Optional: 2-column on wide screens */
@media (min-width: 900px) {
  .pillar-links .links-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* =========================================================
   Header
   ========================================================= */

.pillar-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:20px 22px;
  border-bottom:1px solid rgba(255,255,255,0.05);
  position:relative;
  z-index:20;
}

.header-left{
  display:flex;
  flex-direction:column;
}

.pillar-title{
  font-family:"Bebas Neue", sans-serif;
  font-size:28px;
  letter-spacing:1px;
}

.pillar-tagline{
  font-size:13px;
  color:var(--muted);
}

/* Icon glow + shine */
.pillar-icon{
  position:relative;
  width:44px;
  height:44px;
  display:grid;
  place-items:center;
}
.pillar-icon img{
  width:34px;
  height:34px;
  position:relative;
  z-index:2;
  filter: drop-shadow(0 0 10px rgba(255,255,255,0.15)) drop-shadow(0 0 18px rgba(255,255,255,0.08));
}
.pillar-icon::before{
  content:"";
  position:absolute;
  inset:-8px;
  border-radius:999px;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255,255,255,0.08) 45%,
    rgba(255,255,255,0.18) 50%,
    rgba(255,255,255,0.08) 55%,
    transparent 100%
  );
  transform: translateX(-60%);
  animation: iconShine 5s ease-in-out infinite;
  pointer-events:none;
  mix-blend-mode: screen;
  opacity:0.6;
}
@keyframes iconShine{
  0%, 60% { transform: translateX(-60%); opacity:0; }
  70%     { opacity:0.6; }
  90%,100%{ transform: translateX(60%); opacity:0; }
}

/* =========================================================
   Body content + cards
   ========================================================= */

.pillar-body{
  padding:20px;
  display:flex;
  flex-direction:column;
  gap:14px;
  max-height:56vh;
  overflow:auto;
}

.pillar-body::-webkit-scrollbar{ width:10px; }
.pillar-body::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,0.12);
  border-radius:999px;
}
.pillar-body::-webkit-scrollbar-track{ background:transparent; }

.link-item{
  display:flex;
  align-items:center;
  gap:14px;
  padding:12px;
  border-radius:12px;
  background:rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.04);
  text-decoration:none;
  color:inherit;
  transition: transform .18s ease, background .18s ease, border .18s ease;
}
.link-item:hover{
  transform: translateY(-2px);
  background:rgba(255,255,255,0.07);
  border:1px solid rgba(255,255,255,0.12);
}

.thumb{
  width:56px;
  height:56px;
  border-radius:10px;
  overflow:hidden;
  flex-shrink:0;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.08);
}
.thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.link-title{
  font-size:15px;
  font-weight:500;
  letter-spacing:0.2px;
}

/* =========================================================
   Social dock
   ========================================================= */

.social-dock{
  position:relative;
  z-index:50;
  display:flex;
  justify-content:center;
  gap:18px;
  padding:20px;
}

.social-pill{
  position:relative;
  z-index:60;
  width:48px;
  height:48px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:rgba(255,255,255,0.05);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
  text-decoration:none;
  cursor:pointer;
}
.social-pill:hover{
  transform:scale(1.12);
  background:rgba(255,255,255,0.12);
  box-shadow: 0 0 12px rgba(255,255,255,0.12), 0 0 20px rgba(255,255,255,0.06);
}

.social-pill .icon{
  position:absolute;
  width:22px;
  height:22px;
}
.social-pill .icon-white{ opacity:1; transition:opacity .2s ease; }
.social-pill .icon-color{ opacity:0; transition:opacity .2s ease; }
.social-pill:hover .icon-white{ opacity:0; }
.social-pill:hover .icon-color{ opacity:1; }
.social-pill img{ pointer-events:none; }

/* =========================================================
   Pillar color themes (robust selectors)
   ========================================================= */

/* HEALTH */
body.pillar-page.health .pillar-card{
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 30px rgba(0,255,166,0.15);
}
body.pillar-page.health .pillar-accent{
  background: radial-gradient(circle at center, rgba(0,255,166,0.18), transparent 60%);
}
body.pillar-page.health .pillar-icon img{
  filter: drop-shadow(0 0 10px rgba(0,255,166,0.35)) drop-shadow(0 0 18px rgba(0,255,166,0.18));
}

/* WEALTH */
body.pillar-page.wealth .pillar-card{
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 30px rgba(255,215,0,0.15);
}
body.pillar-page.wealth .pillar-accent{
  background: radial-gradient(circle at center, rgba(255,215,0,0.18), transparent 60%);
}
body.pillar-page.wealth .pillar-icon img{
  filter: drop-shadow(0 0 10px rgba(255,215,0,0.35)) drop-shadow(0 0 18px rgba(255,215,0,0.18));
}

/* RELATIONSHIPS */
body.pillar-page.relationships .pillar-card{
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 30px rgba(255,107,107,0.15);
}
body.pillar-page.relationships .pillar-accent{
  background: radial-gradient(circle at center, rgba(255,107,107,0.18), transparent 60%);
}
body.pillar-page.relationships .pillar-icon img{
  filter: drop-shadow(0 0 10px rgba(255,107,107,0.35)) drop-shadow(0 0 18px rgba(255,107,107,0.18));
}

/* SURVIVAL */
body.pillar-page.survival .pillar-card{
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 30px rgba(255,159,10,0.15);
}
body.pillar-page.survival .pillar-accent{
  background: radial-gradient(circle at center, rgba(255,159,10,0.18), transparent 60%);
}
body.pillar-page.survival .pillar-icon img{
  filter: drop-shadow(0 0 10px rgba(255,159,10,0.35)) drop-shadow(0 0 18px rgba(255,159,10,0.18));
}

/* SPIRITUALITY */
body.pillar-page.spirituality .pillar-card{
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 30px rgba(179,136,255,0.15);
}
body.pillar-page.spirituality .pillar-accent{
  background: radial-gradient(circle at center, rgba(179,136,255,0.18), transparent 60%);
}
body.pillar-page.spirituality .pillar-icon img{
  filter: drop-shadow(0 0 10px rgba(179,136,255,0.35)) drop-shadow(0 0 18px rgba(179,136,255,0.18));
}
