body {
  font-family: sans-serif;
  margin: 0;
}

.header {
  background: linear-gradient(to bottom, #55a329, #289655);
}

.header-upper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 6px 20px;
  transition: padding 0.35s ease;
  position: relative;
  z-index: 3000;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}

.header-lower {
  padding: 0px 5px;
  background-color: #0055aa00;
  position: relative;
}

.header-button {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: rgba(255, 255, 255, 0);
  text-decoration: none;
  color: white;
  text-shadow: 4px 3px 0 rgba(0, 0, 0, 0.26);
  transition: background-color 0.3s ease;
  flex: 1 1 auto;
  min-width: 0;
}

.header-button:hover .shev-name {
  color: #ffcc00; /* change color on hover */
}

.header-logo {
  width: clamp(40px, 9vw, 60px);
  height: auto;
  transition: width 0.35s ease, height 0.35s ease;
}

.shev-name {
  font-size: clamp(12px, 2vw + 4px, 32px);
  line-height: 1.4;
  transition: color 0.3s ease, opacity 0.35s ease, font-size 0.35s ease;
  font-family: "Aventis_Deco", sans-serif;
  min-width: 0;
}

/********** start of PC navigation **********/
.nav-menu {
  display: flex;
  width: 100%;
  flex-wrap: wrap;
  justify-content: center; /* center items horizontally */
  align-items: center; /* center items vertically if there's height */
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 5px;
}

.nav-menu > li {
  flex: 1;
  position: relative;
  font-size: clamp(14px, 1.2vw, 18px);
}

.nav-menu > li > a,
.nav-menu > li > span {
  display: block;
  padding: 12px 14px;
  color: rgb(255, 255, 255);
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  width: auto;
  background-color: #b2ec4700;
  font-family: "CreativeBlock", sans-serif;
  text-shadow:
    3px 3px 0 rgba(0, 0, 0, 0.233),
    0 0 15px rgba(255, 254, 206, 0.356);
  transition:
    background-color 0.3s ease,
    color 0.3s ease,
    text-shadow 0.3s ease,
    padding 0.35s ease,
    font-size 0.35s ease;
}

.nav-menu > li > a:hover,
.nav-menu > li > span:hover {
  color: #ffee56; /* bright yellow */
  text-shadow:
    4px 3px 0 rgba(0, 0, 0, 0.2),
    0 0 20px rgba(255, 255, 78, 0.404); /* optional glow effect */
}

.header-button:hover .shev-name {
  color: #ffee56;
  text-shadow:
    4px 3px 0 rgba(0, 0, 0, 0.2),
    0 0 20px rgba(255, 255, 78, 0.404);
}

/* Dropdowns hidden by default */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: auto;
  background-color: #0c7e28d7;
  box-shadow: 4px 3px 0 rgba(0, 0, 0, 0.199);
  list-style: none;
  padding: 0;
  margin: 0;
  z-index: 10;
}

.dropdown-menu li a {
  flex: 1; /* optional if using flex on parent */
  display: block;
  padding: 15px 10px;
  color: white;
  text-decoration: none;
  text-align: center; /* optional: center text */
  font-size: 15px;
  font-weight: bold;
}

.dropdown-menu li a:hover {
  background-color: #16b14a52;
  color: #fdff6d;
}

.dropdown-menu li a img {
  width: clamp(28px, 2.5vw, 38px);
  height: auto;
  vertical-align: middle;
  object-fit: contain;
  margin-block: -40px;
}
/********** end of PC navigation **********/

.header-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 15px;
  position: relative;
  z-index: 2000;
  flex: 0 0 auto;
  margin-left: auto;
}

/********** start of the upper right buttons **********/
.onl-prod {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: clamp(30px, 9vw, 50px);
}

.onl-prod img {
  width: clamp(30px, 9vw, 50px);
  color: #333;
  display: inline-block;
  transition: transform 0.2s ease, width 0.35s ease;
}

.header-right .dropdown {
  position: relative;
  z-index: 3000;
}

/* DEFAULT hidden */
.header-right .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  padding: 8px 12px;
  background-color: #0c7e28f0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  white-space: nowrap;
  z-index: 9999 !important;
  min-width: 140px;
  box-sizing: border-box;
}

/* Invisible hover bridge to prevent losing hover when moving cursor into dropdown */
.header-right .dropdown-menu::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
}

