/* ============================================================
   Tutor People — Shared Site Chrome (navbar + floating logo +
   social FAB) injected on every page by /scripts/site-chrome.js
   Mirrors the exact look of the root index.html chrome.
   Uses --tpc-* variables so it never clashes with page styles.
   ============================================================ */

:root {
  --tpc-bg-secondary: #f8fafc;
  --tpc-bg-card: #ffffff;
  --tpc-text-primary: #0f172a;
  --tpc-text-secondary: #475569;
  --tpc-accent-primary: #6366f1;
  --tpc-accent-secondary: #8b5cf6;
  --tpc-border: #e2e8f0;
  --tpc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --tpc-gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #06b6d4 100%);
}

[data-theme="dark"] {
  --tpc-bg-secondary: #1e293b;
  --tpc-bg-card: #1e293b;
  --tpc-text-primary: #f1f5f9;
  --tpc-text-secondary: #cbd5e1;
  --tpc-border: #334155;
  --tpc-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
}

/* Hide the legacy per-page header — the injected navbar replaces it */
.site-header { display: none !important; }

/* Offset page content below the fixed navbar (JS adds this class
   only when the page doesn't already reserve space for it) */
body.tpc-pad { padding-top: 92px; }
@media (max-width: 1024px) {
  body.tpc-pad { padding-top: 76px; }
}

/* ===== Navbar — transparent with animated aurora sheen ===== */
.tpc-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  padding: 1rem 2rem;
  background: transparent;
  transition: all 0.3s ease;
  /* overflow must stay visible so the "More" dropdown can extend
     below the bar; the aurora pseudo-elements are inset:0 anyway */
  overflow: visible;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.tpc-navbar::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    110deg,
    rgba(99, 102, 241, 0.12) 0%,
    rgba(139, 92, 246, 0.10) 25%,
    rgba(6, 182, 212, 0.12) 50%,
    rgba(139, 92, 246, 0.10) 75%,
    rgba(99, 102, 241, 0.12) 100%
  );
  background-size: 300% 100%;
  animation: tpcNavAurora 12s ease-in-out infinite;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.tpc-navbar::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(99, 102, 241, 0.5) 25%,
    rgba(6, 182, 212, 0.5) 50%,
    rgba(139, 92, 246, 0.5) 75%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: tpcNavAurora 8s linear infinite;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

@keyframes tpcNavAurora {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* The menu bar stays fully transparent on every page — no blur or
   aurora wash even after scrolling (store-style menu, applied site-wide). */
.tpc-navbar.scrolled {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: transparent;
}

.tpc-navbar.scrolled::before,
.tpc-navbar.scrolled::after {
  opacity: 0;
}

/* Scroll shield: a fixed strip sitting just under the navbar (z-index 10000)
   but above all page content. site-chrome.js injects it and fills it with
   viewport-sized layers copying the page's own fixed background, clipped by
   overflow: hidden. The menu bar still *looks* transparent, but scrolling
   content is hidden the moment it crosses the menu bar's bottom boundary
   line. Height is synced to the navbar's real bottom edge by the script. */
.tpc-nav-scroll-shield {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 88px; /* fallback; JS syncs to the navbar's exact bottom edge */
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
}
.tpc-nav-scroll-shield .shield-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
}
@media (max-width: 1024px) { .tpc-nav-scroll-shield { height: 76px; } }

@media (prefers-reduced-motion: reduce) {
  .tpc-navbar::before,
  .tpc-navbar::after { animation: none; }
}

.tpc-navbar .nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tpc-navbar .logo,
.tpc-mobile-menu .logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.tpc-navbar .logo:hover,
.tpc-mobile-menu .logo:hover { text-decoration: none; }

