.page { display: flex; flex-direction: column; min-height: 100vh; }
.page.has-sidebar { flex-direction: row; }
.page-wrapper { flex: 1; display: flex; flex-direction: column; }
.page-body { flex: 1; animation: page-enter 0.2s ease both; }
.page.has-sidebar .page-body > .container-xl { max-width: 100%; }
@keyframes page-enter { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

/* ═══════════════════════════════════════════════════
   FOOTER — Premium brand footer
   Matches Hero section design language:
   radial glow · grid texture · gradient text · pills
   ═══════════════════════════════════════════════════ */
.site-footer {
  position: relative;
  padding: 0;
  margin-top: 5rem;
  overflow: hidden;
}

/* ── Background: Hero-matching glow + grid + gradient ── */
.site-footer::before {
  content: '';
  position: absolute;
  inset: -200px 0 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image:
    radial-gradient(60% 80% at 25% 20%, color-mix(in srgb, var(--glow-blue, #3b82f6) 70%, transparent) 0%, transparent 65%),
    radial-gradient(40% 50% at 75% 10%, color-mix(in srgb, var(--glow-cyan, #06b6d4) 50%, transparent) 0%, transparent 60%),
    radial-gradient(35% 60% at 50% 80%, color-mix(in srgb, var(--glow-purple, #8b5cf6) 40%, transparent) 0%, transparent 55%);
}
[data-bs-theme="dark"] .site-footer::before {
  opacity: 0.10;
}

/* Grid texture (behind content) */
.site-footer .footer-bg-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image:
    linear-gradient(to right, var(--foreground) 1px, transparent 1px),
    linear-gradient(to bottom, var(--foreground) 1px, transparent 1px);
  background-size: 4rem 4rem;
  mask-image: linear-gradient(180deg, transparent 30%, black 60%, black 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 30%, black 60%, black 80%, transparent 100%);
}
[data-bs-theme="dark"] .site-footer .footer-bg-grid {
  opacity: 0.08;
}

/* Base background gradient */
.site-footer .footer-bg-base {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg,
    color-mix(in srgb, var(--muted) 10%, transparent) 0%,
    var(--muted) 60%,
    color-mix(in srgb, var(--muted) 80%, var(--card)) 100%);
}

/* ── Top boundary glow ── */
.site-footer .footer-edge {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(90deg,
    transparent 0%,
    color-mix(in srgb, var(--color-accent) 35%, transparent) 20%,
    color-mix(in srgb, var(--chart-color-4) 30%, transparent) 45%,
    color-mix(in srgb, var(--color-accent) 20%, transparent) 70%,
    transparent 100%);
}

.site-footer > .container-xl {
  position: relative;
  z-index: 1;
  padding-top: 3rem;
  padding-bottom: 1.5rem;
}

/* ═════════════════════════════════════════════════
   Brand area — large gradient title + tagline
   ═════════════════════════════════════════════════ */
.footer-brand {
  text-align: center;
  margin-bottom: 2.5rem;
}
.footer-brand-title {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.625rem;
  letter-spacing: -0.02em;
}
.footer-brand-title .hero-gradient {
  background: linear-gradient(to right, #3b82f6 0%, #8b5cf6 50%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer-tagline {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  max-width: 420px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Gradient rule divider */
.footer-rule {
  width: 3rem;
  height: 2px;
  margin: 1.25rem auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--chart-color-4));
  opacity: 0.4;
}

/* ═════════════════════════════════════════════════
   Nav pills — horizontal, pill-shaped
   ═════════════════════════════════════════════════ */
.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.footer-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--muted-foreground);
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--border) 30%, transparent);
  border-radius: 9999px;
  transition: color var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}
.footer-nav a:visited { color: var(--muted-foreground); }
.footer-nav a:hover {
  color: var(--color-accent);
  border-color: color-mix(in srgb, var(--color-accent) 25%, transparent);
  background: color-mix(in srgb, var(--color-accent) 5%, transparent);
}

/* ═════════════════════════════════════════════════
   Friend links — horizontal wrap, tag-style
   ═════════════════════════════════════════════════ */
.footer-friends {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.375rem 0.75rem;
  margin-bottom: 2rem;
  font-size: 0.75rem;
}
.footer-friends-label {
  color: var(--muted-foreground);
  opacity: 0.5;
  font-weight: 500;
  margin-right: 0.25rem;
}
.footer-friends a {
  color: var(--muted-foreground);
  text-decoration: none;
  opacity: 0.7;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}
.footer-friends a:visited { color: var(--muted-foreground); }
.footer-friends a:hover {
  color: var(--color-accent);
  opacity: 1;
}
.footer-friends-muted {
  color: var(--muted-foreground);
  opacity: 0.4;
  font-size: 0.75rem;
}

/* ═════════════════════════════════════════════════
   Bottom bar — minimal copyright
   ═════════════════════════════════════════════════ */
.footer-bottom {
  border-top: 1px solid color-mix(in srgb, var(--border) 12%, transparent);
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.6875rem;
  color: var(--muted-foreground);
  opacity: 0.7;
}
.footer-bottom a {
  color: var(--muted-foreground);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.footer-bottom a:hover {
  color: var(--color-accent);
}



.modal-content { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); }
.modal-header { border-bottom: 1px solid var(--border); padding: var(--space-4) var(--space-5); }
.modal-body { padding: var(--space-5); }
.modal-footer { border-top: 1px solid var(--border); padding: var(--space-4) var(--space-5); gap: var(--space-2); }

.page.has-sidebar .page-wrapper { padding-left: var(--sidebar-width); transition: padding-left var(--transition-base); }
.page.has-sidebar.sidebar-closed .page-wrapper { padding-left: 0; }
@media (max-width: 991px) { .page.has-sidebar .page-wrapper { padding-left: 0; } }

.carousel-item img { width: 100%; height: auto; aspect-ratio: 21/6; object-fit: cover; }
@media (max-width: 767px) { .carousel-item img { aspect-ratio: 4/3; } }

.back-to-top { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: var(--z-toast); width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--muted-foreground); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity var(--transition-base), color var(--transition-base), border-color var(--transition-base); box-shadow: var(--shadow-md); }
.back-to-top:hover { color: var(--foreground); border-color: var(--foreground); }
.back-to-top.visible { opacity: 1; pointer-events: auto; }