/* ✅ OPEN STATE (JS toggle or hover) */
.header-right .dropdown.open .dropdown-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (hover: hover) {
  .header-right .dropdown:hover .dropdown-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
}

.header-right .dropdown-menu li {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.header-right .dropdown-menu li button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  border: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.header-right .dropdown-menu li button:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.03);
}

.header-right .dropdown-menu li button img {
  width: 32px;
  height: 32px;
  max-width: none;
  max-height: none;
  object-fit: contain;
  margin: 0;
}

/********** end of the upper right buttons **********/

/* #region ENDBAR */
.end-bar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  background: linear-gradient(to bottom, #289655, #55a329);
  padding: 15px 8%;
  height: auto;
}

.end-left {
  grid-column: 1;
  color: #ffffff;
  font-size: clamp(18px, 1.5vw, 30px);
  font-family: "CreativeBlock", sans-serif;
  text-shadow:
    3px 3px 0 rgba(0, 0, 0, 0.233),
    0 0 15px rgba(255, 254, 206, 0.356);
  white-space: nowrap;
}

.end-center {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-align: center;
  margin-inline: 40px;
}

.end-bar .end-center p {
  margin: 0;
  text-align: center;
  color: #ffffff;
  font-size: clamp(15px, 1.5vw, 20px);
  font-family: "CreativeBlock", sans-serif;
  text-shadow:
    3px 3px 0 rgba(0, 0, 0, 0.233),
    0 0 15px rgba(255, 254, 206, 0.356);
  overflow-wrap: break-word;
  hyphens: auto;
}

.end-center div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.end-center a {
  display: block;
  max-width: 100%;
  text-align: center;
  text-decoration: none;
  color: #f6fcdd;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1;
  font-family: "CreativeBlock", sans-serif;
  text-shadow:
    3px 3px 0 rgba(0, 0, 0, 0.233),
    0 0 15px rgba(255, 254, 206, 0.356);
}

.end-bar a {
  text-decoration: none;
  color: #f6fcdd;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1;
  text-shadow:
    3px 3px 0 rgba(0, 0, 0, 0.233),
    0 0 15px rgba(255, 254, 206, 0.356);
  transition: transform 0.3s ease, color 0.3s ease, text-shadow 0.3s ease;
}

.end-bar a:hover {
  color: #ffee56;
  transform: scale(1.03);
  text-shadow:
    4px 3px 0 rgba(0, 0, 0, 0.2),
    0 0 20px rgba(255, 255, 78, 0.404);
}

.end-bar a:hover p,
.end-bar a:hover i {
  color: #ffee56;
  text-shadow:
    4px 3px 0 rgba(0, 0, 0, 0.2),
    0 0 20px rgba(255, 255, 78, 0.404);
}

.end-right {
  grid-column: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 6px;
}

.end-right div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.end-bar p {
  display: block;
  text-align: left;
  text-decoration: none;
  color: #ffffff;
  font-size: clamp(15px, 1.5vw, 20px);
  font-family: "CreativeBlock", sans-serif;
  text-shadow:
    3px 3px 0 rgba(0, 0, 0, 0.233),
    0 0 15px rgba(255, 254, 206, 0.356);
  margin: 0;
}

/* #endregion */

/* #region BLACK MODE */
/* Handled dynamically and seamlessly by loadheader.js Dark Mode Engine */
/* #endregion */

/* Show dropdown on desktop hover or click (.open) */
@media (min-width: 825px) {
  .header-lower {
    position: relative;
    z-index: 2500;
  }

  .nav-menu {
    flex-direction: row;
    align-items: stretch;
  }

  .nav-menu > li {
    display: flex;
    flex-direction: column;
  }

  .nav-menu > li > a,
  .nav-menu > li > span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    box-sizing: border-box;
  }

  /* Show dropdown on desktop hover OR when clicked/pinned (.open) */
  .nav-menu > .dropdown:hover > .dropdown-menu,
  .nav-menu > .dropdown.open > .dropdown-menu {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: auto;
    min-width: max(180px, 100%) !important;
    z-index: 3000;
  }

  /* Invisible hover bridge to eliminate any subpixel/seam gap when moving cursor to dropdown */
  .nav-menu > .dropdown > .dropdown-menu::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
    background: transparent;
  }

  /* Align right edge for dropdowns on the right side to prevent horizontal viewport overflow */
  .nav-menu > .dropdown:last-child > .dropdown-menu,
  .nav-menu > .dropdown:nth-last-child(2) > .dropdown-menu {
    left: auto;
    right: 0;
  }

  /* Visual feedback when dropdown is clicked/pinned open */
  .nav-menu > .dropdown.open > a,
  .nav-menu > .dropdown.open > span {
    color: #ffee56;
    text-shadow:
      4px 3px 0 rgba(0, 0, 0, 0.2),
      0 0 20px rgba(255, 255, 78, 0.404);
  }
}

