/* public_html/css/custom.css */
/* THIS IS THE AURORA UI STYLESHEET - V2.3 */

:root {
  --bg: #0b0d12; --bg-soft: #0f1320; 
  /* FIXED: Replaced problematic rgba() with a modern, theme-aware transparent color */
  --surface: rgb(from var(--bg-soft) r g b / 0.7);
  --surface-strong: rgb(from var(--bg-soft) r g b / 0.9);
  --text: #E8EEF8; --muted: #A9B3C9;
  --brand: #7C6CFF; --brand-2: #22D3EE; --shadow: 0 10px 30px rgba(0,0,0,.35);
  --shadow-hover: 0 15px 35px rgba(0,0,0,.4);
  --glass: blur(10px) saturate(130%); --radius: 14px;
  --font-ui: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}
[data-theme="light"] {
  --bg: #f7f8fb; --bg-soft: #ffffff;
  /* FIXED: Applied the same robust transparency method for light mode */
  --surface: rgb(from var(--bg-soft) r g b / 0.7);
  --surface-strong: rgb(from var(--bg-soft) r g b / 0.9);
  --text: #0b1220; --muted: #4B5565;
  --shadow: 0 10px 30px rgba(16,24,40,.08);
  --shadow-hover: 0 15px 35px rgba(16,24,40,.12);
}
body {
  font-family: var(--font-ui); color: var(--text); min-height: 100%;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(124,108,255,.15), transparent 70%),
    radial-gradient(900px 500px at 90% 10%, rgba(34,211,238,.12), transparent 70%),
    linear-gradient(180deg, var(--bg-soft), var(--bg));
  background-attachment: fixed;
}
.glass {
  background-color: var(--surface);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
  border: 1px solid var(--surface-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  border-radius: 999px; padding: .8rem 1.1rem; font-weight: 600; border: 1px solid transparent;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible, .form-select:focus-visible, input:focus-visible, details > summary:focus-visible, .theme-toggle:focus-visible, a:focus-visible { 
    outline: 2px solid var(--brand); 
    outline-offset: 2px;
    border-radius: var(--radius);
}
a:focus-visible { border-radius: 4px; }
.btn:focus-visible { border-radius: 999px; }

.btn.primary { color: white; background: linear-gradient(135deg, var(--brand), #5AB1FF); box-shadow: 0 4px 15px -5px var(--brand); }
.btn.secondary { background: transparent; color: var(--text); border-color: var(--surface-strong); }
.btn.secondary:hover { border-color: var(--brand); background-color: var(--surface); }
.btn.secondary[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
    filter: saturate(0);
    transform: none;
}

header.navbar {
  position: sticky; top: 0; z-index: 50; backdrop-filter: var(--glass);
  background: rgb(from var(--bg-soft) r g b / 0.7);
  border-bottom: 1px solid var(--surface-strong);
  transition: background-color .2s ease, border-color .2s ease;
}
.prose p { color: var(--muted); line-height: 1.7; }
.prose strong { color: var(--text); }
.prose sup { color: var(--muted); }
.prose h1, .prose h2, .prose h3 { color: var(--text); }

.tab-button {
  border-color: transparent; color: var(--muted);
  transition: color .2s ease, border-color .2s ease;
}
.tab-button:hover { color: var(--text); }
.tab-button.active {
  border-color: var(--brand); color: var(--brand);
}

.theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.5rem; border-radius: 999px; border: 1px solid var(--surface-strong);
    background: var(--surface); cursor: pointer;
    transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
}
.theme-toggle:hover { background: var(--surface-strong); transform: translateY(-1px) scale(1.05); }

/* --- SUMMARY ACCORDION ARROWS (RESTORED) --- */
.summary-arrow {
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease, border-color .2s ease;
}
details[open] > summary .summary-arrow {
  transform: rotate(225deg);
}
details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: color 0.2s ease;
    list-style: none;
    cursor: pointer;
}
details summary:hover, details.group:hover summary {
    color: var(--brand);
}
details summary:hover .summary-arrow, details.group:hover .summary-arrow {
    border-color: var(--brand);
}

/* --- LOGO SWITCHING LOGIC --- */
.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }

/* --- CUSTOM FORM SELECT --- */
.select-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
}
.form-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: var(--surface);
  border: 1px solid var(--surface-strong);
  border-radius: 0.5rem; /* Tailwind's rounded-lg */
  padding: 0.5rem 2.5rem 0.5rem 0.75rem; /* py-2 pl-3 pr-10 */
  width: 100%;
  color: var(--text);
  transition: border-color .2s ease;
}
.form-select:hover { border-color: var(--muted); }
.select-wrapper::after {
  content: '';
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-5 h-5"><path fill-rule="evenodd" d="M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z" clip-rule="evenodd" /></svg>');
  background-repeat: no-repeat;
  filter: var(--text) invert(75%) sepia(18%) saturate(399%) hue-rotate(191deg) brightness(90%) contrast(85%); /* SVG color via filter */
  pointer-events: none;
}
[data-theme="light"] .select-wrapper::after {
  filter: none; /* Reset filter for light mode */
}

/* --- NEW HOMEPAGE STYLES --- */
.search-input {
    background-color: var(--surface);
    border: 1px solid var(--surface-strong);
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    width: 100%;
    color: var(--text);
    transition: border-color .2s ease, box-shadow .2s ease;
}
.search-input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent);
}
.testament-header {
    margin-top: 3rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--surface-strong);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text);
}

/* --- NEW UTILITY FOR READABILITY --- */
.glass-solid {
    background-color: var(--bg-soft);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* --- NEW CHAPTER CONTINUATION CARD --- */
.next-up-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    padding: 1.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--surface-strong);
    background-color: var(--surface);
    transition: all .2s ease;
}
.next-up-card:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* --- NEW BOOK CARD HOVER --- */
.book-card.glass:hover {
    border-color: var(--brand);
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}