/**
 * Navigation styles for header-clean.php
 * Copied from style.css (which is dequeued on this template).
 * Includes: hamburger, flyout #navContainer, search, secondary nav, main nav, social.
 */

/* ── Layout: header__container acts like #header .inner .top-area ── */

.header .header__container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Hide donate buttons in clean header */
.header .special-button.featured {
  display: none !important;
}

/* ── Secondary nav (inline) ── */

.nav-secondary li {
  display: inline-block;
}

.nav-secondary li a {
  font-size: clamp(1.25rem, 1.1893rem + 0.2589vw, 1.5rem);
  line-height: 1;
  color: #007a53;
  font-weight: 500;
  text-transform: uppercase;
}

/* ── Search toggle ── */

#toggleSearch svg {
  margin-right: 70px;
  width: auto !important;
  height: 25px !important;
}

#toggleSearch svg path {
  fill: #56584f;
}

/* ── Toggle / close buttons ── */

#toggleNav,
#closeNav,
#toggleSearch {
  display: inline-block;
  padding: 0;
  background-color: transparent !important;
  border: none !important;
  cursor: pointer;
}

#toggleNav {
  margin-left: -23px;
}

#toggleNav span.line {
  background-color: #56584f;
  height: 2px;
  width: 38px;
  display: block;
  margin-top: 10px;
}

#toggleNav span.line:first-child {
  margin-top: 0 !important;
}

/* ── Close button (X) ── */

#closeNav {
  height: 43px;
  width: 38px;
  position: absolute;
  top: 80px;
  right: 40px;
}

#closeNav span.line {
  background-color: #007a53;
  height: 2px;
  width: 43px;
  display: block;
}

#closeNav span.line:first-child {
  transform: rotate(45deg);
  transform-origin: center;
}

#closeNav span.line:last-child {
  transform: rotate(-45deg);
  transform-origin: center;
  margin-top: -2px;
}

/* ── #navContainer flyout ── */

#navContainer.hide-nav {
  position: absolute;
  top: 0;
  right: -690px;
}

#navContainer {
  display: block;
  height: 100vh;
  position: absolute;
  top: 0;
  right: -690px;
  padding: 0 70px 80px 70px;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: #eeeee4;
  z-index: 999999999999999;
}

.width-match,
#navContainer {
  max-width: 690px;
}

.width-match {
  padding: 0 70px;
  margin-right: -70px;
}

#navContainer .top-area,
.width-match {
  height: 67px;
  position: relative;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

#navContainer .bottom-area {
  margin-top: 5rem;
  column-count: 2;
}

#navContainer .special-button a:after {
  background-color: #eeeee4;
}

/* ── Main nav inside flyout ── */

#navMain .menu li {
  display: block;
  text-align: left;
  break-inside: avoid;
}

#navMain .menu > li {
  margin-bottom: 60px;
}

#navMain .menu li a {
  color: #56584f;
  font-size: clamp(1.25rem, 1.1893rem + 0.2589vw, 1.5rem);
  line-height: 1;
}

#navMain .menu .sub-menu {
  margin-top: 22px;
}

#navMain .menu .sub-menu li {
  margin-top: 20px;
  margin-left: 7px;
}

#navMain .menu .sub-menu li a {
  color: #007a53;
  font-size: 1.25rem;
  line-height: 1.2;
}

/* ── Social media ── */

.social-media svg {
  width: auto !important;
  height: 33px !important;
  margin-right: 29px;
}

.social-media a {
  text-decoration: none;
  display: inline-block;
}

#navContainer .social-media svg path {
  fill: #007a53;
}

/* ── Search bar ── */

.search-bar-wrapper.hide-search {
  display: none;
}

.search-bar-wrapper {
  background-color: #f8f8f4;
  width: 800px;
  height: 80px;
  position: absolute;
  right: 150px;
  top: 0;
  padding: 16px 0;
}

.search-bar-wrapper label {
  font-weight: 600;
  font-size: clamp(1.125rem, 1.0643rem + 0.2589vw, 1.375rem);
  line-height: 1;
  display: inline-block;
  margin-right: 10px;
}

.search-bar-wrapper .text-box-wrapper {
  display: inline-block;
}

.search-bar-wrapper .text-box-wrapper input[type="submit"] {
  font-size: clamp(0.875rem, 0.8143rem + 0.2589vw, 1.125rem);
  font-weight: 600;
  line-height: 1;
  color: #007a53;
  text-transform: uppercase;
  background-color: transparent;
  border: none;
  padding: 10px;
  cursor: pointer;
}

