/* Reset and Fonts */
/* @import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;500&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;500&display=swap"); */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;500;700&display=swap");

.bar-header,
.bar-footer,
.content-header,
.content-footer {
  padding: 20px;
}


body,
.content,
.bar,
.bar-header,
.bar-menu,
.bar-footer,
.content-header,
.content-body,
.content-footer {
  font-family: "Inter", sans-serif;
  font-weight: 300;
  margin: 0px;
}

.content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
  /* Enable container query units (cqw/cqh) so sections can size by content width, not viewport */
  container-type: inline-size;
  container-name: content;
}

.content-header {
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.content-header img{
  max-height: 100px;
}

.content-header h1 {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  text-wrap: nowrap;
}

.content-body {
  flex-grow: 1;
  text-align: center;
  /* justify-items: center; */
}

@media screen and (max-width: 450px) { 
  .content-body {
    font-size: 0.9em;
  }
}

.content-footer {
  padding-top: 40px;
  background-color: #333;
  color: #ccc;
  /* Consolidated footer layout (moved from styles.css) */
  display: flex;
  flex-flow: row wrap;
}

/* Footer child flex distribution */
.content-footer > * {
  flex: 1 100%;
}

/* Footer navigation layout (consolidated) */
.footer__nav {
  display: flex;
  flex-flow: row wrap;
}

.footer__nav > * {
  flex: 1 50%;
  margin-right: 1.25em;
}

.footer__nav > li {
  min-width: 200px;
}

.content-footer a {
  color: #ccc;
}

/* Footer structural + presentation */
.content-footer .info { display:flex; align-items:flex-start; justify-content:space-between; gap:60px; padding-bottom:20px; }
/* Primary group: logo + contact stacked horizontally on wide screens */
.content-footer .footer__group--primary { display:flex; align-items:flex-start; gap:40px; flex:1 1 auto; }
.content-footer .footer__group--primary .footer-logo-link img { max-width:160px; height:auto; display:block; }
.content-footer .footer__group--primary .footer__contact { display:flex; flex-direction:column; gap:6px; }

/* Products group anchored right, left-aligned internally */
.content-footer .footer__group--products { display:flex; flex-direction:column; gap:10px; flex:0 0 auto; min-width:360px; }
.content-footer .footer__group--products .product-groups { display:flex; gap:70px; }
.content-footer .footer__group--products .nav__ul { text-align:left; }

.content-footer .nav__title { font-size:28px; font-weight:500; color:#fff; margin:0 0 .4em; line-height:1.1; }
.content-footer .nav__ul { list-style:none; margin:0; padding:0; }
.content-footer .footer-logo-link img { max-width:160px; height:auto; object-fit:contain; display:block; }
.content-footer address { margin-top:.2em; font-style:normal; line-height:1.4em; }
.content-footer .emailimage { display:inline-block; height:1.4em; margin:6px 0 -6px 0px; max-width:200px; }
.content-footer a { position:relative; text-decoration:none; }
.content-footer a.active:after, .content-footer a:hover:after { width:100%; }
.content-footer a.active {
  color: #fff;
}
.content-footer a:not(:has(img)):after { background:#fff; bottom:-2px; left:0; content:""; display:block; height:0.1px; padding-bottom:1px; position:absolute; transition:.3s ease-in; width:0; }
.content-footer ul { list-style:none; padding-left:0; }
.content-footer li { line-height:2em; text-wrap:nowrap; }
.content-footer .legal { font-size:.85em; margin-top:25px; }
.content-footer .legal p { margin-bottom:0; }
/* Footer product subheadings (Excel Add-ins / Enterprise) */
.content-footer .product-subgroup .subheading {
  font-weight:600;
  font-size:1.05em;
  letter-spacing:0.4px;
  color:#fff;
  margin:0 0 6px 0;
  display:block;
  position:relative;
}
/* subtle divider underline */
.content-footer .product-subgroup .subheading:after {
  content:"";
  position:absolute;
  left:0;
  bottom:-3px;
  width:28px;
  height:2px;
  background:#21A366;
  border-radius:2px;
}
@media (max-width: 1200px) { .content-footer .footer__group--products .product-groups { gap:50px; } }
@media (max-width: 1000px) { .content-footer .info { gap:40px; } }
/* Medium: stack products below primary */
@media (max-width: 900px) { .content-footer .info { flex-direction:column; align-items:flex-start; } .content-footer .footer__group--products { width:100%; } }
/* Small: within primary, stack logo above contact */
@media (max-width: 620px) { .content-footer .footer__group--primary { flex-direction:column; gap:20px; } .content-footer .footer__group--products .product-groups { flex-direction:column; gap:25px; } }

body {
  display: grid;
  height: 100vh;
  overflow: hidden;
}

.bar {
  background: radial-gradient(ellipse at bottom right, #103D25 0%, #081F12 100%);
  color: white;
  box-shadow: 7px 0px 10px 0px rgba(0, 0, 0, 0.7);
  z-index: 4;
}

.bar-header {
  align-items: center;
}

.toggle-button {
  height: 100%;
  width: auto;
  box-sizing: border-box;
  transition: transform 0.3s ease-in-out;
  margin-left: auto;
}



.toggle-button:hover path {
  fill: #ffffff;
}

.toggle-button.rotated {
  transform: rotate(-225deg);
}

.bar-menu ul {
  list-style: none;
  padding: 0;
}

.bar-menu ul li {
  position: relative;
}

  .bar-menu ul li:has(> a.active) {
    background-color: #185C37;
  }
  /* prevent the <a> itself from also showing a background in supporting browsers */
  .bar-menu ul li > a.active {
    background-color: transparent;
  }
  /* if any descendant in a submenu is active, mark the parent has-submenu <li> as active */
  .bar-menu ul li.has-submenu:has(.submenu a.active, .submenu li.active) {
    background-color: #185C37;
  }

/* Hover highlight animation for all clickable items (exclude headings) */
.bar-menu ul li:not(.submenu-heading)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background: #107C41;
  transition: width 0.3s ease;
}

.bar-menu ul li a, .bar-menu ul li button.menu-link {
  color: white;
  padding: 10px;
  height: 2.5em;
  box-sizing: border-box;
  text-decoration: none;
  position: relative;
  align-content: center;
  display: inline-flex;
  width: 100%;
  /* align-items: center; */

}


.bar-menu ul li a svg {
  margin-left: 10px;
}
/* NAV BUTTON (for semantic button trigger) overrides global button styling */
.bar-menu ul li button.menu-link {
  background: none;
  border: 0;
  padding: 10px;
  height: 2.5em;
  box-sizing: border-box;
  text-decoration: none;
  position: relative;
  align-content: center;
  display: inline-flex;
  width: 100%;
  color: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 0;
  transform: none !important;
}
.bar-menu ul li button.menu-link svg { margin-left: 10px; }
.bar-menu ul li button.menu-link::before { content: none !important; }
.bar-menu ul li button.menu-link:hover { background: none; }
.bar-menu ul li button.menu-link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.bar-menu ul li.has-submenu > button.menu-link { cursor: pointer; }


.bar-menu ul li:not(.submenu-heading):hover::before,
.bar-menu ul li:not(.submenu-heading).touch-hover::before {
  width: 100%;
}

/* Submenu group heading styling */
.submenu-heading {
  font-weight: 500;
  font-size: 1.35em;
  letter-spacing: 0.5px;
  display: block;
  /* explicit sides to avoid later partial overrides confusing devtools */
  padding-top: 16px;
  padding-right: 22px;
  padding-bottom: 14px; /* extra space below heading */
  padding-left: 22px;
  line-height: 1.2;
  margin: 0 0 10px; /* clearer separation from first link */
}
/* Adjust heading top padding per layout mode */
body.sidebar .submenu .submenu-heading { padding-top: 18px; }
body.topbar .submenu .submenu-heading { padding-top: 12px; }


/* Skip link (accessible jump to main content) */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}
.skip-link:focus {
  left: 10px;
  top: 10px;
  width: auto;
  height: auto;
  padding: 8px 12px;
  background: #107C41;
  color: #fff;
  z-index: 1000;
  border-radius: 4px;
}

/* Product icon styling (was inline previously) */
.menu-product-icon {
  height: 1.5em;
  width: auto;
  padding: 3px;
  margin: -3px 8px -3px 0;
  background: #ffffff;
  border-radius: 4px;
  display: inline-block;
  box-sizing: content-box;
}

/* Unified product logo sizing */
.product-logo.long {
  max-width: min(80%, calc(200px + 0.15 * 100vw));
  margin: 0 auto;
}
.product-logo {
  max-width: min(60%, calc(100px + 0.1 * 100vw));
  margin: 0 auto;
  height: auto;
}

/* Slight extra indent for submenu product links to separate from heading */
.submenu .menu-product-link, .submenu a:not(.menu-link) {
  padding-left: 28px;
}




/* hovering submenu subitems */
.submenu ul li:not(.submenu-heading)::before {
  height: 100%;
  background: #107C41;
}

.submenu ul li:not(.submenu-heading):hover::before {
  width: 100%;
}


.submenu ul li a {
  padding-left: 0;
}

.submenu * {
  color: #fff;
}



.logo-topbar {
  height: 100%;
  width: auto;
  max-width: 60%;
  box-sizing: border-box;
  transition: max-height 0.3s ease-in-out;


}

.logo-sidebar {
  max-width: 100%;
  padding: 20px;
  box-sizing: border-box;
}








/* SIDEBAR MODE */
/* SIDEBAR MODE */
/* SIDEBAR MODE */
/* SIDEBAR MODE */
/* SIDEBAR MODE */
body.sidebar {
  grid-template-columns: 200px 1fr;
  /* Fixed width for sidebar, remaining space for content */
  grid-template-rows: 1fr;
  /* One row that takes up all available height */
}

body.sidebar .bar {
  grid-area: 1 / 1 / 1 / 1;
  display: flex;
  flex-direction: column;
}

body.sidebar .content {
  grid-area: 1 / 2 / 1 / 2;
}

body.sidebar .bar-header .toggle-button {
  display: none;
}

/*

.bar {
  flex-grow: 1;
  flex-direction: column;
  display: flex;
  height: 100%;
}

.bar-menu {
  flex-grow: 1;
} */

body.sidebar .logo-topbar {
  display: none;
}

body.sidebar .logo-sidebar {
  display: inline-block;
}












/* makes submenu two columns */
body.sidebar .submenu ul {
  width: 50%;
  float: left;
}



body.sidebar .submenu {
  position: absolute;
  left: 0px;
  top: 0px;
  opacity: 0;
  background: radial-gradient(ellipse at top left, #185C37 0%, #103D25 100%);
  visibility: hidden;
  width: 600px;
  transition: all 0.3s ease;
  box-shadow: 7px 0px 10px 0px rgba(0, 0, 0, 0.7);
  z-index: 1;
}


body.sidebar .submenu.submenu-visible {
  opacity: 1 !important;
  /* background-color: #21A366 !important; */
  visibility: visible !important;
  left: 200px !important;
}

/* Sidebar mode submenu item base padding (exclude headings so they can have their own spacing) */
body.sidebar .submenu li:not(.submenu-heading),
body.sidebar .submenu h3 {
  padding: 0 20px;
}
/* Ensure headings keep intended padding even after generic li rule */
body.sidebar .submenu .submenu-heading { padding:16px 22px 14px 22px; }

body.sidebar .submenu h3 {
  font-weight: 500;
}






/* TOPBAR MODE */
/* TOPBAR MODE */
/* TOPBAR MODE */
/* TOPBAR MODE */
/* TOPBAR MODE */

body.topbar {
  grid-template-columns: 1fr;
  grid-template-rows: 60px 1fr;
}

body.topbar .bar {
  grid-area: 1 / 1 / 1 / 1;
}

body.topbar .bar {
  width: 100%;
  height: 100%;
  transition: height 0.3s ease-in-out;
}

body.topbar .content {
  grid-area: 2 / 1 / 2 / 1;
}

body.topbar .logo-sidebar {
  display: none;
}

body.topbar .logo-topbar {
  display: inline-block;
}

body.topbar .bar-header {
  padding: 10px 20px;
  display: flex;
  height: 60px;
  align-items: center;
  box-sizing: border-box;
  transition: height 0.3s ease-in-out;
}

body.topbar .bar-menu ul {
  list-style: none;
  padding: 0;
  width: 100%;
  margin: 0 auto;
}

body.topbar .bar-menu,
body.topbar .bar-footer {
  opacity: 0;
  visibility: hidden;
  transition: visibility 0s linear 0.3s, opacity 0.3s ease-in-out;
  justify-content: center;
}

body.topbar .bar.expanded .bar-menu,
body.topbar .bar.expanded .bar-footer {
  visibility: visible;
  opacity: 1;
  transition: visibility 0s linear 0.3s, opacity 0.3s ease-in-out;
}

body.topbar .bar.expanded .bar-header {
  height: 70px;

}

body.topbar .bar.expanded {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

/* In topbar expanded state, scroll only the menu area; footer stays pinned at bottom */
body.topbar .bar.expanded .bar-menu { overflow-y: auto; min-height: 0; }



body .bar-menu {
  flex-grow: 1;
}


body.topbar .submenu {
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  position: relative;
  background: radial-gradient(ellipse at bottom right, #185C37 0%, #103D25 100%);

}

body.topbar .submenu-visible {
  visibility: visible;
  max-height: 700px;
  transition: max-height 0.6s ease !important;
}


body.topbar .submenu ul li a {
  padding-left: 20px;
}

body.topbar .submenu h3 {
  display: none;
}

.bar-menu ul li.has-submenu > a {
  cursor: pointer;
}