@charset "utf-8";

/* ============================================================
   HEADER
   ============================================================ */
.header {
  position: relative;
  width: 100%;
  z-index: 100;
}

/* ----- Sticky on scroll (class toggled by JS past ~130px) ----- */
.header.is-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  animation: header-slide-down 0.4s ease;
}

@keyframes header-slide-down {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

/* Sticky: hide the top bar, compact the nav, drop the logo inline */
.header.is-sticky .header__topbar {
  display: none;
}

.header.is-sticky .navbar {
  min-height: 80px;
}

.header.is-sticky .navbar__logo {
  margin-top: 0;
  margin-bottom: 0;
}

.header.is-sticky .navbar__logo img {
  height: 80px;
}

/* Header uses a wider container than the standard sections */
.header .container {
  max-width: calc(var(--container-wide));
  padding: 0 var(--gutter);
}

/* ============================================================
   TOP BAR
   ============================================================ */
.header__topbar {
  background-color: var(--color-dark);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 8px 0;
}

.topbar p {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
  font-family: var(--font-secondary);
  font-weight: var(--fw-medium);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-muted);
}

.topbar p img {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* ============================================================
   MAIN NAV
   ============================================================ */
.header__main {
  background-color: var(--color-white);
}

.navbar {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 120px;
}

.navbar__logo {
  position: relative;
  z-index: 5;
  flex-shrink: 0;
  display: inline-block;
  /* Pull the logo up so the mark overlaps the dark top bar (as per Figma) */
  margin-top: -29px;
  margin-bottom: -6px;
}

.navbar__logo img {
  width: auto;
}

.navbar__collapse {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* ----- Menu ----- */
.navbar__menu {
  flex: 1 1 auto;
}

.navbar__menu ul {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 36px;

  & li {margin: 0;padding-left: 0;
  	&:before {display: none; }
	}
}

.navbar__menu a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-primary);
  font-weight: var(--fw-semibold);
  font-size: 18px;
  line-height: 1.2;
  color: var(--color-heading);
  transition: color 0.25s ease;
}

.navbar__menu a:hover,
.navbar__menu li.active > a {
  color: var(--color-gold-dark);
}

.navbar__menu .caret {
  width: 12px;
  height: 8px;
  flex-shrink: 0;
}

/* ----- Actions ----- */
.navbar__actions {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

/* ============================================================
   MOBILE TOGGLE (hidden on desktop)
   ============================================================ */
.navbar__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.navbar__toggle span {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background-color: var(--color-heading);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.navbar__toggle.is-active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar__toggle.is-active span:nth-child(2) {
  opacity: 0;
}

.navbar__toggle.is-active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   DROPDOWN / MEGA MENU (Service Areas)
   ============================================================ */
.navbar__menu .has-dropdown {
  position: relative;
}

.navbar__dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 200;
  padding: 24px 28px;
  background-color: var(--color-white);
  border-top: 3px solid var(--color-gold);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}

/* Transparent bridge across the gap so hover doesn't drop while moving
   from the nav item down into the panel */
.navbar__dropdown::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

.navbar__menu .has-dropdown:hover > .navbar__dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Up-arrow (beak) pointing to the parent item, sits on the dropdown's gold line */
.navbar__menu .has-dropdown::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% + 12px);
  z-index: 210;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--color-gold);
  transform: translate(-50%, -100%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.navbar__menu .has-dropdown:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Rotate the caret while the dropdown is open */
.navbar__menu .has-dropdown:hover > a .caret {
  transform: rotate(180deg);
}

.navbar__menu .caret {
  transition: transform 0.25s ease;
}

/* Reset the flex/gap the top-level menu applies to its lists */
.navbar__dropdown ul {
  display: block;
  gap: 0;
}

.navbar__dropdown li {
  width: 100%;
}

.navbar__dropdown a {
  display: block;
  padding: 8px 0;
  font-size: 16px;
  font-weight: var(--fw-regular);
  white-space: nowrap;
}

/* Service Areas mega menu — anchored to the right so it stays in view */
.navbar__dropdown--areas {
    left: -100px;
    right: 0;
    width: 750px;
    max-width: calc(100vw - 2 * var(--gutter));
}

/* First three items run full width across the top */
.areas-mega__top {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.areas-mega__top a {
  position: relative;
  padding-left: 30px;
  font-weight: var(--fw-semibold);
}

.areas-mega__top a::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background: url("../images/icon/list-check.svg") center / contain no-repeat;
}

/* The remaining areas flow into two columns.
   Selector is intentionally specific (.navbar__dropdown--areas ...) so it beats
   the .navbar__menu ul { gap } rules — including the one inside the
   @media (max-width: 1440px) block, which otherwise wins on source order. */
.navbar__dropdown--areas .areas-mega__cols ul {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-content: flex-start;
  align-items: flex-start;
  justify-content: flex-start;
  row-gap: 4px;
  column-gap: 0;
  height: auto;
  overflow-y: visible;
  padding-right: 6px;
}
.navbar__dropdown--areas .areas-mega__cols ul li { width: 32%; }
.areas-mega__cols a {
  position: relative;
  padding-left: 14px;
}

.navbar__dropdown--areas .areas-mega__cols a::before {
    content: "›";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-12px);
    font-size: 20px;
    line-height: 1;
    color: var(--color-body);
}

