/* -------- Header --------------------------------------------*/
.site-header {
  width: 100%;
  height: auto;
  opacity: calc(var(--header-opacity-mobile) / 100);
  top: 0;
  background-color: var(--header-colour);
  z-index: 999;
  position: sticky;
  overflow: hidden;
}

/* -------site-header__inner and Logo -------------------------------*/
.site-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 10px 20px;
  gap: 20px;
}

.site-header__inner img {
  max-width: 250px;
  max-height: 150px;
  width: auto;
  height: auto;
}

.site-header__logo {
  max-height: 1500px;
  width: auto;
}

.site-header__logo h2 {
  padding-left: 20px;
}

.header-name {
  text-align: center;
  font-weight: lighter;
}

/* ----------------------Burger Menu ---------------------------------------------*/
.site-header__burger {
  display: block;
  position: relative;
  z-index: 1002; /* Higher than overlay */
}

.site-header__burger-button {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.site-header__burger-bar {
  width: 100%;
  height: 3px;
  background-color: var(--burgerbar-colour);
  transition: all 0.3s ease-in-out;
}

/* Animate burger menu when open */
.site-header__burger-button.open .site-header__burger-bar:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.site-header__burger-button.open .site-header__burger-bar:nth-child(2) {
  opacity: 0;
}

.site-header__burger-button.open .site-header__burger-bar:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Menu Overlay */
.site-header__overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  /* display: none; */
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;

}

.site-header__overlay.active {
  /* display: block; */
  opacity: 1;
  pointer-events: auto;
}

/* -----------------------------------Mobile Nav Container------------------------------ */
.site-header__mobile {
  position: fixed;
  top: 0;
  right: -80%; /* Start off-screen */
  width: 80%; /* Width of slide-in menu */
  height: 100vh;
  background-color: var(--header-colour);
  transition: right 0.3s ease;
  z-index: 1000;
  overflow-y: auto;
  box-shadow: -2px 0 5px rgba(0,0,0,0.1);
}

.site-header__mobile.open {
  right: 0; /* Slide in from right */
}

/* Body no-scroll when menu open */
body.menu-open {
  overflow: hidden;
}

/* Navigation Styling */
.nav {
  font-size: var(--top-nav-font-size);
  font-weight: var(--top-nav-font-weight);
  overflow: visible;
  padding-bottom: 10px;
  padding-top: 50px;
}

.nav__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0 auto;
  justify-content: center;
  list-style-type: none;
}

.nav-btn {
  margin-left: 10px;
}

.nav__Large-button {
  display: inline-block; 
  color: var(--nav-btn-font-colour);
  text-align: center;
  text-decoration: none;
  background-color: var(--nav-btn-colour);
  padding: 20px 20px;
}
.nav__Large-button:hover {
  background-color: var(--nav-btn-colour-hover);
}

.nav__Large-button-font {
  font-size: var(--nav-btn-font-size, --top-nav-font-size);
  font-weight: var(--nav-btn-font-weight, --top-nav-font-weight);
}

.nav__item {
  position: relative;
  border-bottom-style: solid;
  border-bottom-width: 1px;
  border-bottom-color: transparent;
  width: 100%;
  text-align: center;
}

.nav__item a {
  display: inline-block;
  color: var(--nav-font-colour);
  text-decoration: none;
}

/* contact separator -highlight the contact page if it is added */
.contact-separator {
  display: none;
  padding-right: 5px;
}

/* ------------------------Dropdown Menu -----------------------------------------------*/
.nav__toggle {
  background: none;
  border: none;
  text-decoration: none;
  color: var(--nav-font-colour);
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
  padding: 0;
  font-weight: var(--top-nav-font-weight);
}


.nav__item--has-children {
  position: relative;
}

