/* YILMEX site mega nav — header expands from the top (not a floating card) */

:root {
  --ymn-header: #000000;
  --ymn-panel: #12151a;
  --ymn-line: rgba(255, 255, 255, 0.1);
  --ymn-text: #f4f7fb;
  --ymn-muted: #9aa8b8;
  --ymn-blue: #4da3ff;
  --ymn-blue-hover: #6bb6ff;
}

/* Hide native Blocksy desktop dropdowns once enhanced */
@media (min-width: 1000px) {
  header.ct-header.ymn-enhanced #header-menu-1 .menu > .menu-item-has-children > .sub-menu,
  header.ct-header.ymn-enhanced #menu-hauptmenue > .menu-item-has-children > .sub-menu,
  header.ct-header.ymn-enhanced .menu > .menu-item-has-children > .sub-menu {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  header.ct-header.ymn-enhanced #header-menu-1 .menu > .menu-item-has-children.is-mega-active > a.ct-menu-link,
  header.ct-header.ymn-enhanced #menu-hauptmenue > .menu-item-has-children.is-mega-active > a.ct-menu-link {
    color: var(--ymn-blue) !important;
  }

  header.ct-header.ymn-enhanced.ymn-header-open,
  header.ct-header.ymn-enhanced.ymn-header-open [data-row],
  header.ct-header.ymn-enhanced.ymn-header-open [data-row] > div {
    background-color: var(--ymn-header) !important;
    box-shadow: none !important;
  }

  /*
   * Sticky/scroll-up header must stay above the mega panel so logo + all
   * top-level items remain visible while a submenu is open.
   */
  header#header,
  header.ct-header,
  header.ct-header.ymn-enhanced,
  header.ct-header.ymn-header-open,
  .ct-sticky-container,
  .ct-sticky-container header.ct-header,
  [data-sticky] {
    z-index: 100060 !important;
  }
}

.ymn-panel {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 100040; /* below sticky header (100060) */
  display: block;
  margin: 0;
  padding: 0;
  pointer-events: none;
  overflow: hidden;
  max-height: 0;
  opacity: 1;
  background: var(--ymn-panel);
  border: 0;
  border-top: 1px solid var(--ymn-line);
  border-radius: 0 0 14px 14px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.5);
  transform: none;
  transition: max-height 0.24s ease;
}

.ymn-panel.is-open {
  pointer-events: auto;
  max-height: min(50vh, 260px);
}

.ymn-panel[hidden] {
  display: none !important;
}

.ymn-inner {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 16px 0 20px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

/* Keep structure for JS, but no loud title strip */
.ymn-head {
  display: none;
}

.ymn-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  width: min(520px, 100%);
  margin-left: auto;
}

.ymn-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: auto;
  flex: 0 0 auto;
  box-sizing: border-box;
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--ymn-text) !important;
  text-align: left;
  text-decoration: none !important;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.ymn-link:hover,
.ymn-link.is-current {
  background: rgba(77, 163, 255, 0.12);
  color: var(--ymn-blue-hover) !important;
}

.ymn-link-mark {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  opacity: 1;
}

.ymn-btc-coin {
  background:
    radial-gradient(circle at 32% 28%, #ffd27a 0%, transparent 42%),
    linear-gradient(160deg, #f0b45a 0%, #f7931a 52%, #c56e0a 100%);
  box-shadow:
    0 0 0 1px rgba(255, 210, 122, 0.35),
    0 4px 10px rgba(0, 0, 0, 0.35);
}

.ymn-eth-coin {
  background:
    radial-gradient(circle at 32% 28%, #a8b6ff 0%, transparent 42%),
    linear-gradient(160deg, #8fa0f0 0%, #627eea 52%, #3f51b5 100%);
  box-shadow:
    0 0 0 1px rgba(168, 182, 255, 0.35),
    0 4px 10px rgba(0, 0, 0, 0.35);
}

.ymn-link:hover .ymn-btc-coin,
.ymn-link.is-current .ymn-btc-coin {
  box-shadow:
    0 0 0 1px rgba(255, 210, 122, 0.5),
    0 6px 14px rgba(247, 147, 26, 0.35);
}

.ymn-link:hover .ymn-eth-coin,
.ymn-link.is-current .ymn-eth-coin {
  box-shadow:
    0 0 0 1px rgba(168, 182, 255, 0.5),
    0 6px 14px rgba(98, 126, 234, 0.35);
}

.ymn-link-mark svg {
  display: block;
  width: 14px;
  height: 14px;
}

.ymn-link--overview {
  flex: 0 0 auto;
  width: auto;
  max-width: max-content;
  justify-content: flex-end;
  margin: 0 0 0 auto;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  text-align: right;
}

.ymn-divider {
  flex: 0 0 100%;
  width: 100%;
  height: 1px;
  margin: 2px 0 4px;
  background: var(--ymn-line);
  pointer-events: none;
}

.ymn-link--overview .ymn-link-title {
  color: var(--ymn-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ymn-link--overview:hover .ymn-link-title {
  color: var(--ymn-blue-hover);
}

.ymn-link-title {
  display: block;
  min-width: 0;
  color: inherit;
  font-family: Lato, Arial, sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.ymn-empty {
  margin: 0;
  padding: 8px 14px;
  width: 100%;
  box-sizing: border-box;
  color: var(--ymn-muted);
  font-family: Lato, Arial, sans-serif;
  font-size: 14px;
  text-align: right;
}

@media (max-width: 999px) {
  .ymn-panel {
    display: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ymn-panel,
  .ymn-link {
    transition: none;
  }
}
