/* ============================================================
   Steps of Jesus – Navigation, Theme Tokens & Header
   Completely self-contained for colors, themes & menu behavior
   ============================================================ */

/* ========= Base tokens (dark mode default) ========= */
:root {
  --bg: #050815;
  --bg-soft: #0b1020;
  --bg-softer: #151a30;

  --accent: #ff7a3c;
  --accent-soft: rgba(255, 122, 60, 0.25);
  --accent-strong: #ff9f5f;

  --text-main: #f5f5ff;
  --text-muted: #a4a8c6;

  --card-bg: #181e3a;
  --border-subtle: rgba(255, 255, 255, 0.12);

  --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.6);

  --danger: #ff4b6b;
  --success: #2fd28f;

  --ink: var(--text-main);
  --muted: var(--text-muted);
  --card: var(--card-bg);
}

/* ========= LIGHT MODE (system auto) ========= */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f4f5fb;
    --bg-soft: #ffffff;
    --bg-softer: #eef0ff;

    --accent: #f97316;
    --accent-soft: rgba(249, 115, 22, 0.12);
    --accent-strong: #fb923c;

    --text-main: #0b1020;
    --text-muted: #6b7280;

    --card-bg: #ffffff;
    --border-subtle: rgba(15, 23, 42, 0.06);

    --shadow-soft: 0 20px 40px rgba(15, 23, 42, 0.12);

    --ink: var(--text-main);
    --muted: var(--text-muted);
    --card: var(--card-bg);
  }
}

/* ========= MANUAL MODE OVERRIDES ========= */

html[data-theme="auto"] {}

/* FORCE DARK */
html[data-theme="dark"] {
  --bg: #050815;
  --bg-soft: #0b1020;
  --bg-softer: #151a30;

  --accent: #ff7a3c;
  --accent-soft: rgba(255, 122, 60, 0.25);
  --accent-strong: #ff9f5f;

  --text-main: #f5f5ff;
  --text-muted: #a4a8c6;

  --card-bg: #181e3a;
  --border-subtle: rgba(255, 255, 255, 0.12);

  --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.6);

  --ink: var(--text-main);
  --muted: var(--text-muted);
  --card: var(--card-bg);
}

/* FORCE LIGHT */
html[data-theme="light"] {
  --bg: #f4f5fb;
  --bg-soft: #ffffff;
  --bg-softer: #eef0ff;

  --accent: #f97316;
  --accent-soft: rgba(249, 115, 22, 0.12);
  --accent-strong: #fb923c;

  --text-main: #0b1020;
  --text-muted: #6b7280;

  --card-bg: #ffffff;
  --border-subtle: rgba(15, 23, 42, 0.06);

  --shadow-soft: 0 20px 40px rgba(15, 23, 42, 0.12);

  --ink: var(--text-main);
  --muted: var(--text-muted);
  --card: var(--card-bg);
}

/* ============================================================
   HEADER (GRADIENT RESTORED)
   ============================================================ */

.soj-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;

  padding: 0.75rem 1rem;
  border-radius: 999px;

  margin: 0 auto 1.5rem;
  max-width: 1120px;

  position: sticky;
  top: 0.75rem;
  z-index: 9999;

  /* ORIGINAL BEAUTIFUL GRADIENT — now fully opaque */
  background: linear-gradient(
    120deg,
    rgba(255, 122, 60, 1),
    rgba(89, 94, 255, 1)
  );

  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);

  backdrop-filter: blur(16px);

  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .2s ease, transform .2s ease;
}

.soj-header-ready {
  opacity: 1;
}

/* ============================================================
   LOGO
   ============================================================ */

.soj-logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.soj-logo-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.soj-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.soj-logo-text span:first-child {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
}

.soj-logo-text span:last-child {
  font-size: 0.8rem;
  opacity: 0.85;
}

/* ============================================================
   NAV LINKS
   ============================================================ */

.soj-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.8rem;
  color: #fff;
}

.soj-nav-left,
.soj-nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.soj-nav-right {
  margin-left: auto;
}

.soj-nav a,
.soj-nav-link {
  position: relative;
  padding: 0.4rem 0.15rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: #fff;
  opacity: 0.95;
}

.soj-nav a:hover,
.soj-nav-link:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.soj-nav a::after,
.soj-nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: rgba(255,255,255,0.7);
  opacity: 0;
  transform: scaleX(.6);
  transition: transform .2s ease, opacity .2s ease;
}

.soj-nav a:hover::after,
.soj-nav-link:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

/* Admin links */
.soj-nav-admin {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.15);
}

.soj-nav-logout {
  border-color: rgba(255, 99, 99, 0.6);
}

/* ============================================================
   THEME TOGGLE PILL
   ============================================================ */

.soj-theme-toggle {
  border-radius: 999px;
  padding: 0.25rem 0.9rem;
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(0,0,0,0.25);
  color: #fff;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  cursor: pointer;
}

#soj-theme-icon {
  display: inline-block;
}

/* ============================================================
   HAMBURGER (mobile)
   ============================================================ */

.soj-nav-toggle {
  display: none;
  width: 40px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(0,0,0,0.25);
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.soj-nav-toggle span {
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 999px;
}

/* ============================================================
   DESKTOP
   ============================================================ */

@media (min-width: 768px) {
  .soj-nav-toggle {
    display: none;
  }
}

/* ============================================================
   MOBILE MENU (GRADIENT RESTORED)
   ============================================================ */

@media (max-width: 768px) {

  .soj-header {
    max-width: none;
    margin-inline: 0;
  }

  .soj-nav-toggle {
    display: inline-flex;
  }

  .soj-nav {
    position: fixed;
    inset-inline: 0.9rem;
    top: 4.2rem;

    /* ORIGINAL PURPLE/BLUE GLOW RECREATED */
    background: radial-gradient( circle at top left, rgba(0, 36, 255, 0.85), rgba(15, 23, 42, 0.95) );

    border-radius: 20px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    padding: 1rem 1.25rem 1.1rem;

    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;

    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
    z-index: 9998;
  }

  .soj-nav-left,
  .soj-nav-right {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .soj-nav a,
  .soj-nav-link {
    font-size: 0.9rem;
  }

  .soj-nav-open .soj-nav {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
}