.search-bar-wrapper .text-box-wrapper input[type="text"] {
  background-color: transparent;
  border: none;
  border-bottom: 2px solid #56584f;
  width: 600px;
  max-width: 100%;
  padding: 5px;
  color: #007a53;
  font-size: clamp(1.125rem, 1.0643rem + 0.2589vw, 1.375rem);
  line-height: 1;
}
.search-bar-wrapper .text-box-wrapper input[type="text"]::placeholder {
  font-size: clamp(1.125rem, 1.0643rem + 0.2589vw, 1.375rem);
}

/* ── Special button base (for non-donate links in secondary menu) ── */

.special-button a,
a.special-button {
  color: #56584f !important;
  display: inline-block;
  padding: 18px 35px 17px 35px;
  border: 4px solid rgba(86, 88, 79, 0);
  outline: 4px solid rgba(86, 88, 79, 0.2);
  outline-offset: -4px;
  font-weight: 600;
  font-size: 180%;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
}

.special-button a:after,
a.special-button:after {
  content: "";
  display: block;
  position: absolute;
  border: 4px solid rgba(234, 223, 41, 0.8);
  width: 18px;
  height: 18px;
  top: 50%;
  right: -12px;
  transform: translate(0, -50%) rotate(45deg);
  transform-origin: center;
  background-color: #eeeee4;
}

.special-button a:hover,
a.special-button:hover {
  color: #787b6e !important;
  border: 4px solid rgba(86, 88, 79, 0.4);
  outline: 4px solid rgba(86, 88, 79, 0);
  outline-offset: 15px;
}

.special-button a:hover:after,
a.special-button:hover:after {
  border-color: rgba(234, 223, 41, 0);
  background-color: rgba(234, 223, 41, 0.8);
  width: 12px;
  height: 12px;
  right: -8px;
}

/* ── #menu-secondary link colors ── */

#menu-secondary a,
#menu-secondary-1 a {
  color: #56584f !important;
}

#menu-secondary-1 li a {
  color: #007a53 !important;
}

#menu-secondary a:hover,
#menu-secondary-1 a:hover,
.nav-secondary li a:hover {
  color: #787b6e !important;
}

/* ── Transitions ── */

button.sub-nav-back,
#navMain .menu > li:after {
  transition: all 1250ms cubic-bezier(0.19, 1, 0, 1) !important;
}

#navMain .menu .sub-menu li a,
.nav-secondary li a,
#navMain .menu li a,
.search-bar-wrapper .text-box-wrapper input[type="submit"] {
  transition: 1250ms color cubic-bezier(0.19, 1, 0, 1);
}

#navContainer .social-media svg path,
#toggleSearch svg path {
  transition: 1250ms fill cubic-bezier(0.19, 1, 0, 1);
}

#closeNav span.line,
#toggleNav span.line,
#navMain .menu > li {
  transition: 1250ms background cubic-bezier(0.19, 1, 0, 1);
}

/* ── Hover states ── */

#navMain .menu .sub-menu li a:hover,
.search-bar-wrapper .text-box-wrapper input[type="submit"]:hover {
  color: #00bf82 !important;
}

#navContainer .social-media svg:hover path {
  fill: #00bf82;
}

#closeNav:hover span.line {
  background-color: #00ae75;
}

#navMain .menu li a:hover {
  color: #787b6e !important;
}

#toggleNav:hover span.line {
  background-color: #787b6e;
}

#toggleSearch:hover svg path {
  fill: #787b6e;
}

/* ── Bottom overrides (same as end of style.css) ── */

.header .width-match {
  width: 770px !important;
}

.header .special-button {
  margin-right: 25px !important;
}

/* ── .hidden utility ── */

.hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ══════════════════════════════════════════════════════════════════════════ */
/*  Responsive                                                              */
/* ══════════════════════════════════════════════════════════════════════════ */

@media screen and (max-width: 1400px) {
  .width-match,
  #navContainer {
    width: 630px;
  }

  #closeNav {
    top: 60px;
  }

  .search-bar-wrapper .text-box-wrapper input[type="text"] {
    width: 400px;
  }

  .search-bar-wrapper {
    right: 135px;
    width: 560px;
  }
}

@media screen and (max-width: 1300px) {
  #navContainer .bottom-area {
    margin-top: 20px;
  }

  #closeNav {
    top: 35px;
  }
}

@media screen and (max-width: 1060px) {
  .search-bar-wrapper {
    right: 120px;
    width: calc(100vw - 115px);
  }

  .search-bar-wrapper .text-box-wrapper input[type="text"] {
    width: calc(100vw - 285px);
    max-width: 100%;
  }
}

