/* =========================
   GLOBAL & FIXED HEADER FIXES
========================= */
html { 
  overflow-x: hidden !important; 
  scroll-behavior: smooth; 
  font-family: "Work Sans", sans-serif; 
}

body { 
  overflow-x: hidden !important; 
  font-size: 14px !important; 
  padding-top: 110px; /* Adjust for fixed header height */
}

/* Offset smooth scroll so sticky header doesn't cover section titles */
section { 
  scroll-margin-top: 110px; 
}

@media (max-width: 991px) { 
  body { padding-top: 70px; } 
  section { scroll-margin-top: 70px; }
}

p, .playfair { 
  font-family: "Work Sans", sans-serif; 
}

/* Force hide the brands slider on mobile and tablets */
@media (max-width: 1000px) {
  #brands {
    display: none !important;
  }
} 

/* =========================
   NAVBAR & DROPDOWN LOGIC
========================= */
.navbar { 
  z-index: 9999 !important; 
  position: relative;
  background-color: #fff !important;
  -webkit-box-shadow: 0 10px 20px 0 rgba(0, 0, 0, .05);
  box-shadow: 0 10px 20px 0 rgba(0, 0, 0, .05);
}

.dropdown-menu { 
  z-index: 10000 !important; 
}

/* DESKTOP BEHAVIOR (992px and up) */
@media (min-width: 992px) {
  .navbar .nav-item.dropdown { 
    position: static !important; 
  }
  
  .navbar .dropdown-menu {
    display: none;
    width: 100%;
    left: 0;
    right: 0;
    /* Sit perfectly below the white nav bar */
    top: 100% !important;
    margin-top: 0 !important; 
    border-radius: 0;
    border: none;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
  }

  /* Show menu on hover */
  .navbar .nav-item.dropdown:hover > .dropdown-menu { 
    display: block !important; 
  }

  /* THE INVISIBLE BRIDGE: Prevents the menu from vanishing */
  .navbar .dropdown-menu::before {
    content: '';
    position: absolute;
    top: -30px; /* Reaches UP 30 pixels to cover the gap */
    left: 0;
    width: 100%;
    height: 30px;
    background-color: transparent; /* Completely invisible */
  }

  /* Ensure the cursor changes */
  .navbar .nav-link {
    cursor: pointer !important;
  }
}

/* MOBILE BEHAVIOR (Below 992px) */
@media (max-width: 991px) {
  .navbar-collapse .dropdown-menu {
    position: static !important;
    display: none;
    width: 100% !important;
    background-color: #fcfcfc !important; 
    border: none !important;
    box-shadow: none !important;
    padding-left: 1rem;
  }
  
  /* Trigger the display when MDB adds the .show class */
  .navbar-nav .dropdown.show .dropdown-menu,
  .navbar-nav .dropdown-menu.show { 
    display: block !important; 
  }
  
  .dropdown-toggle::after { 
    float: right; 
    margin-top: 10px; 
  }
}

/* =========================
   VIDEO HERO SECTION
========================= */
#video { 
  position: relative; 
  width: 100%; 
  height: 65vh; 
  min-height: 450px; /* Prevents the box from getting too small on horizontal phones */
  background-color: #17457c; /* Fallback color while loading */
  overflow: hidden; 
}

.video-container { 
  position: absolute; 
  top: 0;
  left: 0;
  width: 100%; 
  height: 100%; 
}

.video-container video { 
  object-fit: cover; 
  width: 100%; 
  height: 100%; 
  position: absolute; 
  top: 0; 
  left: 0; 
  transform: none !important; /* THIS KILLS THE ZOOM BUG */
}

.overlay {
  position: absolute;
  top: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.55); /* 55% dark tint */
  z-index: 1;
}

.text-overlay {
  position: absolute;
  top: 50%; 
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #fff;
  z-index: 2;
  width: 90%;
  max-width: 800px; /* Stops the text from stretching too wide on big desktop monitors */
}

/* =========================
   UTILITIES & ANIMATIONS
========================= */
.lblue { color: #17457c !important }
.bg-lblue { background-color: #17457c !important }
.healthcare-btn { background-color: #17457c !important; color: #fff !important; }
.healthcare-btn:hover { background-color: #07409C !important; }

.help-button {
  font-size: 12px; 
  position: fixed; 
  bottom: 20px; 
  right: 20px;
  background-color: #1C1C1C; 
  color: white; 
  padding: 10px 20px;
  border-radius: 5px; 
  z-index: 10000; 
  animation: pulse 1s infinite alternate;
}

.help-button:hover { background-color: limegreen; }

#brands .slider { animation: slidein 30s linear infinite; white-space: nowrap; }
@keyframes slidein { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(-100%, 0, 0); } }
@keyframes pulse { from { transform: scale(1); } to { transform: scale(1.1); } }