
/* ========================================================
   THEME TOGGLE PILL SWITCH (Universal)
   ======================================================== */
.theme-toggle-btn {
  position: relative;
  width: 54px;
  height: 28px;
  border-radius: 999px;
  border: none;
  outline: none;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.2);
  transition: background 0.35s ease, box-shadow 0.35s ease;
  display: inline-flex;
  align-items: center;
}

.theme-toggle-btn::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.theme-toggle-btn .icon-dark,
.theme-toggle-btn .icon-light {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  line-height: 1;
  transition: opacity 0.2s ease;
  z-index: 0;
  pointer-events: none;
}

.theme-toggle-btn .icon-dark {
  right: 6px;
  color: rgba(255, 255, 255, 0.75);
  opacity: 1;
}

.theme-toggle-btn .icon-light {
  left: 6px;
  color: #f59e0b;
  opacity: 0;
}

body.light-mode .theme-toggle-btn {
  background: #2f86ff;
  box-shadow: inset 0 0 0 1.5px rgba(47, 134, 255, 0.5), 0 3px 10px rgba(47, 134, 255, 0.3);
}

body.light-mode .theme-toggle-btn::before {
  transform: translateX(26px);
}

body.light-mode .theme-toggle-btn .icon-dark {
  opacity: 0;
}

body.light-mode .theme-toggle-btn .icon-light {
  opacity: 1;
}

.navbar-toggler {
  padding: 4px 8px !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

body.light-mode .navbar-toggler {
  border-color: rgba(0, 0, 0, 0.2) !important;
}

body.light-mode .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%230f172a' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* ========================================================
   EXACT MOBILE DRAWER DESIGN MATCH (With Fixes)
   ======================================================== */
@media (max-width: 991px) {
  .offcanvas {
    border-right: none;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.1);
    max-width: 320px;
    /* Increased to fit logo perfectly */
  }

  .offcanvas-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: none;
  }

  /* Scale down the logo slightly for mobile */
  .offcanvas-header .navbar-brand h2 {
    font-size: 1.3rem !important;
  }


  .offcanvas-body {
    padding: 0 1.5rem 2rem;
  }

  .offcanvas .nav-item {
    margin-bottom: 0.35rem;
  }

  .offcanvas .nav-link {
    font-size: 1.05rem;
    font-weight: 600;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    transition: background 0.3s, color 0.3s;
  }

  /* --- Mobile Login Button --- */
  .offcanvas .button .dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background-color: #1976D2 !important;
    color: #ffffff !important;
    padding: 0.75rem 1rem;
    border-radius: 50px !important;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
    border: none;
  }

  .offcanvas .button .dropdown-toggle::after {
    margin-left: 8px;
  }

  /* --- Submenu styling --- */
  .offcanvas .dropdown-menu {
    border: none;
    background: transparent !important;
    box-shadow: none !important;
    padding-left: 1rem;
    margin-top: 0;
    padding-top: 0;
  }

  .offcanvas .dropdown-item {
    font-weight: 500;
    padding: 0.4rem 0;
  }

  /* === Mobile Light Mode Specifics === */
  body.light-mode .offcanvas {
    background-color: #ffffff;
  }

  body.light-mode .offcanvas .nav-link {
    color: #334155;
  }

  body.light-mode .offcanvas .nav-link.active {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
  }

  body.light-mode .offcanvas .dropdown-item {
    color: #475569 !important;
  }

  /* Ensure the close button is visible in light mode */
  body.light-mode .btn-close {
    filter: none !important;
  }

  /* === Mobile Dark Mode Specifics === */
  body:not(.light-mode) .offcanvas {
    background-color: #0B1120;
  }

  body:not(.light-mode) .offcanvas-header h2 {
    color: #ffffff !important;
  }

  body:not(.light-mode) .offcanvas .nav-link {
    color: #F8FAFC;
  }

  body:not(.light-mode) .offcanvas .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
  }

  body:not(.light-mode) .offcanvas .dropdown-item {
    color: #CBD5E1 !important;
  }

  /* Ensure the close button is visible in dark mode */
  body:not(.light-mode) .btn-close {
    filter: invert(1) !important;
  }
}

/* ========================================================
   TERMS OF SERVICE SPECIFIC CSS (FIXED BLACK BOXES)
   ======================================================== */
.legal {
  min-height: 50vh;
}

