/*
  Site header styles, extracted from style.css (2026-07).
  Uses native CSS nesting. Loads after style.css and before style2.css
  (see bbbsc_scripts() in functions.php), so the cascade relative to both
  is unchanged.

  Layout of this file: base (all-widths) rules first, grouped by component,
  then one top-level @media block per breakpoint (widest to narrowest), so
  every breakpoint is visible at a glance and can be commented out as a unit.
  The @media blocks sit at the top level rather than nested inside
  .main_header because several of these elements live outside the header
  (.langswitch, the .lang-fr body class), and nesting the rest would raise
  their specificity against style2.css. Selectors are identical
  to before; only source order changed, and the order constraints are noted
  on the blocks they affect.

  NOTE: url() paths here are relative to /css/, hence the ../ prefixes.
*/

/* ==================================================================== */
/* Base (all widths)                                                    */
/* ==================================================================== */

/* ---- Header shell ---- */

.main_header {
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;

  .wc {
    max-width: 100%;
  }
}
/* Accordion consultation form: no matching markup left in the theme.
   Kept for safety; candidate for deletion with the .consultation-block
   rules still in style.css. */
.main_header .consultation-block .wc {
  max-width: 1240px;
}
.main_header.accordion_opened {
  transition: background-color 0.5s ease;
  background-color: #fff;
}

.external_container {
  position: relative;
  background-color: #54585a;
  min-height: 120px;
}

/* ---- Logo ---- */

.logo {
  float: left;
  padding: 12px 0;
  position: relative;
  z-index: 99999;

  img {
    width: 355px;
    height: auto;
  }

}

/* ---- Top header: social icons + language selector ---- */

.top_header {
  position: absolute;
  right: 30px;
  top: 15px;

  .social_container {
    display: inline-block;
    vertical-align: middle;

    .social_media {
      display: inline-block;

      span:before {
        color: #fff;
        font-size: 42px;
      }
      &:hover span:before {
        color: #ffb81c;
      }
    }
  }
}

.lang-selector {
  color: #fff;
  font-size: 15px;
  font-weight: normal;
  text-decoration: none;
  display: inline-block;
  vertical-align: middle;
  position: relative;
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  padding: 10px 0;
  text-transform: uppercase;
  margin-left: 15px;

  &:hover {
    color: #ffb81c;
  }
}

/* ---- Menu containers ---- */

.menu_container_inner {
  /* style.css had two conflicting base rules for this selector;
     the later one (float: left / 25px padding) won and is kept. */
  float: left;
  padding: 25px 0 0 10px;
}

.nav-container {
  float: right;
  position: relative;
  z-index: 9;
}

/* ---- Main (desktop) nav ---- */

.main-nav {
  ul {
    list-style-type: none;
    text-align: left;
    padding-left: 0;
  }
  ul li {
    display: inline-block;
    position: relative;
    vertical-align: middle;
    padding: 0 3px 0 0;
    margin: 10px 0;
  }
  ul li.menu-item-home {
    display: none;
  }
  ul li:after {
    position: absolute;
    content: '';
    background: transparent;
    bottom: -18px;
    height: 25px;
    left: 0;
    right: 0;
  }
  ul li a {
    font-family: 'Bebas Neue Bold', sans-serif;
    color: #fff;
    font-size: 22px;
    font-weight: normal;
    text-decoration: none;
    display: block;
    position: relative;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    padding: 12px 20px 6px 20px;
    text-transform: uppercase;
    border-radius: 8px;
  }
  ul a:hover {
    color: #fff;
  }
}

.main-nav ul.main li:hover > a, .main-nav ul.main > li.current-menu-item a, .home .main-nav ul.main > li.current-menu-item:hover a {
  background: #ffb81c;
}
.home .main-nav ul.main > li.current-menu-item a {
  background: #ffb81c;
}
/* overrides that lived at the bottom of style.css */
.main-nav ul.main li:hover > a {
  color: black !important;
}

/* ---- Main nav sub menus ---- */

