/* CSS Document */
/* =====================================================
   WHITE LABEL HEADER - ORGANIZED CSS
   NO COLORS - Ready for Brand Customization
   ===================================================== */

/* =====================================================
   1. CSS VARIABLES (Customize These)
   ===================================================== */
:root {
  /* Layout */
  --header-max-width: 1220px;
  --border-radius: 999px;
  --hdr-h: 64px;
  --wp-admin-offset: 0px;
  --nav-bg: #373737;
  --nav-dropdown-bg: #373737;
  --nav-link: #ffffff;
  --nav-highlight: #63b9ff;
}

/* =====================================================
   2. BASE STYLES
   ===================================================== */
html, 
body {
/*  height: 100%;*/ /* hiding this because it seems to shorten the pages with Gutenberg. Does this sheet come through in the editor?  */
  overflow-x: clip;
}

body {
  -webkit-font-smoothing: antialiased;
}

.site-name-fallback,
.top-tools,
.util-links,
#mobileMenu {
  font-family: var(--zg-body-font-family);
  font-style: var(--zg-body-font-style);
}

.top-tools button,
.top-tools input,
#mobileMenu button,
#mobileMenu input {
  font: inherit;
}

/* =====================================================
   3. HEADER FRAME
   ===================================================== */
#header {
  position: relative;
  top: auto;
  z-index: 3001;
  overflow: visible;
  transition: transform 0.3s ease, box-shadow 0.25s ease, background-color 0.25s ease;
  background-color: var(--nav-bg);
  color: var(--nav-link);
}

#header.nav-is-sticky {
  position: sticky;
  top: var(--wp-admin-offset);
}

#header.nav-is-sticky.is-hidden {
  transform: translateY(calc(-100% - var(--wp-admin-offset)));
}

.header-inner {
  position: relative;
  max-width: var(--header-max-width);
  margin: 0 auto;
  padding: 14px 0 10px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  gap: 10px 18px;
  align-items: center;
  width: 90%;
  transition: padding 0.25s ease, gap 0.25s ease;
}

/* =====================================================
   4. BRANDING / LOGO
   ===================================================== */
.site-branding {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  min-width: 240px;
}

.site-branding a {
  display: flex;
  gap: 12px;
  align-items: center;
  text-decoration: none;
  color: var(--nav-link);
}

.site-branding img {
  height: 54px;
  width: auto;
  transition: height 0.25s ease;
}

#site-description {
  margin-top: 4px;
  font-size: 0.75rem;
  opacity: 0.9;
  color: var(--nav-link);
}

.site-name-fallback {
  font-weight: 800;
  color: var(--nav-link);
}

#header.nav-has-minimize.is-minimized .header-inner {
  padding-top: 8px;
  padding-bottom: 6px;
  gap: 6px 18px;
}

#header.nav-has-minimize.is-minimized .site-branding img {
  height: 58px;
}

#header.nav-has-minimize.is-minimized #site-description {
  opacity: 0;
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
}

/* =====================================================
   5. TOP TOOLS (Search & Language Switcher)
   ===================================================== */
.top-tools {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: -11px;
	display: flex;
	justify-content: flex-end;
	align-items: center;
}

.srchie {
  color: var(--nav-link);
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

/* Language Switcher */
.lang-switch {
  white-space: nowrap;
  font-weight: 700;
  color: var(--nav-link);
}

.lang-switch button {
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 700;
  color: inherit;
}

.lang-sep {
  opacity: 0.5;
  margin: 0 4px;
}

/* =====================================================
   6. MAIN NAVIGATION
   ===================================================== */
#menu {
  grid-column: 2;
  grid-row: 2;
  justify-self: center;
}

#menu .main-menu {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

#menu .main-menu > li > a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
  text-decoration: none;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 17px;
  color: var(--nav-link);
  transition: color 0.2s ease;
}

/* Dropdown Indicator */
#menu .main-menu > li.menu-item-has-children > a::after {
  content: "";
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid currentColor;
  margin-left: 4px;
}

/* Hide Dropdowns by Default */
#menu .sub-menu {
  display: none;
}

/* =====================================================
   7. UTILITY LINKS (Top-right CTAs)
   ===================================================== */
.util-links {
  grid-column: 3;
  grid-row: 2;
  display: flex;
  gap: 22px;
  align-items: center;
  min-height: 40px;
}

.util-links a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0.95;
  color: var(--nav-link);
  transition: color 0.2s ease, opacity 0.2s ease;
}