.tpc-navbar .logo-icon,
.tpc-mobile-menu .logo-icon {
  width: 48px;
  height: 48px;
  background: var(--tpc-gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 1.25rem;
}

.tpc-navbar .logo-text,
.tpc-mobile-menu .logo-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--tpc-gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Compact brand mark shown only on mobile (replaces the wordmark) */
.tpc-navbar .logo-mark {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.tpc-navbar .nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.tpc-navbar .nav-links a {
  color: #67e8f9;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  position: relative;
  animation: tpcNeonPulse 2.4s ease-in-out infinite;
}

.tpc-navbar .nav-links li:nth-child(1) a { animation-delay: 0s; }
.tpc-navbar .nav-links li:nth-child(2) a { animation-delay: 0.3s; }
.tpc-navbar .nav-links li:nth-child(3) a { animation-delay: 0.6s; }
.tpc-navbar .nav-links li:nth-child(4) a { animation-delay: 0.9s; }
.tpc-navbar .nav-links li:nth-child(5) a { animation-delay: 1.2s; }

@keyframes tpcNeonPulse {
  0%, 100% {
    text-shadow:
      0 0 4px rgba(103, 232, 249, 0.8),
      0 0 10px rgba(34, 211, 238, 0.6),
      0 0 20px rgba(6, 182, 212, 0.4);
  }
  50% {
    text-shadow:
      0 0 6px rgba(103, 232, 249, 1),
      0 0 16px rgba(34, 211, 238, 0.9),
      0 0 32px rgba(6, 182, 212, 0.7),
      0 0 48px rgba(6, 182, 212, 0.4);
  }
}

@keyframes tpcNavNeonFlicker {
  0%, 19%, 21%, 23%, 54%, 56%, 100% {
    opacity: 1;
    text-shadow:
      0 0 6px rgba(103, 232, 249, 1),
      0 0 18px rgba(34, 211, 238, 0.95),
      0 0 36px rgba(6, 182, 212, 0.8),
      0 0 60px rgba(6, 182, 212, 0.5);
  }
  20%, 22%, 55% {
    opacity: 0.6;
    text-shadow: 0 0 3px rgba(103, 232, 249, 0.4);
  }
}

.tpc-navbar .nav-links a:hover {
  color: #a5f3fc;
  animation: tpcNavNeonFlicker 1.5s linear infinite;
  text-decoration: none;
}

/* No underline on menu-bar buttons — the hover glow is enough */
.tpc-navbar .nav-links a::after { display: none; }

/* Belt and braces: no text underline on ANY menu-bar link or button,
   in any state (hover, active page, aria-current), on every page —
   overrides page-local styles like a:hover or a[aria-current="page"] */
.tpc-navbar a,
.tpc-navbar a:hover,
.tpc-navbar a:focus,
.tpc-navbar a[aria-current="page"],
.tpc-navbar button,
.view-tabs a,
.view-tab,
.view-tab:hover,
.view-tab.active {
  text-decoration: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .tpc-navbar .nav-links a,
  .tpc-navbar .nav-links a:hover { animation: none; }
}

/* ---------- "More" dropdown ---------- */
.tpc-navbar .nav-more { position: relative; }

.tpc-navbar .nav-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(34, 211, 238, 0.45);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  color: #67e8f9;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.4rem 0.9rem;
  background: rgba(34, 211, 238, 0.08);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  /* Emphasised so users notice the extra pages live here */
  animation: tpcMoreAttention 2.2s ease-in-out infinite;
}

.tpc-navbar .nav-more-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.25s ease;
}

.tpc-navbar .nav-more-btn:hover {
  color: #a5f3fc;
  background: rgba(34, 211, 238, 0.16);
  border-color: rgba(34, 211, 238, 0.8);
}

.tpc-navbar .nav-more.open .nav-more-btn svg,
.tpc-navbar .nav-more:hover .nav-more-btn svg,
.tpc-navbar .nav-more:focus-within .nav-more-btn svg {
  transform: rotate(180deg);
}

/* Pause the attention pulse once the menu is engaged */
.tpc-navbar .nav-more.open .nav-more-btn,
.tpc-navbar .nav-more:hover .nav-more-btn,
.tpc-navbar .nav-more:focus-within .nav-more-btn {
  animation: none;
}

@keyframes tpcMoreAttention {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 0 0 0 rgba(34, 211, 238, 0);
    border-color: rgba(34, 211, 238, 0.45);
    text-shadow: 0 0 6px rgba(103, 232, 249, 0.6);
  }
  50% {
    transform: translateY(-1px) scale(1.05);
    box-shadow: 0 0 14px 2px rgba(34, 211, 238, 0.55), 0 0 28px 4px rgba(6, 182, 212, 0.3);
    border-color: rgba(34, 211, 238, 0.95);
    text-shadow: 0 0 10px rgba(103, 232, 249, 1), 0 0 20px rgba(34, 211, 238, 0.9);
  }
}