@media (hover: hover) {
  .header-right .dropdown:hover .dropdown-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
}

/* Mobile styles */
@media (max-width: 825px) {

  .menu-toggle {
    display: block !important;
    background-color: #00408000;
    color: white;
    border: none;
    padding: 12px 16px;
    font-size: 18px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-family: "CreativeBlock", sans-serif;
    text-shadow:
      3px 3px 0 rgba(0, 0, 0, 0.233),
      0 0 15px rgba(255, 254, 206, 0.356);
  }

  .menu-toggle .menu-icon {
    display: inline-block;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
  }

  .menu-toggle.open .menu-icon {
    transform: rotate(90deg);
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(to bottom, #289655, #1e703f);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
    clip-path: inset(0px -30px -30px -30px);
    flex-direction: column;
    width: auto;
    align-items: stretch; /* important */
    padding: 5px;
    display: flex; /* always flex */
    overflow: hidden;

    max-height: 0; /* hidden state */
    opacity: 0;

    transition:
      max-height 0.4s ease,
      opacity 0.3s ease;
  }

  .nav-menu.show {
    max-height: 800px; /* big enough to fit content */
    opacity: 1;
  }

  .nav-menu .dropdown-menu {
    display: block;
    padding: 0;
    margin: 0;
    list-style: none;
    position: static;
    margin-left: 0;
    box-shadow: none !important;

    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .nav-menu .dropdown.open .dropdown-menu {
    max-height: 500px;
    display: block;
  }

  /* Keep header upper right dropdown (accessibility / font size / dark mode menu) floating, wide, and large on mobile */
  .header-right .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    max-height: none !important;
    overflow: visible !important;
    background-color: #0c7e28f0 !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
    white-space: nowrap !important;
    z-index: 9999 !important;
    min-width: 140px !important;
  }

  .header-right .dropdown:not(.open) .dropdown-menu {
    display: none !important;
  }

  .header-right .dropdown.open .dropdown-menu {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .header-right .dropdown-menu li {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
  }

  .header-right .dropdown-menu li button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 44px !important;
    padding: 8px 14px !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: 6px !important;
    border: none !important;
    box-sizing: border-box !important;
  }

  .header-right .dropdown-menu li button img {
    width: 32px !important;
    height: 32px !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain !important;
    margin: 0 !important;
  }

  .nav-menu > li {
    width: 100%;
    background-color: rgba(25, 77, 77, 0);
  }

  .nav-menu > li > a,
  .nav-menu > li > span {
    text-align: center; /* optional */
    padding: 15px;
  }

  .nav-menu.show {
    display: flex;
  }

  /* #region ENDBAR MOBILE */
  .end-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 24px 16px;
    text-align: center;
  }

  .end-left {
    width: min(60vw, 240px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    white-space: normal;
    text-align: center;
    margin: 0 auto;
  }

  .end-left iframe {
    width: min(60vw, 240px);
    aspect-ratio: 1 / 1;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  .end-center {
    width: min(70vw, 280px);
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    text-align: center;
    visibility: visible;
    opacity: 1;
  }

  .end-bar .end-center p {
    margin: 0;
    width: 100%;
    text-align: center;
    font-size: clamp(16px, 4vw, 22px);
    line-height: 1.2;
    font-family: "CreativeBlock", sans-serif;
    white-space: normal;
  }

  .end-center div {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
  }

  .end-center a {
    font-size: clamp(24px, 7vw, 34px);
    line-height: 1;
  }

  .end-right {
    width: min(60vw, 240px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 0 auto;
  }

  .end-right div {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
  }

  .end-right a {
    font-size: clamp(18px, 4vw, 22px);
    text-align: center;
  }

  .end-bar p {
    width: 100%;
    text-align: center;
    font-size: clamp(16px, 4vw, 22px);
  }
  /* #endregion */

}