.util-links a:hover {
  opacity: 1;
  text-decoration: none;
  color: var(--nav-highlight);
}

.util-links .utility-nav,
.mm-ctas .utility-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.util-links .utility-nav {
  display: flex;
  gap: 22px;
  align-items: center;
  min-height: 40px;
}

.util-links .utility-nav li,
.mm-ctas .utility-nav li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.util-links .utility-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  line-height: 1;
}

#menu .main-menu > li > a:hover,
#menu .main-menu > li > a:focus,
#menu .main-menu > li.current-menu-item > a,
#menu .main-menu > li.current-menu-ancestor > a,
#menu .main-menu > li.current-menu-parent > a,
.lang-switch a:hover,
.lang-switch a:focus,
.lang-switch button:hover,
.lang-switch button:focus {
  color: var(--nav-highlight);
}

/* =====================================================
   8. HAMBURGER MENU BUTTON
   ===================================================== */
.hamburger {
  grid-column: 3;
  grid-row: 1;
  display: none;
  cursor: pointer;
  width: 48px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  position: relative;
  padding: 0;
  color: var(--nav-link);
}

.hamburger span,
.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 50%;
  background: currentColor;
  transform: translateX(-50%);
  width: 26px;
  height: 3px;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.hamburger::before {
  top: 9px;
}

.hamburger span {
  top: 50%;
  margin-top: -1.5px;
}

.hamburger::after {
  bottom: 9px;
}

/* Hamburger X Animation */
.hamburger.is-active::before {
  top: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
}

.hamburger.is-active::after {
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%) rotate(-45deg);
}

.hamburger.is-active span {
  opacity: 0;
}

/* =====================================================
   9. MOBILE MENU
   ===================================================== */
#mobileMenu {
  background: var(--nav-bg);
  color: var(--nav-link);
  position: fixed;
  left: 0;
  right: 0;
  top: var(--hdr-h);
  height: calc(100vh - var(--hdr-h));
  border-top: 1px solid transparent;
  overflow: auto;
  z-index: 3000;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transform-origin: top center;
  transition: transform 0.35s ease, opacity 0.25s ease, visibility 0s linear 0.35s;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.nd-search,
.nd-search-form,
.nd-search-btn {
  color: var(--nav-link);
}

.nd-search-input {
  color: var(--nav-link);
}

.nd-search-input::placeholder,
.mm-search input::placeholder {
  color: color-mix(in srgb, var(--nav-link) 80%, transparent);
}

#mobileMenu.is-open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0s;
}

#mobileMenu[data-animation="slidetop"] {
  transform: translateY(-100%);
}

#mobileMenu[data-animation="slidetop"].is-open {
  transform: translateY(0);
}

#mobileMenu[data-animation="slideleft"] {
  transform: translateX(-100%);
}

#mobileMenu[data-animation="slideleft"].is-open {
  transform: translateX(0);
}

#mobileMenu[data-animation="slideright"] {
  transform: translateX(100%);
}

#mobileMenu[data-animation="slideright"].is-open {
  transform: translateX(0);
}

#mobileMenu[data-animation="zoomright"] {
  transform: translateY(-24px) scale(0.92);
  transform-origin: top right;
}

#mobileMenu[data-animation="zoomright"].is-open {
  transform: translateY(0) scale(1);
}

#mobileMenu[data-animation="zoomcenter"] {
  transform: translateY(-24px) scale(0.92);
  transform-origin: top center;
}

#mobileMenu[data-animation="zoomcenter"].is-open {
  transform: translateY(0) scale(1);
}

.mm-top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mm-body {
  padding: 14px 0 10px;
  overflow: auto;
}

/* Mobile Search */
.mm-search {
  display: flex;
  gap: 8px;
  margin: 15px;
  position: relative;
}

.mm-search input {
  flex: 1;
  border: 0;
  border-radius: 4px;
  height: 40px;
  padding: 0 12px;
  width: 100%;
  color: var(--nav-link);
  background: transparent;
  border: 1px solid currentColor;
}

.mm-search button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  display: grid;
  place-items: center;
  position: absolute;
  right: 10px;
  top: 5px;
  cursor: pointer;
  color: var(--nav-link);
}

/* Mobile Accordion */
.mm-accordion {
  border-top: 1px solid transparent;
  margin: 0 15px;
}

.mm-section {
  border-bottom: 1px solid transparent;
}

