/* ========== HEADER STYLING ========== */

#site-header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  background-color: white;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

/* ========== TOP BAR ========== */

.top-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0px 20px;
  background-color: #fff;
  width: 100%;
  position: relative;
  z-index: 10;
}

.top-bar-links ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
}

.top-bar-link {
  display: flex;
  padding: 10px 18px;
  font-weight: bold;
  font-size: 12px;
  text-decoration: none;
  background-color: #0878bd;
  color: #fff;
  border: 1px solid white;
  transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

.top-bar-link-first {
  border-radius: 0px 0px 0px 20px;
}

.top-bar-link-end {
  border-radius: 0px 0px 20px 0px;
}

.top-bar-link:hover,
.top-bar-link:focus {
  background-color: #004080;
  color: white;
}

.top-bar-link .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
}

.top-bar-link .icon i {
  max-width: 18px;
  height: 1;
}

/* ========== SEARCH MODAL ========== */

.search-popup {
  display: none;
  position: fixed;
  top: 20%;
  left: 50%;
  transform: translate(-50%, -20%);
  z-index: 9999;
  background: rgba(0, 0, 0, 0.3);
  width: 100%;
  height: 100%;
}

.search-popup-inner {
  background: #fff;
  padding: 2rem;
  border-radius: 0px 20px 20px 20px;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  position: relative;
  top: 40%;
}

.search-popup form {
  display: flex;
  gap: 0.5rem;
}

.search-popup input[type="search"] {
  flex: 1;
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.search-popup button {
  padding: 10px 16px;
  background: #293574 !important;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.search-popup .close-button {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 1.5rem;
  background: none !important;
  border: none;
  color: #333;
  cursor: pointer;
}

/* ========== MAIN HEADER ========== */

.main-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
}

.container {
  max-width: 1400px;
  width: 100%;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.main-bar,
.container {
  position: relative;
}

.logo {
  flex-shrink: 0;
  max-width: 200px;
  padding-right: 20px;
  overflow: hidden;
}
.logo img {
  max-height: 50px;
  width: auto;
  height: auto;
  display: block;
  transition: all 0.2s ease;
}

#header-menu {
  margin-left: auto;
}

#header-menu .menu {
  display: flex;
  gap: 10px;
  list-style: none;
  align-items: center;
  padding: 0;
  margin: 0;
}

#header-menu .nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 1vw;
  color: #293574;
  font-weight: bold;
  font-size: clamp(0.8rem, 0.8vw + 0.3rem, 1rem);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
}

#header-menu .nav-link span {
  position: relative;
  display: inline-block;
}

#header-menu .nav-link span::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: #efaf33;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

/* Show underline on hover */
#header-menu .nav-link:hover span::after,
#header-menu .nav-link:focus span::after,
#header-menu .nav-link.active span::after {
  transform: scaleX(1);
}

/* ========== MEGA MENU ========== */

.mega-menu {
  display: none;
  position: absolute;
  left: 0;
  top: 122%;
  /* width: 100vw; */
  background: #f4f4f4;
  padding: 30px 5%;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  border-top: 2px solid #ccc;
}

.has-mega-menu.open .mega-menu {
  display: block;
}

.mega-menu-container {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  gap: 40px;
  justify-content: space-between;
}

.mega-menu-column {
  flex: 1;
  align-self: center;
}

.mega-menu-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mega-menu-column ul li {
  padding: 10px 0;
}

.mega-menu-column ul li a {
  display: block;
  font-size: 16px;
  font-weight: bold;
  color: #293574;
  text-decoration: none;
  transition: 0.3s ease;
  text-align: left;
}

.mega-menu-column:nth-child(2) ul li a {
  font-weight: 500;
}

.mega-menu-column:not(:first-child) {
  border-left: 1px solid #ccc;
  padding-left: 30px;
}

.feedback-box {
  padding: 0.5rem 1rem;
  border-left: 1px solid #ccc;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
}

.feedback-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 100%;
  width: 100%;
}

.feedback-text {
  flex: 1;
  text-align: left;
}

.feedback-box h3 {
  color: #293574;
  font-size: 16px !important;
  margin-bottom: 15px;
  display: block;
  font-size: 16px;
  font-weight: bold;
  font-family: archivo, sans-serif;
  color: #293574;
  text-decoration: none;
  transition: 0.3s ease;
  text-align: left;
}

.feedback-text p {
  font-size: 16px;
  color: #333;
  margin-bottom: 10px;
  max-width: 90%;
}

