/* style-menu.css
Theme Name: BallotGuide
style-menu.css
Version: 2.2
Author: Alan Berman
This file is in dev
Mod 17 Nov 2023

*/

/* @import "https://unpkg.com/open-props"; */

/* --------------- */
/* primary header  */
/* --------------- */

/* may have to restore, but we need headerArea to exist first!
header {
  grid-area: headerArea;
  position: sticky;
  top: 0;
  gap: 0;
}
*/

.logo {
  /* margin: 2rem; */
}

.header__top-bar {
  display: grid;
  grid-template-areas: "headerLeftArea headerCenterArea headerRightArea";
  grid-template-columns: 1fr 1320px 1fr;
  gap: 1rem;
  align-items: center;
  justify-items: center;
  padding-block: 0.4rem;
  background: var(--midblue);
  /* justify-content: space-between; */
  font-size: 1.1rem;
  width: 100%;
  z-index: 20;
  position: sticky;
  top: 0;
  min-height: 3.5rem;
}

.header__start {
  padding: 0;
  padding-left: 0.4rem;
  padding-right: 0;
  /* grid-area: headerLeftArea; */
  /* justify-self: end; */
}

.primary-navigation {
  /* Alan check these next few lines--do we need absolute if we place in the grid? */
  /* position: absolute;
  top: 100%;
  right: 0%;
  transition: clip-path ease-in-out 700ms; */
  --gap: clamp(1.5rem, 5vw, 2rem);
  padding-block: 1rem;
  /* padding-inline: clamp(3rem, 10vw, 10rem); */
  padding-inline: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
  align-items: center;
  /* background: hsl(0 0% 0% / 0.75); */
}

.primary-navigation ul {
  justify-items: flex-end;
}

/*
@supports (backdrop-filter: blur(1rem)) {
  .primary-navigation {
    background: hsl(0 0% 100% / 0.1);
    backdrop-filter: blur(1rem);
  }
}
*/

.primary-navigation a {
  color: #fff;
  /* change for bg */
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.header__top-bar nav {
  visibility: visible;
  height: auto;
  display: flex;
  align-items: center;
}

.header__logo-plus-menu-group {
  grid-area: headerCenterArea;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#index .header__start {
  display: none !important;
}

#index .logo img {
  /* visibility: hidden; */
  display: none;
}

#index .header__top-bar nav {
  justify-self: center;
}

#index .header__logo-plus-menu-group {
  justify-content: center;
  width: auto;
}

.header__end {
  grid-area: headerRightArea;
  padding-right: 0.4rem;
  padding-left: 2rem;
  justify-self: start;
}

/* .header__advert {
  background: rgba(255, 255, 255, 1);
  font-size: 0.6rem;
  color: var(--darkblue);
  text-align: left;
  padding: 0.2rem 0.4rem;
  display: grid;
  grid-template-areas: "advertTextArea advertImageArea";
  grid-template-columns: 1fr 1fr;
  align-items: center;
  margin-inline: auto;
  margin-top: auto;
  margin-bottom: auto;
  max-width: 12rem;
  border-radius: 4px;
  border: 1px solid var(--darkblue);

}

.header__advert--text {
  grid-area: advertTextArea;
  justify-self: start;
  margin: 0;
  padding-block: 0.2rem;
}

.header__advert--text p {
  margin: 0;
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.header__advert--text--short {
  display: none;
}

.header__advert--text a {
  font-size: 0.6rem;
  text-transform: capitalize;
  color: var(--darkblue);
  margin: 0;
}

.header__advert--img {
  grid-area: advertImageArea;
  justify-self: end;
  padding-block: 0 !important;
  padding-inline: 0;
}

.header__advert--img img {
  object-fit: contain;
}


.header__advert--text p {
  margin-bottom: 0.2rem;
  font-size: 0.8rem;
}

.header__advert--text--full {
  display: none;
}

.header__advert--text--short {
  display: block;
} */

.mobile-nav-toggle {
  display: none;
}

.brandlogo img {
  margin: 0;
}

.imageWrapper {
  /* for logo in header */
  display: inline-block;
  /* margin: .1rem 0 0 0; */
  max-width: 8rem;
}

.header__advert--img {
  max-width: 8rem;
}

.brandWrapper {
  max-width: 4rem;
}

.imageWrapper a.logo {
  display: block;
}

.imageWrapper a.logo img {
  margin: 0;
  /* height: 100%; */
  object-fit: scale-down;
}

@media (max-width: 1320px) {
  /* .header__top-bar {
    grid-template-columns: auto 1fr auto;
  }

  .header__start {
    padding-left: 1rem;
  } */

  .header__top-bar {
    grid-template-columns: 1fr 1100px 1fr;
  }

  nav.menu-group {
    margin: 0 0 0 auto;
    z-index: 9998;
  }

  .header__end {
    display: none;
  }
}

@media (max-width: 1200px) {
  .header__top-bar {
    grid-template-columns: 1fr 1000px 1fr;
  }
}

@media (max-width: 1100px) {
  .header__top-bar {
    grid-template-columns: 1fr 850px 1fr;
  }
}

@media (max-width: 900px) {
  .header__top-bar {
    max-height: 3.3rem;
  }

  .imageWrapper {
    /* for logo in header */
    /* display: inline-block; */
    /* margin: .1rem 0 0 0; */
    /* max-width: 8rem; */
  }

  /*
  .brandWrapper {
    max-width: 4rem;
  }
  */

  .imageWrapper a.logo {
    display: block;
  }

  .imageWrapper a.logo img {
    object-fit: contain;
    max-width: 7rem;
  }

  .primary-navigation {
    /* This controls the slab that comes down from the top or side of the phone */
    --gap: 1.4em;
    position: fixed;
    z-index: 9997;
    /* inset is top right bottom left, so the slab menu will start xy% of the width from the left side */
    inset: 0 0 0 40%;
    flex-direction: column;
    padding: 6rem 2rem 2rem 2rem;
    /* padding: min(10vh, 2rem), 2rem; */

    /* for all browsers, even if they don't support backdrop-filter */
    background: var(--darkblue);
    transform: translateX(100%);
    transition: transform 350ms ease-out;
  }

  .primary-navigation a {
    font-weight: 700;
    white-space: normal;
    color: #fff;
    /* change for bg */
  }

  .primary-navigation li {
    margin: 0 0 0 auto;
    text-align: right;
  }

  .primary-navigation[data-visible="true"] {
    transform: translateX(0%);
  }

  .mobile-nav-toggle {
    --button-color: #fff;
    display: block;
    position: absolute;
    z-index: 9999;
    background-color: transparent;
    background-image: url("assets/icon-hamburger.svg");
    background-repeat: no-repeat;
    border: 0;
    width: 2rem;
    border-radius: unset;
    border: 0;
    aspect-ratio: 1 / 1;
    top: 1rem;
    right: 1rem;
  }

  .mobile-nav-toggle {
    border-radius: unset;
  }

  .mobile-nav-toggle[aria-expanded="true"] {
    background-image: url("assets/icon-close.svg");
  }

  .header__top-bar {
    grid-template-areas: "headerLeftArea headerCenterArea";
    grid-template-columns: auto 1fr;
    justify-items: end;
  }
}

/* end max-width 35em */