.mm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 6px;
}

.mm-link {
  flex: 1;
  display: block;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding-right: 12px;
  line-height: 1.2;
  color: var(--nav-link);
  transition: color 0.2s ease;
}

.mm-toggle {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--nav-link);
}

.mm-toggle .chev {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: 0.2s;
}

.mm-section[aria-expanded="true"] .mm-toggle .chev {
  transform: rotate(-135deg);
}

.mm-panel {
  display: none;
  padding: 0 6px 12px;
  background: var(--nav-dropdown-bg);
}

.mm-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mm-panel a {
  display: block;
  padding: 10px 0;
  text-decoration: none;
  font-weight: 500;
  color: var(--nav-link);
  transition: color 0.2s ease;
}

.mm-link.is-current,
.mm-leaf.is-current,
.mm-panel .current-menu-item > a {
  font-weight: 900;
}

/* Mobile Leaf Items */
.mm-leaf-item {
  border-bottom: 1px solid transparent;
}

.mm-leaf {
  display: block;
  width: 100%;
  padding: 14px 6px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--nav-link);
  transition: color 0.2s ease;
}

/* Mobile Footer */
.mm-footer {
  margin-top: auto;
  border-top: 1px solid transparent;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.mm-ctas {
  display: grid;
  gap: 5px;
}

.mm-ctas a {
  display: inline-block;
  text-align: left;
  padding: 10px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  color: var(--nav-link);
}

.mm-ctas a:hover {
  opacity: 0.9;
}

.mm-ctas .utility-nav {
  display: grid;
  gap: 5px;
}

.mm-link:hover,
.mm-link:focus,
.mm-link.is-current,
.mm-leaf:hover,
.mm-leaf:focus,
.mm-leaf.is-current,
.mm-panel a:hover,
.mm-panel a:focus,
.mm-panel .current-menu-item > a,
.mm-ctas a:hover,
.mm-ctas a:focus,
.mm-lang a:hover,
.mm-lang a:focus,
.mm-close:hover,
.mm-close:focus,
.nd-search-btn:hover,
.nd-search-btn:focus,
.hamburger:hover,
.hamburger:focus {
  color: var(--nav-highlight);
}

/* =====================================================
   10. DESKTOP DROPDOWN MENUS
   ===================================================== */
@media (min-width: 1024px) {
  #header.nav-has-minimize.is-minimized .site-branding img {
    height: 62px;
  }

  #menu .main-menu > li {
    position: relative;
  }

  /* Invisible Hover Bridge */
  #menu .main-menu > li::after {
    content: "";
    position: absolute;
    left: -8px;
    right: -8px;
    top: 100%;
    height: 12px;
    z-index: 1;
  }

  #menu .sub-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 240px;
    border: 1px solid transparent;
    border-radius: 8px;
    box-shadow: 0 12px 24px rgba(0,0,0,.12);
    padding: 8px 0;
    z-index: 2;
    background: var(--nav-dropdown-bg);
  }

  #menu .main-menu > li:hover > .sub-menu,
  #menu .main-menu > li:focus-within > .sub-menu {
    display: block;
  }

  #menu .main-menu > li:last-child > .sub-menu,
  #menu .main-menu > li:nth-last-child(2) > .sub-menu {
    right: 0;
    left: auto;
  }

  #menu .sub-menu li {
    list-style: none;
  }

  #menu .sub-menu a {
    display: block;
    padding: 10px 16px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    text-transform: none;
    line-height: 1.3;
    letter-spacing: 0;
    color: var(--nav-link);
    transition: color 0.2s ease;
  }

  #menu .sub-menu a:hover,
  #menu .sub-menu a:focus {
    text-decoration: none;
    color: var(--nav-highlight);
  }

  #menu .sub-menu .current-menu-item > a {
    font-weight: 600;
  }
}

/* =====================================================
   11. DESKTOP EXPANDING SEARCH
   ===================================================== */
@media (min-width: 1024px) {
  .nd-search {
    position: relative;
    width: 40px;
    height: 40px;
  }

  .nd-search-form {
    height: 40px;
  }

  .nd-search-btn {
    position: absolute;
    right: 0;
    top: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: transparent;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    z-index: 2;
  }

  .nd-search-input {
    position: absolute;
    right: 0;
    top: 0;
    height: 40px;
    width: 0;
    opacity: 0;
    padding: 0;
    border: 1px solid currentColor;
    border-radius: 999px;
    background: var(--nav-bg);
    outline: none;
    transition: width 0.35s ease, opacity 0.2s ease, padding 0.35s ease;
    z-index: 1;
  }

  .nd-search:hover .nd-search-input,
  .nd-search:focus-within .nd-search-input {
    width: 260px;
    padding: 0 48px 0 12px;
    opacity: 1;
  }
}

