.navbar-nav .dropdown-menu {
  left: 0;
  /* transform: translateX(-50%); */
  width: 80vw;
  border-top: 3px solid #007bff;
  display: block;
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, max-height 0.4s ease;
}

@media (min-width: 992px) {
  .navbar-nav .dropdown-menu {
    width: 80vw;
  }
}

@media (max-width: 991.98px) {
  .navbar-nav .dropdown-menu {
    width: 100%;
    max-width: 100vw;
  }
}

.navbar-nav .dropdown:hover .dropdown-menu,
.navbar-nav .dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  max-height: 500px;
}

.dropdown-toggle::after {
  transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle::after,
.dropdown:focus-within .dropdown-toggle::after {
  transform: rotate(180deg);
}

.mega-menu-content {
  display: flex;
  flex-wrap: wrap;
  /* padding: 1rem; */
}

.mega-menu-column {
  flex: 1 1 25%;
  min-width: 200px;
  padding: 1rem;
}

.mega-menu-column h6 {
  border-bottom: 2px solid #007bff;
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.mega-menu-column a {
  display: block;
  color: #333;
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 0.2s;
}

.mega-menu-column a:hover {
  color: #007bff;
}

@media (max-width: 992px) {
  .navbar-nav .dropdown-menu {
    position: static;
    transform: none;
    width: 100%;
    max-height: none;
    opacity: 1;
    visibility: visible;
    border: none;
    left: 0;
    right: 0;
  }

  .mega-menu-content {
    flex-direction: column;
    display: block !important;
    grid-template-columns: 1fr !important;
    padding: 0;
  }

  .mega-menu-column {
    width: 100% !important;
    min-width: 100% !important;
    padding: 0.5rem !important;
  }
}

.top-flex-bar {
  font-family: Inter;
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  align-items: center;
  width: 100%;

  a {
    padding: 0 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: lighter;

    &:hover {
      text-decoration: underline;
      color: rgba(255, 255, 255, 0.9);
    }
  }
}

/* Quick Links Custom Collapsible Styles */
.quick-links-collapsible {
  width: 100%;
  background-color: #000;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease-in-out;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.quick-links-collapsible.open {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.quick-links-content {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0;
}

.quick-link-item {
  display: block;
  padding: 0.5rem 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 14px;
  font-family: Inter, sans-serif;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.quick-link-item:last-child {
  border-bottom: none;
}

.quick-link-item:hover,
.quick-link-item:focus {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.quick-link-item em {
  opacity: 0.8;
}

.quick-links-chevron {
  transition: transform 0.35s ease-in-out;
}

/* Make top-menu position relative for collapsible flow */
.top-menu {
  position: relative;
}

/* Hide collapsible on desktop */
@media (min-width: 992px) {
  .quick-links-collapsible {
    display: none;
  }
}

/* Mobile responsive styles for top menu */
@media (max-width: 991.98px) {
  .navbar-toggler {
    padding: 0.5rem;
  }

  /* Ensure mega menu columns stack on mobile */
  .mega-menu-content {
    flex-direction: column;
    display: block !important;
  }

  .mega-menu-column {
    width: 100%;
    min-width: unset;
  }

  /* Make navbar collapse properly on mobile */
  .navbar-collapse {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: hidden;
  }

  /* Prevent horizontal overflow */
  .navbar-nav {
    width: 100%;
  }

  .dropdown-menu {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
}

/* Desktop - ensure top bar is always visible */
@media (min-width: 992px) {
  #topbarNavDropdown {
    display: flex !important;
  }
}

/* Mobile navbar styles */
.mobile-navbar {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.offcanvas-body .accordion-button {
  background-color: transparent;
  box-shadow: none;
  padding: 1rem 0;
  font-weight: 500;
}

.offcanvas-body .accordion-header:has(.standalone-link) {
  padding: 1rem 0;
}

.offcanvas-body .standalone-link {
  display: block;
  color: #21325b;
  font-size: 1rem;
  font-weight: 500;
  /* padding: 0.75rem 1.25rem; */
  /* padding: 1.25rem 0; */
  width: 100%;
  /* border-bottom: 1px solid #21325b; */
}

.offcanvas-body .accordion-button:not(.collapsed) {
  background-color: transparent;
  color: #377dff;
}

.offcanvas-body .accordion-button:focus {
  box-shadow: none;
  border-color: transparent;
}

.offcanvas-body .accordion-item {
  border: none;
  border-bottom: 1px solid #e7eaf3;
}

.offcanvas-body .accordion-body {
  padding: 0.5rem 1rem;
}

.offcanvas-body .accordion-body a {
  color: #677788;
  transition: color 0.2s;
}

.offcanvas-body .accordion-body a:hover {
  color: #377dff;
}

.btn-green {
  background-color: #27c229;
  border: none;
}

@media (min-width: 992px) {
  .d-lg-block {
    display: block !important;
  }
}

#exampleModal form.p-4 {
  .card-header {
    padding: 1.5rem 2rem 1rem 2rem;

    h2 {
      color: #1d2e58;
    }
  }

  .card-body {
    padding-top: 0.5rem;
  }

  label.form-label,
  input {
    font-size: 14px;
  }
}

#header {
  min-height: 120px;
}

@media (max-width: 768px) {
  #header {
    min-height: 122px;
  }
}

.booking-modal {
  --bs-modal-width: 950px;
}

.booking-modal .modal-content {
  padding: 2rem 2rem;
  /* padding: 4rem 2rem; */
  background-color: #f2f4f8;

  img.booking-img {
    max-height: 35vh;
    object-fit: contain;
  }

  .form-card {
    padding: 2rem 0;
    /* box-shadow: 0px 0px 8px 0px rgba(0, 0, 0, .25); */
  }
}

.book-demo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;

  .left-text {
    /* padding: 2rem 0; */
    text-align: center;

    display: flex;
    flex-direction: column;
    justify-content: space-between;

    h2 {
      padding-top: 2rem;
      font-weight: 700;
      font-size: 34px;
      color: #332c5c;
    }

    p {
      font-weight: 500;
    }
  }

  form > * + * {
    margin-top: 1rem;
  }

  form {
    button[type="submit"] {
      margin-top: 2rem;
    }
  }

  .form-heading {
    padding-bottom: 4rem;
  }

  label {
    color: #222222;
  }

  .input-container {
    padding: 8px 12px;
    border: 1px solid #c0cdd6;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 0.5rem;

    .input-icon {
      width: 24px;
      aspect-ratio: 1;
      color: black;
    }

    input {
      background-color: #f2f4f8;
      padding: 0.5rem;
    }
  }
}

@media (max-width: 768px) {
  .booking-modal .modal-content {
    padding: 1rem;

    .form-card .card-body {
      padding: 1rem;
    }
  }

  .book-demo-grid {
    grid-template-columns: 1fr;

    .left-text {
      display: none;
    }
  }

  footer {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

@media (max-width: 768px) {
  #header,
  #footer {
    .top-menu.bg-top-header.navbar-topbar.bg-black {
      .container {
        padding-right: 0.5rem !important;
        padding-left: 0.5rem !important;
      }
    }
  }
}

#contactWaForm {
  button[type="submit"] {
    width: 100%;
  }
}

#contactWAButton {
  padding: 0.75rem;
  border-radius: 50%;
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 100;

  svg {
    width: 32px;
  }
}

.popover {
  position: fixed;
  min-width: 350px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  padding: 1rem;
  display: none;
  z-index: 1000;

  bottom: 5.5rem;
  right: 1rem;
}

.popover[data-open="true"] {
  display: block;
}

.popover::after {
  content: "";
  position: absolute;
  bottom: -8px;
  right: .75rem;
  transform: translateX(-50%);
  border-width: 8px 8px 0;
  border-style: solid;
  border-color: #fff transparent transparent;
}

#contactPopover {
  h3 {
    font-size: 1.4rem;
    text-align: center;
    margin-bottom: 0;
    /* padding-bottom: 1rem; */
  }

  p {
    font-size: 1rem;
    text-align: center;
    padding-bottom: 1rem;
  }
}