/* Structure */
.header {
  position: relative;
  z-index: 99999;
  background-color: #f8f9fa;
  padding: 0.5rem 1rem;
  box-shadow: 2px 7px 15px 5px rgba(0, 0, 0, 0.1);
}

@media (max-width: 991px) {
  .header {
    position: fixed;
    top: 1rem;
    left: 1rem;
    right: 1rem;
    z-index: 1000;
    border-radius: 16px;
    background-color: #f8f9fa;
    box-shadow: 0px 0px 30px 10px rgb(0 0 0 / 12%);
    padding: 0.75rem 0.5rem;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
  }

  body {
    padding-top: 90px; /* adjust based on the header height + margin */
  }
}

@media screen and (min-width: 991px) {
  .header {
    padding-right: 3rem;
  }
  .header__nav__list {
  gap: 0 !important;
  }
  .header__nav {
    justify-content: flex-end !important;
  }
  .header__metanav {
    max-width: 90px;
  }
}

@media (max-width: 991px) {
  .nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 999; /* Just behind the navbar */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
  }

  .nav-overlay.active {
    opacity: 1;
    visibility: visible;
  }

  .header {
    z-index: 1000; /* Above the overlay */
  }
}







.header__content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

/* LOGO SECTION */
.header__logo-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

@media screen and (max-width: 991px) {
  .header__logo-wrap { 
    justify-content: space-between;
    width: 100%;
  }
}

.header__logo-link {
  display: inline-flex;
  align-items: center;
}


@media screen and (max-width: 991px) {
  .header__logo {
    max-width: 190px;
  }
}

@media screen and (min-width: 991px) {
  .header__logo {
    max-width: 230px;
  }
  .header__nav {
    justify-content: center;
  }
  .header__metanav {
    max-width: 90px;
  }
}

.header__logo {
  height: auto;
}

/* NAVIGATION */
.header__nav {
  flex: 2;
  display: flex;
}

.header__nav__list {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  padding: 0;
  margin: 0;
}

.header__nav__list a {
  text-decoration: none;
  font-weight: 300;
  color: black;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: background-color 0.3s ease, color 0.3s ease; /* Add this */
}

.header__nav__list a:hover {
  background-color: rgba(87, 79, 214, 0.15);
  color: #574fd6; /* Optional: adds a subtle color shift */
}

@media screen and (min-width: 991px) {
  .header__nav__list a {
    font-size: 1rem;
  }
  #mainNav > ul > li > .active {
    color: #574fd6 !important;
    border-radius: 6px !important;
    background-color: rgba(87, 79, 214, 0.15) !important;
    font-weight: 500 !important;
  }
}

/* RIGHT SECTION */
.header__metanav {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  margin-left: 2rem;
}

.button--lg,
.login-desktop {
  background-color: #6c63ff;
  transition: background-color 0.3s ease; 
  color: white;
  padding: 0.6rem 2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2rem;
}

.button--lg:hover {
  background-color: #574fd6;
  color: white;
}

.nav-icon {
  text-decoration: none;
  font-size: 1.2rem;
}

/* MOBILE CONTROLS */
.header__mobilebtn-wrap {
  display: none;
  gap: 0.5rem;
}

.header__mobilebtn {
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
}

.login-mobile:hover {
  color: white;
}

.login-mobile {
  background-color: #6c63ff;
  transition: background-color 0.3s ease; 
  color: white;
  padding: 0.4rem 1.2rem;
  border-radius: 6px;
  font-weight: bold;
  text-decoration: none;
  font-size: 1rem;
}

@media (max-width: 991px) {
  .nav-link {
    max-height: 3rem;
  }

  .header__nav {
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    overflow: hidden;
    transition:
      visibility 0s linear 0.3s,
      opacity 0.3s ease,
      transform 0.3s ease,
      max-height 0.3s ease;
    flex-direction: column;
    width: 100%;
    margin-top: 0;
    flex-basis: 100%;
    max-height: 0;
  }

  .header__nav.show {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0s;
    max-height: 500px; /* Adjust if your nav gets taller */
  }

  .header__nav__list {
    flex-direction: column;
    gap: 1rem;
  }
}