.nav__submenu {
  position: static;
  list-style: none;
  width: 200px;
  left: 0;
  top: calc(100% + .75rem);
  background-color: var(--desktop-nav-dropdown-colour);
  padding: 1rem;
  border-radius: .5rem;
  opacity: 0;
  pointer-events: none;
  z-index: 999;
  display: none;
  flex-direction: column;
  gap: 10px;
  margin: 0 auto;
  margin-top: 10px;
  box-shadow: none;
}

.nav__submenu li a {
  color: var(--nav-dropdown-font-colour);
  text-decoration: none;
  font-size: var(--dropdown-font-size);
  font-weight: var(--dropdown-font-weight);
}

.nav__item--has-children.active .nav__submenu {
  opacity: 1;
  pointer-events: auto;
  display: flex;  /* ADDED: now shows with flex when active */
  background-color: var(--nav-dropdown-colour);
}


/* ========================================================================
   DESKTOP STYLES (min-width: 1024px)
   ======================================================================== */

@media screen and (min-width: 1024px) {

  /* Header */
  .site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    opacity: calc(var(--header-opacity-desktop) / 100);
    overflow: visible;
  }

  .site-header__inner {
    width: auto;
    flex: 0 0 auto;
    padding: 0px 0px;
  }

  .site-header__inner img {
    max-width: 320px;
  }

  .site-header__logo {
    margin-bottom: 0;
  }

  /* Hide burger menu on desktop */
  .site-header__burger {
    display: none;
  }

  /* Reset mobile nav container for desktop */
  .site-header__mobile {
    max-height: none;
    overflow: visible;
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    /* Reset any mobile-specific properties */
    position: static;
    right: auto;
    width: auto;
    height: auto;
    box-shadow: none;
    background-color: transparent;
  }

  /* Menu overlay not needed on desktop */
  .site-header__overlay {
    display: none;
  }

  /* Navigation */
  .nav {
    font-size: var(--top-nav-font-size-desktop);
    font-weight: var(--top-nav-font-weight-desktop);
    padding-top: 25px;
  }

  .nav__Large-button-font {
    font-size: var(--nav-btn-font-size-desktop, --top-nav-font-size-desktop);
    font-weight: var(--nav-btn-font-weight-desktop, --top-nav-font-weight-desktop);
  }

  .nav__item {
    width: auto;
    text-align: left;
  }

  .nav__toggle {
   
   font-weight: var(--top-nav-font-weight-desktop);
  }

  /* Show the separator on desktop */
  .nav__separator {
    display: inline;
  }

  /* Dropdown menu desktop styles */
  .nav__submenu {
    position: absolute;
    margin: 20px 0 0 0;
    box-shadow: 0 10px 10px rgba(0,0,0,.4);
    transition: opacity 150ms ease-in-out, transform 150ms ease-in-out;
    background-color: var(--desktop-nav-dropdown-colour);
  }

  .nav__submenu li a {
    font-size: var(--dropdown-font-size-desktop);
    font-weight: var(--dropdown-font-weight-desktop);
  }

  .nav__item--has-children.active .nav__submenu {
    background-color: var(--desktop-nav-dropdown-colour);
  }
  .nav__item:hover:not(.active) {
    border-bottom-style: solid;
    border-bottom-width: 1px;
    border-bottom-color: var(--nav-font-colour);
  }


  
}






/* -----Secondary Nav-------- */

.site-footer-nav__List {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-primary);
  font-weight: var(--footer-nav-font-weight);
  font-size: var(--footer-nav-font-size);
  text-transform: uppercase;
  padding-top: 10px;
}

.site-footer-nav__List ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  list-style-type: none;
  margin: 0;
}

.site-footer-nav__item a {
  color: var(--secondary-nav-font-colour);
  text-decoration: none;
}

.site-footer-nav__item a:hover {
  border-bottom: 1px solid #000;
}

@media screen and (min-width: 1024px) {
.site-footer-nav__List {
  padding-top: 20px;
  font-size: var(--footer-nav-font-size-desktop);
  font-weight: var(--footer-nav-font-weight-desktop);
}
}