.feedback-image {
  flex-shrink: 0;
}

.feedback-image img {
  max-width: 150px;
  height: auto;
  border-radius: 12px;
}

.mega-button {
  display: inline-block;
  background: #293574;
  color: white;
  text-align: center;
  padding: 12px 20px;
  font-size: 16px;
  text-decoration: none;
  font-weight: bold;
  border-radius: 0px 15px 15px 15px;
  transition: 0.3s;
  margin-top: 15px;
  width: 100%;
  max-width: 250px;
}

.mega-button:hover {
  background: #0878bd;
  color: #fff;
}

.about-us-mega-text {
  padding: 1rem;
  font-size: 16px;
}

/* ========== MOBILE MENU ========== */
#burger {
  all: unset;
  position: relative;
  width: 30px;
  height: 24px;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  visibility: hidden;
  pointer-events: none;
}

#burger span {
  display: block;
  width: 28px;
  height: 3px;
  background: #002855;
  border-radius: 2px;
  transition: 0.3s ease;
  transform-origin: center;
}

/* Transform when mobile menu is open */
body.menu-open #burger span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

body.menu-open #burger span:nth-child(2) {
  opacity: 0;
}

body.menu-open #burger span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

body.menu-open {
  position: fixed;
  overflow: hidden;
  height: 100vh;
  width: 100%;
}

.mobile-search-icon {
  display: none;
  visibility: hidden;
  pointer-events: none;
  font-size: 1.25rem;
  color: #002855;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.mobile-menu-overlay {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: white;
  z-index: 999;
  overflow: hidden;
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.3s ease;
  border-top: 1px solid #ddd;
  padding: 1rem;
}

.mobile-menu-overlay.open {
  transform: scaleY(1);
}

.mobile-menu-inner {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
  max-height: 75vh;
  overflow-y: auto;
  padding: 2rem 1.5rem;
}

.mobile-nav {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

.mobile-nav > li {
  margin-bottom: 1.5rem;
}

.mobile-nav > li > a,
.mobile-nav-link {
  font-weight: 700;
  font-size: 18px;
  display: block;
  text-decoration: none;
  color: #293574;
}

.submenu {
  list-style: none;
  margin: 0.5rem 0 1.5rem 1rem;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: max-height 0.4s ease, opacity 0.3s ease;
}

.submenu.open {
  max-height: 800px;
  opacity: 1;
  pointer-events: auto;
}

.submenu li a {
  display: block;
  font-size: 1rem;
  text-decoration: none;
  color: #293574;
  padding: 0.25rem 0;
}

.cta-box {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #f2f2f2;
  border-left: 4px solid #293574;
}

.cta-title {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.cta-text {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.cta-button {
  display: inline-block;
  background: #293574;
  color: #fff !important;
  padding: 0.5rem 1rem;
  text-align: center;
  text-decoration: none;
  border-radius: 0px 10px 10px 10px;
  font-size: 0.9rem;
  white-space: nowrap;
  max-width: 200px;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

button.submenu-toggle {
  all: unset;
}

.submenu-toggle {
  all: unset;
  cursor: pointer;
  font-size: 1.5rem;
  padding-left: 1rem;
  background: #fff !important;
}

.submenu-caret {
  width: 38px;
  height: 38px;
  transition: transform 0.3s ease;
  color: #efaf33;
  margin-left: 8px;
}

.submenu-toggle.open .submenu-caret {
  transform: rotate(180deg);
}

/* ========== RESPONSIVE ========== */

@media (max-width: 1300px) {
  .feedback-text {
    display: none;
  }
}

@media (max-width: 900px) {
  .hide-on-mobile {
    display: none !important;
  }
}

@media (max-width: 1024px) {
  .logo img {
    max-height: 45px;
  }
}

@media (max-width: 880px) {
  .logo img {
    max-height: 40px;
  }
}

@media (max-width: 768px) {
  #burger {
    display: flex;
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #293574;
    margin-right: 12px;
    visibility: visible;
    pointer-events: auto;
    background: none;
    border: none;
    cursor: pointer;
  }

  .mobile-controls {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  #header-menu {
    display: none;
  }

  #mobile-header {
    display: block;
  }

  .container {
    padding: 0 10px;
    justify-content: space-between;
  }

  .logo img {
    max-height: 35px;
  }

  .submenu a {
    font-size: 16px !important;
    font-weight: 600;
  }
  a.mb-subservice {
    font-weight: 400;
  }
}