/* =====================================================
   12. DESKTOP LAYOUT (1024px+)
   ===================================================== */
@media (min-width: 1024px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto auto;
    row-gap: 8px;
  }

  .site-branding {
    grid-column: 1;
    grid-row: 1 / span 3;
    align-self: center;
    justify-self: start;
    min-width: 280px;
  }

  .site-branding img {
    height: 75px;
  }

  #header.nav-has-minimize.is-minimized .site-branding img {
    height: 60px;
  }

  .top-tools {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    align-self: start;
  }

  .util-links {
    grid-column: 3;
    grid-row: 2;
    justify-self: end;
    align-self: center;
    white-space: nowrap;
  }

  #menu {
    grid-column: 3;
    grid-row: 3;
    justify-self: end;
    align-self: end;
    height: 36px;
  }

  #menu .main-menu {
    flex-wrap: nowrap;
    border-bottom: 0;
  }

  #menu .main-menu > li > a {
    white-space: nowrap;
  }
}

/* =====================================================
   13. MOBILE BREAKPOINT (<1024px)
   ===================================================== */
@media (max-width: 1023.98px) {
  #header.nav-has-minimize.is-minimized .header-inner {
    padding-top: 10px;
    padding-bottom: 8px;
  }

  #header.nav-has-minimize.is-minimized .site-branding img {
    height: 46px;
	  
  }

  #menu .main-menu,
  .util-links,
  .nd-search {
    display: none;
  }

  .hamburger {
    display: inline-block !important;
  }

  .top-tools {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    margin-right: 4px;
    z-index: 3002;
  }

  .top-tools .lang-switch {
    display: block !important;
    font-size: 14px;
  }

  .header-inner {
    padding: 14px 5px 10px;
  }
}

/* =====================================================
   14. TABLET LAYOUT (1024-1360px)
   ===================================================== */
@media (min-width: 1024px) and (max-width: 1360px) {
  .header-inner {
    margin-left: auto;
    margin-right: auto;
  }

  #menu .main-menu {
    position: relative;
  }
}

/* =====================================================
   15. COMPACT DESKTOP (1024-1359px)
   ===================================================== */
@media (min-width: 1024px) and (max-width: 1359.98px) {
  .header-inner {
    grid-template-columns: minmax(220px, auto) 1fr auto;
    row-gap: 6px;
  }

  #menu .main-menu {
    gap: 20px;
  }

  #menu .main-menu > li > a {
    font-size: 0.9rem;
    letter-spacing: 0.03em;
  }

  .util-links {
    gap: 16px;
  }

  .util-links a {
    font-size: 0.9rem;
  }

  .site-branding img {
    height: 70px;
  }

  .nd-search:hover .nd-search-input,
  .nd-search:focus-within .nd-search-input {
    width: 220px;
  }
}

/* =====================================================
   16. ULTRA-COMPACT DESKTOP (1024-1119px)
   ===================================================== */
@media (min-width: 1024px) and (max-width: 1119.98px) {
  .header-inner {
    grid-template-columns: minmax(200px, auto) 1fr auto;
    row-gap: 6px;
    padding: 12px 14px;
  }

  #menu .main-menu {
    gap: 16px;
  }

  #menu .main-menu > li > a {
    font-size: 0.86rem;
    letter-spacing: 0.02em;
    padding: 6px 0;
  }

  .util-links {
    gap: 12px;
  }

  .util-links a {
    font-size: 0.86rem;
  }

  .site-branding img {
    height: 65px;
  }

  .nd-search {
    width: 40px;
    height: 36px;
  }

  .nd-search-btn {
    width: 36px;
    height: 36px;
  }

  .nd-search-input {
    height: 36px;
  }

  .nd-search:hover .nd-search-input,
  .nd-search:focus-within .nd-search-input {
    width: 200px;
  }
}

/* =====================================================
   17. MOBILE TYPOGRAPHY
   ===================================================== */
@media screen and (max-width: 767px) {
  div p {
    font-size: 16px;
    line-height: 26px;
  }
}