.areas-mega__top ul li,
.areas-mega__cols ul li {padding-left: 0;}
.services-mega__cols ul li {padding-left: 0;}

/* Tiling Services mega menu — two even columns */
.services-mega__cols a {
  position: relative;
  padding-left: 14px;
}

.navbar__dropdown--services .services-mega__cols a::before {
content: "›";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-12px);
    font-size: 20px;
    line-height: 1;
    color: var(--color-body);
}

.navbar__dropdown--services {
  width: 440px;
  max-width: calc(100vw - 2 * var(--gutter));
}

.services-mega__cols ul {
  columns: 2;
  column-gap: 32px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1440px) {
  .navbar__menu ul {
    gap: 28px;
  }
	
.header.is-sticky .navbar {min-height: 90px;}

  .navbar__collapse {
    gap: 20px;
  }

  /* Stack the header CTAs (Get a Quote below the phone button).
     Reset back to a row at <=1200px in the block below. */
  .header__main .navbar__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  /* Shrink the buttons so two stacked rows keep the header height */
  .header__main .navbar__actions .btn {
    padding-top: 9px;
    padding-bottom: 9px;
    font-size: 15px;
  }

  /* Outline button has a 1px border — trim 1px of padding so both
     buttons are the same height (managed by padding, no fixed height) */
  .header__main .navbar__actions .btn--outline {
    padding-top: 8px;
    padding-bottom: 8px;
  }
	
.navbar__dropdown--areas {
    left: -200px;
    width: 750px;
	.areas-mega__cols ul {
    height: 300px;
    overflow-y: auto;
	}	
}

}

