.back-home-btn {
  position: fixed;
  top: 102px;
  right: 18px;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  background: #4f46e5;
  color: #fff;
  text-decoration: none;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 10px 24px rgba(79, 70, 229, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.back-home-btn:hover {
  transform: translateY(-2px);
  background: #4338ca;
  box-shadow: 0 14px 28px rgba(79, 70, 229, 0.45);
  color: #fff;
}

.theme-toggle-btn {
  position: fixed;
  bottom: 90px;
  left: 18px;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.92);
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.theme-toggle-btn:hover {
  transform: translateY(-2px);
  background: #111827;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.36);
  color: #fff;
}

html[data-bs-theme="light"] .theme-toggle-btn {
  background: rgba(255, 255, 255, 0.94);
  color: #0f172a;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}
html[data-bs-theme="light"] .theme-toggle-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}

html[data-bs-theme="light"] {
  --bg-light: #ffffff;
  --section-alt: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.05);
  --hero-bg: radial-gradient(circle at 80% 20%, #eff6ff 0%, #ffffff 100%);
  --navbar-scrolled-bg: rgba(255, 255, 255, 0.92);
  --navbar-mobile-bg: rgba(255, 255, 255, 0.97);
  --collapse-bg: #ffffff;
  --collapse-border: rgba(0, 0, 0, 0.06);
  --cta-row-bg: #eef2ff;
  --input-bg: #f1f5f9;
  --input-focus-bg: #ffffff;
}

html[data-bs-theme="dark"] {
  --bg-light: #08111f;
  --section-alt: #0b1321;
  --text-main: #eaf2ff;
  --text-muted: #a3b1c9;
  --card-bg: #0f172a;
  --card-border: rgba(255, 255, 255, 0.06);
  --hero-bg: radial-gradient(circle at 80% 20%, #0d2045 0%, #08111f 100%);
  --navbar-scrolled-bg: rgba(8, 17, 31, 0.95);
  --navbar-mobile-bg: rgba(8, 17, 31, 0.98);
  --collapse-bg: #0f172a;
  --collapse-border: rgba(255, 255, 255, 0.07);
  --cta-row-bg: rgba(79, 70, 229, 0.14);
  --input-bg: #182235;
  --input-focus-bg: #0f1d30;
}

/* Brand logos — transparent PNGs: use cover so extra canvas/alpha padding doesn’t shrink the mark */
.navbar-brand,
.topbar a.brand-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 0;
  line-height: 0;
  padding: 0;
  text-decoration: none;
}

.navbar-brand .logo-desktop,
.navbar-brand .logo-mobile,
.topbar a.brand-link .logo-desktop,
.topbar a.brand-link .logo-mobile {
  flex-shrink: 0;
  background-image: none !important;
  font-size: 0 !important;
  color: transparent !important;
}

.logo-desktop {
  display: block;
  width: clamp(240px, 52vw, 380px);
  height: 72px;
  max-width: none;
  object-fit: cover;
  object-position: 50% 42%;
}

.logo-mobile {
  display: none;
  width: 60px;
  height: 60px;
  max-width: none;
  object-fit: cover;
  object-position: 50% 30%;
}

.topbar .logo-desktop {
  width: clamp(180px, 32vw, 280px);
  height: 52px;
  object-position: 50% 42%;
}

.topbar .logo-mobile {
  width: 46px;
  height: 46px;
  object-position: 50% 28%;
}

.navbar-brand:hover,
.topbar a.brand-link:hover {
  transform: scale(1.02);
}

@media (max-width: 992px) {
  .logo-desktop {
    display: none !important;
  }
  .logo-mobile {
    display: block !important;
  }
  .back-home-btn {
    top: 92px;
    font-size: 0.82rem;
    padding: 8px 12px;
  }
  .theme-toggle-btn {
    bottom: 86px;
    left: 14px;
    width: 40px;
    height: 40px;
  }
}

/* Large tablets / small laptops */
@media (min-width: 993px) and (max-width: 1199.98px) {
  .navbar-brand .logo-desktop {
    width: clamp(220px, 46vw, 340px);
    height: 64px;
    object-position: 50% 42%;
  }
}