/* RESPONSIVE */
@media (max-width: 991px) {
  .header__metanav {
    display: none;
    flex-direction: row;
    justify-content: flex-start;
    margin-top: 1rem;
    margin-left: 1.8rem;
    margin-bottom: 1rem;
  }

  body.nav-expanded .header__metanav {
    display: flex;
  }

  .header__mobilebtn-wrap {
    display: flex;
  }

  .login-desktop {
    display: none;
  }
}

footer {
  margin-top:5rem !important;
  background-color: #f8f9fa;
}

.footer-content {
    display: flex;
    flex-direction: column; /* Stack the content blocks vertically */
    align-items: center; /* Center-align the content blocks */
    text-align: center; /* Center-align the text within each block */
}

a, a:hover {
  text-decoration: none;
  color:black;
}

.footer-links {
    display: flex;
    justify-content: center; /* Center the links horizontally */
    list-style: none; /* Remove default list styling */
    padding: 0; /* Remove default padding */
    margin: 0; /* Remove default margin to ensure true centering */
}

.footer-links li {
    margin: 0 10px; /* Provide some horizontal spacing between links */
}

.copyright {
  margin-top:2rem !important;  
}

::selection {
  background-color:#b1efe5 !important;
}

button:focus,
input:focus {
  outline: none;
}

@media (max-width:991px) {
  .btn-primary.btn-md.login {
    margin-left: 20px;
    margin-top: 0.5rem;
  }

  .btn-primary.btn-md.signup {
    margin-left: 20px;
    margin-top: 0.5rem;
  }
}

.nav-icon {
  margin-bottom: 0.6rem;
}

#nav-icon {
  transition: all 0.3s ease;
  background-color: transparent !important;
  border: none;
  transition: background-color 0.3s, color 0.3s; 
  border-radius: 20px;
  color: rgb(165, 165, 165) !important;
  width: auto;
}

#nav-icon:hover {
  color: #574fd6 !important;
}

@media (min-width:992px) {
  .nav-svg {
    margin-left: 20px;
  }
}

#preloader-logo-wrapper,
#preloader-spinner-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(5px);
  background: rgba(255, 255, 255, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#preloader-logo {
    width: 120px;
    opacity: 0;
    transform: scale(0.9);
    animation: fadeInScale 1.2s ease-out forwards;
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.02);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.loader {
    border: 6px solid #ccc;
    border-top: 6px solid #6c63ff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#custom-alert-container {
  position: fixed;
  top: 40px; /* adjust this based on your header height */
  left: 50%;
  transform: translateX(-50%);
  z-index: 999999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: auto;
  max-width: 90vw;
  pointer-events: none; /* allow clicks through empty space */
}

.custom-alert {
  background-color: #6b63ff;
  color: white;
  padding: 15px 25px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  font-family: sans-serif;
  position: relative;
  animation: slideDown 0.3s ease;
  pointer-events: auto; /* clickable */
  min-width: 280px;
  max-width: 500px;
  text-align: center;
}

.custom-alert .close-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#confirm-message {
  font-size: 0.9rem;
}

#custom-confirm-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
}

#custom-confirm-modal.hidden {
  display: none;
}

.confirm-backdrop {
  position: absolute;
  backdrop-filter: blur(4px);
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  top: 0;
  left: 0;
}

.confirm-box {
  background: white;
  padding: 25px 30px;
  border-radius: 8px;
  z-index: 1;
  max-width: 400px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  text-align: center;
  font-family: sans-serif;
  margin-right: 1rem;
  margin-left: 1rem;
}

.confirm-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 15px;
}

.confirm-actions button {
  padding: 8px 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

#confirm-yes {
  background-color: #6b63ff;
  color: white;
}

#confirm-no {
  background-color: #ccc;
}

#alert-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 300px;
  z-index: 999999;
}

.alert-box {
  position: relative;
  background-color: #6b63ff;
  color: white;
  padding: 15px 40px 15px 15px;
  border-radius: 5px;
  font-family: sans-serif;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.58);
}

.alert-box .close-btn {
  position: absolute;
  top: 5px;
  right: 8px;
  background: none;
  border: none;
  font-size: 18px;
  color: white;
  cursor: pointer;
}

.alert-box .close-btn:focus {
  outline: none;
}