@media screen and (max-width: 900px) {
  .top-area .width-match > .nav-secondary > #menu-secondary,
  .width-match > .nav-secondary > #menu-secondary,
  .header__container > .width-match > .nav-secondary > #menu-secondary {
    display: none;
  }

  #navContainer .bottom-area {
    margin-top: 40px;
  }

  #closeNav {
    top: 21px;
  }

  .width-match {
    justify-content: flex-end;
    padding: 0;
    margin-right: 0;
    width: auto;
  }

  #toggleSearch {
    margin-right: 60px;
  }

  .search-bar-wrapper {
    right: 69px;
    width: calc(100vw - 133px);
  }

  .search-bar-wrapper .text-box-wrapper input[type="text"] {
    width: calc(100vw - 281px);
  }

  #navContainer {
    padding: 0 50px 60px 50px;
  }
}

@media screen and (min-width: 700px) {
  button.sub-nav-back {
    display: none;
  }
}

@media screen and (max-width: 700px) {
  #navContainer .top-area {
    height: 0;
    margin-top: 0;
  }

  #navContainer .bottom-area {
    padding-top: 150px;
    column-count: 1;
  }

  #navMain .menu > li {
    margin-bottom: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding: 20px 40px;
    background-color: #eeeee4;
    cursor: pointer;
  }

  #navMain .menu > li:hover {
    background-color: #e7e7dd;
  }

  #navMain .menu > li:first-child {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }

  #navMain .menu > li:hover:after {
    border: 2px solid #00af77;
    border-left: none;
    border-top: none;
  }

  #navMain .menu > li > a:hover {
    color: #00af77;
  }

  .social-media {
    padding: 30px 40px;
  }

  .social-media svg {
    height: 30px !important;
    margin-right: 30px;
  }

  #navContainer {
    width: 350px;
    padding: 0px 0 80px 0;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
  }

  #navMain .menu > li:after {
    content: "";
    display: inline-block;
    float: right;
    margin-top: 5px;
    border: 2px solid #56584f;
    border-left: none;
    border-top: none;
    width: 10px;
    height: 10px;
    transform: rotate(45deg);
    transform-origin: center;
  }

  #navMain .menu .sub-menu li {
    margin-top: 25px;
    margin-left: 0;
  }

  #navMain .menu .sub-menu li a {
    font-size: clamp(1.25rem, 1.1893rem + 0.2589vw, 1.5rem);
    line-height: 1.4;
  }

  #navMain .menu .sub-menu {
    margin-top: 0;
  }

  .sub-menu {
    display: block;
    height: calc(100vh - 90px);
    width: 350px;
    position: absolute;
    top: 90px;
    right: -400px;
    z-index: 1;
    overflow: hidden;
    padding: 80px 40px;
    background-color: #eeeee4;
  }

  button.sub-nav-back {
    background-color: transparent;
    border: none;
    display: inline-block;
    margin-bottom: 30px;
    padding: 0;
    position: absolute;
    top: 40px;
    z-index: 1000000000000;
    width: 30px;
    height: 30px;
    cursor: pointer;
  }

  button.sub-nav-back span {
    display: block;
    border: 2px solid #56584f;
    border-right: none;
    border-top: none;
    width: 10px;
    height: 10px;
    transform: rotate(45deg);
    transform-origin: center;
  }

  .top-area .nav-secondary #menu-secondary-1 {
    position: absolute;
    top: 30px;
    left: 40px;
  }

  .nav-secondary li {
    display: block;
  }

  .special-button {
    margin-bottom: 40px !important;
  }

  #closeNav {
    height: 35px;
    width: 35px;
    top: 35px;
    right: 30px;
  }

  #closeNav span.line {
    width: 35px;
  }

  #navContainer .bottom-area {
    margin-top: 0;
  }
}

@media screen and (max-width: 640px) {
  #toggleNav span.line {
    width: 37px;
    margin-top: 9px;
  }
}

@media screen and (max-width: 600px) {
  #navMain .menu .sub-menu li a {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-user-select: none !important;
    user-select: none !important;
    cursor: default !important;
  }
}

@media screen and (max-width: 500px) {
  .search-bar-wrapper {
    height: auto;
    right: -30px;
    width: 100vw;
    top: 70px;
    padding: 16px 30px;
    z-index: 10;
  }

  .search-bar-wrapper .text-box-wrapper input[type="text"] {
    width: calc(100vw - 210px);
  }
}

@media screen and (max-width: 420px) {
  #toggleSearch {
    margin-right: 50px;
  }

  .search-bar-wrapper {
    height: auto;
    right: -15px;
    width: 100vw;
    top: 70px;
    padding: 16px 15px;
    z-index: 10;
  }

  .search-bar-wrapper .text-box-wrapper input[type="text"] {
    width: calc(100vw - 180px);
  }
}

@media only screen and (max-width: 1024px) {
  .special-button:last-child {
    margin-right: 0 !important;
  }
}
