/*
 * Awakening Saints design tokens.
 * This is the single source of truth for color, spacing, radius and shadow
 * across every page. It codifies the navy/blue palette already proven on the
 * free-books catalogue, book detail and homepage library section.
 */
:root {
  /* Brand */
  --navy-900: #102a43;
  --navy-800: #243b53;
  --blue-600: #146da8;
  --blue-500: #1098e8;
  --link-blue: #0879bd;

  /* Neutrals (slate scale) */
  --slate-700: #334e68;
  --slate-600: #486581;
  --slate-500: #627d98;
  --slate-400: #829ab1;
  --slate-300: #bcccdc;
  --slate-200: #d9e2ec;
  --slate-100: #e7edf3;
  --slate-50: #f0f4f8;
  --white: #ffffff;

  /* Accent — reserved for small badges/highlights only, never primary actions */
  --gold-500: #f0b429;

  /* Semantic aliases */
  --color-primary: var(--blue-500);
  --color-primary-dark: var(--blue-600);
  --color-link: var(--link-blue);
  --color-text: var(--navy-800);
  --color-text-muted: var(--slate-500);
  --color-border: var(--slate-200);
  --color-surface: var(--white);
  --color-bg: #f7f9fc;
  --color-accent: var(--gold-500);

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  /* Shadow */
  --shadow-sm: 0 7px 20px rgba(16, 42, 67, 0.08);
  --shadow-md: 0 12px 28px rgba(16, 42, 67, 0.12);

  /* Backwards-compatible aliases used by pages migrated from bookbase.html */
  --as-blue: var(--blue-500);
  --as-blue-dark: var(--blue-600);
  --as-navy: var(--navy-900);
  --as-text: var(--navy-800);
  --as-muted: var(--slate-500);
  --as-border: var(--slate-200);
  --as-bg: var(--color-bg);
  --as-white: var(--white);
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
}

/* Shared button component, reused across book pages, cart and forms. */
.book-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.book-btn:hover {
  transform: translateY(-1px);
}

.book-btn-primary {
  color: #fff !important;
  background: var(--color-primary);
}

.book-btn-primary:hover {
  background: var(--color-primary-dark);
  box-shadow: 0 7px 18px rgba(16, 152, 232, 0.22);
}

.book-btn-secondary {
  color: var(--navy-900) !important;
  background: #fff;
  border-color: var(--color-border);
}

.book-btn-secondary:hover {
  background: var(--slate-50);
}

/* Centered content-width wrapper, used by the book pages and reusable anywhere. */
.book-page-wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

@media (max-width: 767px) {
  .book-page-wrap {
    width: min(100% - 24px, 1180px);
  }
}

/* ---------------------------------------------------------------------
 * Site-wide micro-interactions: header, nav links, footer.
 * ------------------------------------------------------------------- */

#site-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-100);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Utility bar: contact info + socials, above the main nav. Desktop only —
   there isn't room for a second row on a phone, and it would eat too much
   of the viewport above the fold. */
.topbar {
  display: none;
  background: var(--navy-900);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  font-size: 0.8rem;
}

.topbar-contact {
  display: flex;
  align-items: center;
  gap: 20px;
  color: rgba(255, 255, 255, 0.8);
}

.topbar-contact a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.18s ease;
}

.topbar-contact a:hover {
  color: #fff;
}

.topbar-contact i {
  margin-right: 5px;
  color: var(--blue-500);
}

.topbar-social {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.topbar-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  font-size: 0.72rem;
  transition: background 0.18s ease, transform 0.18s ease;
}

.topbar-social a:hover {
  background: var(--blue-500);
  transform: translateY(-1px);
}

@media (min-width: 992px) {
  .topbar { display: block; }

  /* The fixed header just grew a row taller — give it back to the pages
     whose hero/breadcrumb sections size their own top offset to clear it.
     (Measured: header is 90px tall with the topbar visible.) */
  .book-page-main { padding-top: 104px; }
  .w3l-main-slider .banner-view,
  .w3l-about-breadcrumb { margin-top: 104px; }
}

#site-header .navbar-nav .nav-link {
  position: relative;
}

#site-header .navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: -2px;
  height: 2px;
  background: var(--color-primary);
  transition: left 0.22s ease, right 0.22s ease;
}

#site-header .navbar-nav .nav-link:hover::after,
#site-header .navbar-nav .nav-item.active .nav-link::after {
  left: 0;
  right: 0;
}

.footer-list-29 ul li a {
  display: inline-block;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-list-29 ul li a:hover {
  color: var(--blue-500);
  transform: translateX(3px);
}
