@charset "UTF-8";
/* ========= Child Theme Override: Top-Fixed, Right-Justified Nav ========= */
/* This file replaces the parent nav.css in full. */

/* ===== Base ===== */
nav {
  position: fixed;        /* Make it stick */
  height: var(--el-nav-height);
  top: 0;
  right: 0;
  left: 0;
  display: flex;
  justify-content: flex-end;   /* Push menu to the right */
  align-items: flex-start;
  padding: 0 1em;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  /*-webkit-backdrop-filter: blur(3px); /* For Safari */
  /* backdrop-filter: blur(3px); */
  z-index: 100;
}

nav.el-home-nav {
  
}

/* Space beneath fixed nav so content doesn't hide under it */
body {
}

/* ===== Logo Adjustments (optional for your child starter theme) ===== */
.md-header-logo {
  position: fixed;
  left: 0;
  top: 0;
  height: var(--el-nav-height);
  width: 30%;
  z-index: 125;
  overflow: hidden;
}
@media (min-width: 1501px ){
  .md-header-logo {
    margin-left: calc( ( 100% - 1500px ) / 2 );
      width: 450px;
  }
}
.md-custom-logo {
  display: block; 
}

.md-custom-logo-mobile {
  display: none;
}

.md-custom-logo img {
  height: var(--el-nav-height);
  width: auto;
}
/* ===== Hamburger (preserved) ===== */
#the-bars {
  display: none;
  background: none;
  border: none;
  margin-left: auto;
  font-size: 1.75rem;
  cursor: pointer;
}

/* ===== Menu Container ===== */
.menu-header-menu-container,
.menu-client-menu-container {
  display: flex;
  align-items: center;
  max-width: 1500px;
  z-index: 150;
}
@media (min-width: 1501px ){
  .menu-header-menu-container,
  .menu-client-menu-container {
    margin-left: calc( ( 100% - 1500px ) / 2 );
    margin-right: calc( ( 100% - 1500px ) / 2 );
  }
}

/* ===== Menu (desktop) ===== */
.menu-header-menu-container .menu,
.menu-client-menu-container .menu {
  list-style: none;
  display: flex;
  flex-direction: row;
  justify-content: flex-end;   /* RIGHT aligned */
  padding: 0;
  margin: 0 1rem 0 0;
}

.menu-header-menu-container .menu > li,
.menu-client-menu-container .menu > li {
  margin: 0;
  padding: 0;
}

.menu-header-menu-container .menu > li > a,
.menu-client-menu-container .menu > li > a {
  display: block;
  padding: var(--el-nav-a-padding);
  font-size: 0.875rem;
  text-transform: none;
  text-decoration: none;
  color: var(--el-blue);
  font-weight: bold;
  border-bottom: 4px solid transparent;
}

.menu-header-menu-container .menu > li > a:hover,
.menu-client-menu-container .menu > li > a:hover {
  background-color: rgba(145,168,42,0.3);
  border-bottom: 4px solid var(--el-green);
}

/* Current page */
.menu-header-menu-container .menu > li.current_page_item > a,
.menu-client-menu-container .menu > li.current_page_item > a {
  background-color: rgba(145,168,42,0.125);
  border-bottom: 4px solid var(--el-dark-green);
  font-weight: bold;
}

.menu-header-menu-container .menu > li.current_page_item > a:hover,
.menu-client-menu-container .menu > li.current_page_item > a:hover {
  background-color: rgba(145,168,42,0.3);
}
/* ===== Dropdown (unchanged structurally) ===== */
.menu-header-menu-container .sub-menu,
.menu-client-menu-container .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;      /* anchor submenu under its own LI */
  min-width: 12rem;
  padding: 0;
  list-style: none;
  background-color: rgba(255,255,255,0.875);
  z-index: 200;
}

/* Fix LI width so submenu aligns under correct menu item */
.menu-header-menu-container .menu > li,
.menu-client-menu-container .menu > li {
    position: relative;       /* required for submenu anchoring */
    display: inline-block;    /* <— IMPORTANT: fixes submenu placement */
    margin-left: 0;
    padding: 0;
}


.menu-header-menu-container .menu > li.is-open > .sub-menu,
.menu-client-menu-container .menu > li.is-open > .sub-menu {
  display: block;
  z-index: 200;
}
.menu-header-menu-container .menu > li.is-open > .sub-menu a,
.menu-client-menu-container .menu > li.is-open > .sub-menu a {
  background-color: rgba(145,168,42,0.125);
}

/* portal & Client Corner Menu Items */
.menu-header-menu-container .menu > li.is-open > .sub-menu .el-client-area a,
.menu-client-menu-container .menu > li.is-open > .sub-menu .el-client-area a,
.menu-header-menu-container .menu > li.is-open > .sub-menu .el-m-portal a,
.menu-client-menu-container .menu > li.is-open > .sub-menu .el-m-portal a {
  background-color: rgba(211, 131, 111,0.5);
}

