/*NavBar*/

:root {
  --sidebar-bg-light: #f8f9fa;
  --sidebar-color-light: #212529;
  --sidebar-bg-dark: #212529;
  --sidebar-color-dark: #f8f9fa;

  --sidebar-width-expanded: 240px;
  --sidebar-width-collapsed: 72px;
}

/* Base body styles */
body {
  overflow-x: hidden;
}

/* Dark mode handling */
body.night {
  background-color: #121212;
  color: #f8f9fa;
}

body.night .sidebar {
  background-color: var(--sidebar-bg-dark);
  color: var(--sidebar-color-dark);
}

body:not(.night) .sidebar {
  background-color: var(--sidebar-bg-light);
  color: var(--sidebar-color-light);
}

/* Sidebar base styles */
.sidebar {
  width: var(--sidebar-width-expanded);
  height: 100vh;
  overflow-y: scroll;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease;
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  padding-top: 1rem;
  z-index: 1030; /* IMPORTANT */	
}

.sidebar.collapsed {
  width: var(--sidebar-width-collapsed);
}

/* Hide brand when collapsed */
.sidebar.collapsed .brand {
  display: none !important;
}

/* Nav links */
.sidebar .nav-link {
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s ease;
}

.sidebar.collapsed .nav-link span {
  opacity: 0;
  width: 0;
  transition: opacity 0.2s ease, width 0.3s ease;
}

.sidebar .nav-link .bi {
  font-size: 1rem;
  margin-right: 1rem;
  transition: color 0.3s ease;
}

.sidebar.collapsed .nav-link .bi {
  margin-right: 0;
}

/* Icon colours */
body:not(.night) .sidebar .nav-link .bi {
  color: #555; /* Dark grey in light mode */
}

body.night .sidebar .nav-link .bi {
  color: #ccc; /* Light grey in dark mode */
}

/* Sidebar footer */
.sidebar .mt-auto {
  padding: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Main content */
.main-content {
 /* margin-left: var(--sidebar-width-expanded);*/
  transition: margin-left 0.3s ease;
  padding: 1rem;
  margin-left: 240px;
}

.sidebar.collapsed ~ .main-content {
  margin-left: var(--sidebar-width-collapsed);
  margin-left: 72px;	
}

/* YouTube logo icon colours */
.youtube-icon {
  font-size: 1.8rem;
  transition: color 0.3s ease;
}

body:not(.night) .youtube-icon {
  color: #ff0000; /* Red in light mode */
}

body.night .youtube-icon {
  color: #ff6666; /* Lighter red in dark mode */
}

/* Mode toggle icon styling */
#toggleModeBtn {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#toggleModeBtn .bi {
  font-size: 1.5rem;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }
}
/* =========================================
   NIGHT MODE – GLOBAL TEXT & CARD FIX
   Matches body.night (your system)
   ========================================= */

/* Base night mode text */
body.night {
  background-color: #121212;
  color: #f8f9fa;
}

/* -------------------------------
   CARD BACKGROUNDS
-------------------------------- */
body.night .card {
  background-color: #1e1e1e !important;
  border-color: #444 !important;
}

/* -------------------------------
   CARD TEXT (ALL TYPES)
-------------------------------- */
body.night .card,
body.night .card-body,
body.night .card-title,
body.night .card-text,
body.night .card p,
body.night .card span,
body.night .card li,
body.night .card a,
body.night .card strong,
body.night .card em {
  color: #ffffff !important;
}

/* -------------------------------
   DETAILS / SUMMARY (YOUR FLASH SECTION)
-------------------------------- */
body.night details,
body.night summary {
  color: #ffffff !important;
}

body.night summary::marker {
  color: #ffffff;
}

/* -------------------------------
   BUTTONS (GLOBAL + IN CARDS)
-------------------------------- */
body.night button,
body.night .btn {
  color: #ffffff !important;
}

body.night .card .btn {
  color: #ffffff !important;
}

/* Icons inside buttons */
body.night button i,
body.night .btn i {
  color: #ffffff !important;
}

/* -------------------------------
   LINKS
-------------------------------- */
body.night a {
  color: #9ecbff;
}

body.night a:hover,
body.night a:focus {
  color: #cfe5ff;
}

/* -------------------------------
   FOCUS STATES (WCAG 2.2)
-------------------------------- */
body.night a:focus,
body.night button:focus,
body.night summary:focus {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}
/* =========================================
   NIGHT MODE – REMOVE BANNER BACKGROUND IMAGE
   ========================================= */

body.night .banner,
body.night .hero,
body.night .page-banner {
  background-image: linear-gradient(
    180deg,
    #1a1a1a 0%,
    #121212 100%
  ) !important;
}

