
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css");

/* ================= css to show messages popup after submit page ================= */
.premium-toast {
   background: linear-gradient(135deg, #00c853, #64dd17);
   color: white;
   border-radius: 12px;
   padding: 12px 20px;
   box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
   animation: slideIn 0.4s ease;
}
@keyframes slideIn {
   from {
      transform: translateX(100%);
      opacity: 0;
   }

   to {
      transform: translateX(0);
      opacity: 1;
   }
}

/* ================= Global Footer ================= */
.footer-advanced {
  background:
    radial-gradient(circle at 10% 0%, rgba(56, 189, 248, 0.14), transparent 30%),
    radial-gradient(circle at 90% 100%, rgba(34, 197, 94, 0.16), transparent 35%),
    #0b1220;
  border-top: 1px solid rgba(148, 163, 184, 0.2);
}

.footer-advanced h6 {
  letter-spacing: 0.4px;
}

.footer-advanced a {
  transition: color .2s ease, transform .2s ease;
  display: inline-block;
}

.footer-advanced a:hover {
  color: #38bdf8 !important;
  transform: translateX(2px);
}

.footer-social a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
}

.footer-social a:hover {
  transform: translateY(-2px);
  border-color: #38bdf8;
}

@media (max-width: 576px) {
  .footer-social {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    text-align: center;
  }

  .footer-advanced .container.py-3 {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
}

/* ================= Global Header/Navbar ================= */
.navbar.navbar-dark.bg-dark {
  background: linear-gradient(90deg, #020617 0%, #0f172a 100%) !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22) !important;
}

.navbar .navbar-brand img {
  height: 40px;
  border-radius: 8px;
}

.navbar .navbar-nav {
  gap: 4px;
}

.navbar .navbar-nav .nav-link {
  color: #dbeafe !important;
  font-weight: 400;
  font-size: 0.95rem;
  border-radius: 10px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link:focus {
  color: #fff !important;
  background: rgba(37, 99, 235, 0.26) !important;
}

.navbar .navbar-nav .dropdown-toggle::after {
  margin-left: 0.45em;
}

.dropdown-hover:hover > .dropdown-menu {
  display: block;
  margin-top: 0;
}

.contact-dropdown {
  min-width: 260px;
}

.contact-dropdown .dropdown-item {
  cursor: default;
  line-height: 1.35;
  white-space: normal;
}

.contact-dropdown .dropdown-divider {
  opacity: 0.28;
}

.navbar .dropdown-menu {
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  padding: 8px;
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.35);
}

.navbar .dropdown-item {
  border-radius: 8px;
  font-size: 0.95rem;
  padding: 9px 12px;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.navbar .dropdown-item:hover {
  transform: translateX(2px);
}

.navbar .dropdown-menu-dark .dropdown-item:hover {
  background: rgba(59, 130, 246, 0.24);
  color: #fff;
}

.profile-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: 2px solid #667eea;
  object-fit: cover;
  margin-left: 15px;
  transition: 0.3s;
}

.profile-avatar:hover {
  transform: scale(1.1);
  border-color: #0d6efd;
}

.search-box {
  position: relative;
  margin-right: 15px;
}

.search-box input {
  width: 260px;
  padding: 7px 35px 7px 15px;
  border-radius: 20px;
  border: none;
  outline: none;
  background: #1f2937;
  color: #fff;
  transition: 0.3s;
}

.search-box input:focus {
  background: #111827;
  box-shadow: 0 0 8px rgba(13, 110, 253, 0.5);
}

.nav-actions {
  gap: 10px;
}

.navbar .btn.btn-outline-light.btn-sm {
  border-radius: 999px;
  border: 1px solid rgba(191, 219, 254, 0.75);
  color: #e2e8f0;
  font-weight: 600;
  padding: 7px 14px;
  line-height: 1.2;
  transition: all 0.2s ease;
}

.navbar .btn.btn-outline-light.btn-sm:hover,
.navbar .btn.btn-outline-light.btn-sm:focus {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(147, 197, 253, 0.95);
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

@media (max-width: 992px) {
  .navbar .navbar-nav {
    margin-top: 10px;
    gap: 6px;
  }

  .navbar .navbar-nav .nav-link {
    width: 100%;
    justify-content: flex-start;
  }

  .nav-actions {
    width: 100%;
    margin-top: 12px;
    margin-left: 0 !important;
    flex-direction: column;
    align-items: stretch !important;
  }

  .search-box {
    width: 100%;
    margin-right: 0;
  }

  .search-box input {
    width: 100%;
  }

  .navbar a.text-white.position-relative.me-3,
  .navbar .btn.btn-outline-light.btn-sm,
  .navbar .profile-avatar {
    margin-left: 0;
  }

  .navbar a.text-white.position-relative.me-3 {
    margin-right: 0 !important;
    align-self: flex-start;
  }

  .navbar .btn.btn-outline-light.btn-sm {
    width: 100%;
    justify-content: center;
  }
}

.search-box i {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
}

.navbar a.text-white.position-relative.me-3 {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.25);
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.navbar a.text-white.position-relative.me-3:hover {
  background: rgba(37, 99, 235, 0.24);
  border-color: rgba(125, 211, 252, 0.55);
  transform: translateY(-1px);
}

.navbar a.text-white.position-relative.me-3 .bi-cart {
  font-size: 1.2rem;
}

.cart-badge {
  position: absolute;
  top: -6px;
  right: -7px;
  background: #ef4444;
  color: #fff;
  border-radius: 50%;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0f172a;
  font-weight: 700;
}
/* ----- Horizontal Scroll Courses Bar -Wrapper- ---- */
.course-scroll-wrapper {
  width: 100%;
  overflow-x: auto;
  white-space: nowrap;
}

.course-scroll {
  display: flex;
  gap: 12px;
  padding: 10px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.course-scroll::-webkit-scrollbar {
  height: 6px;
}

.course-scroll::-webkit-scrollbar-thumb {
  background: #0d6efd;
  border-radius: 10px;
}

.course-item {
  flex: 0 0 auto;
  padding: 0 10px;
  background: #212529;
  border: 1px solid #343a40;
  border-radius: 20px;
  color: #e0d1d1;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.course-item:hover,
.scroll-course-item:hover {
  color: #fff;
  background: rgba(37, 99, 235, 0.35);
  border-color: rgba(125, 211, 252, 0.55);
  transform: translateY(-1px);
}

/* ================= Global Course Layout ================= */
.toc-mobile-btn {
  display: none;
  width: 100%;
  border: 0;
  background: #111827;
  color: #fff;
  padding: 10px 14px;
  font-weight: 600;
  text-align: left;
}

.layout {
  display: flex;
  height: calc(100vh - 126px);
  overflow: hidden;
}

nav.toc {
  width: var(--scroll-width, 260px);
  background: var(--nav, #1f2937);
  color: #e6eef8;
  padding: 10px 10px 20px;
  overflow-y: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.03);
  flex-shrink: 0;
}

nav.toc h2 {
  margin: 0 0 12px 0;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
}

nav.toc input#tocSearch {
  width: 100%;
  padding: 6px 10px;
  border-radius: 6px;
  border: none;
  margin-bottom: 12px;
  font-size: 14px;
}

nav.toc input#tocSearch:focus {
  outline: none;
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.5);
}

nav.toc ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

nav.toc li {
  margin: 2px 0;
}

nav.toc a {
  display: block;
  color: #cfe6ff;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 14px;
  position: relative;
  transition: all .25s ease;
}

nav.toc a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: transparent;
  border-radius: 2px;
  transition: all .25s ease;
}

nav.toc a.active::before {
  background: var(--indicator, #36a372);
}

nav.toc a:hover {
  background: rgba(255, 255, 255, 0.03);
  color: #fff;
}

nav.toc a.active {
  color: #fff;
  font-weight: 600;
}

nav.toc a.sidebar-action-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: linear-gradient(135deg, #0d6efd, #0b5ed7);
  color: #fff !important;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

nav.toc a.sidebar-action-btn:hover {
  background: linear-gradient(135deg, #0b5ed7, #0a58ca);
  color: #fff !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(13, 110, 253, 0.35);
}

main.content {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
  background: var(--bg, #f5f7fb);
}

section.card {
  background: var(--card, #ffffff);
  border-radius: 12px;
  padding: 22px;
  margin-bottom: 22px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}

section.card h2 {
  margin-top: 0;
  color: var(--primary, #013243);
  font-size: 22px;
}

section.card h3 {
  margin-top: 12px;
  color: #1e40af;
  font-size: 18px;
}

.pre-copy-wrap {
  position: relative;
}

.copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  background: #0f172a;
  color: #fff;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  opacity: .92;
}

.copy-btn:hover {
  opacity: 1;
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.45);
  z-index: 1100;
}

@media (max-width: 992px) {
  .layout {
    flex-direction: column;
    height: auto;
  }

  nav.toc {
    position: fixed;
    left: 0;
    top: 112px;
    height: calc(100% - 112px);
    transform: translateX(-110%);
    transition: transform .28s ease;
    z-index: 1150;
  }

  nav.toc.open {
    transform: translateX(0);
  }

  main.content {
    height: auto;
    overflow: visible;
    padding: 18px;
  }

  .toc-mobile-btn {
    display: block;
  }

  .overlay.show {
    display: block;
  }
}

/* ================= Global Password Toggle ================= */
.password-box {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #64748b;
}

/* ================= Global Shortcut Modal ================= */
#shortcutBtn {
  width: 100%;
  background: var(--accent, #0d6efd);
  color: #fff;
  border: none;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 12px;
  font-weight: 600;
}

#shortcutBtn:hover {
  background: #005fa3;
}

#shortcutModal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1400;
  justify-content: center;
  align-items: center;
}

#shortcutModal .modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 80%;
  overflow-y: auto;
}

#shortcutModal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#shortcutModal .modal-header h3 {
  margin: 0;
  color: var(--primary, #013243);
}

#shortcutModal .close-btn {
  background: transparent;
  border: none;
  font-size: 22px;
  cursor: pointer;
}
