/* ============================================================
   Pixelmay Header — custom pm-* classes, zero conflict
   ============================================================ */

/* ── Base header ── */
#pm-head {
  position: sticky;
  top: 0;
  z-index: 10000;
  height: 64px;
  background: #fff;
  border-bottom: none;
  transition: top 0.3s ease;
}

#pm-head.is-hidden {
  top: -70px;
}

/* ── Inner: logo | searchbar | right-group ── */
.pm-head-inner {
  display: grid;
  grid-template-columns: auto 1fr auto; /* logo | search fills gap | nav+actions */
  align-items: center;
  height: 100%;
  padding: 0 32px;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
}

/* ── Logo ── */
.pm-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 8px;
}

.pm-logo-img {
  max-height: 40px;
  width: auto;
  display: block;
}

.pm-logo-text {
  font-size: 2.2rem;
  font-weight: 700;
  color: #111;
  white-space: nowrap;
}

/* ── Search bar ── */
.pm-search-bar {
  width: 100%;       /* fill the 1fr grid column entirely */
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  background: #f2f2f2;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  color: #666;
  font-size: 1.5rem;
  font-weight: 400;
  text-align: left;
  transition: background 0.15s;
  overflow: hidden;
}

.pm-search-bar:hover {
  background: #e8e8e8;
}

.pm-search-bar span {
  overflow: hidden;
  text-overflow: ellipsis;
  color: #666;
  flex: 1;
  min-width: 0;
}

/* ── Right group ── */
.pm-right {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Nav ── */
.pm-nav {
  display: flex;
  align-items: center;
  height: 64px;
}

/* Ghost {{navigation}} outputs <ul class="nav"> */
.pm-nav ul.nav {
  display: flex !important;
  align-items: center !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 64px !important;
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  gap: 0 !important;
}

.pm-nav ul.nav li {
  display: flex !important;
  align-items: center !important;
  height: 45px !important;
  opacity: 1 !important;
  transform: none !important;
  margin: 0 !important;
  padding: 0 !important;
  position: static !important;
}

.pm-nav ul.nav li a,
.pm-nav ul.nav li span {
  display: flex !important;
  align-items: center !important;
  height: 64px !important;
  padding: 0 12px !important;
  font-size: 1.6rem !important;
  font-weight: 500 !important;
  color: #222 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  opacity: 1 !important;
  transform: none !important;
  position: static !important;
  visibility: visible !important;
  transition: color 0.2s !important;
}

.pm-nav ul.nav li a:hover {
  color: var(--ghost-accent-color) !important;
}

/* ── Main nav hover: hovered item = accent, others unchanged ── */

/* Hovered main nav item → accent */
.pm-nav ul.nav li:hover > a,
.pm-nav ul.nav li:hover > span,
.pm-nav ul.nav li:hover > .nav-item__link {
  color: var(--ghost-accent-color) !important;
}

/* Arrow on hovered item → accent */
.pm-nav ul.nav li:hover > .nav-item__link svg {
  color: var(--ghost-accent-color) !important;
  fill: var(--ghost-accent-color) !important;
}

/* Non-hovered main nav items stay black — no dimming on main nav */

/* ── Submenu dropdown ── */
.pm-nav .subnav {
  position: relative;   /* dropdown will be absolute to THIS element */
  height: 64px;
  display: flex;
  align-items: center;
  isolation: isolate;
}

/* The ul.nav itself must NOT be a positioning context */
.pm-nav ul.nav {
  position: static !important;
}

/* Arrow handled by icon partial in navigation.hbs */

.pm-nav .subnav:hover > a,
.pm-nav .subnav:hover > span {
  color: var(--ghost-accent-color) !important;
}

.pm-nav .subnav:hover > a::after,
.pm-nav .subnav:hover > span::after {
  transform: rotate(180deg);
}

.pm-nav .submenu-wrapper {
  display: none;
  flex-direction: column;
  position: fixed;
  min-width: 200px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
  z-index: 20000;
  overflow: hidden;
  animation: pmFadeDown 0.15s ease;
}

@keyframes pmFadeDown {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pm-nav .subnav:hover .submenu-wrapper {
  display: flex;
}

.pm-nav .submenu {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}

.pm-nav .submenu li {
  height: auto !important;
}

.pm-nav .submenu li a {
  height: 45px !important;
  padding: 0 24px !important;
  font-size: 1.5rem !important;
  display: flex !important;
  align-items: center !important;
}

.pm-nav .submenu li a:hover {
  background: none !important;
  color: var(--ghost-accent-color) !important;
}

/* ── Pricing button ── */
.pm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 1.55rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--ghost-accent-color, #e91e8c);
  color: #fff !important;
  white-space: nowrap;
  flex-shrink: 0;
  transition: opacity 0.2s;
}

.pm-btn:hover {
  opacity: 0.85;
}

/* ── Sign in ── */
.pm-signin {
  font-size: 1.55rem;
  font-weight: 500;
  color: #222;
  text-decoration: none;
  padding: 6px 0px 6px 12px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s;
}

.pm-signin:hover {
  color: var(--ghost-accent-color);
}

/* ── Burger (mobile only) ── */
.pm-burger {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

/* ── Overlay ── */
.pm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.1);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
  z-index: 15000;
}

