/* EX SERVER Header
   Uses tokens from ex-theme.css. Keep this file focused on the shared site header. */

.ex-header {
  position: relative;
  z-index: 20;
  width: 100%;
  box-sizing: border-box;
  border-bottom: 1px solid rgba(218, 176, 92, 0.16);
  background:
    linear-gradient(180deg, rgba(12, 12, 11, 0.99), rgba(4, 4, 4, 0.98)),
    #050505;
  color: var(--ex-text);
  font-family: "Noto Sans KR", "Malgun Gothic", Arial, sans-serif;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34);
}

.ex-header *,
.ex-header *::before,
.ex-header *::after {
  box-sizing: border-box;
}

.ex-header-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  max-width: 1180px;
  min-height: 86px;
  margin: 0 auto;
  padding: 0 16px;
}

.ex-header-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 218px;
  color: inherit;
  text-decoration: none;
}

.ex-header-mark {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;

  width: 52px;
  height: 52px;
  overflow: hidden;

  border: 1px solid rgba(216, 173, 88, 0.28);
  border-radius: 12px;

  background:
    linear-gradient(145deg, rgba(216, 173, 88, 0.14), rgba(255, 255, 255, 0.025)),
    linear-gradient(180deg, #14120d, #050505);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.07),
    0 12px 22px rgba(0,0,0,.30);
}


.ex-header-mark img{
    display:block;
    width:48px;
    height:48px;
    object-fit:contain;
}

.ex-header-mark::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(255, 226, 163, 0.12);
  border-radius: 8px;
  pointer-events: none;
}

.ex-header-name {
  display: grid;
  gap: 3px;
}

.ex-header-title {
  color: #fff3d5;
  font-size: 21px;
  font-weight: 950;
  line-height: 1.1;
  letter-spacing: 0;
}

.ex-header-subtitle {
  color: #b8a98f;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
}

.ex-header-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
}

.ex-header-link {
  position: relative;
  display: inline-grid;
  align-content: center;
  justify-content: center;
  gap: 3px;
  min-height: 52px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #e5dac5;
  font-size: 15px;
  font-weight: 850;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.ex-header-link::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 6px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216, 173, 88, 0.7), transparent);
  opacity: 0;
}

.ex-header-link-main,
.ex-header-link-sub {
  display: block;
}

.ex-header-link-sub {
  color: #8f826e;
  font-size: 10px;
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.ex-header-link:hover,
.ex-header-link:focus-visible {
  border-color: rgba(216, 173, 88, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(216, 173, 88, 0.045)),
    rgba(0, 0, 0, 0.28);
  color: #fff2cf;
  outline: none;
}

.ex-header-link:hover::after,
.ex-header-link:focus-visible::after {
  opacity: 1;
}

.ex-header-link:hover .ex-header-link-sub,
.ex-header-link:focus-visible .ex-header-link-sub {
  color: #c9b895;
}

.ex-header-link.is-active,
.ex-header-link[aria-current="page"] {
  border-color: rgba(216, 173, 88, 0.24);
  background:
    linear-gradient(180deg, rgba(216, 173, 88, 0.09), rgba(255, 255, 255, 0.018)),
    rgba(0, 0, 0, 0.34);
  color: var(--ex-accent-strong);
}

.ex-header-link.is-active::after,
.ex-header-link[aria-current="page"]::after {
  opacity: 1;
}

.ex-header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.ex-header-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(255, 226, 163, 0.13);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.32);
  color: var(--ex-muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.ex-header-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ex-accent);
  box-shadow: 0 0 0 4px rgba(216, 173, 88, 0.12);
}

.ex-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 226, 163, 0.24);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(216, 173, 88, 0.13), rgba(184, 134, 50, 0.08)),
    rgba(0, 0, 0, 0.34);
  color: #fff2cf;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.ex-header-cta:hover,
.ex-header-cta:focus-visible {
  border-color: rgba(255, 226, 163, 0.38);
  color: #fff8e9;
  outline: none;
}

.ex-header-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 226, 163, 0.24);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--ex-accent-strong);
  cursor: pointer;
}

.ex-header-toggle-line {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.ex-header-toggle-line::before,
.ex-header-toggle-line::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
}

.ex-header-toggle-line::before {
  top: -6px;
}

.ex-header-toggle-line::after {
  top: 6px;
}

@media (max-width: 1040px) {
  .ex-header-inner {
    grid-template-columns: auto 1fr auto;
    gap: 14px;
  }

  .ex-header-link {
    padding: 0 9px;
    font-size: 14px;
  }

  .ex-header-status {
    display: none;
  }
}

@media (max-width: 860px) {
  .ex-header-inner {
    min-height: 68px;
  }

  .ex-header-nav {
    display: none;
  }

  .ex-header-actions {
    gap: 8px;
  }

  .ex-header-cta {
    display: none;
  }

  .ex-header-toggle {
    display: inline-flex;
  }

  .ex-header.is-menu-open .ex-header-nav,
  .ex-header[data-menu-open="true"] .ex-header-nav {
    position: absolute;
    left: 12px;
    right: 12px;
    top: calc(100% + 8px);
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid var(--ex-line-strong);
    border-radius: var(--ex-radius-md);
    background:
      linear-gradient(180deg, rgba(18, 17, 14, 0.98), rgba(8, 8, 8, 0.98)),
      #080808;
    box-shadow: var(--ex-shadow);
  }

  .ex-header.is-menu-open .ex-header-link,
  .ex-header[data-menu-open="true"] .ex-header-link {
    justify-content: flex-start;
    min-height: 48px;
  }
}

@media (max-width: 520px) {
  .ex-header-inner {
    padding: 0 12px;
  }

  .ex-header-brand {
    min-width: 0;
  }

  .ex-header-mark {
    width: 42px;
    height: 42px;
  }

  .ex-header-title {
    font-size: 18px;
  }

  .ex-header-subtitle {
    font-size: 11px;
  }
}