.legal_heading {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.legal_heading span {
  font-size: 1.25rem;
  font-weight: 700;
  color: #3b82f6 !important;
  /* Forces a nice visible blue */
  background: transparent !important;
  /* Removes the ugly black box */
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-block;
}

.legal p,
.legal ul li {
  color: #CBD5E1 !important;
  background: transparent !important;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.legal a {
  color: #3b82f6;
  text-decoration: underline;
}

/* LIGHT MODE OVERRIDES FOR LEGAL TEXT */
body.light-mode {
  background-color: #f1f5f9 !important;
  color: #0f172a !important;
}

body.light-mode .header {
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(47, 134, 255, 0.08), transparent), #f8fafc !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .header h2 {
  color: #0f172a !important;
}

body.light-mode .header p {
  color: #475569 !important;
}

body.light-mode .legal_heading {
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.light-mode .legal_heading span {
  color: #1d4ed8 !important;
  /* Darker blue in light mode */
  background: transparent !important;
  /* Removes the ugly black box */
}

body.light-mode .legal p,
body.light-mode .legal ul li {
  color: #475569 !important;
  background: transparent !important;
}

/* Dark Mode Overrides (Safety) */
body:not(.light-mode) .header h2 {
  color: #ffffff !important;
}

body:not(.light-mode) .header p {
  color: #CBD5E1 !important;
}


/* ========================================================
   CREATIVE, HIGH-END FOOTER
   ======================================================== */
.footer-wrap {
  background: #030712;
  position: relative;
  padding-top: 5rem;
  overflow: hidden;
}

.footer-horizon {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(47, 134, 255, 0.6), rgba(139, 92, 246, 0.6), transparent);
  box-shadow: 0 0 30px 2px rgba(47, 134, 255, 0.4);
}

.footer_links h4 {
  color: #f8fafc;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.footer_links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer_links ul li {
  margin-bottom: 1rem;
}

.footer_links ul li a {
  color: #64748b;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
}

.footer_links ul li a:hover {
  color: #e2e8f0;
  transform: translateX(4px);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.footer_about p {
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.7;
  margin-top: 1.5rem;
}

.footer-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(34, 208, 126, 0.1);
  border: 1px solid rgba(34, 208, 126, 0.2);
  padding: 8px 16px;
  border-radius: 50px;
  color: #22d07e;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 1.5rem;
}

.footer-status .pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22d07e;
  box-shadow: 0 0 10px #22d07e;
  animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
  0% {
    transform: scale(0.95);
    opacity: 1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.7;
  }

  100% {
    transform: scale(0.95);
    opacity: 1;
  }
}

.footer_bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 4rem;
  padding: 2rem 0;
  background: rgba(0, 0, 0, 0.2);
}