.main-nav {
  .sub-menu {
    list-style-type: none;
    opacity: 0;
    position: absolute;
    top: 50px;
    left: 0;
    visibility: hidden;
    background: #ffb81c;
    z-index: 101;
    text-align: left;
    width: 300px;
    box-sizing: border-box;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    transition: .3s all;
    -webkit-transition: .3s all;
    -moz-transition: .3s all;
    border-radius: 8px;

    &:after {
      content: none;
    }
  }
  li:hover > .sub-menu {
    visibility: visible;
    opacity: 1;
    transition-delay: 0s;
    -webkit-transition-delay: 0s;
    -moz-transition-delay: 0s;
  }
  .sub-menu li {
    display: block;
    padding: 0;
  }
  .sub-menu li a {
    padding: 8px 15px 8px 25px;
    margin-bottom: 4px;
    line-height: 1.2em;
    position: relative;
    border: none;
    height: auto;
    display: block;
    font-size: 17px;
    border-radius: 0;
    color: black;
  }
  .sub-menu li > a:hover:after {
    content: '';
    background: #fff;
    width: 5px;
    height: 5px;
    position: absolute;
    left: 14px;
    top: 40%;
  }
}
.main-nav ul.sub-menu li:hover > a, .main-nav ul.sub-menu > li.current-menu-item a {
  border: none;
  color: #fff;
}
/* override that lived at the bottom of style.css */
.main-nav .sub-menu li > a:hover:after {
  background-color: black !important;
}

/* main sub menu - second level */
.main-nav ul.sub-menu li.menu-item-has-children ul.sub-menu {
  position: relative;
  top: 0;
  left: 0;
  opacity: 1;
  visibility: visible;
  padding-top: 0;
  display: none;
}
.main-nav ul li:hover ul.sub-menu li.menu-item-has-children ul.sub-menu {
  display: block;
}
.main-nav .sub-menu li.menu-item-has-children .sub-menu li:hover > a:after {
  content: '>';
  background: transparent;
  width: 0;
  height: 0;
  position: absolute;
  left: 30px;
  top: 8px;
}
.main-nav .sub-menu li.menu-item-has-children .sub-menu li > a {
  margin-left: 15px;
}
.main-nav .sub-menu li li:hover > a:after {
  left: 13px !important;
}

/* ---- Mobile toggle (hamburger) ---- */

.mobile-toggle {
  text-decoration: none;
  display: none;
  float: right;
  width: 50px;
  cursor: pointer;
  border-radius: 8px;
  padding: 4px 102px 4px 14px;

  span {
    background: #fff;
    display: block;
    height: 3px;
    margin: 5px 0;
    width: 27px;
  }
  &:before {
    content: 'MENU';
    position: absolute;
    right: 12px;
    font-size: 18px;
    bottom: 6px;
    color: #fff;
    font-weight: 700;
  }
}

/* ---- Header buttons ---- */

.header_button {
  position: absolute;
  bottom: -51px;
  right: 35px;

  a, .accordion_btn {
    display: inline-block;
    border-radius: 0 0 8px 8px;
    background: #ffb81c;
    color: black;
    text-decoration: none;
    text-align: center;
    text-transform: uppercase;
    padding: 10px 25px;
    font-size: 22px;
    font-weight: 700;
    border: none;
    cursor: pointer;
  }
  a:hover {
    background: #ffb81c;
    color: black;
  }
}
.single-event .header_button {
  display: none;
}

.header_button_mobile {
  display: none;
  position: relative;
  right: 0;
  left: 0;
  text-align: center;
  font-size: 0;
  width: 100%;
  height: 50px;
}

/* table-centering spans used inside the header buttons */
span.inner {
  display: table;
  text-align: center;
  margin: 0 auto;
  height: 100%;
}
span.inner_inner {
  display: table-cell;
  vertical-align: middle;
}

/* ---- Language switch ---- */

#top .menu_language {
  display: none;
}
.menu_language {
  display: none;
}
.menu-item-language-current {
  display: none !important;
}

.langswitch {
  position: fixed;
  right: 0;
  top: 40%;
  width: 55px;
  z-index: 999;

  a {
    overflow: hidden;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -ms-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
    position: relative;
    width: 100%;
    background: #ffb81c;
    color: #fff;
    right: 0;
    top: 0;
    display: block;
    height: 41px;
    padding-top: 12px;
    padding-left: 8px;
    font-weight: bold;
    margin-bottom: 4px;
    text-transform: uppercase;
    font-size: 18px;
  }
}
.lang-en .langswitch a.en_switch {
  background: #97c93b;
  color: #fff;
}
.lang-en .langswitch a.fr_switch {
  right: -12px;
}
.langswitch a.langw.en_switch:hover {
  right: 0;
}
.lang-fr .langswitch a.fr_switch {
  background: #97c93b;
  color: #fff;
}
.lang-fr .langswitch a.en_switch {
  right: -12px;
}
.langswitch a.langw.fr_switch:hover {
  right: 0;
}

