/* wrapper as full-width bar, inner container stays Bootstrap-managed */
.site-header {
  width: 100%;
  display: block;
  background: linear-gradient(to left, #9abcff, #5d93ff) ;

}

/* don't replace Bootstrap's .container behavior — just add spacing and centering */
.site-header .container-fluid {
  padding-top: 1rem;
  padding-bottom: 0.8rem;
  padding-left: 2rem;
  padding-right: 2rem;

  margin: 0 auto;
}

/* use the Bootstrap row/col for layout — just ensure the image keeps its aspect ratio */
.coa-img {
  margin-top: 5px;
  height: 4.5rem;         /* desired visible height */
  max-height: 4.5rem;    /* safety limit */
  width: auto;         /* preserve aspect ratio */
  max-width: 100%;     /* never overflow its column */
  display: inline-block;
  object-fit: contain;
}

#header-title {
  display: inline-block;
  vertical-align: top;
  margin-left: 1rem;
  font-size: 2rem;
  font-weight: bold;
  line-height: 1.2;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#header-col-1 {
  display: flex;
  flex-wrap: nowrap; /* ❌ prevents wrapping */
}

#header-col-2 {
  font-size: 2rem;
  margin-top: 0.5rem;
  display: flex !important;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
}

/* remove default browser focus ring for mouse/touch, keep a clear ring for keyboard focus */
.header-btn {
  font-size: 2rem;
  margin-right: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: none;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

/* hide outline when element is focused via mouse/touch */
.header-btn:focus {
  outline: none;
  box-shadow: none;
}

/* show a tasteful focus ring only for keyboard users */
.header-btn:focus-visible,
.header-btn:focus:not(:focus-visible) {
  outline: none; /* fallback */
}
.header-btn:focus-visible {
  outline: 3px solid rgba(11,94,215,0.18);
  outline-offset: 4px;
  border-radius: 6px;
  box-shadow: 0 0 0 4px rgba(11,94,215,0.08), 0 0 0 1px rgba(11,94,215,0.18);
  outline: none;
}


/* align search parts */
.search-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* the form is placed before the button so scaleX expands left (transform-origin: right) */
.search-form {
  display: inline-block;
  transform-origin: right center;
  transform: scaleX(0);
  transition: transform 200ms cubic-bezier(.2,.8,.2,1), opacity 160ms ease;
  opacity: 0;
  pointer-events: none;
}

/* visible state */
.search-form.open {
  transform: scaleX(1);
  opacity: 1;
  pointer-events: auto;
}

/* inner input sizing */
.search-input {
  display: block;
  width: 240px;              /* desired expanded width */
  max-width: calc(100vw - 160px);
  padding: .35rem .6rem;
  border-radius: .25rem;
  border: 1px solid rgba(0,0,0,.12);
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  font-size: .95rem;
  outline: none;
}

/* when closed keep input not visible and remove focus outline */
.search-form:not(.open) .search-input { caret-color: transparent; }

/* optional: slight scale on button press */
.header-btn:active { transform: scale(.98); }

/* ===== Account Dropdown Styles ===== */
.account-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 220px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 200ms ease, transform 200ms ease, visibility 0s linear 200ms;
  z-index: 1000;
  pointer-events: none;
}

.account-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 200ms ease, transform 200ms ease;
  pointer-events: auto;
}

.account-dropdown-content {
  padding: 0.5rem 0;
}

.account-dropdown-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1.25rem;
  color: #333;
  text-decoration: none;
  font-size: 1rem;
  transition: background-color 150ms ease;
}

.account-dropdown-item:hover {
  background-color: #f8f9fa;
  color: #5887e6;
}

.account-dropdown-item i {
  width: 20px;
  text-align: center;
}

.account-dropdown-divider {
  height: 1px;
  background-color: #e9ecef;
  margin: 0.5rem 0;
}

.account-dropdown-item.text-muted {
  color: #6c757d;
}

.account-dropdown-item.text-muted:hover {
  color: #495057;
  background-color: #f8f9fa;
}

/* center content inside each column of header-row-2 */
#header-row-2 > [class*="col-"] {
  font-size: 1.5rem;;
  padding-top: 0.7rem;
  border-top: 2px solid rgba(0,0,0,.12);
  margin-top: 2rem;
  display: flex;
  align-items: center;    /* vertical center */
  justify-content: center;/* horizontal center */
  text-align: center;     /* fallback for inline content */
}

/* make header relative so megamenu can be positioned full-width under it */
.site-header { position: relative; z-index: 100; }

/* full-width megamenu wrapper */
.nav-mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%; /* right under header */
  width: 100%;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transform-origin: top center;
  transition: opacity 180ms ease, transform 180ms ease, visibility 0s linear 180ms;
  z-index: 90;
}

/* when open make it visible and interactive */
.nav-mega.open {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 180ms ease, transform 180ms ease;
}

/* individual dropdown panels (only one shown at a time) */
.mega-dropdown {
  display: none;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
  padding: 1rem 0;
}

/* visible mega panel */
.mega-dropdown.open { display: block; }

/* keep content aligned with page container */
.nav-mega .container { max-width: 1100px; }
/* highlight trigger on hover (visual only) */


/* for smaller screens adjust size of logo */
/* md >= 768px */
@media (max-width: 768px) {
  .coa-img { height: 2.8rem; }
  #header-title { font-size: 1.3rem; margin-left: 0.7rem;}
  #header-col-2 {  font-size: 1.5rem; }
  #src-toggle { font-size: 1.5rem; margin-right: 0.6rem;}
  .site-header .container-fluid { padding: 1rem 1rem; margin: 0 auto; }
}


/* sm >= 576px */
@media (max-width: 576px) {
  .coa-img { height: 2rem; }
  #header-title { font-size: 1rem; }
  #header-col-2 {  font-size: 1rem; }
  #src-toggle { font-size: 1rem; margin-right: 0.3rem;}
  .site-header .container-fluid { padding: 0.5rem 0.5rem; margin: 0 auto; }  
  .search-input { width: 140px; }
  
  .account-dropdown {
    min-width: 180px;
  }
  
  .account-dropdown-item {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }
}