.pm-overlay.show {
  display: block;
}

html.lock-scroll body {
  overflow: hidden;
}

/* ── Mobile menu — slides down from top ── */
.gh-mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-height: 74vh;
  background: #fff;
  display: flex;
  flex-direction: column;
  z-index: 20000;
  overflow-y: auto;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.gh-mobile-menu.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

@keyframes pmSlideIn  { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pmSlideOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-20px); } }

.gh-mobile-menu.animateRight { animation: pmSlideIn  0.3s ease forwards; }
.gh-mobile-menu.animateLeft  { animation: pmSlideOut 0.25s ease forwards; }

.gh-mobile-menu__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 34px 0;
  flex-shrink: 0;
}

.gh-mobile-menu__close-btn {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.gh-mobile-menu__close-btn svg path { stroke: #222; }
.gh-mobile-menu-main { flex: 1; overflow-y: auto; }

.gh-mobile-menu__nav {
  padding: 24px 34px 6px;
}

.gh-mobile-menu__nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.gh-mobile-menu__nav-item {
  display: flex;
  flex-direction: column;
}

.gh-mobile-menu__nav-item .nav-item__link {
  font-size: 1.7rem;
  font-weight: 500;
  color: #111;
  padding: 6px 0;
  display: block;
  text-decoration: none;
  height: auto;
}

.gh-mobile-menu__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  padding: 0;
}

.gh-mobile-menu__btn svg path { fill: #222; }
.gh-mobile-menu__btn svg { rotate: 0deg; transition: rotate 0.25s ease; }
.gh-mobile-menu__nav-item.active .gh-mobile-menu__btn svg { rotate: 90deg; }

.mobile-submenu {
  height: 0;
  overflow: hidden;
  transition: height 0.28s ease;
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-submenu-wrapper {
  padding-bottom: 0;
}

.gh-mobile-menu__nav-item.active .gh-mobile-menu__btn {
  padding-bottom: 0;
}

.mobile-submenu .submenu__item:last-child .submenu__item-link {
  padding-bottom: 0;
}

.mobile-submenu .submenu__item-link {
  display: block;
  font-size: 1.5rem;
  color: #555;
  padding: 5px 0;
  line-height: 1.4;
  text-decoration: none;
}

.mobile-submenu li {
  padding-left: 0;
  list-style: none;
}

.gh-mobile-menu__nav-list li {
  padding-left: 0;
}

.gh-mobile-menu__nav .pm-btn {
  display: block;
  text-align: center;
  margin-top: 20px;
}

.gh-main-button.gh-member-button {
  margin-top: 32px;
}

.mob-menu-signin {
  margin-top: 20px;
  margin-bottom: 28px;
}


/* nav-item__link class dari navigation.hbs Spotlight */
.pm-nav .nav-item__link {
  display: flex !important;
  align-items: center !important;
  height: 64px !important;
  padding: 0 12px !important;
  font-size: 1.6rem !important;
  font-weight: 500 !important;
  color: #222 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
  transition: color 0.2s !important;
  cursor: pointer;
  background: none;
  border: none;
}

.pm-nav .nav-item__link:hover {
  color: var(--ghost-accent-color) !important;
}

/* Arrow handled by icon partial in navigation.hbs */

.pm-nav .subnav:hover > .nav-item__link {
  color: var(--ghost-accent-color) !important;
}

.pm-nav .subnav:hover > .nav-item__link::after {
  transform: rotate(180deg);
}

/* submenu item links */
.pm-nav .submenu__item-link {
  display: flex !important;
  align-items: center !important;
  height: 45px !important;
  padding: 0 24px !important;
  font-size: 1.5rem !important;
  font-weight: 500 !important;
  color: #222 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  transition: color 0.2s !important;
}

.pm-nav .submenu__item-link:hover {
  background: none !important;
  color: var(--ghost-accent-color) !important;
}



/* ── Submenu hover logic ── */

/* Default: semua item submenu hitam */
.pm-nav .submenu__item-link,
.pm-nav .submenu li > a {
  color: #222 !important;
  background: none !important;
  transition: color 0.2s !important;
}

/* Saat hover dalam submenu: non-hovered → abu tua #555 */
.pm-nav .submenu:hover .submenu__item-link:not(:hover),
.pm-nav .submenu:hover li:not(:hover) > a {
  color: #555 !important;
  background: none !important;
}

/* Item submenu yang di-hover → accent */
.pm-nav .submenu:hover .submenu__item-link:hover,
.pm-nav .submenu:hover li:hover > a {
  color: var(--ghost-accent-color) !important;
  background: none !important;
}

/* ── Dropdown icon (icons/dropdown.hbs partial) ── */
.pm-nav .nav-item__link svg {
  width: 16px !important;
  height: 16px !important;
  margin-left: 3px !important;
  flex-shrink: 0 !important;
  transition: transform 0.2s, color 0.2s, fill 0.2s !important;
  color: #222 !important;   /* sync with text default */
  fill: #222 !important;
  vertical-align: middle !important;
}

.pm-nav .subnav:hover .nav-item__link svg {
  transform: rotate(180deg) !important;
  color: var(--ghost-accent-color) !important;
  fill: var(--ghost-accent-color) !important;
}

/* Submenu wrapper top padding for breathing room */
.pm-nav .submenu {
  list-style: none;
  margin: 0;
  padding: 18px 0 18px 22px;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .pm-head-inner {
    grid-template-columns: auto 1fr auto; /* same grid, nav hidden via pm-nav */
  }
  .pm-nav     { display: none; }
  .pm-signin  { display: none; }
  .pm-burger  { display: flex; }
}

@media (max-width: 480px) {
  .pm-head-inner { padding: 0 16px; }
  .pm-search-bar span { display: none; }
  .pm-search-bar {
    max-width: 38px;
    justify-content: center;
    background: none;
    padding: 0;
  }
}

/* ── % Features / $ More — overflow dropdown (three-dot icon) ── */
.pm-nav ul.nav li.gh-subnav-icon {
  display: none !important;
}

.gh-subnav-icon {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px 8px;
  position: relative;
  cursor: pointer;
}

.gh-subnav-icon svg {
  color: var(--color-text-main);
  transition: color 0.25s ease;
}

.gh-subnav-icon:hover svg {
  color: var(--ghost-accent-color) !important;
}

.gh-header-subnav {
  display: none;
  flex-direction: column;
  align-items: flex-start;
  position: fixed;
  min-width: 180px;
  background-color: var(--color-background-main, #fff);
  border: 1px solid var(--color-borders, #e8e8e8);
  box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.10);
  border-radius: var(--border-radius-containers, 10px);
  animation: pmFadeDown 0.15s ease;
  width: max-content;
  z-index: 20000;
  overflow: hidden;
}

.gh-subnav-icon:hover .gh-header-subnav {
  display: flex;
}

.gh-header-subnav .submenu {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
}

.gh-header-subnav .submenu .submenu__item {
  width: 100%;
}

.gh-header-subnav .submenu .submenu__item-link {
  display: block;
  width: 100%;
  padding: 8px 32px;
  font-family: var(--font-family-navigation);
  font-size: var(--font-size-navigation);
  font-weight: var(--font-weight-navigation);
  letter-spacing: var(--letter-spacing-navigation);
  text-transform: var(--text-transfrom-navigation);
  color: var(--color-text-main);
  white-space: nowrap;
  transition: color 0.25s ease;
  line-height: 120%;
}

.gh-header-subnav .submenu .submenu__item:first-child .submenu__item-link {
  padding-top: 20px;
}

.gh-header-subnav .submenu .submenu__item:last-child .submenu__item-link {
  padding-bottom: 20px;
}

.gh-header-subnav .submenu .submenu__item-link:hover {
  color: var(--ghost-accent-color) !important;
}

:root[data-color-scheme="dark"] .gh-header-subnav {
  background-color: #29292a;
}
