* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  user-select: none;
}

:root {
  /* Background Colors*/
  --kdb-navy-color: #01083a;
  --kdb-orange-color: #ff4e03;
  --background-color: #3b92f6;
  --body-color: #f3f3f3;

  /* Text Colors*/
  --text-color-white: #e1e1e1;
  --textcolor-grey: #333;
}

body {
  background: var(--body-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

/* This wrapper should be used around the main content of a page
   to ensure the footer sticks to the bottom. */
.page-content-wrapper {
  flex: 1 0 auto;
  min-height: 70vh;
}

/* Home page css */

.sticky {
  position: sticky;
  top: 0;
  z-index: 1;
}

/* Modern Navbar Adjustments */
.kdb-navbar {
  background-color: var(--kdb-navy-color) !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.kdb-navbar .nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  transition: color 0.3s ease;
  padding: 0.5rem 1rem !important;
}

.kdb-navbar .nav-link:hover,
.kdb-navbar .nav-link:focus,
.kdb-navbar .nav-item.active .nav-link {
  color: var(--kdb-orange-color) !important;
}

/* Navbar Dropdown Hover Effect (Desktop) */
@media (min-width: 992px) {
  .kdb-navbar .dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
    border: none;
    border-top: 3px solid var(--kdb-orange-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
}

.hero {
  margin-top: 2%;
  min-height: 40vh;
  padding: 2%;
}

.hero-text {
  color: var(--text-color-grey);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.main-sponsor {
  font-size: 1.5em;
  color: var(--textcolor-grey);
}

.btn-cta {
  padding: 10px;
  text-decoration: none;
  color: var(--text-color-white);
  background-color: var(--kdb-navy-color);
  font-size: 16px;
  display: inline;
  border-radius: 15px;
}

.btn-cta.hover:hover {
  color: var(--kdb-navy-color);
  background-color: var(--kdb-orange-color);
  transition: 0.5s;
}

.header-btn {
  background-color: var(--kdb-orange-color);
  color: var(--text-color-white) !important; /* Override header a color */
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.header-btn:hover {
  background-color: transparent;
  color: var(--kdb-orange-color) !important;
  border: 2px solid var(--kdb-orange-color);
}

.card-header-bg {
  background-color: var(--kdb-navy-color);
  color: var(--text-color-white);
}

.footer-container {
  width: 100%;
  min-height: 20vh;
  background-color: var(--kdb-navy-color);
  color: var(--text-color-white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.footer-container a {
  text-decoration: none;
  color: var(--text-color-white);
}

.footer-container .hover:hover {
  color: var(--kdb-orange-color);
  transition: 1s;
}

.footer-icons {
  width: 50%;
  display: flex;
  justify-content: center;
}

.footer-icons a {
  padding: 1% 2%;
  font-size: 1.8em;
  text-decoration: none;
  color: var(--text-color-white);
}

/* Login page css */
.kdb-style {
  color: var(--kdb-navy-color);
  text-decoration: none;
}

.kdb-style.hover:hover {
  color: var(--kdb-orange-color);
  transition: 1s ease-in-out;
  cursor: pointer;
}

/* Register page css */
.bg-register-navy {
  background: radial-gradient(
    circle at center,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.3) 15%,
    rgba(1, 8, 58, 1) 70%,
    rgba(1, 8, 58, 1) 100%
  );
}

/****** Profile page css ******/
/* Mobile Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(180deg, #1e3c72 0%, #2a5298 100%);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 0.5rem 0;
}

.bottom-nav-content {
  display: flex;
  justify-content: space-around;
  align-items: center;
  max-width: 100%;
}

.bottom-nav-item {
  flex: 1;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  padding: 0.5rem;
  transition: all 0.3s;
  font-size: 0.85rem;
}

.bottom-nav-item i {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.menu-toggle {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.menu-toggle:hover {
  color: white;
}

/* Sidebar - Hidden by default */
.sidebar {
  position: fixed;
  top: 0;
  left: -280px;
  height: 100vh;
  width: 280px;
  background: linear-gradient(90deg, #01083a 0%, rgb(2, 34, 89) 100%);
  transition: left 0.3s ease;
  z-index: 1001;
  overflow-y: auto;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar.show {
  left: 0;
}

.sidebar-header {
  padding: 1.5rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 0;
}

.sidebar-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
}

.sidebar-close:hover {
  color: rgba(255, 255, 255, 0.7);
}

.sidebar-nav {
  padding: 1rem 0;
}

.sidebar-nav .nav-link {
  color: rgba(255, 255, 255, 0.8);
  padding: 1rem 1.5rem;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 1rem;
  border-left: 3px solid transparent;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-left-color: white;
}

.sidebar-nav .nav-link i {
  width: 24px;
  text-align: center;
  font-size: 1.1rem;
}

.logout-section {
  position: absolute;
  bottom: 0;
  width: 100%;
  padding: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.1);
}

.logout-section .nav-link {
  color: white;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
}

.logout-section .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.25rem;
}

/* Overlay */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
}

.sidebar-overlay.show {
  display: block;
}

/* Main Content */
.main-content {
  padding: 2rem 1rem;
  min-height: calc(100vh - 70px);
}

.profile-picture-container {
  flex-shrink: 0;
}

.profile-picture {
  width: 150px;
  height: 150px;
  overflow: hidden;
  border: 3px solid #1e3c72;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  position: relative;
  transition: opacity 0.3s ease;
}

.profile-picture:hover {
  opacity: 0.9;
}

.profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 4rem;
}

.upload-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  color: white;
  font-size: 2rem;
}

.profile-picture:hover .upload-overlay {
  opacity: 1;
}

.cards-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

/* courses on profile page*/
.cards-container .course-card {
  flex: 0 0 calc(24.8% - 1rem);
  margin-bottom: 0;
}

/* practice tools page*/
.cards-container .tool-card {
  flex: 0 0 calc(19% - 1rem);
  margin-bottom: 0;
}

/* Admin Page CSS*/
.btn-card {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  height: 100px;
  border-radius: 15px;
  font-size: 1.3rem;
}

.btn-card.hover:hover {
  background-color: var(--kdb-navy-color);
  color: var(--text-color-white);
  transition: 1s;
}

.hover-lift {
  transition:
    transform 0.2s ease-in-out,
    box-shadow 0.2s ease-in-out;
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Student Profile Page Theming */

/* Activity List Group Item Active State */
.list-group-item.active {
  background-color: var(--kdb-navy-color) !important;
  border-color: var(--kdb-navy-color) !important;
}

/* Pills Navigation Styling */
.nav-pills .nav-link {
  color: var(--kdb-navy-color);
  font-weight: 500;
}

.nav-pills .nav-link.active {
  background-color: var(--kdb-navy-color) !important;
  color: var(--text-color-white) !important;
}

.nav-pills .nav-link:hover:not(.active) {
  color: var(--kdb-orange-color);
}

/* Custom KuthoBank Buttons (Primary CTA Style) */
.btn-kdb {
  background-color: var(--kdb-navy-color);
  color: var(--text-color-white);
  border: 1px solid var(--kdb-navy-color);
  transition: all 0.3s ease;
}

.btn-kdb:hover {
  background-color: var(--kdb-orange-color);
  border-color: var(--kdb-orange-color);
  color: var(--kdb-navy-color);
}

/* Custom KuthoBank Outline Buttons */
.btn-outline-kdb {
  background-color: transparent;
  color: var(--kdb-navy-color);
  border: 1px solid var(--kdb-navy-color);
  transition: all 0.3s ease;
}

.btn-outline-kdb:hover {
  background-color: var(--kdb-navy-color);
  color: var(--text-color-white);
}

/* Progress Bar Theming */
.progress-bar.kdb-progress {
  background-color: var(--kdb-navy-color) !important;
}

/* Coming Soon Tooltip for Placeholder Links */
a[href="#"] {
  position: relative;
  cursor: not-allowed !important;
}

/* The main tooltip box */
a[href="#"]::after {
  content: "Coming Soon";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--kdb-navy-color);
  color: var(--text-color-white);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: bold;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 1050;
  border: 1px solid var(--kdb-orange-color);
  margin-bottom: -5px;
}

/* The small downward pointer arrow */
a[href="#"]::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: var(--kdb-orange-color) transparent transparent transparent;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 1051;
  margin-bottom: -11px;
}

/* Hover animation logic */
a[href="#"]:hover::after {
  opacity: 1;
  margin-bottom: 8px; /* Slides the tooltip up slightly */
}

a[href="#"]:hover::before {
  opacity: 1;
  margin-bottom: 2px; /* Slides the arrow up slightly */
}

/* Courses Page UI Additions */
.course-nav-sticky {
  position: sticky;
  top: 60px; /* Accounts for the main navbar height */
  z-index: 1020;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #eaeaea;
}

.course-nav-scroll {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}
.course-nav-scroll::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

.course-section {
  scroll-margin-top: 130px; /* Prevents sticky nav from hiding section titles */
}

/* Desktop Styles */
@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }

  .bottom-nav {
    display: none;
  }

  .main-content {
    padding: 2rem;
    min-height: 100vh;
  }

  .sidebar {
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2);
  }
}