@media (max-width: 1200px) {
  /* Collapsed mobile nav (hamburger) from this breakpoint down */
  .navbar {
    position: relative;
    min-height: 90px;
    gap: 16px;
  }

  .navbar__logo {
    margin-top: -30px;
    margin-bottom: 0;
  }

  .navbar__logo img {
    height: 120px;
  }

  .navbar__toggle {
    display: flex;
  }

  /* Collapse only the menu into a dropdown panel
     (actions stay in the bar beside the hamburger) */
  .navbar__collapse {
    position: absolute;
    top: 100%;
    /* Break out of the container gutter to span the full viewport width */
    left: calc(-1 * var(--gutter));
    right: calc(-1 * var(--gutter));
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 24px var(--gutter);
    background-color: var(--color-white);
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    /* Fill the rest of the screen height below the header */
    height: calc(100vh - 100%);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 99;
  }

  .navbar__collapse.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .navbar__menu ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .navbar__menu li {
    width: 100%;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  }

  .navbar__menu a {
    width: 100%;
    justify-content: space-between;
    padding: 14px 0;
    font-size: 18px;
  }

  /* Keep the action buttons in a row in the bar, pushed to the right
     next to the hamburger (overrides the 1440 stacking) */
  .header__main .navbar__actions {
    flex-direction: row;
    align-items: center;
    margin-left: auto;
    gap: 10px;
  }

  /* No floating beak in the mobile accordion */
  .navbar__menu .has-dropdown::after {
    display: none;
  }

  /* Dropdown becomes an inline accordion inside the collapsed panel —
     collapsed by default, expands when its item gets .is-open (via JS) */
  .navbar__dropdown {
    position: static;
    width: auto;
    max-width: none;
    padding: 0 0 0 16px;
    border-top: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .navbar__menu .has-dropdown.is-open > .navbar__dropdown {
    max-height: 2000px;
  }

  /* Service Areas is a long list — cap its height and scroll inside so the
     following menu items stay visible in the panel */
  .navbar__menu .has-dropdown.is-open > .navbar__dropdown--areas {
    max-height: 280px;
    overflow-y: scroll;
  }
  .navbar__menu .has-dropdown.is-open > .navbar__dropdown--areas::-webkit-scrollbar {
    width: 8px;
  }
  .navbar__menu .has-dropdown.is-open > .navbar__dropdown--areas::-webkit-scrollbar-track {
    background: #e8e4dc;
    border-radius: 4px;
  }
  .navbar__menu .has-dropdown.is-open > .navbar__dropdown--areas::-webkit-scrollbar-thumb {
    background: #efb145;
    border-radius: 4px;
    min-height: 40px;
  }
  .navbar__menu .has-dropdown.is-open > .navbar__dropdown--areas::-webkit-scrollbar-thumb:hover {
    background: #c7842a;
  }

  /* Flip the caret while the accordion item is open */
  .navbar__menu .has-dropdown.is-open > a .caret {
    transform: rotate(180deg);
  }

  .navbar__dropdown--areas {
    right: auto;
  }

  .navbar__dropdown li {
    border-bottom: 0;
  }

  .navbar__dropdown a {
    padding: 8px 0 8px 24px;
    font-size: 16px;
    white-space: normal;
  }

  /* Two columns for suburb list — reset flex-direction (overridden by .navbar__menu ul column rule) */
  .areas-mega__cols ul {
    flex-direction: row;
    height: auto;
    overflow-x: hidden;
  }

  .areas-mega__cols ul li {
    width: calc(50% - 8px);
  }

  .services-mega__cols ul {
    display: block;
  }

  .areas-mega__top {
    padding-bottom: 6px;
    margin-bottom: 6px;
  }

.header.is-sticky .navbar {min-height: 70px;}

}

@media (max-width: 767px) {
  /* Must match the specificity of .navbar__dropdown--areas .areas-mega__cols
     ul li (the global 48% desktop rule) or it's ignored. */
  .navbar__dropdown--areas .areas-mega__cols ul li {
    width: 100%;
  }

  .navbar {
    min-height: 76px;
  }

  .navbar__logo {
    margin-top: -24px;
    margin-bottom: -4px;
  }

  .navbar__logo img {
    height: 96px;
  }

  .topbar p {
    font-size: 14px;
  }
}

@media (max-width: 576px) {
  /* Container has padding:0 at this breakpoint so no offset needed */
  .navbar__collapse {
    left: 0;
    right: 0;
  }

  .topbar {
    justify-content: center;
    text-align: center;
  }

  .topbar p {
    font-size: 12px;
  }

  /* Single column for both mega-menu suburb/service lists.
     Selector must match the specificity of the global desktop rule
     (.navbar__dropdown--areas .areas-mega__cols ul li { width: 48% })
     at line ~344, otherwise that rule wins on specificity regardless of
     media-query order and the list stays two columns. */
  .services-mega__cols ul {
    columns: 1;
  }

  .navbar__dropdown--areas .areas-mega__cols ul li {
    width: 100%;
  }

  /* Top row (logo + hamburger) in a fixed-height grid track so the logo
     can sit vertically centered within it, then the actions row below
     in its own track — grid keeps the two rows from ever overlapping,
     unlike a wrapped flex line sized to the logo's own height. */
  .navbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: 100px auto;
    column-gap: 10px;
    row-gap: 0;
  }

  .navbar__logo img {
    height: 84px;
  }

  /* Below 576px the top bar text centers and can sit under the logo's
     x-range, so cancel the negative pull-up (the decorative overlap into
     the top bar is desktop-only) and center the logo within its grid row. */
  .navbar__logo {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    align-items: center;
    margin: 0 0 0 10px;
  }

  /* Hamburger sits to the right on the top row (beside the logo) */
  .navbar__toggle {
    grid-column: 3;
    grid-row: 1;
    align-self: center;
  }

  /* Actions drop to a full-width row of two equal (50%) buttons.
     Reset margin-left:auto inherited from the 1200px breakpoint (via the
     higher-specificity .header__main .navbar__actions rule) — inside the
     grid it would shrink-to-fit and hug the right edge instead of
     spanning the row. */
  .navbar__actions {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    width: 100%;
    gap: 10px;
  }

  .navbar__actions .btn {
    flex: 1 1 50%;
    min-width: 0;
    padding: 12px 14px;
    font-size: 14px;
  }

  .header__main .navbar__actions {
    margin-left: 0;
    gap: 0;
  }

    .header .container {
    padding: 0;
}

    .header__main {
      .navbar__actions {
            border: 1px solid #cecece;        
        & a.btn  {border: 0px solid transparent; border-radius: 0;}
        .btn--outline {border: 0px solid transparent;
    }
    }
    }

        .navbar__toggle {
        margin-right: 15px;
    }
    .topbar {
    padding: 8px 15px;
            justify-content: flex-end;
}
    

}

@media (max-width: 480px) {
  .topbar {
        justify-content: flex-start;
    }
}