.tpc-navbar .nav-more-menu {
  position: absolute;
  top: calc(100% + 0.85rem);
  right: 0;
  min-width: 210px;
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  background: var(--tpc-bg-card, rgba(10, 15, 30, 0.98));
  border: 1px solid rgba(34, 211, 238, 0.25);
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  /* Sit above every other floating element on the page */
  z-index: 99999;
}

/* Invisible hover bridge so the menu doesn't close crossing the gap */
.tpc-navbar .nav-more-menu::before {
  content: '';
  position: absolute;
  top: -0.85rem;
  left: 0;
  right: 0;
  height: 0.85rem;
}

.tpc-navbar .nav-more.open .nav-more-menu,
.tpc-navbar .nav-more:hover .nav-more-menu,
.tpc-navbar .nav-more:focus-within .nav-more-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Neutralise the inherited neon link animation inside the dropdown */
.tpc-navbar .nav-links .nav-more-menu a {
  display: block;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  color: #cbd5e1;
  font-weight: 500;
  font-size: 0.9rem;
  animation: none;
  text-shadow: none;
}

.tpc-navbar .nav-links .nav-more-menu a::after { display: none; }

.tpc-navbar .nav-links .nav-more-menu a:hover {
  background: rgba(34, 211, 238, 0.12);
  color: #a5f3fc;
  animation: none;
  text-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .tpc-navbar .nav-more-btn { animation: none; }
}

.tpc-navbar .nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ===== Theme toggle ===== */
.tpc-navbar .theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--tpc-border);
  background: var(--tpc-bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.tpc-navbar .theme-toggle:hover {
  border-color: var(--tpc-accent-primary);
  transform: scale(1.05);
}

.tpc-navbar .theme-toggle svg {
  width: 20px;
  height: 20px;
  color: var(--tpc-text-primary);
}

.tpc-navbar .theme-toggle .sun-icon { display: none; }
.tpc-navbar .theme-toggle .moon-icon { display: block; }
[data-theme="dark"] .tpc-navbar .theme-toggle .sun-icon { display: block; }
[data-theme="dark"] .tpc-navbar .theme-toggle .moon-icon { display: none; }

/* ===== Buttons ===== */
.tpc-navbar .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  white-space: nowrap;
}

.tpc-navbar .btn-primary {
  background: var(--tpc-gradient-primary);
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.tpc-navbar .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
  text-decoration: none;
}

.tpc-navbar .btn-secondary {
  background: var(--tpc-bg-card);
  color: var(--tpc-text-primary);
  border: 1px solid var(--tpc-border);
}

.tpc-navbar .btn-secondary:hover {
  border-color: var(--tpc-accent-primary);
  background: var(--tpc-bg-secondary);
  text-decoration: none;
}

/* ===== Academy / Store view tabs ===== */
.tpc-navbar .view-tabs {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem;
  background: rgba(10, 10, 20, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 100px;
  overflow: hidden;
  isolation: isolate;
}

.tpc-navbar .view-tabs::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(
    110deg,
    rgba(99, 102, 241, 0.18) 0%,
    rgba(139, 92, 246, 0.14) 25%,
    rgba(245, 158, 11, 0.16) 50%,
    rgba(6, 182, 212, 0.16) 75%,
    rgba(99, 102, 241, 0.18) 100%
  );
  background-size: 300% 100%;
  animation: tpcNavAurora 10s ease-in-out infinite;
  border-radius: inherit;
  pointer-events: none;
}

[data-theme="light"] .tpc-navbar .view-tabs {
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(100, 116, 139, 0.25);
}

@media (prefers-reduced-motion: reduce) {
  .tpc-navbar .view-tabs::before { animation: none; }
}

.tpc-navbar .view-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1.1rem;
  border: none;
  background: transparent;
  color: var(--tpc-text-secondary);
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  text-decoration: none;
}

.tpc-navbar .view-tab svg { width: 18px; height: 18px; flex-shrink: 0; }
.tpc-navbar .view-tab:hover { color: var(--tpc-text-primary); text-decoration: none; }

