/* Bootstrap 4 compatibility for Helix3 3.1.2 + jd_medical template */

/* Grid system - BS4 col-* classes */
.col-lg-12, .col-lg-11, .col-lg-10, .col-lg-9, .col-lg-8, .col-lg-7,
.col-lg-6, .col-lg-5, .col-lg-4, .col-lg-3, .col-lg-2, .col-lg-1 {
  position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px;
}
.col-12 { width: 100%; }
.col-11 { width: 91.66666667%; }
.col-10 { width: 83.33333333%; }
.col-9 { width: 75%; }
.col-8 { width: 66.66666667%; }
.col-7 { width: 58.33333333%; }
.col-6 { width: 50%; }
.col-5 { width: 41.66666667%; }
.col-4 { width: 33.33333333%; }
.col-3 { width: 25%; }
.col-2 { width: 16.66666667%; }
.col-1 { width: 8.33333333%; }
.col-8, .col-4 { position: relative; min-height: 1px; padding-right: 15px; padding-left: 15px; float: left; }
@media (min-width: 992px) {
  .col-lg-12 { width: 100%; }
  .col-lg-11 { width: 91.66666667%; }
  .col-lg-10 { width: 83.33333333%; }
  .col-lg-9 { width: 75%; }
  .col-lg-8 { width: 66.66666667%; }
  .col-lg-7 { width: 58.33333333%; }
  .col-lg-6 { width: 50%; }
  .col-lg-5 { width: 41.66666667%; }
  .col-lg-4 { width: 33.33333333%; }
  .col-lg-3 { width: 25%; }
  .col-lg-2 { width: 16.66666667%; }
  .col-lg-1 { width: 8.33333333%; }
  .col-lg-12, .col-lg-11, .col-lg-10, .col-lg-9, .col-lg-8, .col-lg-7,
  .col-lg-6, .col-lg-5, .col-lg-4, .col-lg-3, .col-lg-2, .col-lg-1 { float: left; }
}

/* Display utilities */
.d-none { display: none !important; }
.d-md-block { display: block !important; }
@media (max-width: 767px) { .d-md-block { display: none !important; } }
@media (min-width: 768px) { .d-md-block { display: block !important; } }

/* === HEADER FIX === */
#sp-header { height: 85px; overflow: visible; }
#sp-header .row { display: flex; flex-wrap: nowrap; align-items: center; height: 85px; margin: 0; }
#sp-logo { height: 85px; display: flex; align-items: center; float: left; }
#sp-menu { height: 85px; display: flex; align-items: center; justify-content: flex-end; float: right; }
#sp-logo .sp-column { height: 85px; display: flex; align-items: center; }
#sp-menu .sp-column { height: 85px; display: flex; align-items: center; width: 100%; }

/* Logo */
#sp-header .logo { height: 85px; max-height: 85px; display: flex; align-items: center; }
#sp-header .logo img { max-height: 75px; width: auto; }

/* === MENU FIX === */
/* Hide the duplicate mod_menu (Joomla module menu) - keep only Helix3 megamenu */
#sp-menu .sp-module .sp-module-content > ul.nav.menu { display: none !important; }
#sp-menu .sp-module-title { display: none !important; }

/* Megamenu wrapper */
#sp-menu .sp-megamenu-wrapper { height: 85px; display: flex; align-items: center; }

/* Megamenu items */
.sp-megamenu-parent { display: block !important; position: static !important; left: auto !important; height: 85px; display: flex; align-items: center; justify-content: flex-end; }
.sp-megamenu-parent > li { display: inline-block !important; }
.sp-megamenu-parent > li > a, .sp-megamenu-parent > li > span { line-height: 85px !important; }

/* Dropdown - allow overflow */
.sp-megamenu-parent .sp-dropdown { position: absolute; z-index: 10000; }

/* Offcanvas toggler - mobile only */
@media (min-width: 992px) {
  #offcanvas-toggler { display: none !important; }
}

/* Container and row fixes */
.container { max-width: 1140px; margin: 0 auto; padding: 0 15px; }
.row { display: flex; flex-wrap: wrap; }
.sp-column { width: 100%; }


/* === MENU TEXT COLOR FIX === */
/* Menu text - dark on light header background */
.sp-megamenu-parent > li > a,
.sp-megamenu-parent > li > span {
  color: #333333 !important;
}
.sp-megamenu-parent > li > a:hover,
.sp-megamenu-parent > li:hover > a,
.sp-megamenu-parent > li.active > a {
  color: #4593ff !important;
}

/* Dropdown submenu items */
.sp-dropdown .sp-dropdown-items li a {
  color: #333333 !important;
}
.sp-dropdown .sp-dropdown-items li a:hover {
  color: #4593ff !important;
}

/* === OUTLINE/BORDER REMOVAL === */
/* Remove focus outline on all menu links and interactive elements */
.sp-megamenu-parent li a:focus,
.sp-megamenu-parent li a:active,
.sp-megamenu-parent li span:focus,
.sp-dropdown li a:focus,
.sp-dropdown li a:active,
#offcanvas-toggler:focus,
.nav.menu li a:focus,
.nav.menu li a:active,
.sp-module a:focus,
.sp-contact-info a:focus,
.logo a:focus,
.scrollup:focus {
  outline: none !important;
  box-shadow: none !important;
  border: none !important;
}

/* Remove outline globally for clicked elements */
*:focus {
  outline: none !important;
}
*:active {
  outline: none !important;
}

/* Remove any black border on dropdown */
.sp-dropdown,
.sp-dropdown-inner,
.sp-dropdown-items {
  border: none !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
}
