/* ============================================================
   PAGE LOADER
============================================================ */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

#page-loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e0e0e0;
  border-top-color: #333;
  border-radius: 50%;
  animation: loader-spin 0.8s linear infinite;
}

@keyframes loader-spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   NAVBAR TRUST STAT STRIP
============================================================ */
.navbar-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 9px 32px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 20px;
  font-size: 12.5px;
  z-index: 80;
  color: var(--muted);
  white-space: nowrap;
  letter-spacing: 0.2px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.stat-pill:hover {
  color: var(--text);
  transform: translateY(-1px);
}

.stat-pill i {
  color: var(--accent-2);
  font-size: 12px;
  filter: drop-shadow(0 0 6px rgba(255, 143, 94, 0.35));
}

.stat-pill strong {
  color: var(--text);
  font-weight: 700;
}

.stat-divider {
  width: 1px;
  height: 14px;
  background: linear-gradient(180deg, transparent, var(--border), transparent);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .navbar-stats {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 9px 20px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .navbar-stats::-webkit-scrollbar { display: none; }
  .stat-pill { flex-shrink: 0; padding: 4px 14px; }
  .stat-divider { flex-shrink: 0; }
}

/* ============================================================
   ADVERTISE-WITH-US MARQUEE BAR (fixed to viewport bottom)
============================================================ */
body { padding-bottom: 40px !important; }

.header-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  display: flex;
  align-items: stretch;
  height: 40px;
  background: linear-gradient(90deg, #1a0d08 0%, #2a140c 45%, #1a0d08 100%);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
}

.header-footer.is-hidden { display: none; }

.ad-badge {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 18px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.ad-badge i { font-size: 11px; }

.ad-marquee {
  flex: 1;
  position: relative;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}

.ad-track {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  height: 100%;
  gap: 64px;
  padding-left: 64px;
  white-space: nowrap;
  animation: ad-scroll 32s linear infinite;
  will-change: transform;
}

.header-footer:hover .ad-track,
.header-footer:focus-within .ad-track {
  animation-play-state: paused;
}

@keyframes ad-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.ad-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: #f2e6df;
  letter-spacing: 0.2px;
}

.ad-item a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.ad-item a:hover { color: var(--accent-2); }

.ad-close {
  flex-shrink: 0;
  width: 40px;
  background: none;
  border: none;
  border-left: 1px solid var(--border);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.ad-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 768px) {
  body { padding-bottom: 36px !important; }
  .header-footer { height: 36px; }
  .ad-badge { display: none; }
  .ad-track { gap: 40px; padding-left: 40px; animation-duration: 22s; }
  .ad-item { font-size: 11.5px; }
  .ad-close { width: 36px; font-size: 16px; }
}