/* Icon-only state: Academy & Store alternate between icon+text and
   icon-only to free up menu-bar space. The label stays in the DOM for
   screen readers but is visually collapsed. */
.tpc-navbar .view-tab.icon-only {
  padding: 0.5rem 0.65rem;
  gap: 0;
}

.tpc-navbar .view-tab.icon-only span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tpc-navbar .view-tab.active {
  background: var(--tpc-gradient-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

/* Store tab — animated gold treatment */
.tpc-navbar .view-tab.tab-store {
  position: relative;
  overflow: hidden;
  border: 2px solid #d97706;
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #f59e0b 100%);
  background-size: 200% 200%;
  color: #1c0a00;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45);
  animation: tpcGoldShimmer 2.5s ease infinite, tpcGoldPulse 2s ease-in-out infinite;
}

.tpc-navbar .view-tab.tab-store::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -75%;
  width: 50%;
  height: 200%;
  background: rgba(255, 255, 255, 0.35);
  transform: skewX(-20deg);
  animation: tpcGoldSweep 2.5s ease-in-out infinite;
  pointer-events: none;
}

.tpc-navbar .view-tab.tab-store:hover {
  color: #1c0a00;
  transform: translateY(-1px) scale(1.04);
  box-shadow: 0 8px 28px rgba(245, 158, 11, 0.7);
}

.tpc-navbar .view-tab.tab-store.active {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 50%, #f59e0b 100%);
  background-size: 200% 200%;
  color: #1c0a00;
  box-shadow: 0 6px 22px rgba(245, 158, 11, 0.75), 0 0 0 4px rgba(245, 158, 11, 0.15);
}

@keyframes tpcGoldShimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes tpcGoldPulse {
  0%, 100% { box-shadow: 0 4px 14px rgba(245, 158, 11, 0.45); }
  50% { box-shadow: 0 6px 22px rgba(245, 158, 11, 0.75), 0 0 0 4px rgba(245, 158, 11, 0.15); }
}

@keyframes tpcGoldSweep {
  0% { left: -75%; }
  50%, 100% { left: 125%; }
}

@media (prefers-reduced-motion: reduce) {
  .tpc-navbar .view-tab.tab-store,
  .tpc-navbar .view-tab.tab-store::before { animation: none; }
}

/* ===== Floating navigation menu ===== */
.floating-menu {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.85rem;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  /* The container reserves space for its (hidden) panel above the toggle,
     which would otherwise swallow clicks meant for the social FAB below it.
     Make the container click-transparent and restore pointer events only
     on the actual interactive children. */
  pointer-events: none;
}

.floating-menu > * {
  pointer-events: auto;
}

/* While the panel is closed it must not intercept clicks either */
.floating-menu:not(.active) .floating-menu-panel {
  pointer-events: none;
}

.floating-menu-toggle {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--tpc-gradient-primary);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.floating-menu-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(99, 102, 241, 0.65);
}

.floating-menu-toggle svg {
  position: absolute;
  width: 26px;
  height: 26px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.floating-menu-toggle .fm-icon-close {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

.floating-menu.active .fm-icon-open {
  opacity: 0;
  transform: rotate(90deg) scale(0.5);
}

.floating-menu.active .fm-icon-close {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.floating-menu-panel {
  width: 230px;
  max-height: min(68vh, 520px);
  overflow-y: auto;
  background: var(--tpc-bg-card, rgba(10, 15, 30, 0.98));
  border: 1px solid var(--tpc-border);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 0.85rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.96);
  transform-origin: bottom right;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}

.floating-menu.active .floating-menu-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.floating-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  padding: 0.15rem 0.6rem 0.6rem;
  border-bottom: 1px solid var(--tpc-border);
}

.floating-menu-title {
  margin: 0;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--tpc-text-muted, #94a3b8);
}

.floating-menu-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--tpc-gradient-primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-menu-cta:hover,
.floating-menu-cta:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.55);
  text-decoration: none;
  color: #fff;
  outline: none;
}

.floating-menu-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.floating-menu-links a {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--tpc-text-secondary, #cbd5e1);
  text-decoration: none;
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease, color 0.2s ease;
}