/* Tablet adjustments */
@media (min-width: 576px) and (max-width: 767px) {
  .bottom-nav-item {
    font-size: 0.9rem;
  }

  .bottom-nav-item i {
    font-size: 1.3rem;
  }
}

/* Responsive adjustments for Profile Picture*/
@media (max-width: 576px) {
  .d-flex.align-items-start {
    flex-direction: column;
    align-items: center !important;
    text-align: center;
  }

  .profile-picture {
    width: 120px;
    height: 120px;
  }

  .profile-placeholder i {
    font-size: 3rem;
  }
}

/* Responsive adjustments for cards/courses on Profile page*/
@media (max-width: 992px) {
  .cards-container .card {
    flex: 0 0 calc(50% - 0.75rem);
  }
}

/* Responsive Header Adjustments */
@media (max-width: 991.98px) {
  .navbar-collapse {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .kdb-navbar .dropdown-menu {
    border: none;
    background-color: rgba(255, 255, 255, 0.05);
  }

  .kdb-navbar .dropdown-item {
    color: rgba(255, 255, 255, 0.85);
  }

  .kdb-navbar .dropdown-item:hover {
    background-color: transparent;
    color: var(--kdb-orange-color);
  }

  .navbar-nav .nav-link.header-btn {
    /* Reset button styles to look like a standard nav-link */
    background-color: transparent;
    color: rgba(255, 255, 255, 0.65) !important;
    padding: 0.5rem 0 !important;
    border-radius: 0;
    border: none;
    text-align: left;
    font-weight: 400;
    font-size: 1rem;
  }

  .navbar-nav .nav-link.header-btn:hover {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.85) !important;
    border: none;
  }

  .navbar-nav .getstarted-cta {
    width: 100%;
    margin-top: 0.5rem;
  }
}