.menu-header-menu-container .sub-menu li a,
.menu-client-menu-container .sub-menu li a {
  display: block;
  padding: var(--el-nav-a-padding);
  font-size: 0.75rem;
  text-decoration: none;
  border-left: 4px solid transparent;
  color: var(--el-blue);
}
.menu-header-menu-container .menu > li.is-open > .sub-menu li.current_page_item a,
.menu-client-menu-container .menu > li.is-open > .sub-menu li.current_page_item a {
  background-color: rgba(145,168,42,0.3);
  border-left: 4px solid var(--el-green);
}

.menu-header-menu-container .menu > li.is-open > .sub-menu li a:hover,
.menu-client-menu-container .menu > li.is-open > .sub-menu li a:hover {
  background-color: rgba(145,168,42,0.45);
  border-left: 4px solid var(--el-green);
}

/* == menu contacts == */
#el-menu-contact {
  position: fixed;
  display: flex;
  justify-content: flex-end;
  top: 3rem;
  right: 1rem;
  font-size: 1rem;
  /*background: rgba(0,0,0,0.25);*/
  line-height: 1;
  z-index: 175;
  width: 4rem;
  overflow: hidden;
}

@media (min-width: 1501px) {
  #el-menu-contact {
    right: calc( ( ( 100% - 1500px ) / 2 ) + 1rem );
  }
}
@media (max-width: 768px) {
  #el-menu-contact {
    top: 0.75rem;
  }
}
#el-menu-contact i {
  color: var(--el-blue);
  margin: 0 1em 0 0;
  cursor: pointer;
}
/* ===== Mobile (≤768px) ===== */
@media (max-width: 768px) {

  .md-custom-logo,
  .md-header-logo {
    display: none; 
  }

  .md-header-logo {
    position: relative;
    width: 100%;
    display: block;
    height: unset;
    margin: 0;
    padding: 0;
  }

   .md-header-logo #md-logo-mobile {
    display: block;
    width: 100%;
    height: var(--el-nav-height);
   }

   
   .md-header-logo #md-logo-mobile a {
    display: block;
    width: 100%;              /* set to your logo width */
    height: var(--el-nav-height);              /* set to your mobile header height */
    background-image: url('/wp-content/uploads/2025/11/el-cactus-logo-h-web.svg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: contain;

    text-indent: -9999px;      /* hide text visually */
    overflow: hidden;
    white-space: nowrap;
  }
  
  #the-bars {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 0.25rem;
    left: 0.25rem;
    width: 1.75rem;
    height: 1.75rem;
    font-size: 1.5rem;
    z-index: 150;
    padding: 0.125rem;
    border: 1px solid var(--el-white);
    background-color: var(--el-blue);
  }

  #the-bars i {
    font-family: "Font Awesome 6 Pro";
    margin: 0 auto;
    cursor: pointer;
    color: var(--el-green);
  }

  /* Collapsible mobile nav */
  #the-nav {
    position: absolute;
    right: 0;
    top: var(--el-nav-height);
    left: 0;
    height: unset;
    background: rgba(255,255,255,0.98);
    border-left: 1px solid rgba(0,0,0,0.1);
    display: none;
  }
  #the-nav:not(.is-collapsed) {
    display: block;
  }

  /* make it full width */
  .menu-header-menu-container,
  .menu-client-menu-container {
    width: 100%;
  }

  /* Vertical stack */
  .menu-header-menu-container .menu,
    .menu-client-menu-container .menu {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    margin: 0;
    padding: 0;
    align-items: stretch;
}

  .menu-header-menu-container .menu > li,
  .menu-client-menu-container .menu > li {
    margin: 0;
    width: 100%;
  }

  .menu-header-menu-container .menu > li > a,
  .menu-client-menu-container .menu > li > a {
    padding: 0.75em;
    width: 100%;
    text-align: center;
    justify-content: center;
    border-bottom: 1px solid rgba(0,0,0,0.07);
  }

  .sub-menu {
    position: static;
    box-shadow: none;
    background: transparent;
  }

    /* Force submenus back into normal flow */
  .menu-header-menu-container .sub-menu,
  .menu-client-menu-container .sub-menu {
    position: static;
    display: none;
    width: 100%;
    min-width: 0;
    background: transparent;
  }

  .menu-header-menu-container .sub-menu li a,
  .menu-client-menu-container .sub-menu li a {
    width: 100%;
    text-align: center;
    padding-left: 0;
    padding-right: 0;
  }

  /* When opened, submenus expand the list */
  .menu-header-menu-container .menu > li.is-open > .sub-menu,
  .menu-client-menu-container .menu > li.is-open > .sub-menu {
    display: block;
  }

  .menu-header-menu-container .menu > li.is-open > .sub-menu a,
  .menu-client-menu-container .menu > li.is-open > .sub-menu a {
    padding-top: 1em;
    padding-bottom: 1em;
  }

  /* Undo inline-block desktop behavior */
  .menu-header-menu-container .menu > li,
  .menu-client-menu-container .menu > li {
    display: block;
    position: static;
  }

}

/* ===== Footer menu preserved from parent ===== */
footer {
  text-align: center;
  background: #fff;
  padding: 1em;
}