.floating-menu.active .floating-menu-links a {
  opacity: 1;
  transform: translateX(0);
  transition-delay: calc(var(--i, 0) * 28ms);
}

.floating-menu-links a:hover,
.floating-menu-links a:focus-visible {
  background: var(--tpc-gradient-primary);
  color: #fff;
  text-decoration: none;
  outline: none;
}

.floating-menu-links a[aria-current="page"] {
  color: var(--tpc-accent-primary);
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .floating-menu-panel,
  .floating-menu-toggle svg,
  .floating-menu-links a {
    transition-duration: 0.01ms;
  }
}

/* ===== Floating WhatsApp logo ===== */
.tpc-floating-logo {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  z-index: 900;
  width: 150px;
  height: 150px;
  animation: tpcFloatLogo 3s ease-in-out infinite, tpcPulseLogo 2s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.4));
  cursor: pointer;
  transition: transform 0.3s ease;
  display: block;
}

.tpc-floating-logo::before {
  content: '';
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  background: radial-gradient(circle at center,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(224, 231, 255, 0.75) 18%,
    rgba(165, 180, 252, 0.55) 38%,
    rgba(129, 140, 248, 0.32) 60%,
    rgba(99, 102, 241, 0.12) 82%,
    rgba(99, 102, 241, 0) 100%);
  z-index: -1;
  pointer-events: none;
  animation: tpcGlowPulse 2s ease-in-out infinite;
}

@keyframes tpcGlowPulse {
  0%, 100% { opacity: 0.85; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.tpc-floating-logo:hover {
  animation-play-state: paused;
  transform: scale(1.15) rotate(5deg);
}

@keyframes tpcFloatLogo {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-8px) rotate(2deg); }
  50% { transform: translateY(-12px) rotate(0deg); }
  75% { transform: translateY(-8px) rotate(-2deg); }
}

@keyframes tpcPulseLogo {
  0%, 100% { filter: drop-shadow(0 6px 18px rgba(129, 140, 248, 0.65)); }
  50% { filter: drop-shadow(0 10px 32px rgba(165, 180, 252, 0.95)); }
}

@media (prefers-reduced-motion: reduce) {
  .tpc-floating-logo,
  .tpc-floating-logo::before { animation: none; }
}

/* ===== Social FAB ===== */
.tpc-social-fab {
  position: fixed;
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 900;
}

.tpc-social-fab .social-toggle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  /* White face so the mini brand marks keep their original colours */
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: var(--tpc-shadow-lg);
  transition: all 0.3s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.tpc-social-fab .social-toggle:hover { transform: scale(1.1); }
.tpc-social-fab .social-toggle.active { transform: scale(0.94); }

.tpc-social-fab .social-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
}

.tpc-social-fab .social-toggle-grid svg {
  width: 12px;
  height: 12px;
  display: block;
  transition: transform 0.3s ease;
}

/* Mini brand marks on the toggle keep their original colours:
   Facebook, LinkedIn, Instagram, WhatsApp */
