/* Flexbox layout */
.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.wrapper {
  flex: 1;
}

.toggle-label {
  display: inline-block;
  vertical-align: middle;
  margin-right: 5px;
  font-size: 14px;
}

#backToTop {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99;
  border: none;
  outline: none;
  background-color: #333;
  color: white;
  cursor: pointer;
  padding: 10px;
  border-radius: 4px;
  font-size: 18px;
}

#backToTop:hover {
  background-color: #555;
}

/* Dark mode toggle switch */
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
  top: 5px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 20px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #444;
}

input:checked + .slider:before {
  transform: translateX(20px);
}


/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.dark-mode .navbar-toggler-icon {
  filter: invert(1);
}

.dark-mode .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .navbar-toggler:focus {
  outline: auto;
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

.dark-mode .card {
  background-color: #2c2c2c;
  color: #fff;
}

.dark-mode .card-link,
.dark-mode .card-link:hover {
  color: #ccc;
}

/* Dark mode styles */
body.dark-mode {
  background-color: #333;
  color: #f0f0f0;
}

body.dark-mode .navbar {
  background-color: #222;
}

body.dark-mode .jumbotron {
  background-color: rgba(51, 51, 51, 0.5);
}

body.dark-mode h1 {
  color: #f0f0f0;
}

body.dark-mode #backToTop {
  background-color: #555;
}

body.dark-mode #backToTop:hover {
  background-color: #333;
}

body.dark-mode .navbar.navbar-expand-lg.navbar-light.bg-light {
  background-color: #222 !important;
}

body.dark-mode .navbar.navbar-expand-lg.navbar-light.bg-light .navbar-brand,
body.dark-mode .navbar.navbar-expand-lg.navbar-light.bg-light .nav-link {
  color: #ffffff !important;
}

body.dark-mode .navbar.navbar-expand-lg.navbar-light.bg-light .nav-link:hover {
  color: #cccccc !important;
}

body.dark-mode .jumbotron {
  background-color: rgba(40, 40, 40, 0.8);
}

body.dark-mode .toggle-label {
  color: #ffffff;
}

@media (max-width: 991px) {
  .navbar-collapse.show .dark-mode-switch {
    margin-top: 8px; /* Adjust this value to add more or less space */
  }
  .dropdown-dark-mode {
    color: rgba(0,0,0,.5); /* This is the default Bootstrap link color */
    font-size: 1rem; /* This is the default Bootstrap font size for dropdown items */
  }
}

footer {
  padding: 6px 0;
  text-align: center;
  background-color: #333;
  color: white;
  font-size: 14px;
}