.footer_bottom p {
  color: #475569;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ── MOBILE FOOTER FIX ── */
@media (max-width: 768px) {

  .footer-wrap .footer_links,
  .footer-wrap .footer_links .row,
  .footer-wrap .footer_links .row>div,
  .footer-wrap .col-lg-8,
  .footer-wrap .col-md-4,
  .footer-wrap .col-sm-6,
  .footer-wrap .col-lg-4,
  .footer-wrap .col-md-12 {
    text-align: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .footer-wrap .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .footer-wrap .footer_links ul {
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
    text-align: center !important;
    width: 100% !important;
  }

  .footer-wrap .footer_links ul li {
    display: block !important;
    text-align: center !important;
    width: 100% !important;
    padding: 0 !important;
    line-height: 2.2 !important;
  }

  .footer-wrap .footer_links ul li a {
    display: block !important;
    text-align: center !important;
    width: 100% !important;
    padding: 0 !important;
    position: static !important;
    letter-spacing: normal !important;
  }

  .footer-wrap .footer_links ul li a::before {
    display: none !important;
  }

  .footer-wrap .footer_links ul li a:hover {
    transform: none !important;
    letter-spacing: normal !important;
  }

  .footer-wrap .footer_links h4 {
    text-align: center !important;
  }

  .footer-wrap .footer_about {
    text-align: center !important;
    margin-top: 1rem !important;
  }

  .footer-wrap .footer_about .d-flex {
    justify-content: center !important;
  }

  .footer-wrap .footer_about p {
    margin: 1rem auto 0 !important;
    max-width: 320px;
    text-align: center !important;
  }

  .footer-wrap .footer-status {
    margin: 1.2rem auto 0 !important;
  }

  .footer-wrap .footer_bottom .row {
    text-align: center !important;
    gap: 1rem;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}
/* ========================================================
   PREMIUM LEGAL SECTION - INTERACTIVE BLOCK EFFECTS
   ======================================================== */

.legal {
    background: var(--bg-page) !important;
    padding-top: 2rem !important;
    padding-bottom: 6rem !important;
}

/* The Main Container */
.legal .container-custom {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 20px !important;
    padding: 4rem 5rem !important;
    max-width: 900px !important;
    margin: 0 auto !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
    counter-reset: legal-section; /* Sets up automatic numbering */
}

/* 1. Turn Headings into Floating "Card" Headers */
.legal .legal_heading {
    height: auto !important;
    border-top: none !important;
    background: linear-gradient(90deg, rgba(47, 134, 255, 0.08), transparent) !important;
    border-left: 4px solid #2f86ff !important;
    border-radius: 8px !important;
    padding: 1.2rem 1.5rem !important;
    margin-top: 3.5rem !important;
    margin-bottom: 1.5rem !important;
    transition: all 0.3s ease;
}

.legal .legal_heading:first-child {
    margin-top: 0 !important;
}

/* Heading Hover Effect */
.legal .legal_heading:hover {
    background: linear-gradient(90deg, rgba(47, 134, 255, 0.15), rgba(47, 134, 255, 0.02)) !important;
    transform: translateX(6px);
}

/* Format the text and add the automatic numbers */
.legal .legal_heading span {
    position: static !important;
    background-color: transparent !important;
    color: var(--text-primary) !important;
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    text-transform: none !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    counter-increment: legal-section;
}

.legal .legal_heading span::before {
    content: counter(legal-section) ". ";
    color: #2f86ff;
    font-weight: 900;
    font-size: 1.5rem;
}

/* 2. Interactive Text Blocks (The "Separate Card" Illusion) */
.legal p, .legal ul {
    color: var(--text-secondary) !important;
    font-size: 1.05rem !important;
    line-height: 1.8 !important;
    margin-bottom: 1.2rem !important;
    padding: 1.2rem 1.5rem !important;
    background: rgba(255, 255, 255, 0.02) !important; /* Soft card background */
    border: 1px solid rgba(255, 255, 255, 0.03) !important;
    border-radius: 12px !important;
    transition: all 0.3s ease;
}

/* Text Block Hover Effect */
.legal p:hover, .legal ul:hover {
    background: rgba(255, 255, 255, 0.04) !important;
    border-color: rgba(47, 134, 255, 0.25) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.legal ul li {
    margin-bottom: 0.5rem !important;
}

.legal a {
    color: #2f86ff !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: color 0.3s ease;
}

.legal a:hover {
    text-decoration: underline !important;
    color: #16d3e0 !important;
}

/* 3. Header Title Updates */
.header .text-center h2 {
    font-size: 3rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.03em;
    margin-bottom: 1rem !important;
}

.header .text-center p {
    display: inline-block !important;
    background: rgba(47, 134, 255, 0.1) !important;
    color: #2f86ff !important;
    padding: 8px 20px !important;
    border-radius: 50px !important;
    border: 1px solid rgba(47, 134, 255, 0.2) !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    margin-bottom: 2rem !important;
}

/* 4. Light Mode Protection */
body.light-mode .legal .container-custom {
    background: #ffffff !important;
    border-color: rgba(0,0,0,0.08) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04) !important;
}
body.light-mode .legal .legal_heading {
    background: linear-gradient(90deg, rgba(47, 134, 255, 0.08), transparent) !important;
}
body.light-mode .legal .legal_heading:hover {
    background: linear-gradient(90deg, rgba(47, 134, 255, 0.12), rgba(47, 134, 255, 0.02)) !important;
}
body.light-mode .legal p, 
body.light-mode .legal ul {
    background: #f8fafc !important;
    border-color: rgba(0,0,0,0.05) !important;
    color: #475569 !important;
}
body.light-mode .legal p:hover, 
body.light-mode .legal ul:hover {
    background: #ffffff !important;
    border-color: rgba(47, 134, 255, 0.3) !important;
    box-shadow: 0 8px 20px rgba(47, 134, 255, 0.08);
}
body.light-mode .header .text-center p {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border-color: #bfdbfe !important;
}

/* Mobile Tweaks */
@media (max-width: 768px) {
    .legal .container-custom {
        padding: 2rem 1.2rem !important;
        border-radius: 16px !important;
    }
    .legal .legal_heading span {
        font-size: 1.2rem !important;
    }
    .legal p, .legal ul {
        padding: 1rem !important;
        font-size: 0.95rem !important;
    }
}