.tpc-social-fab .social-toggle-grid svg:nth-child(1) { color: #1877F2; }
.tpc-social-fab .social-toggle-grid svg:nth-child(2) { color: #0A66C2; }
.tpc-social-fab .social-toggle-grid svg:nth-child(3) { color: #E4405F; }
.tpc-social-fab .social-toggle-grid svg:nth-child(4) { color: #25D366; }

.tpc-social-fab .social-icons-container {
  position: absolute;
  right: 0;
  top: 60px;
  /* Two columns so all 10 icons stay within the viewport */
  display: grid;
  grid-template-columns: repeat(2, 44px);
  justify-content: end;
  gap: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateX(20px);
  transition: all 0.3s ease;
}

.tpc-social-fab .social-icons-container.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.tpc-social-fab .social-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  /* White chip in every theme so each network's original brand
     colour stays true and legible on any background */
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
  opacity: 0;
  transform: scale(0.8);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.tpc-social-fab .social-icons-container.active .social-icon {
  opacity: 1;
  transform: scale(1);
}

.tpc-social-fab .social-icon:nth-child(1) { transition-delay: 0.05s; }
.tpc-social-fab .social-icon:nth-child(2) { transition-delay: 0.1s; }
.tpc-social-fab .social-icon:nth-child(3) { transition-delay: 0.15s; }
.tpc-social-fab .social-icon:nth-child(4) { transition-delay: 0.2s; }
.tpc-social-fab .social-icon:nth-child(5) { transition-delay: 0.25s; }
.tpc-social-fab .social-icon:nth-child(6) { transition-delay: 0.3s; }
.tpc-social-fab .social-icon:nth-child(7) { transition-delay: 0.35s; }
.tpc-social-fab .social-icon:nth-child(8) { transition-delay: 0.4s; }
.tpc-social-fab .social-icon:nth-child(9) { transition-delay: 0.45s; }
.tpc-social-fab .social-icon:nth-child(10) { transition-delay: 0.5s; }

.tpc-social-fab .social-icon.facebook { color: #1877F2; }
.tpc-social-fab .social-icon.facebook:hover { background: #1877F2; color: white; border-color: #1877F2; }
.tpc-social-fab .social-icon.twitter { color: #000000; }
.tpc-social-fab .social-icon.twitter:hover { background: #000000; color: white; border-color: #000000; }
.tpc-social-fab .social-icon.instagram { color: #E4405F; }
.tpc-social-fab .social-icon.instagram:hover { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: white; border-color: transparent; }
.tpc-social-fab .social-icon.linkedin { color: #0A66C2; }
.tpc-social-fab .social-icon.linkedin:hover { background: #0A66C2; color: white; border-color: #0A66C2; }
.tpc-social-fab .social-icon.youtube { color: #FF0000; }
.tpc-social-fab .social-icon.youtube:hover { background: #FF0000; color: white; border-color: #FF0000; }
.tpc-social-fab .social-icon.tiktok { color: #000000; }
.tpc-social-fab .social-icon.tiktok:hover { background: #000000; color: #00f2ea; border-color: #000000; }
.tpc-social-fab .social-icon.discord { color: #5865F2; }
.tpc-social-fab .social-icon.discord:hover { background: #5865F2; color: white; border-color: #5865F2; }
.tpc-social-fab .social-icon.github { color: #181717; }
.tpc-social-fab .social-icon.github:hover { background: #181717; color: white; border-color: #181717; }
.tpc-social-fab .social-icon.whatsapp { color: #25D366; }
.tpc-social-fab .social-icon.whatsapp:hover { background: #25D366; color: white; border-color: #25D366; }
.tpc-social-fab .social-icon.telegram { color: #26A5E4; }
.tpc-social-fab .social-icon.telegram:hover { background: #26A5E4; color: white; border-color: #26A5E4; }

/* Original brand colours are used in every theme — the white chip
   background keeps black marks (X, TikTok, GitHub) visible in dark mode */

.tpc-social-fab .social-icon:hover { transform: scale(1.15); }

.tpc-social-fab .social-icon svg {
  width: 22px;
  height: 22px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .tpc-navbar { padding: 0.75rem 1rem; }
  .tpc-navbar .nav-links { display: none; }
  .tpc-navbar .nav-actions { gap: 0.35rem; }

  .tpc-navbar .nav-actions .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem;
    border-radius: 8px;
  }

  .tpc-navbar .theme-toggle {
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  .tpc-navbar .theme-toggle svg { width: 16px; height: 16px; }

  /* Mobile: hide the logo entirely to free up space so the
     "Get a Tutor" button stays visible on narrow screens */
  .tpc-navbar .logo { display: none; }

  .tpc-navbar .view-tab {
    padding: 0.4rem 0.7rem;
    font-size: 0.75rem;
  }
  .tpc-navbar .view-tab.icon-only { padding: 0.4rem 0.55rem; }
  .tpc-navbar .view-tab svg { width: 14px; height: 14px; }

  .tpc-social-fab {
    right: 1rem;
    bottom: 6rem;
    top: auto;
    transform: none;
  }

  .tpc-social-fab .social-icons-container {
    top: auto;
    bottom: 60px;
  }
}

@media (max-width: 640px) {
  .tpc-floating-logo {
    width: 100px;
    height: 100px;
    bottom: 1.5rem;
    left: 1.5rem;
  }
}