.overflow-handler {
  overflow-x: hidden;
}

/* ==================================================================== */
/* Breakpoints, widest to narrowest                                     */
/*                                                                      */
/* Ordering within same-specificity selectors is load-bearing:         */
/*  - the 576-1024px range block sits AFTER the <=767px and <=576px    */
/*    blocks so its float: right wins for .menu_container_inner        */
/*    between 576px and 767px, as in the original cascade;             */
/*  - the <=360px block is last so its 55px height beats the <=767px   */
/*    45px rule for .lang-fr .header_button_mobile.                    */
/* ==================================================================== */

@media screen and (max-width: 1024px) {
  /* In flow (no sticking) below 1024px. Relative rather than static so
     z-index: 100 still applies and the .header_button hanging below the
     header paints above the page's .header_overlay. */
  header.main_header {
    position: relative;
  }
  .social_container {
    right: 170px;
    top: 44px;
  }
  .lang-fr .social_container {
    top: 44px;
  }
  .nav-container {
    margin-top: 8px;
    padding: 0;
    border: 2px solid #fff;
    border-radius: 8px;

    .wc {
      padding-bottom: 11px;
    }
  }
  .main-nav ul {
    display: none;
  }
  .mobile-toggle {
    display: block;
  }
  .lang-fr .header_button_mobile {
    height: 55px;
  }
  #top .menu_language {
    display: inline-block;
  }
}

@media screen and (max-width: 992px) {
  .lang-fr .logo {
    padding: 18px 0 12px;
    max-width: 360px;
    margin: 0 auto;
  }
}

@media screen and (max-width: 767px) {
  .logo {
    float: none;
    width: 100%;
    text-align: center;
    clear: both;
    display: block;
    padding: 16px 0 8px;
    top: 10px;
  }
  .lang-fr .logo {
    right: 0;
    padding: 16px 0 8px;
    max-width: 400px;
  }
  .top_header {
    top: 0;
    right: 10px;
    z-index: 99999999;
  }
  .external_container .social_container {
    display: none;
  }
  .menu_container {
    margin-top: 0;
  }
  .menu_container_inner, .lang-fr .menu_container_inner {
    float: none;
    text-align: center;
    padding: 0 0 20px;
    margin: 0 auto;
  }
  .nav-container {
    float: none;
    display: inline-block;
  }
  .header_button {
    display: none;
  }
  .mobile_fix {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #54585a;
    z-index: 9999;
    padding: 12px;
  }
  .header_button .mobile_fix a {
    width: 48%;
    margin: 1%;
  }
  .header_button_mobile, .lang-fr .header_button_mobile {
    height: 45px;
  }
  .header_button_mobile a {
    height: 100%;
    font-size: 16px;
  }
  .langswitch {
    display: none;
  }
  li.menu-item.lang {
    display: inline-block;
    width: 100%;
  }
}

@media screen and (max-width: 680px) {
  .header_button {
    right: 0;
    left: 0;
    margin: auto;
    text-align: center;
    bottom: -42px;

    a {
      padding: 4px;
      font-size: 17px;
      width: 45%;
      max-width: 230px;
      height: 42px;
      margin: 0 2%;
      vertical-align: bottom;
      line-height: 1.1;
    }
  }
}

@media screen and (max-width: 576px) {
  .menu_container_inner {
    /* float: left is not a new style: in the original cascade the base
       rule's float: left re-won below 576px because it sat after the
       767px float: none rule (see git history). Restated here so this
       file can keep base-then-breakpoints order. */
    float: left;
    padding: 0;
    width: 100%;
    margin-top: 5px;
    margin-bottom: 10px;
  }
}

/* Must stay AFTER the <=767px and <=576px blocks: where they overlap
   (576px to 767px) this block's float: right / 55px margin won by source
   order in the original file. */
@media screen and (min-width: 576px) and (max-width: 1024px) {
  .menu_container_inner {
    float: right;
    padding: 0;
    margin-top: 55px;
    margin-right: 15px;
  }
}

@media screen and (max-width: 360px) {
  .header_button a {
    font-size: 15px;
  }
  /* must stay after the <=767px 45px rule */
  .lang-fr .header_button_mobile {
    height: 55px;
  }
}
